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

Go to the source code of this file.

Functions

CommonScreenV01 GetRootElementNames ()
 Return the list of root element names used by this screen layout.
CommonScreenV01 ScreenLoadScript ()
 Initialize the screen signal library and run the machine screen load script.
CommonScreenV01 ScreenUnloadScript ()
 Execute cleanup tasks when the screen is unloaded.
CommonScreenV01 StartUpScript ()
 Initialize all screen controls and subsystems when Mach4 starts up.
CommonScreenV01 LowPriorityLoop ()
 Execute all low-priority periodic screen update tasks.
CommonScreenV01 PLCScript ()
 Execute the PLC script loop inside a protected call wrapper.
CommonScreenV01 DisableAdvancedGUIButtons ()
 Disable the advanced GUI mode by resetting the UseAdvGui profile flag to zero.
CommonScreenV01 SetTabFontSizes ()
 Set the font size for all main tab controls from the MachMotion profile.
CommonScreenV01 PositionDisplayToggle ()
 Cycle the position display mode through locked, unlocked, and DRO states.
CommonScreenV01 GetPositionDisplayUnlocked ()
 Check whether the unlocked position display group is currently visible.
CommonScreenV01 IsEditModeActive ()
 Query whether edit mode (unlocked position display) is currently active.
CommonScreenV01 EditModeOn ()
 Activate edit mode by switching the position display to unlocked mode.
CommonScreenV01 EditModeOff ()
 Deactivate edit mode by switching the position display to locked mode.
CommonScreenV01 PositionDisplayUnLocked (Password)
 Switch the position display to unlocked (edit) mode, optionally requiring a password.
CommonScreenV01 PositionDisplayLocked ()
 Switch the position display to locked (read-only) mode and save offsets.
CommonScreenV01 PositionDisplayDROMode ()
 Switch the position display to DRO mode, showing the DRO group and disabling edit controls.
CommonScreenV01 MachineCoordColors ()
 Update axis DRO foreground colors to reflect machine vs. part coordinate display mode.
CommonScreenV01 UpdateSpindleWarmUp ()
 Update the spindle warm-up status display and gauge based on elapsed standstill time.
CommonScreenV01 OperatorPanelInitialization ()
 Initialize operator panel status and configure feed rate controls based on connected panels.
CommonScreenV01 UpdateDRODecimalCount ()
 Update DRO format strings for all axis, feedrate, and tool DROs based on profile settings.
CommonScreenV01 UpdateOperatorPanelControls ()
 Update operator panel jog rate and feed/rapid override displays.
CommonScreenV01 UpdateMPGAxisSelector ()
 Update the MPG axis selector label to reflect the currently selected MPG axis.
CommonScreenV01 UpdateDROPostions ()
 Update axis DROs in DRO position display mode with machine-position-based values.
CommonScreenV01 UpdateAxisDROs ()
 Update X and Y axis position DRO codes based on active G68 rotation and coordinate mode.
CommonScreenV01 UpdateAxisHomeStatus (AxisID, homed)
 Placeholder for axis home status update notification.
CommonScreenV01 UpdateFeedrateDROLabels ()
 Update the feedrate DRO label and current velocity display based on active feed mode.
CommonScreenV01 UpdateSpindleMinMaxSpeed ()
 Update the spindle range min/max speed label on the screen.
CommonScreenV01 UpdateToolPathExtents ()
 Update the tool path extents DROs for all configured axes.
CommonScreenV01 UpdateGCodeLinePercentage ()
 Update the current G-code line DRO format string to include the line completion percentage.
CommonScreenV01 UpdateActiveOffsetDisplay ()
 Update the active work offset label displayed on the locked and unlocked position groups.
CommonScreenV01 GetWorkOffsetGCodeString (OffsetNumber)
 Convert a numeric work offset fixture group number to its G-code string representation.
CommonScreenV01 UpdateScalingAndRotation ()
 Update axis position DRO labels and styles to reflect active G68 rotation and G51 scaling.
CommonScreenV01 UpdateToolOffsetDROColors ()
 Update the background colors of the tool length and tool diameter DROs to reflect offset status.
CommonScreenV01 UpdateButtonColors ()
 Update button colors for all mode-indicating buttons on the main screen.
CommonScreenV01 UpdateSpindleButtons ()
 Update spindle forward and reverse button states, labels, colors, and interlocks.
CommonScreenV01 UpdateSpindleLoadMeter ()
 Update the spindle load meter gauge and label displays for main and sub spindles.
CommonScreenV01 HasOnScreenJogging ()
 Report whether this screen implementation supports on-screen jog buttons.
CommonScreenV01 OnScreenJogButtonsOn ()
 Enable the on-screen jog buttons group if jog inhibit is not active.
CommonScreenV01 OnScreenJogButtonsOff ()
 Disable the on-screen jog buttons group and reset the jog button color.
CommonScreenV01 ExecuteMDI ()
 Execute the current MDI line control contents as a G-code command.
CommonScreenV01 IsMDIModeActive ()
 Check whether the MDI operations tab is currently selected.
CommonScreenV01 IsDROModeActive ()
 Check whether the DRO position display mode is currently active.
CommonScreenV01 GetMDIControlName ()
 Return the name of the MDI input control used by this screen.
CommonScreenV01 InitializeToolSetters ()
 Create default Manual and Auto tool setter entries from legacy OEM parameters if none exist.
CommonScreenV01 UpdateManualSetterHeight ()
 Update the manual tool setter height DRO with the current setter height value.
CommonScreenV01 CommonUpdateToolOffsetsTab ()
 Update the tool offsets tab visibility based on tool setter and tool changer configuration.
CommonScreenV01 OpenToolSetterSelection (...)
 Open the tool setter selection dialog, optionally filtering by setter type.
CommonScreenV01 InitializeAxisPositionGroup ()
 Initialize axis position group DRO colors, enabled states, and unit display settings.
CommonScreenV01 UpdateToolPathPanels (Panel)
 Show or hide tool path panel groups based on the selected panel grid layout.
CommonScreenV01 UpdateAuxiliaryButtonNames ()
 Refresh all auxiliary button labels from the Mach4 profile and current signal states.
CommonScreenV01 CheckPassword (level)
 Validate the requested password level and prompt the user if required.
CommonScreenV01 ModifyAxisDROPosition_Screen (value, AxisID,...)
 Apply a screen DRO value to modify the specified axis position.
CommonScreenV01 ModifyAxisDROPosition (AxisID)
 Apply a DRO-entered axis position value to the specified axis.
