Goal: Create a UDT that trips an alarm when a string is populated in a Logix PLC. The alarm label should display the string content.
Overall Issue: When string is cleared, alarm journal entries for ack/clear should show up with the same label even after the string is cleared.
Attempts:
- Bool opc tag alarm with label bound to string opc tag
- Issues: race condition between bool opc tag and string opc tag (bool high before string updates), more logic required in the PLC.
- Opc string tag has change script that writes its value to a memory string tag. Alarm is on the memory tag with conditional alarm for the opc string not empty and uses the memory tag value for the alarm label. Memory tag keeps value after opc tag clears.
- Issues: Clunky, still some race conditions between the tag change script writing the memory tag and the alarm tripping.
- Active delay for alarm condition (feels like a band-aid for improper handshaking).
Has anyone come up with a clean solution for showing a PLC string tag as an alarm label?
Ewww!
Just say NO to such strings in the PLC.
Move the strings to Ignition, and have them only in Ignition. (Also necessary for any future/potential internationalization.)
Yeah... I've seen you comment that before. The major objection I have is if there is specific PLC data I want to include in the alarm, like, for instance, a servo drive error code. It also feels tedious to have to go into Ignition to create a new opc tag, create the alarm, and write out its label every time I want a new generic sequence fault vs just populating a string tag in the PLC.
Do you never use dynamic alarm property bindings? How do you keep your alarms descript enough? Any generic alarm advice?
That's what associated data is for. Including in the label kills easy internationalization. (Though there are some placeholder options in i18n support, it isn't tied into the alarm system.)
No.
Use only boolean alarms, and generate them in the PLC. Have the PLC do all threshold and debounce operations.
My only addition here is integer alarms are also useful for your exact use case of servo and VSD alarms. Almost all of these devices transmit a fault code as an integer, pass this directly to ignition and set up your alarms on this code if non-zero. Strings don’t belong in a PLC, unless they are barcodes or batches or similar.