手自动切换时,gimode跳转不过去
经过改进,组态端设置读取gbIOAutoMode,
0时为手动
1时为自动
通过宏指令变量a切换,发现切换不了。
SetData(StateFalse, " MODBUS RTU Device ", 0x, 2, 1)
GetData(a," MODBUS RTU Device ",1x,416,1)
if(a==1)then
SetData(mode5, " MODBUS RTU Device ", 4x, 1, 1)
char buffer2[40]= "PLC_VISU_AUTO"
StringSet(buffer2[0], "MODBUS RTU Device", 4x, 10, 40)
SetData(auto, "Local HMI", LW, 1, 1)
SetData(stateTRUE, " MODBUS RTU Device ", 0x, 1, 1)
end if
if a==0 then
SetData(mode3, " MODBUS RTU Device ", 4x, 1, 1)
char buffer[40]= "PLC_VISU_HANDLE"
StringSet(buffer[0], "MODBUS RTU Device", 4x, 10, 40)
//切换画面为手动界面
SetData(handle, "Local HMI", LW, 1, 1)
SetData(stateTRUE, " MODBUS RTU Device ", 0x, 1, 1)
end if
请问如何解决通过PLC切换画面的问题?? |