Hello Guest it is March 29, 2024, 03:26:41 AM

Author Topic: Manual Tool Change with Probe: How to check if position is correct?  (Read 944 times)

0 Members and 1 Guest are viewing this topic.

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!!
Re: Manual Tool Change with Probe: How to check if position is correct?
« Reply #1 on: January 21, 2020, 09:36:12 AM »
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??

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Manual Tool Change with Probe: How to check if position is correct?
« Reply #2 on: February 02, 2020, 05:53:24 PM »
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