154
10-3-2 Ladder Programming for UDP/IP Communications
The following program example sends and receives 100 bytes of data between
the PC Card Unit and the host computer using UDP/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
example.
System Configuration
The system configuration for the program example and the PC Card Unit system
setup are shown below. For purposes of this example, the network settings for
the PC Card Unit and the computer are as shown in the diagram.
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
Explanation of Operation
UDP OPEN REQUEST is executed for the PC Card Unit when CIO 00000 turns
ON. UDP CLOSE REQUEST is executed for the PC Card Unit when CIO 00001
turns ON. UDP SEND REQUEST is executed for the PC Card Unit when CIO
00002 turns ON and 100 bytes of data are sent beginning with DM 2009. UDP
RECEIVE REQUEST is executed for the PC Card Unit when CIO 00003 turns
ON and 100 bytes of data are received and stored beginning with DM 4025.
The appropriate bit in CIO 0001 turns ON when an error occurs. The following
areas can be used to access details about errors:
CMCR response codes
Response codes in results storage area
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.
Example
The following diagrams indicate that DM 0000 is the first word used in CMCR for
a UDP OPEN REQUEST and it contains 1810
hex
, that DM 0001 contains
000A
hex
, that CIO 00000 is used to control UDP open processing, and that
CIO 00001 is used to control UDP close processing.
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: ......