CommonScreenV01 GetToolRangeTextString ()
 Get the tool range text string from the screen if the auto tool setter is active.
CommonScreenV01 SetToolLengthVerifyDRO (value)
 Set the displayed value of the tool length verify DRO.
CommonScreenV01 SetToolLengthVerifyButton (onoff)
 Set the visual state of the tool length verify button using button color.
CommonScreenV01 UpdateCurrentTabRegister ()
 Save the currently active main window tab index to the OEM parameter store.
CommonScreenV01 GetCurrentTab ()
 Get the currently selected tab index of the main window tab control.
CommonScreenV01 ScreenConfigurationDialog ()
 Open the screen configuration dialog with a protected call wrapper.
 GetNextID ()
 Generate the next sequential integer ID for dialog control creation.
 Setupinputs ()
 Populate all configuration dialog controls with current values from the Mach4 profile.
 SaveSettings ()
 Save all screen configuration dialog settings to the Mach4 profile.
 SetupAux (a)
 Create and add a row of auxiliary output configuration controls to the grid sizer.
gridPositions SettingsGetLabel ()
 Read the label for a GoTo positions grid row from the Mach4 profile.
gridPositions SettingsSetLabel (new_label)
 Save a new row label to the Mach4 profile and update the grid display.
gridPositions DoLabelOptionsMenu (grid_event)
 Display a context menu for changing a row label in the GoTo positions grid.
CommonScreenV01 GetGoToPositionsTable ()
 Build and return the table of GoTo position configuration entries.
CommonScreenV01 GetToolPathPanelNames ()
 Retrieve the names of all tool path panel controls in the main screen.

Function Documentation

◆ CheckPassword()

CommonScreenV01 CheckPassword ( level )

Validate the requested password level and prompt the user if required.

Checks that the level argument is a valid integer between 1 and 3 inclusive. If the level is nil, non-numeric, or out of range, returns true immediately (no password required). Otherwise delegates to w.PasswordProtection() to perform the actual password check. If the check fails, displays a warning message via m.SetWarningMessage and returns false with the failure reason.

Parameters
level(number|nil) Password protection level to enforce (1=operator, 2=supervisor, 3=admin). If nil or invalid, the function returns true without prompting
Returns
(boolean|nil) True if access is granted or level is invalid, false if denied
(boolean) Success flag - true if the password check passed or was skipped
(string|nil) Status message describing the result, or nil on unconditional pass
Note
Documentation generated by AI on 2026-03-03

◆ CommonUpdateToolOffsetsTab()

CommonScreenV01 CommonUpdateToolOffsetsTab ( )

Update the tool offsets tab visibility based on tool setter and tool changer configuration.

Reads the "ToolSetterType" and "ToolChangerMethod" OEM parameters to determine which UI groups to show or hide. If the setter type is "Manual", the ManualToolSetterGroup is shown and AutoToolSetterGroup is hidden; otherwise the reverse. If the changer method is "Auto", the AutoToolChangeGroup is shown and related buttons are enabled; otherwise the ManualToolChangeGroup is shown and the auto-change buttons are disabled.

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

◆ DisableAdvancedGUIButtons()

CommonScreenV01 DisableAdvancedGUIButtons ( )

Disable the advanced GUI mode by resetting the UseAdvGui profile flag to zero.

Reads the "UseAdvGui" integer from the Preferences profile section. If the value is 1 (advanced GUI enabled), writes it back as 0 to disable the advanced GUI mode. This ensures that the advanced GUI is not active when the screen loads.

Note
Documentation generated by AI on 2026-03-03

◆ DoLabelOptionsMenu()

gridPositions DoLabelOptionsMenu ( grid_event )

Display a context menu for changing a row label in the GoTo positions grid.

This event handler is connected to both left double-click and right-click events on the grid's row labels. It retrieves the clicked row index from the grid event, builds a wxMenu with a "Change Label" item whose ID encodes the row index, and pops it up at the cursor position. The wxEVT_COMMAND_MENU_SELECTED handler on the grid processes the selection and prompts the user for a new label string.

Parameters
grid_event(userdata) The wxGridEvent providing the clicked row index via GetRow()
Note
Documentation generated by AI on 2026-03-03

◆ EditModeOff()

CommonScreenV01 EditModeOff ( )

Deactivate edit mode by switching the position display to locked mode.

Delegates directly to m.screen.PositionDisplayLocked() to hide the unlocked position group and restore the read-only locked display state.

Note
Documentation generated by AI on 2026-03-03

◆ EditModeOn()

CommonScreenV01 EditModeOn ( )

Activate edit mode by switching the position display to unlocked mode.

Delegates directly to m.screen.PositionDisplayUnLocked() passing false to suppress the password prompt, immediately switching to the editable unlocked display state.

Note
Documentation generated by AI on 2026-03-03

◆ ExecuteMDI()

CommonScreenV01 ExecuteMDI ( )

Execute the current MDI line control contents as a G-code command.

Retrieves the MDI control name via CommonScreenV01.GetMDIControlName(), then calls scr.ExecMdi() to execute the command entered in that control. Returns an error if the control name lookup or execution fails.

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

◆ GetCurrentTab()

CommonScreenV01 GetCurrentTab ( )

Get the currently selected tab index of the main window tab control.

Returns
(number) The zero-based index of the currently active tab in "MainWindowTabs"
Note
Documentation generated by AI on 2026-03-03

◆ GetGoToPositionsTable()

CommonScreenV01 GetGoToPositionsTable ( )

Build and return the table of GoTo position configuration entries.

Returns a structured table describing all configurable GoTo positions used by the screen configuration dialog's positions grid. Each entry contains five fields: type label, profile position key, profile move order key, profile label key, and a default display label. The table always starts with Tool Change, Tool Setter, Part Zero, Machine Zero, and Park Position 0, followed by Park Positions 1 through 9 generated dynamically. Profile keys follow the MachMotion profile section naming convention and are used to read and write position and order data via mc.mcProfileGetString/WriteString.

Returns
(table) Array of position entry arrays, each with five string elements: [1] type label, [2] position key, [3] move order key, [4] label key, [5] default label
(boolean) Success flag - true if operation completed successfully
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ GetMDIControlName()

CommonScreenV01 GetMDIControlName ( )

Return the name of the MDI input control used by this screen.

Returns
(string) The control name "MDILine(1)"
(boolean) Success flag - always true
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ GetNextID()

GetNextID ( )

Generate the next sequential integer ID for dialog control creation.

