...
In the interface D2000 VBApi, the structure VBApi_TUniVal is used for the presentation of the current values of objects and also values from the archive. It contains all available information about the object value. Logical values (LV) are represented by an integer value, where the value 0 represents False and the value 1 represents True. The value type array is not supported on the structure level.
...
Blok kódu |
---|
language | esl |
---|
theme | Confluence |
---|
|
Type VBApi_TUniVal
Valid As Long - Value validity (value type : LV)
Weak As Long - WEAK attribute (LV)
Transient As Long - Transient state (LV)
Default As Long - Default value attribute (LV)
'
valueType As Long - Value type
statType As Long - Value limits
ValTime As Date - Value occurrence time
bFlags As Long - User's flags of value (A..P)
bArchFlags As Long - Archive attributes of value
' items, which contain own value according to the value type are mentioned above
valueINT As Long - For types: Bo, Int, St, Al, Pr, Qx
valueTXT As String - For type Text
valueRE As Double - For types: Re, TmR
valueTm As Date - For type: TmA
End Type
|
Constants for the item valueType:
Blok kódu |
---|
language | esl |
---|
theme | Confluence |
---|
|
Public Const NAN = 0 - No type
Public Const Bo = 1 - Logical type
Public Const Inte = 2 - Value of Integer type
Public Const Re = 3 - Value of Real type
Public Const St = 4 - Value of station type
Public Const Al = 5 - Value of Alarm type
Public Const Pr = 6 - Value of Process type
Public Const TmA = 7 - Value of Absolute time type
Public Const TmR = 8 - Value of Time interval type
Public Const Txt = 9 - Value of Text type
Public Const arr = 10 - Value of Array type
Public Const QX = 11 - Qadrat value
Public Const Rec = 12 - Structure |
Constants for the item statType:
Blok kódu |
---|
language | esl |
---|
theme | Confluence |
---|
|
Public Const InLimit = 0
Public Const VL_Limit = 1
Public Const L_Limit = 2
Public Const H_Limit = 3
Public Const VH_Limit = 4
Public Const LimitsProblem = 5 |
Constants for the item bFlags:
User flags are represented by an integer value, where its individual bits, in the binary pattern, represent the individual flags. 0. bit (zero bit) is assigned to the flag, 1. bit is assigned to the flag B....
Bit masks for the test of the settings of individual bits are defined by the following constants:
Blok kódu |
---|
language | esl |
---|
theme | Confluence |
---|
|
Public Const BF_A = 1
Public Const BF_B = 2
Public Const BF_C = 4
Public Const BF_D = 8
Public Const BF_E = 16
Public Const BF_F = 32
Public Const BF_G = 64
Public Const BF_H = 128
Public Const BF_I = 256
Public Const BF_J = 512
Public Const BF_K = 1024
Public Const BF_L = 2048
Public Const BF_M = 4096
Public Const BF_N = 8192
Public Const BF_O = 16384
Public Const BF_P = 32768 |
The logical operator and between an integer value and the particular constant is in VB interpreted as a bitwise AND.
Constants for the item bArchFlags:
In case, that we work with a value from the archive, there is used the item bArchFlags. For the current values, its value is always 0. It contains the additional information about the historical value. Representation of individual flags is similar to the item.
Bit masks for the test of the settings of individual flags are defined by the following constants:
...
Other structure items contain their own value, where the values for individual types are placed in items according to the following table:
Structure item | Validity for types |
---|
ValueINT | Bo, Int, St, Al, Pr, Qx |
ValueTXT | Text |
ValueRE | Re, TmR |
ValueTM | TmA |
Kotva |
---|
| vbapi_tlogrec |
---|
| vbapi_tlogrec |
---|
|
VBApi_TLogRec structure
...
Blok kódu |
---|
language | esl |
---|
theme | Confluence |
---|
|
Public Const Prty_Info_Log = 0
Public Const Prty_Warning_Log = 1
Public Const Prty_Alarm_Log = 2
Public Const Prty_CriticalAlarm_Log = 3
Public Const Prty_Error_Log = 4 |
Note:
As the structure VBApi_TlogRec describes various types of events, the meaning of individual items is not steady. It is, therefore, suitable to confront their contents with by browsing the log database in process the D2000 HI process.
...