![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_7420301077.webp)
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)
Содержание SYSMAC CS Series
Страница 2: ......
Страница 4: ...iv ...
Страница 30: ...xxx ...
Страница 186: ...146 List of Instructions by Function Code Section 2 4 ...
Страница 194: ...154 3 35 4 MOVE BIT MOVBC 568 1273 3 35 5 BIT COUNTER BCNTC 621 1275 3 35 6 GET VARIABLE ID GETID 286 1277 ...
Страница 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Страница 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Страница 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Страница 1392: ...1352 ASCII Code Table Appendix A ...
Страница 1404: ...1364 Revision History ...