DataBase Structure

Data Loggers or Recipes are presented in a tree structure in the "Data Loggers & Recipe" source which is located in the 'Project Explorer' window.  By means of using the tree structure, you will be able to view the Data Logger's or Recipe's components which represent the Database columns.  Each item used in the structure to compose the Data Logger or Recipe can be configured through their "Properties Window".

 

Databases created by Movicon will always come with some system columns in addition to the data columns defined by the user. The names of these columns are listed below and can be customized through the "Data Loggers and Recipes Common Database Settings Properties" :

 

 

The name of the logged in user is recorded in the Table's User column only when the record command is prompted by that user.  For instance, if the "Record on Command" has been selected and the user sets the "Recording Variable" by using a button or another control, their name will be recorded.  However, if "Record on Time" is selected, the active user will not be recorded.

 

WARNING! If a Data Logger or a Recipe uses the InMemoryDB (IMDB) for recording data, the database table will not be able to contain more than 127 columns.  If this number of columns is exceeded, the Data Logger or Recipe will not be initialized at the project startup and a message will be issued in the log requesting a reduction in the number of columns used.

The IMDB has a maximum limit of 127 columns.

 

If any ODBC errors are generated at project startup and shown in the DBMS Log as a consequence, the tables managed directly by Movicon for the Historical Log, Data Loggers, Recipes, Trace,  Realtime ODBC, will be recreated only when their structure is not compatible with the one provided by Movicon.   Tables will not be regenerated if other ODBC error types are generated and detected while the tables are being checked through.

In both these cases, an error message will be printed in the "Log DMBS" output window.  In the first case, the  'DROPPED' table is alerted with a message reporting the missing column's name and the subsequent notification of its creation.  In the second case, if the error was caused by an inactive SQL Server service for example, the tables will not be recreated when restoring this error type.

 

The "Create DB Table" command when used in the historicals  (Log Storico, Data Logger, etc.) will attempt to use the existing connection to connect with the database.  If this fails, a new connection will be created by using the ODBC plugin's default settings selected in the Project's General properties.

 

Recording Bit Variables

When a Bit type variable is associated to a DataLogger Column, the corresponding DataBase table field will be created as 'String' type and not 'Boolean' type.  Therefore, the True or False text corresponding to the Bit value will be inserted in the table or, if the two  "Close Bit String" and "Open Bit String" variable properties have been set, the text corresponding to the variable's 1 and 0 value will be inserted.

If you need to create Boolean type columns in the Table corresponding to the Data Logger, you will need to add the General\ODBCUseBooleanForBitTag (DWORD32) registry key that when set to 1 forces the creation of boolean type columns and not string type in the DataBase table for Bit type variables of the corresponding Data Logger columns.

 

In cases where the <VariabileName>.<BitNumber> syntaxes are used, the column will be created with the variable type.  Therefore, you will need to manually  set the same type directly from the Client where the database is managed.  

 

 

 

See Also