Event-driven outputs to an RDBMS table
- Last UpdatedNov 18, 2022
- 1 minute read
- PI System
- Interfaces
This example updates the RDBMS when the SINUSOID point receives a new value.
INSERT INTO table12 (timestamp, value, status) VALUES (?,?,?);
Configure the target PI point with the following settings:
|
Point attribute |
Description |
Setting |
|---|---|---|
|
ExDesc |
Placeholders and options |
P1=TS P2=VL P3=SS_I |
|
Location2 |
First row/all row |
N/A for outputs |
|
Location4 |
Scan class |
0 (Event driven execution) |
|
InstrumentTag |
Name of the SQL file |
Example12.SQL |
|
Location5 |
Exception reporting |
1 (Exception reporting is turned off) |
|
PointType |
Data type of PI point |
Float32 |
|
SourceTag |
Triggering tag |
SINUSOID |
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 |