Binding Alarm Outputs to Graphics

Hello,

I have an opctag that has 4 alarms defined on it, lolo, lo, hi and hihi. I want to bind the output of each of these alarms to a light. I cannot find any individualized parameters for any of these, only some strings that tell me what the highest priority alarm is, etc., but not the status of each individual alarm.

Is there a way I can do this? It seems like a common task.

thank you

Actually, it’s not a common practice, since it interacts with the database and there’s a table to display alarms. But I still think it can be done! :slight_smile:

Can you show me a screen shot of your alarm setup? I’ll get 7.6 fired up on one of my machines here and give you a hand.

[quote=“downerczx”]Hello,

I have an opctag that has 4 alarms defined on it, lolo, lo, hi and hihi. I want to bind the output of each of these alarms to a light. I cannot find any individualized parameters for any of these, only some strings that tell me what the highest priority alarm is, etc., but not the status of each individual alarm.

Is there a way I can do this? It seems like a common task.

thank you[/quote]

are you using tags for your alarm setpoints? if so this should be pretty easy.

Here’s what I’m trying to do:

Ok, thanks. I’ll see what I can whip up. :smiley:

Got meetings all afternoon, so it may take a bit…

Try doing this in reverse. Create 4 tags with each setpoint and set its expression to check if the alarm is true or false. Then aggregate those alarms into one “alarm tag”, with the following expression

binEnc({[.]LoLo},{[.]Lo},{[.]Hi},{[.]HiHi}})

Then for the alarm settings, add an alarm per bit, set its mode to bit state, and enter the bit index.

We do this on all our projects, and it works with both discrete alarms coming from the PLC, and alarms created by Ignition.

I haven’t tested this, but isn’t that what the

isAlarmActive(tagPath, [alarmName], [pollRate])

expression function is made for? The optional alarmName param can be used to check individual alarms of the given tag.

I saw that function but have been unsuccessful getting it to work. I’ve tried the alarm name by itself, in quotes, in brackets, etc.

isAlarmActive({[.]Level_Sensor_Reading},"Level_Sensor_HiHi_Alarm",1)

or

isAlarmActive(({[~]Tester/Level_Sensor_Reading}), Level_Sensor_HiHi_Alarm, 100)

[quote=“downerczx”]I saw that function but have been unsuccessful getting it to work. I’ve tried the alarm name by itself, in quotes, in brackets, etc.

isAlarmActive({[.]Level_Sensor_Reading},"Level_Sensor_HiHi_Alarm",1)

or

isAlarmActive(({[~]Tester/Level_Sensor_Reading}), Level_Sensor_HiHi_Alarm, 100)

Try:

isAlarmActive("[]Tester/Level_Sensor_Reading","Level_Sensor_HiHi_Alarm")

Everything needs to be in quotes. :wink:

All of our alarming is done in the plc, so we implement it the way I described earlier. From alarms generated in Ignition, isAlarmActive makes more sense.

isAlarmActive({[~]Tester/Level_Sensor_Reading},"Level_Sensor_HiHi_Alarm")

produced a green tag with a question mark but no value…

isAlarmActive("[]Tester/Level_Sensor_Reading","Level_Sensor_HiHi_Alarm")

produced the red x on the tag…

thanks for the suggestion, but do you see anything else wrong here?

Woohoo! I’m up and running! (Also thanks to Greg @ tech support)

isAlarmActive("[.]Level_Sensor_Reading", "Level_Sensor_Hi_Alarm")

Good to hear!