Carousel with counts move x amount of pockets
- GDTH
- 
				 Topic Author Topic Author
- Offline
- Senior Member
- 
				  
		Less
		More
		
			
	
		- Posts: 58
- Thank you received: 2
			
	
						06 Sep 2025 19:19				#334559
		by GDTH
	
	
		
			
	
	
			
			 		
													
	
				Carousel with counts move x amount of pockets was created by GDTH			
			
				Hi all,Before I head to bed, I wanted to ask if anyone can quickly help me with my current frustration: getting this machine’s carousel working.I’ve got homing working, but there’s something odd—if the carousel is already homed and I try to home it again, nothing happens. I’ve managed to get M13 working, but I still need to sort out M11 and M12. I’ll attach my HAL and INI files here.I’m wondering if there are better ways to handle this, or if there are any good examples I could look at. My machine doesn’t have sensors for the pockets (which I would have preferred), so I’m working around that.Right now my biggest struggle is that I’m getting “unary” errors from my subroutine. When I try to trace the problem, the error messages aren’t very clear about what’s actually wrong. Is there a way to debug subroutines more effectively? At the moment the basic error messages don’t give me enough detail to figure it out.Any tips would be greatly appreciated			
					Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						09 Sep 2025 12:48				#334691
		by andypugh
	
	
		
			
	
			
			 		
													
	
				Replied by andypugh on topic Carousel with counts move x amount of pockets			
			
				Are you sure that EVAL[.....] is valid? Is that documented somewhere?
I don't recognise it as one of the documented unary functions, but can see examples of its use on the forums. I know that py and pyrun exist (I can see them in the source code, they may not be documented) but eval has me stumped.
					I don't recognise it as one of the documented unary functions, but can see examples of its use on the forums. I know that py and pyrun exist (I can see them in the source code, they may not be documented) but eval has me stumped.
Please Log in or Create an account to join the conversation.
- GDTH
- 
				 Topic Author Topic Author
- Offline
- Senior Member
- 
				  
		Less
		More
		
			
	
		- Posts: 58
- Thank you received: 2
			
	
						16 Sep 2025 19:17				#335081
		by GDTH
	
	
		
			
	
	
			
			 		
													
	
				Replied by GDTH on topic Carousel with counts move x amount of pockets			
			
				I’ve made some good progress with the carousel. It turned out that some parameters need to be set to 0 when using counts mode, and with that change I’ve got it almost working perfectly. Homing and jogging both run flawlessly through the shell M-codes.The only issue I’m stuck on now is when I tryto rotate to a specific pocket. At that point it just hangs in state 8, because thevariable stays at 0 and won’t let the sequence continue.What’s odd is that when jogging it also goes through state 8, but in that case it’s able to pass through just fine. So it feels like I’m missing something.Any tips or ideas on what might be causing this?			
					M120align-pinPlease Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						17 Sep 2025 18:04				#335134
		by andypugh
	
	
		
			
	
			
			 		
													
	
				Replied by andypugh on topic Carousel with counts move x amount of pockets			
			
				What does M120 do?			
					Please Log in or Create an account to join the conversation.
- GDTH
- 
				 Topic Author Topic Author
- Offline
- Senior Member
- 
				  
		Less
		More
		
			
	
		- Posts: 58
- Thank you received: 2
			
	
						17 Sep 2025 18:15				#335135
		by GDTH
	
	
		
			
	
			
			 		
													
	
				Replied by GDTH on topic Carousel with counts move x amount of pockets			
			
				Basically what the original m10 from probe basic does. It tells the carousel comp the pocket number			
					Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						17 Sep 2025 18:21				#335137
		by andypugh
	
	
		
			
	
			
			 		
													
	
				Replied by andypugh on topic Carousel with counts move x amount of pockets			
			
				What happens if you just wire selected-pocket directly in HAL?			
					Please Log in or Create an account to join the conversation.
- GDTH
- 
				 Topic Author Topic Author
- Offline
- Senior Member
- 
				  
		Less
		More
		
			
	
		- Posts: 58
- Thank you received: 2
			
	
						18 Sep 2025 06:32				#335148
		by GDTH
	
	
		
			
	
	
			
			 		
													
	
				Replied by GDTH on topic Carousel with counts move x amount of pockets			
			
				mmh, i dont understand. how would you do this? I thought you had to do it through a subroutine or m code. 
Btw, this is how the m120 looks like.
					Btw, this is how the m120 looks like.
Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						24 Sep 2025 14:31				#335368
		by andypugh
	
	
		
			
	
			
			 		
													
	
				Replied by andypugh on topic Carousel with counts move x amount of pockets			
			
				At its simplest
Then whenever the carousel.0.enable goes true, it will drive to that pocket.
All the subroutines etc are about the other things that have to happen before carousel motion, such as tool unload, spindle lift etc.
					net requested-pocket iocontrol.0.tool-prep-pocket => carousel.0.pocket-numberThen whenever the carousel.0.enable goes true, it will drive to that pocket.
All the subroutines etc are about the other things that have to happen before carousel motion, such as tool unload, spindle lift etc.
Please Log in or Create an account to join the conversation.
- GDTH
- 
				 Topic Author Topic Author
- Offline
- Senior Member
- 
				  
		Less
		More
		
			
	
		- Posts: 58
- Thank you received: 2
			
	
						27 Sep 2025 13:52				#335488
		by GDTH
	
	
		
			
	
			
			 		
													
	
				Replied by GDTH on topic Carousel with counts move x amount of pockets			
			
				okay, i will sure to be using in that in the end. however when i am using M120 or just put the pocket number manualy it just gets stuck in state 8 where it is waiting for align_pin to be something else then 0. As nothing moves , this will never happen. also i constantly getting the error "the toolchanger has hailed its alignment check". I have used the carousel comp many times. howeve this is the first time with only a stepgen. with that in mind and that i barely find anyone use it the same i am question if this actualy works with stepgen (Counts).			
					Please Log in or Create an account to join the conversation.
- GDTH
- 
				 Topic Author Topic Author
- Offline
- Senior Member
- 
				  
		Less
		More
		
			
	
		- Posts: 58
- Thank you received: 2
			
	
						27 Sep 2025 18:34				#335499
		by GDTH
	
	
		
			
	
			
			 		
													
	
				Replied by GDTH on topic Carousel with counts move x amount of pockets			
			
				i have copied the carousel component and removed the align_pin if statement from state 8. I think this is ment for dc motors. So far it seems to work fine.			
					Please Log in or Create an account to join the conversation.
		Time to create page: 0.087 seconds	
