Chengdu Ebyte Electronic Technology Co.,Ltd.
【2DI + 2AI + 4DO】MA02-AACX2240 User Manual
Copyright ©2012–2021
,
Chengdu Ebyte Electronic Technology Co.,Ltd.
38
7.3.2 Read holding register
Use 03 function code to read one or more register values, for example: read DO1 working mode.
20
03
05 78
00 01
XX XX
Device ModBus
address
Function code
Register start address
Register read
quantity
CRC check code
After sending the above command to the device via RS232, the device will return the following values:
20
03
02
00 00
XX XX
Device ModBus
address
Function code
Number of bytes of data
Returned data
CRC check code
The above 00 00 indicates that DO1 is in level mode.
7.3.3 Write a single holding register
Use 06 function code to write a single holding register, for example: set the working mode of DO1 to pulse mode
20
06
05 78
00 01
XX XX
Device ModBus
address
Function code
Register address
Data written
CRC check code
After sending the above command to the device via RS232, the device will return the following values:
20
06
05 78
00 01
XX XX
Device ModBus
address
Function code
Register address
Data written
CRC check code
If the modification is successful, the 0x0578 register data is 0x0001.
7.3.4 Write multiple holding registers
Use 10 function code to write commands for multiple holding registers, for example: set the working mode of DO1-DO4
at the same time.
Содержание MA01-A C 4020 Series
Страница 1: ...1 2DI 2AI 4DO MA02 AACX2240 ...