238
Complete data string: 3AH 30H 31H 30H 36H 30H 30H 30H 32H 31H 33H 38H 38H
35H 43H (system take CRC checking automatically)
If monitor the serial port2 by serial port debugging tool, the datum are: 3AH 30H 31H 30H
36H 30H 30H 30H 32H 31H 33H 38H 38H 35H 43H 0DH 0AH
Note:
The data does not distinguish decimal, binary, hexadecimal etc. For example, B10000,
K16 and H10 are the same value, so the following instructions are the same.
REGW K1 B111110100 D1 K2
REGW K1 K500 D1 K2
REGW K1 H1F4 D1 K2
6-2-5
.
Communication Instructions
Modbus instructions include coil read/write, register read/write; below will introduce the
details.
Instructions in details:
The operand definition in the instruction:
1. Remote communication station and serial port number.
E.g.
:
one PLC connects 3 inverters. PLC needs to write and read the parameters of inverter.
The inverter station number is 1.2 and 3. So the remote communication number is 1.2 and 3.
2. Remote register/coil start ID number:
Assign remote coil/register number: the start coil/register ID of PLC read and write, it is
normally used with ‘assigned coil/register number’.
E.g.
:
PLC read Xinje inverter’s output frequency (H2103), output current
(
H2104
)
, bus
voltage
(
H2105
)
, then remote register/coil start ID is H2103, assigned coil number is K3.
3. Local receipt/send coil/register address
:
Coil/register in PLC used to exchange data with
lower computer.
E.g.
:
write coil M0
:
write M0 status to assigned address in lower computer
Write register D0
:
write D0 value to assigned address
Read coil M1
:
read content in lower computer assigned address to M1
Read register D1
:
read content in lower computer assigned address to D1
4. communication condition:
The preconditions of Modbus communication can be normal open/closed coil and
rising/falling edge. When the open/close coil triggers, Modbus instructions will always be
executed. When the communication between multiple slave stations or the traffic is large,
communication delay may occur. The oscillating coil can be used as triggering condition.
When the rising/falling edge triggers, Modbus instructions will only be executed once, and
only when the next rising/falling edge comes, Modbus instructions will be executed again.
K5000
Data content is 1388H
K2
PLC communication serial port