Relational Database(rdbms via odbc) Interface


Example 4.1 – PI Point Database Changes – Short Form Configuration



Yüklə 1,66 Mb.
səhifə45/50
tarix07.04.2018
ölçüsü1,66 Mb.
#46960
1   ...   42   43   44   45   46   47   48   49   50

Example 4.1 – PI Point Database Changes – Short Form Configuration


SQL Statement
(file PI_TAGCHG1.SQL)

INSERT INTO T4_1 (TAG_NAME, ATTRIBUTE_NAME, CHANGE_DATETIME, CHANGER, NEW_VALUE, OLD_VALUE) VALUES (?, ?, ?, ?, ?, ?);

Relevant PI Point Attributes

Extended Descriptor

Location1

Location2

Location3

Location4

Location5

P1= AT.TAG
P2= AT.ATTRIBUTE
P3= AT.CHANGEDATE
P4=AT.CHANGER
P5=AT.NEWVALUE
P6=AT.OLDVALUE

1

0

0

-1

(Marks the tag as managing point for point changes)



0

InstrumentTag

Point Type

Point Source

PI_TAGCHG1.SQL

Int32

S

RDBMS Table Design

Table T4_1

TAG_NAME

ATTRIBUTE_NAME

CHANGE_DATETIME

CHANGER

Varchar(80) (MS SQL Server)

Text(80) (MS Access)



Varchar(80) (MS SQL Server)

Text(80) (MS Access)



Datetime (MS SQL Server)

Date/Time (MS Access)



Varchar(80) (MS SQL Server)

Text(80) (MS Access)



NEW_VALUE

OLD_VALUE







Varchar(80) (MS SQL Server)

Text(80)


(MS Access)

Varchar(80) (MS SQL Server)

Text(80)


(MS Access)






Example 4.2 – PI Point Database Changes – Long Form Configuration (only changedate and tag name recorded)


SQL Statement
(file PI_TAGCHG2.SQL)

INSERT INTO T4_2 (TSTAMP_EXEC, TSTAMP_CHANGEDATE, TAG) VALUES
({Fn NOW()}, ?, ?);

Relevant PI Point Attributes

Extended Descriptor

Location1

Location2

Location3

Location4

Location4

P1= AT.CHANGEDATE
P2= AT.TAG


1

0

0

-2

(Marks the tag as managing point for point changes)



0

InstrumentTag

Point Type

Point Source

PI_TAGCHG2.SQL

Int32

S

RDBMS Table Design

Table T4_2

TSTAMP_EXEC

TSTAMP_CHANGEDATE

TAG

Datetime
(MS SQL Server)

Date/Time


(MS Access)

Datetime
(MS SQL Server)

Date/Time


(MS Access)

Varchar(1024)
(MS SQL Server)

Text(255)


(MS Access)

Example 5.1 – Batch Export (not requiring Module Database)


SQL Statement
(file PI_BA1.SQL)

INSERT INTO T5_1 (BA_ID,BA_UNITID,BA_PRODUCT,BA_START,BA_END) VALUES (?,?,?,?,?);

Relevant PI Point Attributes

Extended
Descriptor

Location1

Location2

Location3

Location4

Location5

P1=BA.BAID P2=BA.UNIT P3=BA.PRID P4=BA.START P5=BA.END

1

0

0

1

0

Point Type

InstrumentTag





Point Source







Float32

PI_BA1.SQL




S







RDBMS Table Design

Table T5_1

BA_ID
BA_UNITID
BA_PRODUCT

BA_
BA_END

Varchar(1024)
(MS SQL Server)

Text(255)


(MS Access)

Datetime
(MS SQL Server)

Date/Time


(MS Access)

Yüklə 1,66 Mb.

Dostları ilə paylaş:
1   ...   42   43   44   45   46   47   48   49   50




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©muhaz.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin