Axes Control

Last modified by writer on 2023/09/12 16:26

number AxisGetPos(number axisId)

Getting the current working coordinate of the specified axis.

Options:

  • number axisId – axis number, an integer from 0 to 8 (one of the constants defined in the Axes list can be passed as this parameter).

Return value:

  • value of the current working coordinate of the specified axis.
number AxisGetMachinePos(number axisId)

Getting the current machine coordinate of the specified axis.

Options:

  • number axisId – axis number, an integer from 0 to 8 (one of the constants defined in the Axes list can be passed as this parameter).

Return value:

  • value of the current machine coordinate of the specified axis.
number GetCurFeedrate()

Getting the current speed of movement.

Return value:

  • the module of the velocity vector in XYZ space.
void SetFeedrate(number value)

Setting the speed of movement.

Options:

  • number value –  the desired speed along the trajectory (equivalent to the parameter F in the G-code).
number GetFeedrateOverridePercent()

Getting the percentage of overriding the current speed of movement.

Return value:

  • percentage of the actual speed of movement from the set.
number GetGCodeFeedrate()

Getting the speed of movement specified in the G-code.

Return value:

  • movement speed specified in the G-code.
void AxisZeroPos(number axisId)

Zeroing the current working coordinate of the specified axis.

Options:

  • number axisId – axis number, an integer from 0 to 8 (one of the constants defined in the Axes list can be passed as this parameter).
bool UseSafeZ()

Allows you to check whether climbing to a safe height is allowed in the parameters of the milling mode.

Return value:

  • true – climbing to a safe height is allowed;
  • false – climbing to a safe height is prohibited.
number GetGeneralSafeZ()

Getting the safe height specified in the parameters of the milling mode.

Return value:

  • safe height of single crossings, mm.
string GetCurrentDistanceMode()

Getting the current positioning mode.

Return value:

  • one of the constants: Abs – for absolute positioning (G90), Inc – for incremental positioning (G91).
void PushCurrentDistanceMode()

Command to save the current positioning mode. Returned the system to the saving state after macros completing.

number GetCurrentMotionMode()

Getting the current modal mode of movements (G0, G1, G2, G81 etc.).

Return value:

  • an integer corresponding to the current modal mode of movements; can be passed as a parameter to the SetCurrentMotionMode(number motionMode).
void SetCurrentMotionMode(number motionMode)

Setting the current modal mode of movements (G0, G1, G2, G81 etc.).

Options:

  • number motionMode – an integer corresponding to the set modal mode of movements; as this parameter, the value obtained when calling the GetCurrentMotionMode() function can be passed.
void PushCurrentMotionMode()

Command to save the current modal mode of movements. Returned the system to the saving state after macros completing.

void MotorEnable(number motorId)

Changes the motor state of the specified index to "motor active" (motor index starts at 0).

Options:

  • number motorId – motor number to enable.
void MotorDisable(number motorId)

Changes the motor state of the specified index to "motor inactive" (motor index starts at 0).

Options:

  • number motorId – motor number to disable.
void SwitchMotors(number motorIdToDisable, number motorIdToEnable)

Allows to perform dynamic switching of an active motor from several motors linked to an axis (motor index starts at 0).

Options:

  • numberIdToDisable – motor number to disable.
  • numberIdToEnable – motor number to enable.
number GetActiveMotors()

Allows to get the bitmask of the active motor.

Return value:

  • bitmask of the active motor.
number GetSoftLimitLow(number axisId)

Getting the machine coordinate of limit low specified in the Axis Soft Limits Settings for the specified axis.

Options:

  • number axisId – axis number, an integer from 0 to 8 (one of the constants defined in the Axes list can be passed as this parameter).

Return value:

  • the machine coord of limit low specified in the Axis Soft Limits Settings for the specified axis.
number GetSoftLimitHigh(number axisId)

Getting the machine coordinate of limit high specified in the Axis Soft Limits Settings for the specified axis.

Options:

  • number axisId – axis number, an integer from 0 to 8 (one of the constants defined in the Axes list can be passed as this parameter).

Return value:

  • the machine coord of limit high specified in the Axis Soft Limits Settings for the specified axis.
number GetGcodeBoundMin(number axisId)

Getting the minimum machine coordinate of the bounds along a given axis.

Options:

  • number axisId – axis number, an integer from 0 to 8 (one of the constants defined in the Axes list can be passed as this parameter).

Return value:

  • minimum machine coordinate of the bounds along a given axis.
number GetGcodeBoundMax(number axisId)

Getting the maximum machine coordinate of the bounds along a given axis.

Options:

  • number axisId – axis number, an integer from 0 to 8 (one of the constants defined in the Axes list can be passed as this parameter).

Return value:

  • maximum machine coordinate of the bounds along a given axis.
number GetGcodeBoundMaxWithoutTraverse(number axisId)

Getting the maximum machine coordinate of the bounds along a given axis without traverse.

Options:

  • number axisId – axis number, an integer from 0 to 8 (one of the constants defined in the Axes list can be passed as this parameter).

Return value:

  • maximum machine coordinate of the bounds along a given axis.
number GetGcodeBoundMinWithoutTraverse(number axisId)

Getting the minimum machine coordinate of the bounds along a given axis without traverse.

Options:

  • number axisId – axis number, an integer from 0 to 8 (one of the constants defined in the Axes list can be passed as this parameter).

Return value:

  • minimum machine coordinate of the bounds along a given axis.
bool GcodeBoundsExist()

Allows you to check if the bouds of the G-code loaded into the program exist.

Return value:

  • true – if the G-code loaded has bounds.
bool GcodeBoundsWithoutTraverseExist()

Allows you to check if the bouds without traverse of the G-code loaded into the program exist.

Return value:

  • true – if the G-code loaded has bounds without traverse.
number GetG5xIndex()

Getting the index of selected coordinate system.

Return value:

  • an integer indicating the selected coordinate system in accordance with the lookup table CoordSystems.
number GetExternalRotation()

Getting the current coordinate system rotation angle.

Return value:

  • coordinate system rotation angle value.
Axes (axis identifiers)
  • X;
  • Y;
  • Z;
  • A;
  • B;
  • C;
  • U;
  • V;
  • W.
CoordSystems (coordinate systems)
1G54
2G55
3G56
4G57
5G58
6G59
7G59.1
8G59.2
9G59.3