Setting up an application with E3Playback.

1. INTRODUCTION

The goal of a playback tool is to facilitate the post operational process, especially with occurrences analyses. It allows the use to visualize events and analog points variation in past time via real-time monitoring screens, since analyzing only events and analog values reports can make this task rather difficult.

E3Playback searches the database for the tags referred on screens, as well as the links between Viewer and server (such as Viewer tags with links to server objects), and displays values, animations, statuses, and charts according to the information found in the database and the time period set up in the playback.

2. SETTING UP THE APPLICATION TO USE E3PLAYBACK

This article will show you how to set up an application that uses E3Playback to monitor data from screens (tags, alarms, tables, Storage, E3Chart, libraries). Following these instructions, you will be able to use E3Playback in your application immediately, while also enabling it to be used in the future.

In this example, we will develop an application with three Demo tags, a Historic, a Storage, an E3Chart, a Library, and an Alarm Server.

Application and Database

All information used by E3Playback are retrieved from database tables; therefore, setting up the database in the application is a fundamental step for using E3Playback.

To do so, create a default E3 application, called PlayBackProject. Then, add a Database called Database1.

NOTE: The database used in this example is SQL Server 2005, because the Storage object (used later in this example) is not compatible with Access.

 

I/O Tags

This application uses two I/O tags, displayed via library object’s instances, to simulate temperature values. To do so, add a driver to the application’s Data Server (any .dll file will do; in the example, we used Elipse’s Modbus driver and Modbus ModSim simulator), and then add two I/O tags to it, Temperature1 and Temperature2.

Demo Tags

This application uses three Demo tags: one that simulates outflow values (recorded via Storage), and two that simulate speed values (show via a Display on screen). To do so, access the application’s Data Server and add three Demo tags: Flow, Speed1, and Speed2.

Historics

The Historic object file format is not the ideal one for working with a playback tool, because this object usually stores lots of duplicate data; therefore, we recommend using the Storage object as often as possible. If however you need to use data from a Historic in E3Playback, follow these procedures.

1. This first historic in the application will be used for recording data that simulate field values and that will be visualized directly on an application screen. In the demo application, this data is seen in the values of Speed1 and Speed2.

2. Insert a Historic object into the Data Server and set it up as the figure below. This object must have the E3TimeStamp field.

3. Set up UserTable property as False.

4. Create two fields, Speed1 and Speed2, and link their source properties to the corresponding speed tag.

5. Create an index for E3TimeStamp field. Without this index, the Historic queries  get too slow, and the playback becomes unfeasible.

 

 

6. Use tables with few fields and, if possible, add an individual index to each one of them (especially to fields with little variation).

Storage

There are not many usage restrictions for a Storage object in E3Playback. We recommend, however, that no expressions be placed at this object’s Source field, that is, it must be linked directly to the desired tag.

After adding the Storage to the application, set it up as seen in the figure below.

Next, create a tag called Flow and link the Source field to it.

Alarms

There are not many usage restrictions for Alarms in E3Playback either. To make sure E3Playback works, you will only need to register EventTime, FullAlarmSourceName, ConditionActive, Acked, and AckRequired fields. However, we recommend that InTime InTimeMS (or InTimeDbl), OutTime + OutTimeMS (or OutTimeDbl), AckTime AckTimeMS (or AckTimeDbl), Area, ActorID, Enabled, EventCategory, EventType, Message, Severity, Source, SubConditionName, and CurrentValue fields be registered too for performance purposes.

To set up the alarms, add an Alarm Server and an Alarm Config to the application. Inside the Alarm Config, add an Area; inside this Area, add three analog alarms whose sources are Speed1, Speed2, and Flow tags.

 

Next, set up the Alarm Server as seen in the figures below and add the fields required previously.

XObjects Library

Whenever there is a user library in the application, you will need to point which XObjects properties are accessed by the Viewer’s screens. Then, detect the relationship between these properties and the tags working as their source of information to establish what needs to be stored in the database, via Historic or Storage.

There are two possible relationships between tags and properties:

  • Case 1: XObject whose properties are different from Link (Boolean, Integer, Double, String, etc.); in this case, you will need to store the XObject’s properties in the database.
  • Case 2: XObject whose properties are equal to Link (IOTag, InternalTag, DemoTag, etc.); in this case, you can store both the tag and the XObject’s properties. Notice that if the XObject has any property linked to another object (IOTag, InternalTag, etc.), you will need to check whether this object is being stored in the database. If so, you won’t need to store the XObject instance’s property in the database; otherwise, this is mandatory.

In the demo application, the E3Studio will create a components library called LibPlayBack. In this library, there is an XObject called TemperatureData, with two properties: Temp1 (Double) and Temp2 (IOTag).

