Mach Modules Documentation
Lua Module API Documentation
Loading...
Searching...
No Matches
GrinderCenterlessGUIModuleV02.lua File Reference

Go to the source code of this file.

Functions

GrinderCenterlessGUIModuleV02 MachineFeedHold ()
 Handle machine feed hold behavior based on configured operator panel.
GrinderCenterlessGUIModuleV02 IsMSTAndDryRunActive ()
 Check whether MST Lock (Setup Run) and/or Dry Run modes are active and prompt user to continue.
GrinderCenterlessGUIModuleV02 MSTLockToggleBtn ()
 Toggle the MST (Setup Run) lock state on or off.

Function Documentation

◆ IsMSTAndDryRunActive()

GrinderCenterlessGUIModuleV02 IsMSTAndDryRunActive ( )

Check whether MST Lock (Setup Run) and/or Dry Run modes are active and prompt user to continue.

Reads the MSTLock and DryRun OEM register values to determine which special run modes are currently active. If the current G-code line number is >= 1 and single block mode is on, the function returns true immediately without prompting. If either or both modes are active, a combined warning message is constructed and presented to the operator via a CycleStartDialog prompt. If the operator is on the "Grind Wheel" or "Regulating Wheel" operation tab while MSTLock is active, an additional notice is appended indicating that operations such as Dress Comp will be disabled.

Returns
(boolean|nil) True if the operator confirms continuation or no warning is needed, false or nil on error
(boolean) Success flag - true if operation completed successfully
(string) Status message describing the outcome or the error from w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ MachineFeedHold()

GrinderCenterlessGUIModuleV02 MachineFeedHold ( )

Handle machine feed hold behavior based on configured operator panel.

Checks the configured operator panels to determine feed hold behavior. If the operator panel part number "X15-14-23" is detected, the function returns true to indicate that the default Mach4 feed hold behavior should be used. Otherwise, it triggers an emergency retract via m.screen.EmergencyRetract() (if available) and returns false to suppress default feed hold behavior.

Returns
(boolean) True if default feed hold should proceed, false if emergency retract was performed instead
(boolean) Success flag - true if operation completed successfully
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ MSTLockToggleBtn()

GrinderCenterlessGUIModuleV02 MSTLockToggleBtn ( )

Toggle the MST (Setup Run) lock state on or off.

Logs the button press to the operator log, then reads the current MSTLock OEM register value. If MSTLock is currently "Yes", it disables it by setting the register to "No". If MSTLock is currently "No", it will only enable it (set to "Yes") if the machine is in IDLE state, and will also disable the InFeed cycle repeat. If the machine is not idle, the toggle is canceled and a message is written to the operator log.

Returns
(nil) No meaningful primary return value
(boolean) Success flag - true if operation completed successfully
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03