Carousel does not home

More
10 Jun 2016 10:35 #75751 by terkaa
Hi,

I have been working with Carousel component on our Cincinnati HMC. I have managed to get it running fwd when enabled but it does not stop. I have checked with HAL_SCOPE that sense-0 and sense-1 are both true at one point of rotation(when pot 1 is in pos). But why does it not stop? config line is "loadrt carousel posckets=30 encoding=index" Machine has home switch and pocket switch. Both are closing type.


Tero

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

More
10 Jun 2016 11:40 #75754 by andypugh
Replied by andypugh on topic Carousel does not home
That might actually be a bug.

When the home is foind the following things happen
(github.com/LinuxCNC/linuxcnc/blob/master...s/carousel.comp#L246)
   case 11: // waiting for index & pulse
        if  ( (! old_index) && (sense(0) && sense(1)) ){ // index found
            p = 1;
            homed = 1;
            homing = 0;
            active = 0;
            state = 0;
        }
        old_index = (sense(0) && sense(1));
        break; // So that we don't see the tool1 pulse twice
    }
}

But it does not stop the motors.
The assumption is that the component is enabled with a valid pocket number on the pocket-number pin. I think what you are seeing is the component homing then searching for pocket 0 (or possibly pocket -1) which does not exist.

If you issue a T-number command or press a jog button then it should stop,

I think my assumption was that the carousel, in index mode, would automatically home itself when the first tool change was requested, or the operator jogged the carousel. It sounds like you are homing the carousel as part of the home sequence?

If you are comfortable editing the carousel.comp file then you could try adding
        motor_fwd = 0;
        motor_rev = 0;
into state 11.

Or, possibly more elegantly, to prevent the motor being turned off for 1mS if there is a pocket request:
if (pocket_number < 1({
        motor_fwd = 0;
        motor_rev = 0;
}

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

More
10 Jun 2016 11:56 #75755 by terkaa
Replied by terkaa on topic Carousel does not home
Hi,

I will give it a go. I am trying to index magazine after machine_is-on is received(with oneshot)


Tero

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

More
10 Jun 2016 12:01 #75756 by andypugh
Replied by andypugh on topic Carousel does not home

I will give it a go. I am trying to index magazine after machine_is-on is received(with oneshot)


Possibly more logical to home it based on a oneshot and axis.z.is-homed, just in case the machine falls over part-way through a toolchange and with one up the spout.

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

More
10 Jun 2016 12:05 #75757 by terkaa
Replied by terkaa on topic Carousel does not home
Hi,

Ok it did the trick. Thanks you. I need to to add some code into carousel anyway because this machine has pin that keeps magazine in its place while motor_fwd/motor_rev commands are off.


Tero

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

More
10 Jun 2016 12:09 #75758 by andypugh
Replied by andypugh on topic Carousel does not home

Ok it did the trick. Thanks you. I need to to add some code into carousel anyway because this machine has pin that keeps magazine in its place while motor_fwd/motor_rev commands are off.


In the vmc_toolchanger demo that locking pin is handled by the G-code routine.

It could potentially be handled in HAL as logic (NOR) on forward/reverse. But the G-code routine makes it easier to abort if the pin is not seen to operate (assuming a pin position sensor) and to not start the carousel move until the carousel is seen to be unlocked.

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

More
10 Jun 2016 12:10 #75759 by terkaa
Replied by terkaa on topic Carousel does not home
Hi,

This carousel can run no matter where Z is. Only thing to look out is that ATC arm is not at magazine.

File Attachment:


Tero

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

More
10 Jun 2016 20:08 #75785 by terkaa
Replied by terkaa on topic Carousel does not home
I am not a fan of G-subroutines :) Would that work with jog fwd/rev buttons? NOR?


Tero

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

More
10 Jun 2016 21:05 #75789 by BigJohnT
Replied by BigJohnT on topic Carousel does not home

Hi,

This carousel can run no matter where Z is. Only thing to look out is that ATC arm is not at magazine.
Tero


Have you looked at using the tool prepare pin and Classicladder to operate your carousel?
For example you issue a T3 and tool 3 is brought into tool change position while you machine then at tool change time you issue a M6 to change the tool.

JT

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

More
11 Jun 2016 09:43 #75808 by andypugh
Replied by andypugh on topic Carousel does not home

I am not a fan of G-subroutines :) Would that work with jog fwd/rev buttons? NOR?


The carousel component is only intended to be a part of a tool-change system. It was anticipated that something else (Classic Ladder, G-code-sub, Python component, real-tim-custom component) would do the actual sequence.

I did write a separate component to handle actuating HAL pins in sequence and waiting for effects but it turned out to just be an inconvenient new programming language, syntactically similar to this one, and about as easy to debug and write, so I abandoned it.

For any tool-changer that requires the Z axis to do more than simply move to a single position a G-code subroutine is generally the simplest way to achieve that.

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

Time to create page: 0.078 seconds
Powered by Kunena Forum