Calling pockets with carousel

More
1 year 8 months ago #322635 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.

Please Log in to join the conversation.

More
1 year 7 months ago #323157 by andypugh
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.

Please Log in to join the conversation.

More
1 year 7 months ago #323398 by Sziggy_NC
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 to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum