![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/3/8d/38d56254-54fe-46e3-85ae-d3f5260e1091/38d56254-54fe-46e3-85ae-d3f5260e1091-bgdd.png)
FX Series Programmable Controlers Applied Instructions 5
5-95
5.9.1 RS (FNC 80)
Operation:
This instruction performs the direct control of
communications over FX and FX
0N
communication
adapters which connect to the left hand port of the
Main Processin
Unit, i.e. FX
0N
-232ADP, FX-
232ADP etc.
Points to note:
a) This instruction has man
automaticall
defined devices. These are listed in the
boxed column to the ri
ht of this pa
e.
b) The RS instruction has two parts, send
(or transmission) and receive. The first
elements of the RS instruction specif
the
transmission data buffer (S) as a head
address, which contains m number of
elements in a sequential stack.
The specification of the receive data area
is contained in the last two parameters of
the RS instruction. The destination (D)
for received messa
es has a buffer or
stack len
th of n data elements. The size
of the send and receive buffers dictates
how lar
e a sin
le messa
e can be.
Buffer sizes ma
be updated at the
followin
times:
1) Transmit buffer - before transmission
occurs, i.e. before M8122 is set ON
2) Receive buffer - after a messa
e has
been received and before M8123 is
reset.
c) Data cannot be sent while a messa
e is
bein
received, the transmission will be
dela
ed - see M8121.
d) More than one RS instruction can be
pro
rammed but onl
one ma
be active
at an
one time.
Mnemonic Function
Operands
Program steps
SmDn
RS
FNC 80
(Serial Com-
munications
instruction)
Used to control
serial
communications
from/to the
pro
rammable
controller
D
(includin
file
re
isters)
K, H,
D
m = 1 to
256, FX2N
1 to 4096.
DK, H,
D
m = 1 to
256, FX2N
1 to 4096
RS: 9 steps
X3
K 5
[ S ] [ D ]
D20RS K 5D10
[ m ] [ n ]
Contains the configuration parameters for
communication, i.e. Baud rate,Stop bits etc. Full
Contains the current count of the number of
remaining bytes to be sent in the currently
Contains the current count of the number of
received bytes in the ‘incoming’ message.
Contains the ASCII code of the character used
to signify a message header - default is ‘STX’,
Contains the ASCII code of the character used
to signify a message terminator -default is
This flag is ON to indicate a transmission is
being delayed until the current receive
This flag is used to trigger the transmission of
This flag is used to identify (when ON) that a
complete message has been received.
Carrier detect flag. This flag is for use with FX
and FX2C Main Processing Units. It is typically
useful in modem communications
8 or 16 bit operation mode ON = 8 bit mode
where only the lower 8 bits in each source or
destination device are used, i.e. only one ASCII
character is stored in one data register OFF =
16bit mode where all of the available source/
destination register is used, i.e. two ASCII
characters are stored in each data register.