Event Data Table
You can store events from a FloBoss in a ClearSCADA Data Table. The Data Table will have a specific schema entry. Unlike the other FloBoss database objects, Data Tables are generic database objects (see Configuring Data Tables in the ClearSCADA 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 ClearSCADA 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 ClearSCADA FloBoss Driver can create the correct columns in the Data Table automatically. To do this, you need to associate the Data Table with the relevant ClearSCADA FloBoss Scanner object. To do this:
- Display the properties window (‘configuration Form’) for the FloBoss 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 FloBoss 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 FloBossDemo.sde file.
A single Data Table can store events from multiple flow computers. For the ClearSCADA FloBoss 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 120 section of the ROC Protocol Specifications Manual.
- EventText. This is the event text of the event from the FloBoss, if it exists. Only some events have event text.
- 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 FloBoss Scanner object that retrieved the events. This information is provided as a convenient way to filter event records from multiple FloBosses.
- 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 = 46 and Parameter = 10 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 ClearSCADA database ID of the FloBoss 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 FloBoss Time Zone field on the Scanner tab of the FloBoss 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 WebX fix the value when the Data Table is displayed.
- TimestampString. This is the time of the event from the FloBoss with no offsets applied. Because this value is stored as a string, ViewX or WebX does not fix the value when it is displayed. This column is provided for auditability.