ETHx_UDP_RECΒΆ

../_images/2c496b1ae38a1f2a0a33139000eba54e

The ETHx_UDP_REC Function Block reads the next data record from the UDP/IP receive buffer and stores the user data to the configured memory area.

The operating system reads the received UDP/IP data packages from the ETHERNET interface and stores them in the receive buffer. The buffer size is determined using the PLC configuration. The data packages are stored with variable lengths. For example, a data package consisting of 16 bytes of user data occupies exactly 22 bytes in the receive buffer (4 bytes for the IP address of the sending device, 2 bytes for the packet length and 16 bytes of user data).

Using the ETHx_UDP_REC Function Block, exactly one data package is read. The user data are stored in the configured memory area (DATA). The address of the sending device and the data package length are supplied at the outputs IP_ADR_REM and LEN. DONE = TRUE and ERR = FALSE indicate that the reading process was successful. If an error was detected during Function Block processing, the error is additionally indicated at the outputs ERR and ERNO. Furthermore, the Function Block provides information about the receive buffer filling level displayed in bytes (LEVR_BY) and data records (LEVR_DS).

Available as of PLC runtime system: V2.4
Included in library: Ethernet_AC500_V10.lib
Type Function Block with historical values