Increments the closure-scoped counter m_ID by one and returns the new value. Used within _ScreenConfigurationDialog to assign unique wxWindow IDs to each control without hardcoding values. Must be called in the order controls are defined so that ID constants remain consistent.

Returns
(number) The next available integer control ID
Note
Documentation generated by AI on 2026-03-03

◆ GetPositionDisplayUnlocked()

CommonScreenV01 GetPositionDisplayUnlocked ( )

Check whether the unlocked position display group is currently visible.

Reads the "Hidden" property of the "UnLockedPositionDisplayGroup" screen object. Returns true if the group is visible (Hidden == "0"), false otherwise.

Returns
(boolean) True if the unlocked position display group is visible, false otherwise
(boolean) Success flag - always true
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ GetRootElementNames()

CommonScreenV01 GetRootElementNames ( )

Return the list of root element names used by this screen layout.

Returns
(table) Array of root element name strings: {"Main", "Main(1)", "Default", "Default(1)"}
Note
Documentation generated by AI on 2026-03-03

◆ GetToolPathPanelNames()

CommonScreenV01 GetToolPathPanelNames ( )

Retrieve the names of all tool path panel controls in the main screen.

Queries the screen hierarchy under the "Main(1)" root element for all controls of type toolpath (scr.CTYPE_TOOLPATH) and returns their names as an array. This is used to enumerate available tool path display panels for configuration or layout purposes.

Returns
(table) Array of tool path panel name strings found under the "Main(1)" element
Note
Documentation generated by AI on 2026-03-03

◆ GetToolRangeTextString()

CommonScreenV01 GetToolRangeTextString ( )

Get the tool range text string from the screen if the auto tool setter is active.

Reads the "ToolSetterType" OEM parameter to determine whether an automatic tool setter is configured. If the type is "Auto", returns the current value of the "ToolRangeTextBox" screen control. If the type is "Manual" or the parameter read fails, returns nil.

Returns
(string|nil) The tool range text box value if Auto tool setter is active, or nil
(boolean) Success flag - true if the OEM parameter was read successfully
(string) Status message from w.FunctionError() on failure, or nil on success path
Note
Documentation generated by AI on 2026-03-03

◆ GetWorkOffsetGCodeString()

CommonScreenV01 GetWorkOffsetGCodeString ( OffsetNumber )

Convert a numeric work offset fixture group number to its G-code string representation.

If the offset number is an integer, formats it as "G%d " (e.g., "G54 "). If it is fractional (e.g., 54.1 for extended fixture offsets), reads the P sub-value from mc.mcCntlGetValue and formats as "G%0.1f P%d" (e.g., "G54.1 P1").

Parameters
OffsetNumber(number) The fixture group number as returned by mc.mcCntlGetValue with mc.VAL_FIXTURE_GP
Returns
(string) The formatted G-code offset string
Note
Documentation generated by AI on 2026-03-03

◆ HasOnScreenJogging()

CommonScreenV01 HasOnScreenJogging ( )

Report whether this screen implementation supports on-screen jog buttons.

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

◆ InitializeAxisPositionGroup()

CommonScreenV01 InitializeAxisPositionGroup ( )

Initialize axis position group DRO colors, enabled states, and unit display settings.

Iterates over all coordinate axes (X through the maximum configured axis) and sets the foreground color, background color, enabled state, homed LED color, and button enabled state for each axis's position DRO, ToGo DRO, and DRO controls. Disabled axes are shown in grey with read-only DROs; enabled axes receive the configured part-coordinates color scheme and editable DROs. After configuring all axes, sets the unit display (inch/metric) left/right position for the X, Y, and Z position DROs from the MachMotion profile, then calls CommonScreenV01.MachineCoordColors() to apply coordinate-mode-specific colors.

Note
Documentation generated by AI on 2026-03-03

◆ InitializeToolSetters()

CommonScreenV01 InitializeToolSetters ( )

Create default Manual and Auto tool setter entries from legacy OEM parameters if none exist.

Checks whether tool setters named "Manual Tool Setter" and "Auto Tool Setter" already exist via w.GetToolSetter(). If neither exists, reads the legacy OEM parameters (ToolSetterType, ManualGageBlockHeight, ToolSetterPosition, ToolSetterHeight) and uses them to create both tool setter entries via w.CreateToolSetter(). Copies height and position values to the new setters, marks the auto setter with AutoSetter=1 and ProbeInput=0, writes the selection register strings, and notifies the user with a warning dialog that the configuration has been updated.

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

◆ IsDROModeActive()

CommonScreenV01 IsDROModeActive ( )

Check whether the DRO position display mode is currently active.

Reads the "Hidden" property of the "DROPositionDisplayGroup" screen object. Returns true if the group is visible (Hidden == "0"), false otherwise.

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

◆ IsEditModeActive()

GrinderCenterlessScreenV02 IsEditModeActive ( )

Query whether edit mode (unlocked position display) is currently active.

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

Delegates to m.screen.GetPositionDisplayUnlocked() and returns its result, which reflects whether the UnLockedPositionDisplayGroup is currently visible.

Returns
(boolean) True if edit mode is active, false otherwise
(boolean) Success flag from GetPositionDisplayUnlocked()
(string) Status message from GetPositionDisplayUnlocked()
Note
Documentation generated by AI on 2026-03-03

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

◆ IsMDIModeActive()

CommonScreenV01 IsMDIModeActive ( )

Check whether the MDI operations tab is currently selected.

Reads the current tab index from the "OperationsTabs" control. If the index is -1 (indicating an orphaned object), falls back to scr.GetProperty to retrieve the value. Returns true only if the current tab index is 2, which corresponds to MDI mode.

Returns
(boolean) True if MDI mode tab (index 2) is active, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ LowPriorityLoop()

CommonScreenV01 LowPriorityLoop ( )

Execute all low-priority periodic screen update tasks.

Called on a lower-frequency timer tick than the PLC script. Sequentially invokes the following update routines: UpdateScalingAndRotation (G68/G51 DRO labels), UpdateActiveOffsetDisplay (work offset label), MonitorFixtureOffsets (save and regenerate tool path on zero), UpdateGCodeLinePercentage (current line percentage display), UpdateButtonColors (mode-indicating button colors), UpdateSpindleMinMaxSpeed (spindle range label), UpdateMPGAxisSelector (MPG axis selector label), UpdateSpindleButtons (spindle FWD/REV state), UpdateSpindleWarmUp (warm-up gauge and status), and UpdateToolPathExtents (path extent DROs). If CommonScreenV01.MachineScreenLowPriorityLoop is defined, calls it last to allow machine-specific overrides to execute additional logic.

