Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: bart on June 15, 2006, 05:58:26 PM

Title: loops and nested loops. Can I use my bridgeport programs?
Post by: bart on June 15, 2006, 05:58:26 PM
I have just installed the trial mach 2 into my new control.  Mach 2 didn't recognize my loop commands (=N0010/25)  Do I need to rewrite my programs? bart
Title: Re: loops and nested loops. Can I use my bridgeport programs?
Post by: Graham Waterworth on June 15, 2006, 07:24:54 PM
Loops are done in mach with :-

M98 P100 L25

M98  =     call sub program with loop code in
P100 =    program number to call
L25   =    number of times to call sub program.

Graham.
Title: Re: loops and nested loops. Can I use my bridgeport programs?
Post by: Brian Barker on June 15, 2006, 07:25:02 PM
Are you talking about looping a Sub? If so it is the Q number that sets the number of times it is run :)
Title: Re: loops and nested loops. Can I use my bridgeport programs?
Post by: bart on June 16, 2006, 01:31:01 PM
Thanks,  I used your format and created a loop subroutine.  I'll keep working on the nested loop.  bart.
Title: Re: loops and nested loops. Can I use my bridgeport programs?
Post by: bart on June 17, 2006, 09:25:55 AM
Hi guys,  machine is running on mach 2 trial version.  I had to use P with O and Lwith Q.  Nested subroutines works well.  Thank you for your help.