What's new
What's new

Haas Probing Help

MisterRoboto

Plastic
Joined
Apr 11, 2019
Need some help.

Recently got put onto programming for our machine shop after our old engineer/programmer left because hey knowing how to program Robots is the same as programming mills! as some back ground I do know g code and can machine my own parts(usually with the aid of mastercam) but production level programming is above my head(for now)

we have a VF-7 and I'm needing help understanding the variables and logic programming involved. What I'm trying to do is come in with our probe and probe for a guide arm on a fixture that if present will cause a crash. I'm at the point where I can semi confidently work with the probe to write in a boss probing sequence into a program to pic up the variations on a casting if that helps.


I know on my Fanuc Robots it would be a simple touch sensing routine with the output stored in a register 32 which is then referenced later in my program but after looking through the manual for our mill and what it talks about with the variables I might as well be reading gibberish.

any and all help is greatly appreciated
 
If I'm reading you correctly, this is super easy to do. Depends on how far you want to go with it though... mainly what you want to happen if the probe encounters the guide arm. If you just want it to alarm in that case, then:

M6 Ttt
G65 P9832 (PROBE ON)
G43 Hhh
G0 G54 Xxx Yyy Zzz
G65 P9810 Yyy Fff (PROTECTED POSITIONING MOVE THROUGH WHERE THE GUIDE ARM MIGHT BE)
(WILL ALARM IF GUIDE ARM IS THERE, WILL CONTINUE OF NOTHING IS HIT)
G65 P9833 (PROBE OFF)
---REST OF PROGRAM

This could be done many, many other ways, comparing macro variable results with existing work offsets to make decisions on what to do next, but you'll have to give a lot more information for real help. A picture of the area you're concerned with would be fantastic.
 
what year VF7? the only real distinction is which macros are available for use. Everything you need to know is in the manual

#1-#33 are local variables which are cleared on reset
#101-#999 are global variables, which are not cleared on reset. Most of them can be used. I think #701 is blocked out on Haas machines

in NGC controls, you also have #10001-#10999 which are also mapped to 101-999

G31 is a protected move with the probe. There's a few ways to turn on the probe, the quick way is:

M59 P2; (turn on probe i/o)
G4 P1.;
M59 P3; (turn on probe i/o)

does your machine have VPS? that will also help a bunch.

A forum member, sinha, wrote a wonderful book on macro programming.
 
If I'm reading you correctly, this is super easy to do. Depends on how far you want to go with it though... mainly what you want to happen if the probe encounters the guide arm. If you just want it to alarm in that case, then:

M6 Ttt
G65 P9832 (PROBE ON)
G43 Hhh
G0 G54 Xxx Yyy Zzz
G65 P9810 Yyy Fff (PROTECTED POSITIONING MOVE THROUGH WHERE THE GUIDE ARM MIGHT BE)
(WILL ALARM IF GUIDE ARM IS THERE, WILL CONTINUE OF NOTHING IS HIT)
G65 P9833 (PROBE OFF)
---REST OF PROGRAM

This could be done many, many other ways, comparing macro variable results with existing work offsets to make decisions on what to do next, but you'll have to give a lot more information for real help. A picture of the area you're concerned with would be fantastic.

That's the kick in the teeth right there I don't know enough to know what I don't know :D unfortunately no phones on the floor so I wouldn't be able to snap a pic.

but using that protected move when it does encounter something does it have a register(right word??) go high at the same time? that way say after it finds the clamp arm I can throw a If then statement in to jump to the end of the program vs continuing on with the program
 
That's the kick in the teeth right there I don't know enough to know what I don't know :D unfortunately no phones on the floor so I wouldn't be able to snap a pic.

but using that protected move when it does encounter something does it have a register(right word??) go high at the same time? that way say after it finds the clamp arm I can throw a If then statement in to jump to the end of the program vs continuing on with the program

If the probe is triggered during a protected move, the machine will alarm.

Result will be:
#3000= 86 (PATH OBSTRUCTED)

#3000 being programmable alarm
sets alarm code to 86 which will show up in the alarm history
and will display message path obstructed

Seems like this is easiest for what you're trying to accomplish in this example.


You can use an if-statement to do whatever you want using G31, feed until skip. You can read how that works in the haas mill manual. I suggest you read up on macro programming first. Perhaps the sticky is a good place to start.
 
So I need the crayons broke out I guess guys.

Using the G65 once it hits the guide arm and throws #3000=86 is it done moving until the operator steps in manually and gets the probe out of the way or can I throw a if statement after it so

if[#3000 EQ 86] GOTO 450

then my next question is with using the G31 how close does my repeatability need to be? is there a way to blank out decimal places with a wild card? like

G31 Xxxx f50
IF[#5061 EQ 17.***] GOTO 450
(rest of Program)

reason the G31 concerns me is the Guide arm as +/- .25" of play in it in x and y so how close would I have to get my #5061

Mill is roughly 2-3 years old
 
Last edited:
So I need the crayons broke out I guess guys.

Using the G65 once it hits the guide arm and throws #3000=86 is it done moving until the operator steps in manually and gets the probe out of the way or can I throw a if statement after it so

if[#3000 EQ 86] GOTO 450

No. It won't get to that line since the machine will already be in alarm condition as soon as it hits #3000= 86.
#3000 is for programming alarms, you wouldn't want the control to continue reading after that, right?

then my next question is with using the G31 how close does my repeatability need to be? is there a way to blank out decimal places with a wild card? like

G31 Xxxx f50
IF[#5061 EQ 17.***] GOTO 450
(rest of Program)

no wildcards.

IF [ [ #5061 GE 17. ] AND [ #5061 LT 18. ] ] GOTO450



G31 is feed until skip, meaning it will try to feed to the programmed position, unless the skip signal is triggered (probe stylus hits something) at which point feed will stop. Try it out, program a G31 moving in x or y direction with Z at home. Touch stylus with your finger.


Program a large move thru where the clamp/guide-arm/whatever should be. When it hits, #5061, 5062, 5063 contain position. Compare to where you wanted to go and decide what you want to do. if they're equal, the probe wasn't triggered.

Been a while since I used it, but this snippet from an old program
N404 IF [ ROUND[ 1000 * [ #21 + #1 ] ] EQ ROUND[ 1000 * #5061 ] ] GOTO410 (MISS)

I think I used rounding to only go out to .0001 - the control in the background uses more decimal places and has small rounding errors, so even when I technically got to where I want to go, the machine triggered a hit... or vice versa. #21+#1 was target position, so if the skip position is same as target position, it wasn't triggered.

You probably don't need to round anything in your case.

G0 X0
G65 P9810 Z-0.5 F100.
G31 X5. F100.
IF [ #5061 LT 2. ] GOTO200 (CLAMP OUT OF POSITION)
IF [ [ #5061 GE 2. ] AND [ #5061 LT 2.5 ] ] GOTO300 (CLAMP CORRECT)
IF [ [ #5061 GE 2.5 ] AND [ #5061 LT 4.9 ] ] GOTO200 (CLAMP OUT OF POSITION)

<at this point #5061 would be close to 5, so assume it missed>
N100 (NO CLAMP)
...


N200 (OUT OF POSITION)

N300 (PROGRAM)



Could could make it loop too. What do you want to do, display a message? "Hey move the clamp a little to the left, then try again" LOL
 








 
Back
Top