Results 1 to 4 of 4

Thread: Macro Programming

  1. #1
    Join Date
    Oct 2011
    Location
    Michigan
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking Macro Programming

    Can anyone help me understand how to setup macros on a Haas control panel? Thank you for your help.

    Ed

  2. #2
    Join Date
    Jan 2012
    Posts
    350
    Thanks
    0
    Thanked 74 Times in 65 Posts

    Default Re: Macro Programming

    Quote Originally Posted by edrod2314 View Post
    Can anyone help me understand how to setup macros on a Haas control panel? Thank you for your help.

    Ed
    Hi Ed,
    What do you need to know?

    Regards,

    Bill

  3. #3
    Join Date
    Oct 2011
    Location
    Michigan
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Macro Programming

    Thanks Bill for the reply. I am new to the Haas control panel and need to know how macros work as well as how to set them up. Any assistance is greatly appreciated. I run cmm plates that have several holes drilled and tapped on them and would like to make a macro program so that I can adjust hole locations and plate thickness and size.

    Ed

  4. #4
    Join Date
    Jan 2012
    Posts
    350
    Thanks
    0
    Thanked 74 Times in 65 Posts

    Default Re: Macro Programming

    Quote Originally Posted by edrod2314 View Post
    Thanks Bill for the reply. I am new to the Haas control panel and need to know how macros work as well as how to set them up. Any assistance is greatly appreciated. I run cmm plates that have several holes drilled and tapped on them and would like to make a macro program so that I can adjust hole locations and plate thickness and size.

    Ed
    Hi Ed,
    If I understand your requirement correctly, there are a few ways to go about your task, one not involving Macro programming at all.

    Where different thickness, or height of Workpiece is concerned, all tools involved need to be considered. Accordingly, Global Work Shift G52 can be used to offset the G54 to G59 Work Shift being used. The Z offset in G54 to G59 would be set to what would amount to as being the Mean Z Zeros of the Workpiece, and G52 used to Shift the Z, Plus or Minus of the G54 to G59 value. Alternatively, set the Z Work Shift to either the thickest or thinnest plate and adjust G52 in only minus or plus directions respectively.

    With regards to the hole locations being Drilled and Tapped, the X,Y coordinates of the holes could be allocated to Macro Variables in a number of ways. The Drilling Cycle and hole location data could look something like the following Metric Example:
    (DRILL OPERATION)
    N1G91 G28 Z0.0
    G28 Y0.0
    T01 M06
    S1500 M03
    G90 G54 G00 X0.0 Y0.0
    G43 Z10.0 H01 M08
    M97 P1000 (CALLS LOCAL SUB PROGRAM TO SET LOCAL VARIABLES)
    G81 Z-35.0 R1.0 F200.
    X#1 Y#2
    X#3 Y#4
    X#5 Y#6
    X#7 Y#8
    G80
    G91 G28 Z0.0 M09
    G28 Y0.0
    M01
    (1.5 LEAD TAP OPERATION)
    N1G91 G28 Z0.0
    G28 Y0.0
    T02 M06
    S500 M03
    G95
    G90 G54 G00 X0.0 Y0.0
    G43 Z10.0 H02 M08
    M97 P1000 (CALLS LOCAL SUB PROGRAM TO SET LOCAL VARIABLES)
    G84 Z-30.0 R5.0 F1.5
    X#1 Y#2
    X#3 Y#4
    X#5 Y#6
    X#7 Y#8
    G80
    G94
    G91 G28 Z0.0 M09
    G28 Y0.0
    M01
    -------
    -------
    More Program
    -------
    -------
    M30
    N1000 (LOCAL HOLE LOCATION SUB STARTS HERE)
    (LOCAL VARIABLES #1 to #8 TAKE ON THE REQUIRED HOLE COORDINATES)
    #1=10.0
    #2=15.0
    #3=25.0
    #4=30.0
    #5=35.0
    #6=50.0
    #7=60.0
    #8=93.0
    M99

    In the above method, the hole locations are set in the Local Sub Program starting at N1000. The Local Variables are set prior to the Drill Cycle and Tap Cycle being called. This method allows the hole locations to be changed in one place and effects all tools calling the Local Sub. A similar method is to call an External Sub Program with M98. In this case the hole location data will reside in a program registered under another program number.

    You could also have had a Local Sub or External Sub called as follows and not used Macro Variables. In this case the Local or External Sub would hold the X,Y hole coordinates

    (LOCAL SUB CALL EXAMPLE)
    G95
    G84 Z-30.0 R5.0 F1.5
    M97 P1000 (CALL LOCAL SUB)
    G94
    G91 G28 Z0.0 M09

    N1000 (LOCAL SUB FOR HOLE LOCATIONS STARTS HERE)
    X10.0 Y15.0
    X25.0 Y30.0
    X35.0 Y50.0
    X60.0 Y93.0
    G80
    M99

    (EXTERNAL SUB CALL EXAMPLE)
    G95
    G84 Z-30.0 R5.0 F1.5
    M98 P1000 (EXTERNAL SUB O1000 CALLED HERE)
    G94
    G91 G28 Z0.0 M09

    O1000 (EXTERNAL SUB FOR HOLE LOCATIONS STARTS HERE)
    X10.0 Y15.0
    X25.0 Y30.0
    X35.0 Y50.0
    X60.0 Y93.0
    G80
    M99

    There are other methods where the hole locations can be set directly in the Macro Variable Page, but I think it cleaner to do it in the program.

    If you're only drilling and tapping, then the standard Haas Canned Cycles will be sufficient. If you needed a drill cycle to perform in a way outside the scope of a Standard Cycle, you can create your own Custom Cycle.

    If you need further information on creating your own Cycle, Post back and I, or someone from the Forum will be able to help.

    Regards,

    Bill
    Last edited by angelw; 12-17-12 at 09:01 PM.

Similar Threads

  1. i wan't to learn CNC programming more in macro
    By angelito in forum General CNC & Manufacturing Discussion
    Replies: 2
    Last Post: 06-24-12, 02:36 PM
  2. learning about macro programming
    By rubin in forum Programming / Applications
    Replies: 7
    Last Post: 02-21-12, 01:51 PM
  3. i interested to know macro programming
    By angelito in forum Programming / Applications
    Replies: 9
    Last Post: 02-16-12, 11:37 PM
  4. info required about Fanuc macro programming
    By Guest in forum Programming / Applications
    Replies: 5
    Last Post: 02-25-10, 11:11 AM
  5. MACRO PROGRAMMING FOR OKUMA OSP-P200 M
    By suhasmore in forum Machine Repair & Troubleshooting
    Replies: 0
    Last Post: 01-18-08, 02:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •