Rendering data signal error conditions
In Power Operation, error conditions in graphics can be represented either by scripting or by the presentation value of an attribute binding.
Rendering error conditions using script
You can use a script to demonstrate the current breaker status.
The following code example explains the getValue() function in script:
function change(evt)
{
var val = evt.getValue().split(",")[0];
var dateTime = evt.getValue().split(",")[1];
var quality = evt.getValue().split(",")[2];
var comp = evt.getCurrentTarget();
//Hiding the placeholder
if(quality == "0" && dateTime == "0"){
comp.setAttribute("Visibility", "Hidden");
}
//Setting the value as -inf
else if(val == "-Infinity"){
comp.setAttribute("Visibility","Visible");
comp.getChild("BrkSt").setAttribute("Content","-Inf");
}
//Setting the value to x
else if(quality == "2"){
comp.setAttribute("Visibility","Visible");
comp.getChild("BrkSt").setAttribute("Content","x");
}
//Setting the value in case of good quality
else{
comp.setAttribute("Visibility","Visible");
if(val == "1"){
evt.getCurrentTarget().getChild("BrkSt").setAttribute("Content","Open");
}
if(val == "0"){
evt.getCurrentTarget().getChild("BrkSt").setAttribute("Content","Close");
}
}
The following example demonstrates when Power Operation enters comm loss:
The following example demonstrates comm loss due to a bad quality tag:
The following example demonstrates comm loss due to a bad quality tag with a breaker popup open:
The following example demonstrates comm loss due to a tag of unknown quality:
Rendering error conditions in TGML graphics using presentation value
Presentation values in TGML Graphics pages are displayed during several Power Operation error conditions.
In the bind properties, the Presentation values are Format = Presentation, Attribute = Content:
The following table explains the error rendering with the respective placeholder that appears in the output:
| Tags Missing in Profile | Placeholder should disappear |
| Comm Loss for Tags |
|
| NA Value | -INF |
| Quality is good | Show Value returned by API |
| PO not running | Default Comm Loss |
| Unknown |
|