Structures and databases

Devices


Structures and databases

D2000 system defines the term structure as a particular number of named items, to which it is possible to specify the properties as a value type, start value, saving start value, limits. Structure in the system is defined by an object Structure definition, so a specific name is assigned to it. Structure definition (holds no value) represents a particular model, which is used (in the way of a reference) in the definition of other objects:

An object of Structured variable type is closely associated with an object of Structure definition type. It defines a non-zero number of rows of values. The structure of each row is given by an object of Structure definition type. A value matrix is created:

Example:
The object SD.PersonDef of Structure definition contains the following items:

Item nameItem type
NameText
AgeInteger
BornAbsolute time
ChildrenInteger

The object SV.Persons is a Structured variable type and contains five (5) rows. The rows of this object are defined by the object SD.PersonDef. Object value includes twenty (20) values [5 x 4] of various types, the arrangement of which is shown in the following table:

Row/ColumnNameAgeBornChildren
1



2



3



4



5



Each item represents one value, for which there are defined (and uniquely for each value) all usual properties in the D2000 system (start value, limits, status bits, etc.). Individual values can be displayed in pictures, used in expressions (SV.Persons[3]^Age), in eval tags, or events.

Using an object of Database type, it is possible to access a SQL database (via the interface ODBC), structure of which (names and types of columns) corresponds to an object of Structure definition type.

For each column (item) at the level of an object of Structure definition it is possible to define the following attributes:

These properties are used (or they are not, according to configuration) for columns in the objects of Structured variable and Database types. For objects of Structured variable type, these properties can be configured for each item (value) individually.

* Attribute is defined at the level of the object of Structure definition type and cannot be changed.


Devices

In some cases, there are certain disadvantages to using structures:

These problems are solved by the device concept brought by the D2000 in version 21. The Device can be perceived as a one-line structured variable, whereby:

Thus, in principle, the concept of devices allows the creation of tree structures with the provision of a uniform naming convention of the objects from which the trees are created.

For each column (item) at the level of an object of Device definition it is possible to define the following attributes:

These properties are used (or they are not, according to configuration) for columns in the objects of Device types. For objects of Device type, these properties can be configured for each item individually (with the exception of attributes marked by an asterisk).

* Attribute is defined at the level of the object of Device definition type and cannot be changed.

You can create template schemes, template eval tags, and template archives for devices. All of these object types are configured using a Device definition. Using the template pictures, the Device with the corresponding Device definition can then be displayed. Configuring template eval tags and template archives will cause instances of these objects, i.e. eval tags and archived objects for each Device with the relevant Device definition, to be created.