已解決了。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(十進制)轉成LW1000-----LW1007(8個二進制數就行了),也就是把LW1000,LW1001,LW1002,LW1003......做到屏里去顯示每一位狀態位B1,B2,B3........(8個狀態位)