| |||
|
I am using a probe, on a Haas, which reads a few points at top of a plate (work piece) and stores them respectively in different work offsets. I need to find the lowest point and enter it in the program workoffset (G54). For now I am doing it manualy every time. I wonder if there is a way to program that in macro? To put it in words it would be something like: (G54 Z) = ??THE LEAST OF?? (G55 Z) OR (G56 Z) OR (G57 Z) OR (G58 Z) Closer to actual code it would be: #5223 = ??THE LEAST OF?? #5243 OR #5263 OR #5283 OR #5303 ??? I would appreciate any help or opinion on this. Thanks! |
| |||
|
I am not sure if there is a function for the Haas that can do what you are looking for. If your machine allows IF, and GT statments this should work. Lets say that #5243, #5263, #5283, #5303 are your 1-4 probe hits and #5223 is the G54 Z. IF[#5243GT#5263]GOTO1 IF[#5243GT#5283]GOTO1 IF[#5243GT#5303]GOTO1 #5223=#5243 M30 OR M99----depend if it is a sub program or main program N1 IF[#5263GT#5283]GOTO2 IF[#5263GT#5303]GOTO2 #5223=#5263 M30 OR M99 N2 IF[#5283GT#5303]GOTO3 #5223=#5283 M30 OR M99 N3 #5223=#5303 M30 OR M99 I did not run this through anything to make sure there were no errors but it should work. Best of luck Stevo (The opinions in this post are my own and not those of machinetoolhelp.com and its management) |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |