carousel component integration
- Robert312
- Offline
- New Member
-
Less
More
- Posts: 13
- Thank you received: 1
10 Nov 2025 21:30 #338160
by Robert312
carousel component integration was created by Robert312
Dear anyone but mostly Andy Pugh,
I would like to use your carousel component but for my life I cannot figure out how to. I have seen a couple working examples that I have attempted to model mine after but nothing clicks. I do realize that my machine is different and such, but I was hoping to catch onto a pattern. I will attach my files below, the meat of the carousel code is in custom.hal, the complete config is available on Github as well, ( github.com/RachelStarosta21/BostoMatic-w...oolChanger/tree/main ). Any help or pointers would be amazing. My config is currently modeled after this guy: www.forum.linuxcnc.org/38-general-linuxc...9-remap-m6-in-python and previously I was using Eric Salo's tutorial on youtube.
More information about my setup: The tool carousel motor is a servo motor that operates the angular axis of the carousel and spins. The encoder is a quadrature encoder with a scale of 8192(8192 total counts between each the index mark). The machine itself is a bostomatic 312 from the 80s, the machine works. We have previously actuated the tool carousel using a standard angular axis motor and encoder connections, but it seems silly to do work you already have.
Constructive feedback only.
I would like to use your carousel component but for my life I cannot figure out how to. I have seen a couple working examples that I have attempted to model mine after but nothing clicks. I do realize that my machine is different and such, but I was hoping to catch onto a pattern. I will attach my files below, the meat of the carousel code is in custom.hal, the complete config is available on Github as well, ( github.com/RachelStarosta21/BostoMatic-w...oolChanger/tree/main ). Any help or pointers would be amazing. My config is currently modeled after this guy: www.forum.linuxcnc.org/38-general-linuxc...9-remap-m6-in-python and previously I was using Eric Salo's tutorial on youtube.
More information about my setup: The tool carousel motor is a servo motor that operates the angular axis of the carousel and spins. The encoder is a quadrature encoder with a scale of 8192(8192 total counts between each the index mark). The machine itself is a bostomatic 312 from the 80s, the machine works. We have previously actuated the tool carousel using a standard angular axis motor and encoder connections, but it seems silly to do work you already have.
Constructive feedback only.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 19741
- Thank you received: 4579
12 Nov 2025 13:11 #338244
by andypugh
Replied by andypugh on topic carousel component integration
Can you describe how the setup is failing?
One thing that may be wrong is that the "width" seems very large. This is the number of encoder counts each side of the tool slot that is considered properly aligned. Normally it would be at most tens of counts.
The "scale" is meant to be the number of encoder counts between pockets. If your system has 1 servo motor revolution per pocket then your scale is probably correct, but if one servo motor revolution is one carousel revolution then you should divide the encoder full rev counts by the number of pockets.
I am aware that "carousel" has grown to the point that it ought to have a dedicated manual section. (Or maybe there should be a section on toolchangers in general. It's a big subject)
One thing that may be wrong is that the "width" seems very large. This is the number of encoder counts each side of the tool slot that is considered properly aligned. Normally it would be at most tens of counts.
The "scale" is meant to be the number of encoder counts between pockets. If your system has 1 servo motor revolution per pocket then your scale is probably correct, but if one servo motor revolution is one carousel revolution then you should divide the encoder full rev counts by the number of pockets.
I am aware that "carousel" has grown to the point that it ought to have a dedicated manual section. (Or maybe there should be a section on toolchangers in general. It's a big subject)
Please Log in or Create an account to join the conversation.
- Robert312
- Offline
- New Member
-
Less
More
- Posts: 13
- Thank you received: 1
12 Nov 2025 21:32 - 14 Nov 2025 04:51 #338284
by Robert312
Replied by Robert312 on topic carousel component integration
I think I understand the width and scale now, I have illustrated my understanding in the pictures attached. If you could confirm that those measurements are the correct ones for the width and scale parameters that would be amazing.
Our problem is the understanding of how the carousel component integrates with the hardware, for example how come some people leave pins or parameters out. And what is carousel-lock and unlock and how does it relate to the component.
Also my illustration was fast it is not to scale unfortunately, so I included a photo of the actual carousel.
Thank you
Our problem is the understanding of how the carousel component integrates with the hardware, for example how come some people leave pins or parameters out. And what is carousel-lock and unlock and how does it relate to the component.
Also my illustration was fast it is not to scale unfortunately, so I included a photo of the actual carousel.
Thank you
Last edit: 14 Nov 2025 04:51 by Robert312. Reason: Fixed part of the problem
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 19741
- Thank you received: 4579
16 Nov 2025 18:08 #338532
by andypugh
Replied by andypugh on topic carousel component integration
I think that carousel.scale needs to be 8192/12 = 682.666666666 (which is unfortunate, as there is a possibility of rounding errors.
The "width" is how many counts you can be away from the target and still consider the carousel to be aligned. On reflection I might have been able to think of a better name for it. But it corresponds to the "width" of the typical flag or proximity sensor used to detect carousel alignment.
Carousel can be configured in many different ways, and some setups simply don't require certain inputs and outputs.
The "width" is how many counts you can be away from the target and still consider the carousel to be aligned. On reflection I might have been able to think of a better name for it. But it corresponds to the "width" of the typical flag or proximity sensor used to detect carousel alignment.
Carousel can be configured in many different ways, and some setups simply don't require certain inputs and outputs.
The following user(s) said Thank You: Robert312
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 19741
- Thank you received: 4579
16 Nov 2025 18:22 #338533
by andypugh
This is likely to cause rounding errors when the number of encoder counts per pocket position is not an integer. You might need to convert the pin to "float" so that it can take a value of 682.6666666666666 (which means that the rounding error won't be noticed for several million full rotations of the carousel)
Luckily "carousel" is just an ordinary ".comp" file and so it can be re-installed after editing with halcompile.
If you get a "command not found" error then you may need to sudo apt get install linuxcnc-uspace-dev,
Replied by andypugh on topic carousel component integration
pin in signed scale = 100 "The number of stepgen or encoder counts between successive pockets";This is likely to cause rounding errors when the number of encoder counts per pocket position is not an integer. You might need to convert the pin to "float" so that it can take a value of 682.6666666666666 (which means that the rounding error won't be noticed for several million full rotations of the carousel)
Luckily "carousel" is just an ordinary ".comp" file and so it can be re-installed after editing with halcompile.
sudo halcompile --install carousel.compIf you get a "command not found" error then you may need to sudo apt get install linuxcnc-uspace-dev,
The following user(s) said Thank You: Robert312
Please Log in or Create an account to join the conversation.
Time to create page: 0.347 seconds