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

Go to the source code of this file.

Functions

SoftHC Create (context)
 Create a SoftHC height controller object for the given instance.
SoftHC Initialization ()
 Perform the SoftHC-specific initialization sequence.
SoftHC Startup ()
 Perform the SoftHC startup sequence.
SoftHC ShowHeightControllerGroup ()
 Show or hide SoftHC UI controls based on the current operating mode.
SoftHC GetMappings ()
 Build the complete SoftHC mapping table by merging common and SoftHC-specific mappings.
 func ()
 Map the SoftHC Active register to the HC_AdjustActive output and update the adjust-active screen indicator.
SoftHC GetHCMode ()
 Get the current operating mode of the SoftHC height controller.
SoftHC GetManualJogDirection ()
 Get the current manual jog direction command for the SoftHC controller.
SoftHC GetOBAxisID ()
 Get the configured OB (Out-of-Band) axis ID for the SoftHC controller.
SoftHC GetOBAxisPosition ()
 Get the current machine position of the SoftHC OB (Out-of-Band) axis.
SoftHC HideOBAxis ()
 Hide the SoftHC OB (Out-of-Band) axis from the screen if configured to do so.
SoftHC GetLiveVoltageRaw ()
 Read the raw tip voltage from the mapped OEM parameter signal and store it.
SoftHC GetDigitalUpInput ()
 Get the current state of the SoftHC digital up input signal.
SoftHC GetDigitalDownInput ()
 Get the current state of the SoftHC digital down input signal.
SoftHC IsActive ()
 Get whether the SoftHC height controller is currently active.
SoftHC SetActive ()
 Set the SoftHC active state in the OEM parameter register.
SoftHC IsMovingUp ()
 Get whether the SoftHC axis is currently moving upward.
SoftHC SetMovingUp ()
 Set the SoftHC moving-up state in the OEM parameter register.
SoftHC IsMovingDown ()
 Get whether the SoftHC axis is currently moving downward.
SoftHC SetMovingDown ()
 Set the SoftHC moving-down state in the OEM parameter register.
SoftHC SetMaxLimitActive ()
 Set the SoftHC maximum travel limit active state in the OEM parameter register.
SoftHC SetMinLimitActive ()
 Set the SoftHC minimum travel limit active state in the OEM parameter register.
SoftHC IsFeedrateLocked ()
 Get whether the SoftHC XY feedrate is currently locked.
SoftHC SetFeedrateLocked ()
 Set the SoftHC feedrate-locked state in the OEM parameter register.
SoftHC IsVoltageLocked ()
 Get whether the SoftHC live voltage feedback is currently locked.
SoftHC SetVoltageLocked ()
 Set the SoftHC voltage-locked state in the OEM parameter register.
SoftHC ManualMoveUpStart ()
 Command the SoftHC to begin manual upward jog motion.
SoftHC ManualMoveDownStart ()
 Command the SoftHC to begin manual downward jog motion.
SoftHC ManualMoveStop ()
 Stop the SoftHC manual jog motion by writing zero to the jog direction register.
SoftHC DigitalUpInputStateChanged ()
 Handle a state change on the SoftHC digital up input signal.
SoftHC DigitalDownInputStateChanged ()
 Handle a state change on the SoftHC digital down input signal.
SoftHC UpdateMovingDirection ()
 Update the SoftHC moving-up and moving-down OEM registers based on jog direction.
SoftHC SetState ()
 Set the SoftHC state string in the OEM parameter register.
SoftHC CanJogInDirection ()
 Check whether the SoftHC can jog in the specified direction without exceeding travel limits.
SoftHC MainLoop ()
 Execute the SoftHC height controller state machine and motion logic.
SoftHC PLCScript ()
 Execute the SoftHC periodic PLC loop tasks.
ArcPro SetAutoVoltageControlOn ()
 Enable or disable Auto Voltage Control on the ArcPro (M31) device.
ArcPro UpdateArcProSmartTargeVoltageMode ()
 Synchronize the ArcPro Smart Target Voltage Mode state to the ArcPro device register.
ArcPro UpdateArcProSampledVoltage ()
 Update the ArcPro target voltage from the auto-sampled voltage register.
ArcPro OpenConfiguration ()
 Open the ArcPro device configuration interface.
ArcPro IsInitialized ()
 Check whether the ArcPro (M31) controller is initialized and operational.
ArcPro MotionSync ()
 Perform a motion sync operation on the ArcPro (M31) motion controller.
NeuronTHC ResetConsumablesBtn ()
 Toggle the NeuronTHC reset consumables button between active and inactive states.
NeuronTHC CutParametersModified ()
 Notify the NeuronTHC plugin that cut parameters have been modified.
NeuronTHC GetControllerOnlineStatus ()
 Get the online status of the NeuronTHC controller.
NeuronTHC WaitCutParametersModified ()
 Wait for the Neuron plugin to acknowledge updated cut parameters.
NeuronTHC OxyPreheatOn ()
 Toggle the NeuronTHC oxy preheat torch between on and off states.
NeuronTHC ResetIHSStartHeightBtn ()
 Toggle the NeuronTHC full IHS (Initial Height Sensing) button between active and inactive states.
NeuronTHC ResetSampledBufferFlag ()
 Reset the NeuronTHC sampled voltage buffer flag.
NeuronTHC OxySetCutHeightBtn ()
 Set the oxy cut height reference position for the NeuronTHC or Manual height controller.
NeuronTHC IsNeuronTHC ()
 Check whether the NeuronTHC controller is active for plasma or oxy-fuel cutting.
NeuronTHC TargetVoltsUpBtn ()
 Increase the NeuronTHC target arc voltage by 0.25 volts.
NeuronTHC TargetVoltsDnBtn ()
 Decrease the NeuronTHC target arc voltage by 0.25 volts.
NeuronTHC OnModifyTargetVoltage (...)
 Validate, round, and apply a new target arc voltage value to the NeuronTHC device.
NeuronTHC OnModifyCutHeight (...)
 Validate and apply a new cut height value to the NeuronTHC device.
NeuronTHC OnModifyPierceHeight (...)
 Validate and apply a new pierce height value to the NeuronTHC device.
NeuronTHC OnModifyPierceTime (...)
 Validate and apply a new pierce time value to the NeuronTHC device.
NeuronTHC JogTorchUpBtn ()
 Set the NeuronTHC torch jog up button to the specified state.
NeuronTHC JogTorchDnBtn ()
 Set the NeuronTHC torch jog down button to the specified state.
NeuronTHC SettingsBtn ()
 Open the NeuronTHC settings panel by writing to the NEURONSETTING_BTN register.
NeuronTHC AvcOffBtn ()
 Set the NeuronTHC AVC button to the off state.
NeuronTHC AvcOnBtn ()
 Set the NeuronTHC AVC button to the on state.
NeuronTHC TestBtn ()
 Toggle the NeuronTHC test button between active and inactive states.
NeuronTHC CutChartBtn ()
 Toggle the NeuronTHC cut chart button between active and inactive states.
NeuronTHC OxyCutChartBtn ()
 Toggle the NeuronTHC oxy cut chart button between active and inactive states.
NeuronTHC Add5SecBtn ()
 Add 5 seconds to the active preheat timer for the NeuronTHC or Manual oxy-fuel height controller.
NeuronTHC TerminatePreheatBtn ()
 Terminate the active preheat phase for the NeuronTHC or Manual oxy-fuel height controller.
NeuronTHC GetState ()
 Read and store the current plasma or oxy process sequence state from the NeuronTHC device.
NeuronTHC AVCBtn ()
 Toggle the NeuronTHC AVC button between active and inactive states.
NeuronTHC VoltageModeToggleBtn ()
 Toggle the NeuronTHC voltage sample mode button between active and inactive states.
HeightControllers RegisterChangedEvent (inst, msg_type, handle, value, device, register)
 Dispatch a register-changed event to the height controller for the given instance.
HeightControllers ExternalHandler (expr_string)
 Evaluate and execute a Lua expression string in the context of a specific height controller instance.
HeightControllers GetCommonObjects (hc_obj)
 Initialize and attach common state fields to a height controller object.
HeightControllers GetContext (inst)
 Retrieve the height controller context object for a given Mach4 instance.
HeightControllers Create (Context, ControllerName)
 Create and return a height controller object of the appropriate subclass.
HeightControllers GetName ()
 Get the configured height controller device name from the OEM parameter register.
HeightControllers GetDeviceName ()
 Get the device name associated with this height controller instance.
HeightControllers InitializeMappings ()
 Initialize all mapped registers by reading inputs and propagating values to outputs.
HeightControllers MergeMappings (overrides)
 Merge two mapping tables with deep override semantics, replacing list-like (array) tables wholesale.
HeightControllers GetCommonMappings ()
 Build the common mapping table shared by all height controller types.
HeightControllers HideAllHeightControllerGroups ()
 Hide all height controller UI groups on the screen.
HeightControllers IsMachEnabled ()
 Check whether the Mach4 machine is currently enabled.
HeightControllers EnableTipVolts ()
 Enable the live voltage DRO display with standard formatting.
HeightControllers DisableTipVolts ()
 Disable the live voltage DRO display by applying a suppression format.
HeightControllers GetAutoVoltageControlMode ()
 Get the current auto voltage control mode state from the OEM parameter register.
HeightControllers SetAutoVoltageControlMode ()
 Set the auto voltage control mode state in the OEM parameter register.
HeightControllers ToggleAutoVoltageControlMode ()
 Toggle the auto voltage control mode between enabled and disabled.
HeightControllers GetAutoVoltageControlOn ()
 Get whether auto voltage control is currently active from the OEM parameter register.
HeightControllers UpdateAutoVoltageControlModeBtn ()
 Update the AVCControlBtn screen indicator based on the auto voltage control mode state.
HeightControllers GetSmartTargetVoltageMode ()
 Get the current smart target voltage mode state from the OEM parameter register.
HeightControllers SetSmartTargetVoltageMode ()
 Set the smart target voltage mode state in the OEM parameter register.
HeightControllers ToggleSmartTargetVoltageMode ()
 Toggle the smart target voltage mode between enabled and disabled.
HeightControllers UpdateSmartTargetVoltageBtn ()
 Update the SmartTargetVoltageBtn screen indicator based on the smart target voltage mode state.
HeightControllers SetCutSequence ()
 Set the current cut sequence state name in the OEM parameter register.
HeightControllers SetCutSequenceImage ()
 Update the CutSequenceText screen label and image for the given cut sequence state name.
HeightControllers RegisterForRegChangedEvents ()
 Register Mach4 message callbacks for all mapped input registers.
HeightControllers RegisterChanged (msg_type, handle, value, device, register)
 Handle a register-changed event by propagating the new value to all mapped outputs.
HeightControllers IsCutRecoveryActive ()
 Check whether cut recovery mode is currently active.
HeightControllers IsIHSSupported ()
 Check whether Initial Height Sensing is supported by this height controller.
HeightControllers IsIHSEnabled ()
 Get whether Initial Height Sensing is currently enabled.
HeightControllers SetIHSEnable ()
 Set the IHS enabled state in the OEM parameter register.
HeightControllers ToggleIHSEnable ()
 Toggle the IHS enabled state and reset the last cut positions.
HeightControllers UpdateIHSEnabledBtn ()
 Update the IHSEnabledBtn screen indicator based on IHS support and enabled state.
HeightControllers GetIHSProbeOffset ()
 Get the configured IHS probe offset from the OEM parameter register.
HeightControllers SetIHSProbeOffset ()
 Set the IHS probe offset OEM parameter register to an absolute value.
HeightControllers GetIHSProbeInputState ()
 Get the current state of the IHS probe input signal.
HeightControllers IHSProbeInputStateChanged ()
 Handle a state change on the IHS probe input signal.
HeightControllers GetIHSProbeInputSignalID ()
 Get the signal ID of the mapped IHS probe input signal.
HeightControllers GetIHSProbeGCodeName ()
 Determine the G-code probe command name corresponding to the mapped IHS probe input signal.
HeightControllers GetIHSSpeed ()
 Get the configured IHS probing speed from the OEM parameter register.
HeightControllers SetIHSSpeed ()
 Set the IHS probing speed OEM parameter register to an absolute value.
HeightControllers GetIHSSkipDistance ()
 Get the configured IHS skip distance from the OEM parameter register.
HeightControllers SetIHSSkipDistance ()
 Set the IHS skip distance OEM parameter register to an absolute value.
HeightControllers GetIHSSkipNextCut ()
 Get the current state of the IHS skip-next-cut flag.
HeightControllers SetIHSSkipNextCut ()
 Set the IHS skip-next-cut flag in the OEM parameter register.
HeightControllers GetIHSLastCutPosition ()
 Get the stored IHS last cut position for a given axis.
HeightControllers SetIHSLastCutPosition ()
 Record the current machine position of a given axis as the last IHS cut position.
HeightControllers ResetIHSLastCutPositions ()
 Reset the stored IHS last cut positions for X and Y axes to zero.
 getDistance ()
 Determine whether Initial Height Sensing is needed before the next cut.
HeightControllers IsIHSNeeded ()
 Determine whether Initial Height Sensing is needed before the next cut.
 getDistance (x1, y1, x2, y2)
 Calculate the Euclidean distance between two points in 2D space.
HeightControllers GetIgnitionHeight ()
 Get the configured ignition height from the OEM parameter register.
HeightControllers SetIgnitionHeight ()
 Set the ignition height OEM parameter register to an absolute value.
HeightControllers GetPierceHeight ()
 Get the configured pierce height from the OEM parameter register.
HeightControllers SetPierceHeight ()
 Set the pierce height OEM parameter register to an absolute value.
HeightControllers GetCutHeight ()
 Get the configured cut height from the OEM parameter register.
HeightControllers SetCutHeight ()
 Set the cut height OEM parameter register to an absolute value.
HeightControllers GetCutHeightMaxLimit ()
 Get the configured cut height maximum travel limit from the OEM parameter register.
HeightControllers SetCutHeightMaxLimit ()
 Set the cut height maximum travel limit OEM parameter register to an absolute value.
HeightControllers GetCutHeightMinLimit ()
 Get the configured cut height minimum travel limit from the OEM parameter register.
HeightControllers SetCutHeightMinLimit ()
 Set the cut height minimum travel limit OEM parameter register to an absolute value.
HeightControllers SetCutHeightMaxLimitActive ()
 Set the cut height maximum limit active state in the OEM parameter register.
HeightControllers IsCutHeightMaxLimitActive ()
 Get whether the cut height maximum limit is currently active.
HeightControllers SetCutHeightMinLimitActive ()
 Set the cut height minimum limit active state in the OEM parameter register.
HeightControllers IsCutHeightMinLimitActive ()
 Get whether the cut height minimum limit is currently active.
HeightControllers GetPierceDelay ()
 Get the configured pierce delay from the OEM parameter register.
HeightControllers SetPierceDelay ()
 Set the pierce delay OEM parameter register to an absolute value.
HeightControllers GetAdjustDelay ()
 Get the configured height controller adjust delay from the OEM parameter register.
HeightControllers SetAdjustDelay ()
 Set the height controller adjust delay OEM parameter register to an absolute value.
HeightControllers GetTargetVoltage ()
 Get the configured target voltage from the OEM parameter register.
HeightControllers SetTargetVoltage ()
 Set the target voltage OEM parameter register to an absolute value.
HeightControllers SetLiveVoltageRaw ()
 Set the raw live voltage OEM parameter register and compute the scaled voltage.
HeightControllers GetTipVoltageTipVoltageScaled ()
 Get the current scaled tip voltage from the OEM parameter register.
HeightControllers GetTipVoltageMultiplier ()
 Get the configured tip voltage multiplier from the OEM parameter register.
HeightControllers SetTipVoltageMultiplier ()
 Set the tip voltage multiplier OEM parameter register to an absolute value.
HeightControllers GetDeadbandVoltage ()
 Get the configured voltage deadband from the OEM parameter register.
HeightControllers SetDeadbandVoltage ()
 Set the voltage deadband OEM parameter register to an absolute value.
HeightControllers GetAdjustSpeed ()
 Get the configured height controller adjustment speed from the OEM parameter register.
HeightControllers SetAdjustSpeed ()
 Set the height controller adjustment speed OEM parameter register to an absolute value.
HeightControllers GetLostArcTolerance ()
 Get the configured lost arc tolerance from the OEM parameter register.
HeightControllers SetLostArcTolerance ()
 Set the lost arc tolerance OEM parameter register to an absolute value.
HeightControllers GetTimeout ()
 Get the configured height controller timeout from the OEM parameter register.
HeightControllers SetTimeout ()
 Set the height controller timeout OEM parameter register to an absolute value.
HeightControllers GetAmperage ()
 Get the configured amperage from the OEM parameter register.
HeightControllers SetAmperage ()
 Set the amperage OEM parameter register to an absolute value.
HeightControllers GetRetractHeight ()
 Get the configured retract height from the OEM parameter register.
HeightControllers SetRetractHeight ()
 Set the retract height OEM parameter register to an absolute value.
HeightControllers GetAntiDiveFeedrate ()
 Get the configured anti-dive feedrate from the OEM parameter register.
HeightControllers SetAntiDiveFeedrate ()
 Set the anti-dive feedrate OEM parameter register to an absolute value.
HeightControllers GetCommandedXYFeedrate ()
 Calculate the effective commanded XY feedrate accounting for feed rate override.
HeightControllers GetCurrentXYBlendedFeedrate ()
 Calculate the current blended XY feedrate from live axis velocities.
HeightControllers GetCutTime ()
 Get the accumulated cut time from the OEM parameter register.
HeightControllers SetCutTime ()
 Set the cut time OEM parameter register to an absolute value.
HeightControllers TrackCutTime ()
 Track torch on/off transitions to accumulate total cut time.
HeightControllers UpdateCutTimeLive ()
 Accumulate cut time incrementally while the torch is on.
HeightControllers UpdateConsumablesLabel ()
 Update the PlasmaStatistics screen label with formatted cut time and pierce count.
HeightControllers ResetConsumables ()
 Reset the consumables counters by zeroing cut time and pierce count.
HeightControllers IsAdjustActive ()
 Get whether the height controller voltage adjustment is currently active.
HeightControllers UpdateAdjustActive ()
 Update the THCActiveLED screen indicator based on the adjust-active state.
HeightControllers UpdateFeedrateLocked ()
 Update the FeedrateLockLED screen indicator based on the feedrate locked state.
HeightControllers IsLiveVoltsLocked ()
 Get whether the live voltage feedback is currently locked (anti-dive voltage lock active).
HeightControllers UpdateLiveVoltsLocked ()
 Update the VoltageLockLED screen indicator based on the live volts locked state.
HeightControllers UpdateMovingUp ()
 Update the MovingUpLED screen indicator based on current moving-up and limit states.
HeightControllers UpdateMovingDown ()
 Update the MovingDownLED screen indicator based on current moving-down and limit states.
HeightControllers GetTorchOutput ()
 Get the current state of the torch output signal.
HeightControllers TorchOutputStateChanged ()
 Handle a change in the torch output signal state.
HeightControllers SetTorchOutput ()
 Set the torch output signal to the specified state.
HeightControllers ToggleTorchOutput ()
 Toggle the torch output between on and off states.
HeightControllers GetPierceCounter ()
 Get the current pierce counter value from the OEM parameter register.
HeightControllers SetPierceCounter ()
 Set the pierce counter OEM parameter register to an absolute value.
HeightControllers IncrementPierceCounter ()
 Add a value to the pierce counter OEM parameter register.
HeightControllers GetArcOkInput ()
 Get the current state of the Arc OK input signal.
HeightControllers SetArcWasEstablished ()
 Set the arc-was-established flag in the OEM parameter register.
HeightControllers GetArcWasEstablished ()
 Get whether an arc was successfully established during the current cut.
HeightControllers ArcOKInputStateChanged ()
 Handle a change in the Arc OK input signal state.
HeightControllers CheckForLostArc ()
 Check for a lost arc condition and stop machine motion if the tolerance has been exceeded.
HeightControllers IHSRoutine ()
 Execute or return the Initial Height Sensing (IHS) G-code routine.
HeightControllers MoveToIgnitionHeight ()
 Move the height controller axis to the configured ignition height.
HeightControllers MoveToPierceHeight ()
 Move the height controller axis to the configured pierce height.
HeightControllers MoveToCutHeight ()
 Move the height controller axis to the configured cut height.
HeightControllers MoveToRetractHeight (wait)
 Move the height controller axis to the configured retract height.
HeightControllers IsAtRetractHeight ()
 Check whether the height controller axis is at the configured retract height.
HeightControllers WaitForArcOK ()
 Wait for the Arc OK input signal to become active.
HeightControllers WaitPierceDelay ()
 Wait for the configured pierce delay duration before continuing.
HeightControllers StartCuttingRoutine ()
 Execute the full cutting startup sequence with configurable IHS behavior.
HeightControllers StartCutRecoveryCuttingRoutine ()
 Execute the cut recovery cutting sequence without IHS.
HeightControllers StopCuttingRoutine ()
 Execute the standard cutting stop sequence.
HeightControllers JogToPosition ()
 Jog the height controller axis to an absolute machine position.
HeightControllers GCode (msg, wait)
 Execute a G-code string through the appropriate Mach4 execution path.
HeightControllers Reconfig ()
 Handle a reconfiguration event for the height controller (base class stub).
HeightControllers ResetAlarms ()
 Reset any active alarms on the height controller (base class stub).
HeightControllers SetDefunct ()
 Mark this height controller instance as defunct or operational.
HeightControllers IsDefunct ()
 Check whether this height controller instance is marked as defunct.
HeightControllers UpdateScreenControls ()
 Update screen control LEDs and indicators (base class stub).
HeightControllers SignalScript (sig_state)
 Handle a signal state change event (base class stub).
HeightControllers CycleStop ()
 Handle a cycle stop event by resetting the cut sequence to IDLE.
HeightControllers Reset ()
 Reset the height controller to its initial state.
HeightControllers CycleStartFinal ()
 Handle final cycle start processing, including lost arc cut recovery.
HeightControllers LowPriorityLoop ()
 Execute low-priority periodic tasks for the height controller.
HeightControllers UpdateSignalLibrary ()
 Register signal change callbacks for height controller I/O signals in the signal library.
HeightControllers Destroy ()
 Log a message indicating that no destruction method is implemented for this controller.
HeightControllers CreatePreCannedCommands ()
 Register pre-canned height controller commands for torch and AVC operations.

Function Documentation

◆ Add5SecBtn()

NeuronTHC Add5SecBtn ( )

Add 5 seconds to the active preheat timer for the NeuronTHC or Manual oxy-fuel height controller.

Behavior depends on the OXY_FUEL_TYPE global:

  • "Servo Height Control": Sets the n_OxyAddPreheatTimeButton register in Neuron.THC to 1 if not already set
  • "Manual Height Control": If preheat oxygen output is active and cutting oxygen is not yet on, sets OxyAddPreheatTimeButton to 1 if not already set After updating the register, calls CutParametersModified() to notify the Neuron plugin of the change.
    Note
    Documentation generated by AI on 2026-03-03

◆ ArcOKInputStateChanged()

HeightControllers ArcOKInputStateChanged ( )

Handle a change in the Arc OK input signal state.

Updates the ArcOkLed screen indicator and the internal Torch.ArcOKInput tracking state. When the signal goes high (arc established): clears the LostArc.Triggered flag and sets ArcWasEstablished to true. When the signal goes low while the torch output is on: records the current machine position for all axes into LostArc.Positions, captures the lost arc timestamp, sets LostArc.Triggered, records whether the machine was running, and records the torch state at time of arc loss.

Parameters
sig_state(boolean) The new state of the Arc OK input signal
Note
Documentation generated by AI on 2026-03-03

◆ AVCBtn()

NeuronTHC AVCBtn ( )

Toggle the NeuronTHC AVC button between active and inactive states.

Reads the current value of the n_AvcButton register from the Neuron.THC device. If the current value is 1, sets it to 0; otherwise sets it to 1. After updating the register, calls CutParametersModified() to notify the Neuron plugin of the change. Raises w.FunctionError() if the register read fails.

Note
Documentation generated by AI on 2026-03-03

◆ AvcOffBtn()

NeuronTHC AvcOffBtn ( )

Set the NeuronTHC AVC button to the off state.

Writes 0 to the n_AvcButton register in the Neuron.THC device, then calls CutParametersModified() to notify the Neuron plugin that cut parameters have changed.

Note
Documentation generated by AI on 2026-03-03

◆ AvcOnBtn()

NeuronTHC AvcOnBtn ( )

Set the NeuronTHC AVC button to the on state.

Writes 1 to the n_AvcButton register in the Neuron.THC device, then calls CutParametersModified() to notify the Neuron plugin that cut parameters have changed.

Note
Documentation generated by AI on 2026-03-03

◆ CanJogInDirection()

SoftHC CanJogInDirection ( )

Check whether the SoftHC can jog in the specified direction without exceeding travel limits.

Evaluates the configured travel limits relative to the current OB axis position to determine if a jog in the requested direction is permissible. Behavior by direction:

  • 0 (stop): Always returns true; clears both max and min limit flags
  • If limits are not yet set (_position_max_limit or _position_min_limit is nil), returns true and clears limit flags
  • Positive (up): Returns false and sets MaxLimitActive if current position >= max limit; otherwise clears both limit flags and returns true
  • Negative (down): Returns false and sets MinLimitActive if current position <= min limit; otherwise clears both limit flags and returns true
    Parameters
    direction(number) The jog direction: 1 for up, -1 for down, 0 for stop
    Returns
    (boolean) True if jogging in the given direction is permitted, false if a limit is active
    Note
    Documentation generated by AI on 2026-03-03

◆ CheckForLostArc()

HeightControllers CheckForLostArc ( )

Check for a lost arc condition and stop machine motion if the tolerance has been exceeded.

Called periodically from PLCScript(). If a lost arc event was triggered (Torch.LostArc.Triggered is true), evaluates whether the elapsed time since arc loss exceeds the configured HC_LostArcTolerance and the torch is still commanded on and the machine was running at the time of arc loss. If all conditions are met and the machine is still running, performs the following:

  1. Clears ArcWasEstablished and the lost arc triggered flag
  2. Sets StoppedOnLostArc to true
  3. Calls m.CycleStop() to halt motion
  4. Creates a system global message notifying the operator
    Note
    Documentation generated by AI on 2026-03-03

◆ Create() [1/2]

Generic Create ( context )

Create a SoftHC height controller object for the given instance.

Create a Generic motion controller object for the given Mach4 instance.

Create a RapidPath motion controller object for the given Mach4 instance.

Create a TrioMotion motion controller object for the given Mach4 instance.

Create a DSPMC motion controller object for the given Mach4 instance.

Create an M31 motion controller object for the given Mach4 instance.

Create a HiCON motion controller object for the given Mach4 instance.

Create a Generic height controller object for the given instance.

Create a NeuronTHC height controller object for the given instance.

Create an ArcPro height controller object for the given instance.

Create a RollerHead height controller object for the given instance.

Instantiates a new SoftHC height controller object using setmetatable(). Initializes the following fields: OEMDevice (from w.GetOEMParametersDevice()), defunct flag (false), instance, device ("SoftHC"), name ("SoftHC"), axis_id (mc.Z_AXIS), and axis_letter. Common state fields are attached via HeightControllers.GetCommonObjects(). Additionally initializes SoftHC-specific runtime state fields using the or-default pattern to preserve existing values:

  • _last_tip_volts (number): last recorded tip voltage, default 0
  • _anti_dive_locked (boolean): anti-dive lock state, default false
  • _anti_dive_timer (number): anti-dive timer countdown, default 0
  • _last_jog_dir (number): last commanded jog direction, default 0
  • _last_jog_speed (number): last commanded jog speed, default 0
  • _hc_state (string): height controller state machine state, default "IDLE"
  • _hc_delay_start (number|nil): timestamp when DELAY state began, default nil
  • _voltage_readings (table): voltage sample buffer for SmartTargetVoltageMode, default {}
  • _voltage_sum (number): running voltage sum for averaging, default 0
  • _voltage_count (number): voltage sample count for averaging, default 0
  • _torch_on_position (number|nil): OB axis position when torch turned on, default nil
  • _position_max_limit (number|nil): upper travel limit for OB axis, default nil
  • _position_min_limit (number|nil): lower travel limit for OB axis, default nil
    Parameters
    instance(number) The Mach4 instance handle to associate with this controller
    context(any) Context object (unused by SoftHC, passed for interface compatibility)
    Returns
    (table) A new SoftHC height controller object
    Note
    Documentation generated by AI on 2026-03-03
    Instantiates a new RollerHead height controller object using setmetatable(). Initializes the following fields: OEMDevice (from w.GetOEMParametersDevice()), defunct flag (false), instance, device ("RollerHead"), name ("RollerHead"), axis_id (mc.Z_AXIS), and axis_letter. Common state fields are then attached via HeightControllers.GetCommonObjects().
    Parameters
    instance(number) The Mach4 instance handle to associate with this controller
    context(any) Context object (unused by RollerHead, passed for interface compatibility)
    Returns
    (table) A new RollerHead height controller object
    Note
    Documentation generated by AI on 2026-03-03
    Instantiates a new ArcPro height controller object using setmetatable(). Initializes the following fields: OEMDevice (from w.GetOEMParametersDevice()), defunct flag (false), instance, device ("M31/ArcPro"), name ("ArcPro"), axis_id (mc.Z_AXIS), and axis_letter. Common state fields are attached via HeightControllers.GetCommonObjects(). After setup, writes 0 to the AntiDiveFeedrate register on the ArcPro device to initialize it.
    Parameters
    instance(number) The Mach4 instance handle to associate with this controller
    context(any) Context object (unused by ArcPro, passed for interface compatibility)
    Returns
    (table) A new ArcPro height controller object
    Note
    Documentation generated by AI on 2026-03-03
    Instantiates a new NeuronTHC height controller object using setmetatable(). Initializes the following fields: OEMDevice (from w.GetOEMParametersDevice()), defunct flag (false), instance, device ("Neuron.THC"), and name ("NeuronTHC"). Common state fields are then attached via HeightControllers.GetCommonObjects(). The NeuronTHC type provides servo height control functionality via the Neuron THC plugin.
    Parameters
    instance(number) The Mach4 instance handle to associate with this controller
    context(any) Context object (unused by NeuronTHC, passed for interface compatibility)
    Returns
    (table) A new NeuronTHC height controller object
    Note
    Documentation generated by AI on 2026-03-03
    Instantiates a new Generic height controller object using setmetatable(). Initializes the following fields: OEMDevice (from w.GetOEMParametersDevice()), defunct flag (false), instance, name ("Generic HeightController"), device (same as name), axis_id (mc.Z_AXIS), and axis_letter. Common state fields are then attached via HeightControllers.GetCommonObjects(). The Generic type provides minimal functionality and is used as a fallback when no recognized controller name is matched.
    Parameters
    instance(number) The Mach4 instance handle to associate with this controller
    context(any) Context object (unused by Generic, passed for interface compatibility)
    Returns
    (table) A new Generic height controller object
    Note
    Documentation generated by AI on 2026-03-03
    Instantiates a new HiCON motion controller using setmetatable. Sets the defunct flag to false, assigns the instance handle, sets the name to 'HiCON', and sets the register device name to 'HiCON'.
    Parameters
    instance(number) The Mach4 instance handle for this controller object
    context(string) The execution context string (e.g., 'SCREEN' or 'MCODE')
    Returns
    (table) A new HiCON motion controller object
    See also
    M31:Create() for the equivalent M31 implementation
    MotionController:Create() for the factory method that calls this
    Note
    Documentation generated by AI on 2026-03-04
    Instantiates a new M31 motion controller using setmetatable. Sets the defunct flag to false, assigns the instance handle, sets the name to 'M31', and sets the register device name to 'M31'.
    Parameters
    instance(number) The Mach4 instance handle for this controller object
    context(string) The execution context string (e.g., 'SCREEN' or 'MCODE')
    Returns
    (table) A new M31 motion controller object
    See also
    HiCON:Create() for the equivalent HiCON implementation
    Note
    Documentation generated by AI on 2026-03-04
    Instantiates a new DSPMC motion controller using setmetatable. Sets the defunct flag to false, assigns the instance handle, sets the name to 'DSPMC', and sets the register device name to 'DSPMC'.
    Parameters
    instance(number) The Mach4 instance handle for this controller object
    context(string) The execution context string (e.g., 'SCREEN' or 'MCODE')
    Returns
    (table) A new DSPMC motion controller object
    Note
    Documentation generated by AI on 2026-03-04
    Instantiates a new TrioMotion motion controller using setmetatable. Sets the defunct flag to false, assigns the instance handle, sets the name to 'TrioMotion', and sets the register device name to 'TrioMotion'.
    Parameters
    instance(number) The Mach4 instance handle for this controller object
    context(string) The execution context string (e.g., 'SCREEN' or 'MCODE')
    Returns
    (table) A new TrioMotion motion controller object
    Note
    Documentation generated by AI on 2026-03-04
    Instantiates a new RapidPath motion controller using setmetatable. Sets the defunct flag to false and assigns the instance handle and device name. When the context is 'SCREEN', resolves and caches register handles for the plugin FSM state, RMP FSM state, and all operational status dialog registers and I/O. Initializes the event handler, calls Profiling_PopulateCategoryInfo() to build profiling metadata, and initializes the load register cache.
    Parameters
    instance(number) The Mach4 instance handle for this controller object
    context(string) The execution context string (e.g., 'SCREEN' or 'MCODE')
    Returns
    (table) A new RapidPath motion controller object
    Note
    In SCREEN context, additional FSM and OpStatus registers are resolved during creation
    See also
    RapidPath:Profiling_PopulateCategoryInfo() for profiling metadata initialization
    Note
    Documentation generated by AI on 2026-03-04
    Instantiates a new Generic motion controller using setmetatable. Sets the defunct flag to false and assigns the instance handle. The name field is set to a string combining 'GenericMotionController:' with the motion device name returned by GetMotionDeviceName(). Used as a fallback when no recognized device name is found during MotionController:Create().
    Parameters
    instance(number) The Mach4 instance handle for this controller object
    context(string) The execution context string (e.g., 'SCREEN' or 'MCODE')
    Returns
    (table) A new Generic motion controller object
    Note
    Documentation generated by AI on 2026-03-04

◆ Create() [2/2]

HeightControllers Create ( Context ,
ControllerName  )

Create and return a height controller object of the appropriate subclass.

Determines the controller type by querying GetName() if ControllerName is not provided, then instantiates the matching subclass from HeightControllers._type. Supported controller names:

  • "SoftHC": software-based analog/digital/manual height controller
  • "RollerHead": roller head height controller
  • "ArcPro": MachMotion M31/ArcPro THC device
  • "NeuronTHC": Neuron servo height controller If the name does not match any known type, falls back to the Generic subclass and logs a message.
    Parameters
    instance(number) The Mach4 instance handle to associate with the new object
    Context(any) Context object passed through to the subclass Create() method
    ControllerName(string|nil) The controller type name. If nil, queries GetName() to determine it
    Returns
    (table) A new height controller object of the appropriate subclass
    Note
    Documentation generated by AI on 2026-03-03

◆ CreatePreCannedCommands()

HeightControllers CreatePreCannedCommands ( )

Register pre-canned height controller commands for torch and AVC operations.

Creates and registers a set of standard operator panel commands for height controller functionality. Each command is created with action options, feedback options (where applicable), simple command bindings, and localized button labels. Commands registered include:

  • Torch On, Torch Off, Torch On Toggle
  • Auto Voltage Control (AVC) Toggle
  • Smart Target Voltage Mode Toggle
  • Initial Height Sensing (IHS) Enabled Toggle
    Returns
    (boolean) Always returns false
    Note
    Documentation generated by AI on 2026-03-03

◆ CutChartBtn()

NeuronTHC CutChartBtn ( )

Toggle the NeuronTHC cut chart button between active and inactive states.

Reads the current value of the n_CutChartButton register from the Neuron.THC device. If the value is 1, sets it to 0; otherwise sets it to 1. After updating the register, calls CutParametersModified() to notify the Neuron plugin that cut parameters have changed.

Note
Documentation generated by AI on 2026-03-03

◆ CutParametersModified()

NeuronTHC CutParametersModified ( )

Notify the NeuronTHC plugin that cut parameters have been modified.

Writes 1 to the n_IsCutParametersModify register in the Neuron.THC device. The plugin monitors this register and processes updated cut parameters when it becomes non-zero.

Note
Documentation generated by AI on 2026-03-03

◆ CycleStartFinal()

HeightControllers CycleStartFinal ( )

Handle final cycle start processing, including lost arc cut recovery.

Called at the end of the cycle start sequence. If the machine previously stopped due to a lost arc, this function clears the lost arc flag and initiates the cut recovery workflow by calling m.screen.LostCutRecovery() with the recorded lost arc X/Y positions. If no lost arc recovery is needed, returns a successful completion result.

