Help with Yasnac MX3 control

Mar 31, 2009 1 Replies

Yasnac manuals that I have all say the same thing,

M99 = "End of Subprogram.

If you want to repeat a program you can do this:

% O1115; (PROGRAM REPEAT); M98 P1111 L10; M30; %

Will call up program 1111 and repeat it 10 times. Program O1111 must end with M99. If L is omitted will run subprogram one time.

% O1111; (SUBPROGRAM/PROGRAM); machining code; machining code; machining code; M99; %

+++++++++

To execute call up program O1115 and press cycle start, will call up program O1111 and repeat it 10 times then stop.

If in the middle of looping, Power off or (stopping) hitting reset button will zero counter.

+++++++++

However easiest way to do what you want would be to use a conditional macro statement in this case WHILE DO.

WHILE []DO .

If Counter is variable 100 to loop 99 times it would look like this.

WHILE[#100EL99]DO1;

In a program it would look something like this:

% O1115; (LOOP 99 TIMES); ; #100=1; WHILE[#100EL99]DO1; DO1; ;

; #100=#100+1; END1; M30; %

++++++++++ Did not check it for typo's but you should get the general idea. ++++++++++

Tom

Is there a program repeat M code? Thought M99 but the manual used that one for something else. Couldn't find anything in the manual.



Thanks



Red


Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required