|
Mach Modules Documentation
Lua Module API Documentation
|
Go to the source code of this file.
Functions | |
| GrinderCenterlessMCodeModule | GetRegulatingWheelSpeed () |
| Get the current regulating wheel speed from Mach4 pound variable #516. | |
| GrinderCenterlessMCodeModule | SetRegulatingWheelSpeed (CmdSpeed,...) |
| Set the regulating wheel speed by scaling the commanded RPM to the analog output range. | |
| GrinderCenterlessMCodeModule GetRegulatingWheelSpeed | ( | ) |
Get the current regulating wheel speed from Mach4 pound variable #516.
Reads the regulating wheel speed stored in pound variable #516 using mc.mcCntlGetPoundVar(). This value represents the commanded RPM for the regulating wheel spindle.
| GrinderCenterlessMCodeModule SetRegulatingWheelSpeed | ( | CmdSpeed | , |
| ... ) |
Set the regulating wheel speed by scaling the commanded RPM to the analog output range.
If CmdSpeed is provided, it writes that value to pound variable #516 and uses it as the target speed. If CmdSpeed is nil, the current value of pound variable #516 is read and used instead. The speed is clamped to the RegulatingWheelMaxRPM OEM parameter before scaling. The scaled value is then written to the RegulatingWheelRPM OEM parameter register using a 0-2047 analog range.
| CmdSpeed | (number|nil) The desired regulating wheel speed in RPM. If nil, reads the current speed from pound variable #516 |
| ... | (any) Additional arguments (unused, reserved for future use) |