Modbus
Modbus command can be used to communicate with other devices over Modbus protocol.
Please note that your controller board needs to have the Modbus feature and that the controller board has to be the master device.
- s defines the slave number.
- f function number
- a address
- n number of bits or registers
- v value
- u user variable
- b baud rate
- If not specified, baud rate of 115200 is used
- fb parity / stop bits configuration designation
- If not specified, no parity and 2 stop bits are used
- 9600
- 19200
- 38400
- 57600
- 76800
- 115200
| | |
---|---|---|
1 | RMC | Read Multiple Coils |
2 | RDI | Read Discrete Inputs |
3 | RMR | Read Multiple Registers |
4 | RMIR | Read Multiple Input Registers |
5 | WSI | Write Single Coil |
6 | WSR | Write Single Registers |
15 | WMC | Write Multiple Coils |
16 | WMR | Write Multiple Registers |
17 | RS | Report SlaveID |
The abbreviation can be used instead of the number, so F=RMC or F RMC is equal to F1
Setting | Parity | Stop bits |
---|---|---|
E1 | even | 1 |
O1 | odd | 1 |
N2 | none | 2 |
N1 | none | 1 |
Write single coil
Write single coil, baud rate of 19200, even parity with 1 stop bit
Read multiple coils, store beginning at user variable #300
Read discrete inputs
Write single register
Write multiple coils
Write multiple holding registers
Report slave id