Network Instructions
Execution condition
d (Execution completed)
a (Executing)
a (Executing) c (Standby)
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.
KEEP
a
(Executing)
When a (Executing) turns ON, a communications instruction
(SEND(090), RECV(098), CMND(490), or PMCR(260)) is executed with
Communications
instructions
the communications port specified as "F."
Port: F
The communications port number that was automatically allocated is
stored in a work word b (Used port) from A218 (Used Communications
MOV
Port Number).
A218
b
(Used port)
Places the I/O 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)
TST
A214
b
(Used port)
Bit c turns OFF the cycle after the
communications instruction was
executed to enable checking the
communication completion code.
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.
d (Execution completed)
MOVL
e (Code storage
location)
IR0
Network communications
<>
error processing
,IR0
#0000
If the completion code indirectly address via IR0
does not equal #0000, communications error
processing is performed.
Section 3-25
Places the I/O memory
address of the communications
response code from work word
e (Code storage location) into
index register IR0.
1037
Need help?
Do you have a question about the SYSMAC CJ - REFERENCE MANUAL 08-2008 and is the answer not in the manual?
Questions and answers