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
Содержание SYSMAC C200HW-PCS01-EV1
Страница 1: ...Cat No W313 E1 3 PC Card Unit SYSMAC C200HW PCU01 C200HW PCS01 EV1 OPERATION MANUAL...
Страница 2: ......
Страница 3: ...SYSMAC C200HW PCU01 C200HW PCS01 EV1 PC Card Unit Operation Manual Revised January 2000...
Страница 4: ......
Страница 6: ......
Страница 10: ......
Страница 12: ......
Страница 18: ......
Страница 34: ......
Страница 38: ......
Страница 60: ......
Страница 80: ......
Страница 82: ......
Страница 88: ......
Страница 120: ......
Страница 148: ......
Страница 178: ......
Страница 214: ......
Страница 220: ......
Страница 232: ......
Страница 234: ......
Страница 236: ......
Страница 238: ......
Страница 240: ......