|
Mach Modules Documentation
Lua Module API Documentation
|
Go to the source code of this file.
Functions | |
| JetGUIModule | MachineCycleStop () |
| Handle cycle stop by disabling the jet abrasive axis and clearing feedhold state flags. | |
| JetGUIModule | MachineCycleStopFinal () |
| Handle cycle stop finalization by disabling the jet abrasive axis and clearing state flags. | |
| JetGUIModule | MachineFeedHoldFinal () |
| Handle feedhold finalization by turning off jets if the feature is enabled. | |
| JetGUIModule | MachineCycleStartFinal () |
| Handle cycle start resumption after feedhold, re-enabling jets with pierce delay sequence. | |
| JetGUIModule | FileResumeBtn () |
| Handle the file resume button press by displaying a warning that file resume is disabled. | |
| JetGUIModule | LowPriorityLoop () |
| Periodic low-priority loop executed during the screen update cycle. | |
| JetGUIModule | StartUpScript () |
| Execute startup initialization tasks for the Jet GUI module. | |
| JetGUIModule | IsTurnOffJetsDuringFeedholdEnabled () |
| Check whether the turn-off-jets-during-feedhold feature is enabled in OEM parameters. | |
| JetGUIModule | ClearJetsTurnedOffDuringFeedholdFlag () |
| Clear the jets-turned-off-during-feedhold flag by setting it to false. | |
| JetGUIModule | SetJetsTurnedOffDuringFeedholdFlag () |
| Set the jets-turned-off-during-feedhold flag to true. | |
| JetGUIModule | IsJetsTurnedOffDuringFeedholdFlag () |
| Return the current value of the jets-turned-off-during-feedhold flag. | |
| JetGUIModule | ClearJetDelaysActiveFlag () |
| Clear the jet delays active flag by setting it to false. | |
| JetGUIModule | SetJetDelaysActiveFlag () |
| Set the jet delays active flag to true. | |
| JetGUIModule | IsJetDelaysActiveFlag () |
| Return the current value of the jet delays active flag. | |
| JetGUIModule | SpindleSafetyCheck () |
| Verify that the machine is in a safe state before allowing the jets to be started. | |
| JetGUIModule | SpindleFWDBtn (use_confirmation) |
| Button handler that logs the jets-on press event and delegates to m.SpindleFWD(). | |
| JetGUIModule | SpindleFWD (use_confirmation) |
| Start the waterjet (spindle) in the forward direction by executing the M3 script. | |
| JetGUIModule | SpindleStopBtn () |
| Button handler that logs the jets stop press event and delegates to SpindleStop(). | |
| JetGUIModule | SpindleStop () |
| Stop the waterjet (spindle) by executing the M5 script or cancelling an active delay. | |
| JetGUIModule | IsDryRunOn () |
| Check whether dry run mode is currently active for the selected instance. | |
| JetGUIModule | SetDryRun (on_off) |
| Enable or disable dry run mode for the selected Mach4 instance. | |
| JetGUIModule | DryRunToggleBtn () |
| Button handler that logs the dry run press event and delegates to m.DryRunToggle(). | |
| JetGUIModule | DryRunToggle () |
| Toggle dry run mode on or off for the selected instance. | |
| JetGUIModule | StartDryRun () |
| Configure machine state and disable jets when entering dry run mode. | |
| JetGUIModule | StopDryRun () |
| Restore machine state and re-enable jets after exiting dry run mode. | |
| JetGUIModule ClearJetDelaysActiveFlag | ( | ) |
Clear the jet delays active flag by setting it to false.
Resets the module-level JetDelaysActiveFlag so that feedhold and cycle start handlers no longer treat a delay sequence as in progress. Should be called after all jet delay sequences (pressure, abrasive, pierce) have completed.
| JetGUIModule ClearJetsTurnedOffDuringFeedholdFlag | ( | ) |
Clear the jets-turned-off-during-feedhold flag by setting it to false.
Resets the module-level JetsTurnedOffDuringFeedhold flag so that subsequent cycle start handling does not attempt to re-enable jets that were not turned off during feedhold.
| JetGUIModule DryRunToggle | ( | ) |
Toggle dry run mode on or off for the selected instance.
Verifies that the machine is not in manual mode before toggling. Reads the current dry run state via m.IsDryRunOn() and passes the inverse to m.SetDryRun() to toggle it. Returns an error if the machine is in manual mode or if the mode check fails.
| JetGUIModule DryRunToggleBtn | ( | ) |
Button handler that logs the dry run press event and delegates to m.DryRunToggle().
Writes an operator log entry for the dry run button press, then calls m.DryRunToggle() to perform the actual toggle logic. The return value of m.DryRunToggle() is passed through to the caller.
| JetGUIModule FileResumeBtn | ( | ) |
Handle the file resume button press by displaying a warning that file resume is disabled.
Logs the button press to the operator log and displays a warning message informing the operator that file resume is not supported on jet machines. No resume action is performed.
| JetGUIModule IsDryRunOn | ( | ) |
Check whether dry run mode is currently active for the selected instance.
Reads the 'DryRun' OEM parameter string for the currently selected instance and returns true if its value equals "Yes".
| JetGUIModule IsJetDelaysActiveFlag | ( | ) |
Return the current value of the jet delays active flag.
| JetGUIModule IsJetsTurnedOffDuringFeedholdFlag | ( | ) |
Return the current value of the jets-turned-off-during-feedhold flag.
| JetGUIModule IsTurnOffJetsDuringFeedholdEnabled | ( | ) |
Check whether the turn-off-jets-during-feedhold feature is enabled in OEM parameters.
Reads the 'JetsTurnOffJetsDuringFeedhold' OEM parameter string and returns true if its value equals "Yes".
| JetGUIModule LowPriorityLoop | ( | ) |
Periodic low-priority loop executed during the screen update cycle.
Called repeatedly at low priority during normal machine operation. Updates the tool offset DRO background colors to reflect whether a tool length offset is currently active.
| JetGUIModule MachineCycleStartFinal | ( | ) |
Handle cycle start resumption after feedhold, re-enabling jets with pierce delay sequence.
Called as the final step of a cycle start event. If the turn-off-jets-during-feedhold feature is enabled, checks whether jets were turned off during a prior feedhold and whether the machine is transitioning into a run state (MC_STATE_FRUN or higher) without dry run active. If all conditions are met, resets the cycle-start pressed flag to prevent premature cancellation, then executes the full jet re-enable sequence: sets pressure on, waits for the pressure delay, enables abrasive, waits for the abrasive delay, and finally waits for the pierce delay. A dwell progress bar is displayed if the total delay exceeds 100ms. Clears the feedhold flag on completion.
| JetGUIModule MachineCycleStop | ( | ) |
Handle cycle stop by disabling the jet abrasive axis and clearing feedhold state flags.
Called when a cycle stop is issued. Clears the jets-turned-off-during-feedhold flag via ClearJetsTurnedOffDuringFeedholdFlag() and disables the jet abrasive axis output via aux.SetJetAbrasiveAxis(false).
| JetGUIModule MachineCycleStopFinal | ( | ) |
Handle cycle stop finalization by disabling the jet abrasive axis and clearing state flags.
Called as the final step when a cycle stop is issued. Clears the jets-turned-off-during-feedhold flag and disables the jet abrasive axis output via aux.SetJetAbrasiveAxis(false). If the spindle (jets) is currently on, also disables abrasive (with purge delay) and pressure.
| JetGUIModule MachineFeedHoldFinal | ( | ) |
Handle feedhold finalization by turning off jets if the feature is enabled.
Called as the final step when the machine enters feedhold. If the turn-off-jets-during-feedhold feature is enabled and the spindle (jets) is currently running, sets the feedhold flag via SetJetsTurnedOffDuringFeedholdFlag(), then disables abrasive (with purge delay) and pressure in sequence.
| JetGUIModule SetDryRun | ( | on_off | ) |
Enable or disable dry run mode for the selected Mach4 instance.
Checks that the machine is not in manual mode before applying the change. If on_off is true, sets the 'DryRun' OEM parameter to "Yes" and calls m.StartDryRun() via w.Protected(). If on_off is false, sets the parameter to "No" and calls m.StopDryRun() via w.Protected(). Returns an error if the manual mode check fails or if the machine is currently in manual mode.
| on_off | (boolean) True to enable dry run mode, false to disable it |
| JetGUIModule SetJetDelaysActiveFlag | ( | ) |
Set the jet delays active flag to true.
Marks that a jet delay sequence (pressure, abrasive, or pierce delay) is currently in progress. This flag is checked by MachineFeedHoldFinal() and MachineCycleStartFinal() to prevent conflicting jet state changes while delays are executing.
| JetGUIModule SetJetsTurnedOffDuringFeedholdFlag | ( | ) |
Set the jets-turned-off-during-feedhold flag to true.
Marks that the jets were turned off as a result of entering feedhold, so that MachineCycleStartFinal() can re-enable them with the proper pierce delay sequence on resume.
| JetGUIModule SpindleFWD | ( | use_confirmation | ) |
Start the waterjet (spindle) in the forward direction by executing the M3 script.
Updates stop status, then performs a safety check via m.SpindleSafetyCheck(). Runs all registered 'SpindleFWD' hooks; returns early if a hook cancels the operation. Checks the MSTLock register and skips the command if the lock is active. Verifies that no spindle delay is already running (SpindleDelayActive). If use_confirmation is true, displays a cycle-start confirmation dialog before proceeding. When the machine is enabled, executes the m3.mcs private script to start the jets. Displays a warning if the machine is not enabled.
| use_confirmation | (boolean) If true, prompts the operator to confirm via cycle start dialog before starting the jets |
| JetGUIModule SpindleFWDBtn | ( | use_confirmation | ) |
Button handler that logs the jets-on press event and delegates to m.SpindleFWD().
Writes an operator log entry for the jets-on button press, then calls m.SpindleFWD() passing the use_confirmation flag through to control whether a confirmation dialog is shown before starting the jets.
| use_confirmation | (boolean) If true, a cycle-start confirmation dialog is shown before starting the jets |
| JetGUIModule SpindleSafetyCheck | ( | ) |
Verify that the machine is in a safe state before allowing the jets to be started.
Retrieves the current GMS alarm and GMS warning states. If either is active, displays a warning dialog instructing the operator to clear alarms and warnings by pressing Reset, and returns a failure status. If both states are clear, returns success.
| JetGUIModule SpindleStop | ( | ) |
Stop the waterjet (spindle) by executing the M5 script or cancelling an active delay.
Updates stop status, then runs all registered 'SpindleStop' hooks. If any hook cancels the operation, returns early. Checks the MSTLock register and skips the stop command if the lock is active. Cancels any active spindle warm-up sequence by writing -1 to the 'SpindleWarmUpActive' register. If a spindle delay is currently active (SpindleDelayActive == 1), disables the jet abrasive axis and sets spindle direction to MC_SPINDLE_OFF directly. Otherwise, executes the m5.mcs private script to perform the full stop sequence.
| JetGUIModule SpindleStopBtn | ( | ) |
Button handler that logs the jets stop press event and delegates to SpindleStop().
Writes an operator log entry for the jets stop button press, then calls JetGUIModule.SpindleStop() to perform the actual stop sequence.
| JetGUIModule StartDryRun | ( | ) |
Configure machine state and disable jets when entering dry run mode.
Reads the configured dry run feedrate override from the 'JetsDryRunFeedrateOverride' OEM parameter, capping it at the profile's maximum FRO if necessary. Stores the current FRO value into 'JetsDryRunPreFeedrateOverride' so it can be restored later by StopDryRun(). Sets the active FRO to the dry run value, then disables both jets pressure and abrasive outputs.
| JetGUIModule StartUpScript | ( | ) |
Execute startup initialization tasks for the Jet GUI module.
Called once during screen load. Adds tool path colors to the tool table via m.AddToolPathColorsToToolTable() to ensure the tool path display is correctly configured at startup.
| JetGUIModule StopDryRun | ( | ) |
Restore machine state and re-enable jets after exiting dry run mode.
Restores the feedrate override (FRO) to the value stored before dry run was activated. If the spindle (jets) is currently on and the 'JetsDryRunPauseForPierceDelay' OEM parameter is set to "Yes", the FRO is temporarily set to 0 and the full pierce delay sequence is executed (pressure delay, abrasive delay, pierce delay) before restoring the FRO. A dwell progress bar is displayed if the total delay exceeds 100ms. If the pause option is not enabled, jets pressure and abrasive are simply re-enabled without delay.