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

Go to the source code of this file.

Functions

GrinderCenterlessScreenV02 InitializeTolerances ()
 Initialize all position tolerance values from imperial defaults converted to current units.
GrinderCenterlessScreenV02 IsRetracting ()
 Get the current retracting interlock state.
GrinderCenterlessScreenV02 SetRetracting (new_state)
 Set the retracting interlock state and log the change.
GrinderCenterlessScreenV02 PreCycleStop ()
 Check pre-conditions before executing a cycle stop.
GrinderCenterlessScreenV02 MoveToRetractPosition (CustomMode)
 Move the active slide to the retract position with reentrancy protection.
GrinderCenterlessScreenV02 MachineCycleStopFinal (CustomMode)
 Perform the final cycle stop sequence for the Centerless Grinder.
GrinderCenterlessScreenV02 MachineScreenLoadScript ()
 Execute all machine-specific screen load initialization for the Centerless Grinder.
GrinderCenterlessScreenV02 MachineScreenStartupScript ()
 Execute all machine-specific startup tasks for the Centerless Grinder screen.
GrinderCenterlessScreenV02 ScreenIsLoadedScript ()
 Run all post-screen-load initialization tasks for the Centerless Grinder.
GrinderCenterlessScreenV02 MachineAutoLoadLastGCode ()
 Handle post-auto-load tab selection for multi-instance Centerless Grinder configurations.
GrinderCenterlessScreenV02 MachinePostAutoLoadLastGCode ()
 Restore the last saved operation tab after auto-loading the last G-code file.
GrinderCenterlessScreenV02 GetAxisLetterName (AxisID)
 Get a multi-line display label for an axis based on the selected instance and axis ID.
GrinderCenterlessScreenV02 GetAxisShortName (AxisID, inst)
 Get a short display name for an axis based on the selected instance and axis ID.
GrinderCenterlessScreenV02 InitializeGrindMode ()
 Initialize the active grind mode based on enabled features and the current operation tab.
GrinderCenterlessScreenV02 MachineScreenPLCScript ()
 Execute all real-time PLC cycle updates for the Centerless Grinder screen.
GrinderCenterlessScreenV02 LoadJobFileFinal ()
 Finalize loading a job file by writing pound variables to the tool table and updating UI.
GrinderCenterlessScreenV02 EnableFinal ()
 Perform post-enable initialization for the Centerless Grinder.
GrinderCenterlessScreenV02 MachineScreenLowPriorityLoop ()
 Execute all low-priority periodic updates for the Centerless Grinder screen.
GrinderCenterlessScreenV02 GetWheelAttributes ()
 Retrieve the wheel attributes table from the aux module.
GrinderCenterlessScreenV02 InitializeInFeedRates ()
 Initialize the In-Feed rates panel layout based on regulating wheel speed configuration.
GrinderCenterlessScreenV02 UpdateInFeedControls ()
 Update all In-Feed cycle position indicators, marquee LED, and axis position display.
GrinderCenterlessScreenV02 UpdatePartKicker ()
 Update the Part Kicker state machine and control outputs each PLC cycle.
GrinderCenterlessScreenV02 GetPartKickerMoveToLoadPositionGCode ()
 Generate the G-code string to move the Part Kicker OB Axis to the load position.
GrinderCenterlessScreenV02 PartKickerTeachPosition (PositionName)
 Teach a Part Kicker OB Axis position by storing the current machine position.
GrinderCenterlessScreenV02 PartKickerMoveToPosition (PositionName)
 Move the Part Kicker OB Axis to the specified named position via the axis jogger.
GrinderCenterlessScreenV02 IsPartKickerAtPosition (PositionName)
 Check whether the Part Kicker OB Axis is at the specified named position.
GrinderCenterlessScreenV02 IsPartKickerEnabled ()
 Check whether the Part Kicker feature is enabled (cached).
GrinderCenterlessScreenV02 IsPartKickerTypeOBAxisEnabled ()
 Check whether the Part Kicker OB Axis type is enabled and configured.
GrinderCenterlessScreenV02 PartKickerManualCycle ()
 Trigger a manual kick cycle for the Part Kicker.
GrinderCenterlessScreenV02 PartKickerManualCycleRetract ()
 Trigger a manual retract cycle for the Part Kicker.
GrinderCenterlessScreenV02 IsPartKicker ()
 Check whether the Part Kicker output signal is currently active.
GrinderCenterlessScreenV02 PartLoaderRetractCycle ()
 Execute a part loader retract cycle via MDI or multi-instance subroutine.
GrinderCenterlessScreenV02 PartLoaderAlarmActive ()
 Create or update a GMS Alarm dialog when the part loader enters an alarmed state.
GrinderCenterlessScreenV02 PartLoaderNoticeMessageActive ()
 Create or update a GMS Notice dialog when the part loader sends a notice message.
GrinderCenterlessScreenV02 IsWheelsInPositionPartLoader ()
 Check whether both the main slide and secondary slide are in position for the part loader.
GrinderCenterlessScreenV02 SetPartLoaderGripperToLowerSlideOffset ()
 Teach and store the gripper-to-lower-slide offset for the part loader.
GrinderCenterlessScreenV02 UpdatePartLoader ()
 Update the part loader interlock outputs and motion inhibit signals.
GrinderCenterlessScreenV02 IsPartLoaderReady ()
 Validate all preconditions required before running a part loader cycle.
GrinderCenterlessScreenV02 PartLoaderMachineEmpty ()
 Set pound variable #9065 to zero when the machine is idle, marking it as empty.
GrinderCenterlessScreenV02 PartLoaderIsMachineEmpty ()
 Check whether the machine is currently empty (no part loaded).
GrinderCenterlessScreenV02 PartLoaderLoad ()
 Initiate a part loader load cycle when the machine is idle and loader is ready.
GrinderCenterlessScreenV02 IsPartLoaderLoad ()
 Check whether the part loader is currently executing a load cycle.
GrinderCenterlessScreenV02 PartLoaderUnload ()
 Initiate a part loader unload cycle when the machine is idle and loader is ready.
GrinderCenterlessScreenV02 IsPartLoaderUnload ()
 Check whether the part loader is currently executing an unload cycle.
GrinderCenterlessScreenV02 UpdateThruFeedControls ()
 Update the Thru-Feed grind cycle position indicators and marquee LED.
GrinderCenterlessScreenV02 MarqueeObject (marquee)
 Animate a marquee indicator LED object to track axis position between two machine coordinates.
GrinderCenterlessScreenV02 IsAtThruFeedRetractPosition ()
 Check whether the upper/lower slide axis is at the Thru-Feed retract position.
GrinderCenterlessScreenV02 IsAtThruFeedGrindPosition ()
 Check whether the upper/lower slide axis is at the Thru-Feed grind position.
GrinderCenterlessScreenV02 TouchOffTeachY ()
 Teach the Y-axis touch-off position by reading the current machine position.
GrinderCenterlessScreenV02 TouchOffTeachZ ()
 Teach the Z-axis touch-off position by reading the current machine position.
GrinderCenterlessScreenV02 ExecuteCalibrationBtn ()
 Execute tool calibration using taught touch-off positions and measured part dimensions.
GrinderCenterlessScreenV02 MoveToCycleStopRetractPosition (Operation)
 Perform a protected cycle stop retract sequence.
GrinderCenterlessScreenV02 MoveToEmergencyRetractPosition ()
 Perform a protected emergency retract move sequence.
GrinderCenterlessScreenV02 MoveToLoadPosition (infeed_load_pos)
 Move the active slide axis and optional secondary slide to the load or retract position.
GrinderCenterlessScreenV02 IsAtLoadPosition ()
 Check whether both the main slide and secondary slide are at their load positions.
GrinderCenterlessScreenV02 RestoreLastRunTabIndex ()
 Restore the last saved operation tab index and set the active tab.
GrinderCenterlessScreenV02 SaveCurrentRunTabIndex (tab)
 Save the current operation tab index to the machine profile.
GrinderCenterlessScreenV02 ScreenTabEnter (tab)
 Handle tab enter events for the Centerless Grinder operation and service tabs.
GrinderCenterlessScreenV02 ScreenTabExit (tab)
 Handle tab exit events for the Centerless Grinder operation tabs.
GrinderCenterlessScreenV02 InitializeToolTableFields ()
 Initialize or update the tool table user field definitions for Centerless Grinder wheel attributes.
GrinderCenterlessScreenV02 CYCLE Initialize ()
 Initialize the CYCLE state machine for the Centerless Grinder screen.
cyc UpdateCombLabels (dressing_passes, _type, type_passes)
 Update all combined cycle label objects with the current state and type descriptions.
cyc STATE GetNumber ()
 Get the current cycle state number from the configured pound variable.
GrinderCenterlessScreenV02 GetAxisPositionGroupTable ()
 Return the axis position group layout configuration table for the current screen state.
GrinderCenterlessScreenV02 ShowHideSpindleGroup (groupname, showhide)
 Hide a spindle group UI element by name (unconditionally).
GrinderCenterlessScreenV02 DressInterrupt ()
 Trigger a dress interrupt to cause the running program to perform a dress cycle.
GrinderCenterlessScreenV02 IsDressInterruptActive ()
 Check whether the dress interrupt is currently active.
GrinderCenterlessScreenV02 MachineCycleStartFinal ()
 Validate state and dispatch to the correct cycle start handler based on the active operation tab.
GrinderCenterlessScreenV02 CycleStartMainProgramOnly ()
 Start the main G-code program from instance 0 only when in a valid state.
GrinderCenterlessScreenV02 EmergencyRetract ()
 Perform a full emergency retract sequence with reentrancy protection.
GrinderCenterlessScreenV02 RunGrindWheelDressCycle (ignore_confirmation)
 Initiate a Grind Wheel dress cycle with optional confirmation dialog.
GrinderCenterlessScreenV02 RunRegulatingWheelDressCycle (ignore_confirmation)
 Initiate a Regulating Wheel dress cycle with optional confirmation dialog.
GrinderCenterlessScreenV02 EndOfProgram ()
 Handle end-of-program cleanup for the Centerless Grinder.
GrinderCenterlessScreenV02 ClearIsWheelInDressCycleFlags ()
 Clear both wheel dress cycle flags.
GrinderCenterlessScreenV02 SetIsGrindWheelInDressCycleFlag ()
 Set the flag indicating the Grind Wheel is currently in a dress cycle.
GrinderCenterlessScreenV02 SetIsRegWheelInDressCycleFlag ()
 Set the flag indicating the Regulating Wheel is currently in a dress cycle.
GrinderCenterlessScreenV02 SetGrinderOperationNumber (OperationNumber)
 Set the active grinder operation number in Mach4 pound variable #546.
GrinderCenterlessScreenV02 MachineDisable ()
 Reset machine state flags and set the cycle to idle on machine disable.
GrinderCenterlessScreenV02 IsGrindPositionSet ()
 Check whether the grind position has been calibrated.
GrinderCenterlessScreenV02 UpdateGrindPositionSetIndicator ()
 Update the grind position calibration indicator LEDs and labels on screen.
GrinderCenterlessScreenV02 SetGrindPositionSetIndicator ()
 Set the grind position calibrated flag in the machine profile.
GrinderCenterlessScreenV02 ReSetGrindPositionSetIndicator ()
 Clear the grind position calibrated flag in the machine profile.
GrinderCenterlessScreenV02 SetGrindPosition ()
 Set the grind finish position by prompting the operator for a new value.
GrinderCenterlessScreenV02 EditModeControlOn ()
 Activate the Edit Mode button highlight for grind position set buttons.
GrinderCenterlessScreenV02 EditModeControlOff ()
 Deactivate the Edit Mode button highlight for grind position set buttons.
GrinderCenterlessScreenV02 IsEditModeActive ()
 Check whether Edit Mode is currently active based on button background color.
GrinderCenterlessScreenV02 ShowInScreenGCodeEditor ()
 Show the in-screen G-code editor and hide the standard tool path display.
GrinderCenterlessScreenV02 HideInScreenGCodeEditor ()
 Hide the in-screen G-code editor and restore the standard tool path display.
GrinderCenterlessScreenV02 IsGCodeDisplayExtraLargeEnabled ()
 Check whether the extra-large G-code display mode is enabled for this screen.
GrinderCenterlessScreenV02 GetSmallToolPathGroupHeight ()
 Return the fixed height value for the small tool path group UI element.
GrinderCenterlessScreenV02 GetSmallToolPathGroupBgImageName ()
 Return the background image name for the small tool path group.
GrinderCenterlessScreenV02 GetSmallToolPathPanelHeight ()
 Return the fixed height value for the small tool path panel UI element.
GrinderCenterlessScreenV02 GetLargeToolPathGroupHeight ()
 Return the fixed height value for the large tool path group UI element.
GrinderCenterlessScreenV02 GetLargeToolPathGroupBgImageName ()
 Return the background image name for the large tool path group.
GrinderCenterlessScreenV02 GetLargeToolPathPanelHeight ()
 Return the fixed height value for the large tool path panel UI element.
GrinderCenterlessScreenV02 EditModeGroupsButtons (Value)
 Enable or disable groups of edit-mode controls under the Fixture Offsets tab.
GrinderCenterlessScreenV02 GetEditModeButtonText ()
 Return the localized label text for the Edit Mode button.
GrinderCenterlessScreenV02 InitializeCenterlessGrinder ()
 Initialize all Centerless Grinder-specific screen objects and UI state.
GrinderCenterlessScreenV02 InitializeSignalScript ()
 Initialize the signal script handler table for all configured Mach4 instances.
GrinderCenterlessScreenV02 DROToToolTable (dro_names, value)
 Write a DRO value to the tool table user field corresponding to the DRO name.
GrinderCenterlessScreenV02 UpdateWheelSpeedModeButtons ()
 Update the RPM/SFM mode toggle button highlight colors for both wheel speed panels.
GrinderCenterlessScreenV02 WheelSpeedModeRPMBtn ()
 Set the Grind Wheel speed mode to RPM and refresh dependent UI.
GrinderCenterlessScreenV02 WheelSpeedModeSFMBtn ()
 Set the Grind Wheel speed mode to SFM and refresh dependent UI.
GrinderCenterlessScreenV02 RegWheelSpeedModeRPMBtn ()
 Set the Regulating Wheel speed mode to RPM and refresh dependent UI.
GrinderCenterlessScreenV02 RegWheelSpeedModeSFMBtn ()
 Set the Regulating Wheel speed mode to SFM and refresh dependent UI.
GrinderCenterlessScreenV02 LayoutObjects new (grid_objects)
 Create a new LayoutObjects grid instance from a configuration table.
GrinderCenterlessScreenV02 LayoutObjects layout ()
 Lay out all visible objects in the LayoutObjects grid.
GrinderCenterlessScreenV02 LayoutObjects hidden (value)
 Set the hidden state of a named row in the LayoutObjects grid.
GrinderCenterlessScreenV02 InitializeGrindDress ()
 Initialize and layout the Grind Wheel dressing controls panel.
GrinderCenterlessScreenV02 InitializeRegulatingDress ()
 Initialize and layout the Regulating Wheel dressing controls panel.
GrinderCenterlessScreenV02 ResetTotalCompBtn (AxisID)
 Reset the total compensation accumulator for the specified axis.
GrinderCenterlessScreenV02 UpdatePartCounters ()
 Update background colors of part counter DRO objects based on their values.
GrinderCenterlessScreenV02 InitializeThruFeedPartCounter ()
 Initialize the Thru-Feed part counter signal handler and persistent I/O points.
GrinderCenterlessScreenV02 UpdateThruFeedPartCounter ()
 Increment the Thru-Feed part counters and trigger dress-required notifications.
GrinderCenterlessScreenV02 IsThruFeedPartCounterEnabled ()
 Check whether the Thru-Feed part counter feature is enabled.
GrinderCenterlessScreenV02 ResetPartCounterBtn ()
 Stub handler for the Reset Part Counter button.
GrinderCenterlessScreenV02 ResetUpperLowerTotalCompBtn ()
 Reset the total compensation accumulator for the active upper/lower slide axis.
