Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Standard coils, discrete inputs, and registers with UINT16, INT16, UINT32, INT32 and FLOAT32 operations are supported. See additional details in the Configuration and Connections sections below.

Supported Features

...

  • Standard registers:

    • Coils: Available as a model output, a model input (controlled by the master) or both

    • Discrete inputs: Available as a model output

    • Input registers: Available as a model output. The supported data types are UINT16, INT16, UINT32, INT32 and FLOAT32

    • Holding registers: Available as a model output, a model input (controlled by the master) or both. The supported data types are UINT16, INT16, UINT32, INT32 and FLOAT32

  • Supports TCP and RTU modes

  • Allows multiple-slave instantiation

    • Configurable TCP port when operating over TCP mode

    • Configurable serial port parameters when operating over RTU mode

  • Supports reconnection with the master device(s) if a connection is lost

  • TCP mode supports connecting multiple masters to the same slave

  • TCP mode supports having multiple slaves with the same IP address and TCP port combination; in this scenario, the slave ID is used as the differentiator

Configuration

The driver is entirely configurable via the RT-LAB interface. Users can add, delete, and duplicate Modbus slave devices. Configuring holding registers, input registers, discrete input or coils is also an easy task. 

...

Modbus ID: ID of the Modbus slave. In RTU mode, many slaves can be connected on the same physical serial link. Because of that, each Modbus slave must be configured with a unique identification number.

Mode

Select "TCP" or "RTU" depending on how the Modbus slave device is configured to communicate.

Slave ID

ID of the Modbus slave. Each slave must be configured with a unique identification number. This is due to the fact that:

  • In TCP mode, many slaves can use the same IP address and TCP port combination.

  • In RTU mode, many slaves can be connected on the same physical serial link.

TCP specific parameters

  • NIC name: The desired network interface name. The proper interface name should be selected based on the information given by the Linux command "ifconfig".

    • If a Modbus master is running on the same machine as the Modbus slave, the loopback network interface must be used ('lo'). If the driver is running on Windows this field will be ignored.

  • IP address: The IP address of the Modbus slave. If a Modbus master is running on the same machine as the Modbus slave, the loopback IP address must be used (127.0.0.1).

  • TCP port: Select the TCP port on which the slave will wait for a connection.

RTU specific parameters

  • Serial port: Path to the serial interface to be used. The default serial interface name of the first port on a SuperMicro motherboard is "/dev/ttyS0".

  • Serial baud rate: Speed at which Modbus RTU slave is configured to communicate.

  • Serial data bits: Number of data bits the Modbus RTU slave is configured to communicate.

  • Serial stop bits: Number of stop bits the Modbus RTU slave is configured to communicate.

  • Serial parity: Parity at which the Modbus RTU slave is configured to communicate.

Cycle output ratio rate (ms)

Defines the rate (in milliseconds) at which the data from the model is written in the slave's outputs (coils and holding registers).

When the slave's outputs are controlled from the model and from the master, this parameter must be set to a value greater than the time step of the model. Otherwise, the write operations made by the master will never be reflected in the model.

Byte Order

Defines how 32 bits data is encoded. Any of the byte ordering cases are possible (ABCD, BADC, CDAB, DCBA). ABCD refers to the network byte order.

Permit read/write requests with address gaps

From the lowest address to the highest address configured, this option creates dynamically new coils, discrete inputs, holding registers and input registers at every address that is not defined by the user and assigns a value of 0.

...

Once the driver has been configured as desired and associated with the proper model subsystem, the user will have to connect points in the model to points in the driver by using the designated RT-LAB GUI. This connection panel will show all the driver's and model's connectable points, once the model has been compiled. It is also possible to make connections to LabVIEW Dashboards panels.
The example model provided with RT-LAB is already packaged with connections between the driver and the model. It can be used as an example to understand how the connections between the model and the driver should be done.

...

In TCP mode, an additional "Connected" connection point is available and can be used in the model to indicate if the Modbus slave is connected to a Modbus master or not. It represents the number of Modbus masters currently connected to the Modbus slave. This value will be the same for all slaves sharing an IP address and TCP port combination.
In RTU mode, an additional "Bus Activity" connection point is available and can be used in the model to indicate if the Modbus slave is receiving requests from a Modbus master.

...