Returns
(boolean|nil) Result from m.screen.LostCutRecovery(), or true if no recovery needed
(boolean) Success flag - true if operation completed successfully
(string) Status message from w.FunctionCompleted()
Note
Documentation generated by AI on 2026-03-03

◆ CycleStop()

HeightControllers CycleStop ( )

Handle a cycle stop event by resetting the cut sequence to IDLE.

Note
Documentation generated by AI on 2026-03-03

◆ Destroy()

MotionController Destroy ( )

Log a message indicating that no destruction method is implemented for this controller.

Base implementation to destroy and clean up the motion controller object.

This is the base class default implementation. Subclasses may override this method to perform cleanup of hardware resources or plugin connections on shutdown.

Note
Documentation generated by AI on 2026-03-03

Logs a message indicating no destruction method is implemented for the current motion controller type. Subclasses (RapidPath) override this to perform cleanup such as closing open operational status dialogs before the object is released.

Note
Documentation generated by AI on 2026-03-04

◆ DigitalDownInputStateChanged()

SoftHC DigitalDownInputStateChanged ( )

Handle a state change on the SoftHC digital down input signal.

Updates the DigitalHCDownLED screen indicator to reflect the new signal state. Illuminates the LED green when the digital down input is active, and turns it off when inactive.

Parameters
sig_state(boolean) The new state of the digital down input signal
Note
Documentation generated by AI on 2026-03-03

◆ DigitalUpInputStateChanged()

SoftHC DigitalUpInputStateChanged ( )

Handle a state change on the SoftHC digital up input signal.

Updates the DigitalHCUpLED screen indicator to reflect the new signal state. Illuminates the LED green when the digital up input is active, and turns it off when inactive.

Parameters
sig_state(boolean) The new state of the digital up input signal
Note
Documentation generated by AI on 2026-03-03

◆ DisableTipVolts()

HeightControllers DisableTipVolts ( )

Disable the live voltage DRO display by applying a suppression format.

Sets the LiveVoltageDRO foreground color to white and applies a format string that renders the numeric value as a row of dashes, visually indicating that live voltage feedback is not available for this height controller type.

Note
Documentation generated by AI on 2026-03-03

◆ EnableTipVolts()

HeightControllers EnableTipVolts ( )

Enable the live voltage DRO display with standard formatting.

Sets the LiveVoltageDRO foreground color to white and applies a numeric format of "%3.1f" to display the live voltage value with one decimal place.

Note
Documentation generated by AI on 2026-03-03

◆ ExternalHandler()

HeightControllers ExternalHandler ( expr_string )

Evaluate and execute a Lua expression string in the context of a specific height controller instance.

Looks up the selected instance's height controller from HC, then uses load() to compile the expression string with a local 'hc' variable pre-bound to the controller object. If the expression fails to parse, logs the parse error. If parsing succeeds but the expression raises an error at runtime, logs the runtime error via w.pcall(). This allows external callers (e.g., screen buttons or event handlers) to invoke height controller methods by name string.

Parameters
expr_string(string) A Lua expression string to evaluate (e.g., "HC:ToggleAutoVoltageControlMode()")
-- Trigger AVC toggle from an external handler
HeightControllers.ExternalHandler("HC:ToggleAutoVoltageControlMode()")
Note
Documentation generated by AI on 2026-03-03

◆ func()

func ( )

Map the SoftHC Active register to the HC_AdjustActive output and update the adjust-active screen indicator.

Handle a change in the GetNewSampledVoltageTarget register by updating the ArcPro sampled voltage.

Handle a change in the HC_MovingDown register by updating the moving-down screen indicator.

Handle a change in the HC_MovingUp register by updating the moving-up screen indicator.

Handle a change in the HC_LiveVoltsLocked register by updating the voltage lock screen indicator.

Update the FeedrateLocked indicator when the ArcPro FeedrateError register changes.

Map the ArcPro AutoRefVolts register to trigger the sampled voltage update callback.

Map the ArcPro TipVoltageRecRange register to the ArcProAntiDiveTipVoltageRecoveryRange output.

Map the ArcPro TipVoltageOpRange register to the ArcProAntiDiveTipVoltageOperatingRange output.

Map the SoftHC MinLimitActive register to the HC_CutHeightMinLimitActive output and update moving-down indicator.

Map the SoftHC MaxLimitActive register to the HC_CutHeightMaxLimitActive output and update moving-up indicator.

Map the SoftHC MovingDown register to the HC_MovingDown output and update the moving-down screen indicator.

Map the SoftHC MovingUp register to the HC_MovingUp output and update the moving-up screen indicator.

Map the SoftHC VoltageLocked register to the HC_LiveVoltsLocked output and update the voltage lock screen indicator.

Map the SoftHC FeedrateLocked register to the HC_FeedrateLocked output and update the feedrate lock screen indicator.

Output register entry for the HC_AdjustActive mapping object. Propagates changes from the SoftHCActive OEM parameter register to the HC_AdjustActive register, and invokes HC[w.GetUTI()]:UpdateAdjustActive() to refresh the THCActiveLED screen indicator when the height controller active state changes.

Note
Documentation generated by AI on 2026-03-03

Output register entry for the HC_FeedrateLocked mapping object. Propagates changes from the SoftHCFeedrateLocked OEM parameter register to the HC_FeedrateLocked register, and invokes HC[w.GetUTI()]:UpdateFeedrateLocked() to refresh the FeedrateLockLED screen indicator when the feedrate locked state changes.

Note
Documentation generated by AI on 2026-03-03

Output register entry for the HC_LiveVoltsLocked mapping object. Propagates changes from the SoftHCVoltageLocked OEM parameter register to the HC_LiveVoltsLocked register, and invokes HC[w.GetUTI()]:UpdateLiveVoltsLocked() to refresh the VoltageLockLED screen indicator when the voltage locked state changes.

Note
Documentation generated by AI on 2026-03-03

Output register entry for the HC_MovingUp mapping object. Propagates changes from the SoftHCMovingUp OEM parameter register to the HC_MovingUp register, and invokes HC[w.GetUTI()]:UpdateMovingUp() to refresh the MovingUpLED screen indicator when the moving-up state changes.

Note
Documentation generated by AI on 2026-03-03

Output register entry for the HC_MovingDown mapping object. Propagates changes from the SoftHCMovingDown OEM parameter register to the HC_MovingDown register, and invokes HC[w.GetUTI()]:UpdateMovingDown() to refresh the MovingDownLED screen indicator when the moving-down state changes.

Note
Documentation generated by AI on 2026-03-03

Output register entry for the HC_CutHeightMaxLimitActive mapping object. Propagates changes from the SoftHCMaxLimitActive OEM parameter register to the HC_CutHeightMaxLimitActive register, and invokes HC[w.GetUTI()]:UpdateMovingUp() to refresh the MovingUpLED screen indicator when the maximum travel limit state changes.

Note
Documentation generated by AI on 2026-03-03

Output register entry for the HC_CutHeightMinLimitActive mapping object. Propagates changes from the SoftHCMinLimitActive OEM parameter register to the HC_CutHeightMinLimitActive register, and invokes HC[w.GetUTI()]:UpdateMovingDown() to refresh the MovingDownLED screen indicator when the minimum travel limit state changes.

Note
Documentation generated by AI on 2026-03-03

Output register entry for the ArcProAntiDiveTipVoltageOperatingRange mapping object. Propagates changes from the ArcProAntiDiveTipVoltageOperatingRange OEM parameter register to the TipVoltageOpRange register in the ArcPro device.

Note
Documentation generated by AI on 2026-03-03

Output register entry for the ArcProAntiDiveTipVoltageRecoveryRange mapping object. Propagates changes from the ArcProAntiDiveTipVoltageRecoveryRange OEM parameter register to the TipVoltageRecRange register in the ArcPro device.

Note
Documentation generated by AI on 2026-03-03

Input register entry for the GetNewSampledVoltageTarget mapping object. Specifies the AutoRefVolts register from the ArcPro device as the source signal that triggers HC[w.GetUTI()]:UpdateArcProSampledVoltage() when its value changes.

Note
Documentation generated by AI on 2026-03-03

Output callback function registered in the ArcPro mappings for the HC_FeedrateLocked object. When the FeedrateError register from the ArcPro device changes state, this callback invokes HC[w.GetUTI()]:UpdateFeedrateLocked() to refresh the FeedrateLockLED screen indicator accordingly.

Note
Documentation generated by AI on 2026-03-03

Output callback function registered in the ArcPro mappings for the HC_LiveVoltsLocked object. When the DiveError register from the ArcPro device changes state, this callback invokes HC[w.GetUTI()]:UpdateLiveVoltsLocked() to refresh the VoltageLockLED screen indicator accordingly.

Note
Documentation generated by AI on 2026-03-03

Output callback function registered in the ArcPro mappings for the HC_MovingUp object. When the TorchUp register from the ArcPro device changes state, this callback invokes HC[w.GetUTI()]:UpdateMovingUp() to refresh the MovingUpLED screen indicator accordingly.

Note
Documentation generated by AI on 2026-03-03

Output callback function registered in the ArcPro mappings for the HC_MovingDown object. When the TorchDown register from the ArcPro device changes state, this callback invokes HC[w.GetUTI()]:UpdateMovingDown() to refresh the MovingDownLED screen indicator accordingly.

Note
Documentation generated by AI on 2026-03-03

Output callback function registered in the ArcPro mappings for the GetNewSampledVoltageTarget object. When the AutoRefVolts register from the ArcPro device changes, this callback invokes HC[w.GetUTI()]:UpdateArcProSampledVoltage() to apply the new sampled voltage as the target voltage if Smart Target Voltage Mode is enabled.

Note
Documentation generated by AI on 2026-03-03

Referenced by AddToRunScriptQueue(), CreateCommandActionOption(), CreateCommandFeedbackOption(), CreateUserCommandActionOption(), CreateUserCommandFeedbackOption(), Register(), StartFunction(), and StopFunction().

◆ GCode()

HeightControllers GCode ( msg ,
wait  )

Execute a G-code string through the appropriate Mach4 execution path.

Selects the correct G-code execution method based on the current Lua execution context:

  • Screen chunk: uses w.MDICommand() with blocking wait and status message
  • M-code chunk: uses mcCntlGcodeExecuteWait (if wait=true) or mcCntlGcodeExecute (if wait=false) Logs the message to the Mach log when running in M-code chunk context.
    Parameters
    gcode_string(string) The G-code string to execute
    msg(string|nil) Status message for MDI dialog and log output. Defaults to "Running Height Controller Command"
    wait(boolean|nil) If true, blocks until G-code execution completes. Defaults to false
    Warning
    In M-code chunk context with wait=true, this call blocks until motion completes
    Note
    Documentation generated by AI on 2026-03-03

◆ GetAdjustDelay()

HeightControllers GetAdjustDelay ( )

Get the configured height controller adjust delay from the OEM parameter register.

Returns
(number) The current adjust delay value in milliseconds
Note
Documentation generated by AI on 2026-03-03

◆ GetAdjustSpeed()

HeightControllers GetAdjustSpeed ( )

Get the configured height controller adjustment speed from the OEM parameter register.

Returns
(number) The current adjustment speed value
Note
Documentation generated by AI on 2026-03-03

◆ GetAmperage()

HeightControllers GetAmperage ( )

Get the configured amperage from the OEM parameter register.

Returns
(number) The current amperage value
Note
Documentation generated by AI on 2026-03-03

◆ GetAntiDiveFeedrate()

HeightControllers GetAntiDiveFeedrate ( )

Get the configured anti-dive feedrate from the OEM parameter register.

Returns
(number) The current anti-dive feedrate value
Note
Documentation generated by AI on 2026-03-03

◆ GetArcOkInput()

HeightControllers GetArcOkInput ( )

Get the current state of the Arc OK input signal.

Checks if the HC_ArcOKInput OEM parameter signal is mapped. If mapped, reads and returns the signal state. If not mapped, returns false to simulate no arc OK signal.

Returns
(boolean) True if the Arc OK input signal is active, false if inactive or unmapped
Note
Documentation generated by AI on 2026-03-03

◆ GetArcWasEstablished()

HeightControllers GetArcWasEstablished ( )

Get whether an arc was successfully established during the current cut.

Reads the HC_ArcWasEstablished OEM parameter register and returns it as a boolean. This flag is set true when the Arc OK input goes high and cleared when the torch output is turned on (starting a new ignition sequence).

Returns
(boolean) True if arc was established, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ GetAutoVoltageControlMode()

HeightControllers GetAutoVoltageControlMode ( )

Get the current auto voltage control mode state from the OEM parameter register.

Reads the HC_AutoVoltageControlMode OEM parameter register and converts it to a boolean via w.ToBoolean(). This reflects whether AVC mode is configured/enabled, not whether it is currently active (see GetAutoVoltageControlOn() for active state).

Returns
(boolean) True if auto voltage control mode is enabled, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ GetAutoVoltageControlOn()

HeightControllers GetAutoVoltageControlOn ( )

Get whether auto voltage control is currently active from the OEM parameter register.

Reads the HC_AutoVoltageControlOn OEM parameter register and converts it to a boolean via w.ToBoolean(). This reflects whether AVC is currently running, as opposed to GetAutoVoltageControlMode() which reflects whether AVC is enabled/configured.

Returns
(boolean) True if auto voltage control is currently on, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ GetCommandedXYFeedrate()

HeightControllers GetCommandedXYFeedrate ( )

Calculate the effective commanded XY feedrate accounting for feed rate override.

Reads the current feed rate override (FRO) percentage via mcCntlGetFRO and the programmed feedrate from the SV_FEEDRATE system variable via mcCntlGetPoundVar, then returns their product scaled to a fraction. Used in anti-dive logic to detect significant deceleration relative to the commanded feed.

Returns
(number) The effective commanded feedrate after applying the FRO percentage
Note
Documentation generated by AI on 2026-03-03

◆ GetCommonMappings()

HeightControllers GetCommonMappings ( )

Build the common mapping table shared by all height controller types.

Constructs and returns a mappings table containing input register sources and their associated output actions for the following standard height controller parameters:

  • HC_State: triggers SetCutSequenceImage() on change
  • HC_AutoVoltageControlMode: updates button indicator and status register on change
  • HC_SmartTargetVoltageMode: updates button indicator on change
  • HC_IHSEnabled: updates button indicator on change Each entry specifies an OEM device input register and one or more output functions or registers. This table is used as the base by MergeMappings() when building the full mappings.
    Returns
    (table) The common mappings table with an "objects" key containing the base register mappings
    Note
    Documentation generated by AI on 2026-03-03

◆ GetCommonObjects()

HeightControllers GetCommonObjects ( hc_obj )

Initialize and attach common state fields to a height controller object.

Adds the shared runtime state fields used by all height controller types to hc_obj:

  • MON_Torch_is_on (boolean): whether the torch is currently on
  • MON_Torch_on_start (number): os.clock() timestamp when the torch turned on
  • Torch (table): tracking table with TorchOutput, ArcOKInput, and LostArc sub-fields The LostArc sub-table tracks position snapshots for all axes, elapsed time, triggered state, torch/machine/arc-OK state at time of loss, and whether motion was stopped. All axis position slots in LostArc.Positions are initialized to 0.
    Parameters
    hc_obj(table) The height controller object to augment with common fields
    Returns
    (table) The same hc_obj with common state fields added
    Note
    Documentation generated by AI on 2026-03-03

◆ GetContext()

HeightControllers GetContext ( inst )

Retrieve the height controller context object for a given Mach4 instance.

Resolves the instance to a universal tool instance index via w.GetUTI() and returns the corresponding height controller object from the HC global table. Used by external callers to obtain the active height controller without directly indexing HC.

Parameters
inst(number|nil) The Mach4 instance handle. If nil, uses mc.mcGetInstance()
Returns
(table) The height controller object for the specified instance
Note
Documentation generated by AI on 2026-03-03

◆ GetControllerOnlineStatus()

NeuronTHC GetControllerOnlineStatus ( )

Get the online status of the NeuronTHC controller.

Reads the OnlineMode register from the Neuron.THC device. If the read fails, returns false with a successful completion status. If OnlineMode equals 1, the controller is online and returns true; otherwise returns false. Both success cases return a FunctionCompleted() message.

Returns
(boolean) True if the controller is online (OnlineMode == 1), false otherwise
(boolean) Success flag - always true if the register read succeeds
(string) Status message describing the outcome
Note
Documentation generated by AI on 2026-03-03

◆ GetCurrentXYBlendedFeedrate()

HeightControllers GetCurrentXYBlendedFeedrate ( )

Calculate the current blended XY feedrate from live axis velocities.

Reads the current velocity of the X and Y axes via mcAxisGetVel and computes the vector magnitude (Euclidean norm) to obtain the combined XY feedrate. Used in anti-dive logic to compare against the commanded feedrate.

Returns
(number) The current XY blended feedrate as the vector sum of X and Y axis velocities
Note
Documentation generated by AI on 2026-03-03

◆ GetCutHeight()

HeightControllers GetCutHeight ( )

Get the configured cut height from the OEM parameter register.

Returns
(number) The current cut height in current units
Note
Documentation generated by AI on 2026-03-03

◆ GetCutHeightMaxLimit()

HeightControllers GetCutHeightMaxLimit ( )

Get the configured cut height maximum travel limit from the OEM parameter register.

Returns
(number) The current cut height maximum limit in current units
Note
Documentation generated by AI on 2026-03-03

◆ GetCutHeightMinLimit()

HeightControllers GetCutHeightMinLimit ( )

Get the configured cut height minimum travel limit from the OEM parameter register.

Returns
(number) The current cut height minimum limit in current units
Note
Documentation generated by AI on 2026-03-03

◆ GetCutTime()

HeightControllers GetCutTime ( )

Get the accumulated cut time from the OEM parameter register.

Returns
(number) The total accumulated cut time in seconds
Note
Documentation generated by AI on 2026-03-03

◆ GetDeadbandVoltage()

HeightControllers GetDeadbandVoltage ( )

Get the configured voltage deadband from the OEM parameter register.

Returns
(number) The current deadband voltage in volts
Note
Documentation generated by AI on 2026-03-03

◆ GetDeviceName()

HeightControllers GetDeviceName ( )

Get the device name associated with this height controller instance.

Returns the self.device field, which is set during Create() to the device identifier string used for register and I/O lookups (e.g., "M31/ArcPro", "Neuron.THC", "SoftHC").

Parameters
instance(number) The Mach4 instance handle (unused in base implementation)
Returns
(string) The device name string for this height controller
Note
Documentation generated by AI on 2026-03-03

