Write multiple PI values to a single row in a timely manner
- Last UpdatedDec 17, 2025
- 1 minute read
The interface can output more than one value to a single database row.
To configure it, define an INSERT query that takes snapshot values of various tags. Use the 'tagname'/VL placeholder format. For example, the following query takes snapshot values from three different PI Random Simulator interface tags and inserts them to a table for each scan.
INSERT INTO table1 (timestamp, value1, value2, value3)
VALUES (?,?,?,?);
|
Point Attribute |
Setting |
|---|---|
|
ExDesc |
/SQL="INSERT INTO table1 (timestamp, value1, value2, value3) VALUES (?,?,?,?);" P1=TS |
|
Location4 |
1 |
The preceding query writes the following row to a table:
|
Timestamp |
SINUSOID Value1 |
SINUSOID Value2 |
CDT158 Value3 |
|---|---|---|---|
|
01-Oct-2015 10:00:00 |
91.23 |
47.81 |
237.9 |
|
01-Oct-2015 10:15:00 |
98.1 |
49.23 |
31.1 |
|
01-Oct-2015 10:30:00 |
99.85 |
50.1 |
137.5 |