EasyManua.ls Logo

Xinje XD5 - Page 238

Xinje XD5
389 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
237
03H
Read register
REGR
04H
Read input register
INRR
05H
Write single coil
COLW
06H
Write single register
REGW
10H
Write multiple
registers
MRGW
0FH
Write multiple coils
MCLW
Take 06H function codewrite single registeras example, and introduce data format
other functions are similar to this):
E.g.upper computer write data K5000(H1388) to PLC H0002 (D2).
ASCII mode
Start mark
3AH
ID
30H
31H
Function code
30H
36H
Register ID high byte
30H
30H
Register ID low byte
30H
32H
Data content high byte
31H
33H
Data content low byte
38H
38H
LRC
35H
43H
End mark
0DH
0AH
Description
1. address is PLC station number.
2. Function code is Modbus-ASCII protocol read/write code.
3. Register ID is the PLC modbus communication ID, please see chapter 7-2-2.
4. Data content is the value in D2.
5. LRC CHECK Low / CRC CHECK High is low and high bit of CRC check value.
If two pieces of Xinje XD3 PLC communicate with each other, write K5000 to D2.
M0
REGW K1 H0002 K5000 K2
M0 is trigger condition (rising edge). When Xinje PLC communicates by Modbus, if
communication fails, the instruction will try twice. If the third time communication fails, then
communication ends.
The relationship between REGW and ASCII protocol (other instructions are similar to this):
REGW
Function code 06H
K1
Station number
H0002
Modbus ID

Table of Contents

Related product manuals