Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Davek0974 on April 18, 2016, 05:24:42 AM

Title: Z Acceleration
Post by: Davek0974 on April 18, 2016, 05:24:42 AM
Does G28.1 use z acceleration value or not?

I still have an annoying issue with my Z stalling when doing G28.1 but its fine at all other times.
Title: Re: Z Acceleration
Post by: RICH on April 18, 2016, 06:51:01 AM
See the Mach Manual section 10.7.11.

RICH
Title: Re: Z Acceleration
Post by: Davek0974 on April 18, 2016, 07:36:19 AM
Thanks, but i have my Z limited to 2500mm/min which it seems to handle easily unless doing a G28.1, surely the G28.1 command obeys the limits of the axis??

So if my last feed rate was 5000 the z would still only go to 2500 when doing G28.1??

If not then it would explain the odd stalling - the machine X/Y can move faster than the Z can take but if it DOES obey the speed limit then I am back to being confused.
Title: Re: Z Acceleration
Post by: RICH on April 18, 2016, 06:06:02 PM
Don't uses home switches here as I have found no need for them.  :o

That said, I assumed that axis velocity for G28.1 would be limited by the slowest axis, BUT, as defined
in the manual the G28.1 "move at current federate, as defined by Configuration".
I ASSuME that configuration means the value in motor tuning.

I guess someone with switches will need to reply about the G281.1.
You may want to say what Mach version your using.

RICH



Title: Re: Z Acceleration
Post by: Tweakie.CNC on April 19, 2016, 02:07:57 AM
One test you could perhaps do is temporarily half your Z axis Velocity and Acceleration in Motor Tuning then see if the same issue persists ?

Tweakie.
Title: Re: Z Acceleration
Post by: Davek0974 on April 19, 2016, 02:15:43 AM
RICH, not sure where the home switches come into it? Yes its a bit vague but I would like to think nothing could override the settings in motor tuning or they would be pointless.

I am running V067 as its the one thats recommended for CandCNC THC I have.

Tweakie, thats a good point, might try that next run, I suppose I don't even have to cut - just turn the values down and run G28.1 a few times and see if the speed changes of stays at the current F value.
Title: Re: Z Acceleration
Post by: Hood on April 19, 2016, 04:44:04 AM
RICH, not sure where the home switches come into it?

G28.1 as far as I understand is to reference your machine, ie it will move to the Home switch/switches and back off just as in a normal homing operation. It is not something I use, never had the need but just tested here and it does exactly as supposed to do as far as I can see.

Hood
Title: Re: Z Acceleration
Post by: Davek0974 on April 19, 2016, 05:33:11 AM
Its used in my top-of-material sensing macro and uses the Probe input on the BOB/Mach3

Most of the time it works fine but sometimes the Z will screech during the rapid portion of the down-feed and not move until it thinks it has reached the slow portion where it will start moving at the slow rate until it reaches the material - it still works ok but takes longer and sounds crap.

This is not all the time, so that was what pointed me to it using the current feed rate and not the Z speed limit in motor tuning - my z is limited to 2500 and the machine X/Y is 9000 so the current feed rate can be anywhere, sometimes inside the z limit sometimes outside it.

There is a reason for this behaviour and its not that the z is set too fast or too much acceleration, it only does this on the rapid portion of the G28.1 cycle.
Title: Re: Z Acceleration
Post by: Hood on April 19, 2016, 05:46:31 AM
Ok well not sure what it actually means by the "current feedrate" as mine seems to be a  rapid for the initial move and then the % of rapid set in Homing and Limits for the final move to the home switches.

What is the command you are using? is it only a Z move you are doing for the G28.1?

Hood
Title: Re: Z Acceleration
Post by: Hood on April 19, 2016, 05:53:18 AM
Oh and also meant to say if I move the X and Y as far as possible from the intermediate point and the Z only a small distance then they all seem get there at the same time (quite hard to be 100% certain with 20m rapids and fast accel) which suggest the normal behaviour of blending vel and accel is being adhered to.
Hood
Title: Re: Z Acceleration
Post by: Davek0974 on April 19, 2016, 05:59:13 AM
The code i have is G28.1 Z10 and seems to work "most of the time" :)

