Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Need probe programming help


Bob W.
 Share

Recommended Posts

One of the nuances of my new Makino PS95 VMC is that I need to type in the probing routines manually, which is a bit of a pain. I am a little spoiled with the Haas probing routines and the ability to just select the routine from a menu. The A51 with the Pro5 control is pretty much the same. If I want to probe the corner of a part in the PS95 I need to jog to the X position and enter the routine (N50 G170 X0. S1), then jog to the Y position and do the same, then the same with the Z position. I would like to set up one of my available M codes to call a macro that will do all of these with one command. This is a macro that I plan to write.

 

The macro routine for probing X, Y, and Z surfaces is O9511. So to probe X, the call would be G65 P9511 X0. S1 (for G54). The issue I am running into is that this macro, along with the protected positioning macro (9510) require that a length offset be active (G43 H1) otherwise the machine will alarm. Is there a way to activate a length offset without moving the probe? If I run the program as follows the machine wants to move the probe to Z0. with respect to the active work offset:

 

G43 H1 Z0.

G65 P9511 X0. S1 (probe x surface, setting G54 x offset)

 

The program I had in mind is something like this:

 

(jog probe to corner of part, .25" above)

#100 = 5 (X width)

#101 = 4 (Y width)

#102 = -.5 (Z drop)

G65 P9510 X[#100/2] Y[-#101/2] F100. (position to center of part)

G65 P9511 Z0. S1 (set G54 Z offset)

G65 P9510 Y[#101/2+.4] (jog to position for probing Y offset)

G65 P9510 Z-[#102]

G65 P9511 Y0. S1 (probe Y offset)

G65 P9510 Z#102

G65 P9510 X[-#100/2-.4] Y[-#101/2-.4] (position for probing X offset)

G65 P9510 Z-[#102]

G65 P9511 X0. S1 (probe X offset)

M30

 

 

Bear in mind that I am very new to this and I realize I probably made a dozen syntax errors and omissions in the above program. The end result I am after is a program that will probe the XYZ locations of a part with one program call such as G65 P9xxx X5 Y4 Z-.5. Any help or advice is much appreciated.

 

Thanks,

Bob

Link to comment
Share on other sites

If you have Renishaw inspection plus routines you can get the EasySet macro for free from Renishaw. The EasySet macro allows you to position manually and then enter a one line command in MDI for your probing. It does X, Y, Z surfaces, Bore, Boss, Web, and Pocket routines.

 

I have the Renishaw software installed. I am just looking to put a few of them together to get a custom routine to save some time. The 9510 and 9511 macros listed above are both Renishaw macros.

 

 

Could u grab the active work offset and calc what position it would be in that active work offset then apply a g43 move to that position which would net in a move of nothing....then ur tool comp would be applied properly and u can probe away. Hope this is what ur looking for!

.

 

Thanks for the reply. My goal is to set up a routine for setting work offsets so I really will not have a consistent reference to work from. If I were adding these routines to an NC program for in-process measurement it would be very easy. I am definitely not an expert when it comes to G-codes.

Link to comment
Share on other sites

if the macro looks up what work offset is active and cal the positio it wont matter what offset is active. Or u could use a work offset just for work setting using the probe.

 

Also if ur probe is always the same number u can modify the tool change routine to active the comp?

 

Or can u do an incremental g43 move?

G91 g43 h# z0.0

 

 

Link to comment
Share on other sites

I have the Renishaw software installed. I am just looking to put a few of them together to get a custom routine to save some time. The 9510 and 9511 macros listed above are both Renishaw macros.

 

 

 

Thats what the EasySet macro is. It's a simple macro call that uses the various Renishaw macros(9810,9811,9812, etc) in a single line call. To set a work offset for a bore you simply manually jog the probe into the bore and then enter the following in MDI; G500 A9. D1.5 S1 (G= customer macro call, A=bore cycle, D=diameter, S=work offset).

Link to comment
Share on other sites

Thats what the EasySet macro is. It's a simple macro call that uses the various Renishaw macros(9810,9811,9812, etc) in a single line call. To set a work offset for a bore you simply manually jog the probe into the bore and then enter the following in MDI; G500 A9. D1.5 S1 (G= customer macro call, A=bore cycle, D=diameter, S=work offset).

 

Right. To probe the corner of a part I currently Jog to the X location and type N50 G170 X.0 S1, then I jog to Y and type N80 G170 Y0. S1, then I jog to Z and type N90 G170 Z0. S1. I do this enough that it would be time well spent to come up with a routine where I could type M556 X5. Y-3. Z-.5 S1 and have all three probed in one routine. In the end it would save a lot of time. My Haas has a routine that will do this but I haven't seen one in the EasySet package. All of the building blocks are there and I am just trying to figure out how to put them together to do exactly what I want done with only typing it in once and jogging the machine once..

Link to comment
Share on other sites

oh i see what ur trying to do now....probably should re-read before i post stuff! DOH!

 

Ya i would go with what yoDoug is saying by incorporating the renishaw macros into it:

 

Something like this maybe

 

- Basically moves the probe in X+,Y+ to set Z then moves back past original X,Y position to probe edges

 

O0001(X+,Y+ Corner Set)

(Sets Z then sets X and Y)

(Jog Probe to .25 above corner you wish to probe)

#1= .5 (Distance to move in X&Y to probe Z surface relative to routine start position)

#2= -.5 ( Z position to measure X and Y relative to probe routine start position)

#3= 1 (Work offset to update)

G91 G65 P9510 X#1 Y#1 F100. (Protected Position)

G90 G65 P9511 Z0.0 S#3 (Measure Z Surface)

G91 G65 P9510 X[-#1-.25] F100. (Move to X probe location

G65 P9510 Z#2 (Move to probe depth

G90 G65 P9511 X0.0 S#3 (Measure X+)

G91 P9510 Z[-#2] F100. (Move to clearance)

G65 P9510 X[-#1+.25]

G65 P9510 Y[-#1-.25] (Moves to Y Probe position

G65 P9510 Z#2 (Move to probe plane)

G90 P9511 Y0. S#3(Measure y)

G91 G65 P9510 Z-#2 (Move to clearance)

G90

M30

 

Just banged that out in a few minutes so some stuff may be wrong. But hopefully this is something that will lead you down the right path.

Link to comment
Share on other sites

Oh I see what you are looking for now, a corner routine. Doesn't inspection plus have a corner routine? I would start there and make custom macro using what they already have. I can post more tomorrow when I'm on my computer.

 

They have a routine for X and Y, but it doesn't include Z. I would like all three to be in one macro.

Link to comment
Share on other sites

oh i see what ur trying to do now....probably should re-read before i post stuff! DOH!

 

Ya i would go with what yoDoug is saying by incorporating the renishaw macros into it:

 

Something like this maybe

 

- Basically moves the probe in X+,Y+ to set Z then moves back past original X,Y position to probe edges

 

O0001(X+,Y+ Corner Set)

(Sets Z then sets X and Y)

(Jog Probe to .25 above corner you wish to probe)

#1= .5 (Distance to move in X&Y to probe Z surface relative to routine start position)

#2= -.5 ( Z position to measure X and Y relative to probe routine start position)

#3= 1 (Work offset to update)

G91 G65 P9510 X#1 Y#1 F100. (Protected Position)

G90 G65 P9511 Z0.0 S#3 (Measure Z Surface)

G91 G65 P9510 X[-#1-.25] F100. (Move to X probe location

G65 P9510 Z#2 (Move to probe depth

G90 G65 P9511 X0.0 S#3 (Measure X+)

G91 P9510 Z[-#2] F100. (Move to clearance)

G65 P9510 X[-#1+.25]

G65 P9510 Y[-#1-.25] (Moves to Y Probe position

G65 P9510 Z#2 (Move to probe plane)

G90 P9511 Y0. S#3(Measure y)

G91 G65 P9510 Z-#2 (Move to clearance)

G90

M30

 

Just banged that out in a few minutes so some stuff may be wrong. But hopefully this is something that will lead you down the right path.

 

Right, I have tried that. My entire problem is that those macros (9510 and 9511) will generate alarms if there isn't a tool length offset active. There needs to be a G43 H1 line after you set #3 in your example program. I am trying to find a way around this. How do I go about activating the probe's length offset without moving it?

Link to comment
Share on other sites
How do I go about activating the probe's length offset without moving it?

 

I don't think this can be done.

#4111 is the system variable for the last H value executed but it's a read only variable IIRC so you can't make a H value "active" without calling it in code.

 

The other problem that comes to mind with what you're trying to do is that the work offset has to be at least roughly defined before you can use the Renishaw Inspection+ macros directly.

 

What I mean is that this line:

 

G90 G65 P9511 Z0.0 S1 (Measure Z Surface)

 

Will try to probe wherever the current Z0 is (plus a bit of overshoot) and the write the actual probed Z position to G54.

But the current Z0 needs to be at least already sensibly defined from where you are positioning the probe before calling the line.

 

That's what the EasySet macros (G170) are designed for.

Just position the probe close to the part and it will probe along the specified axis (for a set distance) until contact is made then it will set the specified work offset to where that probed point is.

 

Yes, you have to run it 3 time for X, Y and Z.

 

Having said that, you could write a macro that makes those calls but you'd have to deal with the protecting positioning moves yourself using G31.

I don't have time right now to knock something up (maybe later today) but as a starter think about this (some stolen from above):

 

(Jog Probe to .25 above corner you wish to probe)

#1= .5 (Distance to move in X&Y to probe Z surface relative to routine start position)

#2= -.5 ( Z position to measure X and Y relative to probe routine start position)

#3= 1 (Work offset to update)

 

G91 G31 X#1 Y#1 F100. (Protected Position)

G91 G31 Z#2

G170 X0 S#3

 

One thing that you'll have to do is between the 2 G31 moves is check the input for the broken skip signal and abort the macro if it's been triggered (a collision has happened).

I assume you know how the skip signal command (G31) works and how you'd check for it's activation? (If not, actually look into one of the Renishaw macros).

 

I'll add more to this later.

Link to comment
Share on other sites

One possible way to do this would be to make your macro set G54 z0 prior to doing any probing by setting it to the current location..

 

You should be able to calculate this by taking the current position in Z (variable #5023) minus the Length of the Probe which should be able to be grabbed from an Offset.. Prob #22?? where ?? is the two digit tool number of the probe ie 01 - 99 - The exact variable should be able to be located in the Fanuc manual.. the variable number will be different depending on what type of memory / parameters in the machine .. some testing should let you figure it out rather easy and you should verify it before using it..

 

Then you could probe anything more you needed to from there..

 

I think the following is about what you would need but I havent tried it .. so its totally untested more written as an example of what could be done than anything..

 

 

(Set G54 Z0 to current position)

(?? below represents Tool Number of probe)

#5223 = #5023 - #22?? (Tool length variable for probe)

 

(Go home in Z)

(Activate Tool offset of Probe and move to Z5. that was just set)

G0G91G28Z0

G0G90G54G43H??Z5

(PROTECTED Position move to Z0)

G65P9510Z0

 

(do any more probing here)

Link to comment
Share on other sites

OK, so to expand on what I wrote earlier.

 

To use the EasySet macro in a program you'll have to deal with all the positioning moves yourself.

 

So try something like this (I've assumed that you've positioned on the bottom left hand corner of a square block):

 

===

(Jog Probe to .25 above corner you wish to probe)

 

#1 = 0.5 (X PROBE POSITION RELATIVE TO START POSITION)

#2 = 0.5 ( Y PROBE POSITION RELATIVE TO START POSITION)

#3 = 0.1 (Z DEPTH FOR XY PROBING)

#4 = 0.0 (Z VALUE FOR PROBED SURFACE)

#5 = 1 (WORK OFFSET, 1 = G54, ETC)

#6 = 0.1 (CLEARANCE VALUE BEFORE PROBING XY EDGE)

 

(***PROBE Z FIRST USING XY POSITIONS***)

#10 = #5021 + #1 (TARGET X POSITION)

#11 = #5022 + #2 (TARGET Y POSITION)

 

G91 G31 X#1 Y#2 F100 (MOVE XY USING SKIP SIGNAL)

IF[[#5021 NE #10] OR [#5022 NE #11]] GOTO 10 (DIDN'T GET TO TARGET POSITION, SKIP SIGNAL TRIGGERED - COLLISION)

 

G170 Z#4 S#5 (PROBE Z SURFACE)

 

(***PROBE X EDGE***)

#10 = #5021 - #1 - #6 (TARGET X POSITION)

#11 = #5022 (TARGET Y POSITION)

 

G91 G31 X-[#1 + #6] Y0.0 F100 (MOVE TO POSITION IN X)

IF[[#5021 NE #10] OR [#5022 NE #11]] GOTO 10 (DIDN'T GET TO TARGET POSITION, SKIP SIGNAL TRIGGERED - COLLISION)

 

(MOVE TO DEPTH IN Z)

#12 = #5023 - 0.25 - #3 (TARGET Z, ASSUMING WE ARE ACTUALLY 0.25 ABOVE THE PART)

G91 G31 Z-[#3 + 0.25] F100

IF[#5023 NE #12 ] GOTO 10 (DIDN'T GET TO TARGET POSITION, SKIP SIGNAL TRIGGERED - COLLISION)

 

G170 X0 S#5 (PROBE X EDGE)

 

 

(***PROBE Y EDGE***)

#12 = #5023 + 0.25 + #3 (TARGET Z CLEARANCE PLANE)

G91 G31 Z[#3 + 0.25] F100

IF[#5023 NE #12] GOTO 10 (DIDN'T GET TO TARGET POSITION, SKIP SIGNAL TRIGGERED - COLLISION)

 

(MOVE TO PROBE Y POSITION)

#10 = #5021 + #1 + #6 (TARGET X POSITION)

#11 = #5022 - #2 - #6 (TARGET Y POSITION)

 

G91 G31 X[#1 + #6] Y-[#2 + #6] F100

IF[[#5021 NE #10] OR [#5022 NE #11]] GOTO 10 (DIDN'T GET TO TARGET POSITION, SKIP SIGNAL TRIGGERED - COLLISION)

 

 

(MOVE TO DEPTH IN Z)

#12 = #5023 - 0.25 - #3 (TARGET Z, ASSUMING WE ARE ACTUALLY 0.25 ABOVE THE PART)

G91 G31 Z-[#3 + 0.25] F100

IF[#5023 NE #12 ] GOTO 10 (DIDN'T GET TO TARGET POSITION, SKIP SIGNAL TRIGGERED - COLLISION)

 

G170 Y0 S#5 (PROBE Y EDGE)

 

(***MOVE BACK TO WHERE WE STARTED***)

 

 

#12 = #5023 + 0.25 + #3 (TARGET Z CLEARANCE PLANE)

G91 G31 Z[#3 + 0.25] F100

IF[#5023 NE #12] GOTO 10 (DIDN'T GET TO TARGET POSITION, SKIP SIGNAL TRIGGERED - COLLISION)

 

 

#10 = #5021 - #1 (TARGET X POSITION)

#11 = #5022 + #6 (TARGET Y POSITION)

 

G91 G31 X-[#1] Y#6 F100

IF[[#5021 NE #10] OR [#5022 NE #11]] GOTO 10 (DIDN'T GET TO TARGET POSITION, SKIP SIGNAL TRIGGERED - COLLISION)

 

M30

 

N10

#3000 = 1 (PROBE COLLISION DETECTED IN MOVE)

M30

 

===

Couple of points:

 

1. I"ve not taken into account turning the probe ON/OFF. Check your probe documentation on how to do this in code (M75/76/78/79?). I wrote this from memory so haven't run it on a machine.

 

2. I'd look at using the XY values to dictate which corner of the block we're probing

 

X+Y+ = bottom left

X-Y+ = bottom right

X+Y- = top left

X-Y- = top right

 

You'll have to check my syntax above to make sure the moves will be correct regardless of negative or positive value.

 

3. I'd also look at wrapping it all up in a custom macro call.

EG. G555 C0.1 D0.1 W1 X0.1 Y0.1 Z0.0

 

Where C is XY clearance, D is Z depth for XY probing and W is work offset to set (XYZ should be self explanatory).

You'd need to change the variables I've used above though.

 

Good luck.

Link to comment
Share on other sites

Maybe I am missing something here but why can't you activate the tool length offset? Even if you had a incremental move of .1 in the z before you started the routine it should work. That way you could use the corner probing macro and the single z hit macro and have 2 lines of code with a few protected positioning moves.

Link to comment
Share on other sites

Maybe I am missing something here but why can't you activate the tool length offset? Even if you had a incremental move of .1 in the z before you started the routine it should work. That way you could use the corner probing macro and the single z hit macro and have 2 lines of code with a few protected positioning moves.

 

For whatever reason, if I run the code G91 G43 H1 Z.1 the machine heads up toward the tool change position. That was one of the first things I tried.

Link to comment
Share on other sites

Gaijin 2007, thanks for all the help. I tried a few protected position moves and I believe this strategy will work. Only thing it was missing is turning on the probe (M964) but that was a simple fix. Next time I get a few minutes, or hours, I'll go ahead and implement this.

 

Bob

Link to comment
Share on other sites

Bob,

 

The tool heads up toward the tool change position because when the tool offset becomes active the machine thinks it needs to move up in z whatever the length of the tool is + the .1 incremental move so that the tip of the tool will be .1 above the initial point..

 

After thinking about that though, In theory a G91G43H1Z-[ tool length ] should activate the tool offset without moving the tool..

 

Although I wouldnt attempt it unless you were up in the air with rapid turned way down .. I think it should work though

Link to comment
Share on other sites

Bob, for immediate, quick and dirty implementation, perhaps just try this:

 

-Have a few different program numbers dedicated to different types of features you'll most commonly be probing. (bottom left corner, top left corner, etc).

-Jog the probe so it's roughly in the corner of the part, and maybe a few thou above the corner.

-Go to your offsets page, and teach the current location (Hopefully the Pro-5 control has a one-touch function for this).

-Don't worry about jogging anywhere else. Just switch to memory, select the correct corner program, and hit cycle start.

 

Then you just need a very simple program:

 

O1001 (BOTTOM LEFT CORNER MEASURE)

G0G91G28Z0.

G54X.2Y-.2

G43H1Z.5

G65P9811Z0.S1. (SINGLE SURFACE ROUTINE, SET Z ORIGIN G54)

G65P9816X0.Y0.S1. (CORNER ROUTINE, SET XY ORIGIN G54)

G0G91G28Z0.

M30

 

 

My Inspection Plus macros are all 98xx, and yours appear to be 95xx, but other than that they look the same. I like an elegant macro just as much as the next techie, but sometimes quick and dirty rules the day.

 

Also, when you get a little more time, you can use the exact same program, but just implement a current position capture before that initial home move. (I have no idea what the current position system variables are on a Makino.) But it would be pretty simple to find out. The block would just look like this, right before the G91G28Z0. at the start of your program.

 

[G54 X register]=[Current X position]

[G54 Y register]=[Current Y position]

[G54 Z register-probe length]=[Current Z position]

 

So hitting cycle start will achieve the same task as manually teaching the XYZ offsets into the register, eliminating a few more keystrokes.

 

You could write, implement, test, and be confident in this macro in 30-45 minutes.

  • Like 1
Link to comment
Share on other sites

Bob,

 

The tool heads up toward the tool change position because when the tool offset becomes active the machine thinks it needs to move up in z whatever the length of the tool is + the .1 incremental move so that the tip of the tool will be .1 above the initial point..

 

After thinking about that though, In theory a G91G43H1Z-[ tool length ] should activate the tool offset without moving the tool..

 

Although I wouldnt attempt it unless you were up in the air with rapid turned way down .. I think it should work though

 

I'll try that and see what happens.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...