Modbus Server

Purpose

Configure the Modbus server interface of an RT Box

Description

../../_images/modbusserver.svg

A Modbus TCP server listens on TCP port 502 for requests from a Modbus client. The client can send discrete inputs or input registers to the server and request the state of coils and holding registers from the server. Discrete inputs and coils consist of single bits and are mapped to boolean signals in PLECS. For input and holding registers, the Modbus protocol supports 16 bit values. The PLECS implementation supports 32 bit values (int32, uint32, float) and 64 bit values (double) by using multiple registers with consecutive addresses.

Only one Modbus server block can be used per model. Several Modbus clients may connect to the same Modbus server.

If a client sends a request for an address or an address range and there is no signal definition for all of the addresses in the request, the request will be denied and a Modbus exception is sent back to the client.

Parameters

Inputs, Outputs

Signal specification of the data to be made available via Modbus. Each line corresponds to an input or output of the block. The width column specifies the signal width. If it is set to a value greater than 1, multiple registers with consecutive addresses are used.

Multi-register order

The data format of 32 and 64 bit data types (int32, uint32, float, double) is not covered by the Modbus standard. If set to lowest word first, the word with the least significant bits will be placed at the lowest address (little endian byte ordering). If set to highest word first, the word with the most significant bits will be places at the lowest address (big endian byte ordering).

The byte ordering within a 16 bit word is defined by the Modbus standard to be highest byte first (big endian).