Note
Documentation generated by AI on 2026-03-03

◆ MachineCoordColors()

CommonScreenV01 MachineCoordColors ( )

Update axis DRO foreground colors to reflect machine vs. part coordinate display mode.

Reads the current state of the OSIG_MACHINE_CORD signal. If machine coordinates are active, sets the "MachineCoordinatesBtn" to the On color and updates the foreground color of all six axis position DROs (XPosDRO through CPosDRO) to DRO_COLOR_MACHINE_COORDS. If part coordinates are active, sets the button to Off color and applies DRO_COLOR_PART_COORDS to all axis DROs.

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

◆ ModifyAxisDROPosition()

CommonScreenV01 ModifyAxisDROPosition ( AxisID )

Apply a DRO-entered axis position value to the specified axis.

Reads the current value from the unlocked position DRO for the given axis (using the "PosDRO(2)" variant of the control name), converts it to a number, and passes it to m.ModifyAxisPosition to update the axis work offset or position register.

Parameters
AxisID(number) Zero-based axis index (0=X, 1=Y, 2=Z, 3=A, 4=B, 5=C)
Returns
(nil) Returns the result of m.ModifyAxisPosition()
(boolean) Success flag from m.ModifyAxisPosition()
(string) Status message from m.ModifyAxisPosition()
Note
Documentation generated by AI on 2026-03-03

◆ ModifyAxisDROPosition_Screen()

CommonScreenV01 ModifyAxisDROPosition_Screen ( value ,
AxisID ,
... )

Apply a screen DRO value to modify the specified axis position.

Delegates to m.ModifyAxisPosition with the provided value and axis ID, then reads back the updated axis position via w.api("mcAxisGetPos") and returns it. This variant is called from screen chunk DRO editor callbacks where the new value is passed directly rather than read from a control.

Parameters
value(number) The new position value entered in the DRO
AxisID(number) Zero-based axis index (0=X, 1=Y, 2=Z, 3=A, 4=B, 5=C)
...(any) Additional arguments passed through from the DRO callback (unused)
Returns
(number) The axis position as read back from mc.mcAxisGetPos after the update
Note
Documentation generated by AI on 2026-03-03

◆ OnScreenJogButtonsOff()

CommonScreenV01 OnScreenJogButtonsOff ( )

Disable the on-screen jog buttons group and reset the jog button color.

If the screen supports on-screen jogging (m.screen.HasOnScreenJogging() returns true), sets the "JogButtonsGroup" to disabled and resets the "OnScreenJogButtonsBtn" button color to the standard Off color from the color scheme.

Note
Documentation generated by AI on 2026-03-03

◆ OnScreenJogButtonsOn()

CommonScreenV01 OnScreenJogButtonsOn ( )

Enable the on-screen jog buttons group if jog inhibit is not active.

If the screen supports on-screen jogging and the jog inhibit signal (mc.ISIG_JOG_INHIBIT) is not active, enables the "JogButtonsGroup" and sets the "OnScreenJogButtonsBtn" color to green. If jog inhibit is active, displays a warning message via m.SetWarningMessage() and does not enable the buttons.

Note
Documentation generated by AI on 2026-03-03

◆ OpenToolSetterSelection()

CommonScreenV01 OpenToolSetterSelection ( ...)

Open the tool setter selection dialog, optionally filtering by setter type.

Extracts the FilterToolSetterTypes argument from the variadic argument list (position 3) and passes it to m.ToolSetterSelection() to display the selection dialog. The variadic signature matches the standard screen button callback convention.

Parameters
...(any) Variadic arguments; the third argument is used as the tool setter type filter
Note
Documentation generated by AI on 2026-03-03

◆ OperatorPanelInitialization()

CommonScreenV01 OperatorPanelInitialization ( )

Initialize operator panel status and configure feed rate controls based on connected panels.

Checks which operator panels are configured via w.GetConfiguredOperatorPanels(). Sets OPERATOR_PANEL_STATUS to true if any recognized panel (X15-10-01, X15-10-04, X15-12-01, or X15-12-02) is present, false otherwise. Configures the RapidOverrideDRO and FeedrateOverrideDRO as read-only or editable depending on the specific panel type and whether RRO is enabled in the panel profile. When a panel is active, disables the on-screen jog speed control and shows the FeedRateDisplayGroup instead of the slider. When no panel is active, maps the JogSpeed control to the jog rate percentage register (code 391) and shows the FeedRateSliderGroup.

Note
Documentation generated by AI on 2026-03-03

◆ PLCScript()

MotionController PLCScript ( )

Execute the PLC script loop inside a protected call wrapper.

Called periodically from the Mach4 PLC script for motion controller housekeeping.

PLC script callback for RapidPath motion controller periodic housekeeping.

Execute the height controller's periodic PLC loop tasks.

Invokes CommonScreenV01._PLCScript inside a w.pcall() protected call. If an error occurs during execution, displays a wxMessageBox with the formatted error message. This function is the public entry point for the PLC loop and prevents silent failures from propagating and crashing the Mach4 screen script environment.

Note
Documentation generated by AI on 2026-03-03

Called from the system PLC script on every cycle. Invokes UpdateScreenControls() to refresh display indicators and CheckForLostArc() to detect and respond to arc loss events. Subclasses such as SoftHC override this method to add mode-specific control logic.

Note
Documentation generated by AI on 2026-03-03

Called periodically from the Mach4 PLC script. Delegates to HandleOperationStatus() to monitor the plugin's operational state and manage the operational status dialog. When the plugin reports as operational, triggers OneTimeOperationalInitialization() to register generic soft input user commands that require the plugin to be running.

Note
Documentation generated by AI on 2026-03-04

Base implementation does nothing. Subclasses (HiCON, RapidPath) override this to perform periodic tasks such as handling analog spindle output, monitoring operational status dialogs, and triggering one-time operational initialization when the controller becomes ready.

Note
Documentation generated by AI on 2026-03-04

◆ PositionDisplayDROMode()

CommonScreenV01 PositionDisplayDROMode ( )

Switch the position display to DRO mode, showing the DRO group and disabling edit controls.

Hides the UnLockedPositionDisplayGroup and LockedPositionDisplayGroup, shows the DROPositionDisplayGroup, and enables editor mode (keypad) for all six axis DROs and the tool diameter and length DROs. Disables all fixture offset, edge finder, tool setter, tool table, and related button groups. Sets the DROModeBtn to green and clears the LockedBtn and UnLockedBtn colors. Calls CommonScreenV01.InitializeAxisPositionGroup() to refresh axis DRO appearance.

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

