|
Mach Modules Documentation
Lua Module API Documentation
|
Go to the source code of this file.
Functions | |
| JetAuxModule | IsJetPressureEnabled (StationNumber) |
| Check if pressure is enabled for the specified jet station. | |
| JetAuxModule | IsJetAbrasiveEnabled (StationNumber) |
| Check if abrasive is enabled for the specified jet station. | |
| JetAuxModule | IsJetAbrasiveMasterEnableOn () |
| Check if the global abrasive master enable is currently active. | |
| JetAuxModule | SetJetAbrasiveMasterEnable (onoff) |
| Enable or disable the global abrasive master enable OEM parameter. | |
| JetAuxModule | SetJetsPressure (onoff) |
| Turn pressure on or off for all configured jet stations. | |
| JetAuxModule | IsJetsPressureOn () |
| Check if any jet pressure output is currently active. | |
| JetAuxModule | SetJetsHighPressure (onoff) |
| Turn high pressure on or off for all configured jet stations. | |
| JetAuxModule | IsJetsHighPressureEnabled () |
| Check if jets high pressure mode is enabled via OEM parameter. | |
| JetAuxModule | IsJetsHighPressureOn () |
| Check if any jet high pressure output is currently active. | |
| JetAuxModule | SetJetsAbrasive (onoff) |
| Turn abrasive on or off for all configured jet stations. | |
| JetAuxModule | IsJetsAbrasiveOn () |
| Check if any jet abrasive output is currently active. | |
| JetAuxModule | SetAbrasiveSpeed (abrasiveSpeed) |
| Set the abrasive feed rate and update the UI and OEM parameter. | |
| JetAuxModule | JetsPressureDelay (delay_ms) |
| Wait for the configured jet pressure on delay, with optional override. | |
| JetAuxModule | GetJetsPressureDelay () |
| Get the configured jet pressure on delay in milliseconds. | |
| JetAuxModule | SetJetsPressureDelay (delay) |
| Set the jet pressure on delay by writing to the OEM register. | |
| JetAuxModule | JetsAbrasiveDelay (delay_ms) |
| Wait for the configured jet abrasive on delay, with optional override. | |
| JetAuxModule | GetJetsPreOffDelay () |
| Get the configured jet pre-off delay in milliseconds. | |
| JetAuxModule | JetsPreOffDelay (delay_ms) |
| Wait for the configured jet pre-off delay, with optional override. | |
| JetAuxModule | GetJetsOffDelay () |
| Get the configured jet off delay in milliseconds. | |
| JetAuxModule | JetsOffDelay (delay_ms) |
| Wait for the configured jet off delay, with optional override. | |
| JetAuxModule | JetsAbrasivePurgeDelay () |
| Wait for the configured jet abrasive purge delay after turning abrasive off. | |
| JetAuxModule | GetJetsAbrasiveDelay () |
| Get the combined jet abrasive on delay in milliseconds. | |
| JetAuxModule | SetJetsAbrasiveDelay (delay) |
| Set the jet abrasive on delay by writing to the OEM register. | |
| JetAuxModule | GetJetsAbrasivePurgeDelay () |
| Get the combined jet abrasive purge delay in milliseconds. | |
| JetAuxModule | JetsPierceDelay (delay_ms) |
| Wait for the configured jet pierce delay, with optional override and wiggle pierce support. | |
| JetAuxModule | GetJetsPierceDelay () |
| Get the configured jet pierce delay in milliseconds. | |
| JetAuxModule | SetJetsPierceDelay (delay) |
| Set the jet pierce delay in seconds by writing to the OEM register. | |
| JetAuxModule | ToggleJetsWigglePiercing () |
| Toggle the wiggle piercing enable state. | |
| JetAuxModule | SetJetsWigglePiercing (onoff) |
| Enable or disable wiggle piercing by setting the OEM parameter. | |
| JetAuxModule | IsJetsWigglePiercingEnabled () |
| Check if wiggle piercing is enabled via OEM parameter. | |
| JetAuxModule | IsJetsWigglePiercingOn () |
| Check if wiggle piercing is currently active based on machine state and configuration. | |
| JetAuxModule | JetsWigglePiercing (delay_ms) |
| Perform wiggle piercing motion instead of a timed pierce delay. | |
| JetAuxModule | UpdateJetAbrasiveAxisRate (JetAbrasiveAxisRate,...) |
| Update the jog feed rate for all enabled abrasive axes. | |
| JetAuxModule | SetJetAbrasiveAxis (onoff) |
| Start or stop all configured abrasive axes using velocity jogging. | |
| JetAuxModule | IsJetAbrasiveAxisOn () |
| Check if any configured abrasive axis is currently jogging. | |
| JetAuxModule | SetAbrasiveRate (JetAbrasiveAxisID, JetAbrasiveAxisRate) |
| Set the jog feed rate for the specified abrasive axis, clamped to configured limits. | |
| JetAuxModule | GetAbrasiveMaxRate (JetAbrasiveAxisID) |
| Get the maximum allowable abrasive feed rate for the specified axis. | |
| JetAuxModule | GetAbrasiveMinRate (JetAbrasiveAxisID) |
| Get the minimum allowable abrasive feed rate for the specified axis. | |
| JetAuxModule | JetPumpOn () |
| Turn the jet pump on. | |
| JetAuxModule | JetPumpOff () |
| Turn the jet pump off. | |
| JetAuxModule | SetJetPumpStatus (status) |
| Set the jet pump status register to the specified status code. | |
| JetAuxModule | GetJetPumpStatus () |
| Get the current jet pump status value. | |
| JetAuxModule | IsJetPumpOn () |
| Check if the jet pump is fully on and pressure ramp is complete. | |
| JetAuxModule | IsJetPumpStarting () |
| Check if the jet pump is in any starting state. | |
| JetAuxModule | IsJetPumpMotorOn () |
| Check if the jet pump motor has been commanded on. | |
| JetAuxModule | IsJetPumpMotorUpToSpeed () |
| Check if the jet pump motor has reached operating speed. | |
| JetAuxModule | SetJetPump (onoff) |
| Turn the jet pump on or off with error recovery. | |
| JetAuxModule | IsJetPumpDelayEnabledAndNeeded () |
| Check if the jet pump auto-on delay is enabled and currently needed. | |
| JetAuxModule | GetJetPumpDelay () |
| Get the configured jet pump motor spin-up delay in milliseconds. | |
| JetAuxModule | GetJetPumpRampDelay () |
| Calculate the scaled pressure ramp delay in milliseconds based on commanded pressure. | |
| JetAuxModule | GetJetHighPressureDelay () |
| Get the configured high pressure delay for the jet. | |
| JetAuxModule | SetJetPumpAutoOn () |
| Automatically turn on the jet pump when a program starts if configured to do so. | |
| JetAuxModule | SetJetPumpOffOnEndOfProgram () |
| Turn off the jet pump at the end of the G-code program if configured to do so. | |
| JetAuxModule | IsJetPumpPressureControlEnabled () |
| Check if jet pump pressure control is enabled. | |
| JetAuxModule | SetPressure (inst, pressure) |
| Set the operator-commanded pressure for the jet pump via pound variable. | |
| JetAuxModule | GetJetPumpPressureMax () |
| Get the maximum pressure the operator can command for the jet pump. | |
| JetAuxModule | GetJetPumpPressureMin () |
| Get the minimum pressure the operator can command for the jet pump. | |
| JetAuxModule | GetJetPumpPressureOutputScaleMax () |
| Get the maximum output pressure scaling value for the analog pressure output. | |
| JetAuxModule | GetJetPumpPressureOutputScaleMin () |
| Get the minimum output pressure scaling value for the analog pressure output. | |
| JetAuxModule | GetJetPumpPressureRampUpTime () |
| Get the pressure ramp up time in seconds for the jet pump. | |
| JetAuxModule | GetJetPumpPressureRampDownTime () |
| Get the pressure ramp down time in seconds for the jet pump. | |
| JetAuxModule | GetJetPumpCommandedPressure () |
| Get the operator-commanded pressure for the jet pump. | |
| JetAuxModule | SetJetPumpOutputPressure (pressure) |
| Set the jet pump analog output pressure scaled from commanded pressure units. | |
| JetAuxModule | GetJetPumpOutputPressure () |
| Get the current jet pump output pressure scaled to commanded pressure units. | |
| JetAuxModule | IsJetPumpOutputPressureMapped () |
| Check if the jet pump analog pressure output signal is mapped. | |
| JetAuxModule | IsJetPumpPressureControlClosedLoopEnabled () |
| Check if closed-loop pressure control is enabled for the jet pump. | |
| JetAuxModule | GetJetPumpInputPressure () |
| Get the current jet pump input pressure scaled to commanded pressure units. | |
| JetAuxModule | IsJetPumpPressureAnalogInputMapped () |
| Check if the jet pump analog pressure input signal is mapped. | |
| JetAuxModule | GetJetPumpPressureInputScaleMin () |
| Get the minimum input pressure scaling value for the analog pressure input. | |
| JetAuxModule | GetJetPumpPressureInputScaleMax () |
| Get the maximum input pressure scaling value for the analog pressure input. | |
| JetAuxModule | GetJetPumpPressureControlGainKP () |
| Get the proportional gain (KP) for the jet pump pressure control loop. | |
| JetAuxModule | GetJetPumpPressureControlGainKI () |
| Get the integral gain (KI) for the jet pump pressure control loop. | |
| JetAuxModule | GetJetPumpPressureControlDeadband () |
| Get the deadband value for the jet pump pressure control loop. | |
| JetAuxModule | UpdateJetPumpOutputPressureControl () |
| Update the jet pump analog pressure output using ramp control and optional closed-loop PI control. | |
| JetAuxModule | IsJetIntensifierControlEnabled () |
| Check if the jet intensifier control subsystem is enabled. | |
| JetAuxModule | GetJetsSensorTimeout () |
| Get the configured sensor timeout value for jet sensors. | |
| JetAuxModule | IsIntensifier1ShiftIOMapped () |
| Check if all required shift I/O signals for intensifier 1 are mapped. | |
| JetAuxModule | IsIntensifier2ShiftIOMapped () |
| Check if all required shift I/O signals for intensifier 2 are mapped. | |
| JetAuxModule | SetIntensifierShiftLeft (IntensifierNumber) |
| Command the specified intensifier to shift left. | |
| JetAuxModule | SetIntensifierShiftRight (IntensifierNumber) |
| Command the specified intensifier to shift right. | |
| JetAuxModule | SetIntensifierBleedDownValve (onoff) |
| Set the intensifier bleed down valve output signal. | |
| JetAuxModule | SetIntensifierBoostPump (onoff) |
| Set the intensifier boost pump output signal. | |
| JetAuxModule | SetIntensifierWaterCooling (onoff) |
| Set the intensifier water cooling output signal. | |
| JetAuxModule | GetIntensifierWaterCooling () |
| Get the current state of the intensifier water cooling output signal. | |
| JetAuxModule | SetIntensifierInletWaterValve (onoff) |
| Set the intensifier inlet water valve output signal. | |
| JetAuxModule | WaitForIntensifierInletWaterPressure () |
| Wait for the intensifier inlet water pressure signal to become active. | |
| JetAuxModule | InitializeIntensifier () |
| Initialize intensifier monitoring and create all intensifier-related GMS alarm conditions. | |
| JetAuxModule | AddIntensifierOutputsToIgnoreList () |
| Register all intensifier output signals to the output ignore list. | |
| JetAuxModule | UpdateIntensifierControl () |
| Update intensifier control and water cooling logic from the PLC loop. | |
| JetAuxModule | UpdateSingleIntensifier (intensifierNumber) |
| Update control logic for a single hydraulic intensifier based on shift input signals. | |
| JetAuxModule | GetIntensifierStrokesPerMinute (intensifierNumber) |
| Get the current strokes per minute for the specified intensifier. | |
| JetAuxModule | GetIntensifierOverSpeedAlarm (intensifierNumber) |
| Get the over-speed alarm state for the specified intensifier. | |
| JetAuxModule | GetIntensifierStallAlarm (intensifierNumber) |
| Get the stall alarm state for the specified intensifier. | |
| JetAuxModule | SetCutSequence (name) |
| Set the current cut sequence state identifier. | |
| JetAuxModule | GetControlZAxisWithM3M5 () |
| Check if the jet Z axis is controlled by M3/M5 commands. | |
| JetAuxModule | IgnoreZCommandsDuringDryRun () |
| Check if Z axis commands should be suppressed during dry run mode. | |
| JetAuxModule | IsZOBEnabled () |
| Check if the Z axis override button (OB) feature is enabled. | |
| JetAuxModule | GetPierceHeight () |
| Get the configured jet pierce height from OEM parameters. | |
| JetAuxModule | GetCutHeight () |
| Get the configured jet cut height from OEM parameters. | |
| JetAuxModule | GetRetractHeight () |
| Get the configured jet retract height from OEM parameters. | |
| JetAuxModule | MoveToPierceHeight () |
| Move the jet axis to the configured pierce height. | |
| JetAuxModule | MoveToCutHeight () |
| Move the jet axis to the configured cut height. | |
| JetAuxModule | MoveToRetractHeight () |
| Move the jet axis to the configured retract height. | |
| JetAuxModule | JogToPosition (position) |
| Jog the jet axis to an absolute part position. | |
| JetAuxModule | GCode (gcode_string, msg, wait) |
| Execute a G-code string in either screen chunk or M-code chunk context. | |
| JetAuxModule | ApplyOBOffsetAndRemoveAdjustment () |
| Apply the current Z override axis displacement as a fixture offset on the jet axis, then zero the override axis. | |
| JetAuxModule AddIntensifierOutputsToIgnoreList | ( | ) |
Register all intensifier output signals to the output ignore list.
Adds the intensifier shift, bleed-down valve, boost pump, water cooling, and inlet water valve output signals to the 'IgnoreOutputsOnStop' list. This prevents these outputs from being automatically cleared when the machine stops, allowing the intensifier control logic to manage their state explicitly. Only signals that are currently mapped in OEM parameters are added to the ignore list.
| JetAuxModule ApplyOBOffsetAndRemoveAdjustment | ( | ) |
Apply the current Z override axis displacement as a fixture offset on the jet axis, then zero the override axis.
Transfers the physical Z override adjustment into the active fixture offset so the operator no longer needs to keep the override axis displaced. The function captures the current override axis machine position, applies it as an incremental fixture offset on the jet axis (G10 L2), restores the jet axis DRO to its previous displayed position, and then jogs the override axis back to zero. If the override axis was moved downward (negative displacement), the override axis is zeroed first before applying the fixture offset. If moved upward (positive displacement), the fixture offset is applied first and the override axis is zeroed last. No action is taken if the displacement is less than 0.001 units.
| JetAuxModule GCode | ( | gcode_string | , |
| msg | , | ||
| wait | ) |
Execute a G-code string in either screen chunk or M-code chunk context.
Dispatches a G-code command using the appropriate execution method based on the current execution context. In screen chunk context, uses w.MDICommand() with a wait flag and displays a status message. In M-code chunk context, uses mc.mcCntlGcodeExecuteWait() when wait is true, or mc.mcCntlGcodeExecute() when wait is false.
| gcode_string | (string) The G-code command string to execute |
| msg | (string|nil) Status message to display during execution. If nil, uses 'Running Jet Command' |
| wait | (boolean|nil) If true, blocks until G-code execution completes. If nil, defaults to false |
| JetAuxModule GetAbrasiveMaxRate | ( | JetAbrasiveAxisID | ) |
Get the maximum allowable abrasive feed rate for the specified axis.
Reads the JetAbrasiveAxisUnits OEM parameter to determine the unit mode. If set to "Mass Per Minute", returns the maximum jog feedrate via w.GetMaximumJogFeedrate(). Otherwise, returns a fixed maximum of 100 (percent).
| JetAbrasiveAxisID | (number) The axis ID of the abrasive axis to query |
| JetAuxModule GetAbrasiveMinRate | ( | JetAbrasiveAxisID | ) |
Get the minimum allowable abrasive feed rate for the specified axis.
Reads the JetAbrasiveAxisUnits OEM parameter to determine the unit mode. If set to "Mass Per Minute", returns the minimum jog feedrate via w.GetMinimumJogFeedrate(). Otherwise, returns the minimum jog rate percentage via w.GetMinimumJogRatePercentage().
| JetAbrasiveAxisID | (number) The axis ID of the abrasive axis to query |
| JetAuxModule GetControlZAxisWithM3M5 | ( | ) |
Check if the jet Z axis is controlled by M3/M5 commands.
Reads the JetsControlZAxisWithM3M5 OEM parameter to determine if M3 (jet on) and M5 (jet off) commands should also command Z axis movement to pierce, cut, and retract heights.
| JetAuxModule GetCutHeight | ( | ) |
Get the configured jet cut height from OEM parameters.
Reads the JetsCutHeight OEM parameter string and converts it to a number. If the value is not a valid number (e.g., the parameter is empty or set to a non-numeric string), returns the NILL_VAR sentinel value to indicate that no cut height is configured.
| JetAuxModule GetIntensifierOverSpeedAlarm | ( | intensifierNumber | ) |
Get the over-speed alarm state for the specified intensifier.
| intensifierNumber | (number) The intensifier number to query (1 or 2) |
| JetAuxModule GetIntensifierStallAlarm | ( | intensifierNumber | ) |
Get the stall alarm state for the specified intensifier.
| intensifierNumber | (number) The intensifier number to query (1 or 2) |
| JetAuxModule GetIntensifierStrokesPerMinute | ( | intensifierNumber | ) |
Get the current strokes per minute for the specified intensifier.
| intensifierNumber | (number) The intensifier number to query (1 or 2) |
| JetAuxModule GetIntensifierWaterCooling | ( | ) |
Get the current state of the intensifier water cooling output signal.
Reads the JetIntensifierWaterCoolingOutput OEM signal state if the signal is mapped. Returns false if the signal is not mapped.
| JetAuxModule GetJetHighPressureDelay | ( | ) |
Get the configured high pressure delay for the jet.
Reads the JetHighPressureDelay OEM parameter and returns the value in milliseconds. This delay is used by SetJetsHighPressure() when transitioning from low to high pressure, to allow the system time to reach the commanded high pressure state before proceeding.
| JetAuxModule GetJetPumpCommandedPressure | ( | ) |
Get the operator-commanded pressure for the jet pump.
Reads the commanded pressure value from Mach4 pound variable #9000 via mc.mcCntlGetPoundVar(). This value is set by the operator interface and represents the desired pump pressure in commanded pressure units.
| JetAuxModule GetJetPumpDelay | ( | ) |
Get the configured jet pump motor spin-up delay in milliseconds.
Reads the JetPumpAutoOnDelay OEM parameter and returns the value. This delay is used in _SetJetPump() after the pump motor output is activated, to allow time for the motor to reach operating speed before checking the JetPumpIsOnInput signal or proceeding with pressure ramp-up.
| JetAuxModule GetJetPumpInputPressure | ( | ) |
Get the current jet pump input pressure scaled to commanded pressure units.
Reads the raw analog value from the JetPumpPressureAnalogInput register and scales it from the raw input range (JetPumpPressureInputScaleMin to JetPumpPressureInputScaleMax) to the commanded pressure range (JetPumpPressureMin to JetPumpPressureMax) using w.Scale(). Returns immediately with no value if the analog input is not mapped.
| JetAuxModule GetJetPumpOutputPressure | ( | ) |
Get the current jet pump output pressure scaled to commanded pressure units.
Reads the raw analog value from the JetPumpPressureAnalogOutput register and scales it from the output range (JetPumpPressureOutputScaleMin to JetPumpPressureOutputScaleMax) back to the commanded pressure range (JetPumpPressureMin to JetPumpPressureMax) using w.Scale(). Returns immediately with no value if the analog output is not mapped.
| JetAuxModule GetJetPumpPressureControlDeadband | ( | ) |
Get the deadband value for the jet pump pressure control loop.
Reads the JetPumpPressureControlDeadband OEM parameter and returns the absolute value. Within this deadband, the PI controller does not apply proportional correction or integrate, preventing unnecessary output perturbations when the pressure error is very small.
| JetAuxModule GetJetPumpPressureControlGainKI | ( | ) |
Get the integral gain (KI) for the jet pump pressure control loop.
Reads the JetPumpPressureControlGainKI OEM parameter and returns the absolute value. This raw value is scaled by 0.1 inside UpdateJetPumpOutputPressureControl() before being applied to the PI controller to keep tuning values in a convenient range.
| JetAuxModule GetJetPumpPressureControlGainKP | ( | ) |
Get the proportional gain (KP) for the jet pump pressure control loop.
Reads the JetPumpPressureControlGainKP OEM parameter and returns the absolute value. This raw value is scaled by 0.1 inside UpdateJetPumpOutputPressureControl() before being applied to the PI controller to keep tuning values in a convenient range.
| JetAuxModule GetJetPumpPressureInputScaleMax | ( | ) |
Get the maximum input pressure scaling value for the analog pressure input.
Reads the JetPumpPressureInputScaleMax OEM parameter and returns the absolute value. This value represents the maximum raw analog input value, used to scale the measured analog input signal to commanded pressure units in GetJetPumpInputPressure().
| JetAuxModule GetJetPumpPressureInputScaleMin | ( | ) |
Get the minimum input pressure scaling value for the analog pressure input.
Reads the JetPumpPressureInputScaleMin OEM parameter and returns the absolute value. This value represents the minimum raw analog input value, used to scale the measured analog input signal to commanded pressure units in GetJetPumpInputPressure().
| JetAuxModule GetJetPumpPressureMax | ( | ) |
Get the maximum pressure the operator can command for the jet pump.
Reads the JetPumpPressureMax OEM parameter and returns the value. This value defines the upper bound of the operator-commandable pressure range and is used as the clamping maximum in UpdateJetPumpOutputPressureControl() and as the scaling reference in SetJetPumpOutputPressure() and GetJetPumpOutputPressure().
| JetAuxModule GetJetPumpPressureMin | ( | ) |
Get the minimum pressure the operator can command for the jet pump.
Reads the JetPumpPressureMin OEM parameter and returns the value. This value defines the lower bound of the operator-commandable pressure range and is used as the clamping minimum in UpdateJetPumpOutputPressureControl() and as the scaling reference in SetJetPumpOutputPressure() and GetJetPumpOutputPressure().
| JetAuxModule GetJetPumpPressureOutputScaleMax | ( | ) |
Get the maximum output pressure scaling value for the analog pressure output.
Reads the JetPumpPressureOutputScaleMax OEM parameter and returns the value. This value represents the maximum raw analog output value corresponding to the maximum commanded pressure. Used by SetJetPumpOutputPressure() and GetJetPumpOutputPressure() to scale between commanded pressure units and raw analog output units.
| JetAuxModule GetJetPumpPressureOutputScaleMin | ( | ) |
Get the minimum output pressure scaling value for the analog pressure output.
Reads the JetPumpPressureOutputScaleMin OEM parameter and returns the value. This value represents the minimum raw analog output value corresponding to the minimum commanded pressure. Used by SetJetPumpOutputPressure() and GetJetPumpOutputPressure() to scale between commanded pressure units and raw analog output units.
| JetAuxModule GetJetPumpPressureRampDownTime | ( | ) |
Get the pressure ramp down time in seconds for the jet pump.
Reads the JetPumpPressureRampDownTime OEM parameter and returns the value. This value controls how long it takes to ramp the analog output pressure from maximum down to minimum when the pump is stopping or the commanded pressure is decreasing. Used by UpdateJetPumpOutputPressureControl() to compute the maximum downward rate-of-change per PLC cycle.
| JetAuxModule GetJetPumpPressureRampUpTime | ( | ) |
Get the pressure ramp up time in seconds for the jet pump.
Reads the JetPumpPressureRampUpTime OEM parameter and returns the value. This value controls how long it takes to ramp the analog output pressure from minimum up to maximum when the pump is starting or the commanded pressure is increasing. Used by UpdateJetPumpOutputPressureControl() to compute the maximum upward rate-of-change per PLC cycle.
| JetAuxModule GetJetPumpRampDelay | ( | ) |
Calculate the scaled pressure ramp delay in milliseconds based on commanded pressure.
Computes a ramp delay that is proportional to how close the commanded pressure is to the maximum pressure. The delay is scaled linearly between 0 ms (at minimum pressure) and the full ramp up time in ms (at maximum pressure). This ensures that the pump waits an appropriate amount of time for pressure to ramp up before declaring the pump ready.
If the ramp up time is 0 or the pressure range is degenerate (min == max), returns 0. The commanded pressure is clamped to the [min, max] range before calculation.
| JetAuxModule GetJetPumpStatus | ( | ) |
Get the current jet pump status value.
Reads the JetPumpStatus OEM parameter register via w.eGetOEMParamValue() and returns the raw status value. Compare against the PUMP_STATUS_* constants defined on JetAuxModule to interpret the result.
| JetAuxModule GetJetsAbrasiveDelay | ( | ) |
Get the combined jet abrasive on delay in milliseconds.
Reads both the JetAbrasiveDelay OEM parameter (in milliseconds) and the JetAbrasiveOnDelay OEM parameter (in seconds, converted to milliseconds by multiplying by 1000), then returns their sum. The two parameters exist so operators can control the delay in either milliseconds or seconds depending on configuration.
| JetAuxModule GetJetsAbrasivePurgeDelay | ( | ) |
Get the combined jet abrasive purge delay in milliseconds.
Reads both the JetAbrasivePurgeDelay OEM parameter (in milliseconds) and the JetAbrasiveOffDelay OEM parameter (in seconds, converted to milliseconds by multiplying by 1000), then returns their sum. This combined value gives the total time to wait after turning off abrasive before proceeding.
| JetAuxModule GetJetsOffDelay | ( | ) |
Get the configured jet off delay in milliseconds.
Reads the JetOffDelay OEM parameter and returns the value. This delay is applied after the jet is commanded off to allow residual pressure to dissipate before proceeding.
| JetAuxModule GetJetsPierceDelay | ( | ) |
Get the configured jet pierce delay in milliseconds.
Reads the JetPierceDelay OEM parameter and returns the value multiplied by 1000 to convert from seconds to milliseconds. This value is used by JetsPierceDelay() as the default delay when no override is provided.
| JetAuxModule GetJetsPreOffDelay | ( | ) |
Get the configured jet pre-off delay in milliseconds.
Reads the JetPreOffDelay OEM parameter and returns the value. This delay is applied before the jet is commanded off, typically to allow cutting motion to complete before pressure is removed.
| JetAuxModule GetJetsPressureDelay | ( | ) |
Get the configured jet pressure on delay in milliseconds.
Reads the JetPressureDelay OEM parameter and returns the value. This delay is applied after jet pressure is turned on to allow the system to reach operating pressure before the pierce delay begins.
| JetAuxModule GetJetsSensorTimeout | ( | ) |
Get the configured sensor timeout value for jet sensors.
Reads the JetsSensorTimeout OEM parameter and returns the absolute value. This timeout is used when waiting for jet-related sensor inputs to respond.
| JetAuxModule GetPierceHeight | ( | ) |
Get the configured jet pierce height from OEM parameters.
Reads the JetsPierceHeight OEM parameter string and converts it to a number. If the value is not a valid number (e.g., the parameter is empty or set to a non-numeric string), returns the NILL_VAR sentinel value to indicate that no pierce height is configured.
| JetAuxModule GetRetractHeight | ( | ) |
Get the configured jet retract height from OEM parameters.
Reads the JetsRetractHeight OEM parameter string and converts it to a number. If the value is not a valid number (e.g., the parameter is empty or set to a non-numeric string), returns the NILL_VAR sentinel value to indicate that no retract height is configured.
| JetAuxModule IgnoreZCommandsDuringDryRun | ( | ) |
Check if Z axis commands should be suppressed during dry run mode.
Returns true if both dry run mode is currently active and the JetsDryRunIgnoreZCommands OEM parameter is set to "Yes". Used by movement functions to skip Z axis motion during dry runs.
| JetAuxModule InitializeIntensifier | ( | ) |
Initialize intensifier monitoring and create all intensifier-related GMS alarm conditions.
Performs one-time initialization for the hydraulic intensifier subsystem. This function should be called once during machine startup. It performs the following steps:
GMS entries are only created if the corresponding OEM signal is mapped and the entry does not already exist (checked by title). Alarm conditions use debounce timers read from OEM parameters where applicable. Alarms that require the pump to be running use Register conditions on JetPumpStatus.
| JetAuxModule IsIntensifier1ShiftIOMapped | ( | ) |
Check if all required shift I/O signals for intensifier 1 are mapped.
Verifies that all four required OEM signals for intensifier 1 shift control are mapped: JetIntensifierShiftLeftInput_1, JetIntensifierShiftLeftOutput_1, JetIntensifierShiftRightInput_1, and JetIntensifierShiftRightOutput_1. All four signals must be mapped for this function to return true.
| JetAuxModule IsIntensifier2ShiftIOMapped | ( | ) |
Check if all required shift I/O signals for intensifier 2 are mapped.
Verifies that all four required OEM signals for intensifier 2 shift control are mapped: JetIntensifierShiftLeftInput_2, JetIntensifierShiftLeftOutput_2, JetIntensifierShiftRightInput_2, and JetIntensifierShiftRightOutput_2. All four signals must be mapped for this function to return true.
| JetAuxModule IsJetAbrasiveAxisOn | ( | ) |
Check if any configured abrasive axis is currently jogging.
Iterates through all configured abrasive axes (up to MaxNumberOfAbrasiveAxis). For each axis where JetAbrasiveAxisEnabled_N is "Yes", checks mc.mcJogIsJogging() to determine if the axis is actively jogging. Returns true as soon as any enabled abrasive axis is found to be jogging.
| JetAuxModule IsJetAbrasiveEnabled | ( | StationNumber | ) |
Check if abrasive is enabled for the specified jet station.
Reads the JetsAbrasiveEnabledBits OEM parameter bit corresponding to the given station number (StationNumber - 1) and returns the bit value.
| StationNumber | (number) The jet station number (1-based) to query |
| JetAuxModule IsJetAbrasiveMasterEnableOn | ( | ) |
Check if the global abrasive master enable is currently active.
Reads the JetsAbrasiveMasterEnable OEM parameter and returns true if the value equals 1. This is a global enable that gates all per-station abrasive outputs in SetJetsAbrasive().
| JetAuxModule IsJetIntensifierControlEnabled | ( | ) |
Check if the jet intensifier control subsystem is enabled.
Reads the JetIntensifierControlEnable OEM parameter string (cached) to determine if intensifier control features such as bleed-down valve, boost pump, inlet water valve, and water cooling are active.
| JetAuxModule IsJetPressureEnabled | ( | StationNumber | ) |
Check if pressure is enabled for the specified jet station.
Reads the JetsPressureEnabledBits OEM parameter bit corresponding to the given station number (StationNumber - 1) and returns the bit value.
| StationNumber | (number) The jet station number (1-based) to query |
| JetAuxModule IsJetPumpDelayEnabledAndNeeded | ( | ) |
Check if the jet pump auto-on delay is enabled and currently needed.
Returns true if the JetPumpAutoOn OEM parameter is set to "Yes", the machine is not in dry run mode, and the pump is not already on. Returns false if the pump is already running, if dry run mode is active (pump is not needed during dry runs), or if auto-on is not configured.
| JetAuxModule IsJetPumpMotorOn | ( | ) |
Check if the jet pump motor has been commanded on.
Reads the current JetPumpStatus and returns true if the status indicates the motor is starting or running (PUMP_STATUS_STARTING_MOTOR or higher). This returns true before the motor has reached full speed, unlike IsJetPumpMotorUpToSpeed().
| JetAuxModule IsJetPumpMotorUpToSpeed | ( | ) |
Check if the jet pump motor has reached operating speed.
Reads the current JetPumpStatus and returns true if the status indicates the motor is up to speed or beyond (PUMP_STATUS_MOTOR_UP_TO_SPEED or PUMP_STATUS_PRESSURE_RAMPING_DONE).
| JetAuxModule IsJetPumpOn | ( | ) |
Check if the jet pump is fully on and pressure ramp is complete.
Reads the current JetPumpStatus and returns true only when the status equals PUMP_STATUS_PRESSURE_RAMPING_DONE, indicating the pump has completed its full start sequence including pressure ramp-up.
| JetAuxModule IsJetPumpOutputPressureMapped | ( | ) |
Check if the jet pump analog pressure output signal is mapped.
Reads the JetPumpPressureAnalogOutput OEM parameter string to determine if the analog pressure output has been assigned to a physical I/O signal. Returns false if the value is nil, empty, or '(nothing selected)'.
| JetAuxModule IsJetPumpPressureAnalogInputMapped | ( | ) |
Check if the jet pump analog pressure input signal is mapped.
Reads the JetPumpPressureAnalogInput OEM parameter string to determine if the analog pressure input has been assigned to a physical I/O signal. Returns false if the value is nil, empty, or '(nothing selected)'.
| JetAuxModule IsJetPumpPressureControlClosedLoopEnabled | ( | ) |
Check if closed-loop pressure control is enabled for the jet pump.
Reads the JetPumpPressureControlClosedLoopEnable OEM parameter string (cached) to determine if closed-loop PI pressure control is active. When enabled and the analog input is mapped, the UpdateJetPumpOutputPressureControl() function uses measured input pressure as feedback to drive the analog output pressure to track the ramped setpoint.
| JetAuxModule IsJetPumpPressureControlEnabled | ( | ) |
Check if jet pump pressure control is enabled.
Reads the JetPumpPressureControlEnable OEM parameter string (cached) to determine if the analog pressure output control feature is active. When enabled, the analog output pressure is driven by UpdateJetPumpOutputPressureControl() based on the operator-commanded pressure and optional closed-loop feedback.
| JetAuxModule IsJetPumpStarting | ( | ) |
Check if the jet pump is in any starting state.
Reads the current JetPumpStatus and returns true if the status is PUMP_STATUS_STARTING or higher, indicating the pump start sequence has been initiated but may not be fully complete.
| JetAuxModule IsJetsAbrasiveOn | ( | ) |
Check if any jet abrasive output is currently active.
If the first abrasive axis (JetAbrasiveAxisEnabled_1) is configured as "Yes", delegates to IsJetAbrasiveAxisOn() to determine the abrasive state based on axis jog status. Otherwise, iterates through all jets (up to MaxNumberOfJets) and checks each mapped JetAbrasiveOutput_N signal, returning true as soon as any output is found to be active.
| JetAuxModule IsJetsHighPressureEnabled | ( | ) |
Check if jets high pressure mode is enabled via OEM parameter.
Reads the JetsHighPressureEnabled OEM parameter and returns true if the value equals 1. This is a configuration check only - use IsJetsHighPressureOn() to check if high pressure outputs are currently active.
| JetAuxModule IsJetsHighPressureOn | ( | ) |
Check if any jet high pressure output is currently active.
Iterates through all jets (up to MaxNumberOfJets) and checks each mapped JetHighPressureOutput_N signal. Returns true as soon as any mapped high pressure output is found to be active, otherwise returns false.
| JetAuxModule IsJetsPressureOn | ( | ) |
Check if any jet pressure output is currently active.
Iterates through all jets (up to MaxNumberOfJets) and checks each mapped JetPressureOutput_N signal. Returns true as soon as any mapped pressure output is found to be active, otherwise returns false.
| JetAuxModule IsJetsWigglePiercingEnabled | ( | ) |
Check if wiggle piercing is enabled via OEM parameter.
Reads Mach4 parameter 1910 via w.GetParameterCached() and returns true if the value is 1. This is a configuration check only - use IsJetsWigglePiercingOn() to also check machine state.
| JetAuxModule IsJetsWigglePiercingOn | ( | ) |
Check if wiggle piercing is currently active based on machine state and configuration.
Returns true only if wiggle piercing is both enabled (via IsJetsWigglePiercingEnabled()) AND the machine is currently executing a G-code program (MachState between 99 and 199 inclusive). Wiggle piercing is suppressed when the machine is in MDI state or not running a program.
| JetAuxModule IsZOBEnabled | ( | ) |
Check if the Z axis override button (OB) feature is enabled.
Reads the JetEnableZAxisOverride OEM parameter to determine if the Z axis override button functionality is enabled. When enabled, the operator can use a physical override axis to adjust the jet Z axis position.
| JetAuxModule JetPumpOff | ( | ) |
Turn the jet pump off.
Convenience wrapper that calls JetAuxModule.SetJetPump(false). Includes error recovery: if the pump stop sequence fails, forces outputs off and resets status.
| JetAuxModule JetPumpOn | ( | ) |
Turn the jet pump on.
Convenience wrapper that calls JetAuxModule.SetJetPump(true). Includes error recovery: if the pump start sequence fails, forces outputs off and resets status.
| JetAuxModule JetsAbrasiveDelay | ( | delay_ms | ) |
Wait for the configured jet abrasive on delay, with optional override.
Reads the combined abrasive on delay from GetJetsAbrasiveDelay() unless a numeric override is provided via delay_ms. If the delay is greater than zero, waits using the appropriate method for the current execution context:
| delay_ms | (number|nil) Override abrasive on delay in milliseconds. If nil or non-numeric, uses the combined JetAbrasiveDelay + JetAbrasiveOnDelay OEM parameter values |
| JetAuxModule JetsAbrasivePurgeDelay | ( | ) |
Wait for the configured jet abrasive purge delay after turning abrasive off.
Reads the combined purge delay from GetJetsAbrasivePurgeDelay(). If the delay is greater than zero, waits using the appropriate method for the current execution context:
| JetAuxModule JetsOffDelay | ( | delay_ms | ) |
Wait for the configured jet off delay, with optional override.
Reads the configured off delay from GetJetsOffDelay() unless a numeric override is provided via delay_ms. If the delay is greater than zero, waits using the appropriate method for the current execution context:
| delay_ms | (number|nil) Override off delay in milliseconds. If nil or non-numeric, uses the configured JetOffDelay OEM parameter value |
| JetAuxModule JetsPierceDelay | ( | delay_ms | ) |
Wait for the configured jet pierce delay, with optional override and wiggle pierce support.
If wiggle piercing is active (IsJetsWigglePiercingOn()), delegates entirely to JetsWigglePiercing(). Otherwise, reads the configured pierce delay from GetJetsPierceDelay() unless a numeric override is provided via delay_ms. If the delay is greater than zero, waits using the appropriate method for the current execution context:
| delay_ms | (number|nil) Override pierce delay in milliseconds. If nil or non-numeric, uses the configured JetPierceDelay OEM parameter value (converted to milliseconds) |
| JetAuxModule JetsPreOffDelay | ( | delay_ms | ) |
Wait for the configured jet pre-off delay, with optional override.
Reads the configured pre-off delay from GetJetsPreOffDelay() unless a numeric override is provided via delay_ms. If the delay is greater than zero, waits using the appropriate method for the current execution context:
| delay_ms | (number|nil) Override pre-off delay in milliseconds. If nil or non-numeric, uses the configured JetPreOffDelay OEM parameter value |
| JetAuxModule JetsPressureDelay | ( | delay_ms | ) |
Wait for the configured jet pressure on delay, with optional override.
Reads the configured pressure delay from GetJetsPressureDelay() unless a numeric override is provided via delay_ms. If the delay is greater than zero, waits using the appropriate method for the current execution context:
| delay_ms | (number|nil) Override pressure delay in milliseconds. If nil or non-numeric, uses the configured JetPressureDelay OEM parameter value |
| JetAuxModule JetsWigglePiercing | ( | delay_ms | ) |
Perform wiggle piercing motion instead of a timed pierce delay.
Executes a circular wiggle pierce pattern (G12 CW circles) for the configured number of loops and diameter. If not in wiggle piercing mode, returns immediately. The pierce delay is divided proportionally across the loops. In screen chunk context, builds a multi-line G-code string and executes it via w.MDICommand(). In M-code chunk context, executes each loop individually via mc.mcCntlGcodeExecuteWait() and updates the dwell bar progress.
| delay_ms | (number|nil) Override pierce delay in milliseconds. If nil or non-numeric, uses the configured JetPierceDelay OEM parameter value |
| JetAuxModule JogToPosition | ( | position | ) |
Jog the jet axis to an absolute part position.
Converts the given part position to machine coordinates using w.ConvertPartPositionToMachinePosition(), then uses a Jogger object to perform an absolute jog move and waits for completion.
| position | (number) The target position in part (work) coordinates |
| JetAuxModule MoveToCutHeight | ( | ) |
Move the jet axis to the configured cut height.
Moves the jet axis (Z axis) to the cut height defined by the JetsCutHeight OEM parameter. If Z axis control with M3/M5 is not enabled, or if dry run Z command suppression is active, the function returns immediately without moving. If the axis is already within tolerance of the cut position, no move is commanded.
| JetAuxModule MoveToPierceHeight | ( | ) |
Move the jet axis to the configured pierce height.
Moves the jet axis (Z axis) to the pierce height defined by the JetsPierceHeight OEM parameter. If Z axis control with M3/M5 is not enabled, or if dry run Z command suppression is active, the function returns immediately without moving. If the pierce height is not configured (NILL_VAR), falls back to the cut height. If the axis is already within tolerance of the target position, no move is commanded.
| JetAuxModule MoveToRetractHeight | ( | ) |
Move the jet axis to the configured retract height.
Moves the jet axis (Z axis) to the retract height defined by the JetsRetractHeight OEM parameter. If Z axis control with M3/M5 is not enabled, or if dry run Z command suppression is active, the function returns immediately without moving. If the axis is already within tolerance of the retract position, no move is commanded. After moving, sets the cut sequence state to 'RETRACTED'.
| JetAuxModule SetAbrasiveRate | ( | JetAbrasiveAxisID | , |
| JetAbrasiveAxisRate | ) |
Set the jog feed rate for the specified abrasive axis, clamped to configured limits.
Reads the JetAbrasiveAxisUnits OEM parameter to determine the unit mode. Clamps the requested rate to the min/max range returned by GetAbrasiveMinRate() and GetAbrasiveMaxRate(). If the units are "Mass Per Minute", sets the rate via mc.mcJogSetFeedRate(); otherwise uses mc.mcJogSetRate() to set a percentage-based jog rate.
| JetAbrasiveAxisID | (number) The axis ID of the abrasive axis to control |
| JetAbrasiveAxisRate | (number) The desired abrasive feed rate in the configured units |
| JetAuxModule SetAbrasiveSpeed | ( | abrasiveSpeed | ) |
Set the abrasive feed rate and update the UI and OEM parameter.
Posts a UI update to set the AbrasiveRateDRO(1) value via the file queue, writes the new rate to the JetAbrasiveAxisRate OEM parameter, and calls aux.UpdateJetAbrasiveAxisRate() to apply the rate to all configured abrasive axes immediately.
| abrasiveSpeed | (number) The desired abrasive feed rate in the configured units |
| JetAuxModule SetCutSequence | ( | name | ) |
Set the current cut sequence state identifier.
Intended to track the current phase of the cutting sequence (e.g., 'MOVE_TO_PIERCE_HEIGHT', 'MOVE_TO_CUT_HEIGHT', 'RETRACTED'). Currently a stub with no implementation.
| name | (string) The name of the current cut sequence state |
References name().
| JetAuxModule SetIntensifierBleedDownValve | ( | onoff | ) |
Set the intensifier bleed down valve output signal.
Sets the JetIntensifierBleedDownValveOutput OEM signal to the specified state, but only if the signal is currently mapped. If the signal is not mapped, no action is taken.
| onoff | (boolean) True to close the bleed down valve, false to open it. Defaults to false if nil |
| JetAuxModule SetIntensifierBoostPump | ( | onoff | ) |
Set the intensifier boost pump output signal.
Sets the JetIntensifierBoostPumpOutput OEM signal to the specified state, but only if the signal is currently mapped. If the signal is not mapped, no action is taken.
| onoff | (boolean) True to start the boost pump, false to stop it. Defaults to false if nil |
| JetAuxModule SetIntensifierInletWaterValve | ( | onoff | ) |
Set the intensifier inlet water valve output signal.
Sets the JetIntensifierInletWaterValveOutput OEM signal to the specified state, but only if the signal is currently mapped. If the signal is not mapped, no action is taken.
| onoff | (boolean) True to open the inlet water valve, false to close it. Defaults to false if nil |
| JetAuxModule SetIntensifierShiftLeft | ( | IntensifierNumber | ) |
Command the specified intensifier to shift left.
Sets the left shift output signal high and the right shift output signal low for the specified intensifier. Signal names are formatted as JetIntensifierShiftLeftOutput_N and JetIntensifierShiftRightOutput_N where N is the intensifier number.
| IntensifierNumber | (number) The intensifier to control (1 or 2). Defaults to 1 if nil |
| JetAuxModule SetIntensifierShiftRight | ( | IntensifierNumber | ) |
Command the specified intensifier to shift right.
Sets the right shift output signal high and the left shift output signal low for the specified intensifier. Signal names are formatted as JetIntensifierShiftRightOutput_N and JetIntensifierShiftLeftOutput_N where N is the intensifier number.
| IntensifierNumber | (number) The intensifier to control (1 or 2). Defaults to 1 if nil |
| JetAuxModule SetIntensifierWaterCooling | ( | onoff | ) |
Set the intensifier water cooling output signal.
Sets the JetIntensifierWaterCoolingOutput OEM signal to the specified state, but only if the signal is currently mapped. If the signal is not mapped, no action is taken. Turn-off may be delayed by the JetIntensifierWaterCoolingOffDelay parameter as managed by UpdateIntensifierControl().
| onoff | (boolean) True to enable water cooling, false to disable it. Defaults to false if nil |
| JetAuxModule SetJetAbrasiveAxis | ( | onoff | ) |
Start or stop all configured abrasive axes using velocity jogging.
Reads OEM parameters to determine which abrasive axes are enabled and their configuration. For each enabled abrasive axis (up to MaxNumberOfAbrasiveAxis):
| onoff | (boolean) True to start abrasive axis jogging, false to stop. Defaults to false if nil |
| JetAuxModule SetJetAbrasiveMasterEnable | ( | onoff | ) |
Enable or disable the global abrasive master enable OEM parameter.
Converts the given boolean value to 1 (enabled) or 0 (disabled) and writes it to the JetsAbrasiveMasterEnable OEM parameter via w.SetOEMParamValue(). The master enable is checked by SetJetsAbrasive() before activating any per-station abrasive outputs.
| onoff | (boolean) True to enable the abrasive master enable, false to disable. Defaults to false if nil |
| JetAuxModule SetJetPump | ( | onoff | ) |
Turn the jet pump on or off with error recovery.
Wraps the internal _SetJetPump() function using w.pcall() for protected execution. If _SetJetPump() raises an error during the on or off sequence, this function performs emergency cleanup: deactivates the JetPumpOutput signal if mapped, sends a momentary off pulse to JetPumpMomentaryOffOutput if mapped and turning off, resets the pump status to PUMP_STATUS_OFF, and then re-raises the error via w.Error().
| onoff | (boolean) True to turn the pump on, false to turn it off |
| JetAuxModule SetJetPumpAutoOn | ( | ) |
Automatically turn on the jet pump when a program starts if configured to do so.
Reads the JetPumpAutoOn OEM parameter. If set to "Yes" and the machine is not in IDLE state (i.e., a program is running), turns on the jet pump via JetPumpOn() if the pump is not already on. Dry run mode is handled by IsJetPumpDelayEnabledAndNeeded() which prevents the pump from auto-starting during dry runs.
| JetAuxModule SetJetPumpOffOnEndOfProgram | ( | ) |
Turn off the jet pump at the end of the G-code program if configured to do so.
Reads the JetPumpOffOnEndOfProgram OEM parameter. If set to "Yes", first turns off high pressure via SetJetsHighPressure(false), then turns off the jet pump via JetPumpOff(). This function is intended to be called from the end-of-program M-code or hook.
| JetAuxModule SetJetPumpOutputPressure | ( | pressure | ) |
Set the jet pump analog output pressure scaled from commanded pressure units.
Scales the commanded pressure value from the commanded pressure range (JetPumpPressureMin to JetPumpPressureMax) to the output range (JetPumpPressureOutputScaleMin to JetPumpPressureOutputScaleMax) using w.Scale(), then writes the result to the JetPumpPressureAnalogOutput OEM register. Returns immediately if the analog output is not mapped.
| pressure | (number) The desired pressure in commanded pressure units to set on the analog output |
| JetAuxModule SetJetPumpStatus | ( | status | ) |
Set the jet pump status register to the specified status code.
Writes the given status value to the JetPumpStatus OEM parameter register via w.eSetOEMParamValue(). Use the PUMP_STATUS_* constants defined on JetAuxModule for valid values. This function is called internally by _SetJetPump() at each step of the pump start/stop sequence.
| status | (number) The pump status code to set. Use PUMP_STATUS_* constants (OFF, STARTING, INLET_WATER_ON, STARTING_MOTOR, MOTOR_UP_TO_SPEED, PRESSURE_RAMPING_DONE) |
| JetAuxModule SetJetsAbrasive | ( | onoff | ) |
Turn abrasive on or off for all configured jet stations.
Controls the abrasive output signals for all jets (up to MaxNumberOfJets) based on per-station pressure and abrasive enable configuration, and the global abrasive master enable. For each mapped JetAbrasiveOutput_N signal:
| onoff | (boolean) True to turn abrasive on, false to turn it off. Defaults to false if nil |
| JetAuxModule SetJetsAbrasiveDelay | ( | delay | ) |
Set the jet abrasive on delay by writing to the OEM register.
Writes the given delay value directly to the JetAbrasiveDelay OEM register via w.SetOEMRegValue(). The value is stored in milliseconds. Use GetJetsAbrasiveDelay() to read the combined delay back (it also includes the JetAbrasiveOnDelay parameter in seconds).
| delay | (number) The abrasive on delay in milliseconds to store |
| JetAuxModule SetJetsHighPressure | ( | onoff | ) |
Turn high pressure on or off for all configured jet stations.
Controls the high pressure output signals for all jets (up to MaxNumberOfJets) based on per-station pressure enable configuration and the global high pressure enable setting. For each mapped JetHighPressureOutput_N signal:
| onoff | (boolean) True to turn high pressure on, false to turn it off. Defaults to false if nil |
| JetAuxModule SetJetsPierceDelay | ( | delay | ) |
Set the jet pierce delay in seconds by writing to the OEM register.
Converts the given delay from milliseconds to seconds (by dividing by 1000) and writes the result to the JetPierceDelay OEM register via w.SetOEMRegValue(). Use GetJetsPierceDelay() to read the value back (it returns milliseconds).
| delay | (number) The pierce delay in milliseconds to store |
| JetAuxModule SetJetsPressure | ( | onoff | ) |
Turn pressure on or off for all configured jet stations.
Controls the pressure output signals for all jets (up to MaxNumberOfJets) based on per-station pressure enable configuration. For each mapped JetPressureOutput_N signal:
| onoff | (boolean) True to turn pressure on, false to turn it off. Defaults to false if nil |
| JetAuxModule SetJetsPressureDelay | ( | delay | ) |
Set the jet pressure on delay by writing to the OEM register.
Writes the given delay value directly to the JetPressureDelay OEM register via w.SetOEMRegValue(). The value is stored in milliseconds. Use GetJetsPressureDelay() to read the value back.
| delay | (number) The pressure on delay in milliseconds to store |
| JetAuxModule SetJetsWigglePiercing | ( | onoff | ) |
Enable or disable wiggle piercing by setting the OEM parameter.
Sets Mach4 parameter 1910 to 1 (enabled) or 0 (disabled) via w.SetParameter().
| onoff | (boolean) True to enable wiggle piercing, false to disable |
| JetAuxModule SetPressure | ( | inst | , |
| pressure | ) |
Set the operator-commanded pressure for the jet pump via pound variable.
Writes the specified pressure value to Mach4 pound variable #9000 using mc.mcCntlSetPoundVar(). This pound variable is read by GetJetPumpCommandedPressure() and used as the control setpoint in UpdateJetPumpOutputPressureControl().
| inst | (number) The Mach4 instance handle. If not provided, uses current instance |
| pressure | (number) The desired commanded pressure value in pressure units |
| JetAuxModule ToggleJetsWigglePiercing | ( | ) |
Toggle the wiggle piercing enable state.
Reads the current wiggle piercing state via IsJetsWigglePiercingEnabled() and calls SetJetsWigglePiercing() with the opposite value to toggle the enabled state.
| JetAuxModule UpdateIntensifierControl | ( | ) |
Update intensifier control and water cooling logic from the PLC loop.
Intended to be called continuously from the PLC loop (every 10-15ms). Manages two subsystems:
State is maintained in JetAuxModule._WaterCoolingState and JetAuxModule._IntensifierState.
| JetAuxModule UpdateJetAbrasiveAxisRate | ( | JetAbrasiveAxisRate | , |
| ... ) |
Update the jog feed rate for all enabled abrasive axes.
If JetAbrasiveAxisRate is nil, reads the current rate from the JetAbrasiveAxisRate OEM parameter. Then iterates through all configured abrasive axes (up to MaxNumberOfAbrasiveAxis) and calls SetAbrasiveRate() for each axis where JetAbrasiveAxisEnabled_N is "Yes", applying the rate to its configured axis ID.
| JetAbrasiveAxisRate | (number|nil) The abrasive feed rate to apply. If nil, reads from OEM parameter |
| ... | (any) Additional arguments (currently unused, reserved for future use) |
| JetAuxModule UpdateJetPumpOutputPressureControl | ( | ) |
Update the jet pump analog pressure output using ramp control and optional closed-loop PI control.
Intended to be called continuously from the PLC loop (every 10-15ms). Manages two modes:
When the analog output is not mapped, all control state is cleared and the function returns immediately. When closed-loop is disabled or the motor is not ready, PI state is reset and open-loop ramp output is commanded directly.
Internal state is maintained in JetAuxModule._JetPumpPressureControlState.
| JetAuxModule UpdateSingleIntensifier | ( | intensifierNumber | ) |
Update control logic for a single hydraulic intensifier based on shift input signals.
Intended to be called continuously from the PLC loop. Implements edge-detection on the shift left and shift right input signals to automatically alternate the intensifier direction output. Also tracks stroke timing to calculate strokes per minute using a dynamic sliding window, and raises Global Message System (GMS) alarms when over-speed or stall thresholds are exceeded.
Alarm thresholds are read from OEM parameters JetIntensifierStrokeOverSpeedAlarm_N and JetIntensifierStrokeStallAlarm_N (where N is the intensifier number). Alarms are only triggered once per event and reset automatically when the condition clears.
State is maintained in JetAuxModule._IntensifierState[intensifierNumber].
| intensifierNumber | (number) The intensifier to update (1 or 2) |
| JetAuxModule WaitForIntensifierInletWaterPressure | ( | ) |
Wait for the intensifier inlet water pressure signal to become active.
Blocks execution until the inlet water pressure is confirmed good. If the JetIntensifierInletWaterPressureLowAlarmInput signal is mapped, waits for it to go high within the timeout specified by the JetIntensifierInletWaterPressureWaitOnInputTimeout OEM parameter (converted from seconds to milliseconds). If the signal does not activate within the timeout, creates a Global Message System (GMS) alarm and raises an error. If the signal is not mapped, falls back to a fixed time delay specified by the JetIntensifierInletWaterPressureDelay OEM parameter.