Extended working data: TcNcTrafoParameterExtCnc

Parameters of the methods

Type = EcNcTrafoParameter_ExtCnc

The parameters for the individual methods are transferred via the following extended structure TcCnCTrafoParameter . The data structure provided by the CNC is identified by this parameter type.

Type = EcNcTrafoParameter_ExtCnc

struct TcCncTrafoParameter : public TcNcTrafoParameter, TcCncParam

unsigned short kin_id; // in: used kinematic ID

unsigned long control; // in: control trafo calculation, e.g. EcCncTrafoCtrl_cartesianTrafoInactive

EcCncTrafoOption ret_option; // out: select option of transformation during TrafoSupported()

TcCncVersion CncInterfaceVersion; // Interface version TcCncVersionMajor.TcCncVersionMinor

// orientation

EcCnc_TrafoOriModeActual actual_orientation_mode; // Treatment of orientation, actual rotation sequence

EcCnc_TrafoModeSupported supported_modes; // modes supported by the TcCOM transformation

Warning:

The structure element EcCnc_TrafoModeSupported supported_modes replaces the previous element EcCnc_TrafoOriModeSupported supported_orientation_modes. However, the data item is still supported for downward compatibility reasons.

// modulo configuration

ULONG dim_modulo;              // dim of modulo vector

EcCnc_McsModulo * mcs_modulo;

EcCnc_AcsModulo * acs_modulo;

Caller identification

The active kinematic transformation is currently used at several points in the CNC: The different callers are noted in the working data transferred to the transformation.

   0 : EcCncTrafoCallerID_Undefined

   1 : EcCncTrafoCallerID_Decode

   2 : EcCncTrafoCallerID_ToolRadiusCorrection

   3 : EcCncTrafoCallerID_PathPreparation

   4 : EcCncTrafoCallerID_Interpolation

   5 : EcCncTrafoCallerID_Display

   6 : EcCncTrafoCallerID_BlockSearch

The caller’s identification (caller_id) is used to calculate the transformation at various points with variants, e.g.:

Transformation options

While the transformation is initialised (TrafoSupported method), you can select individual CNC options. These options change the CNC interface management and may supply additional parameters. Each of the options is predefined by the CNC and must match the corresponding transformation. The following options are available:

  0 : EcCncTrafoOption_None

  1 : EcCncTrafoOption_Interpolation_AddInput

Control input

The following data is transferred cyclically to the kinematic transformation

  0x0000 0001 EcCncTrafoCtrl_cartesianTrafoInactive

Version number of CNC interface

In the TcCncVersion data item, the CNC transfers the version number of the transformation interface it uses:

struct TcCncVersion

{

  Long     major;

  Long     minor;

};

Rotation sequence

In the actual_rotation_mode data item, the CNC transfers the active rotation sequence of the orientation axes:

EcCncTrafoOri_None = 0

EcCncTrafoOri_YPR  = 1

EcCncTrafoOri_CBC1 = 2

EcCncTrafoOri_CBA  = 3

EcCncTrafoOri_CAB  = 4

EcCncTrafoOri_AB   = 5

EcCncTrafoOri_BA   = 6

The rotation sequences supported in the transformation are transferred to the CNC in the supported_rotation_modes data item:

typedef struct _EcCnc_TrafoModeSupported

{

  unsigned long   f_YPR   : 1;

  unsigned long   f_CBC1  : 1;

  unsigned long   f_CBA   : 1;

  unsigned long   f_CAB   : 1;

  unsigned long   f_UniqueTrafo  : 1;

  unsigned long   f_AB    : 1;

  unsigned long   f_BA    : 1;

} EcCnc_TrafoModeSupported;

Unique CNC --> TcCOM transformation

The flag f_UniqueTrafo in the data item supported_modes allows the user to mark the TcCOM transformation as unique in forward and backward directions. As user, you can set the flag in the TafoSupported method. By default, the CNC handles TcCOM transformations as not unique. The flag f_UniqueTrafo is checked when the transformation is initialised.

Setting the flag accelerates by a few cycles all operations where the CNC must read the positions of the drives. Such operations include selecting or deselecting the transformation, changing coordinate systems when a TcCOM transformation is active or using V.A.ACS.ABS variables.

Example code to set the flag:

virtual HRESULT TCOMAPI TrafoSupported(PTcCncTrafoParameter p, bool fwd)

{

  p->supported_modes.f_UniqueTrafo = TRUE;

  return S_OK;

};

s

Modulo settings

The CNC supplies the dimension of the axis-specific objects mcs_modulo and acs_modulo in the object dim_modulo. Modulo handling in the MCS coordinate system is transferred to the CNC in the axis-specific data item mcs_modulo:

EcCnc_McsModulo_None    = 0,

EcCnc_McsModulo_180_180 = 1,

The CNC transfers the extended modulo setting of an axis in the ACS coordinate system in the acs_modulo data item:

EcCnc_AcsModulo_None    = 0,

EcCnc_AcsModulo_180_180 = 1,

EcCnc_AcsModulo_0_360   = 2,

Example

example

Disabling intersection calculation if #CS is inactive

For example, if the kinematic transformation varies depending on whether a higher-level Cartesian transformation is active or not, you can select this operation by means of the input bit. This is indicated by the controller.

Kinematic transformation when intersection calculation is active (EcCncTrafoCtrl_cartesianTrafoInactive deleted)

Kinematic transformation when intersection calculation is active
Kinematic transformation when intersection calculation is active

Kinematic transformation when intersection calculation is inactive

(EcCncTrafoCtrl_cartesianTrafoInactive set)

Kinematic transformation when intersection calculation is inactive
Kinematic transformation when intersection calculation is inactive

Attention

attention

Forward transformation must always be inverse to backward transformation.
  position = forward(backward(position))
If the transformation varies is dependent on the caller (caller_id), then disable this variation when the controller is initialised at standstill.

Identification of the transformation callers
Identification of the transformation callers