Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: rhtuttle on April 29, 2019, 01:43:32 PM

Title: Loop Counter
Post by: rhtuttle on April 29, 2019, 01:43:32 PM
When you run a subprogram (i.e. m98 p1234 L10) is there a register or other accessible variable that can be accessed to display the current loop number, the number of loops left and number of loops requested?

TIA

RT
Title: Re: Loop Counter
Post by: smurph on April 30, 2019, 10:25:32 PM
Not at the moment. 

Steve
Title: Re: Loop Counter
Post by: rhtuttle on May 01, 2019, 11:01:16 AM
 Soooo....you're saying there may be hope?   ;D
Title: Re: Loop Counter
Post by: smurph on May 01, 2019, 12:17:03 PM
Well...  no.  Other than the way G code already gives you.  This is usually done in the G code with a #var.  Set the var to zero before the M98 L10 call and in the sub increment the #var.

Steve