• Not Answered

Combining CEM alarms in CALC block

Hi,

We always make a graphical display of the fault status of a CEM block with schematics based on CEM.
This is just a border that turns red when one effect trips and blinks when the alarm is not acknowledged yet.

To do this we used to put a whole boolean compare in the fields of the rectangle on the display.

I want to switch to a calc block in the module.
At the moment I just copied the old compare.
It goes like:

REM COLOR
IF '^/U1503/EFFECT1.CV' = 1 AND '^/U1503/EFFECT2.CV'  =  1  THEN
    'OUT1.CV' := 1;
    'OUT1.ST' :=  GOOD ;
ELSE
    'OUT1.CV' := 0;
    'OUT1.ST' :=  GOOD ;
END_IF;

REM TOGGLE
IF '^/U1503/STATE1.CV' = 3 OR '^/U1503/STATE2.CV' = 3  THEN
    'OUT2.CV' := 1;
    'OUT2.ST' :=  GOOD ;
ELSE
    'OUT2.CV' := 0;
    'OUT2.ST' :=  GOOD ;
END_IF;

As you can see I have to add all the effects every time we change something.
Can't I compare the effect and states automatically in an array?
This array is also dynamic so I only need to write it once.

1 Reply