It does slow down to the value set in homing/limits so that is being read ok, its just the odd rapid bit thats baffling
Title: Re: Z Acceleration
Post by: RICH on April 19, 2016, 06:00:02 AM
Use version 062 here and haven't found any problems with it yet.
As Hood replied the G28.1 is used to reference your machine, axes rapids to them and then there is a % slow down per configuration.
Didn't mention that your using that command in a macro to probe to the material surface. G31 is used to probe. Probing works fine in V062 and use it to touch off my lathe tools.

Post your macro.

RICH

Title: Re: Z Acceleration
Post by: Davek0974 on April 19, 2016, 06:19:45 AM
Hmm, ok so what changes do i need to make to my probing routing to switch to G31

I'm fairly certain this is my latest macro..

Code "G91" (switch to incremental mode)
Code "G00 X22.00" (position probe switch)
Code "G90" (switch to absolute mode)

ActivateSignal(OutPut3) (triggers the probe cylinder)
Sleep(400)

Code "G28.1 Z10.000" (probe the surface)
Code "G92 Z#15045" (apply the probe switch offset from settings screen DRO)

DeActivateSignal(OutPut3) (raise the probe)
Sleep(200)

Code "G91" (switch to incremental mode)
Code "G00 X-22.00" (put the axes back to where we came from)
Code "G90" (switch to absolute mode)
Code "G00 Z0.00" (Go to Z Zero)

Title: Re: Z Acceleration
Post by: Davek0974 on April 19, 2016, 06:40:42 AM
Also, on a plasma, isn't referencing the axis the correct procedure anyway as all the measurements are relative to the TOM?

Title: Re: Z Acceleration
Post by: Hood on April 19, 2016, 07:29:30 AM
I dont think there is a right way or a wrong way, all depends what you are hapy with I would suspect.
You are using the reference move then offsetting from the machine zero position, doing a probing routine would do similar I would think.
I am hoping to do it external to Mach by using my servo drive to home via current limit, means I wont need a floating holder or a switch set up similar to yours.

What the problem seems to be with you is the axis is stalling on occasion, why I am not sure as the G28.1 seems to adhere to motor tuning Vel and Accel for me, although as previously said it is hard to be sure as my accel and velocity are quite high.

Away to weld some alu on a boat but if I get a chance later I will set my Z Accel extremely low and see if the G28.1 follows it.

Hood
Title: Re: Z Acceleration
Post by: Davek0974 on April 19, 2016, 07:47:36 AM
It does seem odd, I have the homing subroutine/macro as a test file on the desktop so i can run it as a program over and over, it works ok, but then I have never set a high F rate and tried it, hopefully have a play tonight, there must be a root cause for this.
Title: Re: Z Acceleration
Post by: RICH on April 19, 2016, 07:57:56 AM
Don't have a plasma machine but my friend does and uses Mach to control it. His machine works great. He uses LC to create the code. I really should update the LC Manual to reflect using
the Plasma module. Just for info......


I would suggest you put a feed rate in your macro, the F should be a reliable value  
for the Z axis. So just add:

Code "Fxx" where xx is the value after the first Code "G90" line.
To test if the set feed rate is accepted / used just try a slow feed rate and see what happens.

May just work and no need to fool around with G31.

Now I am somewhat rusty on the G92 command, BUT, be carefull  as it affects the coordinate values and should not be used with other offsets and never use with G52 ( which replaced G92). Just something off topic to keep in mind.

RICH      
Title: Re: Z Acceleration
Post by: Davek0974 on April 19, 2016, 08:16:03 AM
Thanks, i'll have a quick play tonight and also try throwing an F in there.

The subroutine and macro perform perfectly but I have read stuff on the G92 etc, but as it all does exactly what i want it to I will leave it as-is.

I am hoping it is just as simple as the G28.1 using the machine feed-rate and ignoring the z limit, as that really would explain why it works sometimes and not others, if it really does use the z limit all the time then i am back to square one!

I have tried tweaking micro-step values, also fitted a coarser lead screw but made no difference.
Title: Re: Z Acceleration
Post by: Hood on April 19, 2016, 01:25:53 PM
Ok just finished so went to the Chiron and set the Accel in motor tuning to 100mm/s/s and then did a g28.1. The rapid move at the start adhered to the very slow accel and so to did the second part of the move.

I am still wondering about the description in the manual saying about using current feedrate as mine certainly doesn't, I even tried calling a feedrate prior to the G28.1 and also tried with a feedrate on the G28.1 line and both used rapids.

So it does look like it adheres to the values set in motor tuning so something else must be the issue with your setup, either that or possibly calling a G28.1 from a macro does things differently on occasion.

