Memory layout
Each channel has access to two different memory areas: One of them is only available locally for the current NC channel and the other is cross-channel, i.e. it can be shared by all NC channels. The configuration of external variables is specified in a file for each NC channel and each of these files lists both global and channel-specific variables.
The memory location of a V.E. variable can be defined manually or the CNC defines the correct alignment and memory requirement. In the first case, the user is responsible for the error-free definition of the memory layout. In the second case, there is no risk of incorrect configuration.
If the memory layout is defined by manual configuration, V.E. variables can be assigned to any location in the V.E. memory by specifying an address offset (see P-EXTV-00002). The parameter P-EXTV-00008 defines the alignment to one of the variables located behind it in the memory. With more complex structures, this may be important if, for example, the next variable is a REAL64 type.
If user-defined variable types are used, byte alignment must be used for the structures in the PLC.
Manual address assignment is not recommended since the memory could be then be fragmented and overlapping. This can only be checked on request (see P-EXTV-00011). On the other hand, when automatic address assignment is used, variables are saved one after the other in the V.E. Memory without gaps and with the correct alignment (see figure).
Attention
As of CNC Build V3.00.3019 and higher, the external variables and structures are created with an 8-byte alignment. If a fixed start offset is specified for a variable by the parameter byte_offset (P-EXTV-00002) or the index (P-EXTV-00038) or size (P-EXTV-00008) is used, the user is responsible for the correct address assignment. No alignment calculation takes place.
Notice
Compatibility of old configuration lists
Configuration lists configured with an older syntax may continue to be used.
See Memory layout up to V2.10.1025
Notice
With multichannel configurations, we recommend the use of the same global entries of V.E. variables in all channels.