Briana,
Attached is an excerpt from a CLX file that interfaces to Wonderware's InBatch engine. The PhaseCS routine is the phase logic routine that controls the CS bits that the batch engine monitors to control the phases. Some of these bits are controlled by the batch engine, and others are controlled in the CLX logic. You would need to fully understand InBatch's engine to understand how these work, but this should give you a good idea on how to proceed. Which batch engine are you using?
Let me know if you have any questions.
Jeff