Breadcrumbs

modbus_send_make()

Definition

modbus_send_make(send_data)

Features

When using the Modbus protocol, this command provides the result data including the Modbus CRC16 result for the send data.

Parameters

Parameter Name

Data Type

Default Value

Description

send_data

byte

-

Transfer data requiring CRC calcuation

Return

Value

Description

result_data

Data in which transmission data and CRC16 value are conbined

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
senddata = b"\x01\x02\x03\x04\x05\x06"
resultdata = modbus_send_make(senddata)
#resultdata = b'\x01\x02\x03\x04\x05\x06\xba\xdd’