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

Insert a row for a single PI point value whenever the source tag snapshot value changes

Insert a row for a single PI point value whenever the source tag snapshot value changes

  • Last UpdatedAug 19, 2025
  • 1 minute read

The following example shows how to configure an output tag that takes sine wave values generated by the Random Simulator interface, and inserts a row containing of the timestamp, value and status to a database table.

To configure this example, perform the following steps.

  1. To ensure that test data is generated rapidly, launch PI ICU on the PI Server and set scan class 1 of the Random interface to a frequency of five seconds.

  2. In your target relational database, create a table called "table1" containing the following columns:

    Column Name

    SQL Data Type

    timestamp

    DateTime

    value

    Float

    status

    Int

  3. Launch PI System Management Tools, choose Points > PI Point Builder, and define a point called "SINUSOID_TO_RDBMS". Configure its settings as follows:

    Point Attribute

    Setting

    ExDesc

    /SQL="INSERT INTO

    table1 (timestamp, value, status)

    VALUES (?,?,?);"

    P1=TS P2=VL P3=SS_I

    Location4

    0

    SourceTag

    SINUSOID

  4. Start the RDBMS interface and check the log output to verify that your output tag is properly defined. If there are no errors in the point definition, check the RDBMS to verify that values are being written to the table.

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