Hey andy

I have the classic ladder program I have made working fine to chose select
the correct pocket and I am getting pretty used to classic ladder now.

currently my formulas for choosing direction are simply comparing the
current pocket number to the required pocket number  (C1 is the current
toolnumber.  C2 is the required toolnumber.
%C1.V>%C2.V   ----------------------------------set MAG fwd
%C1.V<%C2.V   ----------------------------------set MAG REV

%C1.V=%C2.V   ------------------------------------reset coils (turn off
magazine motor) and tell linux cnc

this is slightly better than just going in forward direction but not that
much better.  it works pretty good if the numbers are 4 and 5 but not if
they are 23 and 0  the magazine goes the long way round and takes ages.

How would I use your Hal component with this  as you say all I want it to
do it chose the correct direction for the shortest path..  I could probably
do it within classic ladder if I could work out the equations.  But I am
definitely open to using the hal component if needed.  I am just a little
confused how it all works

regards

Andrew

On Wed, Apr 15, 2020 at 4:49 AM andy pugh <bodge...@gmail.com> wrote:

> On Tue, 14 Apr 2020 at 12:02, andrew beck <andrewbeck0...@gmail.com>
> wrote:
>
> > I don't quite understand if the carousel component can interlock the
> motors
> > so I don't turn both fwd and rev contactors on at the same time for
> > example.  I have been told that the contactors make a quite nice BOOM
> when
> > that happens lol.  I suppose that I can probably use a combination of hal
> > components and classic ladder for a toolchanger as they all can be linked
> > together its really up to the imagination/
>
> Yes, carousel is only really meant to be one part of a toolchange
> system. It is only really intended to calculate the current carousel
> position and choose a direction to turn it.
> I would suggest that you can use the direction outputs and the ready
> outputs as input to CL, and then let CL do the direction interlocking.
> (Especially as there may need to be a dead-time between direction
> selections?)
>
> It looks like the component might potentially set both outputs at the
> same time, for a nanosecond or two:
>
> https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/carousel.comp#L269
> But if you consider that those pins then need to pass through, at the
> very least, a hardware driver running in a separate HAL function, it
> can only really cause a problem if the system crashes between the two
> lines of code...
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1912
>
>
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to