Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: luther on October 07, 2007, 05:29:05 PM

Title: loop question with mach3
Post by: luther on October 07, 2007, 05:29:05 PM
how do i get the "z" axis to drop .062" with each pass?  i can get the program to repeat as may times that i want to.  but i can not get the "z" to drop with each pass. please help.
Title: Re: loop question with mach3
Post by: Graham Waterworth on October 08, 2007, 07:18:43 AM
With in your loop add :-

G91 Z-.062
G90

Graham.
Title: Re: loop question with mach3
Post by: luther on October 08, 2007, 10:16:22 PM
DID NOT WORK THE Z WOULD DROP TO -0.062 THAN IT WOULD RETURE TO THE PRESET PROGRAM.  HOW WAS I SUPPOSE TO ADD IT TO THE LOOP
Title: Re: loop question with mach3
Post by: Chip on October 09, 2007, 12:11:15 AM
G---EEEE-ZZZZZ, LUTHER

WE CAN''T HEAR YOU!!!!!!!.

Why don't you post your G-code, Or take the "g## Z0" out of your G-code.

Good Luck, Chip
Title: Re: loop question with mach3
Post by: jimpinder on October 17, 2007, 11:54:18 AM
I have found that the easiest way  to do repetative things is to write a visual basic script. I have written several of these. I use DRO's to put in the information, such as start values, finish values, cut increments and lengths. The script takes the values I have put in the DRO's, e.g. start value 1 inch, finish value 1/2 inch, increment 20thou, length 3 inches. and then out puts the G Code to the lathe, each time taking the 20 thou cut until it arrives at the finish value.

It works very well and only take one command to implement it.

I have five of these Macro scipts for various little roughing out jobs which I can insert in any program at will. There is a guide to visual basic scripting in the video tutorials.