Force a-axis rotation with WCS output..

Force a-axis rotation with WCS output..

Rob_Lockwood
Advisor Advisor
1,758 Views
3 Replies
Message 1 of 4

Force a-axis rotation with WCS output..

Rob_Lockwood
Advisor
Advisor
Another thing that I should be able to figure out, but am struggling with. I need the rotary position to output whenever the WCS changes, similar to below.

G0G17G40G49G80G90G94
T13M6(1 CENTER DRILL - FOR ENGRAVING)
G54
G0A90.
M60
M8
G0X-6.3003Y4.674S10695M3
G0G43Z2.0446H13
P1M98
G55
G0X-6.3003Y4.674S10695M3
G0G43Z2.0446H13
P1M98
G56
G0X-6.3003Y4.674S10695M3
G0G43Z2.0446H13
P1M98
G57
G0X-6.3003Y4.674S10695M3
G0G43Z2.0446H13
P1M98
M9
M1
G0G17G40G49G80G90G94


G0G17G40G49G80G90G94
T13M6(1 CENTER DRILL - FOR ENGRAVING)
G54
G0A90.
M60
M8
G0X-6.3003Y4.674S10695M3
G0G43Z2.0446H13
P1M98
G55
G0A90.
M60
G0X-6.3003Y4.674S10695M3
G0G43Z2.0446H13
P1M98
G56
G0A90.
M60
G0X-6.3003Y4.674S10695M3
G0G43Z2.0446H13
P1M98
G57
G0A90.
M60
G0X-6.3003Y4.674S10695M3
G0G43Z2.0446H13
P1M98
M9
M1
G0G17G40G49G80G90G94


Rob Lockwood
Maker of all the things.
| Oculus | | Locked Tool | | Instagram |

0 Likes
Accepted solutions (1)
1,759 Views
3 Replies
Replies (3)
Message 2 of 4

AchimN
Community Manager
Community Manager
Accepted solution
You could use following code:
  if (newWorkOffset) {
    forceWorkPlane();
  }


Just place that below the WCS section into your post or have a look at my attached example.


Achim.N
Principal Technology Consultant
0 Likes
Message 3 of 4

Rob_Lockwood
Advisor
Advisor
Achim Nacke wrote:

You could use following code:
  if (newWorkOffset) {
    forceWorkPlane();
  }


Just place that below the WCS section into your post or have a look at my attached example.


I swear i'd tried that, and didn't get output.

Works perfectly now.

Big thanks, Achim.


Rob Lockwood
Maker of all the things.
| Oculus | | Locked Tool | | Instagram |

0 Likes
Message 4 of 4

scottmoyse
Mentor
Mentor

Hey Rob.... it's been a long time now. But were you attempting to get this to post out A0 with each WCS change, or A90 as your sample code shows? Because getting it to post A0 is really straight forward, but if you wanted to post out rotational angles relative to the previous WCS, things would get more complicated.


Scott Moyse
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature


RevOps Strategy Manager at Toolpath. New Zealand based.

Co-founder of the Grumpy Sloth full aluminium billet mechanical keyboard project

0 Likes