588,202 active members*
3,939 visitors online*
Register for free
Login
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Feb 2011
    Posts
    0

    Probing - would like 2 hits instead of just 1

    I have a machine (horizontal boring bar - with fanuc 15M controller) that has some probing macro's that I would like to change. I'm no pro at parametric programming. Currently, the probe only hits once when finding a position, as opposed to hitting twice (once at a faster feed rate then pull back and contact at a slower feed rate) like any other machine I've worked on. Also, when hitting that one time, it goes faster than I'd like and I've noticed differences when manually slowing the feed rate, so I'd really like it to hit twice.

    I was wondering if anyone would be willing to take the time to decipher the following programs and let me know what I'd have to do to get it to hit twice, as described above. I have run across some very smart people on this website - was hoping to come across some more (or the same). Here are some programs, with 9100 being probing information and 9300 is the centering program, and all the programs those two programs call up:

    O9100(...PROBE-INFORMATION...)
    IF[#19EQ#0]GOTO20
    IF[#19LE0]GOTO10
    #500=#19
    N10#501=#501+1
    IF[#501LE#500]GOTO11
    #501=1
    N11#502=4
    #505=0
    #506=0
    #507=9
    #141=0
    #142=0
    #143=0
    #144=5
    #145=50
    #146=1000
    #147=5
    #148=5
    #109=0
    IF[#507EQ6]GOTO12
    #510=0
    N12IF[#501NE1]GOTO20
    #119=0
    N20
    #27=#7
    #28=#9
    #29=#18
    #30=#1
    #31=#2
    #33=0
    WHILE[#33LE7]DO1
    IF[#[24+#33]EQ#0]GOTO30
    #[141+#33]=#[24+#33]
    N30#33=#33+1
    END1
    IF[#3EQ#0]GOTO40
    #119=#3
    GOTO50
    N40IF[#11EQ#0]GOTO50
    #119=#[#11]
    N50IF[#507EQ6]GOTO60
    IF[#20EQ#0]GOTO60
    #510=#20
    N60IF[#4EQ#0]GOTO70
    IF[#4EQ#505]GOTO70
    IF[#4NE0]GOTO65
    #505=0
    GOTO70
    N65#505=1
    N70IF[#17EQ#0]GOTO80
    #502=#17
    N80G65P9390B17.
    N99M99
    %

    O9300(...CENTERING...)
    G65P9380B#11
    G65P9150A9300.
    #8=1
    M98P9200
    IF[#110EQ#0]GOTO1
    IF[#110LT0]GOTO10
    N1
    IF[[#23-54]*[#23-59]LE0]GOTO20
    N10#23=0
    GOTO50
    N20
    #23=#23-53
    N30IF[#507NE6]GOTO35
    #30=2500+#23
    #31=2600+#23
    GOTO40
    N35#30=5201+#23*20
    #31=5202+#23*20
    N40
    #17=1
    IF[#17GT0]GOTO45
    #[#30]=#115
    #[#31]=#116
    GOTO50
    N45#[#30]=#[#30]+#115
    #[#31]=#[#31]+#116
    N50G90X#24Y#25
    Z#26
    G65P9120A-1.H126R#18
    IF[#110EQ#0]GOTO61
    #3000=199(ERROR FLAG ON)
    GOTO99
    N61
    G65P9390B12.W#23I#[#30]J#[#31]
    N99M99
    %


    O9200(...INSIDE-DIAMETER...)
    IF[#8NE#0]GOTO10
    IF[#501NE1]GOTO99
    G65P9380B#11
    G65P9150A9200.
    N10IF[#7GT#144]GOTO20
    G65P9150B-1.
    GOTO99
    N20
    G65P9120A1.H126
    G65P9130X#24Y#25Z#26
    #30=[#7-#144]/2
    IF[#502NE3]GOTO40
    N30
    IF[#4NE#0]GOTO32
    #4=90
    #5=210
    #6=330
    N32G65P9110X[COS[#4]]Y[SIN[#4]]C#30
    #111=#138
    #112=#139
    G65P9110X[COS[#5]]Y[SIN[#5]]C#30
    #113=#138
    #114=#139
    G65P9110X[COS[#6]]Y[SIN[#6]]C#30
    #115=#138
    #116=#139
    GOTO50
    N40
    G65P9110X1.C#30
    #111=#138
    G65P9110X-1.C#30
    #113=#138
    G65P9110Y1.C#30
    #114=#139
    G65P9110Y-1.C#30
    #116=#139
    N50
    G65P9140A-1.I#111J#112I#113J#114I#115J#116
    IF[[#19-1]*[#19-2]NE0]GOTO60
    #33=117+#19*3
    #[#33]=#111
    #[#33+1]=#112
    #[#33+2]=#26
    N60G65P9150I#24J#25K#26D#7U#111V#112W#26X#114
    IF[#8NE#0]GOTO99
    G65P9120A-1.H126R#18
    G65P9390B1.
    N99M99
    %

    O9110(...SKIP...)
    (M54)
    #10=#5001
    #11=#5002
    #12=#5003
    #33=#3-#147
    #32=#3+#148
    IF[#33LE0]GOTO10
    #32=#147+#148
    G01G91X[#33*#24]Y[#33*#25]Z[#33*#26]F#146
    N10
    G31G91X[#32*#24]Y[#32*#25]Z[#32*#26]F#145
    G04X2.
    #27=#3+#148
    G04X1.(** 91-3-20 **)
    #28=SQRT[[#5001-#10]*[#5001-#10]+[#5002-#11]*[#5002-#11]+[#5003-#12]*[#5003-#12]]
    IF[#28LT[#27-0.01]]GOTO20
    G65P9150B-2.
    N20
    G04X1.(** 91-3-20 **)
    #4=#5021
    #5=#5022
    #6=#5023
    G01G90X#10Y#11Z#12F#146
    G04
    #30=#119
    G04X1.(** 91-3-20 **)
    #138=#5041-#5001
    #139=#5042-#5002
    #140=#5043-#5003
    #138=#5061+#141-#30*#24-#138
    #139=#5062+#142-#30*#25-#139
    #140=#5063-#30*#26-#140
    G65P9190X#24Y#25Z#26C#3I#4J#5K#6
    N99M99
    %

    O9120(...POSITION-SAVE/RETURN...)
    IF[#1LT0]GOTO20
    N10
    G04X1.(** 91-3-20 **)
    #[#11]=#5001
    #[#11+1]=#5002
    #[#11+2]=#5003
    GOTO99
    N20
    IF[#18EQ99]GOTO99
    IF[#18EQ98]GOTO25
    G65P9130X#[#11]Y#[#11+1]Z#[#11+2]
    GOTO99
    N25
    G04X1.(** 91-3-20 **)
    G65P9130X#5001Y#5002Z#[#11+2]
    N99M99
    %

    O9130(...POSITIONING...)
    IF[#26GT#5003]GOTO20
    N10
    G00G90X#24Y#25
    Z#26
    GOTO99
    N20
    G00G90Z#26
    X#24Y#25
    N99M99
    %

    O9150(...DATA-TRANSFER...)
    IF[#1EQ#0]GOTO10
    #100=#1
    N10#110=#2
    IF[#2NE#0]GOTO20
    #33=0
    WHILE[#33LE3]DO1
    #[101+#33]=#[4+#33]
    #[111+#33]=#[21+#33]
    #[115+#33]=#[21+#33]-#[4+#33]
    #33=#33+1
    END1
    GOTO99
    N20
    IF[#2GE0]GOTO99
    N30G65P9390B#2X#24
    GOTO[40-#2]
    N41#3000=180(ILLEGAL-MACRO-CALL)
    N42#3000=180(SKIP-SIGNAL-NOT-ON)
    N43#3000=180(OUT-OF-TOLERANCE)
    N44#3000=180(TOOL-FAILURE)
    N99M99
    %


    I think I have them all. Any help is appreciated...

  2. #2
    Join Date
    Feb 2011
    Posts
    0
    Oh, one more:

    O9380(...MEASURING-NO...)
    IF[#2EQ#0]GOTO10
    #506=#2
    GOTO99
    N10#506=#506+1
    N99M99

    Thanks

  3. #3
    Join Date
    May 2004
    Posts
    4519
    Error.

  4. #4
    Join Date
    Sep 2010
    Posts
    1230
    Hi pwilson,
    The actual measure hit is made in the following program. Its the only program that contains a G31 code, and I've highlighted it in RED. The coordinates of where the Skip Signal occurred are gained by reading the System Variables #5061 to #5063, and are highlighted in GREEN

    Its clear that the program only makes one hit, so to make another hit you would add code after the G31 block highlighted in RED, to back away and repeat G31G91X[#32*#24]Y[#32*#25]Z[#32*#26]F#145. Of course, the amount you back off needs to be less than the inverse incremental move of X[#32*#24]Y[#32*#25]Z[#32*#26], otherwise the G31 Skip Signal may not execute on the second touch. A duplicate of the original G31 block can be used for the second touch.

    However, having said the above, the only accuracy advantage that you would gain from taking a second hit would be to average the value of the two Skip Signal sets of coordinates. The program as is, rough positions at a Feed Rate of F1000 (#146) and then makes the Skip Signal touch at F50 (#145). In programs where two touches are made, its usual for the Probe to make touch at a high Feed Rate then back off to where this program is Rough Positioning, and then takes the second touch at a slow Feed Rate.

    Basically, your program is doing the same as a two touch program, but without the first touch. The two touch program is normally one where the position of the feature to be touched is unknown within a reasonably small tolerance, ie 5mm or so. For example, a Tool Measuring Device, where tools of substantial length variation may be being measured for the first time. There are two different forms of Macro program for this purpose, one where a rough length of the tool being measured is either set in the Tool Length Offset registry, or passed to the Macro, and the second where no rough length is either set of passed. In the second form, the tool is positioned over the Tool Setter, and a Rapid move made in Z to a position well above the Setter, say 50mm for the longest tool that will conceivably be used. The slide then moves at a Fast Feed Rate using a G31 Skip Signal command to find the Setter. The slide then backs off a small incremental move and makes a second touch at Slow Feed.

    If you want a slower Feed Rate for the touch, its #145 that needs to be slowed, not #146. #145 is currently set to #145=50 in your listed program.

    Regards,

    Bill

    O9110(...SKIP...)
    (M54)
    #10=#5001
    #11=#5002
    #12=#5003
    #33=#3-#147
    #32=#3+#148
    IF[#33LE0]GOTO10
    #32=#147+#148
    G01G91X[#33*#24]Y[#33*#25]Z[#33*#26]F#146 << This block positions in fresh air so the Feed Rate is rather irrelevant with regards to accuracy. It needs to be fast so not to waste time positioning for the touch in the following G31 block.
    N10
    G31G91X[#32*#24]Y[#32*#25]Z[#32*#26]F#145
    G04X2.
    #27=#3+#148
    G04X1.(** 91-3-20 **)
    #28=SQRT[[#5001-#10]*[#5001-#10]+[#5002-#11]*[#5002-#11]+[#5003-#12]*[#5003-#12]]
    IF[#28LT[#27-0.01]]GOTO20
    G65P9150B-2.
    N20
    G04X1.(** 91-3-20 **)
    #4=#5021
    #5=#5022
    #6=#5023
    G01G90X#10Y#11Z#12F#146
    G04
    #30=#119
    G04X1.(** 91-3-20 **)
    #138=#5041-#5001
    #139=#5042-#5002
    #140=#5043-#5003
    #138=#5061+#141-#30*#24-#138
    #139=#5062+#142-#30*#25-#139
    #140=#5063-#30*#26-#140
    G65P9190X#24Y#25Z#26C#3I#4J#5K#6
    N99M99
    %

    O9120(...POSITION-SAVE/RETURN...)
    IF[#1LT0]GOTO20
    N10
    G04X1.(** 91-3-20 **)
    #[#11]=#5001
    #[#11+1]=#5002
    #[#11+2]=#5003
    GOTO99
    N20
    IF[#18EQ99]GOTO99
    IF[#18EQ98]GOTO25
    G65P9130X#[#11]Y#[#11+1]Z#[#11+2]
    GOTO99
    N25
    G04X1.(** 91-3-20 **)
    G65P9130X#5001Y#5002Z#[#11+2]
    N99M99
    %

    O9130(...POSITIONING...)
    IF[#26GT#5003]GOTO20
    N10
    G00G90X#24Y#25
    Z#26
    GOTO99
    N20
    G00G90Z#26
    X#24Y#25
    N99M99
    %

    O9150(...DATA-TRANSFER...)
    IF[#1EQ#0]GOTO10
    #100=#1
    N10#110=#2
    IF[#2NE#0]GOTO20
    #33=0
    WHILE[#33LE3]DO1
    #[101+#33]=#[4+#33]
    #[111+#33]=#[21+#33]
    #[115+#33]=#[21+#33]-#[4+#33]
    #33=#33+1
    END1
    GOTO99
    N20
    IF[#2GE0]GOTO99
    N30G65P9390B#2X#24
    GOTO[40-#2]
    N41#3000=180(ILLEGAL-MACRO-CALL)
    N42#3000=180(SKIP-SIGNAL-NOT-ON)
    N43#3000=180(OUT-OF-TOLERANCE)
    N44#3000=180(TOOL-FAILURE)
    N99M99
    %


    I think I have them all. Any help is appreciated...[/QUOTE]

  5. #5
    Join Date
    Feb 2011
    Posts
    0
    Hi Bill,

    Thank you for taking the time to reply to my post.

    Currently, the program takes the one hit, where would I put the duplicate line exactly (to take the second hit)? Also, how would I include this second hit in the calculations? You had said "the only accuracy advantage that you would gain from taking a second hit would be to average the value of the two Skip Signal sets of coordinates. The program as is, rough positions at a Feed Rate of F1000 (#146) and then makes the Skip Signal touch at F50 (#145). In programs where two touches are made, its usual for the Probe to make touch at a high Feed Rate then back off to where this program is Rough Positioning, and then takes the second touch at a slow Feed Rate" How do I get it to average the value of the two Skip Signal sets of coordinates?

    Or don't you think I really need the two hits? The only reason I was trying to get the two hits was because the only hit was fast, but now I see it is at F50 and I'm in IPM so that's 50 IPM, which is too fast I think for a hit. We need to manually override it to slow down enough to give us an accurate reading. Well the other reason I wanted two hits is because I am used to seeing that on every other machine. Do you think it's necessary?

    Program 9100 is the probe information program. In the line with that program, we put what the feed rate should be on the hit and on the approach (at least that's what the book says), it would look something like this:

    G65P9100X0Y0Z12.218A.3B.1C0D.197F.05I0.Q4.R60.S0

    Based on what the book says, the "F.05" should control the speed of the hit and the R60. should be the approach speed (I think) - but it doesn't feed at the slow feed rate when running programs like 9300. I might have found the problem when I typed that line above in because each command needs a decimal point with each value and I notice that the "F.05" has the decimal point right after the "F" which might be screwing things up. I will be in the shop in about 2 hours - I will check that out.

    So, do you think I need the second hit or just slow down the current hit from "F50" to something slower and keep it at one hit? If I need the second hit, could you show me where to put it as well as any other lines of code I may need?

    Thanks for your help....

  6. #6
    Join Date
    Sep 2010
    Posts
    1230
    I haven't had a chance to go through the program line by line, but I can tell you about some of your issues.

    1. Your following block, G65P9100X0Y0Z12.218A.3B.1C0D.197F.05I0.Q4.R60.S0, passes the argument A, B, F, and R to O9100, and are Local Variables #1, #2, #9, and #18 in that program. Their values are then allocated to the Local Variables #30, #31, #28 and #29 respectively; and that's where it ends. Accordingly, passing A, B, F and R has no effect.

    2. The Skip program O9110 uses #146 and #145 as the Feed Rate for the Rough Positioning and the Touch respectively. These are Common Variables, set in program O9100 and are not modified anywhere else. Accordingly, if you want a different Feed Rate for either of these, you need to change them in O9100. Clearly, the F and R arguments passed in your call block are not being used to specify or regulate the two Feed Rates.

    3. Clearly, these Macro programs were primarily created for use with a Metric configured machine. However, you could test for the Mode the control is set to, Imperial(G20) or Metric(G21), and convert the Feed Rate stored in #145 and #146 to IMP if the control is set to Imperial Mode. The changes required made to program O9100 are shown in RED

    4. As you're using Imperial mode, it would seem that #147=5 and #148=5 would represent 5" instead of 5mm. These variables are used in the rough positioning and the touch coordinates, they should be converted to inch as well, and probably #144 also.

    You don't need to make a second touch with this program. As I explained in my previous Post, your program does what the two touch program does, but without the first Hard Touch. Its making the Touch at F50 which is a slow feed in Metric Mode. In a two touch program, the second touch would be made at this slow feed rate.

    Does your book give any reference to an "S" argument being passed with this block G65P9100X0Y0Z12.218A.3B.1C0D.197F.05I0.Q4.R60.S0? If so whats its proposed purpose?


    Regards,

    Bill

    O9100(...PROBE-INFORMATION...)
    IF[#19EQ#0]GOTO20
    IF[#19LE0]GOTO10 IF[#19LE0]GOTO9
    #500=#19
    N10#501=#501+1 N9#501=#501+1
    IF[#501LE#500]GOTO11 IF[#501LE#500]GOTO10
    #501=1
    N11#502=4 N10#502=4
    #505=0
    #506=0
    #507=9
    #141=0
    #142=0
    #143=0
    #144=5
    #145=50
    #146=1000
    IF[#4006=21]GOTO11
    #145=[#145/25.4] <Convert to IPM
    #146=[#146/25.4] <Convert to IPM
    N11

    #147=5
    #148=5
    #109=0
    IF[#507EQ6]GOTO12
    #510=0
    N12IF[#501NE1]GOTO20
    #119=0
    N20
    #27=#7
    #28=#9
    #29=#18
    #30=#1
    #31=#2
    #33=0
    WHILE[#33LE7]DO1
    IF[#[24+#33]EQ#0]GOTO30
    #[141+#33]=#[24+#33]
    N30#33=#33+1
    END1
    IF[#3EQ#0]GOTO40
    #119=#3
    GOTO50
    N40IF[#11EQ#0]GOTO50
    #119=#[#11]
    N50IF[#507EQ6]GOTO60
    IF[#20EQ#0]GOTO60
    #510=#20
    N60IF[#4EQ#0]GOTO70
    IF[#4EQ#505]GOTO70
    IF[#4NE0]GOTO65
    #505=0
    GOTO70
    N65#505=1
    N70IF[#17EQ#0]GOTO80
    #502=#17
    N80G65P9390B17.
    N99M99
    %

  7. #7
    Join Date
    Feb 2011
    Posts
    0
    Yes, for the "S" argument, this is what the book says:

    S: Measurement skip frequency (If the number has been already set in common variable #500, S = 0).

    So, setting A & B isn't doing anything in program 9100? It should be the amount of approach and overrun at the time of measurement. In program 9300 (which is the centering program) it is using Local Variables #30 and #31. Also in program 9200 (inside diameter) uses #30 a bunch, but no #31.

    The "F" and "R" are the measurement feed rate and rapid feed rate, which I'm not sure is doing anything (I am about to test it out on the machine). Wouldn't "F" be #9 and "R" be #18? If so, their values are allocated to #28 & #29 in program 9100...

    Regarding the changes required in RED, are these lines supposed to be after the line they are on, or replacing that line, or ?

    Thanks again for your help.

  8. #8
    Join Date
    Feb 2011
    Posts
    0
    Oops, sorry, I see that you've already identified "F" and "R" as #9 and #18...

Similar Threads

  1. X goes up hits pumper than goes down
    By woodentoysnw in forum DNC Problems and Solutions
    Replies: 0
    Last Post: 02-16-2014, 04:09 AM
  2. Hypertherm HPR 260 XD thc gets down till it hits sheet
    By david.sanz in forum Waterjet General Topics
    Replies: 1
    Last Post: 08-09-2012, 01:12 PM
  3. Yet another newbie hits the forum...
    By dori in forum DIY CNC Router Table Machines
    Replies: 0
    Last Post: 03-09-2010, 09:35 PM
  4. X won't reverse when hits home ?
    By SScnc in forum Mach Mill
    Replies: 6
    Last Post: 09-19-2008, 11:14 PM
  5. Sierra Club hits home
    By Shotout in forum Environmental / Alternate Energy
    Replies: 55
    Last Post: 05-13-2007, 06:48 AM

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
  •