@@CamInstructor first of all thank you for your video which i like so much and i still waiting for your next one as soon as you can . thank you again and God bless you and your family .
Great video! After 10 years of Heidenhain Machining centers I have to pick up fanuc turning. I can't put it into words how useful this video is for me right now!!! Is part 3 out?(The follow up video)
I really like the information in this video, I am new to trying macros right now I have to manually rough face mill plates I would like to have a macro program set up in my fanuc control where I can just change plate size and run face milling quickly
You can do pretty much anything you can imagine with macros. There is too many questions that need to be answered from your statement whereas I cannot write a simple step by step for you. Basically, depending on what you want to adjust, probe the surface, record the location, manipulate that data to suit, write that data to where it is needed.
No. Oddly enough, F is #9. You need to refer to the machines user manual to see what letters align with what variable number. Some follow the alphabet numbering, some do not.
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.
Or you could use still G81 but different home positions :) in this case. This is too complex for the simple cycle. Macros should be used for complex milling. Great Tutorial, but you are jumping from simple stuff to hard and back.
Estoy encantado con el profesionalismo que desarrolla en cada uno de sus tutoriales, sería tan amable en profundizar con temas de gran valor en programación de macros y programación CAM. "MASTERCAM"
Make sure you are streaming in a high resolution, sometimes youtube automatically switches to something low if your connection is dicey. Bottom corner of the video, click the gear, in Quality select 1080p for best resolution.
You could do it with a parametric subroutine without using Macro. #1=2 (starting Z-level) #2=0 (finishing Z-level) G0 Z[#1+10] (safe height) WHILE [#1GT#2] DO1 #1=#1-1 (Ap) IF[#1LT#2]THEN #1=#2 (this eliminates the chances of making an undercut) G0 Xxx Yyy (starting pos.) G0 Z#1 *machining movements* G0 Z[#1+10] END1 G0 Z100 (safe pos. after milling) I hope this answer is good enough. If you want to do a macro, you would have a hard time to write the parametric code for the machining forms (such as rectangular, square, circle, free form, etc.). I think this one is the simpler solution.
Great video! can we see more macro videos? they are so useful!
I do like to throw in macro videos every so often and I think we are due for another. Keep an eye out for one soon! Glad you like them!
@@CamInstructor first of all thank you for your video which i like so much and i still waiting for your next one as soon as you can .
thank you again and God bless you and your family .
Waiting on another video please they are awesome!
Great video! After 10 years of Heidenhain Machining centers I have to pick up fanuc turning. I can't put it into words how useful this video is for me right now!!!
Is part 3 out?(The follow up video)
I really like the information in this video, I am new to trying macros right now I have to manually rough face mill plates I would like to have a macro program set up in my fanuc control where I can just change plate size and run face milling quickly
Have a look at this video, I do a macro for facing in it...
th-cam.com/users/livejXE4ZCv6yiM
can you adjust the A axis using a probe and how would you write the program. any lead would help. thank you in advance
You can do pretty much anything you can imagine with macros. There is too many questions that need to be answered from your statement whereas I cannot write a simple step by step for you. Basically, depending on what you want to adjust, probe the surface, record the location, manipulate that data to suit, write that data to where it is needed.
You have #9 as F, Would that be #6? or did I miss something... Love your tutorials!
No. Oddly enough, F is #9. You need to refer to the machines user manual to see what letters align with what variable number. Some follow the alphabet numbering, some do not.
太好了,想學習更多,謝謝
I apologize, I am writing through a translator. Thank you for the video!
please tell us about milling complex surfaces in a macro
Hope to do another Macro video soon. I'll keep your request in mind.
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.
Or you could use still G81 but different home positions :) in this case. This is too complex for the simple cycle. Macros should be used for complex milling. Great Tutorial, but you are jumping from simple stuff to hard and back.
Which software is this???
Cimco Edit. You can download a 30 day trial from their website if you want to check it out.
@@CamInstructor thankew sir
Estoy encantado con el profesionalismo que desarrolla en cada uno de sus tutoriales, sería tan amable en profundizar con temas de gran valor en programación de macros y programación CAM. "MASTERCAM"
Thanks. Always looking to add more videos on more topics, both in the beginner and advanced areas.
Muy buen aporte, Excelente tutorial
Deseo una certificación profesional en Mastercam
Podría brindarme información.
Thank you.
We offer certification testing through our online courses. You can see them here...
caminstructor.com/mastercam-courses
❤can you make a macro for hexagon hole say 14 dia.😊
Video code not clear
Make sure you are streaming in a high resolution, sometimes youtube automatically switches to something low if your connection is dicey. Bottom corner of the video, click the gear, in Quality select 1080p for best resolution.
Subroutine and Macro for Z level milling would be nice..
You could do it with a parametric subroutine without using Macro.
#1=2 (starting Z-level)
#2=0 (finishing Z-level)
G0 Z[#1+10] (safe height)
WHILE [#1GT#2] DO1
#1=#1-1 (Ap)
IF[#1LT#2]THEN #1=#2 (this eliminates the chances of making an undercut)
G0 Xxx Yyy (starting pos.)
G0 Z#1
*machining movements*
G0 Z[#1+10]
END1
G0 Z100 (safe pos. after milling)
I hope this answer is good enough. If you want to do a macro, you would have a hard time to write the parametric code for the machining forms (such as rectangular, square, circle, free form, etc.). I think this one is the simpler solution.
Thanx for the help....
F word :D