EasyManua.ls Logo

Omron SYSMAC CJ - REFERENCE MANUAL 08-2008

Omron SYSMAC CJ - REFERENCE MANUAL 08-2008
1405 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1037
Network Instructions Section 3-25
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 completed normally.
Note Both user-specified communications port numbers and automatically speci-
fied communications port numbers can be used in the same program. It is
possible, however, that the communications port numbers specified by the
user will be used for automatic allocation. It is thus important to check the pro-
gram carefully when adding communications instructions that use automatic
communications port allocation to an existing program, as shown in the follow-
ing example.
Port: F
MOV
A218
KEEP
MOVL
A216
TST
A214
MOVL
IR0
<>
,IR0
#0000
Execution condition
d (Execution completed)
a (Executing)
c (Standby)
Communications
instructions
a (Executing)
c (Standby)
d (Execution completed)
When a (Executing) turns ON, a communications instruction
(SEND(090), RECV(098), CMND(490), or PMCR(260)) is executed with
the communications port specified as “F.”
The communications port number that was automatically allocated is
stored in a work word b (Used port) from A218 (Used Communications
Port Number).
Places the I/O memory address (A216) containing the completion code
for the communications instruction executed with automatic allocation of
the communication port into work word e (Code storage location).
Confirms that the First Cycle Flags after Network Communications
Finished for the automatically allocated port number (corresponding bit for
word b in A214) is ON.
Places the I/O memory
address of the communications
response code from work word
e (Code storage location) into
index register IR0.
Network communications
error processing
Bit c turns OFF the cycle after the
communications instruction was
executed to enable checking the
communication completion code.
If the completion code indirectly address via IR0
does not equal #0000, communications error
processing is performed.
a
(Executing)
b
(Used port)
e (Code storage
location)
b
(Used port)
e (Code storage
location)

Table of Contents

Related product manuals