Hi there,
I am currently using a custom G-code on our lathe to safely call up a tool and turn on spindle, coolant etc.
Here is the calling code:
G800 T0101 X1.7 Z.05 S500. M8
I would like to be able to program in the tool nose radius and tool tip direction using the system variables. So based off of the tool offset value (TXXXX) in the calling G-code it could automatically set the correct tool nose radius and tool tip vector from the program.
Something like this:
Where
V = tool tip vector
R = tool nose radius
G800 T0101 X1.7 Z.05 S500. M8 V3. R.032
I have considered automatically assigning a tool offset value based on the turret pos which I think I could get to work, but would like to be able to leave Turret position and offset in calling program if possible.
I am not sure if there is a way to do this?
Any ideas / help appreciated.
Thanks
In order to do this using your lathe's unique G-code, the idea is to get system variables that are associated with the geometry of the tools, such the tool tip vector and tool nose radius. geometry dash serves as an excellent introduction to platformers. Its blend of challenge and fun makes it appealing to newcomers, opening the door to a wider world of gaming experiences.
You're aiming to automate the process of inputting tool nose radius (R) and tool tip vector (V) based on the tool offset (TXXXX) in your G-code. This would streamline your programming and reduce the risk of manual errors. getaway shootout
The possibility of assigning tool nose radius and tool tip direction might depend on the capabilities of your CNC controller. Some controllers allow for more advanced parameter handling within macros. If your controller has advanced macro B capabilities, you could assign the values in a system macro as you’ve described, but older controllers might require manual input tunnel rush.
To achieve this behavior with custom G-code for your lathe, the concept involves retrieving system variables related to tool geometry, such as the tool nose radius and tool tip vector, based on the tool offset (TXXXX). While standard G-code generally doesn't directly support using variables like V (tool tip vector) and R (tool nose radius) in this way, some CNC systems allow for user-defined slope macros or parametric programming, such as Fanuc's custom macro B or similar systems.
If any is curious I found a solution after playing around with for a few days.
Below is code that will set tool tip vector and tool nose radius based off of the "T" values offset in the G65 line.
G65 P8004 T0101 Q3. R.032
O8004(OFFSET PROGRAM)
#1=#4120 (STORE CURRENT TXXX IN USE)
#2=#1/100
#3=FIX[#2]
#4=#2-#3
#4=ROUND[#4*100](THIS VAR HOLDS OFFSET VALUE)
G10 P[10000+#4] Q#17 R#18
M00
M30