What about using the numbered circuit do do it? Have one setting for mining and then remove it or use a diffrent one to retract the pipes and have it be placed in the multi block controllers inventory.
I see a small problem with that: currently the controller's inventory slot is used for mining pipes for both the drilling rig and the advanced miner ii.