Function Block: ModbusRequest
Library: IoDrvModbusTCP
In addition to the predefined Modbus commands defined on the Modbus Server Channel tab, this function block makes it possible to dynamically execute additional commands in the application. However, for these programmatically created commands, there is no I/O mapping, but only input/output data ranges of type ARRAY OF BYTE
or ARRAY OF WORD
.
Name | Data Type | Initial Value | Description |
---|---|---|---|
|
| ||
|
| Rising edge: The action starts. Falling edge: The outputs are reset when a falling edge occurs before the function block has ended the action. The outputs behave as usual and are reset only if the action is ended or has been aborted ( | |
|
|
| |
|
|
| The unit ID is only used for forwarding (gateway) to a Modbus Serial Bus. For TCP/IP, the MODBUS-Server is addressed by means of the IP address. In this case, the MODBUS unit ID is not used (the value 0xFF has to be used). For a serial connection, the Modbus devices are addressed with unit IDs from 1 to 247 (0 is used for broadcast addresses). |
|
| The Modbus command to be executed. Function blocks for bit and word access are supported. | |
|
| Pointer to a buffer with data which is sent to the server. For register access, the buffer is of type | |
|
| Pointer to a buffer where the data which has been received by the server is written. For register access, the buffer is of type |
Name | Data Type | Initial Value | Description |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Current error; defined in the |