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

Go to the source code of this file.

Functions

PlasmaScreenV02 MachineScreenLoadScript ()
 Execute load-time initialization for the plasma machine screen.
PlasmaScreenV02 MachineScreenStartupScript ()
 Execute startup initialization for the plasma machine screen.
PlasmaScreenV02 MachineSelectedInstanceChanged ()
 Refresh machine screen UI groups when the selected Mach4 instance changes.
PlasmaScreenV02 MachineScreenLowPriorityLoop ()
 Execute low-priority periodic screen updates for the plasma machine screen.
PlasmaScreenV02 GetAxisPositionGroupTable ()
 Return the axis position group layout table for distributing DRO elements on screen.
PlasmaScreenV02 UpdateMaterialLabel ()
 Update the material label UI element with the current material ID, thickness, and name.
PlasmaScreenV02 LostCutRecovery (x_pos, y_pos)
 Perform a lost cut recovery by repositioning the machine to the nearest point on the cut path.
PlasmaScreenV02 ConfigureConversationalButton ()
 Enable or disable the conversational button based on Alexsys ECam availability.
PlasmaScreenV02 HideSpindleWarmUpGroup ()
 Placeholder for hiding the spindle warm-up group (no-op for plasma).
PlasmaScreenV02 UpdateSpindleWarmUp ()
 Placeholder for spindle warm-up update logic (no-op for plasma).
PlasmaScreenV02 PlasmaCreatePreCannedCommands ()
 Register plasma-specific pre-canned commands for the operator panel.

Function Documentation

◆ ConfigureConversationalButton()

PlasmaScreenV02 ConfigureConversationalButton ( )

Enable or disable the conversational button based on Alexsys ECam availability.

Checks whether the Alexsys ECam executable exists at the expected path within the Mach directory. If found, the ConversationalBtn UI element is enabled; otherwise it is disabled.

Note
Documentation generated by AI on 2026-03-03

◆ GetAxisPositionGroupTable()

PlasmaScreenV02 GetAxisPositionGroupTable ( )

Return the axis position group layout table for distributing DRO elements on screen.

Builds and returns a distribution parameter table that describes how axis position DRO elements should be laid out on the plasma screen. If the user module defines its own GetAxisPositionGroupTable function, that override is called instead. The returned table specifies the count of enabled/shown axes, their order, the starting pixel position, the total pixel length available, and layout constraints for maximum element size and padding.

Returns
(table) Distribution parameter table with keys:
  • count (number): Number of enabled and shown axes
  • order (table): Array of axis IDs (0-based) in display order
  • start (number): Starting pixel offset for the axis group
  • length (number): Total pixel length available for the axis group
  • constraints (table): Table with 'maximum_size' (number) and 'maximum_padding' (number) keys
Note
If user.GetAxisPositionGroupTable is defined, it takes full precedence over this implementation
Documentation generated by AI on 2026-03-03

◆ HideSpindleWarmUpGroup()

PlasmaScreenV02 HideSpindleWarmUpGroup ( )

Placeholder for hiding the spindle warm-up group (no-op for plasma).

This function intentionally performs no operations. It overrides the base screen module's spindle warm-up group visibility behavior, which is not applicable to plasma cutting machines.

Note
Documentation generated by AI on 2026-03-03

◆ LostCutRecovery()

PlasmaScreenV02 LostCutRecovery ( x_pos ,
y_pos  )

Perform a lost cut recovery by repositioning the machine to the nearest point on the cut path.

