Chapter 6 Applied Instructions 4. First, set the parameters related to TCP Socket1 in HWCONFIG in ISPSoft or in the SCONF instruction. 5. When M0 is ON, the system checks whether the socket is closed, has been connected, or is being connected. If the socket is not closed, has not been connected, and is not being connected, the system performs the connection procedure. After the socket has been connected, M0 is switched to OFF. 6. When M1 is ON, the system checks whether the socket has been connected and no data is being sent. If the socket has been connected and no data is being sent, the system sends the data.
If the socket has not been connected, the system does not execute the instruction. After data has been sent, M1 is switched to OFF. 7. When M2 is ON, the system checks whether the socket has been connected and the flag for received data is ON. If the socket has been connected and the flag for received data is ON, then the data has already been received. 8. When M3 is ON, the system checks whether the socket has been connected. If the socket has been connected, the system closes the connection. If the socket has not been connected, the system does not execute the instruction. After the connection is closed, M2 and M3 are switched to OFF. 6-693 6 6 _