Is it possible to change the background colour of a value field if the point hasn't updated for a certain period of time?


Yes, this can be configured by following the steps below:

1) Create a new group and add a the following objects: Internal Analog input point, three Internal String points and a Logic Function Block Diagram program.  The tree should look like this:


2) Open the 'timer logic' function block logic program and add the following function blocks: NOW, DT_TO_TOD, SUB_TOD_TIME and DATE_AND_TIME_TO_TIME_OF_DAY

3) Drag the intenal analog and string points on to to logic program (one at a time) and configure then as shown in the screenshot below (Note the 'Type' that each point is set to in the list at the top of the screenshot)

4) Next, open the mimic and drag across the internal points along with their values as shown in the screen shot below:

(Note: the 'last updated time' shown for the AIN1 point will likely be displayed in local time whereas the 'New String Point' and 'timeNow' current values will be shown in UTC time.)

5) Edit the value field for the AIN1 point and go into the 'Animations' dialog.  Select the Fill.FillColour field and hit the 'Flowchart' button.  Add a decision box and enter the following expression:

The Flowchart and final expression will look like this:

In this example if the point has been updated within the last 10 seconds then its background will be red.  Otherwise if 10 seconds or more has elapsed since the last update then the background colour will be green as shown in the screenshots below:


The example is attached as a .sde file that can be imported into ViewX using ClearSCADA 2009 R1 or higher.

x_KB colour change.sde

  1. Oct 13, 2011

    Adam Woodland says:

    That does however mean that it's an extra four objects per point that you want t...

    That does however mean that it's an extra four objects per point that you want to do this on which means that it's not that scalable.

    Some suggestions:

    1. Use custom metadata properties on the point rather than creating additional objects.

    2. On most systems people usually have a 'Now' internal time point somewhere that updates every second or so for various purposes. You can just add an additional output and put it through a SUB_DT_TIME, subtract the duration amount you care about and write it to a different internal time point. Uf you want multiple durations just add additional outputs. Then on the animation you can just do something like:

    IIF( ".ai.CurrentTime" < ".Now.Now-10S.CurrentValue", RGB( 255, 0, 0 ), ".ai.Background" )

    You would need to test with your setup that having many animations like this on a mimic doesn't cause any unacceptable performance issues however if you were wanting this on say one point per site and you have 2000 sites then you've saved yourself 8,000 objects in your database.