AH Programming Manual Example 2: 1. The example illustrates how to establish the UDP connection between a computer and an AH500 series PLC. 2. When M0 is ON, whether the socket has been connected is checked. If the socket has not been connected, the connection procedure is performed. After the socket has been connected, M0 will be switched OFF. 3. When M1 is ON, the data is sent. After the sending of the data is complete, M1 will be switched OFF. 4. When M2 is ON, whether the socket has been connected and no data is being received is checked. If the socket has been connected, and no data is being received, the data will be received.
If the socket has not been connected, the instruction is not executed. 6-511