Event Data Table
You can store events from a ROC in a Geo SCADA Expert Data Table. The Data Table will have a specific schema entry. Unlike the other ROC Plus database objects, Data Tables are generic database objects (see Configuring Data Tables in the Geo SCADA Expert Guide to Core Configuration).
To create a Data Table:
- Right-click on the required group in the Database Bar.
A context-sensitive menu is displayed. - Select the Create New option, followed by the Tables and Grids option.
- Select the Data Table option.
A new Data Table is added to the database. - Specify a suitable name for the Data Table (taking into account the Geo SCADA Expert naming restrictions).
- Right-click on the Data Table entry in the Database Bar and select the Edit Properties option. Specify a suitable Table Name and Title for the table and then save the configuration.
- Do not make any other changes to the table.
The Geo SCADA Expert ROC Plus Driver can create the correct columns in the Data Table automatically. To do this, you need to associate the Data Table with the relevant Geo SCADA Expert ROC Plus Scanner object. To do this:
- Display the properties window (‘configuration Form’) for the ROC Plus Scanner object.
- On the Options tab, locate the Alarms and Events section.
- Use the browse button next to the Event Data Table field to display a Reference browse window. Locate and select the Data Table that you have just added to the database.
- Save the configuration changes.
The ROC Plus driver will create the correct columns in the Data Table, providing that the Data Table contains 0 records and the Get Events option is enabled. (If the referenced data table is not empty, the driver will not create columns, because data loss could possibly occur.)
A correctly configured Event Data Table is included in the ROCPlusDemo.sde file.
A single Data Table can store events from multiple flow computers. For the Geo SCADA Expert ROC Plus Driver to populate an Event Data Table, the table has to contain the columns that are shown in the figure below, with the correct data type as a minimum. Additional columns are allowed, but the driver will only populate those columns that are shown below. The columns that the driver adds to the Event Data Table are described below.
The underlying events are described in the Opcode 119 section of the ROC Plus Protocol Specifications Manual.
- Data Type. This is the type of value to which the TLP refers. This is the raw value from the ROC. If there is no TLP associated with the event this field will be blank.
- Data Type Description. This is the driver’s decoding of the DataType value.
- Event Code. This is the event code for System and User Event type events. Other types of events do not have an event code.
- EventText. This is the event text of the event from the ROC, if it exists. Only some events have event text.
- Event Type. This is the event type from the ROC. This is the raw value from the ROC. This entry will always be populated.
- Event Type Description. This is the driver’s decoding of the EventType. This entry will always be populated.
- Logical. This is the logical/location number for the event, if it exists. Some events, like an initialization sequence, apply to the whole device, and so do not have a logical number. Other events, like an orifice plate change, apply to single run in a multiple run device, and so do have a logical number.
- MeterName. This is populated with the contents of the Meter Name field on the Scanner tab of the ROC Plus Scanner object that retrieved the events. This information is provided as a convenient way to filter event records from multiple ROCs.
- NewValue. This is the new value of the parameter referred to in the event. The table stores this as a string, because values of any type (whether they are floating point values, integers, unsigned integers, bitfields, bytefields, TLPs or text) can be displayed as a string.
- OldValue. This is the old value of the parameter referred to in the event. The table stores this as a string, because values of any type (whether they are floating point values, integers, unsigned integers, bitfields, bytefields, TLPs or text) can be displayed as a string.
- OperatorId. This indicates the operator who changed the parameter. This field is not always populated.
- Parameter. This is the parameter that was changed. The ParameterDescription column shows the driver’s decoding of this parameter number, but for the sake of auditability, the raw parameter number is also populated in the data table.
- ParameterDescription. This is the driver’s decoding of the parameter. This is provided for convenience, so that anyone reading the Event Data Table does not have to manually decode the information (for example, to ascertain that PointNumber = 113 and Parameter = 15 refer to an orifice plate diameter).
- PointNumber. This is the point that was changed. The PointNumberDescription column shows the driver’s decoding of the point number, but for the sake of auditability, the raw point number is also populated in the data table.
- PointNumberDescription. This is the driver’s decoding of the point number. This is provided for convenience.
- ScannerId. This is the Geo SCADA Expert database ID of the ROC Plus Scanner object that populated this record in the Event Data Table. This information might prove useful in an SQL query as part of a filter or a join.
- Timestamp. This is the time of the event with the offset in the ROC Time Zone field on the Scanner tab of the ROC Plus Scanner object applied. This value is stored in the Data Table as a UTC time, so it can used to sort or filter in an SQL query. As this value is stored as a time, ViewX or Virtual ViewX fix the value when the Data Table is displayed.
- TimestampString. This is the time of the event from the ROC with no offsets applied. Because this value is stored as a string, ViewX or Virtual ViewX does not fix the value when it is displayed. This column is provided for auditability.