Im not sure you can run the tool carousel as an axis, I have not worked on a Haas, but I suspect it is run by a plain motor and uses a geneva cam like a Fadal.Even if it is run by a servo and has an encoder, you will have to write a function to count angular degrees to get to you intended tool. think, #of tools/encoder count per rev. You would be much wiser to write his in either ladder or as a component. Consider you also have to put the old tool back ,go the shortest route to the next tool,move the head, then do all the things to actually change tools. I think your looking at something more like this.
tool change signal goes hi
stop and brake spindle
orient and lock spin(which requires a set jog speed or spindle speed set)
send carousel forward(making sure the correct pocket is empty for old tool)
make sure carousel is forward
unclamp drawbar
make sure db is in fact unclamped
move head up
move turret to next tool using the shortest route
move head down
clamp drawbar
wait to make sure db is clamped or it drops tools
slide carousel back
make sure it is back
set tool changed flag hi
Each one of these actions has to have a check to make sure it is completed, if not you will need to at least put the machine in feedhold, if not estop. The orient should be a separate program with in/out pins so it can be called by m19 and/or by your tool change code, you will also need an m18 code to unlock the spindle. In addition, as of now EMC has no way of storing what tool is where after you power the machine down, meaning you will have to home the carousel every time you open EMC. You will also want want manual codes or buttons to manipulate the various parts of the tc if it gets out of sequence. You will definitely want a drawbar release button so you can manually put a tool in and out of the spindle and ONLY in manual mode .
Below is the program for the orient on my Brown & Sharpe mill, it uses a shot pin like a Haas, it also uses an encoder, which I dont think your haas does, I think it uses a prox switch. In addition this component shifts gears and runs the spindle from m and s codes. I wrote it in C, cause I hate ladder, but bottom line is, you are going to have to apply the same logic. Your machine may not be as complicated. This works everytime, for every orient, for every gear change.
Is this machine a geared head, hi-low belt drive or single speed belt drive?