Read RTU Frame
ok, adr, fnc, data = mbo:rx([ms])
ok, adr, fnc, data = modbus.rx(cpo, [ms])
Receive a Modbus RTU frame.
Parameter | Type | Description |
---|---|---|
mbo |
object table | Modbus Object |
cpo |
object | COM Port Object |
ms |
integer | Receive timeout. Default 250ms |
Returns | Type | Description |
---|---|---|
ok |
boolean | Whether the frame CRC is ok, etc |
adr |
integer | Address sent by slave |
fnc |
integer | Function number sent by slave |
data |
string | Remaining data (not including CRC) |