![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hw-pcs01-ev1/sysmac-c200hw-pcs01-ev1_operation-manual_742247169.webp)
153
Explanation of Ladder Program
The next section of program uses CMCR to execute TCP SEND. Execution
starts when CIO 00002 turns ON.
Program
address
Explanation
00053
Starting TCP SEND execution.
When CIO 00002 turns ON, the TCP send error bit (CIO 00102) turns
OFF and the TCP send work bit (CIO 00202) turns ON to request one
execution of TCP SEND.
00063
Execution of the TCP SEND via CMCR.
If the Instruction Enabled Flag (25204) is ON while the TCP send work
bit (CIO 00202) is ON, TCP SEND is executed via CMCR and the TCP
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 TCP
Sending Flag (CIO A1202) turns OFF to indicate that TCP SEND
execution via CMCR has ended. The Results Storage Error Flag
(CIO A1214) and the response code in the results storage area
(DM 4020) are checked and the TCP send error bit (CIO 00102) is
turned ON if an error has occurred.
00082
End of TCP SEND execution.
CIO 00002 turns OFF to indicate that the instruction execution has been
completed.
The next section of program uses CMCR to execute TCP RECEIVE. Execution
starts when CIO 00003 turns ON.
Program
address
Explanation
00087
Starting TCP RECEIVE execution.
When CIO 00003 turns ON, the TCP receive error bit (CIO 00103) turns
OFF and the TCP receive work bit (CIO 00203) turns ON to request one
execution of TCP RECEIVE.
00092
Execution of the TCP RECEIVE via CMCR.
If the Instruction Enabled Flag (25204) is ON while the TCP receive
work bit (CIO 00203) is ON, TCP RECEIVE is executed via CMCR and
the TCP 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 TCP
Receiving Flag (CIO A1201) turns OFF to indicate that execution of
TCP RECEIVE via CMCR has ended. The Results Storage Error Flag
(CIO A1214) and the response code in the results storage area
(DM 4020) are checked and the TCP receive error bit (CIO 00103) is
turned ON if an error has occurred.
00111
End of TCP 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: ......