Data Area tab

In general, TcCOM objects can contain data areas that can be used by the environment (e.g., by a PLC instance or by the TwinCAT I/O area). For TwinCAT MC3 TcCOM objects, you have a choice of data structures to use via the Data Area tab.

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.

McToPlc (Output)

Enable (default)

Name

Type

Description

Data Area tab 1:

Std

POINTER TO MC.CDT_MCTOPLC_ENCODER_AXIS_STD

Standard cyclic data structure containing the Oid of the encoder axis and key status information.

Data Area tab 2:

Act

POINTER TO MC.CDT_MCTOPLC_ENCODER_AXIS_ACT

Optional cyclic data structure containing information about the current actual values of the encoder axis.

Notice Valid data can only be expected if IsConnected = TRUE. Valid data must be validated in accordance with the following chapter: Constants (Named Constants)

Data Area tab 3:

Modulo

POINTER TO MC.CDT_MCTOPLC_ENCODER_AXIS_MODULO

Optional cyclic data structure containing information about the module position of the encoder axis. To calculate the module position correctly, set the Is Modulo Axis parameter to TRUE in the Init Parameter tab.

Notice Valid data can only be expected if IsConnected = TRUE. Valid data must be validated in accordance with the following chapter: Constants (Named Constants)