Chapter 8 Logic Instructions
8-233
5
ETH_Socket_Receive
Execute
ETH_Socket_Receive0
Abort
Done
Received
ReceivingSocketNum
ReceiveMode
DataSaveMode
Receive_Buffer_Address
Receive_Length
Received_Length
Busy
Active
Aborted
Error
ErrorID
R_Mode
R_Ex
1
R_Abort
R_SMode
R LTH_
R_BFA
R_Bsy
R_RLTH
R_Done
R_RING
R_RECD
R_ rrIDE
R_Act
R_ rrE
R_Abt
6
ETH_Socket_Close
Execute Done
ETH_Socket_Close0
SocketNum Busy
Error
ErrorID
C_Ex
1
C_ rrIDE
C_Done
C_ rrE
C_Bsy
7
ETH_Socket_Status
Enable
ETH_Socket_Status0
SocketNum
Valid
Conected
Received
Closed
Send
Opening
Receiving
Closing
Sending
Error
ErrorID
STA_En
1
STA_Send
STA_CLO
STA_Valid
STA_REC
STA_CON
STA_Err
STA_SING
STA_OING
STA_CING
STA_RING
STA_ErrID
Operation steps and data exchange description
1. The variables S_BFA and R_BFA are respectively bound to the addresses %MB200 and
%MB600. After the program compiling is successful and download is completed, the online
is performed. After the online is activated, the standard MODBUS TCP data “00 00 00 00
00 0b 00 10 10 00 00 02 04 aa bb cc dd” are written to 17 consecutive %MB registers
starting from %MB200.
2. Execute ETH_Socket_Manage instruction first by setting M_En to TRUE and then setting
M_SEN to TRUE. After M_SR variable changes to TRUE, execute ETH_Socket_Config by
setting CON_Ex variable to TRUE.
3. After the execution of ETH_Socket_Config instruction is competed, execute
ETH_Socket_Open instruction by setting O_Ex to TRUE. The controller starts to build the
link to the target host. Current connection state can be known by checking the output of
ETH_Socket_Status instruction.