KSS 8.6
Is there a way to know when an external axis is being jogged by means of an axis key in $T1?
The robot has E1 and E2 which will normally be driven synchronously from the program using E6POS moves, or asynchronously using ASYPTP moves. In some parts of the program due to mechanical reasons, these external axes will normally always have positions that are synchronous to each other much like a master/slave configuration but with both axes being driven from a common position command such as PTP {X 0, Y100, Z 0, E1 90, E2 90}, or ASYPTP {E1 75, E2 75}. However during external axis jogging, unless both keys are pressed simultaneously, the two axes will become separated and then the other axis would need to be jogged to catch up with the first one. I can't declare a proper master/slave configuration and only use one external axis. as in some instances the two axes will be mechanically independent, so will need to be driven separately.
I have considered some logic in the SPS.sub which could determine that say E1 is being jogged and command its partner E2 to "keep up". This could be done by using the command ASYPTP MyVar , where MyVar is an E6AXIS variable so that MyVar.E2 = $AXIS_ACT.E1. But for this to work I would need to determine which axis is being jogged and which one not. I don't mind that during the actual jog movement of E1, E2 lags a distance behind, but when the E1 jog key is released and E1 stops, E2 should then "catch up" and again have the same position as E1. What I don't want to happen is for E1 to reverse movement and go back to where E2 was when the jog key was released.
I should be able to figure out the logic to do this, but Ideally I need a pair of variables to tell me when E1 is being jogged and another when E2 is being jogged. I have found $KDO_ACT to indicate axes being jogged or commanded, but that doesn't tell me which one. I suppose I could log both positions during standstill and then determine which one moves first and call that the leader, but its dirty. I also thought about IS_KEY_PRESSED ( nn) to determine which axis key was pressed but again probably equally dirty.
Does anyone have any ideas of how this could be accomplished?