Send/Receive Data And Amount Of Data - Mitsubishi Electric FX3U-232-BD User Manual

Melsec-f fx series programmable controllers data communication edition
Table of Contents

Advertisement

FX Series PLC User's Manual - Data Communication Edition
Non-Protocol Communication (RS/RS2 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)
OFF in RUN mode
M8000
M8161
X010
FNC 80
Send data
(PLC 
external
equipment)
Receive data
(external
equipment 
PLC)
1) Send data and amount of remaining send data
Send data
SD (TXD)
Amount of remaining
send data
D8122
2) Receive data and amount of data already received
Receive data
RD (RXD)
Amount of data
already received
D8123
Caution on other instructions using M8161
M8161 is shared by RS, ASCI, HEX, CCD, and CRC (provided only in FX
If M8161 is changed during the sending/receiving operation of the RS instruction, the data may not be
received normally.
F-48
OFF
16-bit mode
S 
m
D200
K 4
RS
D200 lowest-
D200 highest-
STX
order byte
order byte
Header
Head address specified by S 
Number of bytes to be sent specified by "m"
D500 lowest-
D500 highest-
STX
order byte
order byte
Header
Head address specified by D 
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.
4
3
2
2
1
0
Highest-order 8-bit Lowest-order 8-bit
16-bit data is divided into lowest-order
8-bit and highest-order 8-bit when it is
sent or received.
D 
n
D500
K 10
D201 lowest-
D201 highest-
order byte
order byte
D501 lowest-
D501 highest-
order byte
order byte
1
0
6
When the receiving
5
complete flag M8123
4
3
is reset, the amount of
received data is reset
also.
6 Creating Programs (RS Instruction)
6.2 How to Use RS Instruction
16-bit data
ETX
Terminator
D502 lowest-
D502 highest-
order byte
order byte
Terminator
and FX
PLCs) instructions.
3U
3UC
ETX

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents