Configure ODBC data source

Very important for CS is a database, which stores configuration data of all objects of class (or child class of) BaseProcess. There are no such things like ini-files, except for real-time systems. The whole system is configured in the database, which has information on each object that you may want to instantiate. CS retrieves the information from the database during run-time while executing the constructor of a class. At present, the database is implemented as a Microsoft Access database and accessed via ODBC. Of course, the database can also accessed from Linux. The following steps have to be performed for setting up the database. A sample database "CS_process.mdb" is part of the package CSMain.

Set up the CSSqlServer

This is required only on one Windows PC, that will be a server for the database for all CS systems on all other computers.
  1. Download and install the package CSSqlServer.
  2. The database must be registered as an ODBC data source. ( My Computer->Control Panel->(XP: Administrative Tools->)Data Sources (ODBC) ). By default, the ODBC data source (not the database) has the name "Process". If you are using Win7 64 bit but a 32 bit version of LabView, you have to make sure that the already installed 32 bit ODBC driver is used. For this open the file Odbcad32.exe under Windows\SysWoW64 instead of using the Control Panel.
  3. Run the program ROOTPATH\binaries\CSTools\CSSQLServer.exe.

Configure the database

  1. There are two possibilities to edit the database.
    1. Using the package CSDB_Config, start the ROOTPATH\binaries\CSDBTools\CSDBTools.exe. This is the recommended method.
      • You can select the class, the objects for each class, add/delete object, edit objects and do mass configuration of objects.
      • When editing an object, press "Apply Attribute Mapping" to have a better description of the parameters.
    2. Open the database using Microsoft Access. Go to forms. Click on "Instance Data (THIS IS WHAT YOU WANT)". Warning: This is not recommended. An example, when deleting an instance here, the attribute values of that instance are not deleted from the database. This may lead to funny results in case new objects are created with (accidentally) the same instance ID. Consider using the CSDBTools for editing the database (see above).
  2. Enter a proper name for the SuperProc process for each CS system you are using. The naming convention for objects of SuperProc class is "SYSTEMNAME\Super", where you replace "SYSTEMNAME" by a unique system name like "MyVacuum", "MyHighVoltage".
  3. Configure the SuperProc process. In the fields "Special0 ..SpecialN" you may define objects that are instantiated automatically by the SuperProc object while it starts.
  4. Configure each object you want to use (there may be more objects in the database. You do not have to use them all, but it is good to have them for later use). Amongst others, there are some test objects predefined. Have a look at "Test1".
    1. PeriodicError and EventError are all set to "1". This is to make sure, that they will be set to proper values when Test1 is instantiated.
    2. PresetPdcWatchD. This is the preset value [ms] for the watchdog of the periodic loop. Put this value to -1 if you do not want to use the watchdog. The value is given in ms. A good value to start may be 15000.
    3. PresetEvtWatchD. This is the preset value [ms] for the watchdog of the event loop. Put this value to -1 if you do not want to use the watchdog. The value is given in ms. A good value to start may be 10000.
    4. PeriodicInterval. This is the interval [ms] between the cycles of the periodic loop. Put this value to -1 if you do not want to use the periodic loop. The value is given in ms. A good value to start may be 10000. Note: PresetPDCWatchD should be larger (or -1) than the PeriodicInterval. If not, the watchdog will complain.
    5. EventTimeout. The timeout value [ms] (time between cycles) of the event loop. Default is 10000.

Parameters for CS systems

When starting a CS system, each system on each PC, independently of the operating system, must know how to access the database. It does not matter, whether the system is started as LabVIEW development system (via CS_Start.vi) or as runtime system (via CS.exe). There are two possibilities to configure the access to the database.
  1. Manually: When started, there are two parameters you have to enter.
    1. "Data Source (ODBC)", the name of the data source as configured above. b. "sqlServerNode", the name of the computer where the CSSqlServer runs
  2. By command line parameter. For a description of command line parameters see Getting Started - Advanced Level.

-- DietrichBeck - 18 Sep 2006
Topic revision: r7 - 2012-07-09, DennisNeidherr
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)