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

Go to the source code of this file.

Functions

GrinderODIDScreenV02 MachineScreenLoadScript ()
 Execute all initialization logic when the ODID Grinder machine screen is loaded.
GrinderODIDScreenV02 MachineScreenPLCScript ()
 Execute all real-time PLC script update functions for the ODID Grinder screen.
GrinderODIDScreenV02 MachineScreenLowPriorityLoop ()
 Execute all low-priority periodic screen update functions for the ODID Grinder.
GrinderODIDScreenV02 UpdateG88ReciprocatingAxis ()
 Update the G288 handwheel infeed reciprocating axis state and feed-hold notification.
GrinderODIDScreenV02 MachineScreenStartupScript ()
 Execute the machine screen startup script for the ODID Grinder.
GrinderODIDScreenV02 InitializeAxisPositionGroup ()
 Initialize the axis position group layout and DRO visibility for the grinder screen.
GrinderODIDScreenV02 IsRetracting ()
 Report whether the machine is currently executing a retraction sequence.
GrinderODIDScreenV02 SetRetracting (new_state)
 Set the retracting interlock state and log the change.
GrinderODIDScreenV02 MoveToEmergencyRetractPosition (CustomMode)
 Move the machine to the emergency retract position using a protected retraction sequence.
GrinderODIDScreenV02 MachinePreCycleStop ()
 Execute pre-cycle-stop checks and save the current grind state.
GrinderODIDScreenV02 MachineCycleStopFinal (CustomMode)
 Execute the final cycle stop sequence including optional safety retract and G-code rewind.
GrinderODIDScreenV02 MoveToCycleStopRetractPosition ()
 Move the machine to the cycle stop retract position using a protected call.
GrinderODIDScreenV02 RewindGCodeOnCycleStop ()
 Rewind the G-code file to the beginning if the RewindGCode OEM parameter is enabled.
GrinderODIDScreenV02 UpdateCurrentToolDescription ()
 Update the current tool description label on the grinder screen.
GrinderODIDScreenV02 IsGCodeDisplayExtraLargeEnabled ()
 Report whether the extra-large G-code display mode is enabled.
GrinderODIDScreenV02 MachineCycleStartFinal ()
 Perform final cycle start checks before allowing G-code execution to begin.
GrinderODIDScreenV02 CalibrateActiveFlagWizard ()
 Launch a multi-step wizard to calibrate the active flagging probe.
GrinderODIDScreenV02 GapControlInitialize ()
 Initialize gap control outputs and set the initial gap control mode.
GrinderODIDScreenV02 GapControlEnable ()
 Enable gap control if the GapControlEnabled OEM parameter is set to "Yes".
GrinderODIDScreenV02 GapControlDisable ()
 Disable gap control by setting parameter 1900 to zero.
GrinderODIDScreenV02 GapControlToggle ()
 Toggle gap control between enabled and disabled states.
GrinderODIDScreenV02 IsGapControlEnabled ()
 Check whether gap control is currently enabled.
GrinderODIDScreenV02 CrashDetectionInitialize ()
 Initialize the crash detection system, creating required I/O points and GMS alarm.
GrinderODIDScreenV02 CrashDetectionResetCrash ()
 Reset the crash detection latch and optionally pulse the reset output signal.
GrinderODIDScreenV02 MachineReset ()
 Perform machine reset actions for the ODID Grinder screen.
GrinderODIDScreenV02 IsCrashDetectionCrashed ()
 Check whether the crash detection input signal is currently in a crashed state.
GrinderODIDScreenV02 IsCrashDetectionInhibited ()
 Determine whether crash detection is currently inhibited based on inputs and velocity limits.
GrinderODIDScreenV02 UpdateCrashDetection ()
 Poll crash detection state and trigger crash response if conditions are met.
GrinderODIDScreenV02 CrashDetected ()
 Execute the crash detected response sequence with re-entrancy protection.
GrinderODIDScreenV02 CrashDetectedFeedHoldNotice ()
 Create or display a GMS notice dialog when a crash causes a feed hold.
GrinderODIDScreenV02 CrashDetectedStopNotice ()
 Create or display a GMS notice dialog when a crash causes a cycle stop.
GrinderODIDScreenV02 CrashDetectedAlarm ()
 Create or display a GMS alarm notification for an acoustic crash detection event.
GrinderODIDScreenV02 CrashDetectedMoveToSafety ()
 Execute a crash-detected move-to-safety sequence, stopping motion and retracting to safety position.
GrinderODIDScreenV02 FlagInitialize ()
 Initialize the active flag hardware via the auxiliary module.
GrinderODIDScreenV02 FlagCalibration ()
 Launch the active flag calibration wizard.
GrinderODIDScreenV02 ExtendFlag ()
 Extend the active flag slide.
GrinderODIDScreenV02 RetractFlag ()
 Retract the active flag slide.
GrinderODIDScreenV02 ExtendFlagToggle ()
 Toggle the active flag slide between the extended and retracted positions.
GrinderODIDScreenV02 IsPartsPerDressCycleEnabled ()
 Report whether the Parts Per Dress Cycle feature is enabled for this machine.
GrinderODIDScreenV02 ResetPartCorrectionOffsets ()
 Reset the part correction offset pound variables to zero.
GrinderODIDScreenV02 InitializeMeasureingDevices ()
 Initialize the measuring device UI elements for the grinder screen.
GrinderODIDScreenV02 UpdateMeasureingDevices ()
 Update the active flag slide button colors on the grinder screen.
GrinderODIDScreenV02 GetWheelAttributes ()
 Retrieve the current grinding wheel attributes from the auxiliary module.
GrinderODIDScreenV02 SpindleStateChanged ()
 Handle spindle state change events for the grinder screen.
GrinderODIDScreenV02 ResetSetupInterlocks ()
 Reset all setup interlock bits for the current tool.
GrinderODIDScreenV02 CheckSetupInterlocks ()
 Check all setup interlocks and prompt the operator to continue if any are incomplete.
GrinderODIDScreenV02 SetFlaggingInterlock ()
 Set the flagging setup interlock bit for the current tool.
GrinderODIDScreenV02 ReSetFlaggingInterlock ()
 Clear the flagging setup interlock bit for the current tool.
GrinderODIDScreenV02 IsFlaggingInterlockSet ()
 Check whether the flagging setup interlock is set for the current tool.
GrinderODIDScreenV02 SetXCalibrationInterlock ()
 Set the X-axis calibration setup interlock bit for the current tool.
GrinderODIDScreenV02 ReSetXCalibrationInterlock ()
 Clear the X-axis calibration setup interlock bit for the current tool.
GrinderODIDScreenV02 IsXCalibrationInterlockSet ()
 Check whether the X-axis calibration setup interlock is set for the current tool.
GrinderODIDScreenV02 SetZCalibrationInterlock ()
 Set the Z-axis calibration setup interlock bit for the current tool.
GrinderODIDScreenV02 ReSetZCalibrationInterlock ()
 Clear the Z-axis calibration setup interlock bit for the current tool.
GrinderODIDScreenV02 IsZCalibrationInterlockSet ()
 Check whether the Z-axis calibration setup interlock is set for the current tool.
GrinderODIDScreenV02 SetChuckFaceInterlock ()
 Set the Chuck Face setup interlock bit for the current tool.
GrinderODIDScreenV02 ReSetChuckFaceInterlock ()
 Clear the Chuck Face setup interlock bit for the current tool.
GrinderODIDScreenV02 IsChuckFaceInterlockSet ()
 Check whether the Chuck Face setup interlock is set for the current tool.
GrinderODIDScreenV02 GetSetupInterlockBit (BitIdx)
 Get the value of a specific setup interlock bit from the current tool's tool table field.
GrinderODIDScreenV02 SetSetupInterlockBit (BitIdx, value)
 Set a specific setup interlock bit in the current tool's SetupInterlocks tool table field.
GrinderODIDScreenV02 CYCLE Initialize ()
 Initialize the ODID Grinder cycle state machine, type definitions, and pass tracking.
cyc UpdateCombLabels (dressing_passes, _type, type_passes)
 Update the combined cycle label screen objects with current state and type descriptions.
cyc STATE GetNumber ()
 Get the current cycle state number from the configured pound variable.
GrinderODIDScreenV02 InitializeCycleSettings ()
 Initialize grinder cycle settings with default values for pound variables.
GrinderODIDScreenV02 InitializeToolTableFields ()
 Initialize the custom tool table user fields required for the ODID Grinder.
GrinderODIDScreenV02 MachineScreenUnloadScript ()
 Execute cleanup actions when the grinder screen is unloaded.
GrinderODIDScreenV02 LaunchLatheCannedCycles ()
 Launch the Lathe Canned Cycles wizard from the grinder screen.
GrinderODIDScreenV02 MachineCreatePreCannedCommands ()
 Register pre-canned commands for the ODID Grinder screen including gap control, crash detection, flagging, and setup interlocks.

Function Documentation

◆ CalibrateActiveFlagWizard()

GrinderODIDScreenV02 CalibrateActiveFlagWizard ( )

Launch a multi-step wizard to calibrate the active flagging probe.

Only runs when the machine is in IDLE state. If the wizard is already open (m.CalibrateFlagUI is not nil), raises the existing window instead of creating a new one. The wizard guides the operator through four steps:

  1. Move to the swivel position and extend the flagging probe via G-code
  2. Jog to a part shoulder and enter the Z shoulder position
  3. Select the probe search direction (Z- or Z+)
  4. Run the G230 double-touch calibration routine and optionally set the flagging interlock Uses w.Formatting.GetStandardWizard() to build the wizard UI. On completion, returns a success status; on cancellation, returns an error status.
    Returns
    (boolean|nil) True if the wizard completed successfully, false if cancelled, nil on error
    (boolean|nil) True if completed, false if cancelled
    (string) Status message from w.FunctionCompleted() or w.FunctionError()
    Note
    Documentation generated by AI on 2026-03-03

◆ CheckSetupInterlocks()

GrinderODIDScreenV02 CheckSetupInterlocks ( )

Check all setup interlocks and prompt the operator to continue if any are incomplete.

Evaluates all four setup interlocks (Flagging, X Wheel to Part Calibration, Z Wheel to Part Calibration, and Wheel Face to Chuck Face Calibration) and builds a message listing any incomplete items. If any interlock is not set, displays a Yes/No dialog asking whether to continue. Returns false if the operator chooses not to continue, true if all interlocks are satisfied or the operator elects to proceed anyway.

Returns
(boolean|nil) True if cycle start should proceed, false if operator cancelled, nil on dialog error
(boolean|nil) Success flag - false on error (only present on error path)
(string|nil) Error message from w.FunctionError() on error (only present on error path)
Note
Documentation generated by AI on 2026-03-03

◆ CrashDetected()

GrinderODIDScreenV02 CrashDetected ( )

Execute the crash detected response sequence with re-entrancy protection.

Checks the FuncTracing flag for "m.screen.CrashDetected" to prevent re-entrant calls. If a crash detection sequence is already in progress, returns immediately with an error. Otherwise sets the tracing flag, calls m.screen._CrashDetected() via w.pcall() for protected execution, clears the tracing flag, and returns the result. If the protected call fails, returns a formatted error message via w.FunctionError().

Returns
(nil) No meaningful primary return value
(boolean) Success flag - true if crash sequence completed, false if already in progress or error
(string) Status message describing the outcome
Note
Documentation generated by AI on 2026-03-03

◆ CrashDetectedAlarm()

GrinderODIDScreenV02 CrashDetectedAlarm ( )

Create or display a GMS alarm notification for an acoustic crash detection event.

Checks if a GMS dialog with the title "Acoustic Crash Detected!!" already exists. If not, creates a new GMS system global message of class "Alarm" that opens a notification and disables the machine (Enable Level 2 = 0) when the machine-enabled signal is active. The alarm auto-deletes after execution (DeleteAfterExecution = 1).

Returns
(nil) No meaningful primary return value
(boolean) Success flag - true after the alarm is created or already exists
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ CrashDetectedFeedHoldNotice()

GrinderODIDScreenV02 CrashDetectedFeedHoldNotice ( )

Create or display a GMS notice dialog when a crash causes a feed hold.

