Omron CJ - INSTRUCTIONS Reference Manual page 952

Table of Contents

Advertisement

3. Instructions
Automatic Allocation of Communications Ports
Overview
Each of the following instructions use one of the communications ports (0 to 7) to perform network
communications or serial communications.
• Network Communications Instructions (SEND, RECV, and CMND)
• Serial Communications Instructions (PMCR, TXDU, and RXDU)
The above instructions are collectively referred to as communications instructions.
Note Here, "communications port" indicates an internal logical port, not a physical port.
Auxiliary Area Bits and Words Used When Automatically Allocating
Communications Ports
Address
Bits
A202
15
Communications Port
Allocation Enabled Flag
A214
00 to 07
First Cycle Flags after
Network Communications
Finished
08 to 15
Do not use.
A215
00 to 07
First Cycle Flags after
Network Communications
Error
08 to 15
Do not use.
A216 and
---
Communications Port
A217
Completion Code Storage
Address
A218
---
Used Communications
Port Numbers
Use the following flowchart to determine whether to use the Communications Port Allocation Enabled
Flag (A202.15) and the Communications Port Completion Code Storage Address (A216 and A217).
Using more than 8
communications ports?
NO
Communications
completion codes
required?
NO
Use automatic communications
port allocation.
914
Name
Turns ON when there is a communications port available for automatic allocation.
Note Use this flag to confirm if all eight communications ports have already been allocated before
executing communications instructions.
Each flag will turn ON for just one cycle after communications have been completed. Bits 00 to 07
correspond to ports 0 to 7.
Note These flags are not effective until the next cycle after the communications instruction is exe-
cuted. Delay accessing them for at least one cycle.
Note Use the Used Communications Port Number stored in A218 to determine which flag to access.
---
Each flag will turn ON for just one cycle after a communications error occurs. Bits 00 to 07 correspond
to ports 0 to 7. If the flag turns ON, refer to the Communications Port Completion Code in (A203 to
A210) to identify the cause of the error.
Note These flags are not effective until the next cycle after the communications instruction is exe-
cuted. Delay accessing them for at least one cycle.
Note Use the Used Communications Port Number stored in A218 to determine which flag to access.
---
The completion code for a communications instruction is automatically stored at the address with the
PLC I/O memory address given in these words.
Note Place this address into an index register and use indirect addressing through the index register
to reach the communications completion code.
When a communications instruction is executed, the number of the communications port that was
used is stored in this word. Values 0000 to 0007 hex correspond to communications ports 0 to 7.
YES
Use A202.15 and perform exclu-
sive control.
Use A216 and A217 with indirect
YES
addressing via an index register to
check the code.
Description
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF