I played around with some HAL components and Classic ladder and I managed to get it working. I used a combination of Timedelay and Or2 to get the m6 command to change tools in mdi and auto. I also had to change my signals for iocontrol. I used classicladder to time the jog fwd command from the carousel component, leaving enough time to unclamp first.