Checks if a GMS dialog with the title "Feedhold due to Crash Detected!!" already exists. If not, creates a new GMS dialog of class "Notice" with an extra line informing the operator that the control is in feed hold state and instructing them to press 'Reset Crash' then 'Cycle Start' to continue.

Returns
(nil) No meaningful primary return value
(boolean) Success flag - true after the dialog is created or already exists
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ CrashDetectedMoveToSafety()

GrinderODIDScreenV02 CrashDetectedMoveToSafety ( )

Execute a crash-detected move-to-safety sequence, stopping motion and retracting to safety position.

Handles the full crash response sequence when the CrashDetectionAction is set to "Move To Safety". Inhibits jogging on coordinated axes, then checks the current machine state:

  • If homing: disables the machine and shows a warning
  • If in retract: disables the machine and shows a warning
  • If a tool change is in progress: disables the machine and shows a warning
  • Otherwise: stops the G288 handwheel infeed cycle, issues a cycle stop, waits for IDLE state, then calls MoveToEmergencyRetractPosition(0) to move to the safety position If the emergency retract fails, triggers a crash alarm via CrashDetectedAlarm(). Releases the jog inhibit on coordinated axes before returning.
    Returns
    (nil) No meaningful primary return value
    (boolean) Success flag - true if sequence completed, false if wait for idle timed out
    (string) Status message from w.FunctionCompleted() or w.FunctionError()
    Warning
    This function stops machine motion and may disable the machine. Do not call outside of a crash handler.
    Note
    Documentation generated by AI on 2026-03-03

◆ CrashDetectedStopNotice()

GrinderODIDScreenV02 CrashDetectedStopNotice ( )

Create or display a GMS notice dialog when a crash causes a cycle stop.

Checks if a GMS dialog with the title "Stopping due to Crash Detected!!" already exists. If not, creates a new GMS dialog of class "Notice" with an extra line instructing the operator to press Reset and jog to a safe position before restarting the program. The dialog auto-deletes after execution (DeleteAfterExecution = 1).

Returns
(nil) No meaningful primary return value
(boolean) Success flag - true after the dialog is created or already exists
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ CrashDetectionInitialize()

GrinderODIDScreenV02 CrashDetectionInitialize ( )

Initialize the crash detection system, creating required I/O points and GMS alarm.

Reads the "CrashDetectionEnabled" OEM parameter and checks whether the "CrashDetectionInput" signal is mapped. If both conditions are met, creates two permanent output I/O points ("CrashDetection/InhibitActive" and "CrashDetection/CrashHandled") and initializes the CrashHandled state to false. If not enabled or not mapped, removes those I/O points and returns with an appropriate status. If the input is mapped but the parameter is disabled, returns a completed status; if the parameter is enabled but the input is not mapped, raises an error. When fully enabled, parses the CrashDetectionInput signal path and creates a GMS system global message of class "Warning" titled "Acoustic Crash Detected!!!" that triggers a notification when the crash input fires and the inhibit is not active. Sets IsCrashDetectionEnabled to true on success.

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

◆ CrashDetectionResetCrash()

GrinderODIDScreenV02 CrashDetectionResetCrash ( )

Reset the crash detection latch and optionally pulse the reset output signal.

If crash detection is enabled, clears the "CrashDetection/CrashHandled" I/O state. Then reads the CrashDetectionInput signal; if the signal is active and the "CrashDetectionResetOutput" OEM parameter is mapped, pulses the reset output high for approximately 6 seconds (via w.PleaseWaitDialog) before setting it low again. This sequence latches a hardware reset signal to the acoustic emission monitoring system.

Note
This function has no return value; errors from OEM parameter reads are silently ignored via w.FunctionError()
Documentation generated by AI on 2026-03-03

◆ ExtendFlag()

GrinderODIDScreenV02 ExtendFlag ( )

Extend the active flag slide.

Delegates to aux.SetActiveFlagSlideExtended() to command the active flag slide into the extended (measuring) position.

Note
Documentation generated by AI on 2026-03-03

◆ ExtendFlagToggle()

GrinderODIDScreenV02 ExtendFlagToggle ( )

Toggle the active flag slide between the extended and retracted positions.

Checks the current retracted state of active flag 0 via aux.IsActiveFlagSlideRetracted(). If the slide is currently retracted, calls m.screen.ExtendFlag() to extend it; otherwise calls m.screen.RetractFlag() to retract it.

Note
Documentation generated by AI on 2026-03-03

◆ FlagCalibration()

GrinderODIDScreenV02 FlagCalibration ( )

Launch the active flag calibration wizard.

Delegates to m.screen.CalibrateActiveFlagWizard() to open the multi-step flag calibration wizard UI. Returns a completed status after the wizard exits.

Returns
(nil) No meaningful primary return value
(boolean) Success flag - true after wizard completes or is dismissed
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ FlagInitialize()

GrinderODIDScreenV02 FlagInitialize ( )

Initialize the active flag hardware via the auxiliary module.

Delegates to aux.FlagInitialize() to perform hardware-level initialization of the active flagging system. Called once during machine screen startup.

Note
Documentation generated by AI on 2026-03-03

◆ GapControlDisable()

GrinderODIDScreenV02 GapControlDisable ( )

Disable gap control by setting parameter 1900 to zero.

Writes the value 0 to machine parameter 1900 to deactivate gap control.

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

◆ GapControlEnable()

GrinderODIDScreenV02 GapControlEnable ( )

Enable gap control if the GapControlEnabled OEM parameter is set to "Yes".

Reads the "GapControlEnabled" OEM parameter. If it is "Yes", sets machine parameter 1900 to 1 to activate gap control. If it is not "Yes", sets parameter 1900 to 0 and displays a warning message informing the operator that gap control is not enabled in the machine parameters.

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

◆ GapControlInitialize()

GrinderODIDScreenV02 GapControlInitialize ( )

Initialize gap control outputs and set the initial gap control mode.

Reads the "GapControlEnabled" OEM parameter. If enabled ("Yes"), calls aux.InitializeGapOutputs() and aux.SetGapControlModeGrind(true) to configure the gap control hardware outputs for grinding mode. If not enabled, sets machine parameter 1900 to 0 to ensure gap control is inactive.

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

◆ GapControlToggle()

GrinderODIDScreenV02 GapControlToggle ( )

Toggle gap control between enabled and disabled states.

Calls IsGapControlEnabled() to determine the current state. If gap control is currently enabled, calls GapControlDisable(); otherwise calls GapControlEnable().

Note
Documentation generated by AI on 2026-03-03

◆ GetNumber()

cyc STATE GetNumber ( )

Get the current cycle state number from the configured pound variable.

Get the current number of remaining passes from pound variable #9082.

Reads the state pound variable (default #9080) using a protected call via w.pcall. Converts the result to a number with tonumber(). Returns 0 if the call fails or if the result cannot be converted to a number. This method is a member of the cyc.STATE table object.

Returns
(number) The current cycle state number, or 0 on error
Note
Documentation generated by AI on 2026-03-03

Reads the passes pound variable using a protected call. Returns 0 if the call fails. This method is a member of the cyc.PASSES table object.

Returns
(number) The current number of remaining passes, or 0 on error
Note
Documentation generated by AI on 2026-03-03

◆ GetSetupInterlockBit()

GrinderODIDScreenV02 GetSetupInterlockBit ( BitIdx )

Get the value of a specific setup interlock bit from the current tool's tool table field.

Reads the SetupInterlocks extended data field for the active tool pocket from the tool table and extracts the specified bit using w.GetValueBit(). Returns false if the current tool pocket number is zero (no tool loaded). Setup Interlock bit assignments: 0 = X Part, 1 = Z Part, 2 = Flagging, 3 = Chuck Face.

Parameters
BitIdx(number) The zero-based bit index to read (0=X Part, 1=Z Part, 2=Flagging, 3=Chuck Face)
Returns
(boolean) The state of the requested interlock bit, or false if no tool is loaded
Note
Documentation generated by AI on 2026-03-03

◆ GetWheelAttributes()

GrinderODIDScreenV02 GetWheelAttributes ( )

Retrieve the current grinding wheel attributes from the auxiliary module.

Delegates to aux.GetWheelAttributes() to retrieve wheel geometry and configuration data for the currently active grinding wheel.

Returns
(table) Wheel attributes table as returned by aux.GetWheelAttributes()
Note
Documentation generated by AI on 2026-03-03

◆ Initialize()

GrinderODIDScreenV02 CYCLE Initialize ( )

Initialize the ODID Grinder cycle state machine, type definitions, and pass tracking.

Sets up all cycle tracking structures used during grinding and dressing operations. Initializes the following sub-objects on GrinderODIDScreenV02.CYCLE:

  • StateV (#9080) and TypeV (#9081) pound variable references
  • cyc.STATE: Table of all known grind cycle states (Idle, Positioning, Grinding, Dressing, etc.) with associated names, descriptions, pound variable, and GetNumber() method
  • cyc.TYPE: Table of all known cycle types (dress operations, grind operations, approach positions, etc.) with GetNumber() method shared from STATE
  • cyc.PASSES: Tracks remaining passes via pound variable #9082 with GetNumber() method
  • cyc.CombLabels: List of screen objects updated with combined state/type descriptions
  • cyc:UpdateCombLabels(): Method to update screen label objects with formatted state/type text Sets the initial cycle state to Idle via CYCLE.SetStateToIdle().
    Note
    Documentation generated by AI on 2026-03-03

◆ InitializeAxisPositionGroup()

GrinderODIDScreenV02 InitializeAxisPositionGroup ( )

Initialize the axis position group layout and DRO visibility for the grinder screen.

Iterates over all coordinate axes and shows or hides each axis's screen objects (text label, position DRO, to-go DRO, load gauge, and zero button) based on whether the axis is enabled in AXIS_ENABLED. Sets font weight to 90 for all axis text labels. Configures the unit display (inch/mm) on X, Y, and Z position DROs from the UnitDisplayLeftRight profile string. Uses w.Distribute() to calculate evenly spaced DRO positions within the available panel area (rows 19 to 216), respecting a maximum size of 60 and maximum padding of 11. Positions and sizes each DRO group (axis text, position DRO, to-go DRO, zero button, and load gauge) according to the computed distribution. Calls m.screen.UpdateZeroButtons() and m.screen.InitializeHomeButtons() after layout is complete.

Note
Documentation generated by AI on 2026-03-03

◆ InitializeCycleSettings()

GrinderODIDScreenV02 InitializeCycleSettings ( )

Initialize grinder cycle settings with default values for pound variables.

Reads and validates three pound variables used for cycle behavior. If a variable is zero, out of range, or negative, it is reset to a safe default value:

  • #9260 (Relieve Amount): Default 0.01, valid range (0, 10]
  • #9261 (In-Cycle Re-position Feedrate): Default 10.0, must be > 0
  • #9262 (In-Cycle Re-position Clearance Amount): Default 0.001, valid range (0, 10]
    Returns
    (nil) No meaningful return value on success
    (boolean) Success flag - true if all variables initialized successfully
    (string) Status message from w.FunctionCompleted() or w.FunctionError()
    Note
    Documentation generated by AI on 2026-03-03

◆ InitializeMeasureingDevices()

GrinderODIDScreenV02 InitializeMeasureingDevices ( )

Initialize the measuring device UI elements for the grinder screen.

Hides the PassiveFlaggingGroup and GaugingGroup screen objects unconditionally. If the active flag is enabled (aux.IsActiveFlagEnabled(0) returns true), shows the ActiveFlaggingGroup; otherwise hides it. Called once during screen startup.

Note
Documentation generated by AI on 2026-03-03

◆ InitializeToolTableFields()

GrinderODIDScreenV02 InitializeToolTableFields ( )

Initialize the custom tool table user fields required for the ODID Grinder.

Defines and registers a comprehensive set of custom tool table fields covering wheel geometry, speed settings, safety clearances, dress positions, rotary dresser parameters, and setup interlocks. If the tool table is already initialized, the function checks whether all required fields exist and only writes defaults if any fields are missing. If the tool table is not yet initialized, a log message is written and no fields are added. Fields include:

  • Wheel geometry: Diameter, EffectiveWidth, Overhang, CornerRadius, ReliefAngle, etc.
  • Speed settings: MaxRPM, SurfaceFeetPerMin, CommandedRPM, SurfaceFeetPerMinMode
  • Safety clearances and positions: SafetyClearanceCircumference, SafetyPositionXsw, etc.
  • Dress positions: X1/Z1 through X3/Z3 DressPosition
  • Rotary dresser parameters: RotaryDresserDiameter, RotaryDresserSFM, RotaryDresserRPM, etc.
  • Setup interlocks: SetupInterlocks bitmask
    Returns
    (boolean|nil) True on success, nil on error
    (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

◆ IsChuckFaceInterlockSet()

GrinderODIDScreenV02 IsChuckFaceInterlockSet ( )

Check whether the Chuck Face setup interlock is set for the current tool.

Reads the "SetupInterlockChuckFaceEnabled" OEM register to determine if this interlock is active. If the register value is not "Yes", returns true (interlock not required). If the interlock is required, reads setup interlock bit 3 from the current tool's tool table field to determine the current interlock state.

Returns
(boolean|nil) True if the chuck face interlock is set or not required, false if not set, nil on error
(boolean|nil) Success flag - false on error (only present on error path)
(string|nil) Error message from w.FunctionError() on error (only present on error path)
Note
Documentation generated by AI on 2026-03-03

◆ IsCrashDetectionCrashed()

GrinderODIDScreenV02 IsCrashDetectionCrashed ( )

Check whether the crash detection input signal is currently in a crashed state.

If crash detection is enabled (IsCrashDetectionEnabled is true), reads the "CrashDetectionInput" OEM parameter signal via w.GetOEMParamSig() and returns its value. If crash detection is not enabled, always returns false.

Returns
(boolean) True if the crash detection input is active (crashed), false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsCrashDetectionInhibited()

GrinderODIDScreenV02 IsCrashDetectionInhibited ( )

Determine whether crash detection is currently inhibited based on inputs and velocity limits.

Evaluates multiple conditions to decide if crash detection should be suppressed:

  • If the "CrashDetectionInhibitInput" OEM parameter is mapped, reads its signal state as the base inhibit value (an external operator switch).
  • If "CrashDetectionMaxVelocity" is > 1 and not already inhibited, reads the blended velocity and inhibits if it meets or exceeds the limit.
  • If "CrashDetectionMaxVelocityX" is > 1 and not already inhibited, reads the X axis velocity and inhibits if it meets or exceeds the limit.
  • If "CrashDetectionMaxVelocityZ" is > 1 and not already inhibited, reads the Z axis velocity and inhibits if it meets or exceeds the limit. Updates the "CrashDetection/InhibitActive" I/O state with the final inhibit value before returning.
    Returns
    (boolean) True if crash detection is currently inhibited, false if it is active
    Note
    Documentation generated by AI on 2026-03-03

◆ IsFlaggingInterlockSet()

GrinderODIDScreenV02 IsFlaggingInterlockSet ( )

Check whether the flagging setup interlock is set for the current tool.

First checks if the active flag is enabled via aux.IsActiveFlagEnabled(). If flagging is not enabled, returns true (interlock not required). Then reads the "SetupInterlockFlaggingEnabled" OEM register to determine if the interlock is active. If the register value is not "Yes", returns true (interlock not required). Otherwise reads setup interlock bit 2 from the current tool's tool table field via m.screen.GetSetupInterlockBit(2).

Returns
(boolean|nil) True if the flagging interlock is set or not required, false if not set, nil on error
(boolean|nil) Success flag - false on error (only present on error path)
(string|nil) Error message from w.FunctionError() on error (only present on error path)
Note
Documentation generated by AI on 2026-03-03

◆ IsGapControlEnabled()

GrinderODIDScreenV02 IsGapControlEnabled ( )

Check whether gap control is currently enabled.

Reads the "GapControlEnabled" OEM parameter string and the cached value of parameter 1900. Returns true only if GapControlEnabled is "Yes" AND parameter 1900 equals 1.

Returns
(boolean) True if gap control is enabled and active, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsGCodeDisplayExtraLargeEnabled()

GrinderODIDScreenV02 IsGCodeDisplayExtraLargeEnabled ( )

Report whether the extra-large G-code display mode is enabled.

Always returns false for the ODID Grinder screen, indicating that the extra-large G-code display is not active.

Returns
(boolean) Always false
Note
Documentation generated by AI on 2026-03-03

◆ IsPartsPerDressCycleEnabled()

GrinderODIDScreenV02 IsPartsPerDressCycleEnabled ( )

Report whether the Parts Per Dress Cycle feature is enabled for this machine.

Always returns true for the ODID Grinder screen, indicating that the parts per dress cycle counting feature is active.

Returns
(boolean) Always true
Note
Documentation generated by AI on 2026-03-03

◆ IsRetracting()

GrinderODIDScreenV02 IsRetracting ( )

Report whether the machine is currently executing a retraction sequence.

Returns the current value of the module-level _IsRetracting flag, which is managed by SetRetracting() and used as an interlock to prevent concurrent retraction attempts.

Returns
(boolean) True if a retraction is currently in progress, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsXCalibrationInterlockSet()

GrinderODIDScreenV02 IsXCalibrationInterlockSet ( )

Check whether the X-axis calibration setup interlock is set for the current tool.

Reads setup interlock bit 0 from the current tool's tool table field to determine whether the X Wheel to Part Calibration has been performed.

Returns
(boolean) True if the X calibration interlock bit is set, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsZCalibrationInterlockSet()

GrinderODIDScreenV02 IsZCalibrationInterlockSet ( )

Check whether the Z-axis calibration setup interlock is set for the current tool.

Reads setup interlock bit 1 from the current tool's tool table field to determine whether the Z Wheel to Part Calibration has been performed.

Returns
(boolean) True if the Z calibration interlock bit is set, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ LaunchLatheCannedCycles()

GrinderODIDScreenV02 LaunchLatheCannedCycles ( )

Launch the Lathe Canned Cycles wizard from the grinder screen.

Logs the operator action, appends the Wizards directory to the package path, clears the cached module, and loads the "Lathe Canned Cycles" Lua module.

Note
Documentation generated by AI on 2026-03-03

◆ MachineCreatePreCannedCommands()

GrinderODIDScreenV02 MachineCreatePreCannedCommands ( )

Register pre-canned commands for the ODID Grinder screen including gap control, crash detection, flagging, and setup interlocks.

Creates and registers all pre-canned commands available for the ODID Grinder screen module. Commands are grouped into the following categories:

  • Gap Control: Enable, Disable, and Toggle gap control with feedback
  • Crash Detection: Reset IVIS and Crash Detection Reset commands with feedback
  • Flagging: Active flag slide extend, retract, and toggle commands (only if active flag is enabled)
  • Chuck Face Teaching: Teach work shift offsets for Z axis and set interlock
  • Setup Interlocks: Set/Reset commands for Flagging, X Part, and Z Part calibration interlocks
  • Lathe Canned Cycles: Launch the lathe canned cycles wizard Each command is assigned button labels and optional color indicators for active/inactive states.
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineCycleStartFinal()

GrinderODIDScreenV02 MachineCycleStartFinal ( )

Perform final cycle start checks before allowing G-code execution to begin.

Only executes its logic when the machine is IDLE, retract is not active, and single block mode is off. Reads the total parts count (PV_PRTST) and the PartCountOnLastDressCycle pound variable (#9087). Sets pound variable #9089 to 1 if the part count matches the last dress cycle count (indicating a dress already ran for this part), or 0 otherwise. This allows the G-code to skip a dress cycle if one was already performed. Also calls CheckSetupInterlocks() if that function is defined and M00 is not active, returning false to abort cycle start if the operator declines to proceed.

Returns
(boolean) True if cycle start should proceed, false if aborted by interlock check
(boolean) Success flag - true if completed successfully, false on pound variable error
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ MachineCycleStopFinal()

GrinderODIDScreenV02 MachineCycleStopFinal ( CustomMode )

Execute the final cycle stop sequence including optional safety retract and G-code rewind.

Reads the "MoveToSafetyPositionEnabled" OEM parameter. If enabled ("Yes"), calls MoveToEmergencyRetractPosition() with the provided CustomMode to move the machine to its safety position. Then calls RewindGCodeOnCycleStop() to optionally rewind the G-code file and CYCLE.SetStateToIdle() to reset the cycle state machine to idle.

Parameters
CustomMode(number) The retraction mode to pass to MoveToEmergencyRetractPosition(). Use 0 for standard cycle stop retract
Returns
(boolean) True - always returns success
(boolean) Success flag - false on error reading the OEM parameter
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ MachinePreCycleStop()

GrinderODIDScreenV02 MachinePreCycleStop ( )

Execute pre-cycle-stop checks and save the current grind state.

Checks if a retraction is already in progress via IsRetracting(). If so, aborts the cycle stop by returning false with an "already retracting" message, preventing a second cycle stop from interrupting an active retract sequence. Otherwise reads the current grind state from pound variable #9080 and saves it to GrindStateOnCycleStop for use by the subsequent cycle stop retract logic.

Returns
(boolean) False to abort cycle stop if already retracting, true to allow it to proceed
(boolean) Success flag - false on error reading the pound variable
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ MachineReset()

GrinderODIDScreenV02 MachineReset ( )

Perform machine reset actions for the ODID Grinder screen.

Executes two reset operations in sequence: resets the crash detection latch via CrashDetectionResetCrash(), then resets the part correction offsets to zero via ResetPartCorrectionOffsets(). Called as part of the machine reset hook.

Returns
(boolean) True - always returns success
(boolean) Success flag - always true
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ MachineScreenLoadScript()

GrinderODIDScreenV02 MachineScreenLoadScript ( )

Execute all initialization logic when the ODID Grinder machine screen is loaded.

Performs the following setup sequence in order:

  1. Calls m.screen.CommonGrinderScreenLoadScript() for common grinder initialization
  2. Sets stage button color constants (BTN_COLOR_STAGE_1/2/3)
  3. Initializes the CYCLE and STATUS state machines
  4. Initializes crash detection and gap control subsystems
  5. Creates OEM G-codes for the range "200-300"
  6. Sets WheelHeadSpeedOverride and RotaryDresserSpeedOverride OEM parameters to 100
  7. Creates the CurrentJob job file object with G-code range "500-800" and header table
  8. Initializes wheel heads and cycle settings
  9. Registers the MachineCreatePreCannedCommands function with the command registrar
    Returns
    (nil) No meaningful primary return value on error
    (boolean) Success flag - false if any OEM parameter write fails
    (string) Error message from w.FunctionError() if an OEM parameter write fails
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineScreenLowPriorityLoop()

GrinderODIDScreenV02 MachineScreenLowPriorityLoop ( )

Execute all low-priority periodic screen update functions for the ODID Grinder.

Called on each low-priority loop iteration to refresh all grinder screen elements that do not require real-time update rates. Sequentially calls the following update functions: UpdateWheelHead, UpdateRotaryDresser, UpdateWheelHeadSpeed, UpdateCurrentTabRegister, UpdateActiveToolBox, UpdateGrinderWheelAttributes, UpdateScreenToolObjects, UpdateScreenSpindleObjects, UpdateDresserDiamondSelection, UpdatePartsPerDressCycle, UpdateNewWheelOffset, UpdateG88ReciprocatingAxis, UpdateMeasureingDevices, and UpdateCurrentToolDescription.

Note
Documentation generated by AI on 2026-03-03

◆ MachineScreenPLCScript()

GrinderODIDScreenV02 MachineScreenPLCScript ( )

Execute all real-time PLC script update functions for the ODID Grinder screen.

Called on every PLC script cycle to perform time-critical screen updates. Sequentially calls UpdateCrashDetection() to poll the crash detection system, UpdateToGoDROs() to refresh the to-go distance readouts, and CYCLE.Update() to advance the cycle state machine display.

Note
Documentation generated by AI on 2026-03-03

◆ MachineScreenStartupScript()

GrinderODIDScreenV02 MachineScreenStartupScript ( )

Execute the machine screen startup script for the ODID Grinder.

Performs all one-time initialization required when the grinder screen starts up: sets the machine type name label to "Mach Grinder", initializes the flagging system via FlagInitialize(), configures the tool path view bottom button, initializes tool table fields, initializes the measuring devices UI, and initializes the fixture offsets group.

Returns
(boolean) True - always returns success
(boolean) Success flag - always true
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ MachineScreenUnloadScript()

GrinderODIDScreenV02 MachineScreenUnloadScript ( )

Execute cleanup actions when the grinder screen is unloaded.

Stops the wheel head spindle and stops the rotary dresser when the screen is unloaded. This ensures that all rotating equipment is stopped when the operator navigates away from the screen.

Note
Documentation generated by AI on 2026-03-03

◆ MoveToCycleStopRetractPosition()

GrinderODIDScreenV02 MoveToCycleStopRetractPosition ( )

Move the machine to the cycle stop retract position using a protected call.

Wraps GrinderODIDScreenV02._MoveToCycleStopRetractPosition() in a w.pcall() protected call. If the inner function raises an error, formats and returns an error message. On success, returns the boolean result from the inner function along with a completed status message.

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

◆ MoveToEmergencyRetractPosition()

GrinderODIDScreenV02 MoveToEmergencyRetractPosition ( CustomMode )

Move the machine to the emergency retract position using a protected retraction sequence.

Checks if a retraction is already in progress via IsRetracting(). If so, returns immediately with an "Already Retracting" message to prevent re-entrant retraction attempts. Otherwise selects the appropriate retract function based on CustomMode (currently only mode 0 is supported, which maps to MoveToCycleStopRetractPosition). Sets the retracting interlock via SetRetracting(true), executes the retract function via w.pcall() for protected execution, then clears the interlock via SetRetracting(false) regardless of success or failure.

Parameters
CustomMode(number) The retraction mode selector. Use 0 for standard cycle stop retract. Unrecognized modes return an error.
Returns
(boolean|nil) False if already retracting, the retract result on success, nil on error
(boolean) Success flag - false if already retracting or unrecognized mode, true on success
(string) Status message - "Already Retracting", error description, or result from inner retract function
Note
Documentation generated by AI on 2026-03-03

◆ ReSetChuckFaceInterlock()

GrinderODIDScreenV02 ReSetChuckFaceInterlock ( )

Clear the Chuck Face setup interlock bit for the current tool.

Sets setup interlock bit 3 to false for the current tool via m.screen.SetSetupInterlockBit(). This indicates that the Wheel Face to Chuck Face calibration has been invalidated and needs to be redone.

Note
Documentation generated by AI on 2026-03-03

◆ ReSetFlaggingInterlock()

GrinderODIDScreenV02 ReSetFlaggingInterlock ( )

Clear the flagging setup interlock bit for the current tool.

Sets setup interlock bit 2 to false for the current tool via m.screen.SetSetupInterlockBit(). This indicates that the Active Flag Calibration has been invalidated and needs to be redone.

Note
Documentation generated by AI on 2026-03-03

◆ ResetPartCorrectionOffsets()

GrinderODIDScreenV02 ResetPartCorrectionOffsets ( )

Reset the part correction offset pound variables to zero.

Sets pound variables #5081 (X part correction offset) and #5083 (Z part correction offset) to zero using mc.mcCntlSetPoundVar(). Returns an error if either operation fails.

Returns
(nil) No meaningful return value on success
(boolean|nil) False on error (only present on error path)
(string|nil) Error message from w.FunctionError() on error (only present on error path)
Note
Documentation generated by AI on 2026-03-03

◆ ResetSetupInterlocks()

GrinderODIDScreenV02 ResetSetupInterlocks ( )

Reset all setup interlock bits for the current tool.

Clears all four setup interlock bits by calling the individual reset functions: ReSetFlaggingInterlock (bit 2), ReSetXCalibrationInterlock (bit 0), ReSetZCalibrationInterlock (bit 1), and ReSetChuckFaceInterlock (bit 3). This is typically called when a new wheel is mounted or calibration is invalidated.

Note
Documentation generated by AI on 2026-03-03

◆ ReSetXCalibrationInterlock()

GrinderODIDScreenV02 ReSetXCalibrationInterlock ( )

Clear the X-axis calibration setup interlock bit for the current tool.

Sets setup interlock bit 0 to false for the current tool via m.screen.SetSetupInterlockBit(). This indicates that the X Wheel to Part Calibration has been invalidated and needs to be redone.

Note
Documentation generated by AI on 2026-03-03

◆ ReSetZCalibrationInterlock()

GrinderODIDScreenV02 ReSetZCalibrationInterlock ( )

Clear the Z-axis calibration setup interlock bit for the current tool.

Sets setup interlock bit 1 to false for the current tool via m.screen.SetSetupInterlockBit(). This indicates that the Z Wheel to Part Calibration has been invalidated and needs to be redone.

Note
Documentation generated by AI on 2026-03-03

◆ RetractFlag()

GrinderODIDScreenV02 RetractFlag ( )

Retract the active flag slide.

Delegates to aux.SetActiveFlagSlideRetracteded() to command the active flag slide into the retracted position.

Note
Documentation generated by AI on 2026-03-03

◆ RewindGCodeOnCycleStop()

GrinderODIDScreenV02 RewindGCodeOnCycleStop ( )

Rewind the G-code file to the beginning if the RewindGCode OEM parameter is enabled.

Reads the "RewindGCode" OEM parameter string. If the value is "Yes", calls mc.mcCntlRewindFile() to rewind the currently loaded G-code file to line 0. Returns an error if the OEM parameter read fails or if the rewind operation returns a non-zero error code.

Returns
(nil) No meaningful primary return value
(boolean) Success flag - false on error (only present on error path)
(string) Error message from w.FunctionError() on error (only present on error path)
Note
Documentation generated by AI on 2026-03-03

◆ SetChuckFaceInterlock()

GrinderODIDScreenV02 SetChuckFaceInterlock ( )

Set the Chuck Face setup interlock bit for the current tool.

Sets setup interlock bit 3 to true for the current tool via m.screen.SetSetupInterlockBit(). This indicates that the Wheel Face to Chuck Face calibration has been completed successfully.

Note
Documentation generated by AI on 2026-03-03

◆ SetFlaggingInterlock()

GrinderODIDScreenV02 SetFlaggingInterlock ( )

Set the flagging setup interlock bit for the current tool.

Sets setup interlock bit 2 to true for the current tool via m.screen.SetSetupInterlockBit(). This indicates that the Active Flag Calibration has been completed successfully.

Note
Documentation generated by AI on 2026-03-03

◆ SetRetracting()

GrinderODIDScreenV02 SetRetracting ( new_state )

Set the retracting interlock state and log the change.

Logs the new state via w.LogF() with the [Retract] prefix, then updates the module-level _IsRetracting flag to the provided value.

Parameters
new_state(boolean) The new retracting state to set (true = retracting, false = not retracting)
Note
Documentation generated by AI on 2026-03-03

◆ SetSetupInterlockBit()

GrinderODIDScreenV02 SetSetupInterlockBit ( BitIdx ,
value  )

Set a specific setup interlock bit in the current tool's SetupInterlocks tool table field.

Reads the current SetupInterlocks value for the active tool pocket from the tool table extended data field, modifies the specified bit using w.SetValueBit(), and writes the updated value back. Only operates when the current tool pocket number is greater than zero. Setup Interlock bit assignments: 0 = X Part, 1 = Z Part, 2 = Flagging, 3 = Chuck Face.

Parameters
BitIdx(number) The zero-based bit index to set (0=X Part, 1=Z Part, 2=Flagging, 3=Chuck Face)
value(boolean) The value to set the bit to (true = set, false = clear)
Returns
(nil) No meaningful return value on success
(boolean) Success flag - false on error, nil if tool pocket is 0
(string) Error message from w.FunctionError() if a tool table operation fails
Note
Documentation generated by AI on 2026-03-03

◆ SetXCalibrationInterlock()

GrinderODIDScreenV02 SetXCalibrationInterlock ( )

Set the X-axis calibration setup interlock bit for the current tool.

Sets setup interlock bit 0 to true for the current tool via m.screen.SetSetupInterlockBit(). This indicates that the X Wheel to Part Calibration has been completed successfully.

Note
Documentation generated by AI on 2026-03-03

◆ SetZCalibrationInterlock()

GrinderODIDScreenV02 SetZCalibrationInterlock ( )

Set the Z-axis calibration setup interlock bit for the current tool.

Sets setup interlock bit 1 to true for the current tool via m.screen.SetSetupInterlockBit(). This indicates that the Z Wheel to Part Calibration has been completed successfully.

Note
Documentation generated by AI on 2026-03-03

◆ SpindleStateChanged()

GrinderODIDScreenV02 SpindleStateChanged ( )

Handle spindle state change events for the grinder screen.

Called when the spindle state changes. Updates the work head enable state by delegating to GrinderODIDScreenV02.UpdateWorkHeadEnable().

Note
Documentation generated by AI on 2026-03-03

◆ UpdateCombLabels()

cyc UpdateCombLabels ( dressing_passes ,
_type ,
type_passes  )

Update the combined cycle label screen objects with current state and type descriptions.

Formats and updates all screen objects listed in cyc.CombLabels with a combined string reflecting the current cycle state and type. When the current state is a dressing state, the remaining dressing passes count is appended to the state description. If the cycle type has no description (empty string), only the state description is shown; otherwise the format is "TypeDescription: StateDescription". Also logs the combined state/type description via w.Log.

Parameters
state(table) The current cycle state object with a 'Description' field
dressing_passes(number) The number of remaining dressing passes
_type(table) The current cycle type object with a 'Description' field
type_passes(number) The number of remaining type passes (currently unused)
Note
Documentation generated by AI on 2026-03-03

◆ UpdateCrashDetection()

GrinderODIDScreenV02 UpdateCrashDetection ( )

Poll crash detection state and trigger crash response if conditions are met.

Called from the PLC script on every cycle. If crash detection is enabled, reads the CrashDetectionInput signal and checks the inhibit state, in-progress flag, and handled flag. Triggers m.screen.CrashDetected() when all of the following are true: crash detection is not inhibited, the crash input is active, the crash has not already been handled, and no crash response is already in progress. Also resets the CrashHandled I/O state when the crash input clears and the crash has been handled and no response is in progress.

Returns
(nil) No meaningful primary return value
(boolean) Success flag - false on error reading the crash input signal
(string) Error message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ UpdateCurrentToolDescription()

GrinderODIDScreenV02 UpdateCurrentToolDescription ( )

Update the current tool description label on the grinder screen.

Reads the tool description for the currently active tool number via mc.mcToolGetDesc() and writes it to the "CurrentToolDescriptionLabel" screen object's Label property. Uses the current instance's tool number from CURRENT_TOOL_NUMBER_INST.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateG88ReciprocatingAxis()

GrinderODIDScreenV02 UpdateG88ReciprocatingAxis ( )

Update the G288 handwheel infeed reciprocating axis state and feed-hold notification.

Only executes when m.ReciprocatingAxes is not nil. Reads the current feed-hold state of the handwheel infeed cycle via m.IsFeedholdHandwheelInfeedCycleActive(). If feed hold is active and no notification exists, creates a persistent GMS notification titled "G288: Feed-hold Active". If feed hold is no longer active and a notification exists, closes it via w.CloseGMSNotification(). If the Z axis has a reciprocating axis object, reads its running state and writes the combined running-or-feedhold boolean to the "HandwheelInfeedActive" OEM parameter.

Returns
(nil) No meaningful primary return value
(boolean) Success flag - false on error reading the feed-hold state
(string) Error message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ UpdateMeasureingDevices()

GrinderODIDScreenV02 UpdateMeasureingDevices ( )

Update the active flag slide button colors on the grinder screen.

Polls the active flag slide state and updates the FlagExtendBtn and FlagRetractBtn background colors to reflect the current extended/retracted status. Uses BTN_COLOR_ON when the corresponding state is active and BTN_COLOR_OFF otherwise. Only runs if the active flag is enabled (aux.IsActiveFlagEnabled(0) returns true).

Note
Documentation generated by AI on 2026-03-03