Relational Database(rdbms via odbc) Interface


Example 3.10 – Event Based Output



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

Example 3.10 – Event Based Output


SQL Statement
(file PI_EVOUT1.SQL)

UPDATE T3_10 SET PI_TIMESTAMP=?, PI_VALUE=?, PI_STATUS=? WHERE PI_KEY LIKE 'Key123';

Relevant PI Point Attributes

Extended Descriptor

Location1


Location2


Location3

Location4

Location5

P1=TS P2=VL P3=SS_I

1

0

0

0

0

InstrumentTag

Point Type

Source Tag

Point Source







PI_EVOUT1.SQL

Float16

SINUSOID

S







RDBMS Table Design

Table T3_10

PI_TIMESTAMP

PI_VALUE

PI_STATUS

Datetime
(MS SQL Server)

Date/Time (MS Access)



Real (MS SQL Server)

Byte (MS Access)



Smallint (MS SQL Server)

Number Whole Number (MS Access)


Example 3.11 – Output Triggered by 'Sinusoid', Values Taken from 'TagDig'


SQL Statement
(file PI_EVOUT2.SQL)

UPDATE T3_11 SET PI_TIMESTAMP=?, PI_VALUE=?, PI_STATUS_I=?, PI_STATUS_STR=?;

Relevant PI Point Attributes

Extended Descriptor

Location1

Location2

Location3

Location4

Location5

P1='TagDig'/TS P2='TagDig'/VL P3='TagDig'/SS_I P4='TagDig'/SS_C

1

0

0

0

0

InstrumentTag

Point Type

Source Tag

Point Source







PI_EVOUT2.SQL

Float16

SINUSOID

S







RDBMS Table Design

Table T3_11

PI_TIMESTAMP

PI_VALUE

PI_STATUS_I

PI_STATUS_STR

Datetime (MS SQL Server)

Date/Time (MS Access)



Char(12) (MS SQL Server)

Text(12) (MS Access)



Smallint (MS SQL Server)

Number Single Precision


(MS Access)

Varchar(20)
(MS SQL Server)

Text(12) (MS Access)


Example 3.12 – Global Variables


SQL Statement
(file PI_G1.SQL)

UPDATE T3_12 SET PI_TIMESTAMP=?, PI_TAGNAME=?, PI_VALUE=?, PI_STATUS=?;

Relevant PI Point Attributes

Extended Descriptor

Location1


Location2


Location3

Location4

Location5

P1=G1 P2=G4 P3=G5 P4=G6

1

0

0

1

0

InstrumentTag

Point Type

Point Source










PI_G1.SQL

Int16

S










RDBMS Table Design

Table T3_12

PI_TIMESTAMP

PI_TAGNAME

PI_VALUE

PI_STATUS

Datetime (MS SQL Server)

Date/Time (MS Access)



Char(50) (MS SQL Server)

Text(50) (MS Access)



Real (MS SQL Server)

Number
Single Precision (MS Access)



Char(12)
(MS SQL Server)

Text(12)
(MS Access)



Content of the global variables file

G1='sinusoid'/TS G2="any_string1" G3="any_string2" G4='sinusoid'/AT.TAG G5='sinusoid'/VL G6='sinusoid'/SS_C …

Yüklə 1,66 Mb.

Dostları ilə paylaş:
1   ...   40   41   42   43   44   45   46   47   ...   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