就不知道程序改怎么写了,问问大佬们。
I0.0输入的时候,LB0指示灯亮
I0.1有信号,I0.2没信号,等待3S采集Q0.3,Q0.3有信号,LB1亮.
这个程序需要怎么写,这个延迟函数感觉放不进去啊
macro_command main()
bool i00,i01,i02,q03
GetData(i00, "Siemens S7-200 PPI", I, 0.0, 1)
GetData(i01, "Siemens S7-200 PPI", I, 0.1, 1)
GetData(i02, "Siemens S7-200 PPI", I, 0.2, 1)
GetData(q03, "Siemens S7-200 PPI", Q, 0.3, 1)
if i00==1 then
SetData(i00, "Local HMI", LB, 0, 1)
else if i00==0 then
SetData(i00, "Local HMI", LB, 0, 1)
end if
if i01==1 and i02==0 and DELAY(3000) q03==1 then
SetData(i01, "Local HMI", LB, 1, 1)
else if i01==0 then
SetData(i01, "Local HMI", LB, 1, 1)
end if