This function recovers from a lost cut by finding the closest recovery point on the G-code path relative to the provided X/Y coordinates, repositioning the machine to that point, performing an IHS (Initial Height Sensing) routine, and then resuming the G-code file from that position. The recovery sequence is:

  1. Validate that a G-code file is loaded
  2. Reset any active modals (cutter comp, etc.)
  3. Query the nearest cut recovery point via mcCntlGetCutRecoveryPointEx2
  4. Build and execute a G53 repositioning MDI command with Z-first ordering if needed
  5. Execute an IHS routine (M3 I2) to re-establish pierce height
  6. Run a dry-run via mcCntlCutRecoveryEx
  7. Prompt the operator to confirm cycle start
  8. Restart the spindle (if needed) and resume cutting
    Parameters
    x_pos(number) The X machine coordinate to use as the reference position for recovery point lookup
    y_pos(number) The Y machine coordinate to use as the reference position for recovery point lookup
    Returns
    (nil) No meaningful value on success
    (boolean) Success flag - true if operation completed or was intentionally skipped, false on error
    (string) Status message from w.FunctionCompleted() or w.FunctionError()
    Warning
    This function executes MDI motion commands and will move the machine. The machine must be in a safe state before calling. If the MDI command fails, CycleStop is called automatically.
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineScreenLoadScript()

PlasmaScreenV02 MachineScreenLoadScript ( )

Execute load-time initialization for the plasma machine screen.

Called when the plasma machine screen script is first loaded. Registers plasma-specific and dual-table pre-canned command factories with the CommandRegistrar, and initializes the dual table subsystem. The following commands are registered:

  • m.screen.DualTableCreatePreCannedCommands
  • m.screen.PlasmaCreatePreCannedCommands
  • m.screen.CommonShapeCuttingCreatePreCannedCommands
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineScreenLowPriorityLoop()

PlasmaScreenV02 MachineScreenLowPriorityLoop ( )

Execute low-priority periodic screen updates for the plasma machine screen.

Called repeatedly on a low-priority timer loop to refresh UI elements that do not require high-frequency updates. Updates the following elements on each call:

  • Move-to-touch-probe position button state
  • Tool setter DRO positions and labels
  • Material label with current material information
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineScreenStartupScript()

PlasmaScreenV02 MachineScreenStartupScript ( )

Execute startup initialization for the plasma machine screen.

Called once when the plasma machine screen starts up. Performs the following initialization steps:

  • Sets the machine type name label to "Mach Plasma"
  • Initializes tool life management
  • Initializes the fixture offsets group in mill style
  • Initializes the head shift and work offsets group in mill style
    Note
    Documentation generated by AI on 2026-03-03

◆ MachineSelectedInstanceChanged()

PlasmaScreenV02 MachineSelectedInstanceChanged ( )

Refresh machine screen UI groups when the selected Mach4 instance changes.

Called whenever the operator selects a different Mach4 instance. Re-initializes the fixture offsets group and the head shift/work offsets group to reflect the state of the newly selected instance.

Note
Documentation generated by AI on 2026-03-03

◆ PlasmaCreatePreCannedCommands()

PlasmaScreenV02 PlasmaCreatePreCannedCommands ( )

Register plasma-specific pre-canned commands for the operator panel.

Creates and registers the "Open Tech Tables" command action, which opens the TechTables interface when invoked. The command is registered with a display label formatted for button display. This function is intended to be called during screen initialization to populate the pre-canned command list with plasma-specific actions.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateMaterialLabel()

PlasmaScreenV02 UpdateMaterialLabel ( )

Update the material label UI element with the current material ID, thickness, and name.

Retrieves the HC_MaterialID, HC_MaterialName, and HC_MaterialThickness OEM parameter values and formats them into a single label string displayed in the MaterialLabel UI object. The label format is: "[MaterialID] - [MaterialThickness] - [MaterialName]".

Note
Documentation generated by AI on 2026-03-03

◆ UpdateSpindleWarmUp()

PlasmaScreenV02 UpdateSpindleWarmUp ( )

Placeholder for spindle warm-up update logic (no-op for plasma).

This function intentionally performs no operations. It overrides the base screen module's spindle warm-up update behavior, which is not applicable to plasma cutting machines.

Note
Documentation generated by AI on 2026-03-03