Modbus RS485 Server Read
R2026bServer device reads data from the server device register over RS485 network
Libraries:
STM32 Microcontroller Blockset /
(Legacy) STM32 MBED Based Boards /
Common
STM32 Microcontroller Blockset /
(Legacy) STM32 MBED Based Boards /
STM32F746G-Discovery
STM32 Microcontroller Blockset /
(Legacy) STM32 MBED Based Boards /
STM32F769I-Discovery
STM32 Microcontroller Blockset /
(Legacy) STM32 MBED Based Boards /
STM32L475VG-Discovery (B-L475E-IOT01A)
Description
In the Modbus RS485 Server Read block, the server device reads data from its registers. The server can read data only from one register per read operation.
Simulink® Coder™ Support Package for STMicroelectronics® Nucleo Boards and Embedded Coder® Support Package for STMicroelectronics Discovery Boards supports the Modbus® communication protocol over the RS485 network. Each device on the RS485 network is referenced by a unique 8-bit address or identifier.
This table categories the server registers referenced by the Modbus server device.
| Register Type | Register Size |
|---|---|
| Coil | 1-bit |
| Discrete Input | 1-bit |
| Holding Register | 16-bit |
| Input Register | 16-bit |
The server can perform either a read or a write operation on its registers.
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.
"stm32nucleodiscoboardslib/Common/Modbus RS485 Server Read"
"stm32f7lib/Modbus RS485 Server Read"
"stm32f769ilib/Modbus RS485 Server Read"
"stm32l475vglib/Modbus RS485 Server Read"
Example: add_block("stm32nucleodiscoboardslib/Common/Modbus RS485 Server Read","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced in R2021b

