What's new
What's new

Macro issue. read the sticky. Still confused!

cc22288

Aluminum
Joined
Dec 27, 2019
Hi all,

I've got a probe cycle in my program. I'd like to read my G54 Z value into a variable, and then use a G10 to set that value as other work offset Z values. I know the value is stored somewhere in the #5201 + range, but when I go to my Haas VF4 controller, my macro variables table only goes up to 999. I cant see any values over that in the table.

Is there a way to see those additional values, or another way that is correct to do what im trying to do? Sorry if this is gone over elsewhere, I did try to search and read what I could before posting.

Thanks!
 
Hi all,

I've got a probe cycle in my program. I'd like to read my G54 Z value into a variable, and then use a G10 to set that value as other work offset Z values. I know the value is stored somewhere in the #5201 + range, but when I go to my Haas VF4 controller, my macro variables table only goes up to 999. I cant see any values over that in the table.

Is there a way to see those additional values, or another way that is correct to do what im trying to do? Sorry if this is gone over elsewhere, I did try to search and read what I could before posting.

Thanks!

Hello cc22288,
System Variables aren't displayed in Variable Pages like Local and Common Variables are. If you physically want to view the value of a System Variable, you need to read it from the System Variable and write it to either a Local or Common Variable. For example, if you wanted to know and look at the current value of System Variable #5201, you would do something like the following:

#1=#5201

Then look up the value of #1 in the Macro Variable registry pages. Reset (including M30) will normally (parameter dependent) set Local Variables back to Vacant (Null). Accordingly, if you do this within a program, you need to look at the Local or Common, Volatile variable you have used before M30 executes. You can execute the above example in MDI and be able to look at the result.

Regards,

Bill
 
Bill!

I legit JUST tried that exact thing as a last ditch effort and it works perfectly. Thank you for affirming that I'm on the right track. thanks again.
 
If you are using a Renishaw probe the variable for Single surface z position is output to #187. You can skip the G10 and just write to the system variable directly for that work offset.

#5243=#187

This puts the value in #187 into G55Z
 








 
Back
Top