background image

 

Page 

7

 

 
 

UDP Receive:  

RECV instruction is used, 

RECV 

]

 

 

A

: H3100 (fixed)  

 

 

 

B

: Result status 

A+1

: UDP receive command (H0033)  

B+1

: Error code 

A+2

: Socket number (1 to 12) 

A+3

: Sender IP address (note 1) 

A+4

: Ditto 

A+5

: Sender Port number 

A+6

: Receive data word size (1 to 1000) 

A+7

: Destination data table register type (note 2) 

A+8

: Destination data table register starting address 

A+9

: Timeout setting (0.1s units, see note 3) 

Note 1: If sender IP address is 192.0.0.5 (HC0.0.0.5), set as follows. 

A+3 = H0005 
A+4 = HC000 

For broadcast receiving, set 0.0.0.0. 
Note 2: 

RW register = 3 
D register = 4 

Note 3:  If A+9 = 0, there is no timeout. 
 

Sample program 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

12544 = H3100 
51 = H0033 
Socket number = 2 
Sender IP address = 192.0.0.5 (-16384 = HC000) 
Sender Port number = 5000 
Receive word size = 100 
Destination data table is D2000 and after, no timeout setting 

Summary of Contents for S2T

Page 1: ...his module must be setup 1st before either of the connections methods are possible 1 Install the EtherSetup_E software on an MS Windows computer See the installation instructions in the User s Guide for the Ethernet Module Parameter Setting Tool 6F8C1103 2 Set the network parameters in the GEN651A module 2 1 Set the DIP switches on the front of the EN6651A to enable setting the network parameters ...

Page 2: ...651A Ethernet module If the EtherSetup_E can not establish communications with the GEN651A please make sure 1 The computer is connected directly to the GEN651A using as RS232 cross cable 2 The EtherSetup_E software is using the correct Com Port setting 3 No other computer software is running that uses the computer s RS232 port T PDS Setup In addition to setting up the Ethernet module network param...

Page 3: ...ard alternate click on it and then click on Properties Note that the IP Address and Subnet Mast must be the same as set in T PDS the GEN651A the last digit of the IP Address must be different however it cannot be 1 The address of the GEN651A module is 172 16 64 1 Click OK In case of difficulty setting up the computer Ethernet card contact the company MIS IT Department ...

Page 4: ...es the T PDS setup T PDS can now be connected to the S2E via Ethernet through the GEN651A Ethernet module Note If an attempt is made to assign an IP address in T PDS before the computer s Ethernet card is assigned a corresponding IP address then T PDS will return a Win Socket error This setting can also be made in the ladder logic with a MOV instruction ...

Page 5: ...t is recommended that 2 UDP sockets be opened One for data send and one for data receive respectively 2 Execute UDP send and or UDP receive to exchange data via Ethernet 3 UDP socket close The instruction information on these functions is shown as follows UDP Socket Open SEND instruction is used A SEND B A H3100 fixed B Result status A 1 UDP open command H0031 B 1 Error code A 2 Socket number 1 to...

Page 6: ...egister starting address Note 1 If receiver IP address is 192 0 0 5 HC0 0 0 5 set as follows A 3 H0005 A 4 HC000 Note 2 RW register 3 D register 4 Sample Program 12544 H3100 50 H0032 Socket number 1 Receiver IP address 192 0 0 5 16384 HC000 Receiver Port number 4000 Transmit ward size 200 Source data table is D1000 and after When R0622 is set to ON 200 data words D1000 to D1199 are transmitted to ...

Page 7: ...e note 2 A 8 Destination data table register starting address A 9 Timeout setting 0 1s units see note 3 Note 1 If sender IP address is 192 0 0 5 HC0 0 0 5 set as follows A 3 H0005 A 4 HC000 For broadcast receiving set 0 0 0 0 Note 2 RW register 3 D register 4 Note 3 If A 9 0 there is no timeout Sample program 12544 H3100 51 H0033 Socket number 2 Sender IP address 192 0 0 5 16384 HC000 Sender Port ...

Page 8: ... is finished R0621 is reset to OFF automatically UDP Socket Close SEND instruction is used A SEND B A H3100 fixed B Result status A 1 UDP close command H0034 B 1 Error code A 2 Socket number 1 to 12 Sample program 12544 H3100 52 H0034 Socket number 1 When R0623 is set to ON the UDP socket is closed When the operation is finished R0623 is reset to OFF automatically ...

Reviews: