Need Help with Tool Wear Macro

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Need Help with Tool Wear Macro

Postby BGies » Wed Aug 31, 2022 3:53 pm

I'm using UCCNC on a surface grinder. The axis on the machine are as follows...
Y - Grinding wheel moves +UP and -DOWN.
X - table reciprocates left and right
Z - table moves forward and back.
I'd like to construct the programs so all Grinding work is done on G54, and all wheel dressing is performed on G55.
When dressing a grinding wheel, I'd like to update the Y axis on both coordinates. For example, if I remove .001" off the bottom of the wheel, I'd like the Y axis on G54 and G55 to update accordingly.
I was able to create a very basic macro yesterday that updates the work offset..
exec.ChangeaxisDROvalue( 1, “.001”);
The 1 represents the Y axis. The .001 updates the Y axis Work Offset on the selected coordinate system. This is a step in the right direction for me because I'm not using a G92 temporary offset.
I have no experience writing macros. How can I create an improved macro that will update the Y axis on both coordinate systems? The amount of material removed off the bottom a grinding wheel can change depending on the application and wheel wear. I'd like to store that number as a variable, and then update the Offsets using the variable.
BGies
 
Posts: 2
Joined: Tue May 17, 2022 4:03 pm

Return to Macros

Who is online

Users browsing this forum: No registered users and 14 guests