Im currently trying to find the best way to have an alarm sound (.wav) play when any alarm becomes active. All of my alarms are critical so this will apply to all alarms. I have tried using a client event script in which I can load in my tags to play when there value has changed, but this seems to only work with Boolean values. The bulk of my alarm tags are DI and are integer values.
Im not very skilled with Ignition but I’m working on that. Has anyone attempted to do something like this? If so, is there any advice on how I should go about accomplishing this? I have included a snippet of the code Im trying to use. Once again, works great with boolean tags but not integers or float values (12.6 etc…).
#Plays oneshot .wav file anytime background state changes to red.
#if event.propertyName == ‘background’:
#if “r=255,g=0,b=0” in str(event.newValue):
#print “Alarm Sound”