diff --git a/tags.json b/tags.json index c2c6c72..e3bc4cf 100644 --- a/tags.json +++ b/tags.json @@ -2768,6 +2768,12 @@ "binding": "ns\u003d1;s\u003d[{MCM}]{InstanceName}.HMI.Alarm.Jammed" }, "valueSource": "opc", + "eventScripts": [ + { + "eventid": "valueChanged", + "script": "\t# Tag event: valueChanged\n\t\n\t# --- guards ---\n\tif initialChange:\n\t return\n\tif not (previousValue.quality.isGood() and currentValue.quality.isGood()):\n\t return\n\t\n\t# --- rising-edge only (0/False/None -\u003e 1/True) ---\n\tprev \u003d previousValue.value\n\tcur \u003d currentValue.value\n\tif (prev \u003d\u003d cur) or ((prev\u003d\u003d1) and (cur\u003d\u003d0)):\n\t return\n\t\n\t# --- your routing + insert (unchanged) ---\n\tif (\"ULC1\" in tagPath) or (\"ULC2\" in tagPath) or (\"ULC3\" in tagPath) or (\"ULC4\" in tagPath):\n\t query \u003d \"INSERT INTO jam_area (Bulk_Inbound, t_stamp) VALUES (1, NOW())\"\n\t\n\telif (\"UL1_\" in tagPath) or (\"UL2_\" in tagPath) or (\"UL3_\" in tagPath) or (\"UL4_\" in tagPath) or \\\n\t (\"UL5_\" in tagPath) or (\"UL6_\" in tagPath) or (\"PS1_\" in tagPath) or (\"PS2_\" in tagPath):\n\t query \u003d \"INSERT INTO jam_area (FLuid_Inbound_MCM02, t_stamp) VALUES (1, NOW())\"\n\t\n\telif (\"UL7_\" in tagPath) or (\"UL8_\" in tagPath) or (\"UL9\" in tagPath) or (\"UL10_\" in tagPath) or \\\n\t (\"UL11_\" in tagPath) or (\"UL12_\" in tagPath) or (\"PS3_\" in tagPath) or (\"PS4_\" in tagPath):\n\t query \u003d \"INSERT INTO jam_area (FLuid_Inbound_MCM03, t_stamp) VALUES (1, NOW())\"\n\t\n\telse:\n\t return\n\t\n\tsystem.db.runUpdateQuery(query, \"MariaDB\")" + } + ], "dataType": "Boolean", "alarms": [ { @@ -2923,6 +2929,12 @@ "binding": "ns\u003d1;s\u003d[{MCM}]{InstanceName}.HMI.Alarm.Jammed" }, "valueSource": "opc", + "eventScripts": [ + { + "eventid": "valueChanged", + "script": "\t# Tag event: valueChanged\n\t\n\t# --- guards ---\n\tif initialChange:\n\t return\n\tif not (previousValue.quality.isGood() and currentValue.quality.isGood()):\n\t return\n\t\n\t# --- rising-edge only (0/False/None -\u003e 1/True) ---\n\tprev \u003d previousValue.value\n\tcur \u003d currentValue.value\n\tif (prev \u003d\u003d cur) or ((prev\u003d\u003d1) and (cur\u003d\u003d0)):\n\t return\n\t\n\t# --- your routing + insert (unchanged) ---\n\tif (\"ULC1\" in tagPath) or (\"ULC2\" in tagPath) or (\"ULC3\" in tagPath) or (\"ULC4\" in tagPath):\n\t query \u003d \"INSERT INTO jam_area (Bulk_Inbound, t_stamp) VALUES (1, NOW())\"\n\t\n\telif (\"UL1_\" in tagPath) or (\"UL2_\" in tagPath) or (\"UL3_\" in tagPath) or (\"UL4_\" in tagPath) or \\\n\t (\"UL5_\" in tagPath) or (\"UL6_\" in tagPath) or (\"PS1_\" in tagPath) or (\"PS2_\" in tagPath):\n\t query \u003d \"INSERT INTO jam_area (FLuid_Inbound_MCM02, t_stamp) VALUES (1, NOW())\"\n\t\n\telif (\"UL6_\" in tagPath) or (\"UL8_\" in tagPath) or (\"UL9\" in tagPath) or (\"UL10_\" in tagPath) or \\\n\t (\"UL11_\" in tagPath) or (\"UL12_\" in tagPath) or (\"PS3_\" in tagPath) or (\"PS4_\" in tagPath):\n\t query \u003d \"INSERT INTO jam_area (FLuid_Inbound_MCM03, t_stamp) VALUES (1, NOW())\"\n\t\n\telse:\n\t return\n\t\n\tsystem.db.runUpdateQuery(query, \"MariaDB\")" + } + ], "dataType": "Boolean", "alarms": [ { @@ -15926,6 +15938,9 @@ "tagType": "Folder", "tags": [ { + "valueSource": "opc", + "expression": "true", + "value": false, "name": "Jammed", "tagType": "AtomicTag" } @@ -172532,7 +172547,7 @@ "valueSource": "memory", "dataType": "DateTime", "name": "wbsckt_heartbeat_interval", - "value": 1760654367953, + "value": 1760914947956, "tagType": "AtomicTag" }, { @@ -182507,6 +182522,8 @@ "tagType": "Folder", "tags": [ { + "valueSource": "opc", + "value": true, "name": "Jammed", "tagType": "AtomicTag" } @@ -186955,7 +186972,7 @@ "valueSource": "memory", "dataType": "String", "name": "wbsckt_messages_send", - "value": "{\"message_list\":[{\"action\":\"pageview\",\"parameters\":{\"siteId\":\"CNO8\",\"sessionId\":\"399549dd-29f4-4172-b4e6-7754360636d4\",\"pageId\":\"Home\",\"timestamp\":1760653172341}}]}", + "value": "{\"message_list\":[{\"action\":\"pageview\",\"parameters\":{\"siteId\":\"CNO8\",\"sessionId\":\"29390ad2-0b13-48fb-961d-392b186a4310\",\"pageId\":\"Home\",\"timestamp\":1760897042450}}]}", "tagType": "AtomicTag" }, { @@ -186969,7 +186986,7 @@ "valueSource": "memory", "dataType": "String", "name": "thread_id", - "value": "1976", + "value": "404", "tagType": "AtomicTag" }, { @@ -188712,6 +188729,8 @@ "tagType": "Folder", "tags": [ { + "valueSource": "opc", + "value": true, "name": "Jammed", "tagType": "AtomicTag" }