|
Mach Modules Documentation
Lua Module API Documentation
|
Go to the source code of this file.
Functions | |
| GrinderSurfaceScreenV01 | MachineScreenLoadScript () |
| Screen load callback that initializes job file and electromagnetic meter averaging. | |
| GrinderSurfaceScreenV01 | MachineScreenStartupScript () |
| Screen startup callback executed after the screen has been loaded and is ready. | |
| GrinderSurfaceScreenV01 | MachineScreenUnloadScript () |
| Screen unload callback to save job file changes before the screen exits. | |
| GrinderSurfaceScreenV01 | UpdateAxisDROs () |
| Update axis DRO display controls with current axis positions. | |
| GrinderSurfaceScreenV01 | MachineScreenPLCScript () |
| PLC script callback executed on every Mach4 PLC cycle for this screen. | |
| GrinderSurfaceScreenV01 | MachineScreenLowPriorityLoop () |
| Low-priority periodic loop to update job file name display controls. | |
| GrinderSurfaceScreenV01 | UpdateGrindTableControls () |
| Update all grind table UI controls with current machine state and sensor values. | |
| GrinderSurfaceScreenV01 | TeachPoundVar (PoundVar, AxisID) |
| Teach a pound variable by capturing the current axis position. | |
| GrinderSurfaceScreenV01 | IsMDIModeActive () |
| Determine whether MDI mode is currently active on the screen. | |
| GrinderSurfaceScreenV01 | EndOfProgramParkBtn () |
| Toggle the End Of Program Park mode on or off via pound variable #548. | |
| GrinderSurfaceScreenV01 | EnableBSideGrindBtn () |
| Toggle the Enable B Side Grind mode on or off via pound variable #555. | |
| GrinderSurfaceScreenV01 | GrindDepthStartFollowBtn () |
| Toggle the Grind Depth Start Follow mode on or off via pound variable #549. | |
| GrinderSurfaceScreenV01 | LoadJob () |
| Load the most recently used job file from the Mach4 profile. | |
| GrinderSurfaceScreenV01 | JobOpen () |
| Open a job file selected by the operator. | |
| GrinderSurfaceScreenV01 | JobClose () |
| Close the current job file, prompting to save changes if needed. | |
| GrinderSurfaceScreenV01 | JobSave () |
| Save the current job file to its existing path. | |
| GrinderSurfaceScreenV01 | JobSaveAs () |
| Save the current job file under a new name chosen by the operator. | |
| GrinderSurfaceScreenV01 EnableBSideGrindBtn | ( | ) |
Toggle the Enable B Side Grind mode on or off via pound variable #555.
Reads the current value of pound variable #555. If it is 0, sets it to 1 (enabled); if it is non-zero, sets it to 0 (disabled). Returns an error if reading or writing the pound variable fails.
| GrinderSurfaceScreenV01 EndOfProgramParkBtn | ( | ) |
Toggle the End Of Program Park mode on or off via pound variable #548.
Reads the current value of pound variable #548. If it is 0, sets it to 1 (enabled); if it is non-zero, sets it to 0 (disabled). Returns an error if reading or writing the pound variable fails.
| GrinderSurfaceScreenV01 GrindDepthStartFollowBtn | ( | ) |
Toggle the Grind Depth Start Follow mode on or off via pound variable #549.
Reads the current value of pound variable #549. If it is 0, sets it to 1 (enabled); if it is non-zero, sets it to 0 (disabled). Returns an error if reading or writing the pound variable fails.
| GrinderSurfaceScreenV01 IsMDIModeActive | ( | ) |
Determine whether MDI mode is currently active on the screen.
Checks the "Left" property of the "MDIGroup" screen object. If the value is "105", MDI mode is considered active.
| GrinderSurfaceScreenV01 JobClose | ( | ) |
Close the current job file, prompting to save changes if needed.
Screen entry point that wraps GrinderSurfaceScreenV01._JobClose() using w.pcall() for protected execution. Optionally saves unsaved changes before closing, then clears the last job name from the Mach4 profile. If the operation fails, the error is reported via w.AlarmMessage().
| GrinderSurfaceScreenV01 JobOpen | ( | ) |
Open a job file selected by the operator.
Screen entry point that wraps GrinderSurfaceScreenV01._JobOpen() using w.pcall() for protected execution. Optionally saves changes to the current job before opening a new one, then updates the last job name in the Mach4 profile. If the operation fails, the error is reported via w.AlarmMessage(). Operator action is logged via w.OperatorLog().
| GrinderSurfaceScreenV01 JobSave | ( | ) |
Save the current job file to its existing path.
Screen entry point that wraps GrinderSurfaceScreenV01._JobSave() using w.pcall() for protected execution. If the save operation fails, the error is reported via w.AlarmMessage(). Logs the operator action before saving.
| GrinderSurfaceScreenV01 JobSaveAs | ( | ) |
Save the current job file under a new name chosen by the operator.
Screen entry point that wraps GrinderSurfaceScreenV01._JobSaveAs() using w.pcall() for protected execution. If the save-as operation fails, the error is reported via w.AlarmMessage(). On success, the last job name profile entry is updated with the new file path.
| GrinderSurfaceScreenV01 LoadJob | ( | ) |
Load the most recently used job file from the Mach4 profile.
Screen entry point that wraps GrinderSurfaceScreenV01._LoadJob() using w.pcall() for protected execution. Retrieves the last job file path from the Mach4 profile string "LastJobName" and loads it if one exists. If the operation fails, the error is reported via w.AlarmMessage().
| GrinderSurfaceScreenV01 MachineScreenLoadScript | ( | ) |
Screen load callback that initializes job file and electromagnetic meter averaging.
Called by Mach4 when this screen is first loaded. Performs two initialization tasks:
| GrinderSurfaceScreenV01 MachineScreenLowPriorityLoop | ( | ) |
Low-priority periodic loop to update job file name display controls.
Called on a low-priority timer cycle. If a job file is currently loaded, updates the "JobFileNameText" and "JobFilePathText" screen labels with the current job file name and full file path respectively.
| GrinderSurfaceScreenV01 MachineScreenPLCScript | ( | ) |
PLC script callback executed on every Mach4 PLC cycle for this screen.
Called repeatedly by the Mach4 PLC loop while this screen is active. Delegates all control update logic to GrinderSurfaceScreenV01.UpdateGrindTableControls().
| GrinderSurfaceScreenV01 MachineScreenStartupScript | ( | ) |
Screen startup callback executed after the screen has been loaded and is ready.
| GrinderSurfaceScreenV01 MachineScreenUnloadScript | ( | ) |
Screen unload callback to save job file changes before the screen exits.
Called by Mach4 when this screen is being unloaded. If a current job file is loaded, calls OptSaveChanges() to prompt the operator to save any unsaved changes before the screen closes.
| GrinderSurfaceScreenV01 TeachPoundVar | ( | PoundVar | , |
| AxisID | ) |
Teach a pound variable by capturing the current axis position.
Reads the current position of the specified axis using mc.mcAxisGetPos() and writes that position into the specified Mach4 pound variable using mc.mcCntlSetPoundVar(). Returns an error if either the position read or the pound variable write fails.
| PoundVar | (number) The pound variable number to set with the current axis position |
| AxisID | (number) The axis identifier (e.g., mc.X_AXIS) whose position is to be captured |
| GrinderSurfaceScreenV01 UpdateAxisDROs | ( | ) |
Update axis DRO display controls with current axis positions.
| GrinderSurfaceScreenV01 UpdateGrindTableControls | ( | ) |
Update all grind table UI controls with current machine state and sensor values.
Performs the following updates on every PLC cycle: