Jan 22, 2023 伝言を残す

NC programming classroom: use M99 to realize loop, jump and return

 

Usually the M99 we see appears at the end of the subroutine, used to end the subroutine and return to the main program.


But the function of the M99 code is much more than that.

In addition to our common function of returning to the main program, M99 can realize loop and jump functions.

 

In automatic processing, we can use robots or feeders to maintain the continuous processing state of the machine and realize a "lights-off factory".

 

When the operator prepares the raw materials, the robot will load and unload the raw materials and semi-finished products in a timely manner according to the program settings. Because this action is repetitive, our processing program also needs to be executed repeatedly, automatically opening the protective door of the machine tool, waiting for the loading and unloading of processing materials, automatically closing the protective door, and re-executing the processing code...
piece

At this time, we will use the cycle function of M99. Whether to execute the processing code again, you need to wait for the signal from the robot or the feeder.

 

According to the setting of the raw material in the feeder or the robot, once the tray or the feeder is in the waiting state, the processing program will be conditionally stopped instead of infinite loop execution.

 

M99 is used at the end of the main program, and the entire machining program will be executed cyclically;

Used at the end of a subroutine, it will return to the main program.


Before using the jump function of M99, there is a special reminder:

*don't use duplicate line numbers*

 

Regardless of using GOTOnnnn or M99 Pnnnn, it will unconditionally jump to the line Nnnnn. Once multiple Nnnnn lines appear in the program, the control system will jump to any of them, which is very dangerous for processing, so it is very important to set a unique line number.

 

 

 

お問い合わせを送る

whatsapp

skype

電子メール

引き合い