Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Scott on December 30, 2006, 06:40:34 PM

Title: Version R2.0.030 and Z plate problem
Post by: Scott on December 30, 2006, 06:40:34 PM
I have a  Z-zeroing routine that touches off a plate.  With version R2.0.030, when the plate is touched and the Z is supposed to retract to a set height of 2" it goes to approx. 3.5".  If run a second time, it retracts even further.  I can't seem to find what may have changed in the latest version that may be causing this, but it seems to have something to do with G31 probing in any axis.  I reverted back to version R2.0.029 and it works fine.  I have a custom screen set with some added DRO's for this zeroing routine, but I don't see anything that should conflict with it.

Here's the script for the Z-zero routine.
 

CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'You could put your z-plate thickness here instead
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
Call SetOemDro (802, 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

Regards,
Title: Re: Version R2.0.030 and Z plate problem
Post by: GaryB on December 30, 2006, 07:40:40 PM
Had the same problem except my hits the touch off plate and stays there.
Also had to revert back to 2.0.029
Another thing I noticed was when starting a file with a Cylcle Start it would dwell at the M3 S*********xx command, normally would cylcle right on through.
gary
Title: Re: Version R2.0.030 and Z plate problem
Post by: Scott on December 30, 2006, 07:54:43 PM
Thanks Gary,

At least I know I'm not losing it. ;)  Couldn't figure out why I was cuttin' air when I had just zeroed it.  I tried to zeroed it again and I was set to cut even more air!  :D
Title: Re: Version R2.0.030 and Z plate problem
Post by: Brian Barker on December 30, 2006, 07:57:10 PM
Could you please test this and tell me if it helps?

CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'You could put your z-plate thickness here instead
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
Call SetOemDro (802, PlateThickness)
Code "G4 P0.5" 'Pause for Dro to update.
While IsMoving()
Wend
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
Title: Re: Version R2.0.030 and Z plate problem
Post by: GaryB on December 30, 2006, 08:24:32 PM
Thanks Brian will look at my coding later have just shut down for the night 4hrs into an 7hr cut so testing will have to wait for me at least until I get through this job.

Have another quirk, I noticed this a couple of releases back that when I shut down and do a fixture save on start up the Z axis DRO is way off. Tested again tonight shut down with a safe height setting .6250 restarted and Z-axis  DRO was reading -2.*********x

gary
Title: Re: Version R2.0.030 and Z plate problem
Post by: Brian Barker on December 30, 2006, 10:37:20 PM
I have sent this thread to Art so he will know about it :)  You may need to put encoders on your system after I get this plugin done for Ron. You set the following error and if there is a problem it will estop the machine. When you restart (From the Estop) the machine it sets the axis to the encoder position ;) 

But we need to get you fixed first...
Title: Re: Version R2.0.030 and Z plate problem
Post by: Scott on December 30, 2006, 11:42:35 PM
Hi Brian,

I tried it with the added "While IsMoving Wend" and the results are the same.  Here's what I have found, but I'm not sure what's going on though.  If I manually zero the Z axis (paper drag under bit and zero the Z DRO), then G0 Z2 and run the macro, the Z axis retracts to approximately 3.6875" while the DRO reads 2.0".  This is a difference of 1.6875". 

My zero plate thickness is set at 0.3040" (more on this later), add that to 1.6875" and you get 1.9915" pretty close to the 2" retraction that is set in the macro. 

Now to really make things strange, the actual caliper measured thickness of my plate is 0.3125", but I've always had to fool Mach by telling it that it was 0.3040" in order for it to zero correctly.  1.6875" + 0.3125" is 2.0". 

For some reason the G31 is taking the distance that it has moved to get to the plate and adding it onto the set retract height.  If I were to run it twice without changing the Z position, it would go to 5.375" and read 2.0 on the DRO.

Again, this all works fine previous to R2.0.030 with the exception of the odd plate thickness setting needed.

 ???

Thanks,
Title: Re: Version R2.0.030 and Z plate problem
Post by: Brian Barker on December 31, 2006, 09:05:24 AM
Your problem is not the same... you are getting the pos from the Z axis DRO and that is not right. You need to get the position from the Var 2002 because this is telling you where the probe hit. Check out the Wiki, I put some info about this in the Wiki...

Your code should look more like this:
 
CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'You could put your z-plate thickness here instead
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"
While IsMoving()
Wend
ProbePosition = GetVar(2002)
Code "G0 Z" & ProbePosition
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

That should help you...
Title: Re: Version R2.0.030 and Z plate problem
Post by: GaryB on December 31, 2006, 01:01:59 PM
Brian, my script for the touch off plate for a comparison......... and its back to cutting
Gary.

SwitchTravel = GetUserDRO(1151) 
ProbeFeed = GetUserDRO(1152) 
code "G01 G90  F" & ProbeFeed
 code" G31z-4 F" & ProbeFeed 
 While IsMoving()
 wend
 code "G92Z"& (SwitchTravel)
 While IsMoving()
 Wend
 code "G4 P2"
 code "G1Z1"
Title: Re: Version R2.0.030 and Z plate problem
Post by: Brian Barker on December 31, 2006, 01:25:11 PM
There is a new rev 30 out on the web that should fix the problem. Art did a bit of cleaning to the Is moving and had one line of code in the wrong place.

I will redo the code that you have and post a better one for you :)

Later
Brian
Title: Re: Version R2.0.030 and Z plate problem
Post by: GaryB on December 31, 2006, 05:25:38 PM
thanks Brian and of course Art.
will update with the revision. Sent you a photo of  todays finish cut, also hope to have some video to send showing how bad it is without jerk control
Gary
Title: Re: Version R2.0.030 and Z plate problem
Post by: Brian Barker on December 31, 2006, 11:05:08 PM
You could do a test with the jerk on that file :) You will need to set your max accel so high that it will just about not jog :) Or you have to jog at a slower speed. Jim did this and said that it was cutting 3d better then ever. We are working on nurbs  to blend the moves to keep the velocity up but that is only at the point that we are thinking about it ;)
Title: Re: Version R2.0.030 and Z plate problem
Post by: Scott on January 01, 2007, 05:07:08 PM
Thanks Brian,

The ProbeVar and the revised revision works much better.  Thanks for the probe var tip, I've looked through the wiki from one end to the other, but missed that.  I had to do a search to dig it out.  Guess I just wasn't looking hard or long enough to find it.   ;)

I knew that the problem of the variance with my plate thickness was a slight overrun of the Z axis (you could feel it), but didn't know of a better way to do it than to adjust my plate thickness and keep the feedrate the same each time.

I'm thinking that many of the Ascension/ShopBot conversions are running a Z-zero routine similar to Gary's or mine and it would be a good idea for anyone that is to revise their macro.  I changed mine from the one that Gary is using because I didn't like the G92 offsetting and changing my work coodinates each time I zeroed and since I use a variation of the same file with a touch off for X & Y fixture location, the G92 really messed things up.  The variance between plate thickness and the position was a problem then too.

Happy New year all!

 
Title: Re: Version R2.0.030 and Z plate problem
Post by: Brian Barker on January 02, 2007, 10:55:32 PM
So you telling me that we need to com up with a better macro :)
Title: Re: Version R2.0.030 and Z plate problem
Post by: Scott on January 03, 2007, 12:40:27 AM
?? Umm....no.  It works fine now.  If anything, it still sets it a little tight, but I can deal with that. 

The first release of Mach3 R2.0.030 really messed with though!  ;)