ODBC Interface: Table Structure

The data structure of each table type available to the ODBC interface is provided here for your reference. 

 

Table name:   :Alarms

Column name

Data Type

Description

Name

Text

Name of the alarm

SubName

Text

Sub-name of the alarm (e.g. LoAlarm, HiAlarm)

Status

Text

Text description of alarm status

Active

Integer

0 for inactive, 1 for active

Unacked

Integer

0 if unacknowledged, 1 if acknowledged

Disabled

Integer

0 if enabled, 1 if disabled

Timestamp

Date/Time

Time of the last event for this alarm. May be null

Message

Text

Message associated with last event

Priority

Text

Priority attached to alarm (text, not numeric)

Type

Integer

Obsolete

HookPointValue

Double

Numeric value of tag triggering the alarm

Area

Text

The area the alarm belongs to

HookPointUnits

Text

The engineering units matching the HookPointValue

Operator

Text

The operator logged in at the time of the last event.

 

 

Table Name:   :AlarmHistory

Column Name

Data Type

Description

Timestamp

Date/Time

Date and time of each alarm event

Name

Text

Name of the alarm

SubName

Text                                     -

Sub-name of the alarm (e.g. HiAlarm, LoAlarm)

Event

Text

Text description of the alarm event. (e.g. ACK, Cleared, Event, etc.)

Message

Text

Message associated with the event

Priority

Text

Priority of the alarm (as text, not numeric)

Type

Integer

Obsolete

HookPointValue

Double

The value of the tag triggering the alarm at the time of the event.

Area

Text

The area the alarm belongs to.

HookPointUnits

Text

Engineering units associated with the HookPointValue.

Operator

Text

The operator logged in at the time of the event.

 

 

Table name:    SystemNotes

Column Name

Data Type

Description

Timestamp

Date/Time

Date and time of note

Value

Text

User name of logged on operator + text of note

 

 

Table name:    Named after the driver in use 

 For a complete reference to the following fields, please refer to Communication Driver Log-Enabled Variables

Column Name

Data Type

Description

Timestamp

Date/Time

Date and time of last update

ErrorValue

Integer

An error value or code associated with a driver's communication error

FailedCount

Integer

Incremented on each communication error.

FailedRetryCount

Integer

Incremented if failure occurs on a retry

SuccessCount

Integer

Count for successful reads and writes

Quality

Double

Used to show the driver's overall "health"

ResponseTime

Double

The time it takes the PLC/RTU to receive a command, process it and send a response

ErrorAddress

Text

If an address was associated with the error, it will be recorded here

 

 

Logged Tags:  For any logged tag, the table name will be the tag name:

Column Name

Data Type

Description

Timestamp

Date/Time

Date and time of logged value

Value

Double

Value of tag as logged

 

 

Logged tags, grouped by time period as specified by 'SQLQueryTableTPPs' , can be accessed by a combination of the tag name, a colon, and the duration of the time period.  For example, if logging Tank1Level with SQLQueryTableTPPs set to 10, the table name will be Tank1level:10

Column Name

Data Type

Description

Timestamp

Date/Time

Date and time at beginning of each time span

Value:Average

Double

Average value within each time span

Value:Minimum

Double

Minimum value recorded in the time span

Value:Maximum

Double

Maximum value recorded in the time span

Value:Delta

Double

Change in value over the range

Value:ValueAtStart

Double

Value at the beginning of the time span

Value:TimeOfMin

Date/Time

Time of the minimum value recorded in the range

Value:TimeOfMax

Date/Time

Time of the maximum value recorded in the range

Value:ZToNZCount

Long

Count of zero to non-zero transitions during the span

Value:NonZeroTime

Double

Total time within the span that the value is not zero or invalid

Value:Total

Double

Arithmetic sum of the recorded values in the time span

Value:Interpolated

Double

A value interpolated across a range of time spans.

 

By way of illustration, the following screen shot shows an example of logged tag data that has been imported into a Microsoft Access database table.