|
Mach Modules Documentation
Lua Module API Documentation
|
Go to the source code of this file.
Functions | |
| GrinderODIDGUIModule | MachineCycleStart () |
| Handle a machine cycle start event for the OD/ID grinder. | |
| GrinderODIDGUIModule | MachineFeedHold () |
| Handle a machine feedhold event for the OD/ID grinder. | |
| GrinderODIDGUIModule | MachineCycleStop () |
| Handle a machine cycle stop event for the OD/ID grinder. | |
| GrinderODIDGUIModule | StopHandwheelInfeedCycleWait () |
| Stop the handwheel infeed cycle immediately and wait for it to fully end. | |
| GrinderODIDGUIModule | WaitForHandwheelInfeedCycleEnd () |
| Wait for the handwheel infeed cycle to fully end, with reentrancy protection. | |
| GrinderODIDGUIModule | IsHandwheelInfeedStopping () |
| Check whether the handwheel infeed cycle is in the process of stopping. | |
| GrinderODIDGUIModule | IsHandwheelInfeedActive () |
| Check whether the handwheel infeed cycle is currently active. | |
| GrinderODIDGUIModule | IsFeedholdHandwheelInfeedCycleActive () |
| Check whether the handwheel infeed feedhold cycle is currently active. | |
| GrinderODIDGUIModule | StartHandwheelInfeedCycle (grinderdata) |
| Start the handwheel infeed (G288) reciprocating cycle with optional grinder data. | |
| GrinderODIDGUIModule | StopHandwheelInfeedCycleAtA () |
| Stop the handwheel infeed cycle after the axis reaches position A. | |
| GrinderODIDGUIModule | StopHandwheelInfeedCycleAtB () |
| Stop the handwheel infeed cycle after the axis reaches position B. | |
| GrinderODIDGUIModule | StopHandwheelInfeedMidCycle () |
| Stop the handwheel infeed cycle at the midpoint of the current swing. | |
| GrinderODIDGUIModule | StopHandwheelInfeedCycle (stop_end) |
| Stop the handwheel infeed cycle at a specified end point. | |
| GrinderODIDGUIModule | StartFeedholdHandwheelInfeedCycle () |
| Initiate a feedhold on the active handwheel infeed cycle. | |
| GrinderODIDGUIModule | StopFeedholdHandwheelInfeedCycle (restart) |
| Stop the feedhold handwheel infeed cycle and optionally restart the main cycle. | |
| GrinderODIDGUIModule | InhibitJogOnNonG88Axes () |
| Inhibit jogging on all non-G88 (non-Z) axes during a handwheel infeed cycle. | |
| GrinderODIDGUIModule | ReleaseInhibitJogOnNonG88Axes () |
| Release jog inhibit on all non-G88 (non-Z) axes. | |
| GrinderODIDGUIModule | CycleStopRestoreGCodeLineNum (gcodeline) |
| Restore the G-code line number after a cycle stop event. | |
| GrinderODIDGUIModule | MachinePreFeedHoldRetract () |
| Determine whether a pre-feedhold retract should proceed based on the RetractEnabled OEM parameter. | |
| GrinderODIDGUIModule CycleStopRestoreGCodeLineNum | ( | gcodeline | ) |
Restore the G-code line number after a cycle stop event.
This function is a no-op stub for the OD/ID grinder machine type. On other grinder variants, this function would restore the G-code line number to a saved position after a cycle stop. For this grinder, no restoration is needed.
| gcodeline | (number) The G-code line number to restore (unused in this implementation) |
| GrinderODIDGUIModule InhibitJogOnNonG88Axes | ( | ) |
Inhibit jogging on all non-G88 (non-Z) axes during a handwheel infeed cycle.
Iterates from Y_AXIS to C_AXIS and applies a jog inhibit to each axis using w.InhibitJogOnAxis(). This prevents unintended axis movement on axes not controlled by the G88 handwheel infeed cycle while it is active.
| GrinderODIDGUIModule IsFeedholdHandwheelInfeedCycleActive | ( | ) |
Check whether the handwheel infeed feedhold cycle is currently active.
Reads the 'HandwheelInfeedFeedHoldActive' OEM parameter boolean value to determine if a feedhold of the handwheel infeed cycle is in progress.
| GrinderODIDGUIModule IsHandwheelInfeedActive | ( | ) |
Check whether the handwheel infeed cycle is currently active.
Reads the 'HandwheelInfeedActive' OEM parameter boolean value to determine if a G288 handwheel infeed grind cycle is currently running.
| GrinderODIDGUIModule IsHandwheelInfeedStopping | ( | ) |
Check whether the handwheel infeed cycle is in the process of stopping.
Queries the Z-axis reciprocating axis object to determine if a stop has been requested but motion has not yet fully ceased.
| GrinderODIDGUIModule MachineCycleStart | ( | ) |
Handle a machine cycle start event for the OD/ID grinder.
This function manages cycle start behavior when a G288 handwheel infeed cycle may be active. The logic proceeds as follows:
| GrinderODIDGUIModule MachineCycleStop | ( | ) |
Handle a machine cycle stop event for the OD/ID grinder.
Calls StopHandwheelInfeedCycleWait() to immediately halt any active handwheel infeed cycle and block until it has fully ended before returning.
| GrinderODIDGUIModule MachineFeedHold | ( | ) |
Handle a machine feedhold event for the OD/ID grinder.
Checks whether the handwheel infeed cycle is active. If it is and it is not already stopping, initiates a feedhold on the handwheel infeed cycle via StartFeedholdHandwheelInfeedCycle() and returns false to indicate the feedhold was handled internally. If the cycle is not active, returns true to allow the standard feedhold sequence to proceed.
| GrinderODIDGUIModule MachinePreFeedHoldRetract | ( | ) |
Determine whether a pre-feedhold retract should proceed based on the RetractEnabled OEM parameter.
Reads the 'RetractEnabled' OEM parameter to decide whether a retract motion should occur before feedhold. If retract is not enabled, it calls m.CycleStopBtn() and returns false to indicate the caller should not proceed with the retract. If retract is enabled, returns true to allow the caller to continue with the retract sequence.
| GrinderODIDGUIModule ReleaseInhibitJogOnNonG88Axes | ( | ) |
Release jog inhibit on all non-G88 (non-Z) axes.
Iterates from Y_AXIS to C_AXIS and releases the jog inhibit on each axis using w.ReleaseInhibitJogOnAxis(). This is the counterpart to InhibitJogOnNonG88Axes() and should be called after a handwheel infeed cycle ends to restore normal jogging capability.
| GrinderODIDGUIModule StartFeedholdHandwheelInfeedCycle | ( | ) |
Initiate a feedhold on the active handwheel infeed cycle.
Sets the 'HandwheelInfeedFeedHoldActive' OEM parameter to true, then stops the current handwheel infeed cycle and waits for it to fully end before returning. This is called during a machine feedhold event when a handwheel infeed cycle is running.
| GrinderODIDGUIModule StartHandwheelInfeedCycle | ( | grinderdata | ) |
Start the handwheel infeed (G288) reciprocating cycle with optional grinder data.
Inhibits jogging on all non-G88 axes, then optionally configures the Z-axis reciprocating axis with positions, dwell times (converted from seconds to milliseconds), and feedrates from the provided grinderdata table before starting the cycle. If grinderdata is nil, the cycle starts with previously configured parameters.
| grinderdata | (table|nil) Optional table containing swing configuration with keys:
|
| GrinderODIDGUIModule StopFeedholdHandwheelInfeedCycle | ( | restart | ) |
Stop the feedhold handwheel infeed cycle and optionally restart the main cycle.
Clears the 'HandwheelInfeedFeedHoldActive' OEM parameter. If restart is true (the default), calls m.StartHandwheelInfeedCycle() to resume the handwheel infeed cycle before clearing the feedhold flag. If restart is false or nil defaults to true, the cycle is not restarted.
| restart | (boolean|nil) If true or nil, restart the handwheel infeed cycle after stopping feedhold. If false, stop without restarting |
| GrinderODIDGUIModule StopHandwheelInfeedCycle | ( | stop_end | ) |
Stop the handwheel infeed cycle at a specified end point.
Checks whether the Z-axis reciprocating cycle is currently running or in feedhold, then issues the appropriate stop command based on the stop_end argument. Valid stop positions are "A" (stop at position A), "B" (stop at position B), "Mid" (stop mid-cycle), or any other value (immediate stop). After stopping, releases the jog inhibit on non-G88 axes.
| stop_end | (string) The stop position: "A", "B", "Mid", or any other value for immediate stop |
| GrinderODIDGUIModule StopHandwheelInfeedCycleAtA | ( | ) |
Stop the handwheel infeed cycle after the axis reaches position A.
Convenience wrapper that calls StopHandwheelInfeedCycle("A") to request that the Z-axis reciprocating cycle complete its current swing and stop when it arrives at position A.
| GrinderODIDGUIModule StopHandwheelInfeedCycleAtB | ( | ) |
Stop the handwheel infeed cycle after the axis reaches position B.
Convenience wrapper that calls StopHandwheelInfeedCycle("B") to request that the Z-axis reciprocating cycle complete its current swing and stop when it arrives at position B.
| GrinderODIDGUIModule StopHandwheelInfeedCycleWait | ( | ) |
Stop the handwheel infeed cycle immediately and wait for it to fully end.
Clears the 'HandwheelInfeedFeedHoldActive' OEM parameter, then checks if the Z-axis reciprocating cycle is running. If it is, calls StopHandwheelInfeedMidCycle() to halt motion and then waits for the cycle to finish via WaitForHandwheelInfeedCycleEnd().
| GrinderODIDGUIModule StopHandwheelInfeedMidCycle | ( | ) |
Stop the handwheel infeed cycle at the midpoint of the current swing.
Convenience wrapper that calls StopHandwheelInfeedCycle("Mid") to halt the Z-axis reciprocating cycle at whatever point it is currently at, without waiting for position A or B to be reached.
| GrinderODIDGUIModule WaitForHandwheelInfeedCycleEnd | ( | ) |
Wait for the handwheel infeed cycle to fully end, with reentrancy protection.
Uses w.FuncTracing to prevent concurrent calls. If the wait is already in progress, returns immediately with an error. Otherwise, delegates to m._WaitForHandwheelInfeedCycleEnd() via w.pcall() for protected execution. The tracing flag is always cleared after the call, even if an error occurs.