Next, add an XControl called TemperatureDisplay with two Displays and a TemperatureData-type property called Source, as seen in the figure below.

First, link the first Display to the corresponding XObject’s Temp1 property, as seen below.

Then, link the second Display to the corresponding XObject’s Temp2 property, as seen below.

At the project’s Data Server, add an XObject’s instance called TemperatureData, and link the object’s Temp1 and Temp2 properties to the corresponding I/O tags.

Notice that TemperatureData object’s Temp1 property’s type is Double, and therefore it is linked to Temperature1 tag’s Value property, which would file it under the first case described above. On the other hand, Temp2 property’s type is IOTag, and therefore is linked directly to Temperature2 tag, which would file it under the second case described above.

Additionally, the storage criteria described before must be met in order to have E3Playback working properly. To do so, create a new historic in the project, called Hist2, and set it up as seen in the figures below.

 

3. SETTING UP APPLICATION SCREENS

Two screens will be developed in this application.

  • ProcessScreen, illustrating a process whose temperature, overflow, and speed data are monitored.
  • PlayBackScreen, which is basically an E3Playback object displaying the ProcessScreen.

ProcessScreen

Add a screen called ProcessScreen to your application. This is the application’s initial and main screen; to do so, edit the Viewer’s InitialScreen property.

The add to this screen:

  • two E3Browsers
  • an E3Chart
  • an instance of TemperatureDisplay XControl, whose Source property must be linked to TemperatureData
  • an E3Alarm
  • two Setpoints to edit E3Chart’s date/time limits
  • two Displays to show speed values
  • a browsing button for PlaybackScreen (to be developed later)

The first E3Browser must be set up to display data from Temperature1, Temperature2, and E3TimeStamp, which are on DisplayTable1; the second one must be set up to show data from Storage1‘s Flow field, via LastValue function.

Then, set up E3Alarm with the Alarm Server’s name and the desired fields.

NOTE: when inside E3Playback, E3Chart will only work if its pens are set up as historic. Real-time pens are disabled in E3Playback.

The E3Chart in this application has only one historic-type pen, which displays the data from Temperature1 I/O tag. To set up pen type, access its properties and edit it on Data tab, as seen below.

Next, edit the horizontal axis scale, and select Time interval (Historical data), as seen below.

At Setpoints field, use Application.ShowDatePicker method to call Calendar function, which will enable the user to query data per date. You can also link the Setpoints’ Value property to E3Chart’s HorScaleBegin and HorScaleEnd properties.

PlayBackScreen

Add a second screen called PlayBackScreen to your application, where the E3Playback ActiveX will be displayed, that is, this screen is responsible for monitoring ProcessScreen in the post operational process. To do so, add an E3Playback to this screen, as well as a browsing button to return to the previous screen.

To set up E3Playback, just access its properties and edit them as seen below.

At Run Time, press   button to put E3Playback on Online Mode and the PlaybackScreen will show the following:

E3Playback lower half displays a tag list, which is an interface that shows which tags are being used by the object.

Columns on this list are:

  • Tag Path: Shows the tag path.
  • Table: Shows the name of database table that contains tag data.
  • Status: Indicates whether the tags have been found in the database.
  • Value: Shows tag value at current playback date/time.
  • Date/Time: Shows the tag’s current timestamp. If the tag can be interpolated (only analog clocks stored at the Storage), then the timestamp is the same as the playback’s current time. Otherwise, the timestamp is the same as the last event with a timestamp equal or previous to the playback’s current time.
  • Quality: Shows tag quality (OPC standard) at the playback’s current time. When quality is 192, the text simply states “Good”.
  • Previous Event:  Shows the timestamp of this tag’s last event in the database. If the tag can be interpolated, the previous event is the same as the last timestamp recorded in the database before the playback’s current time. Otherwise, the previous event is always the same as the tag’s current timestamp.
  • Next Event: Shows the timestamp of this tag’s next event.

The event list is displayed to the right of the object. It shows E3Playback’s events in chronological order, allowing the user to browse between events.

Columns on this list are:

  • Date/Time: Shows the event’s date and time, according to what has been recorded in the database.
  • Tag Path: Shows the path of the tag or alarm source generating this event, or then the name of the marker.
  • Event: If the event changes the tag’s value, this column will display its new value. If the quality is not Good (192), it will be displayed before the value (example: “Bad(20); 45.433”). If the event changes the alarm’s status, this column will display the sub-condition (HI, HIHI, LO, LOLO, etc.) and the alarm1s description. If the alarm is acknowledged, the text “ACK” is displayed first, and the name of the operator will be between brackets. If this is a marker, this field shows the associated comment.

To follow all values and tags on the screen, just press   button to put E3PlayBack at Run Time.


4. RELATED ARTICLES

  1. E3 Manuals and Tutorials
  2. MODSIM-DSS

 

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *