DWO Macro for 4th axis
Close
Login to Your Account
Results 1 to 18 of 18
  1. #1
    Join Date
    Jan 2015
    Country
    UNITED STATES
    State/Province
    California
    Posts
    695
    Post Thanks / Like
    Likes (Given)
    103
    Likes (Received)
    361

    Default DWO Macro for 4th axis

    Thought I'd share a new macro I wrote to use DWO on the old control similar to the new one, where you rotate to a new angle, call G254, then move to next XY, Z position. Code is below. On my VF2 I saved it as program 9013, then aliased G254 to it. (parameter 94) I've only done some testing with indicators for now. I haven't run any parts with it just yet.

    It uses G52 to modify your work offset, so at the end of program, poweroff, or pressing reset restores any changes. Setting 33 should be on Fanuc.

    Just be sure to set the Y/Z center point for your machine.

    Code:
    %
    O09013 (DWO)
    G103 P1
    (USAGE:)
    (USE THIS PROGRAM JUST LIKE)
    (DWO ON NGC - ROTATE TO NEW)
    (ANGLE, CALL THIS PROGRAM, THEN)
    (RAPID TO NEXT XY, Z POSITION)
    
    (BE SURE ROTARY CENTER POINT)
    (SETTING BELOW IS GOOD)
    
    (Y-Z ROTARY CENTER)
    #12= -9.9957
    #13= -16.8942
    
    
    (CHECK SETTING 33 EQ. FANUC)
    IF [ #6033 NE 0 ] THEN #3000= 1 (SETTING 33 NOT FANUC) 
    
    (CANCEL G52 OFFSET)
    G52 Y0 Z0
    
    (CURRENT WORKOFFSET Y&Z SETTING)
    #22= #5022 - #5042
    #23= #5023 - #5043
    (CURRENT WORKOFFSET ANGLE TO CALCULATE)
    #24= #5044
    
    
    (NEW Y POS)
    #32= COS[#24]*[#22-#12]-SIN[#24]*[#23-#13]+#12
    
    (NEW Z POS)
    #33= SIN[#24]*[#22-#12]+COS[#24]*[#23-#13]+#13
    
    (SET DIFF AS G52)
    G52 Y[#32-#22] Z[#33-#23]
    
    G103
    M99
    %

  2. Likes Zahnrad Kopf, JMC, JFettig, Mstcnc, countryguy and 1 others liked this post
  3. #2
    Join Date
    Jan 2015
    Country
    UNITED STATES
    State/Province
    California
    Posts
    695
    Post Thanks / Like
    Likes (Given)
    103
    Likes (Received)
    361

    Default


  4. #3
    Join Date
    Jan 2015
    Country
    UNITED STATES
    State/Province
    California
    Posts
    695
    Post Thanks / Like
    Likes (Given)
    103
    Likes (Received)
    361

    Default

    Updated this a while back and added single block suppression with #3003. Figured I'd update this thread. With single block suppression on, it jumps through quickly if proving out a program with single block on.

    Also made a simple DWO-cancel program, which is just G52 Y0 Z0, aliased to G255. That way my indexing sequence for rotary stuff is the same as the post for my UMC. My indexing sequence is setup to retract to safe distance and cancel DWO(if on), then rotate and apply DWO, if new angle is not A0 (or B0C0)

    One other thing I changed on my machine is the rotary center point setting. I use #512 & #513 to store the center points, that way it is easier to adjust slightly if needed, since I keep 9000-series programs locked.

    So you could use this or whatever other variable you want:
    (Y-Z ROTARY CENTER)
    #12= #512
    #13= #513


    Code:
    %
    O09014 (DWO CANCEL) #3003= 1
    G103 P1
    
    (CANCEL G52 OFFSET)
    G52 Y0 Z0
    
    G103
    M99 #3003= 0
    %
    Code:
    %
    O09013 (DWO) #3003= 1
    G103 P1
    (USAGE:)
    (USE THIS PROGRAM JUST LIKE)
    (DWO ON NGC - ROTATE TO NEW)
    (ANGLE, CALL THIS PROGRAM, THEN)
    (RAPID TO NEXT XY, Z POSITION)
    
    (BE SURE ROTARY CENTER POINT)
    (SETTING BELOW IS GOOD)
    
    (Y-Z ROTARY CENTER)
    #12= -9.9957
    #13= -16.8942
    
    
    (CHECK SETTING 33 EQ. FANUC)
    IF [ #6033 NE 0 ] THEN #3000= 1 (SETTING 33 NOT FANUC) 
    
    (CANCEL G52 OFFSET)
    G52 Y0 Z0
    
    (CURRENT WORKOFFSET Y&Z SETTING)
    #22= #5022 - #5042
    #23= #5023 - #5043
    (CURRENT WORKOFFSET ANGLE TO CALCULATE)
    #24= #5044
    
    
    (NEW Y POS)
    #32= COS[#24]*[#22-#12]-SIN[#24]*[#23-#13]+#12
    
    (NEW Z POS)
    #33= SIN[#24]*[#22-#12]+COS[#24]*[#23-#13]+#13
    
    (SET DIFF AS G52)
    G52 Y[#32-#22] Z[#33-#23]
    
    G103
    M99 #3003= 0
    %

  5. Likes Mitch_Pricer, mkd liked this post
  6. #4
    Join Date
    Apr 2009
    Country
    UNITED STATES
    State/Province
    Minnesota
    Posts
    75
    Post Thanks / Like
    Likes (Given)
    14
    Likes (Received)
    26

    Default

    This is very cool, I've been thinking about this a lot actually - I bet it would be pretty simple to set it up for 5-axis?

    I haven't looked this over or tried it yet - will it work with simultaneous 4th axis motion? Can you post the code you used for checking on the ball so I can see how this is executed in the main program?

  7. #5
    Join Date
    Jan 2015
    Country
    UNITED STATES
    State/Province
    California
    Posts
    695
    Post Thanks / Like
    Likes (Given)
    103
    Likes (Received)
    361

    Default

    Quote Originally Posted by JFettig View Post
    This is very cool, I've been thinking about this a lot actually - I bet it would be pretty simple to set it up for 5-axis?

    I haven't looked this over or tried it yet - will it work with simultaneous 4th axis motion? Can you post the code you used for checking on the ball so I can see how this is executed in the main program?
    Yep the calculation is very similar to do with 5-axis. I use that to use the probe at different angles on my UMC. I thought about making one for use with the 5-axis rotaries, but haven't had a need for it yet. Maybe later.

    No it wont do anything for you as far as simultaneous 4axis. It is for positioning only. For simultaneous, you either need to setup your cam program exactly as the part on the machine, or use TCPC. TCPC is doing the calculation in real time.

    You can actually use DWO/TCPC as a trial or buy as option on the old gen control, depending on your version. Just found that out recently. Not sure which control version it was added on, but it is parameter 737:19 on my VF2.

    To use this in your program, all you do is rotate to a new position, call G254, then move to next Y(and Z) position.

  8. Likes countryguy liked this post
  9. #6
    Join Date
    Jan 2019
    Country
    SWEDEN
    Posts
    2
    Post Thanks / Like
    Likes (Given)
    1
    Likes (Received)
    0

    Default

    Really cool.
    do you put a zero in the center on the b-axis and one on top of the detail?
    I don't really understand.
    You can view the program that you have in the video.

  10. #7
    Join Date
    Jan 2015
    Country
    UNITED STATES
    State/Province
    California
    Posts
    695
    Post Thanks / Like
    Likes (Given)
    103
    Likes (Received)
    361

    Default

    Quote Originally Posted by Twice View Post
    Really cool.
    do you put a zero in the center on the b-axis and one on top of the detail?
    I don't really understand.
    You can view the program that you have in the video.
    In the video the program basically says rotate to a new angle, then move back to G54Y0Z0.

    In this example, the zero point is the center of the tooling ball. If you want to try that, the "Tool length" of the Z-indicators needs to have the radius of the tooling ball added.

  11. #8
    Join Date
    Jan 2019
    Country
    SWEDEN
    Posts
    2
    Post Thanks / Like
    Likes (Given)
    1
    Likes (Received)
    0

    Default

    okay.
    thanks so much.
    I think I understand.
    should take o test

  12. #9
    Join Date
    Jul 2016
    Country
    UNITED STATES
    State/Province
    Indiana
    Posts
    236
    Post Thanks / Like
    Likes (Given)
    2
    Likes (Received)
    31

    Default

    Thanks for this macro. So far it is working as designed on my VF2. It definitely beats modeling the whole thing in cam.

  13. #10
    Join Date
    Jul 2019
    Country
    UNITED STATES
    State/Province
    Texas
    Posts
    6
    Post Thanks / Like
    Likes (Given)
    4
    Likes (Received)
    0

    Default

    Hello!

    Stumbled across this beautiful macro and couldn't be more thrilled.

    Is this compatible with a Haas using the NextGen Control?

  14. #11
    Join Date
    Jan 2015
    Country
    UNITED STATES
    State/Province
    California
    Posts
    695
    Post Thanks / Like
    Likes (Given)
    103
    Likes (Received)
    361

    Default

    Quote Originally Posted by Mitch_Pricer View Post
    Hello!

    Stumbled across this beautiful macro and couldn't be more thrilled.

    Is this compatible with a Haas using the NextGen Control?
    Yes, the NGC reads old non-10000 variables just fine, like #100 or #500, etc.

    I'm using this on my new EC400 right now. Just got a brand new one with pallet pool last month. Slightly modified since it is B-axis rotary translating X and Z instead of Y and Z.

    I use 511, 512, 513 for my rotary center points and compare to the machine setting. That way I can easily adjust stuff mid program, if the machine is running, or recalibrate automatically, etc. It compares values to machine setting and if not within ±.005, will alarm.

    Code:
    %
    O09016 (DWO) #3003= 1
    G103 P1
    (USAGE:)
    (USE THIS PROGRAM JUST LIKE)
    (DWO ON NGC - ROTATE TO NEW)
    (ANGLE, CALL THIS PROGRAM, THEN)
    (RAPID TO NEXT XY, Z POSITION)
    
    (BE SURE ROTARY CENTER POINT)
    (SETTING BELOW IS GOOD)
    
    IF [ABS[#20255-#10511] GT .005 ] THEN #3000= 1 (X MRZP ERROR)
    IF [ABS[#20257-#10513] GT .005 ] THEN #3000= 1 (Z MRZP ERROR)
    
    (Y-Z ROTARY CENTER)
    #11= #10511
    #13= #10513
    
    
    (CHECK SETTING 33 EQ. FANUC)
    IF [ #6033 NE 0 ] THEN #3000= 1 (SETTING 33 NOT FANUC) 
    
    (CANCEL G52 OFFSET)
    G52 X0 Z0
    
    (CURRENT WORKOFFSET Y&Z SETTING)
    #21= #5021 - #5041
    #23= #5023 - #5043
    (CURRENT WORKOFFSET ANGLE TO CALCULATE)
    #25= #5045
    
    
    (NEW Y POS)
    #31= COS[#25]*[#21-#11]-SIN[#25]*[#23-#13]+#11
    
    (NEW Z POS)
    #33= SIN[#25]*[#21-#11]+COS[#25]*[#23-#13]+#13
    
    (SET DIFF AS G52)
    G52 X[#31-#21] Z[#33-#23]
    
    G103
    M99 #3003= 0
    %

  15. Likes Mitch_Pricer liked this post
  16. #12
    Join Date
    Jul 2019
    Country
    UNITED STATES
    State/Province
    Texas
    Posts
    6
    Post Thanks / Like
    Likes (Given)
    4
    Likes (Received)
    0

    Default

    Thank you! Can't wait to give this a shot in the near future. I am a small shop, so anything to avoid buying DWO, but simplifying workholding, is a must.

    Again, thank you!

  17. #13
    Join Date
    Jul 2019
    Country
    UNITED STATES
    State/Province
    Texas
    Posts
    6
    Post Thanks / Like
    Likes (Given)
    4
    Likes (Received)
    0

    Default

    I made a few modifications to your DWO macro from your most recent post to change it from a B axis to an A axis. Would you mind checking it over and making sure I didn't screw something up?

    Thanks!

    Code:
    %
    O09016 (DWO) #3003= 1
    G103 P1
    (USAGE:)
    (USE THIS PROGRAM JUST LIKE)
    (DWO ON NGC - ROTATE TO NEW)
    (ANGLE, CALL THIS PROGRAM, THEN)
    (RAPID TO NEXT XY, Z POSITION)
    
    (BE SURE ROTARY CENTER POINT)
    (SETTING BELOW IS GOOD)
    
    IF [ABS[#20256-#10512] GT .005 ] THEN #3000= 1 (Y MRZP ERROR)
    IF [ABS[#20257-#10513] GT .005 ] THEN #3000= 1 (Z MRZP ERROR)
    
    (Y-Z ROTARY CENTER)
    #12= #10512
    #13= #10513
    
    
    (CHECK SETTING 33 EQ. FANUC)
    IF [ #6033 NE 0 ] THEN #3000= 1 (SETTING 33 NOT FANUC) 
    
    (CANCEL G52 OFFSET)
    G52 Y0 Z0
    
    (CURRENT WORKOFFSET Y&Z SETTING)
    #22= #5022 - #5042
    #23= #5023 - #5043
    (CURRENT WORKOFFSET ANGLE TO CALCULATE)
    #24= #5044
    
    
    (NEW Y POS)
    #32= COS[#24]*[#21-#12]-SIN[#24]*[#23-#13]+#12
    
    (NEW Z POS)
    #33= SIN[#24]*[#21-#12]+COS[#24]*[#23-#13]+#13
    
    (SET DIFF AS G52)
    G52 Y[#32-#22] Z[#33-#23]
    
    G103
    M99 #3003= 0
    %

  18. #14
    Join Date
    Jan 2015
    Country
    UNITED STATES
    State/Province
    California
    Posts
    695
    Post Thanks / Like
    Likes (Given)
    103
    Likes (Received)
    361

    Default

    Quote Originally Posted by Mitch_Pricer View Post
    I made a few modifications to your DWO macro from your most recent post to change it from a B axis to an A axis. Would you mind checking it over and making sure I didn't screw something up?

    Thanks!

    Code:
    ...
    (CURRENT WORKOFFSET Y&Z SETTING)
    #22= #5022 - #5042
    #23= #5023 - #5043
    
    (NEW Y POS)
    #32= COS[#24]*[#21-#12]-SIN[#24]*[#23-#13]+#12
    
    (NEW Z POS)
    #33= SIN[#24]*[#21-#12]+COS[#24]*[#23-#13]+#13
    ...
    Hi Mitch, be careful here - see bold. Those should be 22



    Also just noticed I made some typos post #11. The comments should have some X's for the B-axis version ... I left some as Y, whoops. That's what copy/paste gets ya. Stupid mistakes. Doesn't affect usage though.

  19. #15
    Join Date
    Jul 2019
    Country
    UNITED STATES
    State/Province
    Texas
    Posts
    6
    Post Thanks / Like
    Likes (Given)
    4
    Likes (Received)
    0

    Default

    Awesome, Thanks! I made those changes and will report back next week with how it works. Running some 3+1 parts that will be the perfect test!

  20. #16
    Join Date
    Jul 2019
    Country
    UNITED STATES
    State/Province
    Texas
    Posts
    6
    Post Thanks / Like
    Likes (Given)
    4
    Likes (Received)
    0

    Default

    Gave this a try over the weekend and had success! However, I am fairly sure my MRZP calculation is not all that accurate based on how I am setting it without a tooling ball (like in your initial video). Do you have any tips on how to set the MRZP without a tooling ball? Haas is trying to stick me for $1,300 for the ball and stem kit that normally ships with DWO.

  21. #17
    Join Date
    Jan 2015
    Country
    UNITED STATES
    State/Province
    California
    Posts
    695
    Post Thanks / Like
    Likes (Given)
    103
    Likes (Received)
    361

    Default

    Quote Originally Posted by Mitch_Pricer View Post
    Gave this a try over the weekend and had success! However, I am fairly sure my MRZP calculation is not all that accurate based on how I am setting it without a tooling ball (like in your initial video). Do you have any tips on how to set the MRZP without a tooling ball? Haas is trying to stick me for $1,300 for the ball and stem kit that normally ships with DWO.
    Clamp a piece of material to your rotary table/vise/collet/etc.

    Take a light cut across the top in the Y-direction, rotate rotary 180°, then make another cut in Y, without moving in Z. Same Z-level is important! That way the cuts should be equidistant from centerline.

    Now rotate 90°. Use your spindle probe to measure a Y-web to find center. Also take note of the width. You can measure with caliper/mic/ or look in variable #10188 (#188) for the size.

    Rotate another 90° and use Z-measure. Now adjust downward half your measurement from previous step.

    That should get you pretty close. Make small adjustments afterward as needed.


    With a tooling ball it is easier to make small adjustments to dial in, since you can change the centerpoint as a check-program is running. (This is why I prefer using variables vs setting. You can't change MRZP setting while a program is running)

    Many ways to adjust or check without a tooling ball, though. Off the top of my head:

    For checking Y-center, you can program to cut along the X-direction on one side of a part (picture a cube?) half way down in Z. Then rotate 180° and cut on the opposite side, half way down again. They should line up. Any mismatch you have, adjust Y-center by half.

    For Z, I find doing a fresh spindle probe length calibration before starting helps get closer the first time. You could mill a slot or pocket at A0, then mill a shoulder at A90 and A-90. If your slot is right on Y-center, perhaps you could mic the dist from shoulder to slot on each side and compare/adjust the Z-center.

  22. #18
    Join Date
    Jul 2019
    Country
    UNITED STATES
    State/Province
    Texas
    Posts
    6
    Post Thanks / Like
    Likes (Given)
    4
    Likes (Received)
    0

    Default

    Decided to go the tooling ball route using the single-axis MRZP set template in the Haas VPS. I made this tool to pull it off (sorry it's rotated, can't seem to get it to upload straight):
    Attached Thumbnails Attached Thumbnails e07d9abb-7063-42bc-8f06-51f72046bb11.jpg  


Tags for this Thread

Bookmarks

Posting Permissions

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