|
Mach Modules Documentation
Lua Module API Documentation
|
Go to the source code of this file.
Functions | |
| GrinderODIDMCodeModule | GetCurrentWheelHeadNumber () |
| Retrieve the currently active wheel head number from OEM parameters. | |
| GrinderODIDMCodeModule | FlaggingCalibration (AxisID, MachineCoordProbedPosition, CalibratePostion) |
| Calibrate the active flagging tool offset for a given axis using a probed machine position. | |
| GrinderODIDMCodeModule | FlaggingFixtureCalibration (AxisID, ProbedPosition, CalibratePostion) |
| Calibrate fixture offset using active flagging probe position for a given axis. | |
| GrinderODIDMCodeModule FlaggingCalibration | ( | AxisID | , |
| MachineCoordProbedPosition | , | ||
| CalibratePostion | ) |
Calibrate the active flagging tool offset for a given axis using a probed machine position.
Computes the new tool length or diameter offset for the current tool based on the machine coordinate of the probed position and the desired calibration target value. Behavior differs by axis:
For X_AXIS: Accounts for diameter mode (divides the measure value by 2), tool slide direction (positive or negative side), current work offset, work shift offset, and current wear offset to compute the corrected X tool offset (MTOOL_LATHE_X).
For Z_AXIS: Computes the Z tool offset (MTOOL_LATHE_Z) by subtracting the work offset, work shift, and calibration position from the machine-coordinate probed position.
After computing the new offset, the function applies it via mc.mcToolSetData, sets the active offset index to the current tool, saves the tool file, and logs the result to both the system log and the operator log.
| AxisID | (number) The Mach4 axis constant (mc.X_AXIS or mc.Z_AXIS) specifying which axis to calibrate |
| MachineCoordProbedPosition | (number) The machine coordinate position recorded at the probe strike |
| CalibratePostion | (number) The known part dimension or reference position used to calculate the offset correction |
| GrinderODIDMCodeModule FlaggingFixtureCalibration | ( | AxisID | , |
| ProbedPosition | , | ||
| CalibratePostion | ) |
Calibrate fixture offset using active flagging probe position for a given axis.
Calculates the incremental distance between the probed position and the desired calibrate position, then applies a G10 L2 fixture offset correction via mcCntlGcodeExecuteWait. The axis letter is mapped from the Mach4 axis ID to the incremental G10 axis designator (X->U, Y->V, Z->W). The current fixture number is retrieved from the controller and adjusted relative to G54 (subtracting 53). After updating the fixture offset, the fixture table is saved to disk and the operation is logged to both the system log and the operator log.
| AxisID | (number) The Mach4 axis constant (e.g., mc.X_AXIS, mc.Y_AXIS, mc.Z_AXIS) identifying which axis fixture offset to calibrate |
| ProbedPosition | (number) The probed machine coordinate position used as the reference point |
| CalibratePostion | (number) The known calibration target position; the difference from ProbedPosition determines the fixture offset correction to apply |
| GrinderODIDMCodeModule GetCurrentWheelHeadNumber | ( | ) |
Retrieve the currently active wheel head number from OEM parameters.
| None |