◆ GetDigitalDownInput()

SoftHC GetDigitalDownInput ( )

Get the current state of the SoftHC digital down input signal.

Reads and returns the SoftHCDigitalDownInput OEM parameter signal state for the current instance. Used in Digital mode to determine whether the height controller should command downward jog motion.

Returns
(boolean) True if the digital down input signal is active, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ GetDigitalUpInput()

SoftHC GetDigitalUpInput ( )

Get the current state of the SoftHC digital up input signal.

Reads and returns the SoftHCDigitalUpInput OEM parameter signal state for the current instance. Used in Digital mode to determine whether the height controller should command upward jog motion.

Returns
(boolean) True if the digital up input signal is active, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ getDistance() [1/2]

getDistance ( )

Determine whether Initial Height Sensing is needed before the next cut.

Evaluates several conditions to decide if IHS should be performed:

  1. If IHS is disabled (IsIHSEnabled() returns false), returns false immediately
  2. If the IHS skip-next-cut flag is set, clears the flag and returns false
  3. If a previous cut position has been recorded (last X and Y are non-zero), computes the Euclidean distance between the last cut position and the current machine XY position. If the distance is less than the configured skip distance, returns false (skip IHS).
  4. Otherwise, returns true to indicate IHS should be performed.

◆ getDistance() [2/2]

getDistance ( x1 ,
y1 ,
x2 ,
y2  )

Calculate the Euclidean distance between two points in 2D space.

Computes the straight-line distance between point (x1, y1) and point (x2, y2) using the Pythagorean theorem. Used internally by IsIHSNeeded() to compare the current machine XY position against the last cut position to determine whether the skip distance threshold has been exceeded.

Parameters
x1(number) X coordinate of the first point
y1(number) Y coordinate of the first point
x2(number) X coordinate of the second point
y2(number) Y coordinate of the second point
Returns
(number) The Euclidean distance between the two points
Note
Documentation generated by AI on 2026-03-03

◆ GetHCMode()

SoftHC GetHCMode ( )

Get the current operating mode of the SoftHC height controller.

Reads and returns the SoftHCModes OEM parameter string for the current instance. Valid mode strings are "Manual", "Digital", and "Analog".

Returns
(string) The current SoftHC operating mode name
Note
Documentation generated by AI on 2026-03-03

◆ GetIgnitionHeight()

HeightControllers GetIgnitionHeight ( )

Get the configured ignition height from the OEM parameter register.

Returns
(number) The current ignition height in current units
Note
Documentation generated by AI on 2026-03-03

◆ GetIHSLastCutPosition()

HeightControllers GetIHSLastCutPosition ( )

Get the stored IHS last cut position for a given axis.

Reads the HC_IHSLastCutPosition OEM parameter register for the specified axis (e.g., HC_IHSLastCutPositionX). Returns 0 if no cut has been performed since the last reset.

Parameters
axis_id(number) The axis ID to query (e.g., mc.X_AXIS, mc.Y_AXIS, mc.Z_AXIS)
Returns
(number) The last recorded machine position for the axis, or 0 if not set
Note
Documentation generated by AI on 2026-03-03

◆ GetIHSProbeGCodeName()

HeightControllers GetIHSProbeGCodeName ( )

Determine the G-code probe command name corresponding to the mapped IHS probe input signal.

Queries the IHS probe input signal ID via GetIHSProbeInputSignalID() and maps it to the appropriate G31.x G-code command. The mapping is:

  • ISIG_PROBE -> "G31"
  • ISIG_PROBE1 -> "G31.1"
  • ISIG_PROBE2 -> "G31.2"
  • ... through ISIG_PROBE9 -> "G31.9" If the signal does not match any known probe signal, defaults to "G31".
    Returns
    (string) The G-code probe command string (e.g., "G31", "G31.1")
    Note
    Documentation generated by AI on 2026-03-03

◆ GetIHSProbeInputSignalID()

HeightControllers GetIHSProbeInputSignalID ( )

Get the signal ID of the mapped IHS probe input signal.

Checks whether the HC_IHSProbeInput OEM parameter signal is mapped. If mapped, retrieves the full IO signal object via w.GetOEMParamIOSigObject() and returns its sigid field. If not mapped, returns nil. The signal ID is used by GetIHSProbeGCodeName() to select the correct G31.x command.

Returns
(number|nil) The signal ID of the IHS probe input, or nil if not mapped
Note
Documentation generated by AI on 2026-03-03

◆ GetIHSProbeInputState()

HeightControllers GetIHSProbeInputState ( )

Get the current state of the IHS probe input signal.

Checks whether the HC_IHSProbeInput OEM parameter signal is mapped. If mapped, reads and returns the signal state via w.GetOEMParamSig(). If not mapped, returns false to indicate no probe contact.

Returns
(boolean) True if the IHS probe input signal is active, false if inactive or unmapped
Note
Documentation generated by AI on 2026-03-03

◆ GetIHSProbeOffset()

HeightControllers GetIHSProbeOffset ( )

Get the configured IHS probe offset from the OEM parameter register.

The probe offset is applied after the probing move via G10 L2 to compensate for probe tip geometry or material surface offsets relative to the actual cut height origin.

Returns
(number) The current IHS probe offset in current units
Note
Documentation generated by AI on 2026-03-03

◆ GetIHSSkipDistance()

HeightControllers GetIHSSkipDistance ( )

Get the configured IHS skip distance from the OEM parameter register.

The skip distance defines the minimum XY travel from the last cut position required before IHS will be re-performed. Used by IsIHSNeeded() to evaluate whether IHS can be skipped.

Returns
(number) The current IHS skip distance in current units
Note
Documentation generated by AI on 2026-03-03

◆ GetIHSSkipNextCut()

HeightControllers GetIHSSkipNextCut ( )

Get the current state of the IHS skip-next-cut flag.

Reads the HC_IHSSkipNextCut OEM parameter register and returns it as a boolean. When true, the next call to IsIHSNeeded() will skip IHS and automatically clear this flag.

Returns
(boolean) True if the next cut should skip IHS, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ GetIHSSpeed()

HeightControllers GetIHSSpeed ( )

Get the configured IHS probing speed from the OEM parameter register.

Returns
(number) The current IHS probe feed rate in current units per minute
Note
Documentation generated by AI on 2026-03-03

◆ GetLiveVoltageRaw()

HeightControllers GetLiveVoltageRaw ( )

Read the raw tip voltage from the mapped OEM parameter signal and store it.

Get the raw live voltage from the OEM parameter register.

Checks whether the SoftHCTipVoltageRaw OEM parameter signal is mapped for the current instance. If mapped, reads the register value via w.GetOEMParamReg() and writes it back using SetLiveVoltageRaw() to update both the raw and scaled voltage registers. If not mapped, returns 0 without updating any registers.

Returns
(number) The raw tip voltage value in volts, or 0 if the signal is not mapped
Note
Documentation generated by AI on 2026-03-03
Returns
(number) The current raw live voltage value in volts
Note
Documentation generated by AI on 2026-03-03

◆ GetLostArcTolerance()

HeightControllers GetLostArcTolerance ( )

Get the configured lost arc tolerance from the OEM parameter register.

Returns
(number) The current lost arc tolerance in milliseconds
Note
Documentation generated by AI on 2026-03-03

◆ GetManualJogDirection()

SoftHC GetManualJogDirection ( )

Get the current manual jog direction command for the SoftHC controller.

Reads and returns the SoftHCManualJogDirection OEM parameter value for the current instance. Returns 0 for no jog, 1 for upward jog, and -1 for downward jog.

Returns
(number) The current manual jog direction: 1 for up, -1 for down, 0 for stopped
Note
Documentation generated by AI on 2026-03-03

◆ GetMappings()

HeightControllers GetMappings ( )

Build the complete SoftHC mapping table by merging common and SoftHC-specific mappings.

Build the complete mapping table for this height controller by merging common and override mappings.

Build the complete ArcPro mapping table by merging common and ArcPro-specific mappings.

Retrieves the common mappings from GetCommonMappings() and merges them with an overrides table containing SoftHC-specific input/output register bindings and callback functions. The SoftHC-specific overrides include:

  • HC_AdjustActive: reads SoftHCActive, writes HC_AdjustActive, calls UpdateAdjustActive()
  • HC_FeedrateLocked: reads SoftHCFeedrateLocked, writes HC_FeedrateLocked, calls UpdateFeedrateLocked()
  • HC_LiveVoltsLocked: reads SoftHCVoltageLocked, writes HC_LiveVoltsLocked, calls UpdateLiveVoltsLocked()
  • HC_MovingUp: reads SoftHCMovingUp, writes HC_MovingUp, calls UpdateMovingUp()
  • HC_MovingDown: reads SoftHCMovingDown, writes HC_MovingDown, calls UpdateMovingDown()
  • HC_CutHeightMaxLimitActive: reads SoftHCMaxLimitActive, writes HC_CutHeightMaxLimitActive, calls UpdateMovingUp()
  • HC_CutHeightMinLimitActive: reads SoftHCMinLimitActive, writes HC_CutHeightMinLimitActive, calls UpdateMovingDown()
    Returns
    (table) The merged SoftHC mapping table with an "objects" key containing all register mappings
    Note
    Documentation generated by AI on 2026-03-03
    Retrieves the common mappings from GetCommonMappings() and merges them with an overrides table containing ArcPro-specific input/output register bindings and callback functions. The ArcPro-specific overrides include:
  • HC_AutoVoltageControlMode: adds THC_Enabled register output
  • HC_SmartTargetVoltageMode: adds UpdateArcProSmartTargeVoltageMode callback
  • HC_CutHeightMaxLimit / HC_CutHeightMinLimit: mapped to MaxCutHeight / MinCutHeight on device
  • HC_AdjustDelay: mapped to THC_Delay on device
  • HC_TargetVoltage: mapped to TargetVoltage on device
  • HC_DeadbandVoltage: mapped to DeadbandVolts on device
  • HC_AdjustSpeed: mapped to AdjustSpeedPercent on device
  • HC_LiveVoltageMultiplier: mapped to TipVoltageMultiplier on device
  • HC_AntiDiveFeedrate / ArcProAntiDiveFeedrate: mapped to AntiDiveFeedrate on device
  • HC_LiveVoltageScaled / HC_LiveVoltageRaw: read from CurrentTipVolts on device
  • HC_FeedrateLocked: read from FeedrateError, triggers UpdateFeedrateLocked()
  • HC_LiveVoltsLocked: read from DiveError, triggers UpdateLiveVoltsLocked()
  • HC_MovingUp / HC_MovingDown: read from TorchUp/TorchDown, trigger moving indicators
  • GetNewSampledVoltageTarget: read from AutoRefVolts, triggers UpdateArcProSampledVoltage()
  • HC_AutoVoltageControlModeStatus: read from THCMotionIsEnabled on device
    Returns
    (table) The merged ArcPro mapping table with an "objects" key containing all register mappings
    Note
    Documentation generated by AI on 2026-03-03
    Retrieves the common mappings from GetCommonMappings() and merges them with an empty overrides table using MergeMappings(). The base class implementation provides no additional overrides; subclasses such as ArcPro and SoftHC override this method to add or replace device-specific input/output register mappings and callback functions.
    Returns
    (table) The merged mapping table with an "objects" key containing all register mappings
    Note
    Documentation generated by AI on 2026-03-03

◆ GetName()

HeightControllers GetName ( )

Get the configured height controller device name from the OEM parameter register.

Reads the HC_DeviceName OEM parameter string register for the given instance and returns the string value. This name is used by Create() to select the appropriate subclass when no explicit ControllerName is provided.

Returns
(string) The configured height controller device name (e.g., "ArcPro", "SoftHC", "NeuronTHC")
Note
Documentation generated by AI on 2026-03-03

◆ GetOBAxisID()

SoftHC GetOBAxisID ( )

Get the configured OB (Out-of-Band) axis ID for the SoftHC controller.

Reads the SoftHCOBAxisID OEM parameter value and validates that the axis is enabled. If the axis is not enabled, raises a w.Error() describing the configuration problem and instructing the operator to enable the axis. Returns the axis ID from the OEM parameter regardless of the enabled check result.

Returns
(number) The axis ID configured as the SoftHC OB axis
Warning
Raises an error if the configured OB axis is not enabled in the Mach4 axis configuration
Note
Documentation generated by AI on 2026-03-03

◆ GetOBAxisPosition()

SoftHC GetOBAxisPosition ( )

Get the current machine position of the SoftHC OB (Out-of-Band) axis.

Reads the machine position of the axis configured as the OB axis via mcAxisGetMachinePos. The OB axis ID is retrieved from GetOBAxisID() on each call.

Returns
(number) The current machine position of the OB axis in current units
Note
Documentation generated by AI on 2026-03-03

◆ GetPierceCounter()

HeightControllers GetPierceCounter ( )

Get the current pierce counter value from the OEM parameter register.

Returns
(number) The current pierce count
Note
Documentation generated by AI on 2026-03-03

◆ GetPierceDelay()

HeightControllers GetPierceDelay ( )

Get the configured pierce delay from the OEM parameter register.

Returns
(number) The current pierce delay value in seconds
Note
Documentation generated by AI on 2026-03-03

◆ GetPierceHeight()

HeightControllers GetPierceHeight ( )

Get the configured pierce height from the OEM parameter register.

Returns
(number) The current pierce height in current units
Note
Documentation generated by AI on 2026-03-03

◆ GetRetractHeight()

HeightControllers GetRetractHeight ( )

Get the configured retract height from the OEM parameter register.

Returns
(number) The current retract height in current units
Note
Documentation generated by AI on 2026-03-03

◆ GetSmartTargetVoltageMode()

HeightControllers GetSmartTargetVoltageMode ( )

Get the current smart target voltage mode state from the OEM parameter register.

Reads the HC_SmartTargetVoltageMode OEM parameter register and converts it to a boolean via w.ToBoolean(). When enabled, the height controller will sample and average live voltage during the AVC delay period and use the result as the target voltage.

Returns
(boolean) True if smart target voltage mode is enabled, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ GetState()

NeuronTHC GetState ( )

Read and store the current plasma or oxy process sequence state from the NeuronTHC device.

Get the current state of the height controller as a string.

Defines local lookup tables for plasma states (plasma_states, 31 entries) and oxy-fuel states (oxy_states, 28 entries) mapping integer indices to human-readable state name strings. Reads the n_PlasmaProcessSequence register from the Neuron.THC device and raises w.FunctionError() if the read fails. The retrieved sequence value is stored in PlasmaSequece (local variable).

Note
The state tables are re-created on every call and the return value is not used by the caller
Documentation generated by AI on 2026-03-03

Base class stub that returns an empty string. Subclasses such as NeuronTHC may override this method to return a meaningful state string describing the current operating mode or process sequence of the controller.

Returns
(string) Empty string in the base class implementation
Note
Documentation generated by AI on 2026-03-03

◆ GetTargetVoltage()

HeightControllers GetTargetVoltage ( )

Get the configured target voltage from the OEM parameter register.

Returns
(number) The current target voltage in volts
Note
Documentation generated by AI on 2026-03-03

◆ GetTimeout()

HeightControllers GetTimeout ( )

Get the configured height controller timeout from the OEM parameter register.

Returns
(number) The current timeout value in milliseconds
Note
Documentation generated by AI on 2026-03-03

◆ GetTipVoltageMultiplier()

HeightControllers GetTipVoltageMultiplier ( )

Get the configured tip voltage multiplier from the OEM parameter register.

Returns
(number) The current tip voltage multiplier
Note
Documentation generated by AI on 2026-03-03

◆ GetTipVoltageTipVoltageScaled()

HeightControllers GetTipVoltageTipVoltageScaled ( )

Get the current scaled tip voltage from the OEM parameter register.

Returns
(number) The current live voltage after applying the tip voltage multiplier
Note
Documentation generated by AI on 2026-03-03

◆ GetTorchOutput()

HeightControllers GetTorchOutput ( )

Get the current state of the torch output signal.

Checks if the HC_TorchOutput OEM parameter signal is mapped. If mapped, reads and returns the signal state via w.GetOEMParamSig(). If not mapped, returns false.

Returns
(boolean) True if the torch output signal is active, false if inactive or unmapped
Note
Documentation generated by AI on 2026-03-03

◆ HideAllHeightControllerGroups()

HeightControllers HideAllHeightControllerGroups ( )

Hide all height controller UI groups on the screen.

Sets the Hidden property to "1" for all height controller panel groups: StandardGroup, NeuronGroup, RollerHeadGroup, and DisabledPlasmaGroup. Called during Startup() before showing the appropriate group for the active controller type, ensuring that only one panel group is visible at a time.

Note
Documentation generated by AI on 2026-03-03

◆ HideOBAxis()

SoftHC HideOBAxis ( )

Hide the SoftHC OB (Out-of-Band) axis from the screen if configured to do so.

Reads the SoftHCHideOBAxis OEM parameter string. If the value is "Yes" and the screen module (m.screen.HideAxis) is available, reads the configured OB axis ID from SoftHCOBAxisID and calls m.screen.HideAxis() to remove it from the display.

Note
Documentation generated by AI on 2026-03-03

◆ IHSProbeInputStateChanged()

HeightControllers IHSProbeInputStateChanged ( )

Handle a state change on the IHS probe input signal.

Updates the IHSProbeLED screen indicator to reflect the new signal state. Illuminates the LED green when the probe input is active (contact detected), and turns it off when the probe input is inactive.

Parameters
sig_state(boolean) The new state of the IHS probe input signal
Note
Documentation generated by AI on 2026-03-03

◆ IHSRoutine()

HeightControllers IHSRoutine ( )

Execute or return the Initial Height Sensing (IHS) G-code routine.

Performs the IHS probe sequence to establish the Z-axis work coordinate origin relative to the material surface. The routine:

  1. Checks if IHS is needed via IsIHSNeeded(); skips if not required
  2. If the probe input is already high, moves to retract height first
  3. Builds a G31 (or G31.x) probing move to the soft min limit at IHS speed
  4. Applies the IHS probe offset using G10 L2 to update the fixture offset
  5. Records the last cut X/Y/Z positions for future IHS skip distance calculations
  6. Appends a move to ignition height (or pierce height if ignition is zero) for efficiency If return_gcode is true, the combined G-code string is returned without execution. Otherwise, sets cut sequence to IHS and executes via GCode() with blocking wait.
    Parameters
    return_gcode(boolean|nil) If true, returns the G-code string instead of executing it. Defaults to false
    Returns
    (string|nil) The G-code string if return_gcode is true, otherwise nil
    Note
    Documentation generated by AI on 2026-03-03

