Libraries 
  9.4 Open user communication library 
S7-200 SMART 
System Manual, V2.3, 07/2017, A5E03822230-AF 
539 
: Call the TCP_CONNECT instruction with Req = FALSE and the same 
Connection ID (ConnID) as above. Do this to check the connection status. 
 
: If Done is TRUE, this means that the CPU established the connection so 
continue in the "Idle" state. 
If Busy is TRUE, stay in the "Connect Wait" state. Since this is a passive connection, stay in 
the "Busy" state until the active partner connects to the CPU. There is no timeout for a 
passive connection. 
If Error is TRUE, a problem occurred so go back and try again to connect on the next scan. 
In all cases, exit the state machine for this scan. The program continues to the next state on 
the next scan. 
 
: State Receive... 
Stay in this state until the server receives some data. 
 
: Call the TCP_RECV instruction to get any messages that the CPU has 
received.