Add these commands to your VB resources:
Currently you can only read the TCP/IP Modbus with the Macro Pump, (Art is working on a “Mach Brain”, that will allow you to manipulate the data in a more user friendly way, not to mention faster than the Macro pump.
Here are the VB commands that will access the TCP/IP modbus, note they only move in or out full 16bit words.
GetMasterInput(0-1023)
GetMasterOutput(0-1023)
The above will get the 16 bit word from the Mach address Local(var), or Index If you want to do Discrete bits you will have to send/receive in the PLC using Bit of word, and you may have to do Bit masking in Mach to get the bit patterns you want.
SetMasterOutput(0-1023, 0-16bit)
SetMasterInput(0-1023, 0-16bit)
These will send outputs on Mach’s Index address Local(var) 0-1023, and a 16 bit number from 0-65535. You can also “Overwrite” your inputs using the setmasterinput, for testing, but if you are actively hooked up to a PLC or other scanning device, it will overwrite your input, on its next scan.
Scott