I did get some feedback on how this could be done in a calc block. Here it is:
The following is a Calc block expression to set the ARWOP state. Create a module-level named set parameter named ARWOP and a named set windupStates with state names of NONE, HIGH, LOW, and BOTH. PID1 in the expression represents the usage name of the PID block in the module.
if '^/PID1/MODE.ACTUAL' >= 16 then
if ('^/PID1/
OUT.ST' & 3)= 0 then
'^/
ARWOP.CV' := 'windupStates:NONE';
else
if '^/PID1/
OUT.ST' = LIMITED_HIGH then
'^/
ARWOP.CV' := 'windupStates:HIGH';
endif;
if '^/PID1/
OUT.ST' = LIMITED_LOW then
'^/
ARWOP.CV' := 'windupStates:LOW';
endif;
if '^/PID1/
OUT.ST' = LIMITED_CONSTANT then
'^/
ARWOP.CV' := 'windupStates:BOTH';
endif;
endif;
else
'^/
ARWOP.CV' := 'windupStates:NONE';
endif;