Hi all,
I’m using an Alarm Status Table to show real time alarms and an Alarm Journal Table to show the alarm history.
My alarms are Bit State alarms. The text that is to be displayed to the operator is split between the Label and the Display Path alarm fields.
I’m experiencing the following issue: the alarm shows up correctly in the Alarm Status Table such as in the following screen capture
where you can see the Active Time, Label, Display Path fields, whereas the same alarm shows up as in the following screen capture in the Alarm Journal Table
where AlmBit25 is the alarm Name instead of the Label field.
Basically, because the alarm journal is entirely database driven, if you enter a static alarm label, there’s no way for the journal table to reference a value for the label field - unless you tell the journal to store that static config as well (or, more DB-space efficiently, just make the value “dynamic” with an expression like "[DB1001.DBD56] - NB7_D56").
Has this been investigated by Ignition? I’m having the same problem and “Static Config” has been checked. Works great for Alarm Status display. Works well for Alarm Journal except when the alarms are being ack’d!!
I’m running the report on alarm history as well and the problem exists the same way. So I’m assuming the problem comes from when the acknowledge action is written to database!
A workaround before it was fix in future Ignition delivery …
Make a MySQL NamedQuery Trigger with this params: {“dbName”:“histo”,“tableName”: “alarm_events”,“dataTableName” : “alarm_event_data”} and execute this query on Gateway Startup Script
CREATE TRIGGER `{dbName}`.`{tableName}_AFTER_INSERT` AFTER INSERT ON `{tableName}` FOR EACH ROW
BEGIN
DECLARE propId INT;
DECLARE eventid varchar(255);
SET @eventid = NEW.eventid;
SET @propId = NEW.id;
IF NEW.eventtype = 2 THEN
INSERT INTO {dataTableName}
(id,
propname,
dtype,
intvalue,
floatvalue,
strvalue)
SELECT
@propid,
{dataTableName}.propname,
{dataTableName}.dtype,
{dataTableName}.intvalue,
{dataTableName}.floatvalue,
{dataTableName}.strvalue
FROM
{dataTableName}
INNER JOIN
{tableName}
ON
{tableName}.id = {dataTableName}.id
WHERE
-- {dataTableName}.propname = 'label'
-- and
{tableName}.eventid = @eventid;
END IF;
END
I’ve juste tried on the last version (7.9.12) and the problem is still there.
Displaying the label on the Alarm Journal Table worked, but if you want to get it by scripting with the function system.alarm.queryJournal, all event object still show the Name instead of the Label (Ex : AlarmEvent.label or AlarmEvent.getLabel())
This issue still seems to persist with 8.0.4 as well. Setting a static text, or setting an expression containing the static text will still return the ‘name’ when using system.alarm.queryJournal.
I’ve tried to make all the labels ‘dynamic’ with static text, but they will still not store the values. Expression like “Test alarm label 1”. Is this what you are saying, or something else?
To follow up, this issue is persisting into 8.1.7 for calls to system.alarm.queryJournal. AlarmEvent.getLabel() returns the name not the label for all results.
The labels display correctly in the Alarm Journal display object just not the queryJournal results.
I am using queryJournal to export the journal daily to an excel file since Edge only keeps alarm history for 7 days.
Anyone know a workaround? I will try looking up each event’s label from the results of system.alarm.queryStatus() using all_properties to see if I can get to the label that way.
I am running Edge Compute Version: 8.1.7 (b2021060314)
The gateway has Stored Event Data - Static Config checked (even though I have all alarm labels configured as dynamically bound).
OK spent some time with queryJournal trying to retrieve dynamic labels.
If I specify includeData=True, then I am getting the correct labels for most entries. The exception is “Cleared, Acknowledge” entries are still showing the alarm name for the label.