DVP-ES2/EX2/EC5/SS2/SA2/SX2/SE&TP Operation Manual - Programming
Program Example 2: COM2 RS-485
Switching between 8-bit mode (M1161 = ON) and 16-bit mode (M1161 = OFF)
8-bit mode:
1. STX (Start of Text) and ETX (End of text) are set up by M1126 and M1130 together with
D1124~D1126. When PLC executed RS instruction, STX and ETX will be sent out
automatically.
2. When M1161 = ON, only the low byte (lower 8 bits) is valid for data communication, i.e. high
byte will be ignored and low byte will be received and transmitted.
M1000
M1161
D100 D1
20
K4
K7
RS
X0
Sending data: (PLC -> external equipment)
STX
D100L D101L D102L D103L
ETX1 ETX2
source data register, starting from
the lower 8 bits of D100
length = 4
Receiving data: (External equipment -> PLC)
D120L D122L D123L D124L D125L D126LD121L
Registers for received data,
starting from the lower 8 bits
of D120
length = 7
S TX
ETX1 ETX2
3. The STX and ETX of external equipments will be received by PLC in data receiving process,
therefore, care should be taken on the setting of operand n (Length of data to be received).
16-bit mode:
1. STX (Start of Text) and ETX (End of text) are set up by M1126 and M1130 together with
D1124~D1126. When PLC executed RS instruction, STX and ETX will be sent out
automatically.
2. When M1161 = OFF, the 16-bit mode is selected, i.e. both high byte and low byte of the 16-bit
data will be received and transmitted.