|
Example 3.10 – Event Based Output
|
səhifə | 44/50 | tarix | 07.04.2018 | ölçüsü | 1,66 Mb. | | #46960 |
|
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 …
|
Dostları ilə paylaş: |
|
|