OK, I've tested a few things now. First of all I went back to my most basic
machine configuration and implemented your version of the
toolchange_index.hal together with the unmodified version of carousel.comp.
Completely ditching the M6 remap solution used earlier. Thereafter I tested
the following:

1. Unmodified carousel.comp
Result: Homing works as it should, but in the same way as before the
physical pocket lags the demanded pocket by one unit for each tool change
and the error is accumulating for each successive tool change.

2. carousel.comp modified with "current_position -= 1;" on row 319 (within
case 3:)
Result. Same as for test 1.

3. carousel.comp modified with "if (inst_dir == 2 || motor_fwd) old_index =
sense(1);" instead of old_index = sense(1);on row 198 and 214.
Result. Same as for test 1.

4. carousel.comp modified with "if (inst_dir == 2 || motor_fwd) old_index =
sense(1);" moved to next row after 196 and 212, in accordance with your
mail from yesterday.
Result: Homing works fine but when issuing a Tn M6 command the turrent
won't stop rotating. After a couple of turns I get an error. I also tried
this using Edge encoding instead of Index for this modification and even
though it did stop by itself it only shifted half the amount of pockets
that was requested. I suppose it's because of the flank triggering for this
option.

I also tested the "target = current_position + jog_fwd - jog_rev + 1; //
Added "+ 1"" but interestingly enough this didn't have any effect as it had
earlier. It still behaved as in test nr 1.

Correct me if I'm wrong but it seems fair to say that this isn't a HAL
issue and that it needs to be addressed withinin the carousel component. Or
is there some functionality within the component that makes it ignore the
first pocket trigger when a reverse latching tool changer is used? What
lines of code are responsible for that functionality?

Regards,

Andreas


Den sön 10 jan. 2021 kl 21:07 skrev andy pugh <bodge...@gmail.com>:

> On Sun, 10 Jan 2021 at 20:04, andy pugh <bodge...@gmail.com> wrote:
>
> > Try moving the old_index update line:
>
> And if that doesn't work, post me your lathe and PC and I will sort it out.
>
> --
> 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