Copied:-

TurretMotor is an output. It turns on if currentPosition_W != RequestedLocation_W.

;If current position != requested position, rotate turret
IF DoingTurretIndex_M && RequestedLocation_W != CurrentTurretPosition_W THEN SET TurretMotor

Not sure where or how this TurretMotor is defined. On my Triac, that was just an output for a relay, so that's easy. This is different as its actually the A Axis and not an 'outside' device.