Model 122: correct WAval units from var to W - #278
Open
dersecure wants to merge 1 commit into
Open
Conversation
WAval is defined as 'Amount of Watts available' and its scale factor as 'Scale factor for available Watts', but the point declares units of var. The value looks carried over from VArAval, which immediately precedes it and is correctly var. Both the JSON and SMDX representations carry the same value, so both are corrected. W is the units string already used for watt-valued points elsewhere in the model set, for example WRtg, MaxChaRte and MaxDisChaRte in model 120.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WAvalin model 122 declares reactive-power units while describing itself as real power.{ "desc": "Amount of Watts available.", "name": "WAval", "sf": "WAval_SF", "type": "uint16", "units": "var" }Its scale factor is likewise described as
"Scale factor for available Watts.", so the point's own metadata is internally inconsistent.The value appears to have been carried over from
VArAval, which immediately precedes it in the model and is correctlyvar:VArAvalvarWAvalvarWis the units string already used for watt-valued points elsewhere in the model set —WRtg,MaxChaRteandMaxDisChaRtein model 120, among others.Change
Both representations carry the same value, so both are corrected:
json/model_122.jsonsmdx/smdx_00122.xmlTwo lines total.
json/model_122.jsonvalidates againstjson/schema.json, and the SMDX file still parses.models_workbook.xlsxis left untouched, sinceutils/json_to_xslx.pysuggests it is generated fromjson/— worth regenerating if that is part of the release process.Why it matters
Tooling that derives register maps from these definitions propagates the units verbatim, so any consumer reading
WAvalsees real power labelled as reactive. It is a metadata-only defect — no register address, type, size or scale factor changes — so the correction is safe for existing implementations.