- 15 Feb 2024
- 1 Elolvasandó perc
- Közreműködők
- Nyomtat
How to Setup Modbus Devices
- Frissítve 15 Feb 2024
- 1 Elolvasandó perc
- Közreműködők
- Nyomtat
Learn how to setup Modbus devices in Node-RED
This article covers the workflow for editing the different types of Modbus nodes.
The procedures edit the example PICK-IQ Node-RED flow.
Ensure your Edge Device is fully updated in order to prevent softlocking. If you run into issues connecting Modbus devices, restart Node-RED on your Edge Device.
Edit Modbus Server
Double-Click the Data Read Modbus node
Select the Edit Modbus Server button
Modbus Server settings
See below for an overview of the necessary settings:
- Serial port: /dev/ttyS2 (This is the location of the RS-485 port on the EdgeIO)
- Serial type: RTU-BUFFERD
The following COM Settings must match your Banner device. See the Banner Technical Reference Sheet for how to change them on your Banner Device. Below are the default values for Banner devices:
- Baud rate: 19200
- Data bits: 8
- Stop bits: 1
- Parity: None
- Select the Update button
Change Unit-ID
Each device has a Unit-ID (Default: 1), allowing you to address the specific device. If multiple devices are connected with the same Unit-ID, then all devices will be controlled by the Modbus nodes referencing the particular Unit-ID. If you want to individually control connected devices, you must:
- Connect your first device.
- Change the Unit-ID from Default: 1 to a new value (eg. 2).
- Double-click on any Modbus node that you want to reference the first device to edit the node.
- Change the Unit-ID field to your new value (eg. 2).
- Repeat for any other Modbus nodes that you want to reference the first device.
- Repeat for each new device.
A Modbus node can only address one Unit-ID at a time, therefore you may need to use multiple Modbus nodes to individually control multiple devices.
Change Register Address
The register address can be changed in the highlighted text box. Common register addresses can be found in this article.
Modbus Write Nodes
The same steps are followed when editing a Modbus Write node. The only difference is that FC is changed to FC 6: Preset Single Register, instead of FC 3: Read Holding Register.