![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hw-pcs01-ev1/sysmac-c200hw-pcs01-ev1_operation-manual_742247177.webp)
161
Explanation of Ladder Program
The next section of program uses CMCR to execute UDP SEND. Execution
starts when CIO 00002 turns ON.
Program
address
Explanation
00053
Starting UDP SEND execution.
When CIO 00002 turns ON, the UDP send error bit (CIO 00102) turns
OFF and the UDP send work bit (CIO 00202) turns ON to request one
execution of UDP SEND.
00063
Execution of the UDP SEND via CMCR.
If the Instruction Enabled Flag (25204) is ON while the UDP send work
bit (CIO 00202) is ON, UDP SEND is executed via CMCR and the UDP
send work bit (CIO 00202) turns OFF. Execution pauses until the CMCR
instruction has been completed.
00068
Error evaluation.
The Instruction Enabled Flag (25204) turns ON again and the UDP
Sending Flag (CIO A1202) turns OFF to indicate that UDP SEND
execution via CMCR has ended. The Results Storage Error Flag
(CIO A1214) and the response code in the results storage area (D4020)
are checked and the UDP send error bit (CIO 00102) is turned ON if an
error has occurred.
00082
End of UDP SEND execution.
CIO 00002 turns OFF to indicate that the instruction execution has been
completed.
The next section of program uses CMCR to execute UDP RECEIVE. Execution
starts when CIO 00003 turns ON.
Program
address
Explanation
00087
Starting UDP RECEIVE execution.
When CIO 00003 turns ON, the UDP receive error bit (CIO 00103) turns
OFF and the UDP receive work bit (CIO 00203) turns ON to request
one execution of UDP RECEIVE.
00092
Execution of the UDP RECEIVE via CMCR.
If the Instruction Enabled Flag (25204) is ON while the UDP receive
work bit (CIO 00203) is ON, UDP RECEIVE is executed via CMCR and
the UDP receive work bit (CIO 00203) turns OFF. Execution pauses
until the CMCR instruction has been completed.
00097
Error evaluation.
The Instruction Enabled Flag (25204) turns ON again and the UDP
Receiving Flag (CIO A1201) turns OFF to indicate that execution of
UDP RECEIVE via CMCR has ended. The Results Storage Error Flag
(CIO A1214) and the response code in the results storage area (D4020)
are checked and the UDP receive error bit (CIO 00103) is turned ON if
an error has occurred.
00111
End of UDP RECEIVE execution.
CIO 00003 turns OFF to indicate that execution has been completed.
Sample Programs for TCP and UDP Communications
Section 10-3
Summary of Contents for SYSMAC C200HW-PCS01-EV1
Page 1: ...Cat No W313 E1 3 PC Card Unit SYSMAC C200HW PCU01 C200HW PCS01 EV1 OPERATION MANUAL...
Page 2: ......
Page 3: ...SYSMAC C200HW PCU01 C200HW PCS01 EV1 PC Card Unit Operation Manual Revised January 2000...
Page 4: ......
Page 6: ......
Page 10: ......
Page 12: ......
Page 18: ......
Page 34: ......
Page 38: ......
Page 60: ......
Page 80: ......
Page 82: ......
Page 88: ......
Page 120: ......
Page 148: ......
Page 178: ......
Page 214: ......
Page 220: ......
Page 232: ......
Page 234: ......
Page 236: ......
Page 238: ......
Page 240: ......