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

Single input with PI annotations

  • Last UpdatedNov 18, 2022
  • 1 minute read

The following example updates the point with annotations, timestamp and value read from an RDBMS table.

SELECT timestamp AS PI_TIMESTAMP,
value AS PI_VALUE,
annotation AS PI_ANNOTATION
FROM table9
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

Exception reporting

1 (Exception reporting is turned off)

InstrumentTag

Name of the SQL file

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

annotation

Varchar(255)

Text(255)

Note: For storing result sets with annotations, enable PI SDK by setting the interface startup parameter /PISDK=1.

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