Forgot to attach the pictures in the last response. It shows the behaviour
without the "+ 1" on line 235.

Den sön 10 jan. 2021 kl 13:20 skrev Andreas Linnarsson <
andreas.linnars...@gmail.com>:

> I reached milestone today when I got the tool change command to work -
> sort of. The "iocontrol.0.tool.*" pins were not connected correctly. My
> toolchange.ngc is now called correctly and it activates the carousel
> component as expected. The first pocket trigger still generates problems
> since the carousel continue to think it has gone when step further than it
> really has. After homing it stops at pocket #1 and the
> carousel.0.current-position also indicates #1. But it's after that things
> gets a bit strange. Issuing T5 M6 will move the turret to the physical
> pocket #4 whereas carousel.0.current-position will indicate #6.
>
> Every tool change from there on will offset the commanded tool pocket
> compared to the actual tool pocket by one, where the physical pocket is
> lagging the commanded tool. If I try to shift just one tool forward it has
> the same result as when I tried to jog one position earlier - it just goes
> back and forth within the same pocket, although increasing
> carousel.0.current-position by one . To make it change one physical
> position forwards I thus have to command a tool that is two positions ahead.
>
> Adding "+ 1" to the target on line 235 in carousel.comp takes care of the
> problem from a physical aspect but carousel.0.pocket-number won't match
> carousel.0.current-position afterwards as a result of that change. Due to
> that carousel.0.ready will not go high and therefore the subroutine will
> timeout.  I haven't found out how to deduct "one" from
> carousel.0.pocket-number variable but if I do think things will match. Not
> a global solution but it might be good enough for me.
>
> *edit*
> I got your last answer right before sending this so I will evaluate your
> response and see what I can come up with. I didn't know that it wasn't
> necessary to remap to make this work. I followed your advice to take a look
> at the sim.axis.vismach.VMC_toolchange example in a thread at the forum.
> But that part seems to work anyway.
>
> Regards,
>
> Andreas
>
> Den sön 10 jan. 2021 kl 10:43 skrev Andreas Linnarsson <
> andreas.linnars...@gmail.com>:
>
>> Andy: Here's my first shot at using the HAL scope. As you can se the
>> motor is stopped as soon as the pocket sensor that it backed away from
>> triggers again. Thus the current-position increase at every push of the
>> "fwd jog" even though it just goes back and forth within the same pocket.
>> Please get back if you want me to add any other signals and I will rerun
>> the capture. As you've already commented I'm having some problem with the
>> call of the remapped M6 command but I'm a bit unsure about how that would
>> change the behaviour of the carousel component. But I'm invesigating that
>> as well now, of course.
>>
>> Andrew: I will try and record a movie clip if that will help to identify
>> the problem but the behaviour I experience is logical, to me at least.
>>
>> Regards,
>>
>> Andreas
>>
>> Den lör 9 jan. 2021 kl 23:52 skrev Andreas Linnarsson <
>> andreas.linnars...@gmail.com>:
>>
>>> You mean that the Tn might work correctly even though the fwd jog
>>> doesn't? Will the carousel component behave differently if I request T4
>>> from say T3 compared to forward jog from T3? I will try this out since my
>>> main goal isn't to jog around the turret manually but make it work for the
>>> intended use, of course.
>>>
>>> Den lör 9 jan. 2021 kl 23:46 skrev andy pugh <bodge...@gmail.com>:
>>>
>>>> On Sat, 9 Jan 2021 at 21:32, Andreas Linnarsson
>>>> <andreas.linnars...@gmail.com> wrote:
>>>>
>>>> > target = current_position + jog_fwd - jog_rev + 1; // Added "+ 1"
>>>> >
>>>> > The only problem I face is that the current tool number increase by
>>>> two for
>>>> > every fwd jog...
>>>>
>>>> I worry that you are concentrating too much on jogging and not enough
>>>> on correct behaviour with a Tn command.
>>>>
>>>> --
>>>> 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