Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Millone on February 13, 2018, 08:25:53 AM

Title: Z speed limiting xy speed
Post by: Millone on February 13, 2018, 08:25:53 AM
Hi there,

I am using the Z pulses to drive a laser TTL trough a micro. So I really do not mind about how fast the Z speed is because there is no motor connected to it and I need it fast..
I have set x and y at 15000mm/min  (that's my max speed on these axis) and Z at 50000 mm/min. When I run the gcode with a feed rate of 1800 mm/min I expect z to be so fast that should not slow down xy.
I do not know why but z is slowing xy and it is running at merely 500-800 mm/min.
The situation does not change if I increase the feedrate. Mach3 is running at 75 kHz so this shlould not be the issue either. The Z acceleration is also very high (10000) so neither this is the issue.

I have tried different gcodess produced with different cam software but still, despite the settings, Z is slowing down XY which I can hear stepping all the time. I have set constant speed but the machine sounds like the gcode is running in exact stop.
I have attached the gcode I am using for the above test. As you will see the Z movement are from 0 to -1 mm so at the speet I have set the Z, I am not expecting xy to slow dons or to step..

Is there a setting to detach Z speed from xy? Any hint?

Thanks for helping,
Felice


Title: Re: Z speed limiting xy speed
Post by: joeaverage on February 13, 2018, 12:06:12 PM
Hi,
the X,Y and Z axes are coordinated and cant be detached from one another.

You could use the spindle, the spindle is an out-of-band axis. You can use step/dir pulses for a servo type spindle, you only need the step signal.
Also allows you to separately adjust the pulserate without affecting coordinated moves of the other axes.

Craig
Title: Re: Z speed limiting xy speed
Post by: Millone on February 13, 2018, 01:16:59 PM
Hi Craig,
thanks for your answer. I suspected that. I did try using the S vaules but was even worst. The machine was stepping all the time waiting for the S value to change.
I tought that using Z should have been much faster.
What I do not understand at present is why Z is so slow despite the very high performance I mentioned in my original post above.
Do you think is a problem generated by the gcode?
Title: Re: Z speed limiting xy speed
Post by: joeaverage on February 13, 2018, 06:44:32 PM
Hi,
if I understand what you're trying to do is use the Z axis step pulses in some sort of frequency to voltage
conversion to control a laser?

Seems like a difficult way of doing it. The Z axis pulse rate will change at each move determined by the other
coordinated axes.

Using S commands wont work either as they are read per line, thus a move has to complete BEFORE the next
line and therefore the next S command can be read.

What you have to do is start the laser with an S command but the S (speed DRO or pound variable) will need to be updated
either by a brain or a macro at the macro pump rate.  At the macro pump rate the laser pulse stream can be
modified  ten times a second even during a coordinated move. Would that suffice?

My VB coding has never been strong, I converted to Mach4 and Lua, if I'm going to learn something new I wanted it to
be up to date, ie Lua. While I can see how I would go about coding this I'm not going to offer help to do it in VB.
If you wish to download Mach4 I could and would be keen to help you code it in Lua.

Craig
Title: Re: Z speed limiting xy speed
Post by: garyhlucas on February 13, 2018, 06:46:27 PM
When moving 3 axis simultaneously the actual feed rate is along the vector between the 3 axis. So if Mach 3 sees the Z distance as a long move then motion along XY will be slowed a lot. Your Z move needs to be seen as very short by Mach 3. Maybe setting the step pulses per unit move to a very high number would do the job.
Title: Re: Z speed limiting xy speed
Post by: Millone on February 19, 2018, 11:40:36 AM
When moving 3 axis simultaneously the actual feed rate is along the vector between the 3 axis. So if Mach 3 sees the Z distance as a long move then motion along XY will be slowed a lot. Your Z move needs to be seen as very short by Mach 3. Maybe setting the step pulses per unit move to a very high number would do the job.

Thanks for your explanation. Actually the move in Z is maximum 0.5 mm and I did set the Z speed 20 times faster than the other two axis. I have 250 steps per mm on Z and 500 steps per mm on XY. But still the machine is slowing down and running in steps with a feed rate of 2000 mm/min rather than in a smooth linear motion. I am not sure if there is anything else I can set in Mach3 or in the Gcode to avoid this issue. I did also set G64 constant velocity but no changes.
Title: Re: Z speed limiting xy speed
Post by: TPS on February 19, 2018, 01:05:48 PM
Hi,
steps per mm and Speed is one thing,
acceleration is an other Point.

i don't know the dimensions of your machine, but i would start with some test's
by entering command into mdi.

for example:

F500
G1 X500 -> measure the needed time

 F500
G1 Y500 -> measure the needed time

F500
G1 X500 Y500 -> measure the needed time

just to make sure not one of the 'major' axis are making the Limit.

then

F500
G1 X500 Y500 Z5 -> measure the needed time

to get a 'feeling' what is 'pushing' the brake.

Thomas
 
Title: Re: Z speed limiting xy speed
Post by: Millone on February 19, 2018, 01:38:08 PM
@TPS

Hi, thanks for your suggestion. Since the Z motor is disconnected because I am using such output to feed the laser board trough a microprocessor, I have set huge acceleration (100000),  but still Z is slowing down XY. Looks like doesn't matter how fast and reactive I make Z , when there is a change in Z, the other axis slow down for a fraction of second but slow down causing the machine to sound really hugly.  This does not happen with with X and Y if I make Z constand and change a value  in X or Y.


Title: Re: Z speed limiting xy speed
Post by: TPS on February 19, 2018, 01:41:19 PM
have you tryed "real" (x3) instead of "huge" values?
Title: Re: Z speed limiting xy speed
Post by: TPS on February 19, 2018, 01:42:59 PM
@TPS
  This does not happen with with X and Y if I make Z constand and change a value  in X or Y.

can you please explain a Little bit, sorry my english is not good enough.
Title: Re: Z speed limiting xy speed
Post by: Millone on February 19, 2018, 01:54:56 PM
The machine is normally set as following (with the Z motor connected):
X and Y are set at 500 steps/mm, 20000 mm/min acceleration 500
Z is set at 500 steps/mm, 10000 mm/min acceleration 400
With the above setting I use the machine for normal operations

When I connect the laser instead of the Z motor, I change the Z settings as following:
250 steps/mm, 20000 mm/sec, acceleration 100000

In such configuration I do expect Z to be so reactive that XY are not affected by the Z changes which are from -0.3 to - 0.8 mm
Instead I clearly see the machine slowing down on the DRO for each Z change and I can clearly hear the ugly noise of a machine stepping all the tiime. You can get a feeling of the noise here:  https://www.youtube.com/watch?v=jUVU17ks89Y (https://www.youtube.com/watch?v=jUVU17ks89Y)
I am trying to get the machine rastering smoothly but I cannot achieve it.
Title: Re: Z speed limiting xy speed
Post by: TPS on February 19, 2018, 02:10:44 PM
ok let's do some basic's


F100
G1 X100 -> will Need 1 Minute because distance is 100mm

F100
G1 Y100 -> will Need 1 Minute because distance is 100mm

F100
G1 X100 Y100 -> will Need about 1 Minute 24 seconds because distance is about 141mm (SQR(X²+Y²))

i hope this example makes clear, that every Z axis movement will slow down XY, because
the real distance is allways longer, than a simple XY movement, because machine is allways
doing constant Speed based on real distance (in CV mode).

Thomas







Title: Re: Z speed limiting xy speed
Post by: TPS on February 19, 2018, 02:24:33 PM
btw in your Video i have recognized that you are working on a laser Project.

here:

http://www.machsupport.com/forum/index.php/topic,12444.0.html

Tweakie has documented his hard laser road.

as far i got the Information out of this thread the "clue" is to regulate XY Speed instead of laser power.

'hopefully' Tweakie is jumping in here, because i think he has the Experience on laser.

Thomas
Title: Re: Z speed limiting xy speed
Post by: Millone on February 19, 2018, 03:01:12 PM
Thanks for the link. There is a lot to read there. Let me study it.....

Title: Re: Z speed limiting xy speed
Post by: Millone on February 19, 2018, 03:11:16 PM
@TPS

I did look at the project you pointed me. Nice beautiful project but it is something completely different. In my project I modulate the laser power with the Z values obtaining something like a grayscale engraving.
In the project you have referred me the Z looks to be fixed, the laser power is adjusted manually. What I am trying to solve is to avoid that the Z variations slows down xy during the rastering.
Title: Re: Z speed limiting xy speed
Post by: TOTALLYRC on February 19, 2018, 09:07:52 PM
I just took a look at your G-code and since you have the "Z" moves on separate line it will not do what you want. Try putting the "Z" move an the same line as the motion.

In other words you are saying, move the X stop, move the Z, Stop and so on. Most trajectory planners have a hell of a time with the short segment code that you are throwing at it.

I would also try not repeating the Z moves every other line if they don't change. It may allow the look ahead to be more effective since you will remove a lot of lines from the program.

Mike
Title: Re: Z speed limiting xy speed
Post by: TPS on February 20, 2018, 01:46:28 AM
an other idea might be to use spindlespeed for laserpower


M3 S100 F500
G1 X10  S200
G1 X20  S300
G1 X30  S400
M5

just brainstorming.