11: D
ATA
L
INK
C
OMMUNICATION
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
11-11
Sample Program for Data Link Communication
This sample program demonstrates data communication from slave station 1 to the master station, then to slave station
2. Data of inputs I0 through I7 and I10 through I17 are stored to data register D900 (transmit data) at slave station 1. The
D900 data is sent to data register D906 (receive data from slave 1) of the master station. At the master station, D906 data
is moved to data register D912 (transmit data to slave 2). The D912 data is sent to data register D906 (receive data) of
slave station 2, where the D906 data is set to outputs Q0 through Q7 and Q10 through Q17.
Master Station
Slave Stations
D906 (Receive data from slave 1)
D912 (Transmit data to slave 2)
D900 (Transmit Data)
D906 (Receive Data)
I0 to I7, I10 to I17 (Slave Station 1)
Q0 to Q7, Q10 to Q17 (Slave Station 2)
Master station program
M8125 is the in-operation output special internal relay which remains on during
operation.
The data of data register D906 (receive data from slave station 1) is moved to
data register D912 (transmit data to slave station 2).
M8125
REP
S1 –
D906
D1 –
D912
MOV(W)
Slave station 1 program
The 16-bit data of inputs I0 through I7 and I10 through I17 is moved to data reg-
ister D900 (transmit data to master station).
M8125
REP
S1 –
I0
D1 –
D900
MOV(W)
Slave station 2 program
The data of data register D906 (receive data from master station) is moved to 16
output points of Q0 through Q7 and Q10 through Q17.
M8125
REP
S1 –
D906
D1 –
Q0
MOV(W)
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]