a13650172982
好好學(xué)習(xí)!天天向上!
級(jí)別: 論壇先鋒
![]() |
誰(shuí)知道告訴我一下,謝謝!是不是在plc控制和宏程序里面 |
---|---|
|
湖北張軍
級(jí)別: 探索解密
![]() |
macro_command main() //定義變量 bool status,OFF=false,ON=true short page //讀取lb 9060的狀態(tài)值 GetData(status, "Local HMI", LB, 9060, 1) //判斷 如果狀態(tài)為 TRUE 將LB1 置1 if status==true then SetData(ON, "Local HMI", LB, 1, 1) else //判斷 如果狀態(tài)為 FALSE 跳轉(zhuǎn)畫(huà)面到 31 同時(shí)將31數(shù)值傳輸?shù)?PLC D0中 if status==false then page=31 SetData(page, "DELTA DVP", D, 0, 1) end if end if SetData(OFF, "Local HMI", LB, 0, 1) end macro_command |
---|---|
本帖最近評(píng)分記錄: |