
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)
Summary of Contents for SYSMAC CS Series
Page 2: ......
Page 4: ...iv ...
Page 30: ...xxx ...
Page 186: ...146 List of Instructions by Function Code Section 2 4 ...
Page 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Page 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Page 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Page 1392: ...1352 ASCII Code Table Appendix A ...
Page 1404: ...1364 Revision History ...