Programming CNC Macros - Part 2

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ส.ค. 2024

ความคิดเห็น • 30

  • @zhuangzhenggarygao4662
    @zhuangzhenggarygao4662 3 ปีที่แล้ว +8

    Great video! can we see more macro videos? they are so useful!

    • @CamInstructor
      @CamInstructor  3 ปีที่แล้ว +5

      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!

    • @naserkh5865
      @naserkh5865 3 ปีที่แล้ว

      @@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 .

    • @CALLRICKY
      @CALLRICKY 3 ปีที่แล้ว

      Waiting on another video please they are awesome!

  • @UnskilledGFTN
    @UnskilledGFTN 4 หลายเดือนก่อน

    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)

  • @brianna110693
    @brianna110693 5 หลายเดือนก่อน

    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

    • @CamInstructor
      @CamInstructor  5 หลายเดือนก่อน

      Have a look at this video, I do a macro for facing in it...
      th-cam.com/users/livejXE4ZCv6yiM

  • @mentesaemcorposaomentesaem9473
    @mentesaemcorposaomentesaem9473 4 ปีที่แล้ว +1

    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.

  • @mo000138
    @mo000138 3 ปีที่แล้ว +1

    太好了,想學習更多,謝謝

  • @CNC-Guru
    @CNC-Guru 2 ปีที่แล้ว +1

    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.

  • @michaelstraughn3465
    @michaelstraughn3465 3 ปีที่แล้ว +1

    You have #9 as F, Would that be #6? or did I miss something... Love your tutorials!

    • @CamInstructor
      @CamInstructor  ปีที่แล้ว

      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.

  • @vital3d806
    @vital3d806 5 ปีที่แล้ว

    I apologize, I am writing through a translator. Thank you for the video!
    please tell us about milling complex surfaces in a macro

    • @CamInstructor
      @CamInstructor  4 ปีที่แล้ว

      Hope to do another Macro video soon. I'll keep your request in mind.

  • @raulvictorangelessolano9509
    @raulvictorangelessolano9509 3 ปีที่แล้ว

    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"

    • @CamInstructor
      @CamInstructor  3 ปีที่แล้ว

      Thanks. Always looking to add more videos on more topics, both in the beginner and advanced areas.

  • @marioaguilar2529
    @marioaguilar2529 4 ปีที่แล้ว

    can you adjust the A axis using a probe and how would you write the program. any lead would help. thank you in advance

    • @CamInstructor
      @CamInstructor  4 ปีที่แล้ว +1

      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.

  • @user-ui4yx2kq1d
    @user-ui4yx2kq1d 5 หลายเดือนก่อน

    ❤can you make a macro for hexagon hole say 14 dia.😊

  • @raulvictorangelessolano9509
    @raulvictorangelessolano9509 3 ปีที่แล้ว

    Muy buen aporte, Excelente tutorial
    Deseo una certificación profesional en Mastercam
    Podría brindarme información.

    • @CamInstructor
      @CamInstructor  3 ปีที่แล้ว

      Thank you.
      We offer certification testing through our online courses. You can see them here...
      caminstructor.com/mastercam-courses

  • @loanpanda0763
    @loanpanda0763 3 ปีที่แล้ว

    Which software is this???

    • @CamInstructor
      @CamInstructor  3 ปีที่แล้ว

      Cimco Edit. You can download a 30 day trial from their website if you want to check it out.

    • @loanpanda0763
      @loanpanda0763 3 ปีที่แล้ว

      @@CamInstructor thankew sir

  • @muraliyuvaraj4797
    @muraliyuvaraj4797 2 ปีที่แล้ว

    Video code not clear

    • @CamInstructor
      @CamInstructor  2 ปีที่แล้ว

      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.

  • @agfisher007
    @agfisher007 3 ปีที่แล้ว +1

    Subroutine and Macro for Z level milling would be nice..

    • @endezoor
      @endezoor 3 ปีที่แล้ว

      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.

    • @agfisher007
      @agfisher007 3 ปีที่แล้ว

      Thanx for the help....

  • @TommiHonkonen
    @TommiHonkonen 4 ปีที่แล้ว +2

    F word :D