Relational Database(rdbms via odbc) Interface


Example 2.1a – insert sinusoid values into table (event based)



Yüklə 1,66 Mb.
səhifə38/50
tarix07.04.2018
ölçüsü1,66 Mb.
#46960
1   ...   34   35   36   37   38   39   40   41   ...   50

Example 2.1a – insert sinusoid values into table (event based)


SQL Statement
(defined in file PI_SINUSOID_OUT.SQL)

INSERT INTO T2_1a (PI_TIMESTAMP1, PI_VALUE, PI_STATUS) VALUES (?,?,?);

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_SINUSOID_OUT.SQL

Float32

SINUSOID

S







RDBMS Table Design

Table T2_1a

PI_TIMESTAMPn

PI_VALUE

PI_STATUS

Datetime
(MS SQL Server)

Date/Time


(MS Access)

Real
(MS SQL Server)

Single Precision


(MS Access)

Smallint
(MS SQL Server)

Whole Number


(MS Access)

Example 2.1b – insert sinusoid values into table (scan based)


SQL Statement
(defined in file PI_SIN_OUT_SCAN.SQL)

INSERT INTO T2_1b (PI_TIMESTAMP1, PI_VALUE, PI_STATUS) VALUES (?,?,?);

Relevant PI Point Attributes

Extended Descriptor

Location1

Location2

Location3

Location4

Location5

P1='SINUSOID'/TS P2='SINUSOID'/VL P3='SINUSOID'/SS_I

1

0

0

1

0

Instrumenttag

Point Type

Source Tag

Point Source







PI_SIN_OUT_SCAN.SQL

Float32




S







RDBMS Table Design

Table T2_1b

PI_TIMESTAMPn

PI_VALUE

PI_STATUS

Datetime
(MS SQL Server)

Date/Time


(MS Access)

Real
(MS SQL Server)

Single Precision


(MS Access)

Smallint
(MS SQL Server)

Whole Number


(MS Access)

Example 2.1c – insert 2 different sinusoid values into table (event based)


SQL Statement
(defined in file PI_SIN_VALUES_OUT.SQL)

INSERT INTO T2_1c (PI_TAGNAME1, PI_TIMESTAMP1, PI_VALUE1, PI_STATUS1, PI_TAGNAME2, PI_VALUE2, PI_STATUS2) VALUES (?,?,?,?,?,?,?);

Relevant PI Point Attributes

Extended Descriptor

Location1

Location2

Location3

Location4

Location5

/EXD=…path…\ pi_sin_values_out.plh

Content of the above-stated file:

P1=AT.TAG
P2=TS
P3=VL
P4=SS_I P5='SINUSOIDU'/AT.TAG
P6='SINUSOIDU'/VL P7='SINUSOIDU'/SS_I


1

0

0

0

0

Instrumenttag

Point Type

Source Tag

Point Source







PI_SIN_VALUES_
OUT.SQL

Float16

SINUSOID

S







RDBMS Table Design

Table T2_1c

PI_TIMESTAMPn

PI_VALUEn

PI_STATUSn

PI_TAGNAMEn

Datetime (MS SQL Server)

Date/Time (MS Access)



Real (MS SQL Server)

Single Precision


(MS Access)

Smallint (MS SQL Server)

Whole Number


(MS Access)

Varchar(80) (MS SQL Server)

Text(80)
(MS Access)



Note: The /EXD= keyword is used when the overall length of placeholders is greater than 1024 bytes. Normally, the placeholder definitions can be stated in the ExtendedDescriptor directly

Yüklə 1,66 Mb.

Dostları ilə paylaş:
1   ...   34   35   36   37   38   39   40   41   ...   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