◆ IncrementPierceCounter()

HeightControllers IncrementPierceCounter ( )

Add a value to the pierce counter OEM parameter register.

Parameters
value(number) The amount to add to the current pierce count. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ Initialization()

MotionController Initialization ( )

Perform the SoftHC-specific initialization sequence.

Perform motion controller initialization at Mach4 startup.

Perform RapidPath motion controller initialization at Mach4 startup.

Perform TrioMotion motion controller initialization at Mach4 startup.

Perform DSPMC motion controller initialization at Mach4 startup.

Perform M31 motion controller initialization at Mach4 startup.

Perform HiCON motion controller initialization at Mach4 startup.

Perform the base class initialization sequence for the height controller.

Perform the NeuronTHC-specific initialization sequence.

Perform the ArcPro-specific initialization sequence.

Perform the RollerHead-specific initialization sequence.

Executes initialization only for the primary instance (w.GetUTI == 0). The sequence:

  1. Sets the cut sequence to "IDLE" via SetCutSequence()
  2. Resets the IHS last cut positions via ResetIHSLastCutPositions()
  3. Registers for register-changed events via RegisterForRegChangedEvents()
  4. Hides the configured OB axis from the screen via HideOBAxis()
  5. Creates a Jogger object for the OB axis via w.Jogger.New() and stores it in self.HCJogger
    Note
    Documentation generated by AI on 2026-03-03
    Executes initialization only for the primary instance (w.GetUTI == 0). The sequence:
  1. Sets the cut sequence to "IDLE" via SetCutSequence()
  2. Disables the live voltage DRO display via DisableTipVolts()
  3. Resets the IHS last cut positions via ResetIHSLastCutPositions()
  4. Registers for register-changed events via RegisterForRegChangedEvents()
    Note
    Documentation generated by AI on 2026-03-03
    Executes the following initialization steps in order:
  1. Sets the cut sequence to "IDLE" via SetCutSequence()
  2. Resets the IHS last cut positions via ResetIHSLastCutPositions()
  3. Registers for register-changed events via RegisterForRegChangedEvents() Unlike other controller types, does not gate on instance index or call HideAllHeightControllerGroups().
    Note
    Documentation generated by AI on 2026-03-03
    Executes initialization only for the primary instance (w.GetUTI == 0). The sequence:
  1. Initializes register mappings via InitializeMappings()
  2. Hides all height controller UI groups via HideAllHeightControllerGroups()
  3. Shows the NeuronTHC-specific panel via ShowHeightControllerGroup()
  4. Sets the cut sequence to "IDLE"
  5. Enables the live voltage DRO display via EnableTipVolts()
  6. Resets the IHS last cut positions via ResetIHSLastCutPositions()
  7. Registers for register-changed events via RegisterForRegChangedEvents()
    Note
    Documentation generated by AI on 2026-03-03
    Executes the standard initialization steps in order:
  1. Registers for register-changed events via RegisterForRegChangedEvents()
  2. Resets the IHS last cut positions via ResetIHSLastCutPositions() Subclasses override this method to add device-specific initialization such as hiding UI groups, setting the cut sequence state, enabling/disabling tip voltage display, and creating jogger objects.
    Note
    Documentation generated by AI on 2026-03-03
    Returns immediately if Mach4 is in CONFIG state. Otherwise sets the stop status and displays a please-wait dialog (PleaseWaitType.Register) waiting up to 10 seconds for the 'HiCON/StatusBits' register to become non-zero. If the dialog is cancelled or times out, sets a warning message. On success, enables the motion controller configuration button and optionally configures the HardwareEnable and DriveEnable OEM parameters if AutomaticallyConfigureEnableParameters is set to 'Yes'. Finally, calls ReadAbsoluteEncoderPositions() to synchronize absolute encoder motors.
    Warning
    This function blocks execution while waiting for controller firmware to initialize (up to 10 seconds)
    See also
    HiCON:IsInitialized() for the readiness check used after initialization
    HiCON:ReadAbsoluteEncoderPositions() for the absolute encoder read performed at the end
    Note
    Documentation generated by AI on 2026-03-04
    Returns immediately if Mach4 is in CONFIG state. Otherwise sets the stop status and displays a please-wait dialog (PleaseWaitType.Register) waiting up to 10 seconds for the 'M31/StatusBits' register to become non-zero. If the dialog is cancelled or times out, sets a warning message. On success, enables the motion controller configuration button and optionally configures the HardwareEnable and DriveEnable OEM parameters if AutomaticallyConfigureEnableParameters is set to 'Yes'.
    Warning
    This function blocks execution while waiting for controller firmware to initialize (up to 10 seconds)
    See also
    M31:IsInitialized() for the readiness check used after initialization
    HiCON:Initialization() for the equivalent HiCON implementation
    Note
    Documentation generated by AI on 2026-03-04
    Returns immediately if Mach4 is in CONFIG state. Otherwise sets the stop status and displays a please-wait dialog (PleaseWaitType.TimeDelay) for 500 milliseconds while the system initializes. If the dialog is cancelled or times out, sets a warning message. On completion, disables the motion controller configuration button in the UI.
    Warning
    This function blocks execution for approximately 500 milliseconds during initialization
    See also
    DSPMC:Create() for controller object construction
    Note
    Documentation generated by AI on 2026-03-04
    Returns immediately if Mach4 is in CONFIG state. Otherwise sets the stop status and displays a please-wait dialog (PleaseWaitType.Register) waiting up to 10 seconds for the 'M31/StatusBits' register to become non-zero. If initialization times out or is cancelled, sets a warning message. On success, enables the motion controller config button and optionally configures the HardwareEnable and DriveEnable OEM parameters if AutomaticallyConfigureEnableParameters is set to 'Yes'.
    Warning
    This function blocks execution while waiting for controller firmware to initialize (up to 10 seconds)
    See also
    TrioMotion:IsInitialized() for the readiness check used after initialization
    Note
    Documentation generated by AI on 2026-03-04
    Returns immediately if the controller is defunct or if Mach4 is in CONFIG state. Otherwise sets the stop status for the instance and calls OneTimeInitialization() to configure enable signal registers. Unlike other controller Initialization() methods, RapidPath does not show a please-wait dialog here; operational readiness is monitored asynchronously via PLCScript() and HandleOperationStatus().
    Returns
    (boolean) False after completing initialization steps; nil if in CONFIG state
    Note
    This method delegates operational readiness monitoring to PLCScript/HandleOperationStatus
    See also
    RapidPath:OneTimeInitialization() for the register configuration performed here
    RapidPath:HandleOperationStatus() for ongoing operational state monitoring
    Note
    Documentation generated by AI on 2026-03-04
    Base implementation sets the stop status and disables the motion controller configuration button in the UI. Subclasses override this to perform controller-specific initialization such as waiting for firmware startup via a please-wait dialog, configuring enable signal registers, and reading absolute encoder positions.
    Warning
    Subclass implementations may block execution while waiting for hardware to initialize
    See also
    HiCON:Initialization() for HiCON-specific startup sequence
    RapidPath:Initialization() for RapidPath-specific startup sequence
    Note
    Documentation generated by AI on 2026-03-04

◆ InitializeMappings()

HeightControllers InitializeMappings ( )

Initialize all mapped registers by reading inputs and propagating values to outputs.

Retrieves the current mappings via GetMappings() and stores them in self.mappings. For each mapping object, reads the current value of the input register (if defined), then iterates over all output entries: writes the value to each output register (if defined) and calls each output function (if defined) with the current value. Raises w.Error() if any register read or write fails. Called during Startup() to ensure all output registers and screen indicators reflect the current state of their input registers at initialization time.

Note
Documentation generated by AI on 2026-03-03

◆ IsActive()

SoftHC IsActive ( )

Get whether the SoftHC height controller is currently active.

Returns
(boolean) True if the height controller is active (SoftHCActive == 1), false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsAdjustActive()

HeightControllers IsAdjustActive ( )

Get whether the height controller voltage adjustment is currently active.

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

◆ IsAtRetractHeight()

HeightControllers IsAtRetractHeight ( )

Check whether the height controller axis is at the configured retract height.

Base class stub with no implementation. Subclasses may override this method to provide a meaningful check of whether the torch axis has reached the retract position.

Note
Documentation generated by AI on 2026-03-03

◆ IsCutHeightMaxLimitActive()

HeightControllers IsCutHeightMaxLimitActive ( )

Get whether the cut height maximum limit is currently active.

Returns
(boolean) True if the cut height maximum limit is active, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsCutHeightMinLimitActive()

HeightControllers IsCutHeightMinLimitActive ( )

Get whether the cut height minimum limit is currently active.

Returns
(boolean) True if the cut height minimum limit is active, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsCutRecoveryActive()

HeightControllers IsCutRecoveryActive ( )

Check whether cut recovery mode is currently active.

Reads the Mach4 OSIG_CUT_RECOVERY output signal state via w.GetSignalState() and returns it as a boolean. Used by motion commands such as MoveToIgnitionHeight(), MoveToPierceHeight(), MoveToCutHeight(), and MoveToRetractHeight() to select between JogToPosition() and G-code execution paths.

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

◆ IsDefunct()

HeightControllers IsDefunct ( )

Check whether this height controller instance is marked as defunct.

A defunct controller is a valid object that will not attempt to perform any real operations. If the defunct field has not been set, returns false by default.

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

◆ IsFeedrateLocked()

HeightControllers IsFeedrateLocked ( )

Get whether the SoftHC XY feedrate is currently locked.

Get whether the XY feedrate is currently locked (anti-dive feedrate lock active).

Returns
(boolean) True if the feedrate is locked (SoftHCFeedrateLocked == 1), false otherwise
Note
Documentation generated by AI on 2026-03-03
Returns
(boolean) True if the feedrate is locked, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsIHSEnabled()

HeightControllers IsIHSEnabled ( )

Get whether Initial Height Sensing is currently enabled.

Reads the HC_IHSEnabled OEM parameter string register and returns true only if its value is "Yes" AND IsIHSSupported() returns true. If IHS is not supported by the controller, this always returns false regardless of the register value.

Returns
(boolean) True if IHS is both supported and enabled, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsIHSNeeded()

HeightControllers IsIHSNeeded ( )

Determine whether Initial Height Sensing is needed before the next cut.

Evaluates several conditions to decide if IHS should be performed:

  1. If IHS is disabled (IsIHSEnabled() returns false), returns false immediately
  2. If the IHS skip-next-cut flag is set, clears the flag and returns false
  3. If a previous cut position has been recorded (last X and Y are non-zero), computes the Euclidean distance between the last cut position and the current machine XY position. If the distance is less than the configured skip distance, returns false (skip IHS).
  4. Otherwise, returns true to indicate IHS should be performed. An internal helper function getDistance() is defined locally to compute the 2D distance.
    Returns
    (boolean) True if IHS should be performed, false if it can be skipped
    Note
    Documentation generated by AI on 2026-03-03

◆ IsIHSSupported()

HeightControllers IsIHSSupported ( )

Check whether Initial Height Sensing is supported by this height controller.

Reads the HC_IHSSupported OEM parameter string register and returns true only if its value is "Yes". This flag is used by IsIHSEnabled() and SetIHSEnable() to gate whether IHS can be activated on the current controller type.

Returns
(boolean) True if IHS is supported by this controller, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsInitialized()

MotionController IsInitialized ( )

Check whether the ArcPro (M31) controller is initialized and operational.

Check whether the motion controller has completed initialization and is ready.

Check whether the RapidPath motion controller has completed initialization.

Check whether the TrioMotion controller has completed initialization.

Check whether the M31 motion controller has completed initialization.

Check whether the height controller is initialized and ready.

Check whether the NeuronTHC controller is initialized and online.

Reads the StatusBits register from the M31 device for the current instance. Returns false if the register read fails. Returns true if the StatusBits value is non-zero, indicating the ArcPro motion controller is operational; false if zero.

Returns
(boolean) True if the ArcPro controller is initialized and online, false otherwise
Note
Documentation generated by AI on 2026-03-03

Reads the StatusBits register from the HiCON device for the current instance. Returns false if the register read fails. Returns true if the StatusBits value is non-zero, indicating the motion controller is operational; false if zero.

Returns
(boolean) True if the NeuronTHC controller is initialized and online, false otherwise
Note
Documentation generated by AI on 2026-03-03

This is the base class default implementation, which always returns true. Subclasses such as ArcPro and NeuronTHC override this method to query hardware status bits to determine if the motion controller is operational.

Returns
(boolean) True if the controller is initialized and ready; base implementation always returns true
Note
Documentation generated by AI on 2026-03-03

Reads the 'StatusBits' register from the 'M31' device for this instance and returns true if the value is non-zero, indicating the controller firmware has completed its startup sequence. Returns false if the register cannot be read.

Returns
(boolean) True if StatusBits is non-zero (controller ready), false otherwise
See also
M31:Initialization() for the startup sequence that precedes this check
HiCON:IsInitialized() for the equivalent HiCON implementation
Note
Documentation generated by AI on 2026-03-04

Reads the 'StatusBits' register from the 'M31' device for this instance and returns true if the value is non-zero, indicating the controller firmware has completed its startup sequence. Returns false if the register cannot be read.

Returns
(boolean) True if StatusBits is non-zero (controller ready), false otherwise
See also
M31:IsInitialized() for the equivalent M31 implementation
Note
Documentation generated by AI on 2026-03-04

Delegates directly to IsOperational() to determine if the plugin is in a ready state. The controller is considered initialized when both the plugin FSM and the RMP FSM report operational states.

Returns
(boolean) True if the RapidPath plugin is operational and ready, false otherwise
See also
RapidPath:IsOperational() for the underlying operational state check
Note
Documentation generated by AI on 2026-03-04

Base implementation always returns true, indicating the controller is considered initialized by default. Subclasses (HiCON, M31, TrioMotion) override this to check a hardware status register (e.g., 'StatusBits') for a non-zero value indicating the controller firmware has completed its startup sequence.

Returns
(boolean) True in the base implementation; subclasses return true only when hardware reports ready
Note
Documentation generated by AI on 2026-03-04

◆ IsLiveVoltsLocked()

HeightControllers IsLiveVoltsLocked ( )

Get whether the live voltage feedback is currently locked (anti-dive voltage lock active).

Returns
(boolean) True if live volts are locked, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsMachEnabled()

HeightControllers IsMachEnabled ( )

Check whether the Mach4 machine is currently enabled.

Reads the OSIG_MACHINE_ENABLED output signal state via w.eGetSignalState() for the current instance. Used by PLCScript() to gate all periodic height controller logic so that no motion or state updates occur while the machine is disabled.

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

◆ IsMovingDown()

HeightControllers IsMovingDown ( )

Get whether the SoftHC axis is currently moving downward.

Get whether the height controller is currently moving the axis downward.

Returns
(boolean) True if the axis is moving down (SoftHCMovingDown == 1), false otherwise
Note
Documentation generated by AI on 2026-03-03
Returns
(boolean) True if the height controller is actively moving down, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsMovingUp()

HeightControllers IsMovingUp ( )

Get whether the SoftHC axis is currently moving upward.

Get whether the height controller is currently moving the axis upward.

Returns
(boolean) True if the axis is moving up (SoftHCMovingUp == 1), false otherwise
Note
Documentation generated by AI on 2026-03-03
Returns
(boolean) True if the height controller is actively moving up, false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ IsNeuronTHC()

NeuronTHC IsNeuronTHC ( )

Check whether the NeuronTHC controller is active for plasma or oxy-fuel cutting.

Returns true if the machine is configured for plasma or oxy-fuel servo height control by evaluating the PLASMA_TYPE and OXY_FUEL_TYPE global variables.

Returns
(boolean) True if either PLASMA_TYPE or OXY_FUEL_TYPE equals "Servo Height Control"
Note
Documentation generated by AI on 2026-03-03

◆ IsVoltageLocked()

SoftHC IsVoltageLocked ( )

Get whether the SoftHC live voltage feedback is currently locked.

Returns
(boolean) True if the voltage is locked (SoftHCVoltageLocked == 1), false otherwise
Note
Documentation generated by AI on 2026-03-03

◆ JogToPosition()

HeightControllers JogToPosition ( )

Jog the height controller axis to an absolute machine position.

Converts the given part-space position to machine coordinates, creates a new Jogger instance for the height controller axis, and performs a blocking absolute jog to the target position at the maximum available rate.

Parameters
position(number) Target position in part (work) coordinates
Warning
This function blocks until the jog motion is complete
Note
Documentation generated by AI on 2026-03-03

◆ JogTorchDnBtn()

NeuronTHC JogTorchDnBtn ( )

Set the NeuronTHC torch jog down button to the specified state.

Writes 1 to the n_TorchDnButton register in the Neuron.THC device when OnOff is true, or 0 when OnOff is false. Used to command a downward torch jog from the operator panel.

Parameters
OnOff(boolean) True to press the torch down button, false to release it
Note
Documentation generated by AI on 2026-03-03

◆ JogTorchUpBtn()

NeuronTHC JogTorchUpBtn ( )

Set the NeuronTHC torch jog up button to the specified state.

Writes 1 to the n_TorchUpButton register in the Neuron.THC device when OnOff is true, or 0 when OnOff is false. Used to command an upward torch jog from the operator panel.

Parameters
OnOff(boolean) True to press the torch up button, false to release it
Note
Documentation generated by AI on 2026-03-03

◆ LowPriorityLoop()

HeightControllers LowPriorityLoop ( )

Execute low-priority periodic tasks for the height controller.

Intended to be called at a lower frequency than the main PLC loop. Performs two tasks: updates the live cut time accumulator while the torch is on, and refreshes the consumables label on the screen with current cut time and pierce count.

Note
Documentation generated by AI on 2026-03-03

◆ MainLoop()

SoftHC MainLoop ( )

Execute the SoftHC height controller state machine and motion logic.

Implements the complete control loop for all SoftHC operating modes: Manual, Analog (AVC), and Digital. The behavior differs significantly by mode:

Manual mode: Reads the jog direction from SoftHCManualJogDirection, checks travel limits via CanJogInDirection(), and commands velocity jogs via HCJogger. Does not use the state machine.

Analog and Digital modes use a state machine with states:

  • IDLE: Waits for torch on + arc OK. When both present, transitions to DELAY, records torch-on position, calculates travel limits, and optionally initializes voltage averaging for SmartTargetVoltageMode.
  • DELAY: Collects voltage readings (Analog/SmartTargetVoltage only), waits for HC_AdjustDelay milliseconds, then transitions to RUN and activates the height controller.
  • RUN / RUN_*: Runs the active height control logic (see below).

