Documentation search search close
CONTENTS
https://www.speedgoat.com/help/slrt/page/icon_documentation.jpg
v10.0.1.x for R2026a
View other versions

IO754 - Message v2

IO754 - Message v2 — Receives/Transmits cyclic data from/to the Modbus TCP network

Library

Simulink Real-Time - Speedgoat

Description

This block processes the function code requests from a client and writes/reads the Modbus data to/from the different areas (coils, discrete inputs, holding registers and input registers).

You model can contain multiple Modbus TCP Server Message blocks for each I/O module in your target machine.

Message blocks can only be used in Message mode. Select this mode in the related Setup block.

Ports

The block has either one input port or one output port depending on the selected function (write/read).

  • Coils and Discrete Inputs:

    Both input and output ports are a vector of the Boolean data type where the length of the value is defined by the Quantity parameter. Each BOOLEAN element of the vector represents one bit.

  • Holding Registers and Input Registers:

    Both input and output ports are a vector of the UINT16 data type where the length of the value is defined by the Quantity parameter.

Parameters

Module ID

This ID defines the link to the corresponding Setup block.

Sample Time

Defines the base sample time at which this driver block gets its sample hit. This parameter can also be set to -1 for inherited sample time. The units are in seconds.

[Caution]Caution

All blocks that interface with the same I/O module must have identical sample times.

Command

Write or read data to one of the different Modbus data areas (coils, discrete inputs, holding registers and input registers).

Address

Options for different data tables:

  • Coils and discrete inputs: For these bit-based values, the parameter defines the start bit.

  • Holding registers and input registers: For these WORD-based values, the value defines the register start address.

Quantity

Options for different data tables:

  • Coils and discrete inputs: Defines the number of bits that should be written to the Modbus buffer or that should be read from the buffer

  • Holding registers and input registers: Defines the number of registers that should be written to the Modbus buffer or that should be read from the buffer

Initial Values

Define values the block outputs until data is initially received from the client. The length of the vector must match Quantity. Enter an empty array if you do not want to specify initial values. This parameter only applies to the Read Coils and Read Holding Registers commands. In all other cases the parameter is hidden.