This is an old revision of the document!


Control Netio PDU using Modbus/TCP

This application note assumes minimum Blocks version 6.3.1 due to enhancements done with the modbus support. At time of writing all current models of Netio power distribution units support modbus via its M2M (machine2machine) This method requires slightly less configuration compared with the option to use i.e MQTT. It gives access to all properties available on the device including power metering.

Setup in the Device

Use the vendors documentation to access the devices web interface. Find the M2M Api tab and enable the modbus/tcp option. Blocks does not support changing modbus default port so please leave that at 502. The IP-filter is recommended to use in any system where the network is exposed in anyway to the general public. That should be set to the Blocks servers IP-adress.

Setup in Blocks editor

Channel addressing

Consult the vendor device manual to find out the register settings for the property to access. Add the modbus device, select the modern 16-bit addressing option set the conccurent queries option to 1 and give the device a unique permanent and meaningful name.

Setup sockets

Add a modbus channel, give it a unique for the device, permanent and meaningful name, set the type to Digital (bit), set the direction to out. This will result Blokcs using modbus function 15 (Write Multiple Coils) (Blocks does not support Function 5 (write single coil) That means it sends the current property of all coils in a single call to the device in a single call.

For Netio devices always add as many sockets as the device has. If the device supports two sockets add both, if it supports 4, add all four. The device does not support the way coils are set by Blocks unless all sockets are present.

:!: It is important to not add coil channels that are not available on the device since the device will not perform any actions att all. They can then be accessed in blocks with their respective modbus channel property.

Setup metering (read analog values)

Some NETIO devices support extensive power metering options. From the manual we can find the register we want to access, i.e the Mains Voltage of the device is accessed on Register 1, Function 04 and it is a 16 bit Type.

As an example, to get the device mains voltage, for the new channel in Blocks, we enter channel number 2, give the channel a reasonable name, select the Analog-16bit-word type and set the direction to in.

Example configuration in Blocks