Modulo handling of axis positions

Normally, the positions in the MCS coordinate system is handled linearly by the CNC, i.e. no modulo correction takes place. If the transformation expects the MCS positions in the modulo interval [-180° - +180°[ (e.g. for shortest way programming), a modulo correction can be activated for an axis in the MCS coordinate system in the TrafoSupported() function by the data item mcs_modulo.

p->mcs_modulo[i]

Meaning

EcCnc_McsModulo_None

Linear MCS positions, no modulo calculation for this axis

EcCnc_McsModulo_180_180

Modulo calculation of the MCS positions for this axis in the interval [-180°, +180°[.

The calculated ACS coordinates must match the axis properties. If the axis uses modulo positions, the ACS coordinates in the transformation must also execute a modulo correction. Therefore, the modulo setting in the axis-specific data item acs_modulo used in the transformation is sent to the CNC. The CNC then checks whether the transformation matches the axis properties. If not, it generates the error message P-ERR-50534.

p->acs_modulo[i]

Meaning

EcCnc_AcsModulo_None

Linear ACS positions: no modulo handling is required for this axis.

EcCnc_AcsModulo_180_180

For this axis a modulo calculation of the ACS positions is required in the interval [-180°, +180°[.

EcCnc_AcsModulo_0_360

For this axis a modulo calculation of the ACS positions is required in the interval [0°, 360°[.

Programing Example

prg_example

Modulo handling of axis positions

HRESULT <UserTrafo>::TrafoSupported(PTcCncTrafoParameter p, bool fwd)

{

...

  /* 3 axes linear MCS positions,
     modulo handling for the 4th axis */

  p->mcs_modulo[0] = EcCnc_McsModulo_None

  p->mcs_modulo[1] = EcCnc_McsModulo_None

  p->mcs_modulo[2] = EcCnc_McsModulo_None

  p->mcs_modulo[3] = EcCnc_McsModulo_180_180

  /* 2 axes linear ACS positions,
     modulo handling for 2 axes */

  p->acs_modulo[0] = EcCnc_AcsModulo_None

  p->acs_modulo[1] = EcCnc_AcsModulo_180_180

  p->acs_modulo[2] = EcCnc_AcsModulo_0_360

  p->acs_modulo[3] = EcCnc_AcsModulo_None

}