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

Go to the source code of this file.

Functions

GrinderCenterlessFixedBladeScreenV02 InitializeTolerances ()
 Initialize machine tolerance values converted to the current unit system.
GrinderCenterlessFixedBladeScreenV02 MachineScreenStartupScript ()
 Execute the machine screen startup script for the Centerless Fixed Blade grinder.
GrinderCenterlessFixedBladeScreenV02 MachineScreenLoadScript ()
 Execute the machine screen load script for the Centerless Fixed Blade grinder.
GrinderCenterlessFixedBladeScreenV02 GetAxisLetterName (AxisID)
 Get the axis letter label for display, formatted for the Centerless Fixed Blade grinder UI.
GrinderCenterlessFixedBladeScreenV02 GetAxisShortName (AxisID)
 Get the short descriptive name for an axis based on its axis ID.
GrinderCenterlessFixedBladeScreenV02 ScreenTabEnter (tab)
 Handle screen tab change events and update machine state accordingly.
GrinderCenterlessFixedBladeScreenV02 LowerSlideBtn ()
 Display a warning message indicating the Lower Slide button is not allowed on Fixed Blade machines.

Function Documentation

◆ GetAxisLetterName()

GrinderCenterlessFixedBladeScreenV02 GetAxisLetterName ( AxisID )

Get the axis letter label for display, formatted for the Centerless Fixed Blade grinder UI.

Maps Mach4 axis IDs to two-line label strings used in axis display buttons and indicators. Each label contains a functional abbreviation and the standard axis letter in parentheses:

  • X_AXIS: "GD\n(X)" (Grind Diamond)
  • Y_AXIS: "GD\n(Y)" (Grind Diamond)
  • Z_AXIS: "RD\n(Z)" (Reg Diamond)
  • A_AXIS: "RD\n(4)" (Reg Diamond)
  • B_AXIS: "UP\n(5)" (Upper Slide)
  • C_AXIS: "LO\n(6)" (Lower Slide)
  • AXIS6+: Numbered outboard axes formatted as "OB{n}"
    Parameters
    AxisID(number) The Mach4 axis ID constant (e.g., mc.X_AXIS, mc.Y_AXIS)
    Returns
    (boolean) Always returns false as the primary value (use letter from 4th return)
    (boolean) Success flag - true if operation completed successfully
    (string) Status message from w.FunctionCompleted()
    (string) The formatted two-line axis letter label string
    Note
    Documentation generated by AI on 2026-03-03

◆ GetAxisShortName()

GrinderCenterlessFixedBladeScreenV02 GetAxisShortName ( AxisID )

Get the short descriptive name for an axis based on its axis ID.

Maps Mach4 axis IDs to human-readable short names specific to the Centerless Fixed Blade grinder configuration. The naming convention reflects the physical function of each axis:

  • X_AXIS: Grind Traverse
  • Y_AXIS: Grind Diamond
  • Z_AXIS: Reg Traverse
  • A_AXIS: Reg Diamond
  • B_AXIS: Upper Slide
  • C_AXIS: Lower Slide
  • AXIS6+: Numbered outboard axes (OB1, OB2, ...)
    Parameters
    AxisID(number) The Mach4 axis ID constant (e.g., mc.X_AXIS, mc.Y_AXIS)
    Returns
    (boolean) Always returns false as the primary value (use shortname from 4th return)
    (boolean) Success flag - true if operation completed successfully
    (string) Status message from w.FunctionCompleted()
    (string) The short descriptive name string for the specified axis
    Note
    Documentation generated by AI on 2026-03-03

◆ InitializeTolerances()

GrinderCenterlessFixedBladeScreenV02 InitializeTolerances ( )

Initialize machine tolerance values converted to the current unit system.

Sets the operational tolerance values on the screen module (m.screen) by converting each tolerance constant from imperial units to the currently active unit system. The following tolerances are initialized:

  • EmergencyRetractDistance: 0.1 inches converted to current units
  • EmergencyRetractMinDistance: 0.01 inches converted to current units
  • Tolerance: 0.00005 inches converted to current units
  • InPositionToleranceStandard: 0.001 inches converted to current units
  • InPositionToleranceFine: 0.0001 inches converted to current units
    Note
    This function has no return value; it modifies m.screen tolerance fields directly as side effects
    Documentation generated by AI on 2026-03-03

◆ LowerSlideBtn()

GrinderCenterlessFixedBladeScreenV02 LowerSlideBtn ( )

Display a warning message indicating the Lower Slide button is not allowed on Fixed Blade machines.

This function is a stub override that prevents the lower slide operation from being executed on Fixed Blade machine configurations. It displays a warning dialog to the operator and returns without performing any axis movement.

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

◆ MachineScreenLoadScript()

GrinderCenterlessFixedBladeScreenV02 MachineScreenLoadScript ( )

Execute the machine screen load script for the Centerless Fixed Blade grinder.

Performs full screen initialization after the Mach4 screen is loaded. This includes:

  • Running the common grinder screen load script
  • Configuring initial axis visibility (Y and A axes only)
  • Setting stage button colors for the UI
  • Initializing tolerances, cycle, status, and machine-specific subsystems
  • Initializing operator panels, grind wheel, and regulating wheel controls
  • Enabling axes via InitializeEnabledAxes (profile 1902)
  • Setting OEM parameter values for speed overrides (GrindWheel, RegulatingWheel, RotaryDresser all at 100%)
  • Creating the CurrentJob file object with pound variable range 500-800
  • Registering the MachineCreatePreCannedCommands command handler
    Returns
    (nil) No meaningful primary return value on error paths
    (boolean) Success flag - false if any OEM parameter set fails, otherwise implicitly nil
    (string) Status message from w.FunctionError() on failure
    Warning
    This function modifies global OEM parameters and registers command handlers as side effects
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineScreenStartupScript()

GrinderCenterlessFixedBladeScreenV02 MachineScreenStartupScript ( )

Execute the machine screen startup script for the Centerless Fixed Blade grinder.

Performs initial startup tasks when the machine screen first initializes. This includes setting the machine type name label to "Mach Centerless", activating the tool path bottom view, initializing the tool table fields, initializing in-feed rates, and loading the machine-specific G-code file for the Centerless Fixed Blade configuration.

Returns
(boolean) Always returns true as the primary value indicating startup was initiated
(boolean) Success flag - always true if G-code file load is reached
(string) Status message from w.FunctionCompleted()
Note
The G-code file loaded is "GrinderCenterlessFixedBlade.tap" from the Grinder - Centerless subfolder
Documentation generated by AI on 2026-03-03

◆ ScreenTabEnter()

GrinderCenterlessFixedBladeScreenV02 ScreenTabEnter ( tab )

Handle screen tab change events and update machine state accordingly.

This function is called whenever a tab is selected in the screen interface. It performs several context-sensitive operations based on which tab was entered:

  • Updates the current tab register if the tab is not the "Service" tab
  • Sets the operation number pound variable (#546) based on the active tab and sub-tab combination
  • Refreshes the Edit Mode group button states
  • Shows and hides the appropriate axes for the selected operation tab
  • Updates GrindMode (1 = In-Feed, 2 = Thru-Feed, 0 = other)
  • Initializes home buttons when the Maintenance tab is entered

The function exits early if the screen is not fully loaded or if required notebook widgets are not yet available.

Parameters
tab(table) Tab descriptor table with keys: 'parent' (string), 'name' (string), 'index' (number), and 'label' (string) identifying the tab that was entered
Returns
(nil) No meaningful primary return value
(boolean) Success flag - true if tab enter was processed successfully
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Only updates the operation pound variable (#546) when machine is in IDLE state and M00 is not active
Documentation generated by AI on 2026-03-03