beckhoff TE1000 — 2.2.1 EAP telegram structure

Product description (This calculation includes 28 bytes for the UDP/IP Hdr. The 28 bytes are available for data in pure Ethernet communication.) Data representation on different platforms Note that both simple and complex data (WORD, ARRAYs, REAL, STRING, user-defined structures) are represented internally in a different manner on different platforms. x86 platforms use byte-alignment, others (Arm®) 2-byte or 4-byte alignment. This means that if a complex structure is created in both an x86/PC PLC project and an Arm® PLC project, they can each have a different effective size and a different internal structure. In the example (see illustration above) the structure in PC2 is larger than in PC1.

Not only that, the word and real variables don't match, since a variable can begin at any byte position in PC1 but only at any even- numbered byte position in PC2. It is recommended to observe the following rules when assembling structures so that no size differences are caused by the alignment: firstly, all 4-byte variables (must lie at an address that is divisible by 4) then all 2-byte variables (must lie at an address that is divisible by 2) then all 1-byte variables Further recommendation: If the data type STRING(x) is used in a PLC, the null termination of the string also belongs to the string itself, so that x+1 must be divisible by 4. Otherwise there is no 4-byte alignment.

The above rules also apply to substructures. Other information can be found in the Beckhoff information system under structures or alignment . TE1000 20 Version: 1.7.1