← All guides

Export Modbus Poll tags to Node-RED and RustRED

A flow that polls a device is mostly address bookkeeping. Export to SCADA builds it from your Modbus Poll blocks: one Modbus configuration node, one read node for each run of neighbouring registers, a function node that gives every value its tag name, and a debug node so you see an object like {"Voltage_3000": 230.5} right away.

Availability. Export to SCADA was added to the Modbus Poll and BACnet Explorer source after Modbus Poll 1.3.5 and BACnet Explorer 1.2.1 were prepared. It is in the open source repository on GitHub and ships with the next app update; if you do not see the button in the app yet, you are on a build from before that update. It needs Pro.

1. Export from Modbus Poll

  1. Add the blocks and connect to confirm the values.
  2. Click Export to SCADA (Pro). There are two flow formats:
    • RustRED flow (JSON) uses the native modbus read and modbus-config nodes of RustRED.
    • Node-RED flow (JSON) uses the modbus-read and modbus-client nodes of node-red-contrib-modbus. RustRED runs these too.
  3. Click Save file.

2. Import into RustRED

Open the RustRED editor, choose Import from the menu and paste or load the file, or save it as the flows.json of a headless instance and start it with rust-red run flows.json. The debug node prints each poll, so the values show up in the sidebar and in the log.

For 16-bit and 32-bit big-endian values the RustRED export lets the read node convert the registers itself (dataType of int16, int32, float or double). For other word orders it reads the raw registers and the function node decodes them, so the values still come out right.

3. Import into Node-RED

Install the node-red-contrib-modbus palette first (Manage palette, Install). Then use Import in the menu with the Node-RED flow file. The contrib read node returns raw registers, so the function node decodes them into numbers using the type, word order and scale you had in Modbus Poll.

How the flow is built

PartWhat it does
Config nodeHost, port and unit ID of the device (TCP), or the serial port settings (RTU)
Read nodeOne per run of neighbouring tags with the same area and type, polled at the interval you set, split at 125 registers per request
Function nodePuts the tag names on the values and applies the scale
Debug nodeShows msg.payload as one object per read

From there, wire the function output to MQTT, a database or anything else. The names in the object are the same as in Modbus Poll, for example Voltage_3000.

Limits

  • RustRED opens serial ports only in builds with the serial feature, so RTU flows work there only on those builds.
  • BACnet Explorer exports a RustRED flow only, built on the bacnet-config and bacnet read nodes (RustRED 0.3.3 or newer). It polls with an inject node, and an option adds a bacnet write node with its own inject node for each writable object. There is no Node-RED variant because the contrib BACnet nodes have no documented flow format.

Export your Modbus Poll tags to a SCADA

Read the registers you care about in Modbus Poll, then use Export to SCADA in the blocks panel (Pro) to write the tag list for Ignition, Kepware, Node-RED, RustRED, Home Assistant or Voltrus SCADA.

Get Modbus Poll

More guides