Global data types and MC3 types

Cyclic Data Types (CDTs)

CDTs define structures for the cyclic exchange between MC3 and PLC. The Data Area tab for each axis specifies which CDTs are mapped to the PLC for that axis and are therefore cyclically populated with data.

If there is a link between the MC3 axis and the PLC Tc3_Mc3PTP.AXIS_REF, then CDT_PLCTOMC_AXIS_STD and CDT_MCTOPLC_AXIS_STD are always linked. All other CDTs are optional. For optional CDTs, the IsConnected must be checked before any read or write operation. Only when IsConnected = TRUE may the PLC access the remaining structure.

Notice

Unlinked CDTs can cause a floating-point exception when accessed

Comparisons with NaN values can lead to an exception, which results in the runtime stopping and potentially causing machine damage.
Valid data can only be expected if IsConnected = TRUE. Otherwise, there is a risk of an inconsistent or invalid data set, which may lead to unpredictable consequences and unexpected behavior. Arithmetic operations using invalid values can cause floating-point exceptions in the processor's floating-point unit.

  • Switch off the Floating Point Exceptions if NaN values are to be used and processed in the application.
  • Before accessing a CDT (e.g., from the PLC), check the CDT's IsConnected.
  • Familiarize yourself with how to handle named constants and NaN values.