G10 Syntax and Usage -CNC12 lathe-
Posted: Tue Apr 08, 2025 5:44 pm
Alright
I'm back to ask more stupid questions... Beware LOL
Without getting into the weeds on details of use, I'm writing a macro to automate a repeat task... part of it involves adding an incremental offset to an auxiliary axis. It looks like G10 can do what I need but its syntax and function seems to be a little different than other controllers such as Fanuc. To start, it looks like no "L" value is required.. Then P isn't limited to designating what axis, at least per my understanding from the macro manual..
To test I put G10 P1 Z0.1 thinking it would apply a 0.1" offset to Z but to my surprise it made the Z axis move 0.6" to 0.1 (thankfully it was at Z -.5 to protect for this potential scenario). I'm not exactly sure why this happened either...
Could anyone tell me what I have wrong here? I was thinking maybe i need to request Z position, store as a variable, add (or subtract) in my offset via the stored variable, then use G10 to "overwrite" the Z axis parameter using the variable. At that point I'm out of my depth enough that I figure its worth asking the question here.
As always, thanks in advance and cheers!
I'm back to ask more stupid questions... Beware LOL
Without getting into the weeds on details of use, I'm writing a macro to automate a repeat task... part of it involves adding an incremental offset to an auxiliary axis. It looks like G10 can do what I need but its syntax and function seems to be a little different than other controllers such as Fanuc. To start, it looks like no "L" value is required.. Then P isn't limited to designating what axis, at least per my understanding from the macro manual..
To test I put G10 P1 Z0.1 thinking it would apply a 0.1" offset to Z but to my surprise it made the Z axis move 0.6" to 0.1 (thankfully it was at Z -.5 to protect for this potential scenario). I'm not exactly sure why this happened either...
Could anyone tell me what I have wrong here? I was thinking maybe i need to request Z position, store as a variable, add (or subtract) in my offset via the stored variable, then use G10 to "overwrite" the Z axis parameter using the variable. At that point I'm out of my depth enough that I figure its worth asking the question here.
As always, thanks in advance and cheers!