Yes, a delay in between plays in ON_TRIGGER / LOOP_FOREVER mode would be ideal.
I achieved the same functionality previously (with Bobby’s help) by putting the following code in a Global Event Script:
value = fpmi.tag.getTagValue("Misc/All alarm_unack")
if value == 1:
fpmi.system.execute(["sndrec32", "/play", "/close", "/embedding", "C:\\windows\\media\\ringin.wav"])
print "Error occurred playing alarm sound."
This works well and is not tied to one window, but requires every machine to have the .wav file in the same place.
Following your suggestion I got the Sound Player / Timer combination working by setting the ‘Delay’ to 100ms, ‘Step by’ 'to 1 and ‘Bound’ to 5, with its ‘Running’ property linked to the point indicating something is in alarm.
I then set the Sound Player to trigger when the Timer’s value was 1, only playing the sound once. This works, playing the sound once every 5 seconds, with the gotcha that it can take up to 4 seconds to first annunciate the alarm, depending on the value of the Timer. This needs reset somewhere when the value of the trigger drops to zero…