Small Modbus Example: WattNode

Hi All,

For a demo box here we needed to write one configuration value to a WattNode device.

This example strategy uses just one of the many Modbus functions and could be helpful for those just getting started with Modbus, especially those using a WattNode device.

I started with our Modbus Integration Kit, got that working then pared it down so it’s just one call to the subroutine that writes a single register.

Perhaps this might save someone a little time getting their own WattNode (or other Modbus device) going with a PAC.

-OptoMary

Here’s a tech note that might be helpful if you’re using Modbus: Using Modbus Devices with Opto 22 Products
It gives you some basics plus troubleshooting info.

ModbusReadChartExport-simpleBasic.zip (3.2 KB)

This chart, which you can import into any 9.4 Basic (or better) strategy, uses this newer integration kit (from 2015) and just one subroutine call: O22Modbus04ReadInputRegistersAsInt to get you started.