Analog RUN logic: Implements AVC with anti-dive protection. Monitors tip voltage rate-of-change and feedrate delta to engage anti-dive lock (RUN_ANALOG_LOCKED). When not locked, adjusts jog direction and speed proportionally to the voltage error vs target, respecting a deadband (RUN_ANALOG_DEADBAND) and travel limits. Updates moving direction indicators continuously.

Digital RUN logic: Reads up/down digital inputs, implements feedrate-based anti-dive lock (RUN_DIGITAL_LOCKED), and commands jog velocity when inputs are active and limits allow (RUN_DIGITAL_MOVING / RUN_DIGITAL_STOPPED).

When torch turns off or arc OK is lost, the state machine resets to IDLE, stops motion, clears all lock flags and voltage averaging state.

Note
Documentation generated by AI on 2026-03-03

◆ ManualMoveDownStart()

SoftHC ManualMoveDownStart ( )

Command the SoftHC to begin manual downward jog motion.

Writes -1 to the SoftHCManualJogDirection OEM parameter register for the current instance, commanding the manual jog to move downward. Called when the operator presses the manual move down button on the screen.

Note
Documentation generated by AI on 2026-03-03

◆ ManualMoveStop()

SoftHC ManualMoveStop ( )

Stop the SoftHC manual jog motion by writing zero to the jog direction register.

Writes 0 to the SoftHCManualJogDirection OEM parameter register for the current instance, commanding the manual jog to stop. Called when the operator releases a manual move button on the screen.

Note
Documentation generated by AI on 2026-03-03

◆ ManualMoveUpStart()

SoftHC ManualMoveUpStart ( )

Command the SoftHC to begin manual upward jog motion.

Writes 1 to the SoftHCManualJogDirection OEM parameter register for the current instance, commanding the manual jog to move upward. Called when the operator presses the manual move up button on the screen.

Note
Documentation generated by AI on 2026-03-03

◆ MergeMappings()

HeightControllers MergeMappings ( overrides )

Merge two mapping tables with deep override semantics, replacing list-like (array) tables wholesale.

Performs a recursive deep merge of the common and overrides mapping tables. The merge strategy is:

  • Scalar values in overrides replace those in common
  • Non-array tables are recursively merged (keys from overrides are added or replace keys in common)
  • Array-like tables (sequential integer keys, no gaps) in overrides replace the corresponding array in common entirely rather than being merged element-by-element An internal is_array() helper distinguishes sequential arrays from associative tables. An internal deep_copy() helper ensures the common table is not mutated.
    Parameters
    common(table) The base mapping table to start from
    overrides(table) The table of overrides and additions to apply on top of common
    Returns
    (table) A new deep-merged table combining common and overrides
    Note
    Documentation generated by AI on 2026-03-03

◆ MotionSync()

MotionController MotionSync ( )

Perform a motion sync operation on the ArcPro (M31) motion controller.

Base implementation to perform a motion sync on the motion controller.

Synchronize the M31 motion controller's internal position to the encoder positions.

Log a message indicating that no Motion Sync method is implemented for this controller.

Forces the ArcPro to synchronize its internal position to the current encoder positions. If fewer than 6 coordinate axes are enabled, temporarily disables all axes via the AXIS_DISABLE_BITS register before the sync and re-enables them after. The sync is triggered by sending a "motion_sync" command to the M31 Command register. Any command register errors are reported via w.FunctionError().

Note
Documentation generated by AI on 2026-03-03

This is the base class default implementation. Subclasses that support motion sync (such as ArcPro) override this method with functional implementations.

Note
Documentation generated by AI on 2026-03-03

Counts the number of enabled coordinate axes. If fewer than 6 are enabled, sets the M31 'AXIS_DISABLE_BITS' register to 95488+63 to disable axes before syncing. Clears any active command by sending an empty string to the Command register, then sends the 'motion_sync' command. If axes were disabled, re-enables them by setting AXIS_DISABLE_BITS back to 0. Raises an error via w.FunctionError() if any register operation fails.

Warning
This temporarily disables axes when fewer than 6 coordinate axes are enabled
See also
M31:UpdateMotorMapping() for the related motor mapping update operation
HiCON:MotionSync() for the equivalent HiCON implementation
Note
Documentation generated by AI on 2026-03-04

Logs a message indicating no method is implemented for the current motion controller type. Subclasses (HiCON, M31) override this to synchronize the controller's internal position to the encoder positions by disabling axes, sending a 'motion_sync' command, and re-enabling axes.

Note
Documentation generated by AI on 2026-03-04

◆ MoveToCutHeight()

HeightControllers MoveToCutHeight ( )

Move the height controller axis to the configured cut height.

Retrieves the cut height from the HC_CutHeight OEM parameter and commands the axis to move there. If the cut height is zero, no motion is performed. During cut recovery, uses JogToPosition(); otherwise executes G-code via GCode() with wait=true. The cut sequence is set to MOVE_TO_CUT_HEIGHT before motion. If return_gcode is true, returns the G-code string instead of executing it.

Parameters
return_gcode(boolean|nil) If true, returns the G-code string instead of executing it. Defaults to false
Returns
(string|nil) The G-code string if return_gcode is true, otherwise nil
Note
Documentation generated by AI on 2026-03-03

◆ MoveToIgnitionHeight()

HeightControllers MoveToIgnitionHeight ( )

Move the height controller axis to the configured ignition height.

Retrieves the ignition height from the HC_IgnitionHeight OEM parameter and commands the axis to move there. If the ignition height is zero, no motion is performed. During cut recovery, uses JogToPosition(); otherwise executes G-code via GCode() if the axis is not already within tolerance of the target position. The cut sequence is set to MOVE_TO_IGNITION_HEIGHT before motion. If return_gcode is true, returns the G-code string instead of executing it.

Parameters
return_gcode(boolean|nil) If true, returns the G-code string instead of executing it. Defaults to false
Returns
(string|nil) The G-code string if return_gcode is true, otherwise nil
Note
Documentation generated by AI on 2026-03-03

◆ MoveToPierceHeight()

HeightControllers MoveToPierceHeight ( )

Move the height controller axis to the configured pierce height.

Retrieves the pierce height from the HC_PierceHeight OEM parameter and commands the axis to move there. If the pierce height is zero, no motion is performed. During cut recovery, uses JogToPosition(); otherwise executes G-code via GCode(). The cut sequence is set to MOVE_TO_PIERCE_HEIGHT before motion. If return_gcode is true, returns the G-code string instead of executing it.

Parameters
return_gcode(boolean|nil) If true, returns the G-code string instead of executing it. Defaults to false
Returns
(string|nil) The G-code string if return_gcode is true, otherwise nil
Note
Documentation generated by AI on 2026-03-03

◆ MoveToRetractHeight()

HeightControllers MoveToRetractHeight ( wait )

Move the height controller axis to the configured retract height.

Retrieves the retract height from the HC_RetractHeight OEM parameter and commands the axis to move there. If the retract height is zero, no motion is performed. During cut recovery, uses JogToPosition(); otherwise executes G-code via GCode(). The cut sequence is set to MOVE_TO_RETRACT_HEIGHT before motion and RETRACTED after completion. If return_gcode is true, returns the G-code string instead of executing it.

Parameters
return_gcode(boolean|nil) If true, returns the G-code string instead of executing it. Defaults to false
wait(boolean|nil) If true, blocks until motion completes (G-code path only). Defaults to false
Returns
(string|nil) The G-code string if return_gcode is true, otherwise nil
Note
Documentation generated by AI on 2026-03-03

◆ OnModifyCutHeight()

NeuronTHC OnModifyCutHeight ( ...)

Validate and apply a new cut height value to the NeuronTHC device.

If height is nil, reads the current value from the n_CutHeightDRO register. If the value is within the valid range [0.01, 25], calls CutParametersModified() to notify the plugin. If out of range, resets to the default value of 0.2 units, writes it to n_CutHeightDRO, then calls CutParametersModified(). Always calls CutParametersModified() at least once before returning.

Parameters
height(number|nil) The cut height in current units to set. If nil, reads current value from register
...(any) Additional arguments (unused, present for interface compatibility)
Returns
(number) The validated cut height value in current units
Note
Documentation generated by AI on 2026-03-03

◆ OnModifyPierceHeight()

NeuronTHC OnModifyPierceHeight ( ...)

Validate and apply a new pierce height value to the NeuronTHC device.

If height is nil, reads the current value from the n_PierceHeightDRO register. If the value is within the valid range [0.01, 50], calls CutParametersModified() to notify the plugin. If out of range, resets to the default value of 3 units, writes it to n_PierceHeightDRO, then calls CutParametersModified(). Always calls CutParametersModified() at least once before returning.

Parameters
height(number|nil) The pierce height in current units to set. If nil, reads current value from register
...(any) Additional arguments (unused, present for interface compatibility)
Returns
(number) The validated pierce height value in current units
Note
Documentation generated by AI on 2026-03-03

◆ OnModifyPierceTime()

NeuronTHC OnModifyPierceTime ( ...)

Validate and apply a new pierce time value to the NeuronTHC device.

If pierce_time is nil, reads the current value from the n_PierceTimeDRO register. If the value is within the valid range [0, 25], calls CutParametersModified() to notify the plugin. If out of range, resets to the default value of 0.5 seconds, writes it to n_PierceTimeDRO, then calls CutParametersModified(). Always calls CutParametersModified() at least once before returning.

Parameters
pierce_time(number|nil) The pierce time in seconds to set. If nil, reads current value from register
...(any) Additional arguments (unused, present for interface compatibility)
Returns
(number) The validated pierce time value in seconds
Note
Documentation generated by AI on 2026-03-03

◆ OnModifyTargetVoltage()

NeuronTHC OnModifyTargetVoltage ( ...)

Validate, round, and apply a new target arc voltage value to the NeuronTHC device.

If volts is nil, reads the current value from the n_TargetArcVoltageDRO register. Otherwise writes the provided value to n_TargetArcVoltageDRO. If the value is within the valid range [25, 250], snaps it to the nearest 0.25-volt increment and calls m.CutParametersModified(). If out of range, resets to 125 volts and writes it to n_TargetArcVoltageDRO without calling CutParametersModified().

Parameters
volts(number|nil) The target arc voltage in volts. If nil, reads current value from register
...(any) Additional arguments (unused, present for interface compatibility)
Returns
(number) The validated and rounded target voltage in volts
Note
Documentation generated by AI on 2026-03-03

◆ OpenConfiguration()

MotionController OpenConfiguration ( )

Open the ArcPro device configuration interface.

Base implementation to open the motion controller configuration UI.

Open the RapidPath motion controller configuration window.

Open the M31 motion controller configuration window.

Open the HiCON motion controller configuration window.

Open the device-specific configuration interface.

Toggle the NeuronTHC settings configuration panel open or closed.

If the controller is defunct, returns immediately without action. Otherwise, writes 1 to the M31_Config register in the ArcPro device to trigger the configuration panel to open. No return value is produced.

Note
Documentation generated by AI on 2026-03-03

Reads the current value of the n_NeuronSettingsButton register from the Neuron.THC device. If the value is not 1, sets it to 1 to open the panel; otherwise sets it to 0 to close it. After updating the register, calls CutParametersModified() to notify the Neuron plugin that cut parameters have changed.

Note
Documentation generated by AI on 2026-03-03

This is the base class default implementation, which logs a message indicating that no configuration method has been implemented for the current controller type. Subclasses such as ArcPro and NeuronTHC override this method to open their respective configuration dialogs or panels.

Note
Documentation generated by AI on 2026-03-03

Returns immediately if the controller is defunct. Writes the value 1 to the 'HiCON_Config' register on the HiCON device via w.eSetRegValue() to trigger the plugin to open its configuration UI. Nothing is returned.

See also
M31:OpenConfiguration() for the equivalent M31 implementation
MotionController:OpenConfiguration() for the base implementation
Note
Documentation generated by AI on 2026-03-04

Returns immediately if the controller is defunct. Writes the value 1 to the 'M31_Config' register on the M31 device via w.eSetRegValue() to trigger the plugin to open its configuration UI. Nothing is returned.

See also
HiCON:OpenConfiguration() for the equivalent HiCON implementation
MotionController:OpenConfiguration() for the base implementation
Note
Documentation generated by AI on 2026-03-04

Returns immediately if the controller is defunct. Sends a 'Configuration;Open' operation command to the RapidPath plugin. If the plugin does not return 'OK', raises an error via w.Error() with a descriptive message. On success, the plugin opens its configuration UI window.

Warning
Raises an error via w.Error() if the configuration open command fails
See also
MotionController:OpenConfiguration() for the base implementation
Note
Documentation generated by AI on 2026-03-04

Logs a message indicating no configuration open method is implemented for the current motion controller type. Subclasses (HiCON, M31, RapidPath) override this to trigger the controller-specific configuration window, typically by writing to a dedicated configuration register or sending an operation command.

Note
Documentation generated by AI on 2026-03-04

◆ OxyCutChartBtn()

NeuronTHC OxyCutChartBtn ( )

Toggle the NeuronTHC oxy cut chart button between active and inactive states.

Reads the current value of the n_OxyCutChartButton register from the Neuron.THC device. If the value is 1, sets it to 0; otherwise sets it to 1. After updating the register, calls CutParametersModified() to notify the Neuron plugin that cut parameters have changed.

Note
Documentation generated by AI on 2026-03-03

◆ OxyPreheatOn()

NeuronTHC OxyPreheatOn ( )

Toggle the NeuronTHC oxy preheat torch between on and off states.

Reads the current color of the btnOxyPreheatOn button to determine state. If the button color matches BTN_COLOR_OFF, writes 1 to the n_LightOxyFuelTorch register in the Neuron.THC device to ignite the oxy-fuel torch. Otherwise, writes 1 to the n_OxyTorchOffButton register to turn the torch off. After updating the register, calls CutParametersModified() to notify the Neuron plugin that cut parameters have changed.

Note
Documentation generated by AI on 2026-03-03

◆ OxySetCutHeightBtn()

NeuronTHC OxySetCutHeightBtn ( )

Set the oxy cut height reference position for the NeuronTHC or Manual height controller.

Behavior depends on the OXY_FUEL_TYPE global:

  • "Servo Height Control": Writes 1 to the n_OxySetCutHeightButton register in Neuron.THC and calls CutParametersModified() to notify the plugin
  • Other types: Writes 1 to the OxyCurrentPosition OEM register via w.SetOEMRegValue()
    Note
    Documentation generated by AI on 2026-03-03

◆ PLCScript()

SoftHC PLCScript ( )

Execute the SoftHC periodic PLC loop tasks.

Execute the height controller's periodic PLC loop tasks.

Called from the system PLC script on every cycle. Guards all operations with IsMachEnabled() and returns immediately if the machine is disabled. When enabled, executes:

  1. MainLoop() to run the height controller state machine and motion logic
  2. UpdateScreenControls() to refresh display indicators
  3. CheckForLostArc() to detect and respond to arc loss events
    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

◆ Reconfig()

MotionController Reconfig ( )

Handle a reconfiguration event for the height controller (base class stub).

Called when Mach4 or the motion controller configuration may have changed.

Called when Mach or the motion controller configuration may have changed. This is the base class default implementation with no behavior. Subclasses may override this method to re-initialize hardware bindings or reload configuration parameters.

Note
Documentation generated by AI on 2026-03-03

Base implementation does nothing. Subclasses (RapidPath) override this to discard cached data that may be stale after a reconfiguration, such as cached load register handles and virtual motor status entries.

See also
RapidPath:Reconfig() for RapidPath-specific cache invalidation
Note
Documentation generated by AI on 2026-03-04

◆ RegisterChanged()

HeightControllers RegisterChanged ( msg_type ,
handle ,
value ,
device ,
register  )

Handle a register-changed event by propagating the new value to all mapped outputs.

Iterates over all entries in self.mappings.objects. For each mapping whose input register matches the device and register name of the changed signal, reads the current register value and writes it to all configured output registers and calls any configured output functions. Raises w.Error() if the register read or write fails.

Parameters
inst(number) The Mach4 instance handle that received the event
msg_type(number) The Mach4 message type constant (e.g., mc.MSG_REG_CHANGED)
handle(number) The register handle that changed
value(number) The new value of the register
device(string) The device name of the register that changed
register(string) The register name that changed
Note
Documentation generated by AI on 2026-03-03

◆ RegisterChangedEvent()

HeightControllers RegisterChangedEvent ( inst ,
msg_type ,
handle ,
value ,
device ,
register  )

Dispatch a register-changed event to the height controller for the given instance.


Resolves the instance to a universal tool instance index via w.GetUTI() and retrieves the corresponding HC object, then delegates the event to its RegisterChanged() method. Intended to be registered as a MSG_REG_CHANGED Mach4 message callback via m.RegisterForMachMessage().

Parameters
inst(number|nil) The Mach4 instance handle that received the event. If nil, uses mc.mcGetInstance()
msg_type(number) The Mach4 message type constant (e.g., mc.MSG_REG_CHANGED)
handle(number) The register handle that changed
value(number) The new value of the register
device(string) The device name of the register that changed
register(string) The register name that changed
Note
Documentation generated by AI on 2026-03-03

◆ RegisterForRegChangedEvents()

HeightControllers RegisterForRegChangedEvents ( )

Register Mach4 message callbacks for all mapped input registers.

Retrieves the current mappings via GetMappings() and stores them in self.mappings. For each mapping object, registers a MSG_REG_CHANGED callback on the input register's device and name using m.RegisterForMachMessage(). Logs each registered register name. Must be called during initialization so that RegisterChanged() is invoked when any mapped register value changes.

Note
Documentation generated by AI on 2026-03-03

◆ Reset()

HeightControllers Reset ( )

Reset the height controller to its initial state.

Clears the lost arc StoppedOnLostArc flag, sets the cut sequence to IDLE, and resets the IHS last cut positions so the next cut will perform a full IHS routine.

Note
Documentation generated by AI on 2026-03-03

◆ ResetAlarms()

Hitachi ResetAlarms ( )

Reset any active alarms on the height controller (base class stub).

Reset active alarms on the Hitachi VFD.

Reset active alarms on the Yaskawa VFD.

Reset active alarms on the Delta MS3000 VFD.

Base implementation to reset drive alarms on the motion controller.

This is the base class default implementation with no behavior. Subclasses may override this method to clear hardware fault states or alarm registers on the height controller device.

Note
Documentation generated by AI on 2026-03-03

Does nothing in the base implementation. Subclasses (RapidPath) override this to wait for drives to become operable after a reset and clear any active drive fault conditions before allowing the machine to be re-enabled.

