Omron CJ - INSTRUCTIONS Reference Manual page 945

Table of Contents

Advertisement

Communications Flags
The operation of the communications flags is outlined below.
• The Communications Port Enabled Flag is turned OFF when communications are in progress and
turned ON when communications are completed (normally or not).
• The status of the Communications Port Error Flag is maintained until the next time that data is
transmitted or received.
• The Communications Port Error Flag will be turned OFF the next time that data is transmitted or
received, even if there was an error in the previous operation.
Note Here, "communications port" indicates an internal logical port, not a physical port.
Example
Communications Port Enabled
Flag
Network instruction
(SEND/SEND2, RECV/RECV2,
or CMND/CMND2)
Communications Port Error
Flag
Communications Port
Completion Code
Address
Bits
A202
00 to 07
Communications Port
Enabled Flags
15
Communications Port
Allocation Enabled Flag
A203 to
---
Communications Port
A210
Completion Codes
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
Number
A219
00 to 07
Communications Port Error
Flags
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Instruction 1
executing
0000
(Normal
Previous
completion)
completion
Name
Turns ON when a communications instruction can be executed. Bits 00 to 07 correspond to
communications ports 0 to 7. You can tell when communications have been completed
because the Communications Port Enabled Flag will turn ON again after the completing
execution of the communications instruction. The Communications Port Enabled Flag will be
OFF while the communications instruction is being executed.
Turns ON when there is a communications port available for automatic allocation.
Note Use this flag to see if all eight communications ports have already been allocated before
executing communications instructions.
These words contain the completion codes for the corresponding port numbers when network
instructions have been executed.
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
executed. 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 (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
executed. 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.
Turns ON when a communications error occurs during execution of network communications. If
the Communications Port Error Flag turns ON, refer to the Communications Port Completion
Code in (A203 to A210) to identify the cause of the error. Bits 00 to 07 correspond to
communications ports 0 to 7. The Communications Port Error Flag will be OFF while the
communications instruction is being executed.
Instruction 2
Instruction 3
executing
executing
0204
0000
(Normal completion)
(Busy)
Description
3. Instructions
3
907

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