How to Setup Modbus Devices
  • 15 Feb 2024
  • 1 Minuta do przeczytania
  • Współtwórcy

How to Setup Modbus Devices


The content is currently unavailable in Polish. You are viewing the default English version.
Article Summary

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.

Update your Edge Device

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

  1. Double-Click the Data Read Modbus node
    Screenshot 2024-01-03 124501.png

  2. Select the Edit Modbus Server button
    ModbusServer.png

  3. Modbus Server settings
    image.png

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
  1. Select the Update button
    UpdateBtn.png

Change Unit-ID

UnitID.png

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:

  1. Connect your first device.
  2. Change the Unit-ID from Default: 1 to a new value (eg. 2).
  3. Double-click on any Modbus node that you want to reference the first device to edit the node.
  4. Change the Unit-ID field to your new value (eg. 2).
  5. Repeat for any other Modbus nodes that you want to reference the first device.
  6. 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

RegisterAddress.png

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.
image.png


Czy ten artykuł był pomocny?