Omron CJ - INSTRUCTIONS Reference Manual page 954

Table of Contents

Advertisement

3. Instructions
Accessing the Completion Code after Executing Communications Instructions
The completion codes are generally used to troubleshoot errors when they occur. A completion code of
0000 hex can, however, also be used to confirm that communications have been completed normally.
Execution condition
d (Execution completed)
a (Executing)
a (Executing) c (Standby)
916
KEEP
a
(Executing)
When a (Executing) turns ON, a communications instruction
(SEND(090), SEND2(491), RECV(098), RECV2(492), CMND(490),
Communications
instructions
CMND2(493), PMCR(260), or PMCR2(264)) is executed with the
communications port specified as "F."
Port: F
The communications port number that was automatically allocated is
MOV
stored in a work word b (Used port) from A218 (Used Communications
Port Number).
A218
b
(Port)
Places the PLC memory address (A216) containing the completion code
for the communications instruction executed with automatic allocation of
MOVL
the communication port into work word e (Code storage location).
A216
e (Code storage
Confirms that the First Cycle Flags after Network Communications
location)
Finished for the automatically allocated port number (corresponding bit for
word b in A214) is ON.
c (Standby)
d (Execution completed)
TST
A214
b
(Used port)
<>
,IR0
#0000
Bit c turns OFF the cycle after the
communications instruction was
executed to enable checking the
completion code.
Places the PLC memory
address of the completion code
from work word e (Code
storage location) into index
register IR0.
MOVL
e (Code storage
location)
IR0
Network communications
error processing
If the completion code indirectly address via IR0
does not equal 0000 hex, communications error
processing is performed.
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?

Table of Contents

Save PDF