GrinderCenterlessScreenV02 ResetExtraUpperLowerCompBtn ()
 Reset the Extra Comp Amount OEM parameter to zero.
GrinderCenterlessScreenV02 CompSlideBtn (Direction, Amount,...)
 Apply a compensation adjustment to the active slide axis (button handler variant).
GrinderCenterlessScreenV02 CompSlide (Direction, Amount)
 Apply a compensation adjustment to the active slide axis based on the current grind mode.
GrinderCenterlessScreenV02 ThruFeedCompMainGrindAxis (Direction, Amount)
 Apply a compensation adjustment to the main grind axis for Thru-Feed mode.
GrinderCenterlessScreenV02 CompMainGrindAxis (Type, Direction, Amount)
 Apply a compensation adjustment to the main grind axis (upper/lower slide).
GrinderCenterlessScreenV02 Comp (AxisID, Type, Direction, Amount)
 Apply a compensation adjustment to a grinder axis using the specified compensation type.
GrinderCenterlessScreenV02 IsGrindWheelEnabled ()
 Check whether the Grind Wheel is enabled.
GrinderCenterlessScreenV02 IsRegulatingWheelEnabled ()
 Check whether the Regulating Wheel is enabled.
GrinderCenterlessScreenV02 IsHydraulicsEnabled ()
 Check whether the hydraulics system is enabled.
GrinderCenterlessScreenV02 IsInFeedModeActive ()
 Check whether In-Feed grind mode is currently active.
GrinderCenterlessScreenV02 IsThruFeedModeActive ()
 Check whether Thru-Feed grind mode is currently active.
GrinderCenterlessScreenV02 ThruFeedInBtn ()
 Handle the Thru-Feed In button press to move to the grind position.
GrinderCenterlessScreenV02 GoToThruFeedGrindPosition (use_confirmation)
 Move the active slide axis to the Thru-Feed grind position via MDI.
GrinderCenterlessScreenV02 ThruFeedOutBtn ()
 Handle the Thru-Feed Out button press to move to the retract position.
GrinderCenterlessScreenV02 GoToThruFeedRetractPosition (use_confirmation)
 Move the active slide axis to the Thru-Feed retract position via MDI.
GrinderCenterlessScreenV02 UpperSlideBtn ()
 Select the Upper Slide as the active upper/lower axis and refresh the axis position group.
GrinderCenterlessScreenV02 LowerSlideBtn ()
 Select the Lower Slide as the active upper/lower axis and refresh the axis position group.
GrinderCenterlessScreenV02 IsDisableWheelsStartingAutomaticallyOn ()
 Check whether the "Disable Wheels Starting Automatically" feature is enabled.
GrinderCenterlessScreenV02 IsInterlockThatForcesRegulatingWheelToBeOnBeforeTheGrindinWheelOn ()
 Check whether the interlock requiring the Regulating Wheel to be on before the Grind Wheel is active.
GrinderCenterlessScreenV02 IsInFeedCycleRepeatOn ()
 Check whether the In-Feed cycle repeat feature is currently enabled.
GrinderCenterlessScreenV02 InFeedCycleRepeatOn ()
 Enable the In-Feed cycle repeat feature.
GrinderCenterlessScreenV02 InFeedCycleRepeatOff ()
 Disable the In-Feed cycle repeat feature.
GrinderCenterlessScreenV02 InFeedCycleRepeatToggle ()
 Toggle the In-Feed cycle repeat setting on or off.
GrinderCenterlessScreenV02 IsGrindWheelDressing ()
 Check whether the Grind Wheel is currently in a dress cycle.
GrinderCenterlessScreenV02 IsRegulatingWheelDressing ()
 Check whether the Regulating Wheel is currently in a dress cycle.
GrinderCenterlessScreenV02 IsGrindWheelDressingEnabled ()
 Check whether Grind Wheel dressing is enabled in OEM parameters.
GrinderCenterlessScreenV02 IsRegulatingWheelDressingEnabled ()
 Check whether Regulating Wheel dressing is enabled in OEM parameters.
GrinderCenterlessScreenV02 UpdateLowPriorityGrinderControls ()
 Update all low-priority grinder screen controls and indicators.
GrinderCenterlessScreenV02 GrindDressTeachDiamondOperatorPanelBtn (diamond_traverse)
 Teach the Grind Wheel dresser diamond or traverse position from the operator panel.
GrinderCenterlessScreenV02 RegDressTeachDiamondOperatorPanelBtn (diamond_traverse)
 Teach the Regulating Wheel dresser diamond or traverse position from the operator panel.
GrinderCenterlessScreenV02 GrindDressCompDiamondOperatorPanelBtn (diamond_traverse, Direction, Amount)
 Apply a compensation adjustment to a Grind Wheel dresser axis from the operator panel.
GrinderCenterlessScreenV02 RegDressCompDiamondOperatorPanelBtn (diamond_traverse, Direction, Amount)
 Apply a compensation adjustment to a Regulating Wheel dresser axis from the operator panel.
GrinderCenterlessScreenV02 GWCustomDressProfileBtn ()
 Toggle the Grind Wheel custom dress profile program on or off.
GrinderCenterlessScreenV02 StoreLastGrindDressCustomProgram (SubNumber)
 Store the last used Grind Wheel custom dress program number to the machine profile.
GrinderCenterlessScreenV02 UpdateGWCustomDressProfile ()
 Update the Grind Wheel custom dress profile button and group visibility.
GrinderCenterlessScreenV02 RWCustomDressProfileBtn ()
 Toggle the Regulating Wheel custom dress profile program on or off.
GrinderCenterlessScreenV02 StoreLastRegDressCustomProgram (SubNumber)
 Store the last used Regulating Wheel custom dress program number to the machine profile.
GrinderCenterlessScreenV02 UpdateRWCustomDressProfile ()
 Update the Regulating Wheel custom dress profile button and group visibility.
GrinderCenterlessScreenV02 OpenDressProfiler (dresser_type, sub_number)
 Open the Profile Dressing wizard for editing or creating a dress profile.
ProfileDressing OnDestroy ()
 Callback invoked when the Profile Dressing wizard window is destroyed.
GrinderCenterlessScreenV02 NewDressProgramBtn (dresser_type)
 Open the Profile Dressing wizard to create a new dress profile program.
GrinderCenterlessScreenV02 OpenDressProgramBtn (dresser_type)
 Open a file dialog to select and load an existing custom dress profile program.
GrinderCenterlessScreenV02 EditDressProgramBtn (dresser_type)
 Open the Profile Dressing editor for the currently active custom dress program.
GrinderCenterlessScreenV02 ReloadDressProgramBtn ()
 Reload the currently selected dress program from disk.
GrinderCenterlessScreenV02 IsRegulatingWheelSpeedsInCycleOn ()
 Check whether the Regulating Wheel Speeds in Cycle feature is enabled.
GrinderCenterlessScreenV02 RegulatingWheelSpeedsInCycleOn ()
 Enable the Regulating Wheel Speeds in Cycle feature.
GrinderCenterlessScreenV02 RegulatingWheelSpeedsInCycleOff ()
 Disable the Regulating Wheel Speeds in Cycle feature.
GrinderCenterlessScreenV02 RegulatingWheelSpeedsInCycleToggle ()
 Toggle the Regulating Wheel Speeds in Cycle setting on or off.
GrinderCenterlessScreenV02 InitializeOperatorPanels ()
 Configure operator panel button mappings specific to the Centerless Grinder.
GrinderCenterlessScreenV02 GetFileGroupBottomPosition ()
 Return the fixed bottom position value for the file group UI element.
GrinderCenterlessScreenV02 ValidateInFeedCycleData ()
 Validate all In-Feed cycle data against required business rules.
GrinderCenterlessScreenV02 ValidateThruFeedCycleData ()
 Validate all Thru-Feed cycle data against required business rules.
GrinderCenterlessScreenV02 ValidateCycleDataList (datatable)
 Validate a list of cycle data pound variables against their business rules.
GrinderCenterlessScreenV02 ValidateDROValue (value, name)
 Validate a DRO value string and return the corrected value as a string.
GrinderCenterlessScreenV02 ValidateCycleData (value, name)
 Validate a single cycle data value against business rules for the given field name.
GrinderCenterlessScreenV02 MachineCreatePreCannedCommands ()
 Register all pre-canned commands available for the Centerless Grinder screen.
GrinderCenterlessScreenV02 UpdateSpindleMinMaxSpeed ()
 Stub function that disables spindle min/max speed updates for this screen.
GrinderCenterlessScreenV02 UpdateMPGAxisSelector ()
 Stub function that disables MPG axis selector updates for this screen.

Function Documentation

◆ ClearIsWheelInDressCycleFlags()

GrinderCenterlessScreenV02 ClearIsWheelInDressCycleFlags ( )

Clear both wheel dress cycle flags.

Sets both IsRegWheelDressCycle and IsGrindWheelDressCycle screen-level flags to false, indicating that neither wheel is currently in a dress cycle.

Note
Documentation generated by AI on 2026-03-03

◆ Comp()

GrinderCenterlessScreenV02 Comp ( AxisID ,
Type ,
Direction ,
Amount  )

Apply a compensation adjustment to a grinder axis using the specified compensation type.

Supports four compensation types:

  • Type 1: Adjust fixture offset (G91 G10 L2 P1) without moving
  • Type 2: Adjust fixture offset and then rapid to the finish/grind position
  • Type 3: Update dresser tool table fields (1DressPosition or 2DressPosition) and optionally update wheel diameter
  • Type 4: Accumulate extra comp amount in the ExtraCompAmount OEM register for the next cycle

Fine and Coarse step amounts are read from pound variables #591 and #590 respectively. After compensation, updates the per-axis and total comp amount OEM registers. For Type 2 in Thru-Feed mode, an optional backlash move can be applied when moving away from the part.

