What's new
What's new

Using G10 to measure tool without macro

BSolar

Plastic
Joined
Dec 27, 2023
When we measure our tools we use a manual tool setter. The process is touching of on the tool setter and pressing the "tool offset measure" button.
What I would like to do is automate the process by using a G10 command.
We have measured the distance between spindle nose and tool setter and stored it in G59 Z offset, so basically what i want to do is copy the G59 Z coordinate value to the H value for the tool when it's touching the tool setter.
Is this possible without user definable macro's installed?
I assume it could look something like this:
G10 L10 G90 P11 R#G59 Z

Machine: HAAS SMM - Mfd 2003

/Solar
 
How long would that take to type into MDI and try it? My suspicion is you'd need macros turned on for that to work but, it may also vary by year and software version.
 
Try : G10 L10 G90 P11 R#G59 Z : ?
That was just an example of what it could look like. Tried typing it into MDI just to be safe and it won't work. I think you'd have to address the memory somehow, but even just entering "#" will give "BAD CODE" error.
I can write "M109 P501 (TEXT)" without error, that's because it expects a memory address P value. Ideally there would be a G10 equivalent that expects a memory address value instead of a number? 🤔
 
Try : G10 L10 G90 P11 R#G59 Z : ?
The red text is not correct. If it's going to work you'll need the system variable. The system variable for G59Z is #5323. I don't quite understand what you're wanting to do or why, but put the system variable in there and see what happens.

Here's a list of all the Haas System Variables: https://www.haascnc.com/service/online-operator-s-manuals/mill-operator-s-manual/mill---macros.html
and
 
Handy!

Tried the G10 line with the correct address : #5323, but it gave a bad code error when I tried to enter the line to MDI unfortunately.
I was under the impression that you may be able to read system variables without macro installed, but perhaps not at the very least on the generation I'm using.

I should mention that the control is of course pre NGC.
 
Handy!

Tried the G10 line with the correct address : #5323, but it gave a bad code error when I tried to enter the line to MDI unfortunately.
I was under the impression that you may be able to read system variables without macro installed, but perhaps not at the very least on the generation I'm using.

I should mention that the control is of course pre NGC.
I use system variables all the time on non-NGC machines. All of our machines at least allow G10 lines. Have you tried setting work offsets using G10 lines? Maybe try something like this:

G90 G10 L20 P1 X-1. Y-2. Z-3.

Verify this set G154 P1 to these values. Then try:

G90 G10 L20 P1 X#5321 Y#5322 Z#5323

This will set your G154 P1 offset to the same values you have in your G59 work offset. If you're using G154 P1 and don't want to lose that information, change the "P" value in the sample above to an offset you aren't using. -I'd keep it close to G59, so you don't have to scroll through your work offset table to verify they're the same.

This will tell you what your controller can and can not do. If this works, then the code you tried earlier isn't the correct format. If this doesn't work, then I'd say your machine isn't equipped with the proper software.
 
G90 G10 L20 P1 X-1. Y-2. Z-3.
This works as expexted

G90 G10 L20 P1 X#5321 Y#5322 Z#5323
But this gives the bad code error.

Maybe i should have been clearer about this, but the machine does not have macro's enabled. What I'm asking is if there is a way around that, to do what i want.
In clearer terms to press the "Tool offset measure" button for the user in the program. I.E put the G59 Z value into the H value of the current tool.
I thought this might be possible seeing as i can use G10 to change it to a static value.
 
But this gives the bad code error.

I.E put the G59 Z value into the H value of the current tool.
The code I gave you, that gave you the error, would be the way to do it if you had macros enabled. Without macros, it sounds like you can't use system variables -which is absurd to me, but your test just proved it. Unfortunately I don't know of a way to do this without the variables I listed, so I won't be of much help anymore. I hope someone else chimes in that might have an idea you can try!
 
The code I gave you, that gave you the error, would be the way to do it if you had macros enabled. Without macros, it sounds like you can't use system variables -which is absurd to me, but your test just proved it. Unfortunately I don't know of a way to do this without the variables I listed, so I won't be of much help anymore. I hope someone else chimes in that might have an idea you can try!
Same here. Without variables I do not know a way to press a button without pressing the button.
 








 
Back
Top