Single input with questionable flag
- Last UpdatedNov 18, 2022
- 1 minute read
- PI System
- Interfaces
The following example updates a point with timestamp, value, status, quality (mapped to the PI questionable flag), and annotation read from an RDBMS table.
SELECT timestamp AS PI_TIMESTAMP,
value AS PI_VALUE,
quality AS PI_QUESTIONABLE
FROM table10
WHERE timestamp > ? ORDER BY timestamp ASC;
Configure the target PI point with the following settings.
|
Point Attribute |
Description |
Setting |
|---|---|---|
|
ExDesc |
Placeholders and options |
P1=TS |
|
Location2 |
First row/all rows |
1 (All rows are processed) |
|
Location3 |
Data distribution strategy |
0 (Single) |
|
Location4 |
Scan class |
1 |
|
Location5 |
Out-of-order data handling |
1 (Exception reporting is turned off) |
|
InstrumentTag |
Name of the SQL file |
Example10.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 |
|
quality |
Smallint |
Number-Whole Number |