carousel.comp scale questions.

More
23 Nov 2025 08:18 #339033 by rasmus
carousel.comp scale questions. was created by rasmus
I have a cnc machine with a carousel atc (24 pockets, 10bit encoder), using gray scale absolute encoder and my intention is to use the carousel module to control it.

In initial tests with the module got me getting questions so I have looked into the code at since i did not understand the position value:
github.com/LinuxCNC/linuxcnc/blob/master...onents/carousel.comp

The value I am getting is the raw value as current-position from the carousel component, this is not wrong but I got curious so I looked into the code and now I got more questions regarding when calculating the target position.
In all places in the state machine where the target position is calculated the current_position is used without scaled to the same "size" as the target pocket.
I do not know if I have understood the code correctly or missed something. Maybe I would need to update the component to my specific case.
I think I in my case needs to scale the wanted pocket value to bit value to calculate how far the ATC needs to travel.

Have i understood this correctly or am I missing anything? 
 

Please Log in or Create an account to join the conversation.

More
25 Nov 2025 17:18 #339215 by langdons
Replied by langdons on topic carousel.comp scale questions.
Please provide more info.

What version of LinuxCNC are you running?

Potentially post output of uname -srm

Post a picture or two.

Just some sort of info.

Please Log in or Create an account to join the conversation.

More
25 Nov 2025 18:26 - 25 Nov 2025 20:41 #339216 by rasmus
Replied by rasmus on topic carousel.comp scale questions.
Sorry, I am using version 2.9.3.

and uname -srm:
Linux 6.1.0-30-rt-amd64 x86_64

 
Last edit: 25 Nov 2025 20:41 by rasmus.
The following user(s) said Thank You: langdons

Please Log in or Create an account to join the conversation.

More
28 Nov 2025 22:07 #339406 by andypugh
Replied by andypugh on topic carousel.comp scale questions.
Is the grayscale encoder aligned to the carousel (ie, it corresponds 1:1 with the tool pockets) or is this an encoder on the motor?

The "gray" mode of the carousel comp is intended for the former case.

If it's a motor-mounted encoder look at using "counts" mode. (with an encoder counter that is scaled to the pocket spacing)

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum