Axis Control

Last modified by writer on 2022/11/03 14:06

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 Axis 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 Axis 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.

number GetGeneralProbeFeed()

Getting the material search speed specified in the parameters of the milling mode.

Return value:

  • material search speed, mm/min.

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 Axis 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.

number GetGeneralTipHeight()

Obtaining a correction for the height of the probing sensor specified in the parameters of the milling mode.

Return value:

  • correction for the height of the probe probe, mm (default value: 0).

number GetGeneralTipDiam()

Obtaining a diameter of the stylus tip during horizontal probing specified in the parameters of the milling mode.

Return value:

  • stylus tip diameter, mm (default value: 0).

string GetCurrentDistanceMode()

Getting the current positioning mode.

Return value:

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

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.

number GetJogOverridePercent(void)

Getting the percentage of overriding the current speed of jogs.

Return value:

  • override percentage of jog speed.

void SetJogOverridePercent(number value)

Setting the percentage of overriding the current speed of jogs.

Options:

  • number value – percentage of the actual speed of jog from the specified.

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(void)

Allows to get the bitmask of the active motor.

Return value:

  • bitmask of the active motor.

bool UseProbingPosition()

Allows you to check if the XY probe position is enabled in the settings.

Return value:

  • true – if probe position coords specified.

number GetProbingPosition(number axisId)

Getting the machine coordinate of the probing sensor along the specified axis.

Options:

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

Return value:

  • the machine coord of probing sensor along the specified axis.

number GetSensorType()

Getting the type of probing sensor specified in the probing settings.

Return value:

  • an integer corresponding to the probe type.

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 Axis 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 Axis 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 Axis 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 Axis 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 Axis 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 Axis 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.

Axis (axis identifiers​​​​​​​)

  • X;
  • Y;
  • Z;
  • A;
  • B;
  • C;
  • U;
  • V;
  • W.