Programming CNC Macros - Part 2
In part 2 of our Macro B programming series, we'll have a look at the use of passing values to a macro program.
Macro programs can be used much the same as a subprogram would. The main difference being that with a macro subprogram call you can pass information for the macro to use.
In the sample video we are looking to apply this variable passing technique with a drilling subprogram. The aim is to create a custom drilling cycle, one that will enter into a pre-drilled hole at a reduced feedrate, drill at the full feedrate, and then breakthrough the bottom of the part at a reduced feedrate.
When passing variables from the main program to the sub with a macro call, it is recommended to refer to your machines programming manual to ensure you are passing values into the correct variable. eg. does A = Variable #1, B = Variable #2 etc.
The main difference between a subprogram call and a macro call is the gcode used. Subprograms use an M98 followed by a P word that represents the program number of the subprogram. A macro call uses G67 followed by a P word that represents the program number of the macro program. The G67 line of code can also include A,B,C, etc which are used to pass values to the program being called. Both the subprogram and macro being called must end with an M99 to send it back to the main program that called it.
See other blog posts
https://blog.caminstructor.com
Check out our website
https://caminstructor.com
#Mastercam #LearnCNC
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Programming CNC Macros - Part 2», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.