Hello Guest it is October 27, 2021, 07:21:25 AM

Author Topic: Can Mach3 do continuous loops?  (Read 5038 times)

0 Members and 1 Guest are viewing this topic.

Can Mach3 do continuous loops?
« on: June 22, 2012, 04:58:50 PM »
Hi all,

I'm starting to get to know the machine at a basic level.

Does anyone know if there's a gCode that can program the Mach3 to do continuous loops over and over again once i've put in a design layout?

Thanks,
V
Re: Can Mach3 do continuous loops?
« Reply #1 on: June 22, 2012, 06:00:16 PM »
Write a subrutine, and call it as many times as you wish.

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Can Mach3 do continuous loops?
« Reply #2 on: June 23, 2012, 05:09:04 PM »
THE sub DOES have a 99 loop max.

(;-) TP
Re: Can Mach3 do continuous loops?
« Reply #3 on: June 23, 2012, 08:22:40 PM »
True continuous, M47 at the end of the code, Rewind and Restart. But it will run forever, you have to stop it.
I used it to verify a set-up, let it run for 48 hours with a small program.

TP, what about a sub in a sub ?  99 x 99 ? ? ?

Russ

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Can Mach3 do continuous loops?
« Reply #4 on: June 24, 2012, 11:35:07 AM »
Russ, Correct(;-)

(;-) TP
Re: Can Mach3 do continuous loops?
« Reply #5 on: June 24, 2012, 12:01:21 PM »
or use a variable counter.

N10 #100 =1
N20 M98 O1 (RUN  SUB)
N30 IF [#100LT300] GOTO 20    (LOOPS SET TO 300 OR WHETEVER YOU NEED)
N40 M30

IN THE SUB INCREMENT COUNTER #100=[#100+1]
You can "chop it off" but can't "chop it on"

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Can Mach3 do continuous loops?
« Reply #6 on: June 24, 2012, 12:13:26 PM »
SORRY but mach3 does NOT have conditional Gcode.

(;-)TP

Offline Hal

*
  •  60 60
    • View Profile
Re: Can Mach3 do continuous loops?
« Reply #7 on: June 24, 2012, 08:50:04 PM »
What would happen with M47?
Re: Can Mach3 do continuous loops?
« Reply #8 on: June 25, 2012, 08:32:19 AM »
What would happen with M47?

"M47- Repeat program from first line"
It would loop continuously ..... until you defaulted on your electric bill.  :)

Russ
Re: Can Mach3 do continuous loops?
« Reply #9 on: June 25, 2012, 11:11:03 AM »
Thanks guys!
Only one thing though, when I put the subroutine in microsoft notepad and save it as .tap/AllFiles... it doesn't show up as a subroutine on my Program Run scroll box and doesn't perform the function because essentially there isn't one.
Help?
V