◆ PositionDisplayLocked()

CommonScreenV01 PositionDisplayLocked ( )

Switch the position display to locked (read-only) mode and save offsets.

Hides the UnLockedPositionDisplayGroup and DROPositionDisplayGroup, shows the LockedPositionDisplayGroup, and sets all six axis DROs and tool DROs to read-only editor mode (3). Disables all fixture offset, edge finder, tool setter, tool table, and related button groups. Sets LockedBtn to green and clears UnLockedBtn and DROModeBtn colors. Calls mc.mcToolSaveFile() to persist tool data and m.SaveFixtureOffsets() to save offsets. Calls CommonScreenV01.InitializeAxisPositionGroup() to refresh DRO appearance. If a user script hook (user.UserPositionDisplayLocked) is defined, it is called and its result is checked.

Returns
(nil) No meaningful primary return value
(boolean) Success flag - false if tool save or user script fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ PositionDisplayToggle()

CommonScreenV01 PositionDisplayToggle ( )

Cycle the position display mode through locked, unlocked, and DRO states.

Checks which position display group is currently visible and advances to the next mode in sequence: if the LockedPositionDisplayGroup is visible, switches to unlocked mode via m.screen.PositionDisplayUnLocked(); if the UnLockedPositionDisplayGroup is visible, switches to DRO mode via m.screen.PositionDisplayDROMode(); if the DROPositionDisplayGroup is visible, switches back to locked mode via m.screen.PositionDisplayLocked().

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

◆ PositionDisplayUnLocked()

CommonScreenV01 PositionDisplayUnLocked ( Password )

Switch the position display to unlocked (edit) mode, optionally requiring a password.

If Password is true, verifies access via m.screen.CheckPassword(1) before proceeding. Hides the LockedPositionDisplayGroup and DROPositionDisplayGroup, shows the UnLockedPositionDisplayGroup, and enables all fixture offset, edge finder, tool setter, tool table, and related button groups. Sets all six axis DROs and tool DROs to keypad editor mode (1). Highlights the UnLockedBtn in green and the PositionDisplayModeBtn in yellow, and clears the LockedBtn and DROModeBtn colors. Calls CommonScreenV01.InitializeAxisPositionGroup() to refresh DRO appearance. If a user script hook (user.UserPositionDisplayUnLocked) is defined, it is called and its result is checked.

Parameters
Password(boolean|nil) If true, a password check is performed before unlocking. If nil or false, unlocking proceeds without a password prompt
Returns
(nil) No meaningful primary return value
(boolean) Success flag - false if user script hook fails
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ SaveSettings()

SaveSettings ( )

Save all screen configuration dialog settings to the Mach4 profile.

Writes all values from the configuration dialog controls to the MachMotion profile section. If the GoTo tab is included (include_goto_tab == true), iterates through the positions grid and writes axis position values and move order selections (converting choice strings such as "1st", "2nd" to numeric indices) for all configured positions. Always writes the tool path panel count, all six auxiliary button output assignments, toggle/momentary modes, on/off text labels, the GCode percentage display setting, and the tab font size. After saving, calls m.screen.SetTabFontSizes() to apply the font size immediately.

Note
This function accesses dialog control variables (aux1-aux6, AuxCheck1-6, etc.) from the enclosing _ScreenConfigurationDialog closure scope
Documentation generated by AI on 2026-03-03

◆ ScreenConfigurationDialog()

CommonScreenV01 ScreenConfigurationDialog ( )

Open the screen configuration dialog with a protected call wrapper.

Invokes CommonScreenV01._ScreenConfigurationDialog inside a w.pcall() protected call. If an error occurs, displays a wxMessageBox with the error details and re-raises the error. This function is the public entry point for the configuration dialog and ensures that any Lua errors within the dialog setup do not silently fail.

Warning
The machine must be in IDLE state before opening the dialog; the inner function enforces this check and will return early if the machine is not idle
See also
CommonScreenV01._ScreenConfigurationDialog for the full dialog implementation
Note
Documentation generated by AI on 2026-03-03

◆ ScreenLoadScript()

CommonScreenV01 ScreenLoadScript ( )

Initialize the screen signal library and run the machine screen load script.

Builds the SCREEN_SIG_LIBRARY table, which maps Mach4 signal constants to callback functions that update the corresponding screen controls when signal states change. Signals handled include: OSIG_MACHINE_ENABLED (jogging tab enable/disable), ISIG_EMERGENCY (enable button and emergency stop), OSIG_MACHINE_CORD (coordinate color update), OSIG_SINGLE_BLOCK, OSIG_SOFTLIMITS_ON, OSIG_TOOL_CHANGE, OSIG_BLOCK_DELETE, OSIG_REVERSE_RUN, OSIG_COOLANTON, OSIG_MISTON, OSIG_LIMITOVER, SpindleBrakeOutput (conditional on SpindleBrakeEnabled OEM parameter), and all sixteen AUX_OUTPUT_ARRAY entries (updating Aux1Btn through Aux16Btn label and color when their output signal is a valid output). Uses a checkpoint mechanism (_CHECKPOINT) for diagnostic timing if m.GetCheckPoint() returns a non-nil object. After building the signal library, calls CommonScreenV01.MachineScreenLoadScript if defined to allow machine-specific extensions.

Note
Disables button hover effects globally via scr.EnableButtonHover(0)
Documentation generated by AI on 2026-03-03

◆ ScreenUnloadScript()

CommonScreenV01 ScreenUnloadScript ( )

Execute cleanup tasks when the screen is unloaded.

If CommonScreenV01.MachineScreenUnloadScript is defined, calls it to allow machine-specific screen modules to perform their own teardown logic when the screen is closed or switched.

Note
Documentation generated by AI on 2026-03-03

◆ SetTabFontSizes()

CommonScreenV01 SetTabFontSizes ( )

Set the font size for all main tab controls from the MachMotion profile.

Reads the "TabFontSize" value from the MachMotion profile section. If the value is -1 (not configured), defaults to 10 points. Applies the resulting point size to each tab control in the set {"OperationsTabs", "MachineTabs", "MainWindowTabs", "MainWindowTabsWizard"} via h.SetObject with the "Text Height" property.

Note
Documentation generated by AI on 2026-03-03

◆ SettingsGetLabel()

gridPositions SettingsGetLabel ( )

Read the label for a GoTo positions grid row from the Mach4 profile.

