Does anyone have a good way of examining each element of a DB and if one is true then set a bit?
I have used structures in my DB, this would probably be easier with an array and array pointer but then I would have to write all my alarms to a datatype.
I have lots of alarms in a DB and if any one of those is true I want to set a bit that sounds a sounder.
I assume SCL is the way to go with this.
So far I have just been using long IF OR THEN statements, for example
IF Alarm1 Or
Alarm2 Or
Alarm 3 ......
Then
InAlarm := True;
Else
InAlarm := False;
I have used structures in my DB, this would probably be easier with an array and array pointer but then I would have to write all my alarms to a datatype.
I have lots of alarms in a DB and if any one of those is true I want to set a bit that sounds a sounder.
I assume SCL is the way to go with this.
So far I have just been using long IF OR THEN statements, for example
IF Alarm1 Or
Alarm2 Or
Alarm 3 ......
Then
InAlarm := True;
Else
InAlarm := False;