This is the video I've been looking forward to. I appreciate the time you put into this, it's hard to find people who actually care about teaching in a straightforward and logical manner. I wish there were more people putting out quality content and make learning a little bit more accessible, great content as always! 🤩🥳
Thank you so much for the videos! I have been intrigued with macros for years but have had very little resources that would teach them. I took your example and plugged it into a Fanuc here in my shop and it's blowing people's minds! I am so so so interested in learning more about the rules and formats of macros. It has sparked a new interest in me. Can't thank you enough for how well you've explained things. Looking forward to more videos!
Hi , I am also a Macro Programmer, able to handle any level, nesting up to 8level , arithmetic, Trigonometric, etc... in addition Heidenhain, EIA, Fanuc customization cycles for special Tools / Pallet Management etc...
interesting video .. I guess macros can replace cam-software in some special cases. nc-plot looks useful too.. Must have been invaluable to machine advanced features, when memory was very low on early cnc-machines .. also required alot of math skills from those machinists :)
Can you explain, please "BRANCHES AND LOOPS" OBJECTIVE: Enable participants to plan, execute and simulate CNC programs in 3 axes (milling machines and machining centers) with ISO / DIN structured language and programming. TARGET AUDIENCE: Professionals with basic CNC knowledge related to the machining area (CNC operators and programmers). . PRE REQUIREMENTS: Take a CNC Basic Milling course PROGRAM: Trigonometry Review Defining the variables Types of arithmetic functions Replacement Addition, Subtraction, Division, Multiplication Sine function, cosine function, tangent function Using conditional functions IF, GO TO, DO, WHILE EQ = equal NE = Different GT = Greater than LT = Less than GE = Greater than or equal LE = Less than or equal Simulation and practice exercises in a machining center (conical grooves, half spheres, corners of radius parts, ellipses, etc.) Can you explain, please "BRANCHES AND LOOPS" IF [ CONDITION IS TRUE ] GOTOn IF [condition is true] GOTOn for example, IF [#7 LT 0] GOTO65 If the value of variable #7 is less than 0, branch to block N65 ... ... If the above condition is true, bypass this section up to N65 ... N65 ... Target block of the IF conditional statement IF [ condition is true ] THEN [ argument ] Example 2 - Macro control with the IF-THEN structure #100 = #4006 Check current units (English G20 or Metric G21) IF[#100 EQ 20.0] THEN #100 = 0.1 Clearance above work is 0.1 inch for G20 IF[#100 EQ 21.0] THEN #100 = 2.0 Clearance above work is 2 mm for G21 ... < ... Macro program continues normally … > Using the IF-THEN method makes the pro gram shorter by one half and is eas ier to in ter pret. WHILE Loop Structure WHILE [condition] DOn WHILE [... Condition 1 is true ...] DO1 ... ... END1 Start of WHILE loop 1 End of WHILE loop 1 Double Level Loop WHILE [... Condition 1 is true ...] DO1 ... WHILE [... Condition 2 is true ...] DO2 ... ... END2 ... ... END1 ... Start of WHILE loop 1 Start of WHILE loop 2 End of WHILE loop 2 End of WHILE loop 1 Trible Level Loop WHILE [... Condition 1 is true ...] DO1 ... ... WHILE [... Condition 2 is true ...] DO2 ... WHILE [... Condition 3 is true ...] DO3 ... ... END3 ... ... END2 ... ... END1 ... Start of WHILE loop 1 Start of WHILE loop 2 Start of WHILE loop 3 End of WHILE loop 3 End of WHILE loop 2 End of WHILE loop 3 O8009 (SINE CURVE MACRO) #25 = 0 Set initial counter for degrees increment WHILE [#25 LE 360.0] Loop for each linear segment until 360 degrees are machined #26 = #1 * SIN[#25] Calculate current Y-location G90 G01 X#25 Y#26 F#9 Make a linear motion to the calculated XY location #25 = #25+#4 Increase the counter by specified increment END1 End of loop M99 End of macro O8011 (CLEAR 500+ VARIABLES - BY A MACRO LOOP) #33 = 500 Initialize counter to the first variable (no # symbol !!!) WHILE[#33 LE 999] DO1 Loop through variables - shown range is #500-#999 #[#33] = #0 Set the current variable number to null (clear current variable) #33 = #33+1 Update variable number count by one END1 End of loop - return to the WHILE block and evaluate again M99 End of macro and other.
Love the content! just a minor gripe.... It can be hard to read the difference between the = and the - on this vid even on a largish monitor. I request that you post the code in the comments please.
Ya, seems since I could only stream in 720p it has really affected the text resolution. I'll look into getting the program posted but for now you should be able to get by with knowing that most lines will start with =, ie #20= not #20-. Also, you can watch as the line of code is created and I say what is being typed and why.
I have a question, forgive me if its silly. I have always used fusion360, vectric aspire and others CAD/CAM Software, and they do all the calculations automatically. My question is, what this type of macro programing used for ??
Macro programming can be used for basically anything. Family of parts where you can change sizes, speeds/feeds, etc based on a few parameters. All you machine probing/measuring, is macro driven. There is no limit as to what it can do, just not many know how to use it.
MACRO PROGRAMMING FACE MILLING FROM CENTER OFFSET XY ...XY IS IN CENTER OF WORKPIECE FOR ANY .....ANY X LEGHTH AND Y LENGHT ANY CUTTER ANY STEP OVER ...WE NEED VARIABLES X LENGHTH Y LEGHTH CUTTER DIAMETER STEPOVER ZIGZAG IN X DIRECTION
I cover some info about this in this video... th-cam.com/video/oywN5SkjfCE/w-d-xo.html Basically depends on what I'm doing. Livestreaming I use StreamLabs OBS. Screen recordings I'll use Camtasia. Recorded videos I'll use Premiere Pro.
I have made some macro program looking at your video but some program is not working and I couldn't find the mistake as it shows well in the Cimco simulation. Can you help me to find my mistake if I send you the program
No. If you had #20=4/2 and then you did #20=[FIX[#20+0.5]] this would round a whole number up and create an extra pass when not needed. With these equations you have to try and consider all scenarios which is hard and sometimes can really only be done by running the macro with different values to check for unexpected behavior.
This is the video I've been looking forward to. I appreciate the time you put into this, it's hard to find people who actually care about teaching in a straightforward and logical manner. I wish there were more people putting out quality content and make learning a little bit more accessible, great content as always! 🤩🥳
Thanks! Glad you liked the video.
I'm also a CNC programmer
Sometimes I use macro programming
This type of programming is very useful for me
Thank you so much for the videos! I have been intrigued with macros for years but have had very little resources that would teach them. I took your example and plugged it into a Fanuc here in my shop and it's blowing people's minds! I am so so so interested in learning more about the rules and formats of macros. It has sparked a new interest in me. Can't thank you enough for how well you've explained things. Looking forward to more videos!
That's awesome! Glad these are helping and that they have sparked some interest. There are more in the works!
Thank you SOOO MUCH !! I am just starting a new job using Macro Programming Very Good Info!! Thanks Again !!
You are welcome!
Excelente profesor. Saludos
Hi , I am also a Macro Programmer, able to handle any level, nesting up to 8level , arithmetic, Trigonometric, etc... in addition Heidenhain, EIA, Fanuc customization cycles for special Tools / Pallet Management etc...
Sounds great!
Mr. Siva Kumar. I have to learn Macro. Do you take classes?
interesting video .. I guess macros can replace cam-software in some special cases. nc-plot looks useful too.. Must have been invaluable to machine advanced features, when memory was very low on early cnc-machines .. also required alot of math skills from those machinists :)
Yes, definitely
Can you explain, please "BRANCHES AND LOOPS"
OBJECTIVE:
Enable participants to plan, execute and simulate CNC programs in 3 axes (milling machines and machining centers) with ISO / DIN structured language and programming.
TARGET AUDIENCE:
Professionals with basic CNC knowledge related to the machining area (CNC operators and programmers).
. PRE REQUIREMENTS:
Take a CNC Basic Milling course
PROGRAM:
Trigonometry Review
Defining the variables
Types of arithmetic functions
Replacement
Addition, Subtraction, Division, Multiplication
Sine function, cosine function, tangent function
Using conditional functions
IF, GO TO, DO, WHILE
EQ = equal
NE = Different
GT = Greater than
LT = Less than
GE = Greater than or equal
LE = Less than or equal
Simulation and practice exercises in a machining center (conical grooves, half spheres, corners of radius parts, ellipses, etc.)
Can you explain, please "BRANCHES AND LOOPS"
IF [ CONDITION IS TRUE ] GOTOn
IF [condition is true] GOTOn
for example,
IF [#7 LT 0] GOTO65 If the value of variable #7 is less than 0, branch to block N65
...
... If the above condition is true, bypass this section up to N65
...
N65 ... Target block of the IF conditional statement
IF [ condition is true ] THEN [ argument ]
Example 2 - Macro control with the IF-THEN structure
#100 = #4006 Check current units (English G20 or Metric G21)
IF[#100 EQ 20.0] THEN #100 = 0.1 Clearance above work is 0.1 inch for G20
IF[#100 EQ 21.0] THEN #100 = 2.0 Clearance above work is 2 mm for G21
...
< ... Macro program continues normally … >
Using the IF-THEN method makes the pro gram shorter by one half and is eas ier to in ter pret.
WHILE Loop Structure
WHILE [condition] DOn
WHILE [... Condition 1 is true ...] DO1
...
...
END1
Start of WHILE loop 1
End of WHILE loop 1
Double Level Loop
WHILE [... Condition 1 is true ...] DO1
...
WHILE [... Condition 2 is true ...] DO2
...
...
END2
...
...
END1
...
Start of WHILE loop 1
Start of WHILE loop 2
End of WHILE loop 2
End of WHILE loop 1
Trible Level Loop
WHILE [... Condition 1 is true ...] DO1
...
...
WHILE [... Condition 2 is true ...] DO2
...
WHILE [... Condition 3 is true ...] DO3
...
...
END3
...
...
END2
...
...
END1
...
Start of WHILE loop 1
Start of WHILE loop 2
Start of WHILE loop 3
End of WHILE loop 3
End of WHILE loop 2
End of WHILE loop 3
O8009 (SINE CURVE MACRO)
#25 = 0 Set initial counter for degrees increment
WHILE [#25 LE 360.0] Loop for each linear segment until 360 degrees are machined
#26 = #1 * SIN[#25] Calculate current Y-location
G90 G01 X#25 Y#26 F#9 Make a linear motion to the calculated XY location
#25 = #25+#4 Increase the counter by specified increment
END1 End of loop
M99 End of macro
O8011 (CLEAR 500+ VARIABLES - BY A MACRO LOOP)
#33 = 500 Initialize counter to the first variable (no # symbol !!!)
WHILE[#33 LE 999] DO1 Loop through variables - shown range is #500-#999
#[#33] = #0 Set the current variable number to null (clear current variable)
#33 = #33+1 Update variable number count by one
END1 End of loop - return to the WHILE block and evaluate again
M99 End of macro
and other.
thanks a lot
Could you possibly explain a little clearer how the fup command would be used instead? Thanks for the video . Very helpful
FUP in Fanuc will round up any decimal number to the next whole number. So FUP[1.001] would equal 2.
great knowledge......thanks for sharing
You're welcome
Can you please have a macro sub program??
Great video and explanation!
Glad you liked it!
this stuff is just awesome ...great content !
Thank you!
Thank you so much for the videos! I'm VietNam.
Glad you like them!
awesome video! Nice job
Thanks!
Love the content! just a minor gripe.... It can be hard to read the difference between the = and the - on this vid even on a largish monitor. I request that you post the code in the comments please.
Ya, seems since I could only stream in 720p it has really affected the text resolution. I'll look into getting the program posted but for now you should be able to get by with knowing that most lines will start with =, ie #20= not #20-. Also, you can watch as the line of code is created and I say what is being typed and why.
Well I suppose if the code were posted most would just copy paste and not really learn a thing. 👨🎓
Excellent!!!
Many thanks!
The new feature in MC2022 call automatic regions in Dynamic mill has some bugs.
The fix is go back to the one below it, machining regions.
What kind of bugs? Have you forwarded this info to Mastercam?
I guess u can get their new update that fix it later, for a hefty pile of $ of course.. ;)
I have a question, forgive me if its silly.
I have always used fusion360, vectric aspire and others CAD/CAM Software, and they do all the calculations automatically. My question is, what this type of macro programing used for ??
Macro programming can be used for basically anything. Family of parts where you can change sizes, speeds/feeds, etc based on a few parameters. All you machine probing/measuring, is macro driven. There is no limit as to what it can do, just not many know how to use it.
MACRO PROGRAMMING FACE MILLING FROM CENTER OFFSET XY ...XY IS IN CENTER OF WORKPIECE FOR ANY .....ANY X LEGHTH AND Y LENGHT ANY CUTTER ANY STEP OVER ...WE NEED VARIABLES X LENGHTH Y LEGHTH CUTTER DIAMETER STEPOVER ZIGZAG IN X DIRECTION
Can you make a video on macro programming by hand for probing g54?
Most probes come with pre-made routines that will probe 2 or 3 axes for a work offset, are you after something different?
What screen recording software do you use? I am looking for something like this to make videos for my students
I cover some info about this in this video...
th-cam.com/video/oywN5SkjfCE/w-d-xo.html
Basically depends on what I'm doing. Livestreaming I use StreamLabs OBS. Screen recordings I'll use Camtasia. Recorded videos I'll use Premiere Pro.
CamInstructor Excellent video, thank you!
Mastercam can post directly to marco B type or not?
Typically no. However, with a few post modifications it would be possible.
спасибо
Your welcome!
I have made some macro program looking at your video but some program is not working and I couldn't find the mistake as it shows well in the Cimco simulation. Can you help me to find my mistake if I send you the program
post your code and if I get a chance I'll have a look
Thanks for your kind support...I sent you 3 programs... Kindly help me to correct them
Sir...Did you receive my code?
No. Just post the text here.
@@CamInstructor I posted 3 to 4 times but it disappears I don't know why
32:03
Wouldn't this do the job?
#20=[FIX[#20+0.5]]
No. If you had #20=4/2 and then you did #20=[FIX[#20+0.5]] this would round a whole number up and create an extra pass when not needed. With these equations you have to try and consider all scenarios which is hard and sometimes can really only be done by running the macro with different values to check for unexpected behavior.
@@CamInstructor Agree. Thank you!
th-cam.com/video/vms7yXDoQQI/w-d-xo.html he aqui un buen macro facing
Good stuff.
Like the Huey Lewis too! :)