
WP9038ADAM User’s Manual V1.42
0769
0000
0000
0000
0000
0000
16 read data 0769-read data from t e first analog input
0000-read data from t e second analog input
0000-read data from t e t ird analog input
0000-read data from t e fourt analog input
0000-read data from t e fift analog input
0000-read data from t e sixt analog input
B626 2 CRC c eck code CRC c eck code for all data
T e recieved command means t e data of t e first analog input is “0769”,and it is equal to 1897 in decimal,t en substitute into
t e fomula: I=(DATA*20)/4095=(1897*20)/4095≈9.26mA.T e current in t e ot er c annel is 0mA.
5.3
、
Command for digital input collection
:
Send: 01 02 00 00 00 04 79 C9
(
example/ exadecimal
)
data byte data description remark
01 1 module address Address range 01-FE
02 1 function code 02-read input bit
0000 2 input address(1x mode) 0000-initial address of input bit
0004 2 read lengt of input bit 0004-read 4 input bits
79C9 2 CRC c eck code CRC c eck code for all data
Receive: 01 02 01 05 61 8B
(
example/ exadecimal
)
data byte data description remark
01 1 module address Address range 01-FE
02 1 function code 02-read input bit
01 1 byte numbers 01-read one byte lengt
05 1 read data 05-read input bit status
618B 2 CRC c eck code CRC c eck code for all data
Converting reading data “05” to 2 exadecimal results “00000101”, last 4 numbers are active. From left to rig t, it represents
t e 4 digital input c annel status DI_04~ DI_01. Here it means DI_03
、
DI_01 ave input but ot ers no.
5.4
、
Command for digital output (several controls)
:
Send: 01 0F 00 00 00 04 01 03 7E 97
(
example/ exadecimal
)
data byte data description remark
01 1 module address Address range 01-FE
0F 1 function code 0F-write multiple coil
0000 2 coil address(0x mode) 0000-initial address of coil
0004 2 write coil lengt 0004-write 4 coils
01 1 write data byte 01-write one byte data
03 2 data writing 03-write output state of 4 coil
7E97 2 CRC c eck code CRC c eck code for all data
Receive: 01 0F 00 00 00 04 54 08
(
example/ exadecimal
)
Converting reading data “03” to 2 exadecimal results “0000 0011”, last 4 numbers are active. From left to rig t, it represents
t e 4 digital output c annel status DI_04 ~ DI_01. Here it means DO_02
、
DO_01 ave output but ot ers no. W en module
receives correct command, it will make corresponding actions and send response back to t e master. T is is successful
communication.
5.5
、
Command for digital output (single control)
:
Send: 01 05 00 00 FF 00 8C 3A
(
example/ exadecimal
)
data byte data description remark
01 1 module address Address range 01-FE
05 1 function code 05-write single coil
0000 2 coil address(0x mode) 0000-digital output(DO_01)coil address
0001-digital output(DO_02)coil address
0002-digital output(DO_03)coil address
0003-digital output(DO_04)coil address
FF00 2 data writing FF00-coil open
,
0000-coil close
8C3A 2 CRC c eck code CRC c eck code for all data
Receive: 01 05 00 00 FF 00 8C 3A
(
example/ exadecimal
)