146
10-3 Sample Programs for TCP and UDP Communications
This subsection provides sample programs for TCP/IP communications and
UDP/IP communications.
10-3-1 Ladder Programming for TCP/IP Communications
The following program example sends and receives 100 bytes of data between
the PC Card Unit and the computer using TCP/IP communications. The system
and data area applications are described before the program example and
details of program operation are described following each section of the exam-
ple.
System Configuration
The system configuration for the program example and the PC Card Unit system
setup are shown below. To establish a TCP connection in this example, the PC
Card Unit is passively opened and the computer is actively opened.
Computer
IP address: 196.36.32.55, Port #4096
Operating level #1
IP address: 196.36.32.101
FINS Network address:
$01
Node number:
$01
Unit address:
$10
PC Card Unit
C200HX/HG/HE PC
CMCR Data Flow to the PC Card Unit
The data flow for sending CMCR instructions to the PC Card Unit is shown in the
following diagram.
Computer
Ethernet network
PC Card Unit
4. Send to network
5. Computer
processing
C200HX/HG/HE
1. CMCR issued
2. Work bits turned ON
3. CMCR response
6. Results stored in results
storage area
7. Work bits turned OFF
Note These work bits (CIO 00000 to CIO 00003) are set by the program to control
CMCR execution and are not system flags, such as the Instruction Enabled Flag
(25204).
Data Area Application
The data area words and bits used in the communications program are allocated
as shown in the following diagrams. These words and bits are used for CMCR
control data, command data, and results storage.
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: ......