macro_command main()
//定义变量
bool status,OFF=false,ON=true
short page
//读取lb 9060的状态值
GetData(status, "Local HMI", LB, 9060, 1)
//判断
如果状态为 TRUE 将LB1 置1
if status==true then
SetData(ON, "Local HMI", LB, 1, 1)
else
//判断 如果状态为 FALSE 跳转画面到 31 同时将31数值传输到 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