|
Mach Modules Documentation
Lua Module API Documentation
|
Go to the source code of this file.
Functions | |
| GrinderODIDAuxModule | InitializeGapOutputs () |
| Initialize gap control output signals and add them to the output ignore lists. | |
| GrinderODIDAuxModule | IsGapControlEnabled () |
| Check whether the gap control feature is enabled. | |
| GrinderODIDAuxModule | SetGapControlModeGrind (skip_wait) |
| Switch the gap control system to grind mode. | |
| GrinderODIDAuxModule | IsGapControlModeGrind () |
| Check whether the gap control system is currently in grind mode. | |
| GrinderODIDAuxModule | SetGapControlModeDress () |
| Switch the gap control system to dress mode. | |
| GrinderODIDAuxModule | IsGapControlModeDress () |
| Check whether the gap control system is currently in dress mode. | |
| GrinderODIDAuxModule | IsActiveFlagEnabled (flagidx) |
| Check whether the active flag feature is enabled for the specified flag index. | |
| GrinderODIDAuxModule | FlagInitialize () |
| Initialize active flag slides by restoring their extend outputs to match current state. | |
| GrinderODIDAuxModule FlagInitialize | ( | ) |
Initialize active flag slides by restoring their extend outputs to match current state.
Iterates over flag indices 0 through 3. For each enabled flag (per IsActiveFlagEnabled()), if the slide is currently extended (per IsActiveFlagSlideExtended()), the corresponding "ActiveFlagSlideExtendOutput_{i}" signal is set to true to restore the output state. This ensures that output signals are consistent with the physical slide positions after a restart or re-initialization.
| GrinderODIDAuxModule InitializeGapOutputs | ( | ) |
Initialize gap control output signals and add them to the output ignore lists.
Registers the "GapControlM1Output" and "GapControlM2Output" OEM parameter signals to be ignored during disable, stop, and emergency stop events by adding them to the IgnoreOutputsOnDisable, IgnoreOutputsOnStop, and IgnoreOutputsOnEmergencyStop ignore lists. This prevents the gap control outputs from being cleared when the machine stops or is disabled.
| GrinderODIDAuxModule IsActiveFlagEnabled | ( | flagidx | ) |
Check whether the active flag feature is enabled for the specified flag index.
| flagidx | (number|nil) The index of the active flag to check (0-3). Defaults to 0 if nil |
| GrinderODIDAuxModule IsGapControlEnabled | ( | ) |
Check whether the gap control feature is enabled.
Reads the OEM parameter "GapControlEnabled" and returns true if its value is "Yes". Raises an error via w.Error() if the parameter cannot be read.
| GrinderODIDAuxModule IsGapControlModeDress | ( | ) |
Check whether the gap control system is currently in dress mode.
Reads the "GapControlM2Input" OEM parameter signal to determine if the gap controller has confirmed dress mode. If gap control is not enabled, returns false immediately. If the signal is not mapped, returns false.
| GrinderODIDAuxModule IsGapControlModeGrind | ( | ) |
Check whether the gap control system is currently in grind mode.
Reads the "GapControlM1Input" OEM parameter signal to determine if the gap controller has confirmed grind mode. If gap control is not enabled, returns false immediately. If the signal is not mapped, returns false.
| GrinderODIDAuxModule SetGapControlModeDress | ( | ) |
Switch the gap control system to dress mode.
If gap control is not enabled or the system is already in dress mode, the function returns immediately. Otherwise, it drives the mode change by:
| GrinderODIDAuxModule SetGapControlModeGrind | ( | skip_wait | ) |
Switch the gap control system to grind mode.
If gap control is not enabled or the system is already in grind mode, the function returns immediately. Otherwise, it drives the mode change by:
| skip_wait | (boolean|nil) If true, waits for the M1 input confirmation signal instead of a fixed delay. Defaults to false |