Switching coordinate systems.

Moderators: TomKerekes, dynomotion

Post Reply
Alexanders
Posts: 45
Joined: Wed May 03, 2023 12:54 am

Switching coordinate systems.

Post by Alexanders » Wed Dec 11, 2024 9:33 am

I use the spindle as the C axis :

Code: Select all

DefineCoordSystem6(0,1,2,-1,-1,5);
or as a simple spindle:

Code: Select all

DefineCoordSystem6(0,1,2,-1,-1,-1);
How can C Program determine whether the axis is included in coordinated movements or not?

User avatar
TomKerekes
Posts: 2724
Joined: Mon Dec 04, 2017 1:49 am

Re: Switching coordinate systems.

Post by TomKerekes » Thu Dec 12, 2024 12:57 am

You can check the current Axis settings with:

Code: Select all

// coordinate systems #0 - axis definitions
extern int CS0_axis_x; // Axis channel number to use as x
extern int CS0_axis_y; // Axis channel number to use as y  
extern int CS0_axis_z; // Axis channel number to use as z  
extern int CS0_axis_a; // Axis channel number to use as a  
extern int CS0_axis_b; // Axis channel number to use as b  
extern int CS0_axis_c; // Axis channel number to use as c  
extern int CS0_axis_u; // Axis channel number to use as u  
extern int CS0_axis_v; // Axis channel number to use as v  
Another option is for you to keep track of what you set it to in a global variable or Virtual Bit
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply