各位好
请问用宏指令怎么做上升沿?
macro_command main()
bool b=1,c=0,quanxuan,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30
GetData(a11, "Local HMI", LB, 301, 1)
GetData(a12, "Local HMI", LB, 302, 1)
GetData(a13, "Local HMI", LB, 303, 1)
GetData(a14, "Local HMI", LB, 304, 1)
GetData(a15, "Local HMI", LB, 305, 1)
GetData(a16, "Local HMI", LB, 306, 1)
GetData(a17, "Local HMI", LB, 307, 1)
GetData(a18, "Local HMI", LB, 308, 1)
GetData(a19, "Local HMI", LB, 309, 1)
GetData(a20, "Local HMI", LB, 310, 1)
GetData(a21, "Local HMI", LB, 311, 1)
GetData(a22, "Local HMI", LB, 312, 1)
GetData(a23, "Local HMI", LB, 313, 1)
GetData(a24, "Local HMI", LB, 314, 1)
GetData(a25, "Local HMI", LB, 315, 1)
GetData(a26, "Local HMI", LB, 316, 1)
GetData(a27, "Local HMI", LB, 317, 1)
GetData(a28, "Local HMI", LB, 318, 1)
GetData(a29, "Local HMI", LB, 319, 1)
GetData(a30, "Local HMI", LB, 320, 1)
GetData(quanxuan, "Local HMI", LB, 400, 1)
if a11==1 and a12==1 and a13==1 and a14==1 and a15==1 and a16==1 and a17==1 and a18==1 and a19==1 and a20==1 and a21==1 and a22==1 and a23==1 and a24==1 and a25==1 and a26==1 and a27==1 and a28==1 and a29==1 and a30==1 then
SetData(b, "Local HMI", LB, 400, 1)
end if
在这里, if a11==1 and a12==1 and a13==1 and a14==1 and a15==1 and a16==1 and a17==1 and a18==1 and a19==1 and a20==1 and a21==1 and a22==1 and a23==1 and a24==1 and a25==1 and a26==1 and a27==1 and a28==1 and a29==1 and a30==1 then
我想要只有一个上升沿有效,就是说当a11-a30,全部为1 时候,LB400等于1, 这个只是上升沿有效,过了就没有效了,或者说a11-a30等于1延时0.2秒之后 LB400=1, 过了0.2秒就没有触发LB400的能力
|