Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: hancock on January 21, 2020, 08:43:39 AM
-
Hello fellow Mach4ers,
I recently switched from Mach3 to Mach4 and try build my Mach3 functions now in LUA.
1. I'm building a script to probe a reference height tool and write the G31 probe value to a dro.
2. Next, I'm probing the actual tool during the Gcode and write probe height from the first step the Z-DRO.
My questions:
- How can I check if the Z axis is at a specific G53 position? Whats the handle (like " if selectedtool")?
- What would be the correct way to write/read/transfer the variables and DRO values?
Thanks a lot!!
-
My current script runs "mc.mcCntlGCodeExecuteWait(inst, "G90 G53 X...")" without problems but when the line for the probe comes up "mc.mcCntlGCodeExecuteWait(inst, "G91 G31 Z-20 F20")" I get the error
---"Capping Z minimum to 0.0000 based on parameter 1801"
I check my SoftLimits but that's all good...when I run the code in the MDI it works...
Any ideas??
-
This is because you have an older parameter.ini file with a newer build of Mach.
With Mach closed, edit your parameters.ini file (in the profile's driectory) and set parameter 1801 to NIL. This should fix the Capping Z minimum.
Steve