Looks up the GoTo position entry for the given row index in the cached CommonScreenV01.__GoToPositionItems table to retrieve the profile label key and default value, then reads the current label string from the MachMotion profile section via mc.mcProfileGetString. Falls back to the default label if the profile read fails.

Parameters
row_idx(number) Zero-based row index into the GoTo positions grid
Returns
(string) The label string for the specified row, or the default label on error
Note
Documentation generated by AI on 2026-03-03

◆ SettingsSetLabel()

gridPositions SettingsSetLabel ( new_label )

Save a new row label to the Mach4 profile and update the grid display.

Looks up the GoTo position entry for the given row index in the cached CommonScreenV01.__GoToPositionItems table to find the profile label key, then writes the new label string to the MachMotion profile section via mc.mcProfileWriteString. Finally updates the grid row label display with SetRowLabelValue.

Parameters
row_idx(number) Zero-based row index into the GoTo positions grid
new_label(string) The new label string to save and display for this row
Note
Documentation generated by AI on 2026-03-03

◆ SetToolLengthVerifyButton()

CommonScreenV01 SetToolLengthVerifyButton ( onoff )

Set the visual state of the tool length verify button using button color.

Updates the "Button Color Dn" property of the "ToolLengthVerifyBtn" screen object to reflect whether tool length verification is active. When on, applies the standard On color from the color scheme; when off, applies the Off color.

Parameters
onoff(boolean) True to show the button in the On (active) color, false for Off
Note
Documentation generated by AI on 2026-03-03

◆ SetToolLengthVerifyDRO()

CommonScreenV01 SetToolLengthVerifyDRO ( value )

Set the displayed value of the tool length verify DRO.

Parameters
value(number|string) The value to display in the "ToolLengthVerifyDRO" screen object
Note
Documentation generated by AI on 2026-03-03

◆ SetupAux()

SetupAux ( a )

Create and add a row of auxiliary output configuration controls to the grid sizer.

Builds one complete row in the auxiliary outputs configuration section of the screen configuration dialog. Each row contains a static label (e.g., "Button #1"), a wxChoice dropdown for selecting the associated output signal, a wxCheckBox for momentary vs. toggle behavior, and two wxTextCtrl fields for the button's On and Off text labels. All controls are added to AuxGridSizer in the correct order.

Parameters
a(number) The auxiliary button number (1-6) used for the row label string
Returns
(userdata) AuxChoices - wxChoice control for output signal selection
(userdata) AuxCheckBox - wxCheckBox for momentary mode selection
(userdata) AuxOnText - wxTextCtrl for the button's On label text
(userdata) AuxOffText - wxTextCtrl for the button's Off label text
Note
Documentation generated by AI on 2026-03-03

◆ Setupinputs()

Setupinputs ( )

Populate all configuration dialog controls with current values from the Mach4 profile.

Reads settings from the MachMotion profile section and applies them to all dialog controls. If the GoTo tab is included (include_goto_tab == true), initializes each grid cell with axis position values and move order choice strings (converting numeric profile values to display strings such as "1st", "2nd") and applies alternating row background colors. Always populates the tool path panel radio box, all six auxiliary button signal selectors, toggle checkboxes, on/off text controls, the GCode percentage selector, and the tab font size spinner.

Note
This function accesses dialog control variables from the enclosing _ScreenConfigurationDialog closure scope and must be called after all controls are created
Documentation generated by AI on 2026-03-03

◆ StartUpScript()

CommonScreenV01 StartUpScript ( )

Initialize all screen controls and subsystems when Mach4 starts up.

Performs the full startup sequence for the common screen, including: updating the screen layout and tab font sizes; enabling or disabling the ManualModeBtn based on the ManualModeEnabled OEM parameter and the active motion device (DSPMC, HiCON, or RapidPath); configuring the spindle load meter and sub-spindle load meter averagers and scale parameters; initializing the jogging tab signals and on-screen jog button states; enabling or disabling the SpindleBrakeBtn based on OEM configuration; setting the CurrentGcodeDRO format based on the CurrentGcodeLinePercentage profile flag; configuring the tool path panel grid; initializing the axis position group DRO colors; updating the tool offsets tab; initializing position display locked and unlocked states; performing operator panel initialization; setting the max values for the SpindleOVSlider and FeedOVSlider from the profile; refreshing auxiliary button names; updating DRO decimal counts; displaying the current screen name in ScreenLabel; disabling advanced GUI buttons; creating the emergency stop notification; and calling CommonScreenV01.MachineScreenStartupScript if defined for machine-specific extensions.

Returns
(nil) No meaningful primary return value on success
(boolean) false if any required OEM parameter read fails
(string) Status message from w.FunctionError() on failure
Note
Documentation generated by AI on 2026-03-03

◆ UpdateActiveOffsetDisplay()

CommonScreenV01 UpdateActiveOffsetDisplay ( )

Update the active work offset label displayed on the locked and unlocked position groups.

Reads the current fixture group number via mc.mcCntlGetValue with mc.VAL_FIXTURE_GP, converts it to a G-code string via CommonScreenV01.GetWorkOffsetGCodeString(), and sets the "Label" property of both "LockedPositionDisplayGroup" and "UnLockedPositionDisplayGroup" to show "Active Offset: <G-code string>".

Note
Documentation generated by AI on 2026-03-03

◆ UpdateAuxiliaryButtonNames()

CommonScreenV01 UpdateAuxiliaryButtonNames ( )

Refresh all auxiliary button labels from the Mach4 profile and current signal states.

Iterates over all configured auxiliary buttons (1 to AUX_BTN_QUANTITY) and reads the On and Off label strings from the MachMotion profile section for each button. Updates the AUX_BTN_OFF_NAME and AUX_BTN_ON_NAME global arrays with the retrieved strings. If the button's associated output signal is a valid output signal (> mc.MC_OSIGS_START), reads the current signal state and sets the button label to either the On or Off text accordingly. Buttons without a valid output signal assignment always show the Off label.

Note
Reads profile keys "AuxiliaryOutputButton#OnText" and "AuxiliaryOutputButton#OffText" where # is the button number
Documentation generated by AI on 2026-03-03

◆ UpdateAxisDROs()

CommonScreenV01 UpdateAxisDROs ( )

Update X and Y axis position DRO codes based on active G68 rotation and coordinate mode.