See also
RapidPath:ResetAlarms() for RapidPath-specific implementation
Note
Documentation generated by AI on 2026-03-04

Checks whether an alarm is active via IsAlarmActive(). If so, clears the internal LastErrorCode state, pulses the Reset modbus register to value 2 and then back to 0, with a 6-second please-wait dialog in between to allow the drive time to reset.

Note
This function does nothing if ControlEnabled is not "Yes"
Warning
This function displays a blocking please-wait dialog for 6 seconds during the reset sequence
Note
Documentation generated by AI on 2026-03-03

Checks both IsAlarmActive() and the hardware Fault I/O signal. If either indicates a fault, pulses the Multi-Function_Input_4 I/O output true and then false, with a 6-second please-wait dialog in between to allow the drive time to reset. Clears the internal LastErrorCode state after the reset attempt.

Note
This function does nothing if ControlEnabled is not "Yes"
Warning
This function displays a blocking please-wait dialog for 6 seconds during the reset sequence
Note
Documentation generated by AI on 2026-03-03

First checks for a base frequency error on the modbus function5 channel and issues a Stop command to the modbus controller if found. If an alarm is active (via IsAlarmActive()), it pulses the Fault_Reset I/O output true and then false, with a 6-second please-wait dialog in between to allow the drive time to reset. Clears the internal LastErrorCode and AlarmActive state after the reset attempt.

Note
This function does nothing if ControlEnabled is not "Yes"
Warning
This function displays a blocking please-wait dialog for 6 seconds during the reset sequence
Note
Documentation generated by AI on 2026-03-03

◆ ResetConsumables()

HeightControllers ResetConsumables ( )

Reset the consumables counters by zeroing cut time and pierce count.

Sets the HC_CutTime OEM parameter to 0 and the HC_PierceCounter OEM parameter to 0, resetting both accumulators for a new set of consumables.

Note
Documentation generated by AI on 2026-03-03

◆ ResetConsumablesBtn()

NeuronTHC ResetConsumablesBtn ( )

Toggle the NeuronTHC reset consumables button between active and inactive states.

Reads the current value of the n_ResetConsumablesButton register from the Neuron.THC device. If the value is not 1, sets it to 1; otherwise sets it to 0. After updating the register, calls CutParametersModified() to notify the Neuron plugin that cut parameters have changed.

Note
Documentation generated by AI on 2026-03-03

◆ ResetIHSLastCutPositions()

HeightControllers ResetIHSLastCutPositions ( )

Reset the stored IHS last cut positions for X and Y axes to zero.

Iterates over the X and Y axes and writes 0 to each HC_IHSLastCutPosition register, effectively clearing the last cut position memory so the next cut will always perform a full IHS routine regardless of distance from the previous cut.

Note
Documentation generated by AI on 2026-03-03

◆ ResetIHSStartHeightBtn()

NeuronTHC ResetIHSStartHeightBtn ( )

Toggle the NeuronTHC full IHS (Initial Height Sensing) button between active and inactive states.

Reads the current value of the n_FullIhsButton register from the Neuron.THC device. If the value is not 1, sets it to 1; otherwise sets it to 0. After updating the register, calls CutParametersModified() to notify the Neuron plugin that cut parameters have changed.

Note
Documentation generated by AI on 2026-03-03

◆ ResetSampledBufferFlag()

NeuronTHC ResetSampledBufferFlag ( )

Reset the NeuronTHC sampled voltage buffer flag.

Writes 1 to the n_ResetSampledBufferFlag register in the Neuron.THC device, then calls CutParametersModified() to notify the Neuron plugin that cut parameters have changed.

Note
Documentation generated by AI on 2026-03-03

◆ SetActive()

SoftHC SetActive ( )

Set the SoftHC active state in the OEM parameter register.

Parameters
val(boolean) True to mark the height controller as active, false to deactivate it
Note
Documentation generated by AI on 2026-03-03

◆ SetAdjustDelay()

HeightControllers SetAdjustDelay ( )

Set the height controller adjust delay OEM parameter register to an absolute value.

Parameters
value(number) The new adjust delay value in milliseconds. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetAdjustSpeed()

HeightControllers SetAdjustSpeed ( )

Set the height controller adjustment speed OEM parameter register to an absolute value.

Parameters
value(number) The new adjustment speed value. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetAmperage()

HeightControllers SetAmperage ( )

Set the amperage OEM parameter register to an absolute value.

Parameters
value(number) The new amperage value. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetAntiDiveFeedrate()

HeightControllers SetAntiDiveFeedrate ( )

Set the anti-dive feedrate OEM parameter register to an absolute value.

Parameters
value(number) The new anti-dive feedrate value. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetArcWasEstablished()

HeightControllers SetArcWasEstablished ( )

Set the arc-was-established flag in the OEM parameter register.

Parameters
value(boolean) True to indicate arc was established, false to clear the flag. Defaults to false if not boolean
Note
Documentation generated by AI on 2026-03-03

◆ SetAutoVoltageControlMode()

HeightControllers SetAutoVoltageControlMode ( )

Set the auto voltage control mode state in the OEM parameter register.

Converts the boolean value to a number via w.BoolToNumber() and writes it to the HC_AutoVoltageControlMode OEM parameter register. Defaults to false if value is not boolean.

Parameters
value(boolean) True to enable auto voltage control mode, false to disable it. Defaults to false if not boolean
Note
Documentation generated by AI on 2026-03-03

◆ SetAutoVoltageControlOn()

HeightControllers SetAutoVoltageControlOn ( )

Enable or disable Auto Voltage Control on the ArcPro (M31) device.

Set the auto voltage control on/off state and update the cut sequence accordingly.

Controls THC motion enable state on the ArcPro hardware. When enabling AVC (value is true and GetAutoVoltageControlMode() is also true):

  1. Sets HC_AutoVoltageControlOn OEM parameter to true
  2. Temporarily writes 99000 to THCMotionEnable (DISABLE), then sends ENABLE_THC_MOTION command
  3. Sets cut height Max and Min boundaries based on current machine Z position When disabling AVC:
  1. Sets HC_AutoVoltageControlOn OEM parameter to false
  2. Writes 0 to THCMotionEnable and sends DISABLE_THC_MOTION command Logs the AVC state change via w.Log().
    Parameters
    value(boolean) True to enable auto voltage control, false to disable it. Defaults to false if not boolean
    Note
    Documentation generated by AI on 2026-03-03
    If value is true and auto voltage control mode is enabled, sets the cut sequence to "AVC" and writes true to the HC_AutoVoltageControlOn OEM parameter register. If value is false or auto voltage control mode is not enabled, writes false to the register without updating the cut sequence. Defaults to false if value is not boolean.
    Parameters
    value(boolean) True to activate auto voltage control, false to deactivate it. Defaults to false if not boolean
    Note
    Documentation generated by AI on 2026-03-03

◆ SetCutHeight()

HeightControllers SetCutHeight ( )

Set the cut height OEM parameter register to an absolute value.

Parameters
value(number) The new cut height in current units. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetCutHeightMaxLimit()

HeightControllers SetCutHeightMaxLimit ( )

Set the cut height maximum travel limit OEM parameter register to an absolute value.

Parameters
value(number) The new cut height maximum limit in current units. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetCutHeightMaxLimitActive()

HeightControllers SetCutHeightMaxLimitActive ( )

Set the cut height maximum limit active state in the OEM parameter register.

Parameters
value(boolean) True to indicate the maximum limit is active, false to clear it. Defaults to false if not boolean
Note
Documentation generated by AI on 2026-03-03

◆ SetCutHeightMinLimit()

HeightControllers SetCutHeightMinLimit ( )

Set the cut height minimum travel limit OEM parameter register to an absolute value.

Parameters
value(number) The new cut height minimum limit in current units. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetCutHeightMinLimitActive()

HeightControllers SetCutHeightMinLimitActive ( )

Set the cut height minimum limit active state in the OEM parameter register.

Parameters
value(boolean) True to indicate the minimum limit is active, false to clear it. Defaults to false if not boolean
Note
Documentation generated by AI on 2026-03-03

◆ SetCutSequence()

HeightControllers SetCutSequence ( )

Set the current cut sequence state name in the OEM parameter register.

Validates that name is a string (raises w.Error() if not), converts it to uppercase, and writes it to the HC_State OEM parameter string register for the current instance. This value is used by SetCutSequenceImage() to update the screen display.

Parameters
name(string) The cut sequence state name to set (e.g., "IDLE", "IHS", "AVC")
Warning
Raises an error if name is not a string
Note
Documentation generated by AI on 2026-03-03

◆ SetCutSequenceImage()

HeightControllers SetCutSequenceImage ( )

Update the CutSequenceText screen label and image for the given cut sequence state name.

Looks up the provided name (converted to uppercase) in a local cut_sequence table that maps state names to display text and image filenames. If the name is not found, defaults to "IDLE". Writes the display text to the CutSequenceText screen object label. Known state names include: IDLE, IHS, MOVE_TO_IGNITION_HEIGHT, TORCH_ON, WAIT_ARC_OK, MOVE_TO_PIERCE_HEIGHT, WAIT_PIERCE_DELAY, MOVE_TO_CUT_HEIGHT, START_XY_MOTION, AVC_DELAY, AVC, AVC_LOCKED, TORCH_OFF, MOVE_TO_RETRACT_HEIGHT, RETRACTED. If name is nil, reads the current HC_State OEM parameter string register to determine the name.

Parameters
name(string|nil) The cut sequence state name to display. If nil, reads from HC_State register
Note
Documentation generated by AI on 2026-03-03

◆ SetCutTime()

HeightControllers SetCutTime ( )

Set the cut time OEM parameter register to an absolute value.

Parameters
value(number) The new cut time value in seconds. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetDeadbandVoltage()

HeightControllers SetDeadbandVoltage ( )

Set the voltage deadband OEM parameter register to an absolute value.

Parameters
value(number) The new deadband voltage in volts. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetDefunct()

HeightControllers SetDefunct ( )

Mark this height controller instance as defunct or operational.

A defunct controller is a valid object that exists but will not attempt to perform real hardware operations. Use IsDefunct() to check the current state.

Parameters
new_value(boolean) True to mark the controller as defunct, false to mark it operational
Note
Documentation generated by AI on 2026-03-03

◆ SetFeedrateLocked()

SoftHC SetFeedrateLocked ( )

Set the SoftHC feedrate-locked state in the OEM parameter register.

Parameters
val(boolean) True to indicate feedrate lock is active, false to clear it
Note
Documentation generated by AI on 2026-03-03

◆ SetIgnitionHeight()

HeightControllers SetIgnitionHeight ( )

Set the ignition height OEM parameter register to an absolute value.

Parameters
value(number) The new ignition height in current units. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetIHSEnable()

HeightControllers SetIHSEnable ( )

Set the IHS enabled state in the OEM parameter register.

Validates that IHS is supported via IsIHSSupported() before allowing it to be enabled. If IHS is not supported, forces value to false regardless of the input. Converts the boolean to "Yes" or "No" and writes it to the HC_IHSEnabled OEM parameter string register.

Parameters
value(boolean) True to enable IHS, false to disable it. Defaults to true if not boolean
Note
Documentation generated by AI on 2026-03-03

◆ SetIHSLastCutPosition()

HeightControllers SetIHSLastCutPosition ( )

Record the current machine position of a given axis as the last IHS cut position.

Reads the current machine position of the specified axis via mcAxisGetMachinePos and writes it to the corresponding HC_IHSLastCutPosition OEM parameter register (e.g., HC_IHSLastCutPositionX). This value is later used by IsIHSNeeded() to compute the distance from the current position and determine whether IHS can be skipped.

Parameters
axis_id(number) The axis ID to record (e.g., mc.X_AXIS, mc.Y_AXIS, mc.Z_AXIS). Defaults to mc.X_AXIS if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetIHSProbeOffset()

HeightControllers SetIHSProbeOffset ( )

Set the IHS probe offset OEM parameter register to an absolute value.

The probe offset is applied via G10 L2 after the probing move completes to adjust the fixture offset and account for probe tip geometry or material thickness offsets.

Parameters
value(number) The new IHS probe offset in current units. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetIHSSkipDistance()

HeightControllers SetIHSSkipDistance ( )

Set the IHS skip distance OEM parameter register to an absolute value.

The skip distance defines the minimum XY travel required from the last cut position before IHS will be performed again. If the current machine position is within this distance of the last cut position, IsIHSNeeded() will return false and skip IHS.

Parameters
value(number) The new IHS skip distance in current units. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetIHSSkipNextCut()

HeightControllers SetIHSSkipNextCut ( )

Set the IHS skip-next-cut flag in the OEM parameter register.

When set to true, IsIHSNeeded() will skip the IHS routine for the very next cut and automatically clear this flag. This allows a single cut to bypass IHS without permanently disabling it.

Parameters
value(boolean) True to skip IHS on the next cut, false to clear the flag. Defaults to true if not boolean
Note
Documentation generated by AI on 2026-03-03

◆ SetIHSSpeed()

HeightControllers SetIHSSpeed ( )

Set the IHS probing speed OEM parameter register to an absolute value.

Parameters
value(number) The new IHS probe feed rate in current units per minute. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetLiveVoltageRaw()

HeightControllers SetLiveVoltageRaw ( )

Set the raw live voltage OEM parameter register and compute the scaled voltage.

Writes the raw voltage value to the HC_LiveVoltageRaw OEM parameter, then multiplies it by the tip voltage multiplier (HC_LiveVoltageMultiplier) and writes the result to HC_LiveVoltageScaled. Both registers are updated atomically on each call.

Parameters
value(number) The raw live voltage value in volts. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetLostArcTolerance()

HeightControllers SetLostArcTolerance ( )

Set the lost arc tolerance OEM parameter register to an absolute value.

Parameters
value(number) The new lost arc tolerance in milliseconds. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetMaxLimitActive()

SoftHC SetMaxLimitActive ( )

Set the SoftHC maximum travel limit active state in the OEM parameter register.

Parameters
val(boolean) True to indicate the maximum limit is active, false to clear it
Note
Documentation generated by AI on 2026-03-03

◆ SetMinLimitActive()

SoftHC SetMinLimitActive ( )

Set the SoftHC minimum travel limit active state in the OEM parameter register.

Parameters
val(boolean) True to indicate the minimum limit is active, false to clear it
Note
Documentation generated by AI on 2026-03-03

◆ SetMovingDown()

SoftHC SetMovingDown ( )

Set the SoftHC moving-down state in the OEM parameter register.

Parameters
val(boolean) True to indicate the axis is moving down, false to clear it
Note
Documentation generated by AI on 2026-03-03

◆ SetMovingUp()

SoftHC SetMovingUp ( )

Set the SoftHC moving-up state in the OEM parameter register.

Parameters
val(boolean) True to indicate the axis is moving up, false to clear it
Note
Documentation generated by AI on 2026-03-03

◆ SetPierceCounter()

HeightControllers SetPierceCounter ( )

Set the pierce counter OEM parameter register to an absolute value.

Parameters
value(number) The new pierce counter value. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetPierceDelay()

HeightControllers SetPierceDelay ( )

Set the pierce delay OEM parameter register to an absolute value.

Parameters
value(number) The new pierce delay value in seconds. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetPierceHeight()

HeightControllers SetPierceHeight ( )

Set the pierce height OEM parameter register to an absolute value.

Parameters
value(number) The new pierce height in current units. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetRetractHeight()

HeightControllers SetRetractHeight ( )

Set the retract height OEM parameter register to an absolute value.

Parameters
value(number) The new retract height in current units. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetSmartTargetVoltageMode()

HeightControllers SetSmartTargetVoltageMode ( )

Set the smart target voltage mode state in the OEM parameter register.

Converts the boolean value to a number via w.BoolToNumber() and writes it to the HC_SmartTargetVoltageMode OEM parameter register. Defaults to false if value is not boolean.

Parameters
value(boolean) True to enable smart target voltage mode, false to disable it. Defaults to false if not boolean
Note
Documentation generated by AI on 2026-03-03

◆ SetState()

SoftHC SetState ( )

Set the SoftHC state string in the OEM parameter register.

Writes the given state string to the SoftHCState OEM parameter register for the current instance. Used internally by MainLoop() to record the active state machine state (e.g., "IDLE", "DELAY", "RUN", "RUN_ANALOG_ADJUSTING").

Parameters
state(string) The state name string to write to the SoftHCState register
Note
Documentation generated by AI on 2026-03-03

◆ SetTargetVoltage()

HeightControllers SetTargetVoltage ( )

Set the target voltage OEM parameter register to an absolute value.

Parameters
value(number) The new target voltage in volts. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetTimeout()

HeightControllers SetTimeout ( )

Set the height controller timeout OEM parameter register to an absolute value.

Parameters
value(number) The new timeout value in milliseconds. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SettingsBtn()

NeuronTHC SettingsBtn ( )

Open the NeuronTHC settings panel by writing to the NEURONSETTING_BTN register.

Writes 1 to the NEURONSETTING_BTN register in the Neuron.THC device to trigger the settings panel to open. Does not call CutParametersModified() and does not toggle state.

Note
Documentation generated by AI on 2026-03-03

◆ SetTipVoltageMultiplier()

HeightControllers SetTipVoltageMultiplier ( )

Set the tip voltage multiplier OEM parameter register to an absolute value.

Parameters
value(number) The new tip voltage multiplier. Defaults to 0 if not a number
Note
Documentation generated by AI on 2026-03-03

◆ SetTorchOutput()

HeightControllers SetTorchOutput ( )

Set the torch output signal to the specified state.

Updates the cut sequence state (TORCH_ON or TORCH_OFF), manages arc tracking state, and writes to the HC_TorchOutput OEM parameter signal if it is mapped. When turning the torch on, clears the ArcWasEstablished flag to begin a new ignition sequence. When turning the torch off, if an arc was previously established, records the last cut X/Y/Z machine positions for future IHS skip distance evaluation.

Parameters
state(boolean) True to turn the torch on, false to turn it off. Defaults to true if not boolean
Warning
This function may be called from both screen and M-code Lua chunks; global variable context differs between them, so avoid relying on screen-chunk-only globals
Note
Documentation generated by AI on 2026-03-03

◆ SetVoltageLocked()

SoftHC SetVoltageLocked ( )

Set the SoftHC voltage-locked state in the OEM parameter register.

Parameters
val(boolean) True to indicate voltage lock is active, false to clear it
Note
Documentation generated by AI on 2026-03-03

◆ ShowHeightControllerGroup()

HeightControllers ShowHeightControllerGroup ( )

Show or hide SoftHC UI controls based on the current operating mode.

Show the default (disabled) height controller UI group on the screen.

