Please see my next message for more information. The forum requires at least one posted message to be able to post a message with an url link.
Thanks!
Tomi
Please see my next message for more information. The forum requires at least one posted message to be able to post a message with an url link.
Thanks!
Tomi
Hi
I'm a total beginner with cnc and Mach3. I bought a second hand plug and
play system a few weeks back and it has worked very well for me.
Unfortunately the computer running the system broke and I have now had to
install Mach3 to another computer and set up my router again. I believe
I've got it almost done, but now I've run into an issue with the Auto Tool
Zero feature of the Mach Blue by Big Tex Screen Set. I got used to this
Screen Set and would like to continue using it.
The auto tool zero works ok, but immediately after zeroing the z-axles
moves down by 50 to 80 mm. I have tried to find a reason to this in the
script running the aut tool zero but I'm afraid I'm lacking skills in
programming languages.
Please see this video that demonstrates what the router does:
Problems with Auto Tool Zero.mp4 - YouTube
And here is the script that controls the Auto Tool Zero function:
Rem VBScript To probe In the z axis
If GetOemLED(801) Then 'check if English Units
If GetOemLED(16)<>0 Then 'Checks for machine coordinates
code "(Please change to working coordinates)"
Else
If GetOemLed (825) <> 0 Then 'check to see if the probe is
already grounded or faulty
Code "(Z-Plate is grounded, check connection and try again)" 'this
goes in the status bar if aplicable
Else
Code "G4 P1" 'pause 1 seconds to give time to position
probe plate
PlateOffset = GetUserDRO(1151) 'get plate offset DRO
CurrentFeed = GetOemDRO(818) 'get the current feedrate to
return to later
Code "F10" 'slow down feedrate to 10 ipm
Rem Probe In the z direction
ZNew = GetDro(2) - 6 'probe move to current z - 6
inches
Code "G31Z" &ZNew
While IsMoving() 'wait for probe move to finish
Wend
ZNew = GetVar(2002) 'read the touch point
Code "G0 Z" &ZNew +.1 'move back +.1 to hit point
incase there was overshoot +.1
While IsMoving ()
Wend
Rem End add lines
Code "F2" 'slow down feedrate to 2 ipm
ZNew = GetDro(2) - .25 'probe move to current z - .25 inches
Code "G31Z" &ZNew
While IsMoving() 'wait for probe move to finish
Wend
ZNew = GetVar(2002) 'read the touch point
Code "G0 Z" &ZNew 'move back to hit point incase there was
overshoot
While IsMoving ()
Wend
If PlateOffset <> 0 Then
Call SetDro (2, PlateOffset) 'set the Z axis DRO to plate
thickness
Code "G4 P0.25" 'pause for Dro to update.
'ZNew = PlateOffset + 3.6315 'calc retract
'Code "G0 Z" &ZNew 'put the Z retract height you want
here
Code("G53G0Z-0.5") 'Z retract
While IsMoving ()
Wend
Code "(Z axis is now zeroed in English Units)" 'puts this
message in the status bar
End If
Code "F" &CurrentFeed 'returns to prior feed rate
End If
End If
Else 'This portion of script
is for Metric Native Units
If GetOemLed (825) <> 0 Then 'check to see if the probe is
already grounded or faulty
Code "(Z-Plate is grounded, check connection and try again)" 'this
goes in the status bar if aplicable
Else
Code "G4 P1" 'pause 1 seconds to give time to position
probe plate
PlateOffset = GetUserDRO(1151) 'get plate offset DRO
CurrentFeed = GetOemDRO(818) 'get the current feedrate to
return to later
Code "F300" 'slow down feedrate to 300 mmpm
Rem Probe In the z direction
ZNew = GetDro(2) - 150 'probe move to current z - 150 mm
Code "G31Z" &ZNew
While IsMoving() 'wait for probe move to finish
Wend
ZNew = GetVar(2002) 'read the touch point
Code "G0 Z" &ZNew + 3 'move back + 3 mm to hit point
incase there was overshoot + 3 mm
While IsMoving ()
Wend
Rem End add lines
Code "F50" 'slow down feedrate to 50 mmpm
ZNew = GetDro(2) - 6 'probe move to current z - 6 mm
Code "G31Z" &ZNew
While IsMoving() 'wait for probe move to finish
Wend
ZNew = GetVar(2002) 'read the touch point
Code "G0 Z" &ZNew 'move back to hit point incase there was
overshoot
While IsMoving ()
Wend
If PlateOffset <> 0 Then
Call SetDro (2, PlateOffset) 'set the Z axis DRO to plate
thickness
Code "G4 P0.25" 'pause for Dro to update.
'ZNew = PlateOffset + 0.25 'calc retract
Code("G53G0Z-12")
'Code "G0 Z" &ZNew - 2 'put the Z retract height you
want here
While IsMoving ()
Wend
Code "(Z axis is now zeroed in Metric units)" 'puts this
message in the status bar
End If
Code "F" &CurrentFeed 'returns to prior feed rate
Code "F200"
Sleep 100
End If
End If
Does anyone find a reason for the Z axle movement? Or could the reason be
in another setting in Mach3?
Ideally, I would want the Auto Tool Zero function only to slowly move down
to the probing plate once and then retract and have the Z zeroed. Would
anyone be able to write a code for this?
Thanks!
Tomi Ylkanen, Finland
You may be having an issue with this line in the script
Code("G53G0Z-0.5") 'Z retract
er, this line given your metric
Code("G53G0Z-12") 'Z retract
if your machine z0 is set too low it will move into the table. I had this issue since I have no z home switch so I just make sure I set it high enough that it isnt a problem.
Hope this helps
John
Thank you, John.
I have my z0 set as high as possible, as high up as the z axle will move. If I understand the code correct, it should make the z move 12mm. But now it moves 50mm, that is 2".
In another thread, i found this code which does everything I want in terms of motion.
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO
If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P5" ' this delay gives me time to get from computer to hold probe in place
Code "G31Z-40 F500" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z25.4" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If
The only issue with this code is that it doesn't seem to take the input on probing plate thickness from the screen interface. I also don't know how to edit it into the code. I tried a few things, but got error messages.
It would be nice to be able to alter the thickness of the plate through the Screen set interface. Does anyone know what to add into the code to make this possible?
If not, just the proper way to insert a fixed plate thickness into the code will do. My probing plate is 0.2mm thick.
Thanks!
Tomi
I'm sorry, John. I got it working now. There was really no issue with the shorter code, only my own bad logic. It works fine with the GetUserDRO as well. GetOemDRO does work, too.
But the original code that came with the Big Tex Screen didn't work for me. I probably don't know enough to edit the code properly.
set z home above work hight I have same problem some times if z work hight is higher then z machine hight
http://danielscnc.webs.com/
being disabled is not a hindrance it gives you attitude
[SIGPIC][/SIGPIC]