Switches the DRO code assignments for XPosDRO and YPosDRO depending on the current state of machine coordinates and G68 rotation. When machine coordinates are active, forces both DROs to machine position codes (520 and 521). When G68 rotation becomes active (and machine coordinates are off), switches to rotated position codes (29 and 30). When G68 rotation deactivates or the codes have been reset to zero, restores the standard part-coordinate codes (520 and 521). Updates the G68_ROTATION_WAS_ACTIVE global to track the previous rotation state for transition detection.

Note
G68_ROTATION_WAS_ACTIVE global is updated as a side effect of this function
Documentation generated by AI on 2026-03-03

◆ UpdateAxisHomeStatus()

CommonScreenV01 UpdateAxisHomeStatus ( AxisID ,
homed  )

Placeholder for axis home status update notification.

This function is intentionally empty in CommonScreenV01 and is only used in CommonScreenV02. Derived screen modules may override this function to respond to axis homing state changes.

Parameters
AxisID(number) Zero-based axis index of the axis whose home status changed
homed(boolean) True if the axis is now homed, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ UpdateButtonColors()

CommonScreenV01 UpdateButtonColors ( )

Update button colors for all mode-indicating buttons on the main screen.

Reads current machine state and register values to set button colors for: Manual Mode (active/inactive), GoTo Position (active/inactive), Run From Here (active/inactive, read from MachMotion register), MST Lock and Dry Run (on/off, read from OEM registers), Jog Follow (on/off, from mc.mcToolPathGetFollowMode), ToolPath Display Mode (on/off, from mc.mcToolPathGetDrawLimits), and M1 Optional Stop (on/off, from mc.mcCntlGetOptionalStop). Uses ColorScheme.Button.On.Bg and ColorScheme.Button.Off.Bg for standard two-state buttons and BTN_COLOR_YELLOW for active-mode buttons.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateCurrentTabRegister()

CommonScreenV01 UpdateCurrentTabRegister ( )

Save the currently active main window tab index to the OEM parameter store.

Reads the current tab from the MainWindowTabs control via CommonScreenV01.GetCurrentTab() and writes it to the "CurrentTabMainWindowTabs" OEM parameter so the tab selection can persist across sessions or be read by other modules.

Returns
(nil) No meaningful value on success
(boolean) Success flag - true if the parameter was written successfully
(string) Status message from w.FunctionCompleted() or w.FunctionError()
Note
Documentation generated by AI on 2026-03-03

◆ UpdateDRODecimalCount()

CommonScreenV01 UpdateDRODecimalCount ( )

Update DRO format strings for all axis, feedrate, and tool DROs based on profile settings.

Reads decimal precision settings from the Mach4 profile for feedrate DROs ("DecimalCountFeedrate") and tool DROs ("DecimalCountTool"), applying them to the FeedrateDRO, CurrentVelocityDRO, ToolDiameterDRO, and ToolLengthDRO format strings. For each of the six coordinate axes (0 through 5), reads the axis precision via mc.mcAxisGetPrecision() and applies it to the PosDRO, ToGoDRO, and DRO format strings for that axis using AXIS_LETTER_ARRAY to construct the control names.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateDROPostions()

CommonScreenV01 UpdateDROPostions ( )

Update axis DROs in DRO position display mode with machine-position-based values.

If the "DROPositionDisplayGroup" is currently visible (Hidden == "0"), iterates over all coordinate axes (X through MC_MAX_COORD_AXES-1), reads the machine position via mc.mcAxisGetMachinePos(), converts it to the current display units via w.ConvertUnits(), adds the per-axis DRO_MODE_OFFSET_ARRAY offset, rounds to 4 decimal places, and writes the result to the corresponding axis DRO screen object (e.g., "XDRO", "YDRO").

Returns
(nil) No meaningful primary return value on success
(boolean) Success flag - false if unit conversion fails
(string) Status message from w.FunctionError() on failure
Note
Documentation generated by AI on 2026-03-03

◆ UpdateFeedrateDROLabels()

CommonScreenV01 UpdateFeedrateDROLabels ( )

Update the feedrate DRO label and current velocity display based on active feed mode.

Reads the current feedrate mode G-code group (mc.SV_MOD_GROUP_5) to determine whether the machine is in units-per-minute (G94) or units-per-revolution (G95) mode. Constructs a velocity label string with the appropriate units (inch/min, mm/min, inch/rev, or mm/rev) based on MACHINE_CURRENT_UNITS and the active feed mode. For G94, displays the blended velocity directly. For G95, computes units-per-revolution by dividing blended velocity by current true spindle RPM; displays 0 if either value is zero or negative. Updates the "CurrentVelocityDRO" value and "CurrentVelocityText" label accordingly.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateGCodeLinePercentage()

CommonScreenV01 UpdateGCodeLinePercentage ( )

Update the current G-code line DRO format string to include the line completion percentage.

If the GCODE_LINE_PERCENTAGE global is "Yes" and a G-code file is loaded, reads the total line count and current line number via mc.mcCntlGetGcodeLineCount and mc.mcCntlGetGcodeLineNbr, computes the completion percentage rounded to the nearest integer, and updates the "CurrentGcodeDRO" Format property to display both the line number and percentage (e.g., "%0.0f | 42%%"). If no file is loaded, sets the percentage to 0.

Note
Has no effect if GCODE_LINE_PERCENTAGE is not "Yes"
Documentation generated by AI on 2026-03-03

◆ UpdateManualSetterHeight()

CommonScreenV01 UpdateManualSetterHeight ( )

Update the manual tool setter height DRO with the current setter height value.

Reads the height from the manual tool setter (identified by w.GetToolSetterManualName()) via w.GetToolSetterHeight() and writes it to the "FixtureGageBlockHeightDRO" screen object.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateMPGAxisSelector()

CommonScreenV01 UpdateMPGAxisSelector ( )

Update the MPG axis selector label to reflect the currently selected MPG axis.

Reads the current axis assignment for MPG 0 via mc.mcMpgGetAxis(). If the returned axis index is negative (uninitialized), resets it to 0 via mc.mcMpgSetAxis(). Maps the zero-based axis index to a display string from a local array ({"X","Y","Z","A/U","B/V","C/W","OB1","OB2","OB3","OB4","OB5","OB6"}) and sets the "Mpg1SelectedAxisText" label to the corresponding string.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateOperatorPanelControls()

CommonScreenV01 UpdateOperatorPanelControls ( )

Update operator panel jog rate and feed/rapid override displays.

If an operator panel is active (OPERATOR_PANEL_STATUS == true), reads the jog rate register from the active operator panel type (X15-10-01, X15-10-04, X15-12-01, or X15-12-02) and sets the "JogSpeed" DRO value. If no operator panel is active, reads the current FRO and RRO percentages via mc.mcCntlGetFRO() and mc.mcCntlGetRRO() and updates the "FeedOVText" and "RapidOVText" labels with formatted override percentage strings.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateScalingAndRotation()

