Hello Guest it is April 25, 2024, 04:50:47 PM

Author Topic: loop question with mach3  (Read 3765 times)

0 Members and 1 Guest are viewing this topic.

loop question with mach3
« 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.

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: loop question with mach3
« Reply #1 on: October 08, 2007, 07:18:43 AM »
With in your loop add :-

G91 Z-.062
G90

Graham.
Without engineers the world stops
Re: loop question with mach3
« Reply #2 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

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: loop question with mach3
« Reply #3 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
« Last Edit: October 09, 2007, 12:17:41 AM by afn09556 »

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: loop question with mach3
« Reply #4 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.
Not me driving the engine - I'm better looking.