159
Explanation of Ladder Program
The first section of program uses CMCR to execute UDP PASSIVE OPEN. Pro-
gram execution starts when CIO 00000 turns ON.
Program
address
Explanation
00000
Starting UDP OPEN execution.
When CIO 00000 turns ON, the UDP open error bit (CIO 00100) turns
OFF and the UDP open work bit (CIO 00200) turns ON to request one
execution of UDP OPEN.
00005
Execution of the UDP OPEN REQUEST via CMCR
If the Instruction Enabled Flag (25204) is ON while the UDP open work
bit (CIO 00200) is ON, a UDP OPEN REQUEST is executed via CMCR
and the UDP open work bit (CIO 00200) is turned OFF. Execution
pauses until CMCR instruction execution has been completed.
00010
Error evaluation.
The Instruction Enabled Flag (25204) turns ON again and the UDP
Opening Flag (CIO A1200) turns OFF to indicate that execution of UDP
OPEN via CMCR has ended. The Results Storage Error Flag
(CIO A1214) and the response code in the results storage area (D1020)
are checked and the UDP open error bit (CIO 00100) turns ON if an
error has occurred.
00024
End of UDP OPEN execution.
CIO 00000 turns OFF to indicate that execution has been completed.
The next section of program uses CMCR to execute UDP CLOSE. Execution
starts when CIO 00001 turns ON.
Program
address
Explanation
00029
Starting UDP CLOSE execution.
When CIO 00001 turns ON, the UDP close error bit (CIO 00100) turns
OFF and the UDP close bit (CIO 00201) turns ON to request one
execution of UDP CLOSE.
00034
Execution of the UDP CLOSE via CMCR.
If the Instruction Enabled Flag (25204) is ON while the UDP close work
bit (CIO 00201) is ON, UDP CLOSE is executed via CMCR and the
UDP close work bit (CIO 00201) turns OFF. Execution pauses until the
CMCR instruction has been completed.
00039
Error evaluation.
The Instruction Enabled Flag (25204) turns ON again and the UDP
closing bit (CIO A1203) turns OFF to indicate that execution of UDP
CLOSE via CMCR has ended. The Results Storage Error Flag
(CIO A1214) and the response code in the results storage area (D1050)
are checked and the UDP close error bit (CIO 00101) turns ON if an
error has occurred.
00053
End of UDP CLOSE execution.
CIO 00001 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: ......