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

Compare with Current View Page History

« Previous Version 40 Next »

Overview

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.

Contents

Configuration

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.xml configuration file. When available on the file system, the name of the xml file for configuring a scada display is for example "ScadaTwentekanalen.xml". To register a scada display in the DisplayInstanceDescriptors configuration file use e.g. the following xml code:

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

Furthermore the displayId that is used in the DisplayInstanceDescriptors.xml file should be defined in the DisplayDescriptors.xml configuration file. This can be done with e.g. the following xml code:

<displayDescriptor id="ScadaDisplay">
    <className>nl.wldelft.fews.gui.plugin.scada.ScadaDisplay</className>
</displayDescriptor>

To be able to open a scada display from the user interface, there should be an explorer task for it in the Explorer.xml configuration file. The xml code for a scada display explorer task is for example:

<explorerTask name="Twentekanalen">
    <arguments>ScadaTwentekanalen</arguments>
    <taskClass>nl.wldelft.fews.gui.plugin.scada.ScadaDisplay</taskClass>
    <toolbarTask>true</toolbarTask>
    <menubarTask>true</menubarTask>
</explorerTask>

Example Configuration files:

ScadaTwentekanalen.xml

Example of a scada display configuration file

Twentekanalen_10min.svg

Example of an svg file, which is used in the ScadaTwentekanalen.xml example configuration file

Scada Display Configuration Options

Below is an overview of the options that are available in the scada display xml schema. All configuration options are also documented in the annotations in the scada display xml schema. To get the most up to date information about the available configuration options and their documentation in the annotations, please consult the scada display xml schema, which is available here.


Scada display configuration elements

displayName

Title of this display.

showTimeNavigatorToolbar

Option to show a time navigator toolbar at the top of this scada display. The time navigator toolbar can be used to select the display time for this scada display. It is only possible to select a display time that is contained within the configured relative period and is a valid time according to the cardinal time step (which is configured in the explorer.xml configuration file, see FEWS Explorer Configuration). This period is always relative to the current system time. If the current system time changes, then the display time is reset to the current system time. If this option is not specified, then time navigator toolbar is not shown.

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.

Time Navigator Toolbar Configuration Options


Time navigator toolbar configuration elements

timeNavigatorRelativePeriod

This is the period of the time navigator toolbar (slider) in this scada display. The time navigator toolbar can be used to select the display time for this scada display. It is only possible to select a display time that is contained within this period and is a valid time according to the cardinal time step (which is configured in the explorer.xml configuration file, see FEWS Explorer Configuration). This period is always relative to the current system time. If the current system time changes, then the display time is reset to the current system time. The start and end of the period are both included.

movieFrameDurationMillis

The duration of a frame when the time navigator is animating. This is the number of milliseconds a frame/time step is visible before the next time step becomes visible. If this option is not specified, then 200 milliseconds is used by default. When the CPU is too slow to display the specified frame rate, a frame will be displayed longer than specified.

Scada Panel Configuration Options


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.

svgObjectId

The id of the object in the svg file for which this item defines special behaviour and/or properties.

leftSingleClickAction

Action that is triggered when the user clicks once on this object with the left mouse button.

leftDoubleClickAction

Action that is triggered when the user double clicks on this object with the left mouse button.

linkPropertiesToData

Optional. Contains options to link properties of this component to actual data values. For example the height of the component can be changed depending on the data values of a specified variable.

useThresholdWarningLevelColors

Optional. If specified, then the data for the specified variable within the specified relative view period is used to determine threshold crossings. For crossed thresholds, warningLevels are activated. The color of the most severe activated warningLevel is used as the fill and/or stroke color for the component, as specified.

toolTip

Optional. If specified, then a toolTip with the specified text is displayed for this component.

replaceTags

