Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: smr14 on June 18, 2007, 01:53:03 PM

Title: Help writing G-Code
Post by: smr14 on June 18, 2007, 01:53:03 PM
Hi,
I am currently testing servo amplifiers and servo motors using this mach 2 software. I need to have a program where I can run the motors one direction then back the other direction. This needs to be repeated around 100 times.  If it is two rotations then two rotations the other way and then this would be repeated 100 times would be awesome. I only test one motor a time on the x-axis. I realize this is very simplistic but I am having a lot of trouble sorting through all the G-code tutorials because I need to do something so simple but everything is made for the three axis. If anyone could help me write this that would be a huge help.....
Title: Re: Help writing G-Code
Post by: wnevels on June 18, 2007, 02:04:05 PM
smr what codinates do you want it to go to?

Wes
Title: Re: Help writing G-Code
Post by: smr14 on June 18, 2007, 02:19:53 PM
to be honest it does not matter one bit, as of right now I have just been jogging the motor.
Title: Re: Help writing G-Code
Post by: wnevels on June 19, 2007, 03:07:39 AM
here ya go

G0 X0 Y
M98 P69 L100
M2
%

O69
G0 X1.0
G0 X0.0
M99
%
Title: Re: Help writing G-Code
Post by: wnevels on June 19, 2007, 03:09:06 AM
sorry fingers to fast, y got in there by accident.

Wes

G0 X0
M98 P69 L100
M2
%

O69
G0 X1.0
G0 X0.0
M99
%
Title: Re: Help writing G-Code
Post by: smr14 on June 19, 2007, 01:49:07 PM
thanks for your help that works great.
Title: Re: Help writing G-Code
Post by: smr14 on June 19, 2007, 02:35:46 PM
Is there anyway to make the motor run at a higher rpm, or is there a safety setting in this mach 2 programming? If you could let me know how to vary the velocity of the motor that would help a lot.
thanks
Title: Re: Help writing G-Code
Post by: wnevels on June 19, 2007, 02:43:42 PM
never run Mach2 i've always run Mach3 maybe somebody else is familler with the motor tuning in Mach2
Title: Re: Help writing G-Code
Post by: smr14 on June 19, 2007, 03:00:26 PM
how do you change it in mach 3....i maybe able to figure it out and translate it to mach 2 from mach 3...
Title: Re: Help writing G-Code
Post by: wnevels on June 19, 2007, 03:24:05 PM
go to motor tuning and slide the velocity up.
Unless you just have your heart set on running mach2 you should upgrade to Mach3
Title: Re: Help writing G-Code
Post by: smr14 on June 19, 2007, 03:57:33 PM
well according to the sound logic breakout board I am using they say to use mach 2. I tried to use mach 3 and I couldn't get it to work but I didn't try too hard because the instructions said to use mach 2
Title: Re: Help writing G-Code
Post by: wnevels on June 19, 2007, 05:45:16 PM
I really couldn't tell you one way or the other. 
I would suggest click tutorials>Documetation above, then download using Mach2 and customizing mach2  somewhere in the pdf it should have the info on increasing stepper speed.

Wes
Title: Re: Help writing G-Code
Post by: Chaoticone on June 19, 2007, 07:47:28 PM
smr14,
   I have sent you a personal message. A G0 move is a rapid. A G1 is a feed. You can change the rate in the code listed below by placing a f********* in the line of code. This will not increase the rapid speed or override it. The fastest it will move is the amount you have set in motor tuning. I would go with Mach3 as well.

Brett