Skip to main content

Tab: Modbus Serial Device – General

The tab contains the basic settings for network communication in the network.

Unit ID

Unit ID of the server

Watchdog

standard icon: Activates the watchdog function.

The incoming data (holding registers / %I range) is set to zero when the Modbus device does not receive any valid query from the client.

Holding registers (%IW)

Number of holding registers: possible values: 1–4096. The maximum number can be limited in the device description.

Writable: standard icon: For the holding register, writable I/O mappings (%QW addresses) are generated instead of read-only I/O mappings (%IW addresses). This allows the holding registers to be set by the Modbus device application (= server application) by means of the usual I/O mapping.

Input registers (%QW)

Number of input registers: possible values: 1–4096. The maximum number can be limited in the device description.

Important

Changes to the input/output assembly size have a direct effect on the number of configurable parameters in the I/O mapping.

Modbus defines for I/O data a data model with four areas.

  • Coils: Outputs of type BIT

  • Discrete inputs: Inputs of type BYTE

  • Holding register: Outputs of type WORD (16-bit)

  • Input register: Inputs of type WORD (16-bit)

Inputs and outputs are included as with all fieldbuses, but from the point of view of the "host". These data areas have any number of logical start offsets as defined by the manufacturer. The I/O data behind the Modbus data areas can overlap or be independent of each other.

For details about the Modbus data model, see Modbus Protocol Specification in Chapters 4.3 and 4.4 (www.modbus.org).

In the case of the CODESYS Modbus Device, the input registers and discrete inputs, as well as the holding registers and coils, are all mapped to the same I/O data. This is also the case when they are addressed via different logical start offsets.

Start Addresses

Coils

Definition of the start address of the respective Modbus data area

Discrete inputs

Holding register

Input register