If specified, then the tags in the text of this component are replaced using data from the specified variable. Tags should be separated by "%" signs. Text can be e.g. "Last value = %LASTVALUE(numberFormatId)%", which would be replaced by e.g. "Last value = 10.0". The following tags can be used in the text (numberFormatId/dateFormatId should be replaced by the id of a numberFormat/dateFormat that is defined at the start of this configuration file):

  • %MAXVALUE(numberFormatId)% is replaced by the maximum reliable or doubtful value in the time series.
  • %MINVALUE(numberFormatId)% is replaced by the minimum reliable or doubtful value in the time series.
  • %LASTVALUE(numberFormatId)% is replaced by the most recent reliable or doubtful value in the time series.
  • %LASTVALUETIME(dateFormatId)% is replaced by the date and time of the most recent reliable or doubtful value in the time series.
  • %STARTTIME(dateFormatId)% is replaced by the start date and time of the relative view period of the time series.
  • %ENDTIME(dateFormatId)% is replaced by the end date and time of the relative view period of the time series.

Left Single Click Action and Left Double Click Action Configuration Options


Click action configuration elements

switchToScadaPanel

Within this scada display the view will switch to the specified panel.

scadaPanelId

The id of the scadaPanel to switch to. The scadaPanel to switch to must be present in this config file.

openDisplay

Open another Delft-FEWS display.

timeSeriesDisplay

Open the timeSeriesDisplay using the specified options. The period that is shown in the display is the smallest period that completely includes the relative view periods of all shown variables.

timeSeriesEditor

Open the timeSeriesEditor using the specified options. The data of the specified variables can be edited in the display. The period that is shown in the display is the smallest period that completely includes the relative view periods of all shown variables.

title

Title of the display window.

variable

One or more variables to define the data that is shown in the display.

runWorkflow

Run a predefined workflow.

workflowId

The workflow descriptor id of the workflow to run. This id should refer to a workflow that is defined in the WorkflowDescriptors configuration file. The current system time is used as the time zero (T0) for the workflow run.

Link Properties To Data Configuration Options


Link properties to data configuration elements

height

Optional. If specified, then for this component the height attribute is linked to the data values for the specified variable. If the data value is less than dataLowerLimit, then the height is set to heightLowerLimit. If the data value is greater than dataUpperLimit, then the height is set to heightUpperLimit. If the data value is between dataLowerLimit and dataUpperLimit, then the height will be linearly interpolated between heightLowerLimit and heightUpperLimit. If no data is available, then this component is made invisible. Note: it is required that dataUpperLimit is greater than dataLowerLimit. However it is possible to define heightUpperLimit less than heightLowerLimit to control the direction of the change of the height.

variable

The data for this variable is used to determine the height for this component.

dataLowerLimit

If the data value is less than or equal to dataLowerLimit, then the height will be equal to heightLowerLimit.

dataUpperLimit

If the data value is greater than or equal to dataUpperLimit, then the height will be equal to heightUpperLimit.

heightLowerLimit

The height that corresponds to the dataLowerLimit value.

heightUpperLimit

The height that corresponds to the dataUpperLimit value.

anchorPoint

The anchor point describes which part of the component should remain at the same position when the height is changed. Can be "bottom" or "top".

Use Threshold Warning Level Colors Configuration Options


Use threshold warning level colors configuration elements

variable

The data for this variable is used to determine threshold crossings. For crossed thresholds, warningLevels are activated. The color of the most severe activated warningLevel is used as the fill and/or stroke color for the component, as specified below.

thresholdGroupId

Optional. If specified, then only thresholds in the specified thresholdGroup are used in the determination of threshold crossings and warningLevels for the specified variable. If not specified, then thresholds in all thresholdGroups are used.

thresholdReference

Specify which data is used for determining threshold crossings. Either choose the first or last reliable or doubtful value within the relative view period, or choose all reliable or doubtful values within the relative view period. Can be "first_value", "last_value" or "relative_view_period".

colorType

Specify which color type (fill and/or stroke) should be changed to use warningLevel colors. Color types that are not specified here are not changed. Can be "fill", "stroke" or "fill_and_stroke".

Tooltip Configuration Options


Tooltip configuration elements

variable

The data from this variable is used to replace the tags in the specified toolTip text. If for a given tag the required data is not available, then that tag is replaced by a dash symbol "-". This variable is only required if the specified toolTip text contains tags.

toolTipText

