Modbus TCP/IP Client Read
R2026bClient device reads data from server device register(s) over TCP/IP network
Libraries:
Raspberry Pi Blockset /
Network
Description
In the Modbus TCP/IP Client Read block, the client device reads data from the register(s) of the server device.
Raspberry Pi® Blockset supports the Modbus® communication protocol over the TCP/IP network. The client and the server must be connected to the TCP/IP network for successful Modbus communication.
The client can perform either a read, write, or a read and write operation on the server register depending on the server register(s) type.
| Register Type | Register Size | Operation Performed by Client |
|---|---|---|
| Coil | 1-bit | Read and Write |
| Discrete Input | 1-bit | Read |
| Holding Register | 16-bit | Read and Write |
| Input Register | 16-bit | Read |
Note
To generate C/C++ code for this block, you must have an Embedded Coder® license.
Examples
Ports
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"raspberrypiNetworklib/Modbus TCP//IP Client Read"
Example: add_block("raspberrypiNetworklib/Modbus TCP//IP Client Read","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced in R2021a
