Home : Source versions tested
Q12623 - INFO: Source versions tested

The Citect SCADA Reports system version is unknown for the data we used in testing, the Citect database version tested is 1.0.0.159.

The database structure is as follows:

TAGS table returns the tag name, TagID, and DataType ID. The TagID is used to get time stamps, values, and quality ID from the samples tables. The DataTypeID matches up the TypeName from the DataTypes table and tells us which table to retrieve data from. The quality ID is used to determine whether the value is considered "Good" or not and defined when configuring the collector.

To query data use:

USE [FRSCADAReports]
GO
DECLARE @return_value int
EXEC  @return_value = [dbo].[GetInterpolatedTagSamplesByID]
            @tagID = 2,
            @startDateTime = '05-17-2007 00:00:00',  
            @endDateTime = '05-18-2007 00:00:00',
            @samplePeriod = 1000000,
            @interpolationMode = 1
SELECT      'Return Value' = @return_value
GO

SamplePeriod:

One Second = 10,000
One Minute = 600,000
One Hour = 36,000,000
One Day = 864,000,000

InterpolationMode:

1 means time weighted average

Data Types:

1 = Numeric = dbo.NumericSamples
2 = Digital = dbo.DigitalSamples
3 = String = dbo.StringSamples

Dates are stored as BigInt's and can be extracted using:

USE [FRSCADAReports]
GO
SELECT dbo.ToDate(633149568000000000)

Tags table:

 

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 10/29/2009 2:18 PM.
Last Modified on 9/8/2010 3:26 PM.
Last Modified by No Author Name Available!.
Article has been viewed 3080 times.
Rated 6 out of 10 based on 8 votes.
Print Article
Email Article