CommonScreenV01 UpdateScalingAndRotation ( )

Update axis position DRO labels and styles to reflect active G68 rotation and G51 scaling.

Reads the current G68 rotation angle and per-axis G51 scale factors. Sets the global G68_ROTATION_ACTIVE flag. For each enabled axis (X through C), constructs unit and transformation label strings (e.g., "R:0.0050" for rotation, "S:1.5000" for scaling) and applies them to the DRO's Inch Display and Metric Display properties. Applies style "93" (italic or highlighted) when rotation or scaling is active and machine coordinates are not shown, otherwise style "90". Works around a Mach4 display bug by setting both Inch Display and Metric Display to the same label string to prevent flickering.

Note
G68_ROTATION_ACTIVE global is updated as a side effect of this function
Documentation generated by AI on 2026-03-03

◆ UpdateSpindleButtons()

CommonScreenV01 UpdateSpindleButtons ( )

Update spindle forward and reverse button states, labels, colors, and interlocks.

Reads the current spindle direction and delay active state, then updates the SpindleFWDBtn and SpindleREVBtn labels (showing "Stop" when the spindle is running in that direction, or the configured forward/reverse names when stopped). Applies brake-on logic when the spindle transitions from running to stopped if SpindleBrakeEnabled is "Yes" and canned cycles are active. Handles user-defined interlock via user.UserSpindleInterLock() to optionally disable both buttons. Button colors reflect the current state: Off color when disabled, yellow during spindle delay, and red when running. The function reads button name overrides from CommonScreenV01.GetSpindleBtnNames() if defined.

Note
SPINDLE_WAS_ON and LAST_SPINDLE_DIRECTION globals are updated as side effects
Documentation generated by AI on 2026-03-03

◆ UpdateSpindleLoadMeter()

CommonScreenV01 UpdateSpindleLoadMeter ( )

Update the spindle load meter gauge and label displays for main and sub spindles.

If SPINDLE_LOAD_METER_ENABLED is "Yes", reads the spindle load register value via w.GetOEMParamReg("SpindleLoadMeterRegister"), scales it to a percentage using the configured input scale min/max, passes it through the SpindleLoadMeterAverage averager, clamps it to the valid range, and updates the LoadGauge, LoadText, and LoadDRO screen objects only when the value has changed by more than 0.1. Performs the same sequence for the sub-spindle if SUB_SPINDLE_LOAD_METER_ENABLED is "Yes", updating SubLoadGauge, SubLoadText, and SubLoadDRO.

Note
This function is called from the PLC script loop and should execute quickly
Documentation generated by AI on 2026-03-03

◆ UpdateSpindleMinMaxSpeed()

CommonScreenV01 UpdateSpindleMinMaxSpeed ( )

Update the spindle range min/max speed label on the screen.

Reads the current spindle pulley range via mc.mcSpindleGetCurrentRange(), then retrieves the maximum and minimum RPM for that range. Formats and sets the "SpindleRangeMinMaxText" label to display the range number and RPM limits (e.g., "Range:1 (500-4000) RPM").

Note
Documentation generated by AI on 2026-03-03

◆ UpdateSpindleWarmUp()

CommonScreenV01 UpdateSpindleWarmUp ( )

Update the spindle warm-up status display and gauge based on elapsed standstill time.

Reads SpindleWarmUpEnabled from OEM parameters. If enabled, records the current time whenever the spindle is running (via SpindleWarmUpOffTime register). Computes elapsed standstill time in minutes and compares it against SpindleStandStillTime to determine if a warm-up is required. Updates the SpindleWarmUpCompleted register when the standstill threshold is exceeded. Shows the appropriate UI group (SpindleGroup or SpindleWarmUpGroup) and updates the SpindleStateLabel LED color and text to reflect Ready, Warm-Up Needed, or Waiting On Warm-Up states. Updates the SpindleWarmupGauge with the current percentage. If SpindleWarmUpEnabled is not "Yes", hides the warm-up group and shows the main spindle group.

Returns
(nil) No meaningful primary return value on success
(boolean) Success flag - false if any OEM parameter or register read fails
(string) Status message from w.FunctionError() on failure
Note
Documentation generated by AI on 2026-03-03

◆ UpdateToolOffsetDROColors()

CommonScreenV01 UpdateToolOffsetDROColors ( )

Update the background colors of the tool length and tool diameter DROs to reflect offset status.

For the tool length DRO: reads the current tool length offset (accounting for wear) and compares it to the displayed DRO value. If the offset is active and matches within 0.0001, sets the background to green (#00FF00). If the offset is active but differs, sets it to yellow (#FFFF00). Otherwise clears the background. Performs the same logic for the tool diameter DRO using the current diameter offset and wear, with the additional condition that the diameter index must be >= 1 for any colored state to apply.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateToolPathExtents()

CommonScreenV01 UpdateToolPathExtents ( )

Update the tool path extents DROs for all configured axes.

Reads the currently loaded G-code file name. If a file is loaded, checks the "ToolPathFileLimits" OEM parameter to determine whether to display extents in part coordinates or machine coordinates. For part coordinates, subtracts the active fixture offset (mc.SV_ORIGIN_OFFSET_X + axis) from the raw path min/max register values before displaying. For machine coordinates, displays the raw values directly. If no G-code file is loaded, sets all min/max DROs to zero.

Note
Reads path extent data from the "core/inst" register group using keys "PathXmin", "PathXmax", etc. for each axis letter in AXIS_LETTER_ARRAY
Documentation generated by AI on 2026-03-03

◆ UpdateToolPathPanels()

CommonScreenV01 UpdateToolPathPanels ( Panel )

Show or hide tool path panel groups based on the selected panel grid layout.

-----------— Tool Path Panels ------------------—

Controls the visibility of up to four named tool path panel groups (ToolPathA through ToolPathD with instance suffixes) to implement single, dual, triple, or quad tool path panel layouts. Panel index 0 hides all panels (used when probing is active). If the probing flag is true, the ProbingGroup(1) is shown and Panel is forced to 0. The function uses scr.SetProperty to set the "Hidden" property on each panel.

Parameters
Panel(number) The panel layout to activate: 0 = all hidden, 1 = single panel, 2 = two panels, 3 = three panels, 4 = four panels
Returns
(nil) No meaningful primary 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