F-48
FX Series PLC User's Manual - Data Communication Edition
Non-Protocol Communication (RS/RS2 Instruction)
6 Creating Programs (RS Instruction)
6.2 How to Use RS Instruction
6.2.3
Send/receive data and amount of data
RS instruction can handle sent and received data in two modes, 16-bit mode and 8-bit mode.
Data is handled as shown below in each mode. (In the examples shown below, "header provided" and
"terminator provided" are selected in the communication setting.)
1. Handling of 16-bit data (when M8161 is set to OFF)
1) Send data and amount of remaining send data
2) Receive data and amount of data already received
Caution on other instructions using M8161
M8161 is shared by RS, ASCI, HEX, CCD, and CRC (provided only in FX
3U
and FX
3UC
PLCs) instructions.
If M8161 is changed during the sending/receiving operation of the RS instruction, the data may not be
received normally.
X010
M8000
FNC 80
RS
D200
K 4
D500
K 10
S
m
D
n
M8161
16-bit mode
OFF in RUN mode
OFF
Highest-order 8-bit Lowest-order 8-bit
16-bit data
16-bit data is divided into lowest-order
8-bit and highest-order 8-bit when it is
sent or received.
D200 highest-
order byte
STX
D200 lowest-
order byte
D201 lowest-
order byte
D201 highest-
order byte
ETX
STX
D500 lowest-
order byte
D500 highest-
order byte
D501 lowest-
order byte
D501 highest-
order byte
D502 lowest-
order byte
D502 highest-
order byte
ETX
Terminator
They cannot exceed the upper limit number of devices (bytes) to be
received by "n". When the PLC receives the terminator (ETX) or "n" data,
receiving is completed.
Terminator
Header
Header
Send data
(PLC
external
equipment)
Receive data
(external
equipment
PLC)
Head address specified by S
Number of bytes to be sent specified by "m"
Head address specified by D
0
1
2
3
4
Amount of remaining
send data
D8122
Send data
SD (TXD)
D
200
low
es
t-order by
te
D200 highes
t-
or
der
by
te
D
201
low
es
t-order by
te
D201 highes
t-
or
der
by
te
STX
ETX
When the receiving
complete flag M8123
is reset, the amount of
received data is reset
also.
6
5
4
3
2
1
0
Receive data
RD (RXD)
Amount of data
already received
D8123
D
500
low
es
t-order by
te
D500 highes
t-
or
der
by
te
D
501
low
es
t-order by
te
D501 highes
t-
or
der
by
te
D
502
low
es
t-order by
te
D502 highes
t-
or
der
by
te
STX
ETX
Summary of Contents for FX-485ADP
Page 2: ......
Page 120: ...B 2 FX Series PLC User s Manual Data Communication Edition N N Network ...
Page 188: ...C 2 FX Series PLC User s Manual Data Communication Edition Parallel Link ...
Page 244: ...D 2 FX Series PLC User s Manual Data Communication Edition Computer Link ...
Page 344: ...E 2 FX Series PLC User s Manual Data Communication Edition Inverter Communication ...
Page 700: ...H 2 FX Series PLC User s Manual Data Communication Edition Programming Communication ...
Page 752: ...I 2 FX Series PLC User s Manual Data Communication Edition Remote Maintenance ...
Page 817: ......