Scan-based outputs to an RDBMS table
- Last UpdatedNov 18, 2022
- 1 minute read
- PI System
- Interfaces
To periodically write values to an RDBMS table, use the 'tagname'/VL placeholder.
INSERT INTO table13 (alias, timestamp, value, status, quality, annotation)
VALUES (?,?,?,?,?,?);
Configure the target PI point with the following settings:
|
Point attribute |
Description |
Setting |
|---|---|---|
|
ExDesc |
Placeholders and options |
P1=" sinusoid " P2= 'sinusoid'/TS P3= 'sinusoid'/VL P4= 'sinusoid'/SS_I P5= 'sinusoid'/QE P6= 'sinusoid'/ANN_C |
|
Location2 |
First row/all rows |
1 (All rows are processed) |
|
Location4 |
Scan class |
1 |
|
Location5 |
Exception reporting |
1 (Exception reporting is turned off) |
|
InstrumentTag |
Name of the SQL file |
Example13.SQL |
|
PointType |
Data type of PI point |
Float32 |
In the RDBMS, create a table formatted as follows:
|
Column name |
Column data type |
|
|---|---|---|
|
SQL Server data type |
Microsoft Access data type |
|
|
timestamp |
DateTime |
Date/Time |
|
value |
Real |
Number-Single Precision |
|
status |
Smallint |
Number-Whole Number |
|
questionable |
Smallint |
Number-Whole Number |
|
annotation |
Varchar(255) |
Text(255) |
Note: For outputting annotations, enable PI SDK by setting the interface startup parameter:
/PISDK=1