Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: learman on May 17, 2007, 07:35:29 PM

Title: Motors ramp up with each line of g code??
Post by: learman on May 17, 2007, 07:35:29 PM
Hello,,
I have things up and running, all my hardware problems are solved, now all I need to do is learn how to program g codes.. It seems when your g code starts another line the motors will slow down and ramp up on evey line of g code. If I am already moving in X+ direction during a line of g code and in the next line I am still going in X+ direction is there a way to keep my speed in x+ direction??

Thanks to all
Josh
Title: Re: Motors ramp up with each line of g code??
Post by: Brian Barker on May 17, 2007, 08:16:11 PM
Put a G64 in the Gcode file and you should be good to go :)
Title: Re: Motors ramp up with each line of g code??
Post by: learman on May 18, 2007, 09:12:15 AM
Thanks for the response
but unless I am putting it in the wrong line, it still pauses between Gcode lines??
Title: Re: Motors ramp up with each line of g code??
Post by: Brian Barker on May 18, 2007, 09:16:55 AM
Please post what you are running for a program and we will see what we can do.
Thanks
Brian
Title: Re: Motors ramp up with each line of g code??
Post by: learman on May 18, 2007, 09:33:37 AM
Thanks for the intrest Brian,,
I Built and Induction Heat Treat Scanner run by stepper motors,, Im sure the programing looks like childs play to you.
M3 turns on a dc motor that spins the part, M7 turns my induction heater on, and M9 turn the induction heater off, but what is happening is there is a momentary puse right when it shut my induction heater off,, witch really is not a big deal but the heated steel needs to get into the quench as quicky as posible,  to become harden.
thanks
josh


M3
M7
G0 X-05.000 Y00.00000 Z00.00000
G0 X-08.000 Y00.00000 Z00.00000M9
G0 X 00.000 Y00.00000 Z00.00000
M30
Title: Re: Motors ramp up with each line of g code??
Post by: Brian Barker on May 18, 2007, 09:45:08 AM
Try this :

M3
M11 P1 (P is the signal number)
G0 X-05.000 Y00.00000 Z00.00000
G0 X-08.000 Y00.00000 Z00.00000
M10 P1
G0 X 00.000 Y00.00000 Z00.00000
M30

This will turn on and off outputs and never stop :)

Hope that helps
Brian
Title: Re: Motors ramp up with each line of g code??
Post by: learman on May 18, 2007, 10:12:51 AM
I ran that there was no pause but it didnt turn on my relay,, P1? is that pump 1, input 1?
Title: Re: Motors ramp up with each line of g code??
Post by: learman on May 18, 2007, 10:14:59 AM
I mean output #1
Title: Re: Motors ramp up with each line of g code??
Post by: Brian Barker on May 18, 2007, 10:15:53 AM
The P number is Output number 1-20
Sorry about that
Brian
Title: Re: Motors ramp up with each line of g code??
Post by: learman on May 18, 2007, 10:17:35 AM
sorry still thinking
p means output pin # Im on pin 16 so I would put P16
Title: Re: Motors ramp up with each line of g code??
Post by: learman on May 18, 2007, 10:40:29 AM
still not turning it on, I set output #1 to pin 14 ( thats what output pin im on not 16)  ran it just like you have it

M3   
M11 P1
G0 X-05.000 Y00.00000 Z00.00000
G0 X-08.000 Y00.00000 Z00.00000
M10 P1
G0 X 00.000 Y00.00000 Z00.00000
M30

I am running Mach 3, I  dont see in the M codes an M11 and M10,, Im quesing M11 on and M10 off
Title: Re: Motors ramp up with each line of g code??
Post by: learman on May 18, 2007, 12:34:01 PM
Got it!! P1 Is output 3 P2 is output 4 and so on,,
Thanks,, Those M10 and M11 comands are going to come in handy,,
Title: Re: Motors ramp up with each line of g code??
Post by: Brian Barker on May 18, 2007, 01:12:26 PM
The P number is a bug and is fixed for the next rev :)

Also if you would like to have the program move a bit better try it like this:

M3   
M11 P1
G1 X-05.000 Y00.00000 Z00.00000 F100000.0
X-08.000 Y00.00000 Z00.00000
M10 P1
X00.000 Y00.00000 Z00.00000
M30

This will make the CV work (You can't have CV in G0 mode)
Title: Re: Motors ramp up with each line of g code??
Post by: learman on May 18, 2007, 07:51:05 PM
Very Nice!! thanks you so much!!! there is no pause at all
Is it because you used only one Gcode comand as in G1?
what dose the F100000.0 represent?
 
YOU THE MAN BARKER!!
Title: Re: Motors ramp up with each line of g code??
Post by: Brian Barker on May 18, 2007, 07:59:56 PM
The G1 linear feed mode and the F10000.0 is just a  very large feed rate to make the move seem like a rapid move.

Happy to see that it is working for you!
Thanks
Brian