584,837 active members*
5,460 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2011
    Posts
    146

    Help me understand probe code

    I am new to a job where we use probes extensively. I have never been around probes other than Renishaw tool height probes.

    The most common way that I see probes used at my new job is where a hole is checked - for example the probe will enter a bore, and move and hit 12, 6, 9, and 3 O'clock to measure. It looks for a certain tolerance and if those numbers are not within, it stops the program.

    Another way I have seen it is where the probe will go towards a fixture looking for a part. If the part is not there, the probe never reads once it reaches a certain Z, and it doesn't run that particular part because it know it is not there.

    A third way that I think one can be used is to set a new WCS or offset, and then actually use the numbers it gets there to run off of. I have no idea how to do this.

    For starters, I cannot decipher this code. I have no experience with it. I have been writing normal (common) G code by hand for ten years, but this stuff is new to me.

    We mostly use Blum probes, but here is an example of some code from a Haas machine that also has its own little probe.

    (Probe cycle)
    T20 M06;
    G65 P9832;
    G0 G90 G54 X5.125 Y-11.5;
    G43 Z5.420;
    G31 Z3.337 F50.;
    #1=#5003;
    G00 G91 G28 Z0;
    G65 P9833;
    If [[#1] NE 3.337] GOTO1;
    M01;

    If somebody could break this down in detail, that would be great. I'm sure I can learn this, but I am totally.lost right now. Also, if you happen to know where I can get these answers, please let me know.

  2. #2
    Join Date
    Oct 2016
    Posts
    23

    Re: Help me understand probe code

    (Probe cycle)
    T20 M06; [Change to tool 20]
    G65 P9832; [Probably call macro to turn probe on]
    G0 G90 G54 X5.125 Y-11.5; [Standard g0 move]
    G43 Z5.420; [Move to Z5.4 with tool height comp. Seems to be missing the height callout though, I would enter G43 H20 Z5.420, unless Haas sets that for you during tool change]
    G31 Z3.337 F50.; [Move to Z3.337 at F50, and stop moving if you get a signal from probe that it's touched something]
    #1=#5003; [Write current Z to variable #1]
    G00 G91 G28 Z0; [Home Z]
    G65 P9833; [Probably call macro to turn probe off]
    If [[#1] NE 3.337] GOTO1; [If probe hit something during the G31 move, it won't have reached Z3.337, so this will jump to line N1 and run code from there (like an error message)]
    M01;

  3. #3
    Join Date
    Mar 2011
    Posts
    146
    Quote Originally Posted by c9k View Post
    (Probe cycle)
    T20 M06; [Change to tool 20]
    G65 P9832; [Probably call macro to turn probe on]
    G0 G90 G54 X5.125 Y-11.5; [Standard g0 move]
    G43 Z5.420; [Move to Z5.4 with tool height comp. Seems to be missing the height callout though, I would enter G43 H20 Z5.420, unless Haas sets that for you during tool change]
    G31 Z3.337 F50.; [Move to Z3.337 at F50, and stop moving if you get a signal from probe that it's touched something]
    #1=#5003; [Write current Z to variable #1]
    G00 G91 G28 Z0; [Home Z]
    G65 P9833; [Probably call macro to turn probe off]
    If [[#1] NE 3.337] GOTO1; [If probe hit something during the G31 move, it won't have reached Z3.337, so this will jump to line N1 and run code from there (like an error message)]
    M01;
    Thanks for the reply. That helps a lot. I am still having trouble grasping the practical use. I can't find anything online that explains it in lamens terms either. I have found some macros training pdf's, but even those are over my head. If I could find something that started with simple explanations of simple processes, I might be OK.

  4. #4
    Join Date
    Oct 2016
    Posts
    23

    Re: Help me understand probe code

    Quote Originally Posted by J S Machine View Post
    Thanks for the reply. That helps a lot. I am still having trouble grasping the practical use. I can't find anything online that explains it in lamens terms either. I have found some macros training pdf's, but even those are over my head. If I could find something that started with simple explanations of simple processes, I might be OK.
    The useful purpose of the cycle you posted is to check if there's something above Z3.337. This could prevent collision if the operator installed the wrong part, as you can have it throw up an error instead of running the program. Imagine you're doing a part that gets flipped over for OP2 after doing a face on OP1 and some drilling. Your OP2 program can now make sure the operator didn't accidentally put another OP1 blank in after loading the OP2 program, by probing and going to an error message if the probed Z is too high. By probing down to where the OP2 surface is supposed to be, OP1 program could check that it doesn't have an OP2 part as well. Now you don' t have any ruined parts or tool crashes from the operator getting mixed up on what they were running.

    Taking that to the next step, your program can jump to the OP1 operation if the Z is above a certain amount, and jump to the OP2 operation if it's below. Now you just have to put the part in and hit cycle start, regardless of if it's the OP1 or OP2 part.

    You could also probe two surfaces, and throw up an error message if the difference is greater then your tolerance for that feature.

  5. #5
    Join Date
    Jun 2015
    Posts
    119

    Re: Help me understand probe code

    "G31 Z3.337 F50.; [Move to Z3.337 at F50, and stop moving if you get a signal from probe that it's touched something]
    #1=#5003; [Write current Z to variable #1]"

    The G31 is kind of the heart of probing. It's basically a feed move, but looking for the probe to be tripped. When it hits something-- trips-- then the position is recorded in variables #5061-#5069 (for X,Y,Z, etc). If the probe doesn't hit anything, the final point of the G31 move is recorded in those variables. In the program you reference, the value of the skip signal (the trip) is put into the #1 variable, so that it doesn't accidentally change when the machine goes home. That's all probing is-- moving a really expensive switch (probe) until it gets tripped, then using the information about where it was when it got tripped.

    Then, the IF statement evaluates if the value was what you were expecting to get with the probe. In those evaluations, you can use EQ (equal) , NE (not equal), GT (greater than), LT (less than), LE (less than or equal) or GE (greater than or equal). All that is is IF[What is in the brackets is true]then do this. If #1 doesn't equal 3.337, then Goto line 1. You can leave the THEN out, it is implied.

    Does that help at all?
    ____________________________
    My blog: http://www.fletch1.com

Similar Threads

  1. probe operations in solidcam not generating g code
    By allenp in forum SolidCAM for SolidWorks and SolidCAM for Inventor
    Replies: 5
    Last Post: 05-26-2016, 12:30 PM
  2. Replies: 4
    Last Post: 02-02-2013, 03:59 AM
  3. Replies: 2
    Last Post: 08-16-2011, 05:30 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
  •