UNS mirror Variable of an alarm-bearing raw tag stays BadWaitingForInitialData forever (raw side has only the condition) #896
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during the #615 G6 live gate (windev test Galaxy, 2026-11-12).
Symptom. An alarm-bearing raw tag that is referenced into equipment gets a UNS value Variable that never receives data. Example: the Galaxy tag
TestAlarm002Condition(TagConfigwith analarmobject) referenced into equipmenttestmachine-015. The UNS folder holds both of these:[Variable] TestAlarm002Condition (ns=3;s=testarea/line-1/testmachine-015/TestAlarm002Condition). Reading it returnsBadWaitingForInitialDatapermanently.[Object] TestAlarm002Condition (ns=2;s=…/TestAlarm002Condition), the Part 9 condition from the notifier fan-out. This one works.On the raw side the same tag materialises only the condition and no value variable. That is the documented contract:
docs/ScriptedAlarms.md§Native driver alarms says ""alarm"present → the tag materialises as a Part 9AlarmConditionState… instead of a value variable", anddocs/AlarmTracking.mdsays "an alarm-bearing raw tag materializes only the condition, with no sibling value variable". The driver also excludes alarm-bearing tags from its value subscription ("subscribed to 5 refs" with 6 authored tags), so no value ever reaches the mirror.Where.
AddressSpaceComposer.BuildUnsReferenceVariablesemits aUnsReferenceVariablefor every reference without checkingTagConfigIntent.Alarm. The deploy path reuses the composer, so both paths are affected.Why not fixed alongside #895.
AddressSpaceComposerDualNamespaceTests.ComposeFullFixtureuses an alarm-bearing Modbus tag (Speed,LimitAlarm) as its main UNS-reference fixture. At least three tests assert that tag's UNS mirror (writable, historian intent, array shape). Skipping alarm-bearing references is a one-line change, but it needs those fixtures reworked and a decision on the intended shape: no mirror, or a mirror that is fed. A UNS client today sees a dead Variable next to the working condition.Fixed in
09b373e4on master.Decision: the documented contract (condition only) is right. A reference to an alarm-bearing tag no longer gets a UNS value Variable.
AddressSpaceComposer.BuildUnsReferenceVariablesskips it (it checks the sameTagConfigIntent.Alarmthe raw pass reads). The equipment still gets the alarm: the reference keeps feedingRawTagPlan.ReferencingEquipmentPaths, so the single raw condition is still wired as an event notifier of the equipment folder.Evidence
AddressSpaceApplier.MaterialiseRawSubtreecreates either a condition or a value variable for a tag, never both. An alarm tag has no raw value for a mirror to copy.DriverHostActorskips alarm tags (continue) before it registers the value fan-out and write routes, including the UNS NodeIds. The driver also leaves them out of its value subscription (G6: "subscribed to 5 refs" with 6 tags). Feeding the mirror would mean subscribing to a value the design says the tag does not have.f4f3e17e(v3 B4-WP1) put the alarm on the fixture'sSpeedtag to test raw alarm attachment. Later tests reusedSpeedfor the mirror's writable, historian and array checks. No commit or doc chose a value mirror for alarm tags.TestAlarm002), which is the supported way to do it. No ScadaBridge change is needed.Tests
HighTemptag, andSpeedis a plain value tag. The new testA_reference_to_an_alarm_bearing_tag_emits_no_uns_variable_but_still_reaches_the_equipmenthas two positive controls: the equipment path is still on the raw tag, and the value references still emit.Alarm_bearing_reference_surfaces_as_the_condition_only_against_real_SDKchecks that there is no Variable atfilling/line-1/station-1/HighTemp, that the Speed mirror is present, that there is 1 condition, and that the equipment folder is wired as its notifier.Docs updated: Uns.md, ScriptedAlarms.md and the G6 evidence note.