877
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.
Execution condition
d (Execution completed)
a (Executing)
c (Standby)
MOV
A218
KEEP
MOVL
A216
TST
A214
MOVL
IR0
<>
,IR0
#0000
a
(Executing)
Communications
instructions
Port: F
b
(Used port)
e (Code storage
location)
a (Executing) c (Standby)
b
(Used port)
d (Execution completed)
e (Code storage
location)
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) containng 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 communictions
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.
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...