![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Haas Mills Discuss Haas machinery here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Is there a way to set multiple offsets with a single probe cycle? I need to probe the center of a part and set offsets G154 P1 - P16 the same value Do I have to call a macro that sets P1 - P16 to the same thing G54 is set to? |
|
#3
| |||
| |||
| One way to do it is move the machine to the G54 location; i.e. type G54 G00 X0. Y0. in MDI and press cycle start. Then go to the offset page, cursor down to the the lines you need and press part zero set.
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
|
#4
| |||
| |||
| Im trying to accurately countersink 16 holes in a frame thats been bent, welded, warped, sanded, and stacked on top of another frame and clamped together on the router table. The z variance at each hole location can be as much as .04" so I'm going to probe each hole and assign its Z value to G154 P1 - P16. Each of the offsets however, need to have the same X,Y center location, which is found for each frame by probing the center in X and Y first. The X Y size of our frames can vary by as mush as .06, so I need to keep the hole pattern centered, and the countersink depth uniform. We've been countersinking these frames by hand all along and even though probing 16 different Z offsets is time consuming, Its still going to be faster than the old way. I wrote a macro that sets these X,Y offsets for me that looks like this: I call it right after the X and Y have been found and saved to G54 % O9111 (SETS G154 P1- P16 SAME AS G54) #14001=#5221 #14002=#5222 #14021=#5221 #14022=#5222 #14041=#5221 #14042=#5222 #14061=#5221 #14062=#5222 #14081=#5221 #14082=#5222 #14101=#5221 #14102=#5222 #14121=#5221 #14122=#5222 #14141=#5221 #14142=#5222 #14161=#5221 #14162=#5222 #14181=#5221 #14182=#5222 #14201=#5221 #14202=#5222 #14221=#5221 #14222=#5222 #14241=#5221 #14242=#5222 #14261=#5221 #14262=#5222 #14281=#5221 #14282=#5222 #14301=#5221 #14302=#5222 M99 % |
|
#5
| |||
| |||
i can explain anything you don;t understand this part of my program goes thru and assigns a known safe xyz offset for each area that work will be done at. In your frames example: "The X Y size of our frames can vary by as mush as .06, " if you know you always have a Y axis offset of -8.0 +/- .03 (.06/2) you can set all of your #14xxx positions with a G10 L20 Px G90 X-##### Y-8.0000 Z-#### . This can also be used for known safe X and Z coords. You may also be able to use the #605 parts of this program if you have different size frames . I change my # 605 at begining of program depending on what part i am running. The value in #605 then assigns #616 (hiegth) for probing g65 p9023 Z#618 Y#617 S#803 command line :#618=#616/2+.100(rapid space)+.118(half stylus orb) Also depending on #605's value it assign the proper Diam (#617). Finally, with a loop counter that ties into fixture position : (#802=#802+1) (#803=#802+110) this is used for the G110-G120 (same as g154.1-g154.20)work positions. note:#800=work cycle, #801=master work limit, #802 = operation cycle position .... ... ... N800 (<<<<<JOB SETUP / PROBING>>>>>) G65 P807 (SETUP MATH SUB) M01 (CHECK SETUP & PROBE VARS) G65 P802 E#803 H1. S0 T1. X0 Y0 Z1.5 G65 P801 E#803 N809 M01 (PROBING DONE >> DRILLING) .... >probing math and logic sub:: % O00807 (RB, TPI,NOMINAL, PROBE MATH) G103 P1 N80700 (<<<TPI,MM TO LEAD:#609 FLAG FINE/COARSE:#608>>>) IF [ #601 GE 6.0 ] GOTO80701 IF [ #601 LT 5.9 ] GOTO80702 N80701 (TPI TO SAE LEAD:#609, FLAG FINE/COARSE:#608) #609= 1 / #601 IF [ #609 LE 0.05 ] THEN #608= 1.0 IF [ #609 GT 0.05 ] THEN #608= 2.0 GOTO80710 N80702 (MM TO SAE LEAD:#609 FLAG FINE/COARSE:#608) #609= #601 * 0.0393701 IF [ #609 LE 0.0395 ] THEN #608= 1.0 IF [ #609 GT 0.049 ] THEN #608= 2.0 GOTO80710 N80710 (<<<<SET BLANK DIAM:#617>>>>) N80711 (SET RB DIAM #617) IF [ #605 EQ 2.0 ] THEN #617= 1.375 IF [ #605 EQ 3.0 ] THEN #617= 1.75 IF [ #605 EQ 4.0 ] OR [ #605 EQ 4.5 ] THEN #617= 2.187 IF [ #605 EQ 5.0 ] OR [ #605 EQ 5.5 ] THEN #617= 2.5 IF [ #605 EQ 6.0 ] OR [ #605 EQ 6.5 ] THEN #617= 3.25 IF [ #605 EQ 7.0 ] OR [ #605 EQ 7.5 ] THEN #617= 3.750 IF [ #605 EQ 8.0 ] OR [ #605 EQ 8.5 ] THEN #617= 4.5 IF [ #605 EQ 9.0 ] OR [ #605 EQ 9.5 ] THEN #617= 5.00 IF [ #605 EQ 10.0 ] OR [ #605 EQ 10.5 ] THEN #617= 5.500 IF [ #605 EQ 11.0 ] OR [ #605 EQ 11.5 ] THEN #617= 6.375 IF [ #605 EQ 12.0 ] OR [ #605 EQ 12.5 ] THEN #617= 7.25 N80712 (SET OD LAP DIAM #617) IF [ #605 EQ 21. ] THEN #617= 0.750 IF [ #605 EQ 22. ] THEN #617= 1.125 IF [ #605 EQ 23. ] THEN #617= 1.75 IF [ #605 EQ 24. ] THEN #617= 3.00 IF [ #605 EQ 25. ] THEN #617= 3.5 N80720 (<<<<SET BLANK HEIGHT:#616>>>>) N80721 (SET RB HEGHT #616) IF [ #605 EQ 2.0 ] THEN #616= 0.360 IF [ #605 EQ 3.0 ] THEN #616= 0.450 IF [ #605 EQ 4.0 ] THEN #616= 0.580 IF [ #605 EQ 4.5 ] THEN #616= 0.765 IF [ #605 EQ 5.0 ] THEN #616= 0.710 IF [ #605 EQ 5.5 ] THEN #616= 0.938 IF [ #605 EQ 6.0 ] THEN #616= 0.770 IF [ #605 EQ 6.5 ] THEN #616= 1.125 IF [ #605 EQ 7.0 ] THEN #616= 0.833 IF [ #605 EQ 7.5 ] THEN #616= 1.250 IF [ #605 EQ 8.0 ] THEN #616= 0.875 IF [ #605 EQ 8.5 ] THEN #616= 1.313 IF [ #605 EQ 9.0 ] THEN #616= 0.875 IF [ #605 EQ 9.5 ] THEN #616= 1.375 IF [ #605 EQ 10.0 ] THEN #616= 0.938 IF [ #605 EQ 10.5 ] THEN #616= 1.438 IF [ #605 EQ 11.0 ] THEN #616= 0.938 IF [ #605 EQ 11.5 ] THEN #616= 1.5 IF [ #605 EQ 12.0 ] THEN #616= 1. IF [ #605 EQ 12.5 ] THEN #616= 1.5 N80722 (SET OD LAP HEIGHT:#616) IF [ #605 EQ 21. ] THEN #616= 0.133 IF [ #605 EQ 22. ] THEN #616= 0.187 IF [ #605 EQ 23. ] THEN #616= 0.450 IF [ #605 EQ 24. ] THEN #616= 0.562 IF [ #605 EQ 25. ] THEN #616= 0.562 N80730 (<<<<SET #619 X MOVE FOR Z PROBING) (#619=MAX NOMINAL/2 +.05) N80731 (SET RB X MOVE #619) IF [ #605 EQ 2.0 ] THEN #619= 0.232 IF [ #605 EQ 3.0 ] THEN #619= 0.305 IF [ #605 EQ 4.0 ] OR [ #605 EQ 4.5 ] THEN #619= 0.462 IF [ #605 EQ 5.0 ] OR [ #605 EQ 5.5 ] THEN #619= 0.617 IF [ #605 EQ 6.0 ] OR [ #605 EQ 6.5 ] THEN #619= 0.805 IF [ #605 EQ 7.0 ] OR [ #605 EQ 7.5 ] THEN #619= 1.055 IF [ #605 EQ 8.0 ] OR [ #605 EQ 8.5 ] THEN #619= 1.305 IF [ #605 EQ 9.0 ] OR [ #605 EQ 9.5 ] THEN #619= 1.55 IF [ #605 EQ 10.0 ] OR [ #605 EQ 10.5 ] THEN #619= 1.8 IF [ #605 EQ 11.0 ] OR [ #605 EQ 11.5 ] THEN #619= 2.05 IF [ #605 EQ 12.0 ] OR [ #605 EQ 12.5 ] THEN #619= 2.425 N80732 (SET OD LAP X MOVE #619) (#619=BLANK DIAM. * .25) IF [ #605 EQ 21. ] THEN #619= 0.187 IF [ #605 EQ 22. ] THEN #619= 0.281 IF [ #605 EQ 23. ] THEN #619= 0.437 IF [ #605 EQ 24. ] THEN #619= 0.750 IF [ #605 EQ 25. ] THEN #619= 0.875 N80750 (<<<<SET #618 Z DEPTH FOR XY WEB) #618= [ #616 / 2 ] + 0.1 + 0.118 N80760 (SET G154.XX OFFSETS:#605) IF [ #800 EQ 0.0 ] GOTO80770 IF [ #605 EQ 2.0 ] GOTO80762 IF [ #605 EQ 3.0 ] GOTO80763 IF [ #605 EQ 4.0 ] GOTO80764 IF [ #605 EQ 5.0 ] GOTO80765 IF [ [ #605 GE 21 ] AND [ #605 LE 25 ] ] GOTO80770 IF [ [ #605 GE 22 ] AND [ #605 LE 25 ] ] GOTO80770 IF [ [ #605 GE 23 ] AND [ #605 LE 25 ] ] GOTO80770 IF [ [ #605 GE 24 ] AND [ #605 LE 25 ] ] GOTO80770 IF [ [ #605 GE 25 ] AND [ #605 LE 25 ] ] GOTO80770 N80762 (SET 2T WORK OFFSETS) / G10 L20 P2 G90 X-13.598 Y-8.982 Z-22.54 / G10 L20 P3 G90 X-16.101 Y-8.982 Z-22.54 / G10 L20 P4 G90 X-18.598 Y-8.982 Z-22.54 / G10 L20 P5 G90 X-22.73 Y-8.982 Z-22.54 / G10 L20 P6 G90 X-25.224 Y-8.982 Z-22.54 / G10 L20 P7 G90 X-27.731 Y-8.982 Z-22.54 / G10 L20 P8 G90 X-12.731 Y-6.983 Z-22.54 / G10 L20 P9 G90 X-15.229 Y-6.983 Z-22.54 / G10 L20 P10 G90 X-17.73 Y-6.983 Z-22.54 / G10 L20 P11 G90 X-21.852 Y-6.983 Z-22.54 / G10 L20 P12 G90 X-24.357 Y-6.983 Z-22.54 / G10 L20 P13 G90 X-26.852 Y-6.983 Z-22.54 GOTO80770 N80763 (SET 3T WORK OFFSETS) / G10 L20 P2 G90 X-13.598 Y-9.082 Z-22.45 / G10 L20 P3 G90 X-16.101 Y-9.082 Z-22.45 / G10 L20 P4 G90 X-18.598 Y-9.082 Z-22.45 / G10 L20 P5 G90 X-22.73 Y-9.082 Z-22.45 / G10 L20 P6 G90 X-25.224 Y-9.082 Z-22.45 / G10 L20 P7 G90 X-27.731 Y-9.082 Z-22.45 / G10 L20 P8 G90 X-12.731 Y-7.083 Z-22.45 / G10 L20 P9 G90 X-15.229 Y-7.083 Z-22.45 / G10 L20 P10 G90 X-17.73 Y-7.083 Z-22.45 / G10 L20 P11 G90 X-21.852 Y-7.083 Z-22.45 / G10 L20 P12 G90 X-24.357 Y-7.083 Z-22.45 / G10 L20 P13 G90 X-26.852 Y-7.083 Z-22.45 GOTO80770 N80770 (SET INIT. TC APPROACH WK OFFSET) #803= 110 + #800 N80799 (RTM: PROBING) G103 P0 M99 % >>actual probing machine commands::: % O00801 (PROBE RING SUB - MULTI) #802= #800 (INIT. SUB COUNTER: #800) #803= 110 + #802 N8010 (JUDGE #802 WORK POSITION : #801 WORK QTY) IF [ #802 GT #801 ] GOTO80199 N8015 (ACTUAL PROBING COMMANDS) (PROBE TOP OF RING FOR Z) G90 G#803 G00 X0 Y0 G01 Z0.1 F30. G00 X - #619 G65 P9023 A9. S#803 G00 X0 Y0 (PROBE X Y WEB) G65 P9023 A4. Y#617 Z - #618 S#803 G65 P9023 A4. X#617 Z - #618 S#803 G00 Z1.5 IF [#802 EQ 0.0]GOTO80199 N8016 (COUNTER sTEPPING) #802= #802 + 1 #803= 110 + #802 GOTO8010 (GOTO JUDGE #802: #800) N80199 (PROBING DONE >> RTM) G91 G28 Z0 G90 M99 % Last edited by PaintItBlue; 10-15-2008 at 12:22 PM. |
| Sponsored Links |
|
#6
| |||
| |||
sorry if the last post was a bit confusing or too much for what you are trying to do. You can simplify your codes with this N1000 (start g154.xx reassign to g54) #800=14xxx (inital work x or y postion to be modified) #801=1 (loop counter) #802=16 (loop limitter - user edit : situational equal to X amount of holes) #[800]=#5221 #800=#800+1 #[800]=#5222 #800=#800+19 #801=#801+1 IF [#801 GT #803]GOTO999 GOTO1000 N999 (loop done) **Note youmay need to used a G103 P1 to limit look ahead, if the loop and reassigns are not in sync with each other. Turn it off at the end with G103 P0 Last edited by PaintItBlue; 10-15-2008 at 01:00 PM. Reason: PS |
|
#7
| |||
| |||
| please, no sorry's I love getting a look at more complex programming, I'm sure to glean some tricks from it for future use and your last post looks like a great way to abbreviate my coding for that simple task so thanks a bunch with the help of this site and people like yourself, I'm learning at a pretty fast pace now on the use of macros and variables. My main programs are looking more like macros every day |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Radius Offset and Length Offset | jim_stoll | Dolphin CADCAM | 13 | 10-14-2010 07:47 PM |
| FANUC 3M G54 OFFSET, H-OFFSET----Please help!!! | cjchands | Fanuc | 2 | 05-25-2009 11:22 AM |
| Probing? | chunkymonkey | General Metal Working Machines | 2 | 04-01-2008 11:39 PM |
| Probing with Turbo CNC | btalon | TurboCNC | 1 | 02-23-2008 07:19 PM |
| Probing | geverhart | WoodWorking | 1 | 09-03-2004 02:41 PM |