Parameters
AxisID(number) The Mach4 axis ID to compensate (mc.X_AXIS through mc.MC_MAX_COORD_AXES)
Type(number) Compensation type: 1 (offset only), 2 (offset + move), 3 (dresser comp), 4 (extra comp next cycle)
Direction(number) Compensation direction: 1 (out/positive) or -1 (in/negative)
Amount(string) Step size: "Fine" (reads #591) or "Coarse" (reads #590)
Returns
(nil) No primary return value
(boolean) Success flag - false if axis ID is invalid, pound variable read/write fails, or MDI fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Warning
Feed Override or Rapid Override below 1% will generate a warning message but will not prevent compensation
Note
Documentation generated by AI on 2026-03-03

◆ CompMainGrindAxis()

GrinderCenterlessScreenV02 CompMainGrindAxis ( Type ,
Direction ,
Amount  )

Apply a compensation adjustment to the main grind axis (upper/lower slide).

Retrieves the active upper/lower axis ID via aux.GetUpperLowerAxisID() and delegates to Comp() with the provided Type, Direction, and Amount arguments.

Parameters
Type(number) Compensation type passed to Comp(): 1 (offset), 2 (offset + move), 3 (dresser), 4 (extra)
Direction(number) Compensation direction: 1 (out) or -1 (in)
Amount(string) Step size: "Fine" or "Coarse"
Returns
(nil) No primary return value
(boolean) Success flag - false if axis ID lookup or Comp() fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ CompSlide()

GrinderCenterlessScreenV02 CompSlide ( Direction ,
Amount  )

Apply a compensation adjustment to the active slide axis based on the current grind mode.

Delegates to ThruFeedCompMainGrindAxis() when Thru-Feed mode is active, or to CompMainGrindAxis() with Type 4 (extra comp on next cycle) when In-Feed mode is active.

Parameters
Direction(number) Compensation direction: 1 (out) or -1 (in)
Amount(string) Step size: "Fine" or "Coarse"
Note
Documentation generated by AI on 2026-03-03

◆ CompSlideBtn()

GrinderCenterlessScreenV02 CompSlideBtn ( Direction ,
Amount ,
... )

Apply a compensation adjustment to the active slide axis (button handler variant).

Calls _CompSlide() with the provided Direction and Amount. This is the button-triggered entry point; additional variadic arguments are accepted but ignored.

Parameters
Direction(number) Compensation direction: 1 (out) or -1 (in)
Amount(string) Step size: "Fine" or "Coarse"
...(any) Additional arguments accepted but ignored
Note
Documentation generated by AI on 2026-03-03

◆ CycleStartMainProgramOnly()

GrinderCenterlessScreenV02 CycleStartMainProgramOnly ( )

Start the main G-code program from instance 0 only when in a valid state.

Checks that instance 0 is not already in FRUN or MRUN state before calling mc.mcCntlCycleStart(). After starting, checks for macro hold states and releases the file hold if needed. Updates the cycle start timestamp for instance 0.

Returns
(boolean) False (always returns false as first value per convention)
(boolean) Success flag - true if cycle start was issued, false if state was invalid
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ DressInterrupt()

GrinderCenterlessScreenV02 DressInterrupt ( )

Trigger a dress interrupt to cause the running program to perform a dress cycle.

Sets pound variable #998 to 1 only when the machine state (MACH_STATE) is between 100 and 199 (inclusive), which corresponds to active grinding states. The G-code program monitors this variable to initiate a dress cycle at the next opportunity.

Note
Has no effect when the machine is not in a grinding state (MACH_STATE 100-199)
Documentation generated by AI on 2026-03-03

◆ DROToToolTable()

GrinderCenterlessScreenV02 DROToToolTable ( dro_names ,
value  )

Write a DRO value to the tool table user field corresponding to the DRO name.

Strips the instance suffix from the DRO object name (e.g., removes "DRO(1)" suffix) to derive the tool table field name, then writes the numeric value to that field via w.SetToolTableUserValue(). Returns early without action if value is nil.

Parameters
dro_names(string) The DRO object name, potentially including an instance suffix (e.g., "WheelDiameter_1DRO(1)")
value(number|nil) The value to write to the tool table field. If nil, the function returns immediately
Returns
(nil) No primary return value
(boolean) False if the tool table write fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ EditDressProgramBtn()

GrinderCenterlessScreenV02 EditDressProgramBtn ( dresser_type )

Open the Profile Dressing editor for the currently active custom dress program.

Reads the active custom dress subroutine number from pound variable #518 (Grind Wheel) or #519 (Regulating Wheel) depending on dresser_type, then opens the Profile Dressing wizard via OpenDressProfiler() for that subroutine number.

Parameters
dresser_type(string) The dresser to edit: "GrindWheel" or "RegWheel"
Returns
(nil) No primary return value
(boolean) Success flag - false if pound variable read fails
(string) Status message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ EditModeControlOff()

GrinderCenterlessScreenV02 EditModeControlOff ( )

Deactivate the Edit Mode button highlight for grind position set buttons.

Sets the background color of "SetInFeedGrindPositionBtn" and "SetThruFeedGrindPositionBtn" (when they exist on screen) back to the standard button off color (m.screen.ColorScheme.Button.Off.Bg), visually indicating that Edit Mode is no longer active.

Note
Documentation generated by AI on 2026-03-03

◆ EditModeControlOn()

GrinderCenterlessScreenV02 EditModeControlOn ( )

Activate the Edit Mode button highlight for grind position set buttons.

Sets the background color of "SetInFeedGrindPositionBtn" and "SetThruFeedGrindPositionBtn" (when they exist on screen) to the standard yellow color (m.screen.ColorScheme.Standard.Yellow), visually indicating that Edit Mode is active.

Note
Documentation generated by AI on 2026-03-03

◆ EditModeGroupsButtons()

GrinderCenterlessScreenV02 EditModeGroupsButtons ( Value )

Enable or disable groups of edit-mode controls under the Fixture Offsets tab.

Retrieves all child groups of "FixtureOffsetsTab(1)" (excluding "EditModeGroup") and sets their "Enabled" property to the provided Value string for each group found.

Parameters
Value(string) The enabled state to set: "1" to enable, "0" to disable
Note
Documentation generated by AI on 2026-03-03

◆ EmergencyRetract()

GrinderCenterlessScreenV02 EmergencyRetract ( )

Perform a full emergency retract sequence with reentrancy protection.

Uses w.FuncTracing to prevent multiple simultaneous emergency retract sequences. If already in progress, returns immediately. Otherwise, sets the tracing flag, calls _EmergencyRetract() via w.pcall() for error protection, clears the flag, and propagates the result. The inner _EmergencyRetract() stops all instances, moves to retract position, triggers part kicker retract, runs part loader retract, optionally stops all wheels, and runs pre/post emergency retract hooks.

Returns
(nil) No primary return value on success
(boolean) False if already in progress or if the retract sequence raises an error
(string) Status message or error description
Warning
This function stops machine motion on all instances and may stop wheel spindles
Note
Documentation generated by AI on 2026-03-03

◆ EnableFinal()

GrinderCenterlessScreenV02 EnableFinal ( )

Perform post-enable initialization for the Centerless Grinder.

Reads the "HydraulicsStartWithMachineEnable" OEM parameter. If set to "Yes", automatically starts the hydraulics system (without requiring operator confirmation) by calling StartHydraulics(false). Called when the machine is enabled.

Returns
(nil) No primary return value
(boolean) False if the OEM parameter read fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ EndOfProgram()

GrinderCenterlessScreenV02 EndOfProgram ( )

Handle end-of-program cleanup for the Centerless Grinder.

Clears both wheel dress cycle flags via ClearIsWheelInDressCycleFlags() when the G-code program reaches its end.

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

◆ ExecuteCalibrationBtn()

GrinderCenterlessScreenV02 ExecuteCalibrationBtn ( )

Execute tool calibration using taught touch-off positions and measured part dimensions.

Reads the measured X and Z values from the MeasuredXDRO and MeasuredZDRO screen objects, and the taught machine positions from XTouchOffDRO and ZTouchOffDRO. Validates that at least one touch-off position has been taught. Computes new X tool offset accounting for diameter mode and tool slide direction, and new Z tool offset from the Z work offset. Writes the computed offsets to the tool table via mc.mcToolSetData() (clearing wear offsets), then activates the tool with an MDI T command. Resets the touch-off DRO values to zero after completion.

Returns
(nil) No primary return value
(boolean) False if touch-off positions are not taught, MDI command fails, or tool data write fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Warning
Both XTouchOffDRO and ZTouchOffDRO must be taught before running calibration
Note
Documentation generated by AI on 2026-03-03

◆ GetAxisLetterName()

GrinderCenterlessScreenV02 GetAxisLetterName ( AxisID )

Get a multi-line display label for an axis based on the selected instance and axis ID.

Returns a two-line string identifying the axis for use in axis position group headers. When a secondary instance (_inst > 0) is selected, formats the label as the instance number on the first line and the standard axis letter in parentheses on the second line (e.g., "1\n(X)"). When the primary instance (instance 0) is selected, returns descriptive labels specific to the Centerless Grinder:

  • X_AXIS: "GD\n(X)" (Grind Diamond)
  • Y_AXIS: "GD\n(Y)"
  • Z_AXIS: "RD\n(Z)" (Reg Diamond)
  • A_AXIS: "RD\n(4)"
  • B_AXIS: "UP\n(5)" (Upper Slide)
  • C_AXIS: "LO\n(6)" (Lower Slide)
  • OB axes: "OBn" where n = AxisID - 5
    Parameters
    AxisID(number) The Mach4 axis ID constant (e.g., mc.X_AXIS, mc.B_AXIS)
    Returns
    (boolean) False (first return, always false per convention)
    (boolean) Success flag - always true
    (string) Status message
    (string) The multi-line axis letter label string
    Note
    Documentation generated by AI on 2026-03-03

◆ GetAxisPositionGroupTable()

GrinderCenterlessScreenV02 GetAxisPositionGroupTable ( )

Return the axis position group layout configuration table for the current screen state.

If user.GetAxisPositionGroupTable is defined, delegates to it and returns the result. Otherwise, builds a distribution parameters table containing all currently enabled and shown axes. The returned table specifies:

  • count: number of visible axes
  • order: array of axis IDs in display order
  • start: top pixel offset (19)
  • length: total pixel length for distribution (216-19+1 = 198)
  • constraints: maximum_size (60) and maximum_padding (11) per axis slot
    Returns
    (table) Layout configuration table for InitializeAxisPositionGroup()
    Note
    Documentation generated by AI on 2026-03-03

◆ GetAxisShortName()

GrinderCenterlessScreenV02 GetAxisShortName ( AxisID ,
inst  )

Get a short display name for an axis based on the selected instance and axis ID.

Returns a compact string identifying the axis for use in DRO labels and axis position groups. When a secondary instance (_inst > 0) is selected, formats the name as the instance number followed by the standard axis letter (e.g., "1X", "2Y"). When the primary instance (instance 0) is selected, returns descriptive names specific to the Centerless Grinder:

  • X_AXIS: "X (Grind Traverse)"
  • Y_AXIS: "Y (Grind Diamond)"
  • Z_AXIS: "Z (Reg Traverse)"
  • A_AXIS: "4 (Reg Diamond)"
  • B_AXIS: "5 (Upper Slide)"
  • C_AXIS: "6 (Lower Slide)"
  • OB axes: "OBn" where n = AxisID - 5
    Parameters
    AxisID(number) The Mach4 axis ID constant (e.g., mc.X_AXIS, mc.B_AXIS)
    inst(number) The Mach4 instance handle (accepted but overridden internally)
    Returns
    (boolean) False (first return, always false per convention)
    (boolean) Success flag - always true
    (string) Status message
    (string) The short axis name string
    Note
    Documentation generated by AI on 2026-03-03

◆ GetEditModeButtonText()

GrinderCenterlessScreenV02 GetEditModeButtonText ( )

Return the localized label text for the Edit Mode button.

Returns the translated string "Set Grind\nPosition" for use as the Edit Mode button label.

Returns
(string) The localized button label text
Note
Documentation generated by AI on 2026-03-03

◆ GetFileGroupBottomPosition()

GrinderCenterlessScreenV02 GetFileGroupBottomPosition ( )

Return the fixed bottom position value for the file group UI element.

Returns
(number) The bottom position in screen units (824)
Note
Documentation generated by AI on 2026-03-03

◆ GetLargeToolPathGroupBgImageName()

GrinderCenterlessScreenV02 GetLargeToolPathGroupBgImageName ( )

Return the background image name for the large tool path group.

Returns
(string) The background image filename ("Large Tool Path Background (UGS).png")
Note
Documentation generated by AI on 2026-03-03

◆ GetLargeToolPathGroupHeight()

GrinderCenterlessScreenV02 GetLargeToolPathGroupHeight ( )

Return the fixed height value for the large tool path group UI element.

Returns
(string) The height in screen units ("533")
Note
Documentation generated by AI on 2026-03-03

◆ GetLargeToolPathPanelHeight()

GrinderCenterlessScreenV02 GetLargeToolPathPanelHeight ( )

Return the fixed height value for the large tool path panel UI element.

Returns
(string) The height in screen units ("533")
Note
Documentation generated by AI on 2026-03-03

◆ GetNumber()

cyc PASSES GetNumber ( )

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

Get the current remaining dressing passes count from pound variable 9082.

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

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

Reads the pound variable specified by self.PoundVar (default #9080) via a w.pcall-protected w.api call. Returns 0 if the read fails or the value cannot be converted to a number, otherwise returns the current state number.

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

Reads pound variable #9082 via w.pcall-protected w.api call. Returns 0 if the read fails, otherwise returns the current pass count as a number.

Returns
(number) The current remaining pass count, 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

Uses w.pcall() to safely call w.api('mcCntlGetPoundVar') with pound variable 9082. If the call fails for any reason, returns 0 as a safe default. Otherwise returns the current pass count value.

Returns
(number) The number of remaining dressing passes, or 0 if the value cannot be read
Note
Documentation generated by AI on 2026-03-03

◆ GetPartKickerMoveToLoadPositionGCode()

GrinderCenterlessScreenV02 GetPartKickerMoveToLoadPositionGCode ( )

Generate the G-code string to move the Part Kicker OB Axis to the load position.

When the OB Axis part kicker type is enabled, reads the load position from pound variable #9068 and constructs a two-line G-code string using M246 commands to select the OB axis and move it to the load position at the configured feedrate. Returns an empty string when the OB axis type is not enabled.

Returns
(string) G-code string for moving the Part Kicker OB axis to load position, or "" if not applicable
Note
Documentation generated by AI on 2026-03-03

◆ GetSmallToolPathGroupBgImageName()

GrinderCenterlessScreenV02 GetSmallToolPathGroupBgImageName ( )

Return the background image name for the small tool path group.

Returns
(string) The background image filename ("Small Tool Path Background (UGS).png")
Note
Documentation generated by AI on 2026-03-03

◆ GetSmallToolPathGroupHeight()

GrinderCenterlessScreenV02 GetSmallToolPathGroupHeight ( )

Return the fixed height value for the small tool path group UI element.

Returns
(string) The height in screen units ("379")
Note
Documentation generated by AI on 2026-03-03

◆ GetSmallToolPathPanelHeight()

GrinderCenterlessScreenV02 GetSmallToolPathPanelHeight ( )

Return the fixed height value for the small tool path panel UI element.

Returns
(string) The height in screen units ("379")
Note
Documentation generated by AI on 2026-03-03

◆ GetWheelAttributes()

GrinderCenterlessScreenV02 GetWheelAttributes ( )

Retrieve the wheel attributes table from the aux module.

Delegates to aux.GetWheelAttributes() to obtain the full list of wheel parameter field definitions used for mapping between tool table fields and pound variables.

Returns
(table) The wheel attributes table from aux.GetWheelAttributes()
Note
Documentation generated by AI on 2026-03-03

◆ GoToThruFeedGrindPosition()

GrinderCenterlessScreenV02 GoToThruFeedGrindPosition ( use_confirmation )

Move the active slide axis to the Thru-Feed grind position via MDI.

Optionally shows a Cycle Start confirmation dialog before issuing the motion command. Reads the grind (finish) position from pound variable #516 and executes a G90 G00 MDI move to that position using the current upper/lower axis letter.

Parameters
use_confirmation(boolean) If true, shows a confirmation dialog before moving
Returns
(nil) No primary return value
(boolean) Success flag - false if user cancels, axis ID lookup fails, or MDI fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ GoToThruFeedRetractPosition()

GrinderCenterlessScreenV02 GoToThruFeedRetractPosition ( use_confirmation )

Move the active slide axis to the Thru-Feed retract position via MDI.

Optionally shows a Cycle Start confirmation dialog before issuing the motion command. Reads the retract position from pound variable #512 and executes a G90 G00 MDI move to that position using the current upper/lower axis letter.

Parameters
use_confirmation(boolean) If true, shows a confirmation dialog before moving
Returns
(nil) No primary return value
(boolean) Success flag - false if user cancels, axis ID lookup fails, or MDI fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ GrindDressCompDiamondOperatorPanelBtn()

GrinderCenterlessScreenV02 GrindDressCompDiamondOperatorPanelBtn ( diamond_traverse ,
Direction ,
Amount  )

Apply a compensation adjustment to a Grind Wheel dresser axis from the operator panel.

Logs the operator action, validates that the machine is enabled, then dispatches to Comp() with Type 3 (dresser compensation) for the appropriate axis based on diamond_traverse: "Diamond" maps to Y_AXIS, "Traverse" maps to X_AXIS. Defaults Direction to 1 and Amount to "Fine" if not provided.

Parameters
diamond_traverse(string) The dresser component to compensate: "Diamond" or "Traverse"
Direction(number|nil) Compensation direction: 1 (out) or -1 (in). Defaults to 1 if nil
Amount(string|nil) Compensation step size: "Fine" or "Coarse". Defaults to "Fine" if nil
Returns
(nil) No primary return value
(boolean) Success flag - false if machine is disabled or invalid selection
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Warning
The machine must be enabled before calling this function
Note
Documentation generated by AI on 2026-03-03

◆ GrindDressTeachDiamondOperatorPanelBtn()

GrinderCenterlessScreenV02 GrindDressTeachDiamondOperatorPanelBtn ( diamond_traverse )

Teach the Grind Wheel dresser diamond or traverse position from the operator panel.

Logs the operator action and validates that the machine is enabled and the Grind Wheel tab is currently active. If "Diamond" is selected, teaches the "2DressPosition_1" field and then moves Y axis to home (Y0.0). If "Traverse" is selected, teaches the "1DressPosition_1" field without a subsequent move.

Parameters
diamond_traverse(string) The dresser component to teach: "Diamond" or "Traverse"
Returns
(nil) No primary return value
(boolean) Success flag - false if machine is disabled, wrong tab, or invalid selection
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Warning
The machine must be enabled and the Grind Wheel tab must be active
Note
Documentation generated by AI on 2026-03-03

◆ GWCustomDressProfileBtn()

GrinderCenterlessScreenV02 GWCustomDressProfileBtn ( )

Toggle the Grind Wheel custom dress profile program on or off.

Reads the current grind wheel custom dress subroutine number from pound variable #518. If the subroutine number is non-zero, stores it via StoreLastGrindDressCustomProgram() and then clears #518 to zero (disabling the custom profile). If zero, reads the last stored program number from the machine profile and writes it to #518 (enabling the custom profile). Updates the grind wheel custom dress profile UI via UpdateGWCustomDressProfile() afterwards.

Returns
(nil) No primary return value
(boolean) False if a pound variable read or write fails
(string) Status message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ hidden()

GrinderCenterlessScreenV02 LayoutObjects hidden ( value )

Set the hidden state of a named row in the LayoutObjects grid.

Searches the ObjectsInRows array for an entry whose "Name" key matches the provided name string, and sets its "Hidden" field to the specified value. Only the first matching entry is updated; the loop exits immediately after the match.

Parameters
name(string) The row name to search for (matched against ObjectsInRows[i]["Name"])
value(boolean) The hidden state to assign: true to hide the row, false to show it
Note
Documentation generated by AI on 2026-03-03

◆ HideInScreenGCodeEditor()

GrinderCenterlessScreenV02 HideInScreenGCodeEditor ( )

Hide the in-screen G-code editor and restore the standard tool path display.

Moves the GCodeEditor off-screen by setting its Left position to 10000, then restores the ToolDisplayGroup and ModalsGroup to visible, and calls SetGCodeDisplayToLastSize() to restore the tool path panel to its previous dimensions.

Note
Documentation generated by AI on 2026-03-03

◆ InFeedCycleRepeatOff()

GrinderCenterlessScreenV02 InFeedCycleRepeatOff ( )

Disable the In-Feed cycle repeat feature.

Sets Mach4 parameter 1920 to 0 to disable automatic cycle repeat for the In-Feed grind cycle.

Note
Documentation generated by AI on 2026-03-03

◆ InFeedCycleRepeatOn()

GrinderCenterlessScreenV02 InFeedCycleRepeatOn ( )

Enable the In-Feed cycle repeat feature.

Sets Mach4 parameter 1920 to 1 to enable automatic cycle repeat for the In-Feed grind cycle.

Note
Documentation generated by AI on 2026-03-03

◆ InFeedCycleRepeatToggle()

GrinderCenterlessScreenV02 InFeedCycleRepeatToggle ( )

Toggle the In-Feed cycle repeat setting on or off.

Checks the current repeat state via IsInFeedCycleRepeatOn() and calls either InFeedCycleRepeatOff() or InFeedCycleRepeatOn() accordingly.

Note
Documentation generated by AI on 2026-03-03

◆ Initialize()

GrinderCenterlessScreenV02 CYCLE Initialize ( )

Initialize the CYCLE state machine for the Centerless Grinder screen.

Sets up the complete CYCLE object including pound variable mappings, STATE and TYPE lookup tables, PASSES tracking, and helper methods. Specifically:

  • Sets CYCLE.StateV = 9080 and CYCLE.TypeV = 9081
  • Calls CYCLE.SetStateToIdle() to reset to idle
  • Defines CombLabels = {"CurrentCycleLabel"} and UpdateCombLabels() method
  • Defines STATE table with all known grind cycle states (0=Idle through 411=Load Dwell) and STATE:GetNumber() method that reads #9080
  • Defines TYPE table with all known cycle types (0=empty through 369=Dress RW Profile, etc.) and TYPE.GetNumber aliased to STATE.GetNumber but reading #9081
  • Defines PASSES table with PoundVar = 9082 and PASSES:GetNumber() method
    Note
    Documentation generated by AI on 2026-03-03

◆ InitializeCenterlessGrinder()

GrinderCenterlessScreenV02 InitializeCenterlessGrinder ( )

Initialize all Centerless Grinder-specific screen objects and UI state.

Performs the complete initialization sequence for the Centerless Grinder screen, including:

  • Sets button color stage constants (BTN_COLOR_STAGE_1/2/3)
  • Initializes UPPER_SLIDE_AXIS_ID and LOWER_SLIDE_AXIS_ID via aux.GetUpperLowerAxisID()
  • Clears the retraction interlock via SetRetracting(false)
  • Initializes the signal script handler table via InitializeSignalScript()
  • Sets the In-Feed background image based on diameter mode (parameter 1912)
  • Enables or disables the UpperSlideBtn and LowerSlideBtn based on axis availability
  • Shows or hides the In-Feed tab/group based on the "InFeedEnabled" OEM parameter
  • Shows or hides the Thru-Feed tab/group based on the "ThruFeedEnabled" OEM parameter
  • Shows or hides the Rotary Dresser group and Dashboard group based on "RotaryDresserEnabled"
  • Shows or hides the HydraulicsBtn based on "HydraulicsEnabled"
  • Resets B and C axis text and button colors to off
  • Configures TotalUpperLowerCompDRO or TotalUpperLowerCompDRO(2) register mapping
    Note
    Documentation generated by AI on 2026-03-03

◆ InitializeGrindDress()

GrinderCenterlessScreenV02 InitializeGrindDress ( )

Initialize and layout the Grind Wheel dressing controls panel.

Builds a dynamic grid layout for the Grind Wheel (wheel 1) parameters, then shows or hides individual rows and UI groups based on current configuration. Specifically:

  • Reads GrindWheelHideClearanceValues OEM parameter to conditionally hide clearance fields
  • Reads GrindWheelMaxSpeedAutoCalculated to set MaxRPM/MaxSFM DROs to read-only or editable
  • Reads the SFM mode from pound variable #9048 to toggle between RPM and SFM display rows
  • Reads RotaryDresserEnabled and pound variable #9049 to toggle rotary dresser RPM/SFM rows
  • Shows or hides X-axis objects (traverse teach button, diamond DRO, width/clearance rows) based on X_AXIS enabled state and GrindDressEnabled
  • Shows or hides Y-axis objects (diamond teach button, DRO, circumference row) based on Y_AXIS enabled state and GrindDressEnabled
  • Shows or hides comp buttons (GWCompGroupX, GWCompGroupY) based on GrindDressShowCompButtons OEM parameter
  • Shows or hides sub-tab groups (servo settings vs simple settings) based on axis availability
  • Updates GrindWheelTab background image to indicate dressing enabled/disabled state After configuring all visibility, calls grind_wheel_grid:layout() to apply the layout.
    Returns
    (nil) No primary return value
    (boolean) False if any OEM parameter or pound variable read fails
    (string) Status message from w.FunctionCompleted() or w.FunctionError()
    Note
    Documentation generated by AI on 2026-03-03

◆ InitializeGrindMode()

GrinderCenterlessScreenV02 InitializeGrindMode ( )

Initialize the active grind mode based on enabled features and the current operation tab.

Reads the "InFeedEnabled" and "ThruFeedEnabled" OEM parameter strings and checks the current label of the OperationTabs notebook. Sets the screen-level GrindMode variable:

  • 1 if InFeedEnabled is "Yes" and the current tab is "In-Feed"
  • 2 if ThruFeedEnabled is "Yes" and the current tab is "Thru-Feed"
  • 0 otherwise
    Returns
    (nil) No primary return value
    (boolean) False if either OEM parameter read fails
    (string) Status message from w.FunctionError() on error
    Note
    Documentation generated by AI on 2026-03-03

◆ InitializeInFeedRates()

GrinderCenterlessScreenV02 InitializeInFeedRates ( )

Initialize the In-Feed rates panel layout based on regulating wheel speed configuration.

Reads whether the Regulating Wheel Speeds in Cycle feature is enabled via IsRegulatingWheelSpeedsInCycleOn(). When enabled, shows the InFeedRegulatingWheelGroup and positions InFeedFeedratesGroup at Top = 349. When disabled, positions InFeedFeedratesGroup at Top = 385 and hides InFeedRegulatingWheelGroup.

Note
Documentation generated by AI on 2026-03-03

◆ InitializeOperatorPanels()

GrinderCenterlessScreenV02 InitializeOperatorPanels ( )

Configure operator panel button mappings specific to the Centerless Grinder.

Iterates through all configured operator panels and remaps spindle button commands for panels with part number "X15-14-21". On matching panels, the spindle forward button is mapped to "Grind Wheel Toggle", the spindle stop button is mapped to "Grind Wheel Off", and the spindle reverse command is cleared. This customizes the operator panel to control the grind wheel instead of the standard spindle.

Note
Only panels with PartNumber "X15-14-21" are affected; other panel types are unchanged
Documentation generated by AI on 2026-03-03

◆ InitializeRegulatingDress()

GrinderCenterlessScreenV02 InitializeRegulatingDress ( )

Initialize and layout the Regulating Wheel dressing controls panel.

Builds a dynamic grid layout for the Regulating Wheel (wheel 2) parameters, then shows or hides individual rows and UI groups based on current configuration. Specifically:

  • Reads RegulatingWheelHideClearanceValues OEM parameter to conditionally hide clearance fields
  • Reads RegulatingWheelMaxSpeedAutoCalculated to set MaxRPM/MaxSFM DROs to read-only or editable
  • Reads the SFM mode from pound variable #9148 to toggle between RPM and SFM display rows
  • Shows or hides Z-axis objects (traverse teach button, diamond DRO, width/clearance rows) based on Z_AXIS enabled state and RegDressEnabled
  • Shows or hides A-axis objects (diamond teach button, DRO, circumference row) based on A_AXIS enabled state and RegDressEnabled
  • Shows or hides comp buttons (RWCompGroupZ, RWCompGroupA) based on RegDressShowCompButtons OEM parameter
  • Shows or hides sub-tab groups (servo settings vs simple settings) based on axis availability
  • Updates RegulatingWheelTab background image to indicate dressing enabled/disabled state After configuring all visibility, calls reg_wheel_grid:layout() to apply the layout.
    Returns
    (nil) No primary return value
    (boolean) False if any OEM parameter or pound variable read fails
    (string) Status message from w.FunctionCompleted() or w.FunctionError()
    Note
    Documentation generated by AI on 2026-03-03

◆ InitializeSignalScript()

GrinderCenterlessScreenV02 InitializeSignalScript ( )

Initialize the signal script handler table for all configured Mach4 instances.

For each Mach4 instance (0 to GetInstanceCount()-1), resolves the signal IDs for all mapped OEM parameter signals and registers handler closures in MACHINE_TYPE_SIG_LIBRARY_INST. Signals handled include:

◆ InitializeThruFeedPartCounter()

GrinderCenterlessScreenV02 InitializeThruFeedPartCounter ( )

Initialize the Thru-Feed part counter signal handler and persistent I/O points.

If the Thru-Feed part counter is disabled (IsThruFeedPartCounterEnabled() returns false), removes the "Grinding Wheel Dress Required" and "Regulating Wheel Dress Required" I/O points and returns early. Otherwise, creates both I/O points as permanent inputs, then looks up the ThruFeedPartCounterInput OEM parameter signal ID. If the signal is mapped and valid, registers a signal library handler that calls UpdateThruFeedPartCounter() on each falling edge (rising edge sets THRU_FEED_PART_COUNTER_STATE, falling edge triggers the count and clears it).

Note
The signal handler counts falling edges; rapid toggling is handled by the state flag THRU_FEED_PART_COUNTER_STATE
Documentation generated by AI on 2026-03-03

◆ InitializeTolerances()

GrinderCenterlessScreenV02 InitializeTolerances ( )

Initialize all position tolerance values from imperial defaults converted to current units.

Converts and stores the following tolerance values using w.ConvertFromImperialToCurrentUnits():

  • EmergencyRetractDistance: 0.1 inches
  • EmergencyRetractMinDistance: 0.01 inches
  • Tolerance: 0.00005 inches (general position tolerance)
  • InPositionToleranceStandard: 0.001 inches
  • InPositionToleranceFine: 0.0001 inches All values are stored on the m.screen object for use by other functions.
    Note
    Documentation generated by AI on 2026-03-03

◆ InitializeToolTableFields()

GrinderCenterlessScreenV02 InitializeToolTableFields ( )

Initialize or update the tool table user field definitions for Centerless Grinder wheel attributes.

Defines a comprehensive field_table containing all wheel parameter fields for both Grind Wheel (_1 suffix) and Regulating Wheel (_2 suffix), including diameter, width, minimum diameter, minimum width, max RPM, SFM, commanded RPM, dress positions, safety clearance values, rotary dresser parameters, and speed mode choices. If the tool table is initialized, checks whether all fields already exist via w.IsToolTableUserFieldList(). If any fields are missing, writes the complete field list via w.AddToolTableUserFieldList(). If the tool table is not initialized, logs a warning and skips the write.

Returns
(boolean) True if fields were verified or created successfully
(boolean) Success flag - false if any tool table operation fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ IsAtLoadPosition()

GrinderCenterlessScreenV02 IsAtLoadPosition ( )

Check whether both the main slide and secondary slide are at their load positions.

Reads the appropriate load position from pound variable #500 (In-Feed) or #512 (Thru-Feed) depending on the active grind mode. Compares the main slide axis position against the load position using InPositionToleranceStandard. If the secondary slide axis is enabled, also compares it against the RW retract position (#515). Returns true only when both slides are within tolerance of their respective load positions.

Returns
(boolean) True if both slides are at load position, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsAtThruFeedGrindPosition()

GrinderCenterlessScreenV02 IsAtThruFeedGrindPosition ( )

Check whether the upper/lower slide axis is at the Thru-Feed grind position.

Retrieves the active upper/lower axis ID via aux.GetUpperLowerAxisID(), reads the current axis position, and compares it against the Thru-Feed grind (finish) position from pound variable #516. Returns true if the axis is within InPositionToleranceFine of the grind position.

Returns
(boolean) True if the axis is at the Thru-Feed grind position, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsAtThruFeedRetractPosition()

GrinderCenterlessScreenV02 IsAtThruFeedRetractPosition ( )

Check whether the upper/lower slide axis is at the Thru-Feed retract position.

Retrieves the active upper/lower axis ID via aux.GetUpperLowerAxisID(), reads the current axis position, and compares it against the Thru-Feed retract position from pound variable #512. Returns true if the axis is within InPositionToleranceStandard of the retract position.

Returns
(boolean) True if the axis is at the Thru-Feed retract position, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsDisableWheelsStartingAutomaticallyOn()

GrinderCenterlessScreenV02 IsDisableWheelsStartingAutomaticallyOn ( )

Check whether the "Disable Wheels Starting Automatically" feature is enabled.

Reads Mach4 parameter 1929 using the cached parameter accessor. Returns true when the parameter value equals 1, meaning wheels must be started manually before cycle start.

Returns
(boolean) True if automatic wheel starting is disabled, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsDressInterruptActive()

GrinderCenterlessScreenV02 IsDressInterruptActive ( )

Check whether the dress interrupt is currently active.

Reads pound variable #998 from the Mach4 controller. Returns true when the value equals 1, indicating a dress interrupt has been requested during a grind cycle.

Returns
(boolean) True if the dress interrupt is active, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsEditModeActive()

GrinderCenterlessScreenV02 IsEditModeActive ( )

Check whether Edit Mode is currently active based on button background color.

Checks the background color of "SetInFeedGrindPositionBtn" (or "SetThruFeedGrindPositionBtn" if the first is not found) against the standard button off color. If the color matches the off color, Edit Mode is inactive; otherwise it is active.

Returns
(boolean) True if Edit Mode is active, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsGCodeDisplayExtraLargeEnabled()

GrinderCenterlessScreenV02 IsGCodeDisplayExtraLargeEnabled ( )

Check whether the extra-large G-code display mode is enabled for this screen.

Always returns false, indicating the extra-large G-code display is unconditionally disabled for the Centerless Grinder screen.

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

◆ IsGrindPositionSet()

GrinderCenterlessScreenV02 IsGrindPositionSet ( )

Check whether the grind position has been calibrated.

Reads the "IsGrindPositionSet" integer from the "MachMotion" Mach4 profile section. Returns true when the stored value equals 1, indicating the grind position has been set.

Returns
(boolean) True if the grind position has been calibrated, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsGrindWheelDressing()

GrinderCenterlessScreenV02 IsGrindWheelDressing ( )

Check whether the Grind Wheel is currently in a dress cycle.

Returns true if the screen-level IsGrindWheelDressCycle flag is set, or if aux.IsGrindWheelDressing() returns true. When the aux function detects active dressing, the local flag is cleared (set to false) before returning true.

Returns
(boolean) True if the grind wheel is currently dressing, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsGrindWheelDressingEnabled()

GrinderCenterlessScreenV02 IsGrindWheelDressingEnabled ( )

Check whether Grind Wheel dressing is enabled in OEM parameters.

Reads the "GrindDressEnabled" OEM parameter string and returns true if the value is "Yes".

Returns
(boolean) True if grind wheel dressing is enabled, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsGrindWheelEnabled()

GrinderCenterlessScreenV02 IsGrindWheelEnabled ( )

Check whether the Grind Wheel is enabled.

Delegates to aux.IsGrindWheelEnabled() to determine grind wheel availability. The Grind Wheel on Centerless Grinders uses the Mach spindle control system.

Returns
(boolean) True if the grind wheel is enabled, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsHydraulicsEnabled()

GrinderCenterlessScreenV02 IsHydraulicsEnabled ( )

Check whether the hydraulics system is enabled.

Delegates to aux.IsHydraulicsEnabled() to determine hydraulics availability.

Returns
(boolean) True if hydraulics are enabled, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsInFeedCycleRepeatOn()

GrinderCenterlessScreenV02 IsInFeedCycleRepeatOn ( )

Check whether the In-Feed cycle repeat feature is currently enabled.

Reads Mach4 parameter 1920 using the cached parameter accessor. Returns true when the parameter value equals 1.

Returns
(boolean) True if In-Feed cycle repeat is enabled, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsInFeedModeActive()

GrinderCenterlessScreenV02 IsInFeedModeActive ( )

Check whether In-Feed grind mode is currently active.

Returns true when the screen-level GrindMode variable equals 1.

Returns
(boolean) True if In-Feed mode is active, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsInterlockThatForcesRegulatingWheelToBeOnBeforeTheGrindinWheelOn()

GrinderCenterlessScreenV02 IsInterlockThatForcesRegulatingWheelToBeOnBeforeTheGrindinWheelOn ( )

Check whether the interlock requiring the Regulating Wheel to be on before the Grind Wheel is active.

Reads Mach4 parameter 1927 using the cached parameter accessor. Returns true when the parameter value equals 0, meaning the interlock that forces the regulating wheel to be running before the grinding wheel can start is active.

Returns
(boolean) True if the interlock is active (parameter == 0), false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsPartKicker()

GrinderCenterlessScreenV02 IsPartKicker ( )

Check whether the Part Kicker output signal is currently active.

Reads the "PartKickerOutput" OEM signal state if it is mapped. Returns true when the output is on (kicker is extended), false otherwise (including when not mapped).

Returns
(boolean) True if the Part Kicker output is currently active, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsPartKickerAtPosition()

GrinderCenterlessScreenV02 IsPartKickerAtPosition ( PositionName )

Check whether the Part Kicker OB Axis is at the specified named position.

Only valid when the OB Axis part kicker type is enabled. Reads the target position from pound variable #9067 (Home), #9068 (Load), or #9069 (Extend) based on PositionName. Compares the current OB axis machine position against the target using InPositionToleranceStandard. Returns false when the OB axis type is not enabled.

Parameters
PositionName(string) The named position to check: "Home", "Load", or "Extend"
Returns
(boolean) True if the OB axis is within tolerance of the named position, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsPartKickerEnabled()

GrinderCenterlessScreenV02 IsPartKickerEnabled ( )

Check whether the Part Kicker feature is enabled (cached).

Uses the w.IsCached()/w.GetCache()/w.SetCache() pattern to cache the result per instance. Delegates to aux.IsPartKickerEnabled() on cache miss and stores the result.

Returns
(boolean) True if the part kicker is enabled, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsPartKickerTypeOBAxisEnabled()

GrinderCenterlessScreenV02 IsPartKickerTypeOBAxisEnabled ( )

Check whether the Part Kicker OB Axis type is enabled and configured.

Uses the w.IsCached()/w.GetCache()/w.SetCache() pattern to cache the result per instance. Reads the "PartKickerTypeOBAxis" OEM parameter string and the "PartKickerOBAxisID" OEM parameter value, then checks that the specified OB axis is enabled. Returns true only when aux.IsPartKickerEnabled() is true, PartKickerTypeOBAxis is "Yes", and the OB axis is enabled.

Returns
(boolean|nil) True if the OB axis part kicker type is enabled, false otherwise, or nil on error
(boolean) Success flag - false if any OEM parameter read fails
(string) Status message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ IsPartLoaderLoad()

GrinderCenterlessScreenV02 IsPartLoaderLoad ( )

Check whether the part loader is currently executing a load cycle.

Reads pound variable #9080 from the Mach4 controller. Returns true when the value equals 6, indicating the part loader is in the load cycle state.

Returns
(boolean) True if the part loader is loading, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsPartLoaderReady()

GrinderCenterlessScreenV02 IsPartLoaderReady ( )

Validate all preconditions required before running a part loader cycle.

Checks the following conditions in order, displaying a warning message and returning false if any check fails:

  • Part loader must be on (aux.IsPartLoaderOn())
  • If PartLoaderAllowLoaderOperationsInSetupRun is not "Yes", Setup Run (MSTLock) must be off
  • Machine must be enabled (MACH_ENABLED)
  • Machine must be in IDLE state (MACH_STATE == MC_STATE_IDLE)
  • Slides must be at the load position (IsAtLoadPosition()); if not, calls MoveToLoadPosition()
    Returns
    (boolean) True if all preconditions are satisfied, false if any check fails
    Note
    Documentation generated by AI on 2026-03-03

◆ IsPartLoaderUnload()

GrinderCenterlessScreenV02 IsPartLoaderUnload ( )

Check whether the part loader is currently executing an unload cycle.

Reads pound variable #9080 from the Mach4 controller. Returns true when the value equals 7, indicating the part loader is in the unload cycle state.

Returns
(boolean) True if the part loader is unloading, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsRegulatingWheelDressing()

GrinderCenterlessScreenV02 IsRegulatingWheelDressing ( )

Check whether the Regulating Wheel is currently in a dress cycle.

Returns true if the screen-level IsRegWheelDressCycle flag is set, or if aux.IsRegulatingWheelDressing() returns true. When the aux function detects active dressing, the local flag is cleared (set to false) before returning true.

Returns
(boolean) True if the regulating wheel is currently dressing, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsRegulatingWheelDressingEnabled()

GrinderCenterlessScreenV02 IsRegulatingWheelDressingEnabled ( )

Check whether Regulating Wheel dressing is enabled in OEM parameters.

Reads the "RegDressEnabled" OEM parameter string and returns true if the value is "Yes".

Returns
(boolean) True if regulating wheel dressing is enabled, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsRegulatingWheelEnabled()

GrinderCenterlessScreenV02 IsRegulatingWheelEnabled ( )

Check whether the Regulating Wheel is enabled.

Delegates to aux.IsRegulatingWheelEnabled() to determine regulating wheel availability.

Returns
(boolean) True if the regulating wheel is enabled, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsRegulatingWheelSpeedsInCycleOn()

GrinderCenterlessScreenV02 IsRegulatingWheelSpeedsInCycleOn ( )

Check whether the Regulating Wheel Speeds in Cycle feature is enabled.

Reads Mach4 parameter 1933 using the cached parameter accessor. Returns true when the parameter value equals 1.

Returns
(boolean) True if regulating wheel speeds are shown in the In-Feed cycle, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsRetracting()

GrinderCenterlessScreenV02 IsRetracting ( )

Get the current retracting interlock state.

Returns the screen-level _IsRetracting flag, which indicates whether a retraction sequence is currently in progress.

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

◆ IsThruFeedModeActive()

GrinderCenterlessScreenV02 IsThruFeedModeActive ( )

Check whether Thru-Feed grind mode is currently active.

Returns true when the screen-level GrindMode variable equals 2.

Returns
(boolean) True if Thru-Feed mode is active, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsThruFeedPartCounterEnabled()

GrinderCenterlessScreenV02 IsThruFeedPartCounterEnabled ( )

Check whether the Thru-Feed part counter feature is enabled.

Always returns true, indicating the Thru-Feed part counter is unconditionally enabled for this screen. Override in user scripts to conditionally disable the counter.

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

◆ IsWheelsInPositionPartLoader()

GrinderCenterlessScreenV02 IsWheelsInPositionPartLoader ( )

Check whether both the main slide and secondary slide are in position for the part loader.

Determines the main slide in-position state based on the "PartLoaderUserLoadPositionFromScreen" OEM parameter: if "Yes", uses the cached MainSlideIsAtLoadPosition screen variable; otherwise reads the "PartLoaderMachinePosition" OEM parameter and compares the current upper/lower axis machine position against it using InPositionToleranceStandard. Returns true only when both the main slide and the SecondarySlideIsAtLoadPosition screen variable are true.

Returns
(boolean) True if both slides are in position for the part loader, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ layout()

GrinderCenterlessScreenV02 LayoutObjects layout ( )

Lay out all visible objects in the LayoutObjects grid.

Iterates through ObjectsInRows and positions each non-hidden row within the container. For each visible row, finds the tallest object to determine the row height, checks if the current column is full (top + row height exceeds Container.Height) and advances to a new column if necessary. Within each row, objects are placed left-to-right with per-object or default horizontal spacing. Objects shorter than the row height are vertically centered via an offset. Hidden rows have all their objects set to Hidden = "1". After all rows are processed, calls w.FunctionCompleted().

Note
Objects with empty height strings trigger a warning dialog and are treated as height 0
Documentation generated by AI on 2026-03-03

◆ LoadJobFileFinal()

GrinderCenterlessScreenV02 LoadJobFileFinal ( )

Finalize loading a job file by writing pound variables to the tool table and updating UI.

Called after a job file is opened. Reads the pound variable table from the current job, then for each pound variable >= 9000, searches the wheel attributes table for a matching field and writes the value to the tool table via mc.mcToolSetDataExDbl(). Additionally:

  • If pound variable #518 (Grind Dress profile number) is non-zero, stores and updates the GW custom dress profile
  • If pound variable #519 (Reg Dress profile number) is non-zero, stores and updates the RW custom dress profile After processing all variables, updates wheel attributes, wheel speed mode buttons, and reinitializes the grind and regulating dress panels.
    Returns
    (nil) No primary return value
    (boolean) False if the current tool number read or any tool table write fails
    (string) Status message from w.FunctionCompleted() or w.FunctionError()
    Note
    Documentation generated by AI on 2026-03-03

◆ LowerSlideBtn()

GrinderCenterlessScreenV02 LowerSlideBtn ( )

Select the Lower Slide as the active upper/lower axis and refresh the axis position group.

Sets Mach4 parameter 1900 to 1 to select the Lower Slide axis, then calls InitializeAxisPositionGroup() to refresh the axis display.

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

◆ MachineAutoLoadLastGCode()

GrinderCenterlessScreenV02 MachineAutoLoadLastGCode ( )

Handle post-auto-load tab selection for multi-instance Centerless Grinder configurations.

After auto-loading the last G-code file, checks whether the selected instance is instance 1. If so, switches the OperationTabs notebook to tab index 4 (the Loader tab) to show the loader controls for the secondary instance.

Note
Documentation generated by AI on 2026-03-03

◆ MachineCreatePreCannedCommands()

GrinderCenterlessScreenV02 MachineCreatePreCannedCommands ( )

Register all pre-canned commands available for the Centerless Grinder screen.

Creates and registers the full set of operator commands specific to the Centerless Grinder, including action options and feedback options. Commands registered include:

  • Setup Run Toggle
  • Regulating Wheel speed controls (Grind/Dress speed toggles)
  • Cycle Repeat
  • Dress Interrupt
  • Emergency Retract
  • Thru-Feed position controls (Grind/Retract)
  • Slide compensation (Coarse/Fine In/Out)
  • Grind Dress and Regulating Dress diamond compensation
  • Part Kicker controls (manual cycle, teach positions, move to positions)
  • Move To Load Position
  • Part Loader controls (toggle, load/unload, machine empty, gripper offset)
  • Set Grind Position
  • Regulating Wheel Speeds in Cycle toggle
    Note
    This function is registered via m.CommandRegistrar during screen load
    Documentation generated by AI on 2026-03-03

◆ MachineCycleStartFinal()

GrinderCenterlessScreenV02 MachineCycleStartFinal ( )

Validate state and dispatch to the correct cycle start handler based on the active operation tab.

Performs pre-cycle-start checks and dispatches to the appropriate operation when the machine is IDLE and no M00 is active. Specifically:

  • Prevents starting from the Grinder Settings service page
  • For Grind Wheel tab: checks GrindDressEnabled and optional wheel-on interlock
  • For Regulating Wheel tab: checks RegDressEnabled and optional wheel-on interlock
  • For In-Feed tab: validates InFeedEnabled, load position, and cycle data
  • For Thru-Feed tab: validates ThruFeedEnabled, load position, and cycle data
  • For dress sub-tabs (Standard Dress, New Wheel Dress): shows confirmation and starts via CycleStartMainProgramOnly()
  • For In-Feed and Thru-Feed: validates that grind position is set and both wheels are on When the machine is not IDLE or M00 is active, clears RunDressCycle flag and proceeds.
    Returns
    (boolean) False if a pre-cycle check fails, true on success
    (boolean) Success flag
    (string) Status message from w.FunctionCompleted() or w.FunctionError()
    Warning
    The machine must pass all interlock checks before the cycle will start
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineCycleStopFinal()

GrinderCenterlessScreenV02 MachineCycleStopFinal ( CustomMode )

Perform the final cycle stop sequence for the Centerless Grinder.

Called when a cycle stop is processed. Executes the following in order:

  • Sets the regulating wheel to grind speed
  • Moves to the retract position appropriate for the current mode via MoveToRetractPosition()
  • Rewinds the G-code file via mc.mcCntlRewindFile()
  • Sets the cycle state to idle
  • Clears all wheel dress cycle flags
    Parameters
    CustomMode(number|nil) The retraction mode selector. Defaults to 0 if nil
    Returns
    (boolean) True on success
    (boolean) Success flag - false if the file rewind fails
    (string) Status message from w.FunctionCompleted() or w.FunctionError()
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineDisable()

GrinderCenterlessScreenV02 MachineDisable ( )

Reset machine state flags and set the cycle to idle on machine disable.

Clears the dress cycle flags via ClearIsWheelInDressCycleFlags() and sets the cycle state to idle via CYCLE.SetStateToIdle() when the machine is disabled.

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

◆ MachinePostAutoLoadLastGCode()

GrinderCenterlessScreenV02 MachinePostAutoLoadLastGCode ( )

Restore the last saved operation tab after auto-loading the last G-code file.

Called after the auto-load last G-code sequence completes. Delegates to RestoreLastRunTabIndex() to set the OperationTabs notebook back to the previously saved tab index.

Note
Documentation generated by AI on 2026-03-03

◆ MachineScreenLoadScript()

GrinderCenterlessScreenV02 MachineScreenLoadScript ( )

Execute all machine-specific screen load initialization for the Centerless Grinder.

Called during the screen load sequence. Performs the following initialization in order:

  • Calls CommonGrinderScreenLoadScript() for shared grinder initialization
  • Initializes position tolerances (emergency retract, in-position tolerances)
  • Disables G-code comment inclusion in messages
  • Initializes enabled axes using profile 1902
  • Initializes the CYCLE and STATUS state machines
  • Shows B, C, and OB1-OB6 axes; hides all others
  • Initializes tool table user field definitions for wheel attributes
  • Sets button color stage constants
  • Sets OEM parameters for GrindWheelSpeedOverride, RegulatingWheelSpeedOverride, and RotaryDresserSpeedOverride to 100
  • Creates and configures the CurrentJob object with pound variable range, register table, and header definitions
  • Registers the MachineCreatePreCannedCommands function with the CommandRegistrar
    Returns
    (nil) No primary return value
    (boolean) False if any OEM parameter write fails
    (string) Status message from w.FunctionError() on error
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineScreenLowPriorityLoop()

GrinderCenterlessScreenV02 MachineScreenLowPriorityLoop ( )

Execute all low-priority periodic updates for the Centerless Grinder screen.

Called at low priority to update UI elements that do not require real-time refresh. Performs the following updates in order:

  • Updates grinder wheel attributes (tool table data)
  • Updates grind wheel speed display
  • Updates grind wheel status indicators
  • Updates regulating wheel speed display
  • Updates regulating wheel status indicators
  • Updates rotary dresser status
  • Updates the current tab register
  • Updates low-priority grinder controls (comp buttons, slide selection, part counters)
  • Updates the grind position set indicator LEDs
  • Updates wheel speed mode buttons (RPM/SFM)
  • Updates hydraulics status
  • Updates grind and regulating wheel lube via aux module
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineScreenPLCScript()

GrinderCenterlessScreenV02 MachineScreenPLCScript ( )

Execute all real-time PLC cycle updates for the Centerless Grinder screen.

Called every PLC cycle to update time-critical UI state. Performs the following updates in order:

  • Updates the CYCLE state machine via CYCLE.Update()
  • Updates Thru-Feed position indicators and marquee LED
  • Updates In-Feed position indicators, marquee LED, and cycle state LEDs
  • Updates Part Kicker state machine and control outputs
  • Updates Part Loader interlock outputs and motion inhibit signals
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineScreenStartupScript()

GrinderCenterlessScreenV02 MachineScreenStartupScript ( )

Execute all machine-specific startup tasks for the Centerless Grinder screen.

Called during the screen startup sequence after the screen is loaded. Performs the following initialization in order:

  • Sets the machine type name label to "Mach Centerless"
  • Initializes all Centerless Grinder-specific screen objects
  • Initializes operator panels (remaps spindle buttons to grind wheel control)
  • Initializes the grind wheel controls and UI
  • Initializes the regulating wheel controls and UI
  • Sets the tool path view to bottom layout
  • Initializes In-Feed rate panel layout
  • Initializes the grind mode state
  • Loads the default Centerless Grinder G-code file (single-instance only)
    Returns
    (boolean) True on success
    (boolean) Success flag - always true
    (string) Status message from w.FunctionCompleted()
    Note
    Documentation generated by AI on 2026-03-03

◆ MarqueeObject()

GrinderCenterlessScreenV02 MarqueeObject ( marquee )

Animate a marquee indicator LED object to track axis position between two machine coordinates.

Computes a scaled screen position for a named UI object based on the current machine axis position mapped linearly between two machine coordinate endpoints (mach.start and mach.stop) and two screen pixel positions (object.start and object.stop). If the computed position falls outside the valid object range, moves the object off-screen (Left = 10000). Also positions the object vertically to object.top.

Parameters
marquee(table) Configuration table with keys:
  • name (string): The screen object name to position
  • axis (number): The Mach4 axis ID to read position from
  • description (string): Optional description for logging
  • mach.start (number): Machine coordinate at which the object is at object.start
  • mach.stop (number): Machine coordinate at which the object is at object.stop
  • object.top (number): The fixed top pixel position of the object
  • object.start (number): The pixel Left position corresponding to mach.start
  • object.stop (number): The pixel Left position corresponding to mach.stop
Note
Documentation generated by AI on 2026-03-03

◆ MoveToCycleStopRetractPosition()

GrinderCenterlessScreenV02 MoveToCycleStopRetractPosition ( Operation )

Perform a protected cycle stop retract sequence.

Wraps the internal _MoveToCycleStopRetractPosition() function in a w.pcall() for error protection. On error, returns a formatted error message. On success, returns the standard completion status.

Parameters
Operation(string|nil) The operation context for the retract (e.g., "In-Feed", "Grind Dressing"). Defaults to ""
Returns
(nil) No primary return value
(boolean) Success flag - false if the retract sequence raises an error
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ MoveToEmergencyRetractPosition()

GrinderCenterlessScreenV02 MoveToEmergencyRetractPosition ( )

Perform a protected emergency retract move sequence.

Wraps the internal _MoveToEmergencyRetractPosition() function in a w.pcall() for error protection. On error, returns a formatted error message. On success, returns the standard completion status.

Returns
(nil) No primary return value
(boolean) Success flag - false if the emergency retract sequence raises an error
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Warning
This function stops machine motion and moves axes; use only in emergency situations
Note
Documentation generated by AI on 2026-03-03

◆ MoveToLoadPosition()

GrinderCenterlessScreenV02 MoveToLoadPosition ( infeed_load_pos )

Move the active slide axis and optional secondary slide to the load or retract position.

Verifies homing status before moving. Reads the load position from pound variable #500 (In-Feed or forced infeed_load_pos) or #512 (Thru-Feed retract). Shows a Cycle Start confirmation dialog before executing the motion. Also moves the secondary slide (if enabled) to the RW retract position (#515). Incorporates the Part Kicker move-to-load-position G-code if applicable.

Parameters
infeed_load_pos(boolean|nil) If true, forces use of the In-Feed load position (#500) regardless of active mode. Defaults to false
Returns
(nil) No primary return value
(boolean) Success flag - false if not homed, user cancels, grind position not set, or MDI fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Warning
The machine must be homed before calling this function
Note
Documentation generated by AI on 2026-03-03

◆ MoveToRetractPosition()

GrinderCenterlessScreenV02 MoveToRetractPosition ( CustomMode )

Move the active slide to the retract position with reentrancy protection.

Checks the IsRetracting interlock before proceeding. If already retracting, returns immediately with an error. Otherwise selects the retract function based on CustomMode:

  • Mode 10: uses MoveToCycleStopRetractPosition
  • Mode 0: uses MoveToCycleStopRetractPosition
  • Any other mode: returns an error without retracting Sets the IsRetracting interlock to true before calling the retract function and clears it after completion (or on error) via w.pcall() for error protection.
    Parameters
    CustomMode(number) The retraction mode selector (0 or 10 for cycle stop retract)
    Returns
    (boolean|nil) The primary return value from the retract function, or nil on error
    (boolean) False if already retracting, mode is unrecognized, or the retract function raises an error
    (string) Status message from w.FunctionError() or the retract function result
    Note
    Documentation generated by AI on 2026-03-03

◆ new()

GrinderCenterlessScreenV02 LayoutObjects new ( grid_objects )

Create a new LayoutObjects grid instance from a configuration table.

Constructs a new LayoutObjects object using the provided grid_objects configuration table by copying all key-value pairs into a new metatable-based object. The grid_objects table should contain:

  • Padding (table): 'Top' and 'Left' starting offsets in pixels
  • ColumnSpacing (table): 'Vertical' and 'Horizontal' spacing between columns
  • SpacingWithinColumns (table): 'Vertical' and 'Horizontal' spacing between objects in a column
  • Container (table): 'Height' of the container to fill before wrapping to next column
  • ObjectsInRows (table): Array of row definitions, each containing object name strings and optional 'Name', 'Hidden', and 'Spacing' keys
    Parameters
    grid_objects(table) Configuration table defining the layout grid parameters and object rows
    Returns
    (table) A new LayoutObjects instance initialized with the provided configuration
    Note
    Documentation generated by AI on 2026-03-03

◆ NewDressProgramBtn()

GrinderCenterlessScreenV02 NewDressProgramBtn ( dresser_type )

Open the Profile Dressing wizard to create a new dress profile program.

Calls OpenDressProfiler() with sub_number = 0 to signal creation of a new program rather than editing an existing one.

Parameters
dresser_type(string) The dresser type for the new profile: "GrindWheel" or "RegWheel"
Note
Documentation generated by AI on 2026-03-03

◆ OnDestroy()

ProfileDressing OnDestroy ( )

Callback invoked when the Profile Dressing wizard window is destroyed.

Resets the m.screen.profile_dressing_open flag to false, allowing the Profile Dressing wizard to be reopened in the future. This is assigned as a closure inside OpenDressProfiler() immediately after the ProfileDressing module is loaded.

Note
This function is assigned dynamically and is not a named member of any module table
Documentation generated by AI on 2026-03-03

◆ OpenDressProfiler()

GrinderCenterlessScreenV02 OpenDressProfiler ( dresser_type ,
sub_number  )

Open the Profile Dressing wizard for editing or creating a dress profile.

Loads the ProfileDressing Lua module from the Wizards directory and initializes it with the specified dresser type and subroutine number. Uses an interlock flag (profile_dressing_open) to prevent opening multiple instances simultaneously. For existing profiles (sub_number > 0), validates that the file exists on disk before opening. The wizard's OnDestroy callback clears the interlock flag when the window is closed. File extensions used: .cgw for Grind Wheel profiles, .crw for Regulating Wheel profiles.

Parameters
dresser_type(string) The dresser type to edit: "GrindWheel" or "RegWheel"
sub_number(number) The subroutine number to open (0 to create a new profile)
Note
Only one instance of the Profile Dressing wizard can be open at a time
Warning
If the specified dress profile file does not exist on disk, a warning is displayed and the wizard is not opened
Note
Documentation generated by AI on 2026-03-03

◆ OpenDressProgramBtn()

GrinderCenterlessScreenV02 OpenDressProgramBtn ( dresser_type )

Open a file dialog to select and load an existing custom dress profile program.

Displays a file open dialog filtered to the appropriate dress profile file extension (.cgw for Grind Wheel, .crw for Regulating Wheel). Validates that the selected subroutine number is in the range 2000-3999. On successful selection, stores the program number to the profile and writes it to the appropriate pound variable (#518 or #519). The dialog loops until a valid subroutine is chosen or the user cancels.

Parameters
dresser_type(string) The dresser type: "GrindWheel" or "RegWheel"
Returns
(string) Empty string on cancel
(string) Empty string on cancel
(boolean) False if user cancelled, no explicit return on success
Note
Documentation generated by AI on 2026-03-03

◆ PartKickerManualCycle()

GrinderCenterlessScreenV02 PartKickerManualCycle ( )

Trigger a manual kick cycle for the Part Kicker.

Sets the PartKicker.StartManualCycle flag to true when the part kicker is enabled. The UpdatePartKicker() PLC loop will detect this flag and execute the kick cycle. Has no effect when the part kicker is disabled.

Note
Documentation generated by AI on 2026-03-03

◆ PartKickerManualCycleRetract()

GrinderCenterlessScreenV02 PartKickerManualCycleRetract ( )

Trigger a manual retract cycle for the Part Kicker.

Sets the PartKicker.StartManualCycleRetract flag to true when the part kicker is enabled. The UpdatePartKicker() PLC loop will detect this flag and execute the retract cycle. Has no effect when the part kicker is disabled.

Note
Documentation generated by AI on 2026-03-03

◆ PartKickerMoveToPosition()

GrinderCenterlessScreenV02 PartKickerMoveToPosition ( PositionName )

Move the Part Kicker OB Axis to the specified named position via the axis jogger.

Only valid when the OB Axis part kicker type is enabled. Reads the target position from pound variable #9067 (Home), #9068 (Load), or #9069 (Extend) based on PositionName, then calls OBAxisJogger:JogABS() to move the axis to that position at the configured feedrate. Has no effect when the OB axis type is not enabled or when PositionName is unrecognized.

Parameters
PositionName(string) The named position to move to: "Home", "Load", or "Extend"
Note
Documentation generated by AI on 2026-03-03

◆ PartKickerTeachPosition()

GrinderCenterlessScreenV02 PartKickerTeachPosition ( PositionName )

Teach a Part Kicker OB Axis position by storing the current machine position.

Only valid when the OB Axis part kicker type is enabled. Reads the current machine position of the OB axis and writes it to the appropriate pound variable: #9067 (Home), #9068 (Load), or #9069 (Extend), based on the PositionName argument. Has no effect when the OB axis type is not enabled or when PositionName is unrecognized.

Parameters
PositionName(string) The named position to teach: "Home", "Load", or "Extend"
Note
Documentation generated by AI on 2026-03-03

◆ PartLoaderAlarmActive()

GrinderCenterlessScreenV02 PartLoaderAlarmActive ( )

Create or update a GMS Alarm dialog when the part loader enters an alarmed state.

Reads the "PartLoaderAlarmMessageRegister" OEM signal to obtain a numeric alarm code. Looks up the corresponding description in the "PartLoaderAlarmMessages" OEM parameter (parsed as a multi-line CSV table). If no matching description is found, uses a default formatted string. Checks for an existing GMS notification with the title "Part Loader Alarm!"; if one exists, updates its description. Otherwise creates a new GMS notification with Class "Alarm" that clears when the "PartLoaderAlarmInput" OEM signal goes high.

Returns
(number|nil) The GMS handle for the created or updated notification
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ PartLoaderIsMachineEmpty()

GrinderCenterlessScreenV02 PartLoaderIsMachineEmpty ( )

Check whether the machine is currently empty (no part loaded).

Reads pound variable #9065 from the Mach4 controller. Returns true when the value equals 0, indicating no part is present in the machine.

Returns
(boolean) True if the machine is empty, false if a part is loaded
Note
Documentation generated by AI on 2026-03-03

◆ PartLoaderLoad()

GrinderCenterlessScreenV02 PartLoaderLoad ( )

Initiate a part loader load cycle when the machine is idle and loader is ready.

Checks that the machine is in IDLE state and that IsPartLoaderReady() returns true. For multi-instance configurations with the "Muilti-Inst-Subroutine" part loader type, executes "G65 P700\n G65 P701" on the part loader instance. Otherwise executes "G65 P9540" on the main instance.

Returns
(nil) No primary return value
(boolean) False if the MDI command fails
(string) Status message from w.FunctionError() on error
Note
Has no effect when machine is not idle or part loader is not ready
Documentation generated by AI on 2026-03-03

◆ PartLoaderMachineEmpty()

GrinderCenterlessScreenV02 PartLoaderMachineEmpty ( )

Set pound variable #9065 to zero when the machine is idle, marking it as empty.

Checks that the machine state (MACH_STATE) is MC_STATE_IDLE before writing 0 to pound variable #9065 via mc.mcCntlSetPoundVar(). This signals to the G-code program that no part is currently loaded in the machine.

Returns
(nil) No primary return value
(boolean) False if the pound variable write fails
(string) Status message from w.FunctionError() on error
Note
Has no effect when the machine is not idle
Documentation generated by AI on 2026-03-03

◆ PartLoaderNoticeMessageActive()

GrinderCenterlessScreenV02 PartLoaderNoticeMessageActive ( )

Create or update a GMS Notice dialog when the part loader sends a notice message.

Reads the "PartLoaderNoticeMessageRegister" OEM signal to obtain a numeric message code. Looks up the corresponding description in the "PartLoaderNoticeMessages" OEM parameter (parsed as a multi-line CSV table). If no matching description is found, uses a default formatted string. Checks for an existing GMS notification with the title "Part Loader Message!"; if one exists, updates its description. Otherwise creates a new GMS notification with Class "Notice" that clears when the "PartLoaderNoticeInput" OEM signal goes high.

Returns
(number|nil) The GMS handle for the created or updated notification
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ PartLoaderRetractCycle()

GrinderCenterlessScreenV02 PartLoaderRetractCycle ( )

Execute a part loader retract cycle via MDI or multi-instance subroutine.

Checks whether the part loader is enabled and on before issuing a retract command. For multi-instance configurations with the "Muilti-Inst-Subroutine" loader type, resets the part loader instance and executes "G65 P710" via MDI on that instance when it is idle. For single-instance configurations with the "Subroutine" loader type, executes "G65 P710" via w.MDICommand() on the main instance.

Returns
(nil) No primary return value
(boolean) False if the MDI command fails
(string) Status message from w.FunctionError() on error
Note
Has no effect when the part loader is disabled or off
Documentation generated by AI on 2026-03-03

◆ PartLoaderUnload()

GrinderCenterlessScreenV02 PartLoaderUnload ( )

Initiate a part loader unload cycle when the machine is idle and loader is ready.

Checks that the machine is in IDLE state and that IsPartLoaderReady() returns true. For multi-instance configurations with the "Muilti-Inst-Subroutine" part loader type, executes "G65 P703" on the part loader instance. Otherwise executes "G65 P9541" on the main instance.

Returns
(nil) No primary return value
(boolean) False if the MDI command fails
(string) Status message from w.FunctionError() on error
Note
Has no effect when machine is not idle or part loader is not ready
Documentation generated by AI on 2026-03-03

◆ PreCycleStop()

GrinderCenterlessScreenV02 PreCycleStop ( )

Check pre-conditions before executing a cycle stop.

Checks whether a retraction is already in progress via IsRetracting(). If so, returns false to abort the cycle stop. Otherwise saves the current cycle type to CycleTypeOnStop for use during the retract sequence and returns true to allow the stop.

Returns
(boolean) False if already retracting (abort stop), true if not retracting (allow stop)
(boolean) Success flag - always true
(string) Status message describing the retraction state
Note
Documentation generated by AI on 2026-03-03

◆ RegDressCompDiamondOperatorPanelBtn()

GrinderCenterlessScreenV02 RegDressCompDiamondOperatorPanelBtn ( diamond_traverse ,
Direction ,
Amount  )

Apply a compensation adjustment to a Regulating Wheel dresser axis from the operator panel.

Logs the operator action, validates that the machine is enabled, then dispatches to Comp() with Type 3 (dresser compensation) for the appropriate axis based on diamond_traverse: "Diamond" maps to A_AXIS, "Traverse" maps to Z_AXIS. Defaults Direction to 1 and Amount to "Fine" if not provided.

Parameters
diamond_traverse(string) The dresser component to compensate: "Diamond" or "Traverse"
Direction(number|nil) Compensation direction: 1 (out) or -1 (in). Defaults to 1 if nil
Amount(string|nil) Compensation step size: "Fine" or "Coarse". Defaults to "Fine" if nil
Returns
(nil) No primary return value
(boolean) Success flag - false if machine is disabled or invalid selection
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Warning
The machine must be enabled before calling this function
Note
Documentation generated by AI on 2026-03-03

◆ RegDressTeachDiamondOperatorPanelBtn()

GrinderCenterlessScreenV02 RegDressTeachDiamondOperatorPanelBtn ( diamond_traverse )

Teach the Regulating Wheel dresser diamond or traverse position from the operator panel.

Logs the operator action and validates that the machine is enabled and the Regulating Wheel tab is currently active. If "Diamond" is selected, teaches the "2DressPosition_2" field and then moves A axis to home (A0.0). If "Traverse" is selected, teaches the "1DressPosition_2" field without a subsequent move.

Parameters
diamond_traverse(string) The dresser component to teach: "Diamond" or "Traverse"
Returns
(nil) No primary return value
(boolean) Success flag - false if machine is disabled, wrong tab, or invalid selection
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Warning
The machine must be enabled and the Regulating Wheel tab must be active
Note
Documentation generated by AI on 2026-03-03

◆ RegulatingWheelSpeedsInCycleOff()

GrinderCenterlessScreenV02 RegulatingWheelSpeedsInCycleOff ( )

Disable the Regulating Wheel Speeds in Cycle feature.

Sets Mach4 parameter 1933 to 0 to disable regulating wheel speed display in the In-Feed cycle, then refreshes the In-Feed rates panel layout.

Note
Documentation generated by AI on 2026-03-03

◆ RegulatingWheelSpeedsInCycleOn()

GrinderCenterlessScreenV02 RegulatingWheelSpeedsInCycleOn ( )

Enable the Regulating Wheel Speeds in Cycle feature.

Sets Mach4 parameter 1933 to 1 to enable regulating wheel speed display in the In-Feed cycle, then refreshes the In-Feed rates panel layout.

Note
Documentation generated by AI on 2026-03-03

◆ RegulatingWheelSpeedsInCycleToggle()

GrinderCenterlessScreenV02 RegulatingWheelSpeedsInCycleToggle ( )

Toggle the Regulating Wheel Speeds in Cycle setting on or off.

Checks the current state via IsRegulatingWheelSpeedsInCycleOn() and calls either RegulatingWheelSpeedsInCycleOff() or RegulatingWheelSpeedsInCycleOn() accordingly, then updates the In-Feed rates display.

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

◆ RegWheelSpeedModeRPMBtn()

GrinderCenterlessScreenV02 RegWheelSpeedModeRPMBtn ( )

Set the Regulating Wheel speed mode to RPM and refresh dependent UI.

Sets the "SurfaceFeetPerMinMode_2" tool table user field to 0 (RPM mode), then calls UpdateGrinderWheelAttributes(), UpdateWheelSpeedModeButtons(), and InitializeRegulatingDress() to refresh all affected UI elements.

Note
Documentation generated by AI on 2026-03-03

◆ RegWheelSpeedModeSFMBtn()

GrinderCenterlessScreenV02 RegWheelSpeedModeSFMBtn ( )

Set the Regulating Wheel speed mode to SFM and refresh dependent UI.

Sets the "SurfaceFeetPerMinMode_2" tool table user field to 1 (SFM mode), then calls UpdateGrinderWheelAttributes(), UpdateWheelSpeedModeButtons(), and InitializeRegulatingDress() to refresh all affected UI elements.

Note
Documentation generated by AI on 2026-03-03

◆ ReloadDressProgramBtn()

GrinderCenterlessScreenV02 ReloadDressProgramBtn ( )

Reload the currently selected dress program from disk.

Delegates to m.screen.ReloadDressProgram() to reload the active dress program file.

Note
Documentation generated by AI on 2026-03-03

◆ ResetExtraUpperLowerCompBtn()

GrinderCenterlessScreenV02 ResetExtraUpperLowerCompBtn ( )

Reset the Extra Comp Amount OEM parameter to zero.

Sets the "ExtraCompAmount" OEM parameter to 0, clearing any accumulated extra compensation that was queued for the next grind cycle.

Returns
(nil) No primary return value
(boolean) Success flag - false if the OEM parameter write fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ ReSetGrindPositionSetIndicator()

GrinderCenterlessScreenV02 ReSetGrindPositionSetIndicator ( )

Clear the grind position calibrated flag in the machine profile.

Writes 0 to the "IsGrindPositionSet" key in the "MachMotion" profile section, marking the grind position as not calibrated.

Note
Documentation generated by AI on 2026-03-03

◆ ResetPartCounterBtn()

GrinderCenterlessScreenV02 ResetPartCounterBtn ( )

Stub handler for the Reset Part Counter button.

Returns a no-op success result. Part counter reset logic is handled elsewhere.

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

◆ ResetTotalCompBtn()

GrinderCenterlessScreenV02 ResetTotalCompBtn ( AxisID )

Reset the total compensation accumulator for the specified axis.

Delegates to m.screen.ResetTotalAxisComp() with the provided AxisID to clear the per-axis total compensation register.

Parameters
AxisID(number) The Mach4 axis ID whose total compensation should be reset
Returns
(nil) No primary return value
(boolean) Success flag - false if the reset operation fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ ResetUpperLowerTotalCompBtn()

GrinderCenterlessScreenV02 ResetUpperLowerTotalCompBtn ( )

Reset the total compensation accumulator for the active upper/lower slide axis.

Retrieves the active upper/lower axis ID via aux.GetUpperLowerAxisID() and delegates to ResetTotalCompBtn() to clear the total compensation register for that axis.

Returns
(nil) No primary return value
(boolean) Success flag - false if axis ID lookup or reset fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ RestoreLastRunTabIndex()

GrinderCenterlessScreenV02 RestoreLastRunTabIndex ( )

Restore the last saved operation tab index and set the active tab.

Reads the "LastRunTabNumber" integer from the "MachMotion" Mach4 profile section. Sets both the "Default Tab" and "Current Tab" properties of the "OperationTabs" notebook object to the restored index value. Logs the restore action.

Note
Documentation generated by AI on 2026-03-03

◆ RunGrindWheelDressCycle()

GrinderCenterlessScreenV02 RunGrindWheelDressCycle ( ignore_confirmation )

Initiate a Grind Wheel dress cycle with optional confirmation dialog.

Sets the grinder operation number to 5 (Grind Wheel Dressing), validates machine state (must be IDLE), checks wheel interlocks (regulating wheel interlock if configured, and grind wheel on if DisableWheelsStartingAutomatically is active), releases any active cycle start hold, sets the IsGrindWheelDressCycle flag, and optionally shows a confirmation dialog before setting RunDressCycle = true and calling m.CycleStartBtn(). If a cycle start hold is active, releases it and re-queues this function.

Parameters
ignore_confirmation(boolean|nil) If true, skips the confirmation dialog. Defaults to false
Returns
(nil) No primary return value
(boolean) False if machine is not idle, wheel interlock is not satisfied, or user cancels
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Warning
The machine must be in IDLE state before calling this function
Note
Documentation generated by AI on 2026-03-03

◆ RunRegulatingWheelDressCycle()

GrinderCenterlessScreenV02 RunRegulatingWheelDressCycle ( ignore_confirmation )

Initiate a Regulating Wheel dress cycle with optional confirmation dialog.

Sets the grinder operation number to 6 (Regulating Wheel Dressing), validates machine state (must be IDLE), checks wheel interlocks, releases any active cycle start hold, sets the IsRegWheelDressCycle flag, and optionally shows a confirmation dialog before setting RunDressCycle = true and calling m.CycleStartBtn(). If ignore_confirmation is true, skips the dialog. If a cycle start hold is active, releases it and re-queues this function.

Parameters
ignore_confirmation(boolean|nil) If true, skips the confirmation dialog. Defaults to false
Returns
(nil) No primary return value
(boolean) False if machine is not idle, wheel interlock is not satisfied, or user cancels
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Warning
The machine must be in IDLE state before calling this function
Note
Documentation generated by AI on 2026-03-03

◆ RWCustomDressProfileBtn()

GrinderCenterlessScreenV02 RWCustomDressProfileBtn ( )

Toggle the Regulating Wheel custom dress profile program on or off.

Reads the current regulating wheel custom dress subroutine number from pound variable #519. If the subroutine number is non-zero, stores it via StoreLastRegDressCustomProgram() and then clears #519 to zero (disabling the custom profile). If zero, reads the last stored program number from the machine profile and writes it to #519 (enabling the custom profile). Updates the regulating wheel custom dress profile UI via UpdateRWCustomDressProfile() afterwards.

Returns
(nil) No primary return value
(boolean) False if a pound variable read or write fails
(string) Status message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ SaveCurrentRunTabIndex()

GrinderCenterlessScreenV02 SaveCurrentRunTabIndex ( tab )

Save the current operation tab index to the machine profile.

Writes the provided tab index number to the "MachMotion" section of the Mach4 profile under the key "LastRunTabNumber" for persistence across sessions. Logs the save action.

Parameters
tab(number) The tab index number to save
Note
Documentation generated by AI on 2026-03-03

◆ ScreenIsLoadedScript()

GrinderCenterlessScreenV02 ScreenIsLoadedScript ( )

Run all post-screen-load initialization tasks for the Centerless Grinder.

Called after the screen is fully loaded. Performs the following in order:

  • Restores the last saved operation tab index
  • Initializes the grind wheel dress panel
  • Initializes the regulating wheel dress panel
  • Initializes the hydraulics system UI
    Note
    Documentation generated by AI on 2026-03-03

◆ ScreenTabEnter()

GrinderCenterlessScreenV02 ScreenTabEnter ( tab )

Handle tab enter events for the Centerless Grinder operation and service tabs.

Called when a tab is entered in any notebook. Behavior depends on the tab parent and label:

  • For OperationTabs: updates the current tab register, sets the operation number pound variable (#546), shows/hides axes appropriate to the tab, saves the run tab index for In-Feed and Thru-Feed tabs, updates Edit Mode groups, initializes the axis position group, and updates GrindMode
  • For ServiceTabGroup: initializes home buttons (Maintenance tab) or restores G-code display size (Program tab)
  • Skips processing if the screen is not fully loaded
    Parameters
    tab(table) The tab object with fields: parent (string), label (string), index (number), name (string)
    Returns
    (nil) No primary return value
    (boolean) Success flag - true on success
    (string) Status message from w.FunctionCompleted() or w.FunctionError()
    Note
    Documentation generated by AI on 2026-03-03

◆ ScreenTabExit()

GrinderCenterlessScreenV02 ScreenTabExit ( tab )

Handle tab exit events for the Centerless Grinder operation tabs.

Called when a tab is exited in the OperationTabs notebook. Specifically:

  • Stores the exiting tab index in LAST_OPERATION_TAB
  • If exiting a non-Calibrate, non-Fixtures tab while Edit Mode is active, calls EditModeOff()
  • If exiting the Loader tab, restores the selected instance to 0 and reinitializes the axis position group
    Parameters
    tab(table) The tab object with fields: parent (string), label (string), index (number), name (string)
    Returns
    (nil) No primary return value
    (boolean) Success flag - always true
    (string) Status message from w.FunctionCompleted()
    Note
    Documentation generated by AI on 2026-03-03

◆ SetGrinderOperationNumber()

GrinderCenterlessScreenV02 SetGrinderOperationNumber ( OperationNumber )

Set the active grinder operation number in Mach4 pound variable #546.

Writes the provided OperationNumber to pound variable #546 via mc.mcCntlSetPoundVar(), which is used by the G-code program to determine which operation to execute.

Parameters
OperationNumber(number) The operation number to set (e.g., 3=In-Feed, 4=Thru-Feed, 5=GW Dress, 6=RW Dress)
Note
Documentation generated by AI on 2026-03-03

◆ SetGrindPosition()

GrinderCenterlessScreenV02 SetGrindPosition ( )

Set the grind finish position by prompting the operator for a new value.

Validates machine state and optionally shows a confirmation dialog before prompting the operator to enter a new finish/grind position value via a number input dialog. Reads the current finish position from pound variable #511 (In-Feed) or #516 (Thru-Feed) depending on the active grind mode. Validates that the entered position is within bounds (< 12), then calls mc.mcAxisSetPos() for the main slide axis and optionally the secondary slide axis. Also calls the "SetGrindPosition" and "SetGrindPositionFinal" screen hooks and optionally moves to the load position after setting.

Returns
(nil) No primary return value
(boolean) False if the machine is not idle, confirmation is cancelled, position is out of bounds, or any API call fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Warning
The machine must be in IDLE state before calling this function
Note
Documentation generated by AI on 2026-03-03

◆ SetGrindPositionSetIndicator()

GrinderCenterlessScreenV02 SetGrindPositionSetIndicator ( )

Set the grind position calibrated flag in the machine profile.

Writes 1 to the "IsGrindPositionSet" key in the "MachMotion" profile section, marking the grind position as calibrated.

Note
Documentation generated by AI on 2026-03-03

◆ SetIsGrindWheelInDressCycleFlag()

GrinderCenterlessScreenV02 SetIsGrindWheelInDressCycleFlag ( )

Set the flag indicating the Grind Wheel is currently in a dress cycle.

Sets the screen-level IsGrindWheelDressCycle flag to true, indicating that a grind wheel dress cycle is currently active or pending.

Note
Documentation generated by AI on 2026-03-03

◆ SetIsRegWheelInDressCycleFlag()

GrinderCenterlessScreenV02 SetIsRegWheelInDressCycleFlag ( )

Set the flag indicating the Regulating Wheel is currently in a dress cycle.

Sets the screen-level IsRegWheelDressCycle flag to true, indicating that a regulating wheel dress cycle is currently active or pending.

Note
Documentation generated by AI on 2026-03-03

◆ SetPartLoaderGripperToLowerSlideOffset()

GrinderCenterlessScreenV02 SetPartLoaderGripperToLowerSlideOffset ( )

Teach and store the gripper-to-lower-slide offset for the part loader.

Runs the "SetPartLoaderGripperToLowerSlideOffset" screen hook first; if the hook returns false, exits early. Shows a Cycle Start confirmation dialog asking the operator to jog the gripper axis to the part on the lower slide blade. On confirmation, reads the current machine position of the upper/lower axis and the part loader X axis, computes the offset as their sum, and stores it to the "PartLoaderGripperToLowerSlideOffset" OEM parameter on both the main instance and the part loader instance.

Returns
(nil) No primary return value
(boolean) False if hook fails, user cancels, axis ID lookup fails, or parameter write fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ SetRetracting()

GrinderCenterlessScreenV02 SetRetracting ( new_state )

Set the retracting interlock state and log the change.

Updates the screen-level _IsRetracting flag to the provided state and logs the change at the [Retract] log level. This flag prevents multiple simultaneous retraction sequences from executing.

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

◆ ShowHideSpindleGroup()

GrinderCenterlessScreenV02 ShowHideSpindleGroup ( groupname ,
showhide  )

Hide a spindle group UI element by name (unconditionally).

Always sets the named group's "Hidden" property to "1" regardless of the showhide parameter. Spindle groups are not applicable to the Centerless Grinder screen.

Parameters
groupname(string) The name of the screen group object to hide
showhide(any) Accepted but ignored; the group is always hidden
Note
Documentation generated by AI on 2026-03-03

◆ ShowInScreenGCodeEditor()

GrinderCenterlessScreenV02 ShowInScreenGCodeEditor ( )

Show the in-screen G-code editor and hide the standard tool path display.

Calls HideGCodeDisplayAndToolPath() to hide the tool path view, then hides ToolDisplayGroup and ModalsGroup, and repositions the GCodeEditor to Left = 106 to make it visible within the screen layout.

Note
Documentation generated by AI on 2026-03-03

◆ StoreLastGrindDressCustomProgram()

GrinderCenterlessScreenV02 StoreLastGrindDressCustomProgram ( SubNumber )

Store the last used Grind Wheel custom dress program number to the machine profile.

Writes the provided subroutine number to the Mach4 profile under the "CenterlessGrinder" section with key "GrindDressCustomProgram" for persistence across sessions.

Parameters
SubNumber(number) The subroutine number to store as the last used grind dress program
Returns
(nil) No primary return value
(boolean) False if the profile write fails
(string) Status message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ StoreLastRegDressCustomProgram()

GrinderCenterlessScreenV02 StoreLastRegDressCustomProgram ( SubNumber )

Store the last used Regulating Wheel custom dress program number to the machine profile.

Writes the provided subroutine number to the Mach4 profile under the "CenterlessGrinder" section with key "RegDressCustomProgram" for persistence across sessions.

Parameters
SubNumber(number) The subroutine number to store as the last used regulating dress program
Returns
(nil) No primary return value
(boolean) False if the profile write fails
(string) Status message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ ThruFeedCompMainGrindAxis()

GrinderCenterlessScreenV02 ThruFeedCompMainGrindAxis ( Direction ,
Amount  )

Apply a compensation adjustment to the main grind axis for Thru-Feed mode.

Retrieves the active upper/lower axis ID and reads the current axis position and the Thru-Feed grind position (#516). If the axis is within 2x InPositionToleranceStandard of the grind position, uses Type 2 compensation (offset + move to finish position); otherwise uses Type 1 (offset only). Delegates to CompMainGrindAxis() for the actual compensation.

Parameters
Direction(number) Compensation direction: 1 (out) or -1 (in)
Amount(string) Step size: "Fine" or "Coarse"
Returns
(nil) No primary return value
(boolean) Success flag - false if axis ID lookup or compensation fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ ThruFeedInBtn()

GrinderCenterlessScreenV02 ThruFeedInBtn ( )

Handle the Thru-Feed In button press to move to the grind position.

Calls GoToThruFeedGrindPosition() with confirmation behavior determined by w.PretendCommandsAreFromOperatorPanels(). When pretending operator panel commands, confirmation is skipped.

Note
Documentation generated by AI on 2026-03-03

◆ ThruFeedOutBtn()

GrinderCenterlessScreenV02 ThruFeedOutBtn ( )

Handle the Thru-Feed Out button press to move to the retract position.

Calls GoToThruFeedRetractPosition() with confirmation behavior determined by w.PretendCommandsAreFromOperatorPanels(). When pretending operator panel commands, confirmation is skipped.

Note
Documentation generated by AI on 2026-03-03

◆ TouchOffTeachY()

GrinderCenterlessScreenV02 TouchOffTeachY ( )

Teach the Y-axis touch-off position by reading the current machine position.

Reads the current machine position of the Y_AXIS via mc.mcAxisGetMachinePos() and writes it to the "YTouchOffDRO" screen object. Used during tool calibration to capture the machine position at the touch-off point.

Returns
(nil) No primary return value
(boolean) Success flag - false if the axis position read fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ TouchOffTeachZ()

GrinderCenterlessScreenV02 TouchOffTeachZ ( )

Teach the Z-axis touch-off position by reading the current machine position.

Reads the current machine position of the Z_AXIS via mc.mcAxisGetMachinePos() and writes it to the "ZTouchOffDRO" screen object. Used during tool calibration to capture the machine position at the touch-off point.

Returns
(nil) No primary return value
(boolean) Success flag - false if the axis position read fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ UpdateCombLabels()

cyc UpdateCombLabels ( dressing_passes ,
_type ,
type_passes  )

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

Formats a label string combining the cycle type description and state description. When the current state is a dressing or sparkout state, appends the remaining pass count to the state description. Logs the combined state/type info and updates all screen objects listed in self.CombLabels (e.g., "CurrentCycleLabel").

Parameters
state(table) The current state object with a "Description" field
dressing_passes(number) The number of remaining dressing passes to display
_type(table) The current cycle type object with a "Description" field
type_passes(number) The number of type-specific passes (accepted but not used directly)
Note
Documentation generated by AI on 2026-03-03

◆ UpdateGrindPositionSetIndicator()

GrinderCenterlessScreenV02 UpdateGrindPositionSetIndicator ( )

Update the grind position calibration indicator LEDs and labels on screen.

Reads the grind position calibration state via IsGrindPositionSet(). When not calibrated, sets the InFeedGrindPositionSetLED and ThruGrindPositionSetLED labels to "Grind\nPosition Not Calibrated" and alternates between yellow and red color schemes using BLINK_OBJECT_SLOW_ACTIVE. When calibrated, sets the labels to "Grind\nPosition Calibrated" and clears the yellow LED state.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateGWCustomDressProfile()

GrinderCenterlessScreenV02 UpdateGWCustomDressProfile ( )

Update the Grind Wheel custom dress profile button and group visibility.

Reads the active grind wheel custom dress subroutine number from pound variable #518. If the subroutine number is non-zero, shows the GrindDressCustomProgramGroup and activates the GWCustomProfileBtn toggle button. If zero, hides the group and deactivates the button.

Returns
(nil) No primary return value
(boolean) False if pound variable read fails
(string) Status message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ UpdateInFeedControls()

GrinderCenterlessScreenV02 UpdateInFeedControls ( )

Update all In-Feed cycle position indicators, marquee LED, and axis position display.

Runs every PLC cycle to update the In-Feed grind cycle UI. Performs the following:

  • Reads the active upper/lower axis ID and current axis position
  • Reads pound variables for load (#500), retract (#512), finish (#511), fine (#508), medium (#505), and coarse (#502) positions/amounts
  • Updates MainSlideIsAtLoadPosition and SecondarySlideIsAtLoadPosition based on axis proximity
  • Updates LoadLed, RetractLed, and FinishLed indicator states
  • Updates RapidLED, CoarseLED, MediumLED, and FineLED based on current cycle state (#9080)
  • Computes and moves the InFeedMarqueeLED position to track the current phase of the cycle
  • Supports both incremental and absolute infeed modes (parameter 1912)
  • Blinks the marquee LED image when DWELL_ACTIVE is true
    Returns
    (boolean) False (first return) if upper/lower axis ID lookup fails
    (boolean) Success flag - false if any pound variable read fails
    (string) Status message from w.FunctionError() on error
    Note
    Only processes In-Feed and Thru-Feed tabs; returns early for other tabs
    Documentation generated by AI on 2026-03-03

◆ UpdateLowPriorityGrinderControls()

GrinderCenterlessScreenV02 UpdateLowPriorityGrinderControls ( )

Update all low-priority grinder screen controls and indicators.

Runs at low priority and updates multiple UI elements including: upper/lower slide button highlight colors, compensation button labels showing current Fine/Coarse comp amounts (from #590 and #591), total compensation DRO value, upper/lower axis text and home/zero button colors based on the active slide selection, and then calls UpdateGWCustomDressProfile(), UpdateRWCustomDressProfile(), and UpdatePartCounters(). The active slide axis (upper or lower) is highlighted in green; the inactive one is cleared.

Returns
(nil) No primary return value
(boolean) False if GetUpperLowerAxisID() or pound variable reads fail
(string) Status message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ UpdateMPGAxisSelector()

GrinderCenterlessScreenV02 UpdateMPGAxisSelector ( )

Stub function that disables MPG axis selector updates for this screen.

Note
This function intentionally does nothing; MPG axis selection is not applicable to the Centerless Grinder screen
Documentation generated by AI on 2026-03-03

◆ UpdatePartCounters()

GrinderCenterlessScreenV02 UpdatePartCounters ( )

Update background colors of part counter DRO objects based on their values.

Iterates through the part counter DROs ("RequiredPartsDRO", "PartsPerGWDressDRO", "RegPartsPerDressDRO") and sets each one's background color to the muted green color scheme when its value is greater than zero, or to the standard write DRO color when the value is zero or negative. This provides a visual indicator that a counter limit has been configured.

Note
Documentation generated by AI on 2026-03-03

◆ UpdatePartKicker()

GrinderCenterlessScreenV02 UpdatePartKicker ( )

Update the Part Kicker state machine and control outputs each PLC cycle.

Manages the complete Part Kicker cycle logic, supporting both pneumatic/hydraulic cylinder and OB Axis actuator types. On each call:

  • Initializes the OB Axis jogger on first use when OB axis type is enabled
  • Reads PartKickerRetractPercent, PartKickerOutputTime, retract position (#512), and finish position (#511)
  • Computes the kicker trigger position as a percentage of the retract distance from finish
  • Handles four trigger modes: automatic retract (retract_flag), manual retract cycle (StartManualCycleRetract), manual kick cycle (StartManualCycle), and reset
  • When kicker position is reached or timeout expires, activates the PartKickerOutput signal and (if OB axis type) jogs to the extend position (#9069)
  • Deactivates the output when PartKickerInput confirms extension (if mapped) or after the configured output time, then returns the OB axis to the load position (#9068) if idle
    Note
    This function is called from MachineScreenPLCScript() on every PLC cycle
    Documentation generated by AI on 2026-03-03

◆ UpdatePartLoader()

GrinderCenterlessScreenV02 UpdatePartLoader ( )

Update the part loader interlock outputs and motion inhibit signals.

Reads the current wheel-in-position state via IsWheelsInPositionPartLoader() and sets the "PartLoaderWheelsInPositionOutput" OEM signal accordingly (if mapped). Also monitors the "PartLoaderInCycleInput" OEM signal: on a rising edge (false -> true), inhibits jogging on all axes and sets ISIG_MOTION_INHIBIT, ISIG_JOG_INHIBIT, and ISIG_MPG_INHIBIT signals; on a falling edge (true -> false), releases all inhibits. Tracks state in the PartLoaderInCycleInput screen variable to detect edge transitions.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateRWCustomDressProfile()

GrinderCenterlessScreenV02 UpdateRWCustomDressProfile ( )

Update the Regulating Wheel custom dress profile button and group visibility.

Reads the active regulating wheel custom dress subroutine number from pound variable #519. If the subroutine number is non-zero, shows the RegDressCustomProgramGroup and activates the RWCustomProfileBtn toggle button. If zero, hides the group and deactivates the button.

Returns
(nil) No primary return value
(boolean) False if pound variable read fails
(string) Status message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ UpdateSpindleMinMaxSpeed()

GrinderCenterlessScreenV02 UpdateSpindleMinMaxSpeed ( )

Stub function that disables spindle min/max speed updates for this screen.

Note
This function intentionally does nothing; spindle min/max speed control is not applicable to the Centerless Grinder screen
Documentation generated by AI on 2026-03-03

◆ UpdateThruFeedControls()

GrinderCenterlessScreenV02 UpdateThruFeedControls ( )

Update the Thru-Feed grind cycle position indicators and marquee LED.

Reads the active upper/lower axis position and compares it against the Thru-Feed retract position (#512) and finish/grind position (#516). Updates the RetractedLED and InPositionLED indicator states accordingly. When the machine is IDLE, positions the ThruFeedMarqueeLED to indicate the current slide position within the retract-to-grind range. When in cycle state 100 (Moving to Grind Position), animates the marquee between retract and finish positions.

Returns
(boolean) False (first return) if upper/lower axis ID lookup fails
(boolean) Success flag - false if any pound variable read fails
(string) Status message from w.FunctionError() on error
Note
Documentation generated by AI on 2026-03-03

◆ UpdateThruFeedPartCounter()

GrinderCenterlessScreenV02 UpdateThruFeedPartCounter ( )

Increment the Thru-Feed part counters and trigger dress-required notifications.

Reads the parts-since-last-dress counters for both the Grind Wheel (#9071) and Regulating Wheel (#9171), increments each by one, and compares them against the configured parts-per-dress thresholds (#9070 and #9170 respectively). When either threshold is reached:

  • Runs the corresponding dress-required hook ("GrindingWheelDressRequired" or "RegulatingWheelDressRequired")
  • Sets the "Grinding Wheel Dress Required" or "Regulating Wheel Dress Required" I/O state
  • Switches the OperationTabs notebook to the affected wheel's tab
  • Closes any existing dress-required dialog and opens a new GMS Notice dialog This function is called on each falling edge of the ThruFeedPartCounterInput signal.
    Returns
    (nil) No meaningful return value
    Note
    Documentation generated by AI on 2026-03-03

◆ UpdateWheelSpeedModeButtons()

GrinderCenterlessScreenV02 UpdateWheelSpeedModeButtons ( )

Update the RPM/SFM mode toggle button highlight colors for both wheel speed panels.

Reads the "SurfaceFeetPerMinMode_1" tool table field for the Grind Wheel and "SurfaceFeetPerMinMode_2" for the Regulating Wheel. For each wheel, highlights the SFM button with BTN_COLOR_ON and dims the RPM button with BTN_COLOR_OFF when SFM mode is active (value == 1), or vice versa when RPM mode is active (value != 1).

Note
Documentation generated by AI on 2026-03-03

◆ UpperSlideBtn()

GrinderCenterlessScreenV02 UpperSlideBtn ( )

Select the Upper Slide as the active upper/lower axis and refresh the axis position group.

Sets Mach4 parameter 1900 to 0 to select the Upper Slide axis, then calls InitializeAxisPositionGroup() to refresh the axis display.

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

◆ ValidateCycleData()

GrinderCenterlessScreenV02 ValidateCycleData ( value ,
name  )

Validate a single cycle data value against business rules for the given field name.

Checks the provided value against specific constraints based on the DRO/field name. For In-Feed fields, checks include:

  • FinishGrindPosition must be < Load Position
  • InFeedLoadDRO must be between Finish and Retract positions
  • InFeedRetractDRO must be >= Load Position
  • Dwell timers must be >= 0
  • Fine/Medium/Coarse amounts must be >= Finish Position (in diameter mode)
  • Feedrates must be >= 0.0001 For Thru-Feed fields, checks include:
  • ThruFeedRetractDRO must be > Grind Position
  • ThruFeedGrindPositionDRO must be < Retract Position If validation fails, a warning message is displayed on screen.
    Parameters
    value(number) The numeric value to validate
    name(string) The DRO or field name identifying which validation rules to apply
    Returns
    (number) The original value (unchanged)
    (boolean) Success flag - true if value passed validation, false if a rule was violated
    (string) Status message describing the result or error condition
    Note
    Documentation generated by AI on 2026-03-03

References name().

◆ ValidateCycleDataList()

GrinderCenterlessScreenV02 ValidateCycleDataList ( datatable )

Validate a list of cycle data pound variables against their business rules.

Iterates through the provided data table, reads each pound variable from the Mach4 controller, and calls ValidateCycleData() for each entry. Collects all validation results and returns a combined success flag. All entries are checked even if one fails.

Parameters
datatable(table) Array of validation entries, where each entry is a table with:
  • [1] (string): The DRO/field name used to identify validation rules
  • [2] (number): The pound variable number to read from the controller
Returns
(nil) No primary return value
(boolean) Success flag - true only if all entries passed validation
(string) Status message from the last ValidateCycleData() call
Note
Documentation generated by AI on 2026-03-03

◆ ValidateDROValue()

GrinderCenterlessScreenV02 ValidateDROValue ( value ,
name  )

Validate a DRO value string and return the corrected value as a string.

Converts the input string to a number, strips any index suffix from the name using h.GetObjectNameCore(), then delegates to ValidateCycleData() for business rule checking. Logs the before/after values for diagnostics. Returns the value as a string suitable for setting back into a screen DRO object.

Parameters
value(string) The DRO value string to validate
name(string) The DRO object name (may include instance suffix like "(1)")
Returns
(string) The validated value converted back to a string
Note
Documentation generated by AI on 2026-03-03

References name().

◆ ValidateInFeedCycleData()

GrinderCenterlessScreenV02 ValidateInFeedCycleData ( )

Validate all In-Feed cycle data against required business rules.

Reads the full set of In-Feed cycle pound variables and validates each one using ValidateCycleDataList(). Fields validated include finish/load/retract positions, dwell timers, feed amounts (Fine/Medium/Coarse), and feedrates. Called before starting an In-Feed cycle to prevent invalid cycle execution.

Returns
(nil) No primary return value
(boolean) Success flag - true if all In-Feed data is valid
(string) Status message describing the validation result
Note
Documentation generated by AI on 2026-03-03

◆ ValidateThruFeedCycleData()

GrinderCenterlessScreenV02 ValidateThruFeedCycleData ( )

Validate all Thru-Feed cycle data against required business rules.

Reads the Thru-Feed retract position (#512) and grind position (#516) pound variables and validates them using ValidateCycleDataList(). Called before starting a Thru-Feed cycle.

Returns
(nil) No primary return value
(boolean) Success flag - true if all Thru-Feed data is valid
(string) Status message describing the validation result
Note
Documentation generated by AI on 2026-03-03

◆ WheelSpeedModeRPMBtn()

GrinderCenterlessScreenV02 WheelSpeedModeRPMBtn ( )

Set the Grind Wheel speed mode to RPM and refresh dependent UI.

Sets the "SurfaceFeetPerMinMode_1" tool table user field to 0 (RPM mode), then calls UpdateGrinderWheelAttributes(), UpdateWheelSpeedModeButtons(), and InitializeGrindDress() to refresh all affected UI elements.

Note
Documentation generated by AI on 2026-03-03

◆ WheelSpeedModeSFMBtn()

GrinderCenterlessScreenV02 WheelSpeedModeSFMBtn ( )

Set the Grind Wheel speed mode to SFM and refresh dependent UI.

Sets the "SurfaceFeetPerMinMode_1" tool table user field to 1 (SFM mode), then calls UpdateGrinderWheelAttributes(), UpdateWheelSpeedModeButtons(), and InitializeGrindDress() to refresh all affected UI elements.

Note
Documentation generated by AI on 2026-03-03