Download Print this page

Command For State Collection Of Digital Output; Command For Module Address Setting; Command For Communication Parameter Setting - Wellpro WP9038ADAM User Manual

Hide thumbs

Advertisement

When module receives correct command, it will make corresponding actions and send response back to the master. This is
successful communication.
5.6 、 C ommand for state collection of digital output :
Send: 01 01 00 00 00 04 3D C9 ( e xample/hexadecimal )
data
01
01
0000
0004
3DC9
Receive: 01 01 01 03 11 89 ( e xample/hexadecimal )
data
01
01
01
03
1189
Converting reading data "03" to 2 hexadecimal results "0000 0011". From left to right, it represents the 4 digital output channel
status DI_04 ~ DI_01. Here it means DO_02 、 D O_01 have output but others no.
5.7 、 c ommand for module address setting :
Send : 0 0 06 00 64 00 01 08 04 ( e xample/hexadecimal )
date
00
06
0064
0001
0804
Receive : 0 0 06 00 64 00 01 08 04 ( e xample/hexadecimal )
This command means to send a code to a module, set the module address as 01, this setting could be saved when power off;
default address of module is 01,each module address could be assigned separately when using multiple modules for
network.Attentions is required that only one module could be used in 485 network when using multiple address sending,
otherwise all the modules will share the same address in 485 network. When module receives correct command, it will make
corresponding actions and send response back to the master. This is successful communication.
5.8 、 C ommand for communication parameter setting :
Send : 0 1 06 00 65 00 02 18 14 ( e xample/hexadecimal )
data
01
06
0065
0002
1814
WP9038ADAM User's Manual V1.42
byte
data description
1
module address
1
function code
2
coil address(0x mode)
2
read coil length
2
CRC check code
byte
data description
1
module address
1
function code
1
byte numbers
1
read data
2
CRC check code
byte
data description
1
module address
1
function code
2
register address (4x mode)
2
data writing
2
CRC check code
byte
data description
1
module address
1
function code
2
register address (4x mode)
2
data writing
2
CRC check code
remark
Address range 01-FE
01-read coil state
0000-initial address of coil
0004-read 4 coils state
CRC check code for all data
remark
Address range 01-FE
01-read coil state
01-read one byte data
03-read coil state
RC check code for all data
remark
00-group sending
06-write single register
0064-modify module address
set new address for module, range 0001-00FE
CRC check code for all data
remark
address range:01-FE
06-write single register
0065-modify communication parameter
0001-set communication parameter 4800,N(no
check) ,8,1
0002-set communication parameter 9600,N(no
check) ,8,1
0003-set communication parameter 19200,N(no
check) ,8,1
0004-set communication parameter 38400,N(no
check) ,8,1
0005-set communication parameter 4800,E(even
check) ,8,1
0006-set communication parameter 9600,E(even
check) ,8,1
0007-set communication parameter 19200,E(even
check) ,8,1
0008-set communication parameter 38400,E(even
check) ,8,1
CRC check code for all data

Advertisement

loading