I've put together a wrapper to the Plasmionique Modbus Master library that makes communication with PLCs a bit easier. It could be used for just about any Modbus device, but I had PLCs in mind when I was developing it.
What is easier?
- Modicon-style addressing instead of data address and function code.
- Data-type conversion built-in(eg. 32-bit float mapped to two U16 registers). Word swapping option.
- Poll list and cached data block. Allows you to poll a range of registers then lookup and convert the values elsewhere.
The code is up on GitHub: https://github.com/rfporter/Modbus-PLC-Client
Its a rough draft at the moment. Comments are welcome and appreciated.