Programming FCs (Functions) and FBs for S7 Ethernet CPs
151
SIMATIC NET NCM S7 for Industrial Ethernet
C79000-G8976-C129–06
Working with the Job Header
Free UDP connections require a job header in the user data area.
The following schematic illustrates the structure of the job buffer and the meaning
and location of the parameters in the job header.
Job header
User data
User data area
Job buffer 03H (high byte)EBH (low byte)
0BH
8EH23H
28H
Data byte 2041Data byte 2040
Bytes 0,1
Bytes 2,3
Bytes 4,5
Bytes
2046,2047
Data byte 1Data byte 0 Bytes 6,7
Port
IP address
Figure 5-1 Sending and Receiving on a Free UDP Connection with Programmed Addresses
SIn the picture (entries in hexadecimal) the following IP address is assumed:
142.11.40.35 (example only);
SFor the port address 1003, the following would be entered: for low byte: EBH;
for high byte: 03H.
SThe user data area can be up to 2048 bytes long. Up to 2042 bytes of user data
can be transferred. 6 bytes are reserved for the job header.
Please note that the data length specified in the block call (LEN parameter)
must include the header and the user data!