Hood
Title: Re: Z Acceleration
Post by: Davek0974 on April 19, 2016, 01:53:40 PM
Thanks Hood, that backs up my tests, same results - it uses the rapids and not the feed rate.

I have also been advised my setting is too high - currently 2500mm/min and 2400mm/s/s on Z axis.

I got there by just whacking it up until it failed then dropped 30% and tried again then 30% and so-on. There is very little mass in the Z and it seemed happy when using manual G00 commands and jogging etc so i left it - the THC and piercing love it ;)

I will wind it back a notch and see how she goes, maybe I'm just pushing too hard and one in ten times it says "no way buddy"...


Title: Re: Z Acceleration
Post by: Hood on April 19, 2016, 05:11:18 PM
Does seem a bit steep for a stepper, even with it being a light axis.
Hood
Title: Re: Z Acceleration
Post by: RICH on April 19, 2016, 05:58:25 PM
Do you have a floating head for your  plasma?
I talked to a friend and he said the G28.1 was nothing  but a PITA to him and he is using V062.
His head floats so before each new cut, the torch is touched off using a G31 which takes care of variations of where the top of the plate and sets
the proper height before turning it on, depending on defined  material thickness being cut. Hopefully he will send me the M3 macro that he is using.

You can tweak it to suite your machine. 
Plasma dumb but till then.......

RICH
Title: Re: Z Acceleration
Post by: Davek0974 on April 20, 2016, 02:20:29 AM
Ok, i'll wind the acceleration back a bit.

This is how i do my TOM before each pierce...

G91 (switch to incremental mode)
G01 X24.00 Y2.00 F6000 (position probe switch)
G90 (switch to absolute mode)
M1050 (trigger the probe cylinder)
G04 P0.3
G28.1 Z5.000 (probe the surface)
G92 Z#15045 (apply the probe switch offset from settings screen DRO)
M1051 (raise the probe)
G91 (switch to incremental mode)
G01 X-24.00 Y-2.00 F6000 (put the axes back to where we came from)
G90 (switch to absolute mode)
M99
%

It runs as a subroutine. I have a separate probe switch on a little pneumatic cylinder, works well and has practically zero downforce which is great on thin stuff.
Title: Re: Z Acceleration
Post by: RICH on April 20, 2016, 08:29:13 AM
As said, I don't know much about the details of plasma. You can thank "Dan" for
the macro.
 
This macro probes the TOM using G31 to set torch height. Used with a floating head such that
a switch mounted on the Z provides an input to Mach post probing. Consider creating a
user DRO on the screen for inputing a torch height based on material thickness and use that
value for the Z offset value in this macro as that provides for cleaner cuts.

Code generated by LC provides an M3 before / after each cut. Since the plate TOM may not be
flat due to mounting, the plate itself , or warping the macro takes care of that problem. Your offset of
the torch ( piece height ) will be based on your experience of cutting different material and
thickness. You will need to adjust the macro depending on machine setup and generated code.

Call SetOEMDRO(802, 0) 'Set Z DRO = 0.00
Code "G31 Z-8.0 F60" 'probe surface and z needs to be > actual TOM lcoation so it touches off
While IsMoving()
Wend
Code "G4 P.5" 'wait
ZprobePos = GetVar(2002) 'get Z contact point
Code "G0 Z" &ZprobePos 'return to point to remove overshoot See note below
While IsMoving()
Wend
Call SetOEMDRO(802, 0) 'Set Z DRO = 0.00 This is TOM
While IsMoving()
Wend
Code "G4 P.5" 'wait
Code "G0 Z.480 F30" 'remove floating head travel Adjust for your travel
While IsMoving()
Wend
Code "G4 P.0" 'wait
Call SetOEMDRO(802,.100) 'Set Z DRO = 0.00 See comment on pierce heght above for Z offset value
While IsMoving()
Wend
ActivateSignal(Output2) ' Modify for your inputs and outputs Fires torch

NOTE: One can calculate touch off overtravel. There are different thoughts about feedrate and
how best to do it,but,for my lathe tool touch off the axis rapids close to material and then a
slow feedrate is used for the touch off ( touch off is repeatable to around 0.0002"). So it's
like a single axis move and no adjustment is needed.Don't think that the overtravel distance
will have that great of an infuence on the pierce height, but, depends on yout switch
characteristics and feedraqte used. You calculate to see what the timimg influence is. I just
mention this  since maybe there is no need for the overshoot adjustment in the macro.

RICH