Show the NeuronTHC-specific UI group on the screen.

Show the ArcPro-specific UI group on the screen.

Show the RollerHead-specific UI group on the screen.

Reads the current HC mode via GetHCMode() and adjusts the visibility of screen controls accordingly. Behavior by mode (case-insensitive):

  • "MANUAL": Hides voltage-related controls and LEDs; shows ManualMoveUpBtn and ManualMoveDownBtn; sets StandardGroup background to the manual plasma background image
  • "DIGITAL": Hides voltage-related controls and manual move buttons; shows DigitalHCUpLED and DigitalHCDownLED; sets StandardGroup background to the manual plasma background image
  • All other modes (e.g., "ANALOG"): Hides LEDs and manual move buttons; shows all voltage controls (LiveVoltageText, LiveVoltageDRO, TargetVoltageText, TargetVoltageDRO, modify buttons); sets StandardGroup background to the standard plasma background image In all cases, sets the StandardGroup Hidden property to "0" to make the panel visible.
    Note
    Documentation generated by AI on 2026-03-03
    Sets the Hidden property of the RollerHeadGroup screen object to "0", making the RollerHead panel visible. Called during Startup() for the RollerHead controller type.
    Note
    Documentation generated by AI on 2026-03-03
    Sets the Hidden property of the StandardGroup screen object to "0", making the standard plasma panel visible. The ArcPro controller uses the StandardGroup panel rather than a dedicated ArcPro-specific group.
    Note
    Documentation generated by AI on 2026-03-03
    Sets the Hidden property of the NeuronGroup screen object to "0", making the Neuron THC panel visible. Called during Initialization() for the NeuronTHC controller type.
    Note
    Documentation generated by AI on 2026-03-03
    Sets the Hidden property of the DisabledPlasmaGroup screen object to "0", making it visible. This is the base class implementation called when no specific controller group is defined. Subclasses such as ArcPro, SoftHC, NeuronTHC, and RollerHead override this method to show their respective controller-specific panel groups instead.
    Note
    Documentation generated by AI on 2026-03-03

◆ SignalScript()

HeightControllers SignalScript ( sig_state )

Handle a signal state change event (base class stub).

This is the base class default implementation with no behavior. Subclasses may override this method to respond to specific signal ID state changes relevant to their height controller hardware.

Parameters
sig_id(number) The signal ID that changed state
sig_state(boolean) The new state of the signal
Note
Documentation generated by AI on 2026-03-03

◆ StartCutRecoveryCuttingRoutine()

HeightControllers StartCutRecoveryCuttingRoutine ( )

Execute the cut recovery cutting sequence without IHS.

Performs the standard cutting startup sequence used specifically for cut recovery scenarios. Skips the IHS routine and directly executes: torch on, wait for arc OK, move to pierce height, wait pierce delay, move to cut height, enable auto voltage control, and set cut sequence to START_XY_MOTION.

Note
Documentation generated by AI on 2026-03-03

◆ StartCuttingRoutine()

HeightControllers StartCuttingRoutine ( )

Execute the full cutting startup sequence with configurable IHS behavior.

Performs the ordered startup sequence for a plasma cut. The IHSMode parameter controls how Initial Height Sensing is handled:

  • nil or -1: Default behavior, run IHS if needed
  • 0: Skip IHS routine entirely
  • 1: Run IHS routine if needed (same as default)
  • 2: Force a full IHS routine (resets last cut positions first), then skip the torch-on sequence When IHSMode is not 2, the full torch-on sequence is executed: torch on, wait arc OK, move to pierce height, wait pierce delay, move to cut height, enable AVC, set START_XY_MOTION.
    Parameters
    IHSMode(number|nil) Controls IHS behavior: nil/-1/1=default, 0=skip IHS, 2=IHS only
    Note
    Documentation generated by AI on 2026-03-03

◆ Startup()

HeightControllers Startup ( )

Perform the SoftHC startup sequence.

Perform the base class startup sequence for the height controller.

Perform the ArcPro startup sequence.

Perform the RollerHead startup sequence.

Executes the startup steps in order:

  1. Hides all height controller UI groups via HideAllHeightControllerGroups()
  2. Shows the SoftHC-specific panel with mode-appropriate controls via ShowHeightControllerGroup()
  3. Initializes register mappings via InitializeMappings()
  4. Enables the live voltage DRO display via EnableTipVolts()
    Note
    Documentation generated by AI on 2026-03-03
    Executes the startup steps in order:
  1. Shows the RollerHead-specific panel via ShowHeightControllerGroup()
  2. Hides all height controller UI groups via HideAllHeightControllerGroups()
  3. Initializes register mappings via InitializeMappings()
    Note
    The order of ShowHeightControllerGroup() before HideAllHeightControllerGroups() is intentional in the source implementation.
    Documentation generated by AI on 2026-03-03
    Executes the standard startup steps in order:
  1. Hides all height controller UI groups via HideAllHeightControllerGroups()
  2. Shows the ArcPro-specific panel via ShowHeightControllerGroup()
  3. Initializes register mappings via InitializeMappings()
  4. Enables the live voltage DRO display via EnableTipVolts()
    Note
    Documentation generated by AI on 2026-03-03
    Executes the standard startup steps in order:
  1. Hides all height controller UI groups via HideAllHeightControllerGroups()
  2. Shows the appropriate group for this controller via ShowHeightControllerGroup()
  3. Initializes register mappings via InitializeMappings()
  4. Enables the live voltage DRO display via EnableTipVolts() Subclasses such as SoftHC and ArcPro override this method to customize the startup sequence.
    Note
    Documentation generated by AI on 2026-03-03

◆ StopCuttingRoutine()

HeightControllers StopCuttingRoutine ( )

Execute the standard cutting stop sequence.

Performs the ordered shutdown of an active cut:

  1. Disables Auto Voltage Control
  2. Turns off the torch output
  3. Commands a move to the configured retract height
    Note
    Documentation generated by AI on 2026-03-03

◆ TargetVoltsDnBtn()

NeuronTHC TargetVoltsDnBtn ( )

Decrease the NeuronTHC target arc voltage by 0.25 volts.

Reads the current value of the n_TargetArcVoltageDRO register from the Neuron.THC device, subtracts 0.25, clamps the result to the range [25, 250], writes it back to the register, and calls CutParametersModified() to notify the Neuron plugin of the change.

Note
Documentation generated by AI on 2026-03-03

◆ TargetVoltsUpBtn()

NeuronTHC TargetVoltsUpBtn ( )

Increase the NeuronTHC target arc voltage by 0.25 volts.

Reads the current value of the n_TargetArcVoltageDRO register from the Neuron.THC device, adds 0.25, clamps the result to the range [25, 250], writes it back to the register, and calls CutParametersModified() to notify the Neuron plugin of the change.

Note
Documentation generated by AI on 2026-03-03

◆ TerminatePreheatBtn()

NeuronTHC TerminatePreheatBtn ( )

Terminate the active preheat phase for the NeuronTHC or Manual oxy-fuel height controller.

Behavior depends on the OXY_FUEL_TYPE global:

  • "Servo Height Control": Sets the n_OxyTerminatePreheatButton register in Neuron.THC to 1 if not already set
  • "Manual Height Control": If preheat oxygen output is active and cutting oxygen is not yet on, sets OxyTerminatePreheatButton to 1 (normal termination) or 2 (if IgnoreElapsedTime is true) After updating the register, calls CutParametersModified() to notify the Neuron plugin of the change.
    Parameters
    IgnoreElapsedTime(boolean) If true, terminates preheat regardless of elapsed time by writing 2 instead of 1
    Note
    Documentation generated by AI on 2026-03-03

◆ TestBtn()

NeuronTHC TestBtn ( )

Toggle the NeuronTHC test button between active and inactive states.

Reads the current value of the n_TestButton register from the Neuron.THC device. If the value is 1, sets it to 0; otherwise sets it to 1. After updating the register, calls CutParametersModified() to notify the Neuron plugin that cut parameters have changed.

Note
Documentation generated by AI on 2026-03-03

◆ ToggleAutoVoltageControlMode()

HeightControllers ToggleAutoVoltageControlMode ( )

Toggle the auto voltage control mode between enabled and disabled.

Reads the current auto voltage control mode state via GetAutoVoltageControlMode() and calls SetAutoVoltageControlMode() with the inverse value.

Note
Documentation generated by AI on 2026-03-03

◆ ToggleIHSEnable()

HeightControllers ToggleIHSEnable ( )

Toggle the IHS enabled state and reset the last cut positions.

Resets the stored IHS last cut positions via ResetIHSLastCutPositions() to ensure the next cut will evaluate IHS from scratch, then toggles the IHS enabled state by calling SetIHSEnable() with the inverse of the current IsIHSEnabled() value.

Note
Documentation generated by AI on 2026-03-03

◆ ToggleSmartTargetVoltageMode()

HeightControllers ToggleSmartTargetVoltageMode ( )

Toggle the smart target voltage mode between enabled and disabled.

Reads the current smart target voltage mode state via GetSmartTargetVoltageMode() and calls SetSmartTargetVoltageMode() with the inverse value.

Note
Documentation generated by AI on 2026-03-03

◆ ToggleTorchOutput()

HeightControllers ToggleTorchOutput ( )

Toggle the torch output between on and off states.

Reads the current torch output state and calls SetTorchOutput() with the opposite value.

Note
Documentation generated by AI on 2026-03-03

◆ TorchOutputStateChanged()

HeightControllers TorchOutputStateChanged ( )

Handle a change in the torch output signal state.

Updates the TorchLED screen indicator and the internal Torch.TorchOutput tracking state. When the signal goes high (torch turned on), increments the pierce counter by 1. When the signal goes low (torch turned off), clears the LostArc.TorchWasOn and LostArc.Triggered flags. Also calls TrackCutTime() to accumulate torch-on duration for consumables tracking.

Parameters
sig_state(boolean) The new state of the torch output signal
Note
Documentation generated by AI on 2026-03-03

◆ TrackCutTime()

HeightControllers TrackCutTime ( )

Track torch on/off transitions to accumulate total cut time.

Detects rising and falling edges of the torch output signal to maintain a running cut time total. When the torch turns on (state transitions from false to true), records the start time in MON_Torch_on_start and sets MON_Torch_is_on. When the torch turns off (state transitions from true to false), computes the duration since start, adds it to the HC_CutTime OEM parameter, and clears MON_Torch_is_on. Has no effect if the state has not changed since the last call.

Parameters
state(boolean) The current torch output state; true = on, false = off
Note
Documentation generated by AI on 2026-03-03

◆ UpdateAdjustActive()

HeightControllers UpdateAdjustActive ( )

Update the THCActiveLED screen indicator based on the adjust-active state.

Reads the current HC_AdjustActive OEM parameter value and sets the THCActiveLED to green when the height controller adjustment is active, or off when inactive.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateArcProSampledVoltage()

ArcPro UpdateArcProSampledVoltage ( )

Update the ArcPro target voltage from the auto-sampled voltage register.

Checks if Smart Target Voltage Mode is enabled (HC_SmartTargetVoltageMode == 1). If enabled, reads the AutoRefVolts register from the ArcPro device. If the voltage value is greater than 0, calls SetTargetVoltage() to apply it as the new target voltage. Has no effect if Smart Target Voltage Mode is disabled or if AutoRefVolts is zero or negative.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateArcProSmartTargeVoltageMode()

ArcPro UpdateArcProSmartTargeVoltageMode ( )

Synchronize the ArcPro Smart Target Voltage Mode state to the ArcPro device register.

Reads the HC_SmartTargetVoltageMode OEM register. If the value is 1 (enabled), writes 77000 to the AutoRefMode register in the ArcPro device to activate smart target voltage mode in the hardware. If the value is 0 (disabled), writes 0 to AutoRefMode to deactivate it.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateAutoVoltageControlModeBtn()

HeightControllers UpdateAutoVoltageControlModeBtn ( )

Update the AVCControlBtn screen indicator based on the auto voltage control mode state.

Reads the current auto voltage control mode state via GetAutoVoltageControlMode() and sets the AVCControlBtn button color to BTN_COLOR_ON when enabled, or BTN_COLOR_OFF when disabled.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateConsumablesLabel()

HeightControllers UpdateConsumablesLabel ( )

Update the PlasmaStatistics screen label with formatted cut time and pierce count.

Retrieves the current cut time in seconds and pierce count from their respective OEM parameter registers, formats the cut time as a human-readable string (e.g. "1h 02m 30s"), and writes the combined statistics string to the PlasmaStatistics screen object label. Hours are omitted when zero; minutes are omitted when both hours and minutes are zero.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateCutTimeLive()

HeightControllers UpdateCutTimeLive ( )

Accumulate cut time incrementally while the torch is on.

If the torch is currently on (MON_Torch_is_on is true), computes the elapsed time since MON_Torch_on_start, adds it to the stored HC_CutTime value, and resets MON_Torch_on_start to the current clock time to avoid double-counting on the next call. Intended to be called periodically from LowPriorityLoop() while cutting is active.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateFeedrateLocked()

HeightControllers UpdateFeedrateLocked ( )

Update the FeedrateLockLED screen indicator based on the feedrate locked state.

Reads the current feedrate locked state and sets the FeedrateLockLED to yellow when locked, or off when not locked.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateIHSEnabledBtn()

HeightControllers UpdateIHSEnabledBtn ( )

Update the IHSEnabledBtn screen indicator based on IHS support and enabled state.

First checks whether IHS is supported via IsIHSSupported(). If not supported, sets the button color to BTN_COLOR_OFF and disables the button control, then returns. If IHS is supported, enables the button and sets its color to BTN_COLOR_ON when IHS is enabled, or BTN_COLOR_OFF when disabled.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateLiveVoltsLocked()

HeightControllers UpdateLiveVoltsLocked ( )

Update the VoltageLockLED screen indicator based on the live volts locked state.

Reads the current live volts locked state and sets the VoltageLockLED to yellow when locked, or off when not locked.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateMovingDirection()

SoftHC UpdateMovingDirection ( )

Update the SoftHC moving-up and moving-down OEM registers based on jog direction.

Sets the SoftHCMovingUp and SoftHCMovingDown OEM parameter values to reflect the current jog direction. For a positive direction (up), sets MovingUp true and MovingDown false. For a negative direction (down), sets MovingUp false and MovingDown true. For zero (stopped), clears both flags.

Parameters
jog_dir(number) The jog direction: 1 for up, -1 for down, 0 for stopped
Note
Documentation generated by AI on 2026-03-03

◆ UpdateMovingDown()

HeightControllers UpdateMovingDown ( )

Update the MovingDownLED screen indicator based on current moving-down and limit states.

If the cut height minimum limit is active, illuminates the LED in yellow to indicate a limit condition. Otherwise, illuminates the LED in green if the height controller is currently moving down, or turns it off if stopped.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateMovingUp()

HeightControllers UpdateMovingUp ( )

Update the MovingUpLED screen indicator based on current moving-up and limit states.

If the cut height maximum limit is active, illuminates the LED in yellow to indicate a limit condition. Otherwise, illuminates the LED in green if the height controller is currently moving up, or turns it off if stopped.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateScreenControls()

HeightControllers UpdateScreenControls ( )

Update screen control LEDs and indicators (base class stub).

This is the base class default implementation with no behavior. Subclasses should override this method to refresh on-screen indicators such as FeedrateLockLED, TorchLED, ArcOkLed, IHSProbeLED, MovingUpLED, MovingDownLED, and TipVoltsLockLED.

Note
Documentation generated by AI on 2026-03-03

◆ UpdateSignalLibrary()

HeightControllers UpdateSignalLibrary ( )

Register signal change callbacks for height controller I/O signals in the signal library.

Registers handler functions in MACHINE_TYPE_SIG_LIBRARY_INST for the following OEM-parameter-mapped signals (if mapped):

◆ UpdateSmartTargetVoltageBtn()

HeightControllers UpdateSmartTargetVoltageBtn ( )

Update the SmartTargetVoltageBtn screen indicator based on the smart target voltage mode state.

Reads the current smart target voltage mode state via GetSmartTargetVoltageMode() and sets the SmartTargetVoltageBtn button color to BTN_COLOR_ON when enabled, or BTN_COLOR_OFF when disabled.

Note
Documentation generated by AI on 2026-03-03

◆ VoltageModeToggleBtn()

NeuronTHC VoltageModeToggleBtn ( )

Toggle the NeuronTHC voltage sample mode button between active and inactive states.

Reads the current value of the n_SampleButton register from the Neuron.THC device. If the value is 1, sets it to 0; otherwise sets it to 1. After updating the register, calls CutParametersModified() to notify the Neuron plugin that cut parameters have changed.

Note
Documentation generated by AI on 2026-03-03

◆ WaitCutParametersModified()

NeuronTHC WaitCutParametersModified ( )

Wait for the Neuron plugin to acknowledge updated cut parameters.

Calls m.CutParametersModified() to signal the plugin, then polls the n_IsCutParametersModify register in the Neuron.THC device using w.PleaseWaitDialog() with a 4-second timeout and "Syncing with THC..." message. The plugin clears this register back to zero once it has acknowledged the change. Only executes if m.IsNeuronTHC() returns true. Returns nil on timeout or error.

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

◆ WaitForArcOK()

HeightControllers WaitForArcOK ( )

Wait for the Arc OK input signal to become active.

Sets the cut sequence state to WAIT_ARC_OK, then blocks until the HC_ArcOKInput signal goes high or the configured timeout expires. If the HC_ArcOKInput OEM parameter signal is not mapped, this function returns immediately without waiting.

Warning
This function blocks execution until arc OK is received or timeout occurs
Note
Documentation generated by AI on 2026-03-03

◆ WaitPierceDelay()

HeightControllers WaitPierceDelay ( )

Wait for the configured pierce delay duration before continuing.

Blocks execution for the pierce delay period configured in the HC_PierceDelay OEM parameter. The delay value is read in seconds and converted to milliseconds internally. Behavior differs based on execution context:

  • Screen chunk: uses w.WaitOnCondition() with a dwell bar UI
  • M-code chunk: uses a polling loop with w.Sleep(10) increments, updating a custom dwell bar, and supports early exit if the Cycle Start pressed flag is set If pierce delay is zero, returns immediately with a completion message.
    Returns
    (nil) No meaningful primary return value on success
    (boolean) Success flag - true if delay completed or was skipped, false on sleep error
    (string) Status message from w.FunctionCompleted() or w.FunctionError()
    Warning
    This function blocks execution for the duration of the pierce delay
    Note
    Documentation generated by AI on 2026-03-03