Page 1 of 1

G10 Syntax and Usage -CNC12 lathe-

Posted: Tue Apr 08, 2025 5:44 pm
by MatterHKR42
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!

Re: G10 Syntax and Usage -CNC12 lathe-

Posted: Wed Apr 09, 2025 6:27 am
by suntravel
G10 P1 Z0.1 is setting the Z offset to 0.1 as an absolute value.

If you want to incremental increase the offset +0.1 use : G10 P1 Z[#11001+0.1]

Uwe

Re: G10 Syntax and Usage -CNC12 lathe-

Posted: Wed Apr 09, 2025 1:39 pm
by cncsnw
You should also be able to use U and W for incremental offset changes:

Code: Select all

G10 P1 W0.1  ; add 0.1 to T1 Z offset

Re: G10 Syntax and Usage -CNC12 lathe-

Posted: Sat Apr 26, 2025 8:53 am
by MatterHKR42
suntravel wrote: Wed Apr 09, 2025 6:27 am G10 P1 Z0.1 is setting the Z offset to 0.1 as an absolute value.

If you want to incremental increase the offset +0.1 use : G10 P1 Z[#11001+0.1]

Uwe
Thanks for taking the time to help! this helped move the project along but hit another snag..
Looks like I'm assigning the project to axis to "A"

Would there be an equivalent G10 command for axis A?
Looks like #5024 is absolute position of A and #5044 is "current" (whatever reference offset that means)
Cant seem to find what the A axis version of #11001 would be or what it is..

Thanks

Re: G10 Syntax and Usage -CNC12 lathe-

Posted: Sat Apr 26, 2025 9:11 am
by suntravel
There are nor A values in the lathe tool lib, only X and Z but you can use #2700 for the thrid axis WCS, #2800 for forth axis WCS ect.

Page 153 in the lathe manual

Uwe

Re: G10 Syntax and Usage -CNC12 lathe-

Posted: Tue Apr 29, 2025 6:21 pm
by MatterHKR42
suntravel wrote: Sat Apr 26, 2025 9:11 am There are nor A values in the lathe tool lib, only X and Z but you can use #2700 for the thrid axis WCS, #2800 for forth axis WCS ect.

Page 153 in the lathe manual

Uwe
Thanks for the response. I figured out what I needed through resolving another issue.
What I needed was a way to force the DRO position to a calculated value. Ironically, this was the same issue I was having with the tool turret on my lathe.
M26 was the answer.. prior to this I didn't know it could be used to force a value other than zero.. there's still other issues with this particular system but it is a huge step forward.

Re: G10 Syntax and Usage -CNC12 lathe-

Posted: Tue Apr 29, 2025 7:48 pm
by suntravel
M26 is setting home for an axis, sure the DRO will change after this...

But you cannot force the DRO, it displays the actual current position from home position depending on the WCS, tool offset and tool wear.

Uwe

Re: G10 Syntax and Usage -CNC12 lathe-

Posted: Wed Apr 30, 2025 3:32 pm
by cnckeith
maybe by 'force' he means change it? (offset?)

what is the goal here?