|
Mach Modules Documentation
Lua Module API Documentation
|
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. | |
| 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:
| 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.
| sig_state | (boolean) The new state of the Arc OK input signal |
| 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.
| 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.
| 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.
| 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:
| direction | (number) The jog direction: 1 for up, -1 for down, 0 for stop |
| 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:
| 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:
| instance | (number) The Mach4 instance handle to associate with this controller |
| context | (any) Context object (unused by SoftHC, passed for interface compatibility) |
| instance | (number) The Mach4 instance handle to associate with this controller |
| context | (any) Context object (unused by RollerHead, passed for interface compatibility) |
| instance | (number) The Mach4 instance handle to associate with this controller |
| context | (any) Context object (unused by ArcPro, passed for interface compatibility) |
| instance | (number) The Mach4 instance handle to associate with this controller |
| context | (any) Context object (unused by NeuronTHC, passed for interface compatibility) |
| instance | (number) The Mach4 instance handle to associate with this controller |
| context | (any) Context object (unused by Generic, passed for interface compatibility) |
| instance | (number) The Mach4 instance handle for this controller object |
| context | (string) The execution context string (e.g., 'SCREEN' or 'MCODE') |
| instance | (number) The Mach4 instance handle for this controller object |
| context | (string) The execution context string (e.g., 'SCREEN' or 'MCODE') |
| instance | (number) The Mach4 instance handle for this controller object |
| context | (string) The execution context string (e.g., 'SCREEN' or 'MCODE') |
| instance | (number) The Mach4 instance handle for this controller object |
| context | (string) The execution context string (e.g., 'SCREEN' or 'MCODE') |
| instance | (number) The Mach4 instance handle for this controller object |
| context | (string) The execution context string (e.g., 'SCREEN' or 'MCODE') |
| instance | (number) The Mach4 instance handle for this controller object |
| context | (string) The execution context string (e.g., 'SCREEN' or 'MCODE') |
| 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:
| 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 |
| 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:
| 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.
| 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.
| 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.
| HeightControllers CycleStop | ( | ) |
Handle a cycle stop event by resetting the cut sequence to IDLE.
| 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.
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.
| 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.
| sig_state | (boolean) The new state of the digital down input signal |
| 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.
| sig_state | (boolean) The new state of the digital up input signal |
| 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.
| 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.
| 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.
| expr_string | (string) A Lua expression string to evaluate (e.g., "HC:ToggleAutoVoltageControlMode()") |
| 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.
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.
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.
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.
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.
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.
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.
Output register entry for the ArcProAntiDiveTipVoltageOperatingRange mapping object. Propagates changes from the ArcProAntiDiveTipVoltageOperatingRange OEM parameter register to the TipVoltageOpRange register in the ArcPro device.
Output register entry for the ArcProAntiDiveTipVoltageRecoveryRange mapping object. Propagates changes from the ArcProAntiDiveTipVoltageRecoveryRange OEM parameter register to the TipVoltageRecRange register in the ArcPro device.
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.
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.
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.
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.
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.
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.
Referenced by AddToRunScriptQueue(), CreateCommandActionOption(), CreateCommandFeedbackOption(), CreateUserCommandActionOption(), CreateUserCommandFeedbackOption(), Register(), StartFunction(), and StopFunction().
| 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:
| 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 |
| HeightControllers GetAdjustDelay | ( | ) |
Get the configured height controller adjust delay from the OEM parameter register.
| HeightControllers GetAdjustSpeed | ( | ) |
Get the configured height controller adjustment speed from the OEM parameter register.
| HeightControllers GetAmperage | ( | ) |
Get the configured amperage from the OEM parameter register.
| HeightControllers GetAntiDiveFeedrate | ( | ) |
Get the configured anti-dive feedrate from the OEM parameter register.
| 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.
| 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).
| 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).
| 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.
| 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.
| 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:
| 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:
| hc_obj | (table) The height controller object to augment with common fields |
| 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.
| inst | (number|nil) The Mach4 instance handle. If nil, uses mc.mcGetInstance() |
| 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.
| 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.
| HeightControllers GetCutHeight | ( | ) |
Get the configured cut height from the OEM parameter register.
| HeightControllers GetCutHeightMaxLimit | ( | ) |
Get the configured cut height maximum travel limit from the OEM parameter register.
| HeightControllers GetCutHeightMinLimit | ( | ) |
Get the configured cut height minimum travel limit from the OEM parameter register.
| HeightControllers GetCutTime | ( | ) |
Get the accumulated cut time from the OEM parameter register.
| HeightControllers GetDeadbandVoltage | ( | ) |
Get the configured voltage deadband from the OEM parameter register.
| 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").
| instance | (number) The Mach4 instance handle (unused in base implementation) |
| 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.
| 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.
| getDistance | ( | ) |
Determine whether Initial Height Sensing is needed before the next cut.
Evaluates several conditions to decide if IHS should be performed:
| 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.
| 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 |
| 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".
| HeightControllers GetIgnitionHeight | ( | ) |
Get the configured ignition height from the OEM parameter register.
| 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.
| axis_id | (number) The axis ID to query (e.g., mc.X_AXIS, mc.Y_AXIS, mc.Z_AXIS) |
| 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:
| 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.
| 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.
| 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.
| 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.
| 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.
| HeightControllers GetIHSSpeed | ( | ) |
Get the configured IHS probing speed from the OEM parameter register.
| 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.
| HeightControllers GetLostArcTolerance | ( | ) |
Get the configured lost arc tolerance from the OEM parameter register.
| 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.
| 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:
| 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.
| 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.
| 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.
| HeightControllers GetPierceCounter | ( | ) |
Get the current pierce counter value from the OEM parameter register.
| HeightControllers GetPierceDelay | ( | ) |
Get the configured pierce delay from the OEM parameter register.
| HeightControllers GetPierceHeight | ( | ) |
Get the configured pierce height from the OEM parameter register.
| HeightControllers GetRetractHeight | ( | ) |
Get the configured retract height from the OEM parameter register.
| 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.
| 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).
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.
| HeightControllers GetTargetVoltage | ( | ) |
Get the configured target voltage from the OEM parameter register.
| HeightControllers GetTimeout | ( | ) |
Get the configured height controller timeout from the OEM parameter register.
| HeightControllers GetTipVoltageMultiplier | ( | ) |
Get the configured tip voltage multiplier from the OEM parameter register.
| HeightControllers GetTipVoltageTipVoltageScaled | ( | ) |
Get the current scaled tip voltage from the OEM parameter register.
| 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.
| 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.
| 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.
| 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.
| sig_state | (boolean) The new state of the IHS probe input signal |
| 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:
| return_gcode | (boolean|nil) If true, returns the G-code string instead of executing it. Defaults to false |
| HeightControllers IncrementPierceCounter | ( | ) |
Add a value to the pierce counter OEM parameter register.
| value | (number) The amount to add to the current pierce count. Defaults to 0 if not a number |
| 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:
| 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.
| SoftHC IsActive | ( | ) |
Get whether the SoftHC height controller is currently active.
| HeightControllers IsAdjustActive | ( | ) |
Get whether the height controller voltage adjustment is currently active.
| 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.
| HeightControllers IsCutHeightMaxLimitActive | ( | ) |
Get whether the cut height maximum limit is currently active.
| HeightControllers IsCutHeightMinLimitActive | ( | ) |
Get whether the cut height minimum limit is currently active.
| 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.
| 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.
| HeightControllers IsFeedrateLocked | ( | ) |
Get whether the SoftHC XY feedrate is currently locked.
Get whether the XY feedrate is currently locked (anti-dive feedrate lock active).
| 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.
| HeightControllers IsIHSNeeded | ( | ) |
Determine whether Initial Height Sensing is needed before the next cut.
Evaluates several conditions to decide if IHS should be performed:
| 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.
| 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.
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.
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.
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.
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.
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.
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.
| HeightControllers IsLiveVoltsLocked | ( | ) |
Get whether the live voltage feedback is currently locked (anti-dive voltage lock active).
| 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.
| HeightControllers IsMovingDown | ( | ) |
Get whether the SoftHC axis is currently moving downward.
Get whether the height controller is currently moving the axis downward.
| HeightControllers IsMovingUp | ( | ) |
Get whether the SoftHC axis is currently moving upward.
Get whether the height controller is currently moving the axis upward.
| 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.
| SoftHC IsVoltageLocked | ( | ) |
Get whether the SoftHC live voltage feedback is currently locked.
| 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.
| position | (number) Target position in part (work) coordinates |
| 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.
| OnOff | (boolean) True to press the torch down button, false to release it |
| 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.
| OnOff | (boolean) True to press the torch up button, false to release it |
| 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.
| 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:
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.
| 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.
| 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.
| 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.
| 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:
| common | (table) The base mapping table to start from |
| overrides | (table) The table of overrides and additions to apply on top of common |
| 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().
This is the base class default implementation. Subclasses that support motion sync (such as ArcPro) override this method with functional implementations.
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.
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.
| 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.
| return_gcode | (boolean|nil) If true, returns the G-code string instead of executing it. Defaults to false |
| 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.
| return_gcode | (boolean|nil) If true, returns the G-code string instead of executing it. Defaults to false |
| 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.
| return_gcode | (boolean|nil) If true, returns the G-code string instead of executing it. Defaults to false |
| 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.
| 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 |
| 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.
| 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) |
| 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.
| 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) |
| 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.
| 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) |
| 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().
| volts | (number|nil) The target arc voltage in volts. If nil, reads current value from register |
| ... | (any) Additional arguments (unused, present for interface compatibility) |
| 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.
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.
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.
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.
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.
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.
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.
| 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.
| 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.
| NeuronTHC OxySetCutHeightBtn | ( | ) |
Set the oxy cut height reference position for the NeuronTHC or Manual height controller.
Behavior depends on the OXY_FUEL_TYPE global:
| 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:
| 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.
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.
| 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.
| 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 |
| 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().
| 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 |
| 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.
| 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.
| 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.
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.
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.
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.
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.
| 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.
| 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.
| 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.
| 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.
| 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.
| SoftHC SetActive | ( | ) |
Set the SoftHC active state in the OEM parameter register.
| val | (boolean) True to mark the height controller as active, false to deactivate it |
| HeightControllers SetAdjustDelay | ( | ) |
Set the height controller adjust delay OEM parameter register to an absolute value.
| value | (number) The new adjust delay value in milliseconds. Defaults to 0 if not a number |
| HeightControllers SetAdjustSpeed | ( | ) |
Set the height controller adjustment speed OEM parameter register to an absolute value.
| value | (number) The new adjustment speed value. Defaults to 0 if not a number |
| HeightControllers SetAmperage | ( | ) |
Set the amperage OEM parameter register to an absolute value.
| value | (number) The new amperage value. Defaults to 0 if not a number |
| HeightControllers SetAntiDiveFeedrate | ( | ) |
Set the anti-dive feedrate OEM parameter register to an absolute value.
| value | (number) The new anti-dive feedrate value. Defaults to 0 if not a number |
| HeightControllers SetArcWasEstablished | ( | ) |
Set the arc-was-established flag in the OEM parameter register.
| value | (boolean) True to indicate arc was established, false to clear the flag. Defaults to false if not boolean |
| 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.
| value | (boolean) True to enable auto voltage control mode, false to disable it. Defaults to false if not boolean |
| 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):
| value | (boolean) True to enable auto voltage control, false to disable it. Defaults to false if not boolean |
| value | (boolean) True to activate auto voltage control, false to deactivate it. Defaults to false if not boolean |
| HeightControllers SetCutHeight | ( | ) |
Set the cut height OEM parameter register to an absolute value.
| value | (number) The new cut height in current units. Defaults to 0 if not a number |
| HeightControllers SetCutHeightMaxLimit | ( | ) |
Set the cut height maximum travel limit OEM parameter register to an absolute value.
| value | (number) The new cut height maximum limit in current units. Defaults to 0 if not a number |
| HeightControllers SetCutHeightMaxLimitActive | ( | ) |
Set the cut height maximum limit active state in the OEM parameter register.
| value | (boolean) True to indicate the maximum limit is active, false to clear it. Defaults to false if not boolean |
| HeightControllers SetCutHeightMinLimit | ( | ) |
Set the cut height minimum travel limit OEM parameter register to an absolute value.
| value | (number) The new cut height minimum limit in current units. Defaults to 0 if not a number |
| HeightControllers SetCutHeightMinLimitActive | ( | ) |
Set the cut height minimum limit active state in the OEM parameter register.
| value | (boolean) True to indicate the minimum limit is active, false to clear it. Defaults to false if not boolean |
| 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.
| name | (string) The cut sequence state name to set (e.g., "IDLE", "IHS", "AVC") |
| 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.
| name | (string|nil) The cut sequence state name to display. If nil, reads from HC_State register |
| HeightControllers SetCutTime | ( | ) |
Set the cut time OEM parameter register to an absolute value.
| value | (number) The new cut time value in seconds. Defaults to 0 if not a number |
| HeightControllers SetDeadbandVoltage | ( | ) |
Set the voltage deadband OEM parameter register to an absolute value.
| value | (number) The new deadband voltage in volts. Defaults to 0 if not a number |
| 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.
| new_value | (boolean) True to mark the controller as defunct, false to mark it operational |
| SoftHC SetFeedrateLocked | ( | ) |
Set the SoftHC feedrate-locked state in the OEM parameter register.
| val | (boolean) True to indicate feedrate lock is active, false to clear it |
| HeightControllers SetIgnitionHeight | ( | ) |
Set the ignition height OEM parameter register to an absolute value.
| value | (number) The new ignition height in current units. Defaults to 0 if not a number |
| 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.
| value | (boolean) True to enable IHS, false to disable it. Defaults to true if not boolean |
| 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.
| 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 |
| 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.
| value | (number) The new IHS probe offset in current units. Defaults to 0 if not a number |
| 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.
| value | (number) The new IHS skip distance in current units. Defaults to 0 if not a number |
| 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.
| value | (boolean) True to skip IHS on the next cut, false to clear the flag. Defaults to true if not boolean |
| HeightControllers SetIHSSpeed | ( | ) |
Set the IHS probing speed OEM parameter register to an absolute value.
| value | (number) The new IHS probe feed rate in current units per minute. Defaults to 0 if not a number |
| 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.
| value | (number) The raw live voltage value in volts. Defaults to 0 if not a number |
| HeightControllers SetLostArcTolerance | ( | ) |
Set the lost arc tolerance OEM parameter register to an absolute value.
| value | (number) The new lost arc tolerance in milliseconds. Defaults to 0 if not a number |
| SoftHC SetMaxLimitActive | ( | ) |
Set the SoftHC maximum travel limit active state in the OEM parameter register.
| val | (boolean) True to indicate the maximum limit is active, false to clear it |
| SoftHC SetMinLimitActive | ( | ) |
Set the SoftHC minimum travel limit active state in the OEM parameter register.
| val | (boolean) True to indicate the minimum limit is active, false to clear it |
| SoftHC SetMovingDown | ( | ) |
Set the SoftHC moving-down state in the OEM parameter register.
| val | (boolean) True to indicate the axis is moving down, false to clear it |
| SoftHC SetMovingUp | ( | ) |
Set the SoftHC moving-up state in the OEM parameter register.
| val | (boolean) True to indicate the axis is moving up, false to clear it |
| HeightControllers SetPierceCounter | ( | ) |
Set the pierce counter OEM parameter register to an absolute value.
| value | (number) The new pierce counter value. Defaults to 0 if not a number |
| HeightControllers SetPierceDelay | ( | ) |
Set the pierce delay OEM parameter register to an absolute value.
| value | (number) The new pierce delay value in seconds. Defaults to 0 if not a number |
| HeightControllers SetPierceHeight | ( | ) |
Set the pierce height OEM parameter register to an absolute value.
| value | (number) The new pierce height in current units. Defaults to 0 if not a number |
| HeightControllers SetRetractHeight | ( | ) |
Set the retract height OEM parameter register to an absolute value.
| value | (number) The new retract height in current units. Defaults to 0 if not a number |
| 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.
| value | (boolean) True to enable smart target voltage mode, false to disable it. Defaults to false if not boolean |
| 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").
| state | (string) The state name string to write to the SoftHCState register |
| HeightControllers SetTargetVoltage | ( | ) |
Set the target voltage OEM parameter register to an absolute value.
| value | (number) The new target voltage in volts. Defaults to 0 if not a number |
| HeightControllers SetTimeout | ( | ) |
Set the height controller timeout OEM parameter register to an absolute value.
| value | (number) The new timeout value in milliseconds. Defaults to 0 if not a number |
| 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.
| HeightControllers SetTipVoltageMultiplier | ( | ) |
Set the tip voltage multiplier OEM parameter register to an absolute value.
| value | (number) The new tip voltage multiplier. Defaults to 0 if not a number |
| 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.
| state | (boolean) True to turn the torch on, false to turn it off. Defaults to true if not boolean |
| SoftHC SetVoltageLocked | ( | ) |
Set the SoftHC voltage-locked state in the OEM parameter register.
| val | (boolean) True to indicate voltage lock is active, false to clear it |
| 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):
| 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.
| sig_id | (number) The signal ID that changed state |
| sig_state | (boolean) The new state of the signal |
| 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.
| 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:
| IHSMode | (number|nil) Controls IHS behavior: nil/-1/1=default, 0=skip IHS, 2=IHS only |
| 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:
| HeightControllers StopCuttingRoutine | ( | ) |
Execute the standard cutting stop sequence.
Performs the ordered shutdown of an active cut:
| 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.
| 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.
| NeuronTHC TerminatePreheatBtn | ( | ) |
Terminate the active preheat phase for the NeuronTHC or Manual oxy-fuel height controller.
Behavior depends on the OXY_FUEL_TYPE global:
| IgnoreElapsedTime | (boolean) If true, terminates preheat regardless of elapsed time by writing 2 instead of 1 |
| 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.
| 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.
| 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.
| 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.
| HeightControllers ToggleTorchOutput | ( | ) |
Toggle the torch output between on and off states.
Reads the current torch output state and calls SetTorchOutput() with the opposite value.
| 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.
| sig_state | (boolean) The new state of the torch output signal |
| 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.
| state | (boolean) The current torch output state; true = on, false = off |
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| jog_dir | (number) The jog direction: 1 for up, -1 for down, 0 for stopped |
| 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.
| 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.
| 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.
| 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):
| 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.
| 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.
| 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.
| 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.
| 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: