Here is a Tutorial on how to set up, Serial RTU and TCP Modbus both talking simultaneously to a Direct Logic DL06 PLC.
It also shows how to map Modbus registers to Mach4 I/O, and to a PLC, to include an interactive Screen set.
The "How To" pdf, includes screen shots, of how to hook it all up, and includes how to embed it in the screen designer.
This is working with current build 1900 of Mach4Hobbie. So from the "ATC" page of the included screen set (and ini, and PLC project files). You can read Inputs from the PLC, and you can outputs on the PLC from that page as well. You can read/Write "Bit-Packed" words as well as full registers.
NOTE: To do the tutorial you need to have a DL06 (with ECOM module if you want to run the TCP part), the "How To" artical gives a list of what you need to have to work it. You could "Probably" port these ideas/concepts over to some "Other" Brand of PLC, the concepts should remain valid. I will leave that adventure up to you.
Read the "Read Me First"!!!
Enjoy,
Scott "Poppa Bear" Shafer