You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Scada Display

The scada display in Delft-FEWS is used for displaying and monitoring data. The scada display shows one or more configurable schematic views that represent data values in some way. For example, to show the most recent data value of a given time series, it is possible to show just the numerical value, or to show a rectangle that varies in height depending on the data value, or to show a polygon that changes in colour when the data value crosses a certain threshold, etc. How data is represented and which data is shown can be configured in the scada display configuration file. The scada display is dynamically updated whenever new data becomes available in the system or whenever data is changed (e.g. in the time series editor). The scada display is comparable to the main map display, only the scada display does not and cannot refer to any geographical coordinate system. Furthermore the scada display can be used to show text and figures as well as objects that represent data values.

Please note that the scada display in Delft-FEWS is only used for displaying data, it does not implement all features that could be expected from a SCADA (Supervisory Control And Data Acquisition) system.

The scada display shows one or more scada panels, which can be selected in turn from the list on the left hand side. It is also possible to have multiple scada displays, each one with different panels. In that case there would be one configuration file for each different scada display, each one with a different filename. The filename of each scada display should be registered in the DisplayInstanceDescriptors configuration file. When available on the file system, the name of the xml file for configuring a scada display is for example "ScadaTwentekanalen.xml". This scada display would be registered in the DisplayInstanceDescriptors configuration file with the following xml code:

<displayInstanceDescriptor id="ScadaTwentekanalen">
    <description>Scada Display Twentekanalen</description>
    <displayId>ScadaDisplay</displayId>
</displayInstanceDescriptor>

Scada Display Configuration


Scada display configuration elements

displayName

Title of this display.

dateFormat

Definitions of dateFormats that can be used for formatting dates and times in tags in texts of svg objects.

numberFormat

Definitions of numberFormats that can be used for formatting numbers in tags in texts of svg objects.

variable

Definitions of variables that can be used as input and/or output for the components in the scada display. A variable is always a time series. Alternatively variable definitions can be embedded in the configuration below.

scadaPanel

One or more definitions of scada panels. In the user interface each scada panel will be available from the list in this scada display.

Scada Panel Configuration


Scada panel configuration elements

id

Identifier of this scada panel.

name

The name of this scada panel as it is displayed in the user interface. If not specified, then id is used as name.

svgFile

The name of an svg (Scalable Vector Graphics) file in the ReportImageFiles directory. This scada panel shows all svg objects that are defined in the specified svg file. The svg objects in the svg file can be given special behaviour and/or properties using the configuration below. See http://www.w3.org/TR/SVG11/ for the SVG 1.1 specification.

nodeId

Optional. Identifier that refers to a node in the topology configuration file. If specified, then the referenced topology node will be selected when this scadaPanel is selected in the user interface. When the topology node is selected, then that may cause other things to be selected as well, like e.g. the displayGroup in the TimeSeriesDisplay that corresponds to that node.

textComponentBehaviourDefinition

One or more items to define special behaviour and/or properties for components in this scada panel. Each item refers to an svg object that is defined in the given svg file. Each item also contains definitions of behaviour and/or properties for that object. This way it is possible to e.g. replace tags in the text of a text object with certain values from a certain time series, or to define what should happen when the user clicks on a certain component.

Definition of special behaviour and/or properties for a text component in this scada panel. This refers to an svg object of type "text" that is defined in the given svg file. This contains definitions of behaviour and/or properties for that svg object. An svg object of type "text" can be a "text", "tspan", "tref", "textPath" or "altGlyph" element.

shapeComponentBehaviourDefinition

One or more items to define special behaviour and/or properties for components in this scada panel. Each item refers to an svg object that is defined in the given svg file. Each item also contains definitions of behaviour and/or properties for that object. This way it is possible to e.g. replace tags in the text of a text object with certain values from a certain time series, or to define what should happen when the user clicks on a certain component.

Definition of special behaviour and/or properties for a shape component in this scada panel. This refers to an svg object of type "shape" that is defined in the given svg file. This contains definitions of behaviour and/or properties for that svg object. An svg object of type "shape" can be a "path", "rect", "circle", "ellipse", "line", "polyline" or "polygon" element.

TextComponentBehaviourDefinition Configuration


TextComponentBehaviourDefinition configuration elements

TODO

ShapeComponentBehaviourDefinition Configuration


ShapeComponentBehaviourDefinition configuration elements

TODO

Tips And Tricks

Controlling the resizing behaviour of an svg document within the scada display

In an svg file in the root element use the following attributes to control its resizing behaviour: width, height, viewBox, preserveAspectRatio.

1. If only width and height present, then the svg document gets an absolute size, appears in the top-left corner of the display and is never resized (not even when the display window is resized). This means it can be cut-off when the display window is too small.
2. If only viewBox and preserveAspectRatio are present, then the viewBox determines the rectangular region of the svg document that is drawn in the display window (the coordinates for the viewBox edges are the same as the coordinate system used within the svg file, usually the coordinates are in pixels). The preserveAspectRatio determines how the drawn region is sized and aligned within the display window. In this case the svg document is automatically resized when the display window is resized.

Examples:

Resizing attributes in the svg root element

Resizing behaviour

 viewBox="0 0 400 400" preserveAspectRatio="xMidYMid meet" 

The svg document is scaled to fit the display window and the aspect ratio is preserved.

 viewBox="0 0 400 400" preserveAspectRatio="none" 

The svg document is scaled and stretched to fill the window (aspect ratio is not preserved).

 width="1200" height="700" 

Only the region with coordinates 0 <= x <= 1200 and 0 <= y <= 700 pixels is shown. The svg document is not resized when the display window is resized.

Aligning text within svg text objects

By default text in an svg text object is left-aligned and the x and y coordinates of the object denote the upper-left corner of the object. To right-align text in an svg text object, add the following attribute to the text element:

 text-anchor="end" 

The entire element would then e.g. be:

 <text id="Delft" x="757.48602" y="308.03317" style="fill:#000099" text-anchor="end">%LASTVALUE(numberFormat1)% meter</text> 

When an object is right-aligned, then the x and y coordinates of the object denote the upper-right corner of the object.

The attribute text-anchor can also have the values "start" or "middle". To create multiple pieces of text with different alignments, use separate text objects.

When using right-alignment, the decimal separator for number values can be aligned by using the following number format:

 {0,number,#.00} 

Here "#" means one or more decimals before the decimal separator and ".00" means that always two decimal places are shown (number is either rounded or padded with zero's).

  • No labels