586,216 active members*
3,675 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2022
    Posts
    2

    Post Haas MiniMill Macro issue

    Hello, I created a small macro that probes four points on the "Z" plane, then picks the highest point, and finally pushes the highest point to the G57 "Z" offset that I would like to use for machining. I am using a G10 to push the value of the highest point to the G57 "Z", however, this doesn't take place and the machine seems to stop after the "conditional" code and even though I have an M30 at the end, it looks like it is still processing (the green light is still on..) When I check the G57 "Z" value, it has not changed either. I would really appreciate if someone could help me with this because I am desperate

    Thank you in advance!

    Here's the code:

    %
    O00013
    (PROBING TEST)
    N1
    N2 G57 G20 G00 G90 G17 (SAFE START LINE)
    N3 M06 T10
    N4
    (PIN 1 PART POSITIONING CHECK)
    N5 #10501= 0. (Clear the variable)
    N6 M109 P10501 (IS PIN1 ALIGNED ON THE FIXTURE AND CPU CLAMPED? FOR YES PRESS "Y")
    N7 IF [ #10501 EQ 0. ] GOTO6 (GO TO "IS PIN 1 ALIGNED...")
    N8 IF [ #10501 EQ 89. ] GOTO14 ("Y" GO TO START THE MILLING PROGRAM)
    N9 IF [ #10501 EQ 78. ] GOTO68 ("N" GO TO END OF PROGRAM)
    N10 GOTO2 (GO TO "CLEAR THE VARIABLE")
    N11
    N12 G103 P1
    N13
    N14
    (POSITION X AND Y)
    N15 G43 H10 X0.2654 Y0. F10.
    (POSITION Z)
    N16 G43 H10 Z1. F10.
    N17
    (PROBE POINT 1)
    N18 #10001=0 (CLEARING #10001 VALUE TO USE VARIABLE)
    N19 G57 G90 Z0.5 F8.
    N20 G43 H10 Z0.25 F8.
    N21 G65 P9832
    N22 G65 P9810 Z0.1 F8.
    N23 G65 P9811 Z-0.1 F5.
    N24 G65 P9810 Z1. F10.
    N25 #10001=#187 (USING #10001 TO STORE RENISHAW PROBE #187 VALUE FOR POINT 1)
    N26 G65 P9833
    N27 Z2. F20.
    N28
    (PROBE POINT 2)
    N29 #10002=0 (CLEARING #10002 VALUE TO USE VARIABLE)
    N30 G57 G90 X1.378 Y0.0287 F10.
    N31 G43 H10 Z0.25 F8.
    N32 G65 P9832
    N33 G65 P9810 Z0.1 F8.
    N34 G65 P9811 Z-0.1 F5.
    N35 G65 P9810 Z1. F10.
    N36 #10002=#187 (USING #10002 TO STORE RENISHAW PROBE #187 VALUE FOR POINT 2)
    N37 G65 P9833
    N38 Z4. F20.
    N39
    (PROBE POINT 3)
    N40 #10003=0 (CLEARING #10003 VALUE TO USE VARIABLE)
    N41 G57 G90 X1.5908 Y2.9958 F10.
    N42 G43 H10 Z0.5 F8.
    N43 G65 P9832
    N44 G65 P9810 Z0.1 F8.
    N45 G65 P9811 Z-0.1 F5.
    N46 G65 P9810 Z1. F10.
    N47 #10003=#187 (USING #10003 TO STORE RENISHAW PROBE #187 VALUE FOR POINT 3)
    N48 G65 P9833
    N49 Z2. F20.
    N50
    (PROBE POINT 4)
    N51 #10004=0 (CLEARING #10004 VALUE TO USE VARIABLE)
    N52 G57 G90 X0.3935 Y3.0107 Z1. F10.
    N53 G43 H10 Z0.5 F8.
    N54 G65 P9832
    N55 G65 P9810 Z0.1 F8.
    N56 G65 P9811 Z-0.1 F5.
    N57 G65 P9810 Z2. F10.
    N58 #10004=#187 (USING #10004 TO STORE RENISHAW PROBE #187 VALUE FOR POINT 4)
    N59 G65 P9833
    N60 Z5. F20.
    N61 G103
    N62
    N63
    N64
    N65
    (CONDITIONAL STATEMENTS)
    N66 IF [#10001 GE #10002] AND [#10001 GE #10003] AND [#10001 GE #10004] THEN [ #10005 = #10001] ELIF [#10002 GE #10001] AND [#10002 GE #10003] AND [#10002 GE #10004] THEN [ #10005 = #10002] ELIF [#10003 GE #10001] AND [#10003 GE #10002] AND [#10003 GE #10004] THEN [ #10005 = #10003] ELSE [ #10005 = #10004]
    N67 G90 G10 L2 P4 Z#10005 (#10005 IS THE VARIABLE I AM USING TO STORE AND PUSH THE HIGHEST POINT DATA)
    N68 M30
    %

  2. #2
    Join Date
    Aug 2007
    Posts
    414

    Re: Haas MiniMill Macro issue

    Replace N66 with:
    (This code is untested)

    N150
    #10000=2. (COUNTER)
    N155
    IF [#10001 GT #[10000+#10000]] GOTO160
    #10001=#[10000+#10000]
    N160
    #10000=#10000+1.
    IF [#10000 LT 5.] GOTO 155

    (#10001 has greatest value)
    ...

Similar Threads

  1. MiniMill(Haas)
    By smallplanes in forum Haas Mills
    Replies: 4
    Last Post: 11-16-2011, 07:54 PM
  2. haas minimill
    By cordeirot in forum Haas Mills
    Replies: 5
    Last Post: 03-11-2010, 02:51 PM
  3. Haas minimill, what should I know...
    By Freddy Bastard in forum Haas Mills
    Replies: 14
    Last Post: 07-06-2009, 08:23 AM
  4. Post for Haas Minimill
    By Chubs in forum EdgeCam
    Replies: 1
    Last Post: 11-17-2006, 01:12 PM
  5. Haas minimill post?
    By mikeh78 in forum GibbsCAM
    Replies: 0
    Last Post: 04-21-2006, 05:17 PM

Tags for this Thread

Posting Permissions

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