System Tables
This information applies to ConSys Kernel version 1.0.33.131.
The ConSys system database is based on an ODBC connection to a relational database. The Microsoft SQL server is used as system database. The database tables are edited directly with Access and by the Database Editor - a special tool developed for maintenance of the database tables. This document describes the central tables for the system. These tables define the ConSys parameters, addressing, conversion and display formats etc. Additional tables for other purposes are like the console tables and message log tables are described elsewhere.
Table index:
- Computer: Assign a unique id to each computer in the system. Contains additional information about computer and locations.
- Parameter: Parameter definition: Type, address, interpretation.
- ParameterDescription: Parameter location and device.
- ParameterGroup: Parameters are ordered into logical groups.
- Class: Class definition for dynamic classes, like DataServers , on the system.
- Interpretation: Data values used in interpretation/conversion of binary data to physical data.
Helper tables:
- AddressDefinition: Definition of the general address fields in the parameter table.
- InterpretationDefinition: Definition of general interpretation fields in interpretation.
- ViewRequest: A view with all relevant fields in the main tables. Used by applications to access all tables with a single lockup.
- SystemMessageLog: Used to store messages from the system during the run.
Press this symbol to go to back to the index above.
References:
The main table relationship's is shown in the picture below:

Class:

The class table define unique id's for all datataserver classes in the control system. Dataservers are loaded dynamically from the dll library specified in this table.
ClassIdinteger unique class id ClassName varchar 80 The c++ class name dllName varchar 80 Name of the dll containing the class.

Computer:

This table is primary used to assign unique id's to computers. Computers with an active ConSys kernel running are marked in this table. Additional information is included as an aid for system administrators. This additional information is not used by the ConSys.
ComputerIdinteger unique computer id used in the ConSys. ComputerName char 16 computer name on network. NetCard varchar 40 information for sa. TCP_IP varchar 20 information for sa. PrimaryUse varchar 80 information for sa, like front_end, main server, console etc. Location varchar 255 information for sa. Physical location, like room number. Active integer 1 if computer registered as active (ConSys Kernel running) - else 0.

Parameter:

This table defines all parameters in the control system. Each parameter is identified by a unique id, ParameterId. A short name, ParameterName, typical 8-10 characters, is associated with each parameter. This name is not unique in the parameter table - it will typical describe all parameters connected to a given piece of hardware, like control, status and acquisition values for a power supply. It is assumed, that all parameters with a given ParameterName are located in a single device on a front-end. The key 'ParameterName' links to a detailed hardware and location description in the table ParameterDescription. The table includes a number of general address parameters, a0..a5, s0..s1, used in the data servers/devices to address the hardware. The use of these fields depends the ConSys device assessing the hardware. A description of the use of these general address parameters is found in the table Address Definition.
ParameterId integer unique parameter identifier ParameterName char 20 The parameter name, link to t Parameter Description. SurName char 4 The ParameterName and SurName pair must be unique Giving a 1-1 map to ParameterId. SurName samples: dac, adc, ctrl AdrTypeId integer Link to the Address Definition information. Interpretation integer Link to the Interpretation data information. The use of the general interpretation parameters depend on data type, conversion type and display type as described in 'Interpretations'. Position integer Display information - parameters with identical ParameterName are displayed in ascending order according to position. The primary use of this parameter is in the console program, but other clients may also use this information. See Console Views for further details. AccessFilter integer Bit filter for access type: bit 0: read, bit 1: write DefaultMinTime integer Maximum update frequence, measuret in ms. DefaultDoubleVal double Default floating point value set at device load time. DefaultWordVal integer Default control word set at device load time. a0..a5, integer Address information, used according to information s0..s1 varchar 255 in Address Definition.

ParameterDescription:

Hardware description and location for parameters with 'ParameterName'.
ParameterNamechar 20 Short symbolic name for a the hardware to be controlled typical 8-10 char. Used in ConSys programs as short name display. Description char 30 Description string to be used in ConSys programs ComputerId integer link to front_end computer description. DeviceNo integer Device number on front_end computer. Must correspond to the device registered as this number on the given front_end computer. GroupId integer link to the parameter group, where the parameter belongs. Comment varchar 255 any comments, not used in LS.

The parameters are separated into logical groups. The groups typical is separate machines or part of a machine. The purpose of the grouping of parameters is for ordering and selections.
GroupIdinteger Id of the group. GroupName char 255 Name of the group.
Interpretation:
The interpretation table contains shared general data for two purposes - conversion of data from native values to physical values and display informations. The actual use of these general parameters depends on the interpretation type defined by InterpretTypeId and are hardwired into the source code. The interpretation definition table describes the use of the general fields for a given interpretation type. The ConversionType, DisplayType and Datatype tables are closely related to the interpretation table and its use. See the special document on interpretations for further details on the use of these tables.
InterpretationId integer Unique identification id Description varchar Description of the interpretation InterpretTypeId integer Link to the interpretation type in InterpretationDefinition. I0..I16 integer General purpose integers. d0..d3 double General purpose doubles. t0..t2 char 20 general purpose strings DataServer integer Link to the dataserver used with this type of parameter.
AddressDefinition:
Contain a description of the use of the general address parameters defined in the Parameter table. These descriptions are intended as information only, and are maintained by the programmers writing device drivers and data servers. The address definitions for PCDoct G64 parameters are described in G64 addresses. The database editor use this table to generate user friendly input fields.
Remark: Address types are hardcoded into the ConSys source code. Adding new address types must be done in a way to ensure unique address types for all implementations of the ConSys System.
AdrTypeId integer name of the address type a0..a5_Usage, varchar 80 description of the use of the general address parameters in s0..s1_Usage varchar 80 Parameter.

The interpretation definition table has descriptions of the use of the general-purpose parameters in the interpretation table. The database editor uses these informations to generate meaningful input fields when editing the interpretations. The interpretation definition table also defines the data type, conversion type and display type for the interpretation.
InterpretationId integer unique id of the interpretation type i0..i15_Usage varchar 80 description of the use of the general d0..d4_Usage varchar 80 interpretation parameters in the t0..t2_Usage varchar 80 interpretation table. DataType integer link to the Data type. ConversionType integer link to the Conversion type DisplayType integer link to the Display type

The conversion type, display type and data types are hardwired into the control system code. The correlation between the data types and their conversion and display types defined by these tables. See the special document on interpretation for further details.
SystemMessageLog:
The system message log. ConSys programs write error messages and warnings to this table. The table include information on the error category, type, origin, time etc. The messages are best examined by the ConSys Log program.
ViewRequest:
This structure is a view including all informations needed when assessing a single parameter. The request is a join of almost all fields in the system database tables. Almost all ConSys classes needing database informations can be initialized by the informations in this table. The corresponding C++ class CviewRequestSet (and it's descendant CsafeViewRequestSet) are parsed as arguments in the constructors of these ConSys classes. Most client programs and ConSys kernel operations only need the viewrequestset to access the database informations.
Last Modified 11 January 2019