I've implemented your changes to carousel.comp but it still doesn't behave as expected. It still moves so it didn't break anything. But the turret behaves differently depending on if I first home the it using a jog-fwd pulse or if I run Tn M6 directly letting it home as a part of that command.
Situation 1: The turret is homed using jog-fwd pulse. After homing; current-position = 1, pocket-number = 0 physical pocket = #1. The first tool change (T4 M6) makes the turret end up in the correct pocket (#4). After that current-position = 5, pocket-number = 5. physical pocket = #4 . From now on the turret will take one less physical step compared to what is ordered in the same way as I described earlier. Situation 2: The turret is homed as part of Tn M6 command. This makes the turret move one physical step too far during the first tool change. After T3 M6 change is issued we will thus have the following situation: current-position = 4, pocket-number = 4. physical pocket = #4 As can be seen we end up with physical pocket #4 even though we wanted T3. From now on it will continue to behave as described above, lagging one physical step compared to what is demanded for every tool change. Den sön 10 jan. 2021 kl 14:02 skrev andy pugh <bodge...@gmail.com>: > I think that I might have a better fix. > > Replace lines 198 and 214 with: > > // Fix for unidirectional changers with a latch > if (inst_dir == 2 || motor_fwd) old_index = sense(1); > > And remove the previous changes. > > I think that will work for both jog and tool change. > > -- > 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