Sometimes when I run either M98 or G65 I would like to "turn the subProgram off by using a loop count of zero. This does not seem to work though as the sub will always run once unless I comment it out. That's difficult when the sub in question is nested in another file.
Is there a way to list these subPrograms in my main file and setting them so they only run when desired?
I have #variables in my main program which I set to anything from zero to 25 repetitions. I just cannot get the zero to do what I think it should.
I just need to loop things in an adjustable scenario where the least run amount is "0".
Maybe I need to skip them instead by using some form of IF statement??
Thanks.
M98 G65 Loop counts / can't set to zero
Moderator: cnckeith
-
- Posts: 6
- Joined: Mon May 01, 2023 5:17 pm
- Acorn CNC Controller: No
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: No
- CNC11: No
- CPU10 or CPU7: No
M98 G65 Loop counts / can't set to zero
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Community Expert
- Posts: 4613
- Joined: Wed Mar 24, 2010 5:48 pm
- Acorn CNC Controller: No
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
Re: M98 G65 Loop counts / can't set to zero
Your last suggestion there is probably the shortest path to success.
That said, it might be a nice, and relatively simple, enhancement to have CNC12 skip the macro call if L is specified and it is zero.
Does anyone know what Fanuc or Haas or other controls do, given a G65 call with an L0 repeat count?
Code: Select all
IF [#101 > 0] THEN G65 "MyMacro.cnc" A_ B_ C_ X_ Y_ Z_ L#101
Does anyone know what Fanuc or Haas or other controls do, given a G65 call with an L0 repeat count?
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 6
- Joined: Mon May 01, 2023 5:17 pm
- Acorn CNC Controller: No
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: No
- CNC11: No
- CPU10 or CPU7: No
Re: M98 G65 Loop counts / can't set to zero
My past experience is only with Mach4 which does skip if the loop is set to zero.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)