L
ON
W
ORKS
I
NTERFACE
M
ODULE
O
PEN
N
ET
C
ONTROLLER
L
ON
W
ORKS
I
NTERFACE
M
ODULE
U
SER
’
S
M
ANUAL
11
Programming Transmit/Receive Data Using WindLDR
The OpenNet interface module exchanges data between the open network and the link registers in the CPU module allo-
cated to the OpenNet interface module, depending on the slot where the OpenNet interface module is mounted.
To create a communication program for an OpenNet interface module, first determine the slot number where the OpenNet
interface module is mounted, and make a program to write data to link registers allocated to transmit data and to read data
from link registers allocated to receive data.
Example: When a L
ON
W
ORKS
interface module is mounted in the first slot of all functional modules
•
Transmit Data
•
Receive Data
I0
REP
4
S1 –
65535
D1 R
L104
MOV(W)
65535
→
L104 through L107
When input I0 is on, constant 65535 (FFFFh) designated by source oper-
and S1 is moved to four link registers L104 through L107 designated by
destination operand D1. All 64 bits (8 bytes) in link registers L104
through L107 are turned on. Since link registers L104 through L107
transmit data, the data is transmitted to the network.
L100·L101
→
D0·D1
When input I1 is on, 32-bit (4-byte) data in two link registers L100 and
L101 designated by source operand S1 is moved to data registers D0 and
D1 designated by destination operand D1. Since link registers L100 and
L101 receive data, communication data read to L100 and L101 is moved
to data registers D0 and D1.
I1
REP
2
S1 R
L100
D1 R
D0
MOV(W)