Calling pockets with carousel

More
25 Feb 2025 21:30 #322635 by Sziggy_NC
Calling pockets with carousel was created by Sziggy_NC
Currently pocket one on the carousel is called no matter what I do. If I have tool #4 in the spindle but call the #<_current_pocket> the carousel rotates until the index and stops ending up on pocket #1. The code also fails to abort. If I re-run the code the carousel does not rotate, nor does it abort.

The sample of code I am running is as follows.

M68 E0 Q#<_current_pocket> ;set the carousel to move to the right pocket
M64 P0 ; start carousel
G4 P2
M66 P0 L3 Q60 ; wait and check for carousel finish
M65 P0; stop carousel
O040 if [#5399 LT 0]
    (abort, failed to align carousel)
O040 endif   
M2

M64 P0 is "net atc-enable motion.digital-out-00 => carousel.0.enable"
M66 P0 is "net atc-rdy carousel.0.ready => motion.digital-in-00"

I think I copied the "M68 E0 Q#<_current_pocket>" from a video or other forum post.
Is this the correct way to call a pocket when interacting with the carousel component?

My carousel setup is in the main.hal as follows:
# --- setup carousel ---
loadrt carousel pockets=21 encoding=index num_sense=2 dir=2
addf carousel.0 servo-thread

It has an index and a proximity sensor for pocket alignment.
Attachments:

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

More
04 Mar 2025 16:23 #323157 by andypugh
Replied by andypugh on topic Calling pockets with carousel
I don't see any analog-out pin linked in the HAL to pass the M68 E0 to carousel.0.pocket-number.
I suspect that nothing is driving pocket-number and so it always goes to zero.
The following user(s) said Thank You: Sziggy_NC

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

More
07 Mar 2025 02:55 #323398 by Sziggy_NC
Replied by Sziggy_NC on topic Calling pockets with carousel
That would explain my issue. I thought it was odd when I read the M-code explanation of M68. I was calling it without ever setting it...  I now see that section in the toolchangers for dummies video.
I will try "net car-pos-req motion.analog-out-00 => conv-float-s32.0.in"
And "net car-pos-s32 conv-float-s32.0.out => carousel.0.pocket-number"

Thank you for saving me Andy!

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

Time to create page: 0.051 seconds
Powered by Kunena Forum