Hello Guest it is April 18, 2024, 09:05:13 AM

Author Topic: Can you read if G68 is active from the API?  (Read 670 times)

0 Members and 1 Guest are viewing this topic.

Can you read if G68 is active from the API?
« on: May 15, 2021, 05:08:45 AM »
Hi,

I'm working on a wizard that should measure and handle the rotation of the coordinate system. However, when I start the wizard it would be good to read out if G68 is active or not and with which angle it is rotated. I'm not able to find anything like that in the API (LUA) manual. Anyone that knows if that's possible or not?

Olovsson   
Re: Can you read if G68 is active from the API?
« Reply #1 on: May 15, 2021, 05:20:04 AM »
Hi,
I suspect it is possible:

Code: [Select]
ROTATION X 2135
ROTATION Y 2136
ROTATION 2137

and:

Code: [Select]
MOD GROUP 12 4012 // Group 12 // modal macro (G66,G66.1,G67)
MOD GROUP 13 4013 // Group 13 // spindle mode
MOD GROUP 14 4014 // Group 14 // coordinate systems
MOD GROUP 15 4015 // Group 15 // exact path or cutting mode
MOD GROUP 16 4016 // Group 16 // coordinate system rotation mode
MOD GROUP 17 4017 // Group 17 // polar mode

These are from the Pound Variables listing in:

https://www.machsupport.com/forum/index.php?topic=40051.0

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Can you read if G68 is active from the API?
« Reply #2 on: May 17, 2021, 12:15:55 PM »
Thanks Craig,

I have check the variables and it seems to work fine. The 4016 Var will be set to 68 or 69. The 2135, 2136 and 2137 is holding the X, Y and rotation angle that is set with the G68.

Olovsson