Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Interface for Relational Database RDBMS via ODBC

Update a single tag with most recent values from database

Update a single tag with most recent values from database

  • Last UpdatedNov 18, 2022
  • 1 minute read

This query retrieves all values written to the RDBMS after the last time that values were read.

SELECT timestamp, value, 0
FROM table2
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 (Processes all rows)

Location3

Data distribution strategy

0 (Single)

Location4

Scan class

1

Location5

Exception reporting

0 (Exception reporting is enabled)

InstrumentTag

Name of the query file

Example2.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

TitleResults for “How to create a CRG?”Also Available in