已解決了。H1124==4X4388,4X4389
macro_command main()
short result1
short result2
GetData(result1,"MODBUS RTU" 4x,4389,1)
SetData(result1,"Local HMI" LW,10,1)
end macro_command
再把LW10(十進(jìn)制)轉(zhuǎn)成LW1000-----LW1007(8個(gè)二進(jìn)制數(shù)就行了),也就是把LW1000,LW1001,LW1002,LW1003......做到屏里去顯示每一位狀態(tài)位B1,B2,B3........(8個(gè)狀態(tài)位)