Writing programs, 6-4 writing programs – Omron CS1W-ETN21 User Manual
Page 166
141
Communicating between OMRON PLCs
Section 6-6
6-6-4
Writing Programs
Programs incorporating the SEND(090), RECV(098), and CMND(490)
instructions are generally created using the Communications Port Enabled
Flag and the Communications Port Error Flag as input conditions. CS/CJ-
series CPU Units have eight communications ports. Only one instruction can
be executed at any given port at one time, however, so the program must not
overlap the use of any of the ports. A program example is provided below.
File memory
22
01
FILE NAME READ
Reads file memory data.
22
02
SINGLE FILE READ
Reads a specified length of file data
from a specified position within a single
file.
22
03
SINGLE FILE WRITE
Writes a specified length of file data
from a specified position within a single
file.
22
04
FILE MEMORY FORMAT
Formats (initializes) the file memory.
22
05
FILE DELETE
Deletes specified files stored in the file
memory.
22
07
FILE COPY
Copies files from one file memory to
another file memory in the same sys-
tem.
22
08
FILE NAME CHANGE
Changes a file name.
22
0A
MEMORY AREA–FILE TRANSFER
Transfers or compares data between the
I/O memory area and the file memory.
22
0B
PARAMETER AREA–FILE TRANSFER
Transfers or compares data between the
parameter area and the file memory.
22
0C
PROGRAM AREA–FILE TRANSFER
Transfers or compares data between the
UM (User Memory) area and the file
memory.
22
15
CREATE/DELETE DIRECTORY
Creates or deletes a directory.
Debugging
23
01
FORCED SET/RESET
Force-sets or force-resets bits, or
releases force-set status.
23
02
FORCED SET/RESET CANCEL
Cancels all bits that have been force-set
or force-reset.
Usage
Command
code
Name
Function
MR
SR
There are eight communications ports, so up to eight
communications instructions can be executed at a time. The
number of messages that can be sent or received with a
single CPU Bus Unit ser-vice, though, is not more than two
each for the CPU Unit to the Ethernet Unit and for the
Ethernet Unit to the CPU Unit.
Communications port
Ethernet Unit
CPU Unit
Instruction 1
Instruction 2
Instruction 3
Instruction 4
Instruction 5
Instruction 6
Instruction 7
Instruction 8