Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: mjindustry on March 01, 2016, 04:40:11 PM

Title: Any help on Z-Zero routine script?
Post by: mjindustry on March 01, 2016, 04:40:11 PM
Hi there, bee nusing mach3 for a bout a year and at one time had a script working for zeroing my Z by clicking Auto Tool Zero and then G-Code.  Somehow that script got wiped out, and I can't remember how to set it up again.

I've also recently changed to metric units in Mach.

Here is a pic of the screen:
Title: Re: Any help on Z-Zero routine script?
Post by: mjindustry on March 01, 2016, 04:42:56 PM
keep getting the message "cannot probe with zero feed rate"  Block = G31Z-5 F0
Title: Re: Any help on Z-Zero routine script?
Post by: ger21 on March 01, 2016, 05:04:51 PM
F0 = 0 feedrate
Title: Re: Any help on Z-Zero routine script?
Post by: mjindustry on March 01, 2016, 05:06:55 PM
F0 = 0 feedrate

Thank you, how do I correct that?  I try entering different feed rates on Alt-1 screen and it keeps going back to zero.
Title: Re: Any help on Z-Zero routine script?
Post by: ger21 on March 01, 2016, 05:54:40 PM
Are you hitting the Enter key?
What Screenset are you using?
Title: Re: Any help on Z-Zero routine script?
Post by: mjindustry on March 01, 2016, 05:55:38 PM
Here is what I have, the "10" is suppose to represent 10mm.

Code: [Select]
CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) '10
ProbeFeed = GetUserDRO(1152) 'You could put a probing feedrate here instead.


Code "G90 F" &ProbeFeed

If GetOemLed (825)=0 Then
Code "G4 P5" 'Time to get to the z-plate
Code "G31Z-5 F" &ProbeFeed
While IsMoving()
Wend
Code "G4 P0.25"
ZProbePos = GetVar(2002)
Code "G0 Z" &ZProbePos
While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Code "G4 P0.5" 'Pause for Dro to update.
Code "G0 Z2.0" 'Change the Z retract height here
Code "(Z axis is now zeroed)"
Code "F" &CurrentFeed
Else
Code "(Z-Plate is grounded, check connection and try again)"
Exit Sub
End If


 Sorry for being a kook!

Help me get this going and you will have a friend for life!  What? Pretty lame pickup line?
Title: Re: Any help on Z-Zero routine script?
Post by: mjindustry on March 01, 2016, 06:00:03 PM
Yea, I can get a Feed Rate entered. Then, as soon as I click "Auto Tool Zero" it zeros out the Feed Rate.


Screenset is bone stock. 
Title: Re: Any help on Z-Zero routine script?
Post by: mjindustry on March 01, 2016, 06:37:29 PM
Maybe screenset 2010 will fix my problem.
Title: Re: Any help on Z-Zero routine script?
Post by: ger21 on March 01, 2016, 06:55:50 PM
The Stock Screen doesn't have a Probe Feedrate DRO???

Change this:
ProbeFeed = GetUserDRO(1152) 'You could put a probing feedrate here instead.
To this:

ProbeFeed = 10
Title: Re: Any help on Z-Zero routine script?
Post by: Hood on March 01, 2016, 06:59:16 PM
Your code has this line in it

ProbeFeed = GetUserDRO(1152) 'You could put a probing feedrate here instead.

That will be what sets your feedrate, if you do not have a DRO for probe feedrate then you have two choices, you can create a User DRO with the OEM code 1152 or you can enter a value directly into the VB itself.
For the latter if you replaced the GetUserDRO(1152) with a value you wish the feedrate to be then it should work.
Example if you changed that line to

ProbeFeed = 10

then it should probe at 10 units per minute.

Hood

Edit, see Ger beat me to it :D
Title: Re: Any help on Z-Zero routine script?
Post by: mjindustry on March 01, 2016, 10:38:53 PM
Okay so now I'm on screenset 2010 .. earlier today I learned how to manually enter a coordinate and go to that on the MIDI tab in Mach3.  How do I do that function in screenset 2010 now, I do not see the midi tab?

Title: Re: Any help on Z-Zero routine script?
Post by: mjindustry on March 01, 2016, 10:56:26 PM
Think I found out where the MDI is.


Another issue, a bit ago I was doing the simple zero Z routine and it was jumping back off the touch plate by like 10mm, now for some reason it is sticking right to the touch plate.  Any ideas?  Is
 this set under "clearance plane" ?
Title: Re: Any help on Z-Zero routine script?
Post by: ger21 on March 02, 2016, 12:02:55 AM
It could be, if the clearance plane is set to zero.
Title: Re: Any help on Z-Zero routine script?
Post by: mjindustry on March 02, 2016, 12:11:33 AM
Yea that's just it, I had it at like 10 units. I have never in my life got such consistently different results from b trying slightly different ideas.. and alot of times trying the same thing over and over.

In the bay area (Hayward) , are you good at mach3? Hit me up to make some money tomorrow.. March 2nd. Message me.
Title: Re: Any help on Z-Zero routine script?
Post by: ger21 on March 02, 2016, 07:06:09 AM
Something is definitely wrong with your setup if it doesn't work with a value of 10, but it does with a value of 20.
What version of Mach3 are you using?
Parallel port or motion controller? If a motion controller, which one?

I'm in Detroit, 3 hours behind you.