Text that is displayed in the toolTip for this component. This text can contain tags. The tags are replaced using data from the specified variable. Tags should be separated by "%" signs. Text can be e.g. "Last value = %LASTVALUE(numberFormatId)%", which would be replaced by e.g. "Last value = 10.0". The following tags can be used in the text (numberFormatId/dateFormatId should be replaced by the id of a numberFormat/dateFormat that is defined at the start of this configuration file):

  • %MAXVALUE(numberFormatId)% is replaced by the maximum reliable or doubtful value in the time series.
  • %MINVALUE(numberFormatId)% is replaced by the minimum reliable or doubtful value in the time series.
  • %LASTVALUE(numberFormatId)% is replaced by the most recent reliable or doubtful value in the time series.
  • %LASTVALUETIME(dateFormatId)% is replaced by the date and time of the most recent reliable or doubtful value in the time series.
  • %STARTTIME(dateFormatId)% is replaced by the start date and time of the relative view period of the time series.
  • %ENDTIME(dateFormatId)% is replaced by the end date and time of the relative view period of the time series.

Replace Tags Configuration Options


Replace tags configuration elements

If specified, then the tags in the text of this component are replaced using data from the specified variable. Tags should be separated by "%" signs. Text can be e.g. "Last value = %LASTVALUE(numberFormatId)%", which would be replaced by e.g. "Last value = 10.0". The following tags can be used in the text (numberFormatId/dateFormatId should be replaced by the id of a numberFormat/dateFormat that is defined at the start of this configuration file):

  • %MAXVALUE(numberFormatId)% is replaced by the maximum reliable or doubtful value in the time series.
  • %MINVALUE(numberFormatId)% is replaced by the minimum reliable or doubtful value in the time series.
  • %LASTVALUE(numberFormatId)% is replaced by the most recent reliable or doubtful value in the time series.
  • %LASTVALUETIME(dateFormatId)% is replaced by the date and time of the most recent reliable or doubtful value in the time series.
  • %STARTTIME(dateFormatId)% is replaced by the start date and time of the relative view period of the time series.
  • %ENDTIME(dateFormatId)% is replaced by the end date and time of the relative view period of the time series.
variable

The data from this variable is used to replace the tags in the text in the svg object that this component refers to. If for a given tag the required data is not available, then that tag is replaced by a dash symbol "-".

Variable Configuration Options


Variable configuration elements

Choose between a reference to a variable or an embedded definition of a variable.

variableId

Identifier of a variable to use.

locationId

If the specified variable contains multiple locations, then specify the location to use here.

overrulingRelativeViewPeriod

Optional time period for which data should be read. This time period overrules the viewPeriod in the timeSeriesSet of the referenced variable. This time period is relative to the selected display time in this scada display. The start and end of the period are both included. If the start and/or end of the period is not a valid time according to the timeStep of the variable, then the start and/or end is shifted to the previous valid time (e.g. for a period from 15:20 hours to 16:20 hours and a whole hour timeStep the period is shifted to be 15:00 hours to 16:00 hours).

timeSeriesSet

A time series set that can be used as input for a component.

Known Issues

When using Delft-FEWS the configuration can be present as files on the file system or can be contained in a local data store. The svg files that are used for the scada display work in both cases. However, if the svg files refer to separate image files, then the scada display can only display these images if the image files are present as files on the file system. If these separate image files are contained in a local data store, then they cannot be displayed in the scada display. Therefore, when using separate image files, make sure that the configuration is present as files on the file system. If this is not possible, then the best workaround is to not use separate image files. For a schematic image it is possible to create svg elements that resemble the contents of the image. If these svg elements are added to the svg file for the scada display, then there is no need to use the image file anymore.

Tips And Tricks

Embedding image files into SVG files

It is possible to embed images file into an SVG file. If an image file is embedded into an SVG file, then the original image file is no longer needed, because the image data is then available from the SVG file itself. To embed an image file into an SVG file using Inkscape, do the following. Open the SVG file in Inkscape. Add one or more images to the file in the normal way. Then select menu "Extensions", then select "Images", then select "Embed Images". Then click "Apply". Then save the SVG file in the normal way. Now the images are embedded into the SVG file. If all the images in an SVG file are embedded, then Delft-FEWS only needs the SVG file itself (and not the original image files) for displaying in the scada display.

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.

  • 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.
  • 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