3. Instructions
918
CS/CJ/NSJ Series Instructions Reference Manual (W474)
3 It is acceptable to specify the communications port for some communications instructions and use automatic port
allocation for others. It is possible, however, that a port specified by the user for one communications instructions may
have already been automatically allocated. You must therefore be careful when adding communications instructions
that use automatic port allocation to existing ladder diagrams, as shown below.
Programming Example
Specifications of CJ2 Network Communications Instructions (SEND2,
CMND2, PMCR2, and RECV2)
z Communications Port Allocations
Although the communications port (see note) was specified in the operands of previous Network
Communications Instructions, the CJ2 Network Communications Instructions use automatic port
allocation with new communications ports (8 to 71) to enable executing up to 64 of the CJ2 Network
Communications Instruction simultaneously. With these instructions, there is no need for the user to
keep track of the communications ports.
Each time one of these instructions is executed, the number of ports stored in A211 (Number of Ports
Available) will be decremented. Each time a response is returned for a communications port, the value
in A211 will be incremented. This system enables monitoring communications performance.
Note The communications ports are internal logical ports (virtual ports) used to manage simultaneous execution
of communications instructions over multiple cycles (including communications processing, file handling,
etc.).
Communications
ports
Application Assignment method
0 to 7 Network Communications Instructions,
Serial Communications Instructions, easy
backup (SEND, CMND, PMCR, TXDU, etc.)
Specified in operand.
0 to 7: The specified communications port is assigned.
F: The communications port is automatically assigned between 0 and 7.
8 to 71 CJ2 Network Communications Instructions
(SEND2, CMND2, PMCR2, and RECV2)
Automatically assigned, with the number of available ports stored in A211.
A202.01
W000.00
A202.01
W000.01
Communications were previously enabled by
exclusively controlling operation using W000.00 and
W000.01.
Automatic
port
allocation
was added to
the program.
This instruction may, at times, use
communications port 1. Even if W000.00
or W000.01 is turned ON, A202.01 will be
turned OFF by execution of this
PMCR(260) instruction, so neither of the
CMND(490) instructions will be executed.
Port: 1
@CMND
@CMND
@PMCR
Port: 1
Port: F