Skip to content

Fix live MMXU power measurements - #165

Merged
masarray merged 13 commits into
mainfrom
agent/fix-live-power-measurements
Aug 13, 2026
Merged

Fix live MMXU power measurements#165
masarray merged 13 commits into
mainfrom
agent/fix-live-power-measurements

Conversation

@masarray

Copy link
Copy Markdown
Owner

Summary

Restore fundamental MMXU/MMXN power and frequency measurements in the Live Value Viewer without changing FAT, control, report, or UX architecture.

Root cause

Fundamental measurements such as TotW, TotVAr, TotVA, TotPF, Hz, and phase W/VAr/VA/PF were being filtered or resolved inconsistently before they reached the live monitor. Scalar MV objects also lacked the mag.f ↔ instMag.f sibling recovery already available for CMV cVal ↔ instCVal measurements.

Changes

  • stop classifying fundamental power/frequency as statistics or harmonic noise;
  • promote scalar TotW/TotVAr/TotVA/TotPF/Hz mag/instMag leaves as operational measurements;
  • add safe mag.f ↔ instMag.f read fallback and correct q/t companion-parent resolution;
  • recover scalar power/frequency only when the corresponding DO is actually exposed by MMS discovery (no broad MMXU-shell synthesis);
  • correct units for W, VAr, VA, Hz and unitless PF;
  • add focused regression coverage for total/phase power, frequency, shallow discovery, instMag companion references, and preservation of harmonic/statistical filtering.

Safety / regression containment

  • branch is synchronized to current main (75041e9832742fd5c9cae448af87b340c7094ff7), including the latest ARIEC61850 UTC-time precision integration;
  • validated against the latest immutable ARIEC61850 lock after the sync;
  • targeted live-power regression suite passed;
  • full ARSAS regression suite passed;
  • net diff is limited to four runtime files plus one new regression-test file; no FAT/P0/P1/P2, timestamp integration, UI, workflow, engine-lock, control, or report-runtime files are changed.

@masarray
masarray merged commit d5a08bb into main Aug 13, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05f3efa2d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +698 to +700
if ((lnClass is "MMXU" or "MMXN") && IsFundamentalScalarMeasurementObject(name))
{
yield return new FallbackPoint(name, "MX", "mag.f", "Float32", "Measurement", InferUnitFromDataObject(name));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Probe shallow power fallbacks before filtering them

For a non-OperationalValues IED that exposes only a shallow item such as MMXU1$MX$TotW, this creates TotW.mag.f with source Native MMS shallow object fallback and a non-readable probe status. SasOperationalSignalPolicy.IsUnprovenSyntheticCandidate consequently rejects it, while the discovery pipeline only proof-reads the special OperationalValues/PPRE candidates, so the UI pruning path removes the newly recovered measurement. Either proof-read these shallow scalar candidates or avoid marking them as unproven fallbacks once their MMS object was actually discovered.

Useful? React with 👍 / 👎.

Comment on lines +512 to +516
if (IsFundamentalScalarMeasurementObject(first))
{
if (current.Any(p => string.Equals(p, "mag", StringComparison.OrdinalIgnoreCase) ||
string.Equals(p, "instMag", StringComparison.OrdinalIgnoreCase)))
yield return Append(current, "f");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expand scalar paths that stop at mag

When discovery supplies the structural path MMXU1$MX$TotW$mag without the final f, the earlier LooksLikeReadableLeaf check treats mag as a complete leaf and returns before this new expansion runs. The mapper then creates TotW.mag, which ShouldKeepCandidate discards, so this common partially expanded form still loses the power measurement; the readable-leaf decision needs to allow fundamental scalar mag paths to reach this branch.

Useful? React with 👍 / 👎.

masarray added a commit that referenced this pull request Aug 13, 2026
Use honest customer-facing terminology for the full decoded IEC 61850 timestamp while preserving #165 live MMXU work and the validated ARIEC61850 precision integration.
@masarray masarray mentioned this pull request Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant