Go Back   CNC Professional Forums > Machine Specific Troubleshooting Forums (NEW) > Haas Mills & lathes

Reply
 
Bookmark or Share Thread Tools Display Modes
  #1 (permalink)  
Old 08-11-2008, 10:24 AM
CNC Tech
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Use MACRO to set lowest point

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!
Reply With Quote
  #2 (permalink)  
Old 08-12-2008, 06:52 AM
CNC Moderator
 
Join Date: May 2008
Posts: 284
Thanks: 0
Thanked 14 Times in 14 Posts
Default

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)
Reply With Quote
  #3 (permalink)  
Old 08-27-2008, 08:39 PM
CNC Professional
 
Join Date: Oct 2007
Location: INDIA
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear Dav, do u want least value or mean value ?
now how much differance you r getting from 4 points . plz let me know
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -6. The time now is 01:19 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
| Copyright ©2003-2010 Machinetoolhelp.com LLC
CNC Discussion Forums