Url and RefreshRate Animations

The Url and RefreshRate properties define the location of the image or remote image and the rate at which it is updated respectively. You can animate these properties so that the image changes and is updated at different rates according to the value of an item in the database.

As an example, we are going to examine a Mimic that uses Url and RefreshRate animations to display one of 3 webcam images and update them at a specified rate.

Three webcams are used to provide security surveillance for various locations at a site. Each webcam is connected to a different server.

The images from each webcam are defined as 'Webcam/Image.jpg'.

A string point is used to represent the servers. Its value is used to correspond to the addresses of the servers. As the value of the string point is included in the expression for the remote image animation, changing the value of the string point causes the definition of the server location to change in the expression.

A remote image is used on a Mimic to show the images from the webcams. It is designed so that it only shows the images from one webcam at a time.

The remote image has the following animation:

The Mimic also has three buttons (Area 1, Area 2, and Area 3). Each button is configured to work as a Method type of pick action so that when it is selected it hand controls the value of the string point. Each button hand controls the point so that its value is the IP address of the relevant server:

The area that is monitored by webcam 2 is of greater importance than the areas covered by webcam 1 and webcam 3, and so it needs to be updated more frequently. To achieve this, the remote image also has an animation for its RefreshRate property.

The RefreshRate property defines how often the image is updated. To set the image from webcam 2 so that it is updated at faster rate than the other webcams, the following expression is used:

IIF ("<Path and Name of String Point>.CurrentValue"= 10.0.10.2, 1, 5)

Where <Path and name of String Point> is the location and name of the string point that has its value set to correspond with the address of one of the servers. The angle brackets are not included in the expression.

The expression defines that if the current value of the string point is 10.0.10.2 (the address of Server 2), then the remote image is updated every second (defined by the 1). If the current value of the string point is not 10.0.10.2 (i.e is 10.0.10.1 or 10.0.10.3), then the remote image is updated every 5 seconds.


Disclaimer

Geo SCADA Expert 2019