Definition
modbus_recv_check(recv_data)
Features
When using Modbus protocol, this command to check data integrity using CRC16 value for receive data.
Parameters
|
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
|
recv_data |
byte |
- |
raw modbus data |
Return
|
Value |
Description |
|---|---|
|
res |
True/False |
Exception
|
Exception |
Description |
|---|---|
|
DR_Error (DR_ERROR_TYPE) |
Parameter data error occurred |
|
DR_Error (DR_ERROR_VALUE) |
Parameter value is invalid |
|
DR_Error (DR_ERROR_RUNTIME) |
C Extension module error occurred |
|
DR_Error (DR_ERROR_STOP) |
Program terminated forcefully |
Example
Python
#recvdata = b”\x01\x02\x03\x04\x05\x06\xba\xdd”
res = modbus_recv_check(recvdata)
#recv = True