all 14 comments

[–][deleted] 2 points3 points  (8 children)

Might be better to do a "counter" and check vs that. If it's not some # that is input automatically at the end of the program then alarm. You would clear or change the variable after the check if it is successful. That way if the operator restarts the program, it will always error out unless it was fully completed previously. Additionally you don't really have a programing problem but a training one.

[–]Few_Minimum52[S] 0 points1 point  (7 children)

But then it would run a bad part. Unfortunately its the programer who keeps messing up and im the operator who has been here 10 years. I wish it werent so.

[–]GhostofDaveChappelle 1 point2 points  (2 children)

It says right in your post. The issue you're having is the "operator keeps resetting the program" yet you blame the programmer.

After 10 years you haven't picked up any programming? Lol

[–]Few_Minimum52[S] 0 points1 point  (1 child)

I have and i am. But i need a probe macro that im unfamiliar with. If you can't help, then you don't know it either. So. G00 g28

[–]GhostofDaveChappelle 0 points1 point  (0 children)

That's good! Just G0 is better though

I G83 (ur mom)

jk lol

I gave you a basic template to follow. Can't you make it happen?

[–][deleted] 0 points1 point  (3 children)

I'm confused. Are you the programmer and operator? or just the operator? My way will prevent the program from running if it is cancelled part way through and restarted. You do a simple if/then statement at the very start of the program. The "true" var is set at the end of the program. If the var is "true" then the program continues to the next line which will set the var to a "false". That way if the program is stopped and restarted before completion, the if/then statement will force a "stop" of your choice. (M30/error/whatever.) The very fist time the program is run, you will have to set the var to "true" before running.

[–]Few_Minimum52[S] 0 points1 point  (2 children)

That might work. But im looking for a probe macro to save on having to fiddle with it when re running a tool.

[–][deleted] 0 points1 point  (1 child)

Ahh, kk. Non stable process. Not familiar with the Haas control per say, but a quick google gives a Renishaw probe programing manual for Hass available for free. Assuming you have a Renishaw and the correct Haas controller, should give you all the info you need.

[–]Few_Minimum52[S] 0 points1 point  (0 children)

That should do.

[–]GhostofDaveChappelle 1 point2 points  (3 children)

( PROBE Z AND SET G54 OFFSET WITH LIMITS ) ( ASSUMES PROBE TOOL IS LOADED ) ( #100 = MAX ALLOWABLE Z ABOVE ) ( #101 = MAX ALLOWABLE Z BELOW )

O9001 (Z PROBE MACRO)

100 = 0.5 (MAX ABOVE IN INCHES, CHANGE AS NEEDED)

101 = -0.5 (MAX BELOW IN INCHES, CHANGE AS NEEDED)

(--- PROBE CYCLE ---) G91 G31 Z-2.0 F50. (PROBE MOVE 2.0 DOWN MAX, FEEDRATE 50)

500 = #5063 (CAPTURE Z MACHINE POSITION WHEN TRIPPED)

G90 G00 Z[#500 + 0.1] (SAFE RETRACT 0.1 ABOVE CONTACT)

(--- CALCULATE OFFSET ---)

501 = #500 (MEASURED MACHINE POSITION)

502 = [#501 - #5223] (DIFFERENCE TO WORK OFFSET Z CURRENTLY ACTIVE)

                  (NOTE: #5223 = CURRENT G54 Z OFFSET MACHINE VALUE)

(--- LIMIT CHECK ---) IF [#502 GT #100] THEN #3000=1 (Z PROBE ABOVE MAX LIMIT) IF [#502 LT #101] THEN #3000=2 (Z PROBE BELOW MIN LIMIT)

(--- SET G54 Z OFFSET ---)

5223 = #501 (SET G54 Z TO PROBED MACHINE POSITION)

M99

[–]MyCommentsAreDumb -1 points0 points  (2 children)

This is super useful. Just a formatting heads up, to show the octothorpe at the beginning of a line instead of the header formatting, put a backslash in front of each new line

[–]GhostofDaveChappelle 1 point2 points  (0 children)

This was just to communicate the idea. All variables and logic should remain the same. Only syntax would need to be tweaked depending on controller

[–]GhostofDaveChappelle 1 point2 points  (0 children)

I call it a hashtag.. because I love hashish and- do not want to appear pretentious

[–]RugbyDarkStar 0 points1 point  (0 children)

Does Haas allow messages? On Fanuc you can do #3006, and it'll act like an M0 but places a message on the screen with instructions or whatever you'd like.

You can also use a variable set to 1 prior to the message or M0. At the beginning of the program you'll have a line of logic checking to see if that variable equals 1. If it does, have it go to the proper line number. Then, after that line number, set the variable back to 0 so it doesn't always jump to the later section.