User Tools

Site Tools


code:dqmh:hse-application-template:configuration

12 Configuration

The HSE Application Template makes use of and adheres to the HSE project structure. All the configuration files can be found in the <%appname%>_Config directory:

  /TEMPLATE_Config/
     /Common                   common config files
     /Unit_xyz                 one set of configuration data
     /Unit_abc                 another set of configuration data
     config.ini                defines which unit directory to use (not under SCC)
     config.ini.default        default file (checked into SCC)

This example shows the configuration folder for an application named TEMPLATE.

config.ini

The config.ini file is the main configuration file. It is read by the application and provides information about which subset (or “unit”) of config files to use, which modules to load and display, and more:

key description
system.unit-id The name of the unit (subdirectory which contains the actual configuration files)
system.title The title to displayed in the title bar of the application window
modules.list List of modules to load at startup (*)  
modules.start The module to display first in the UI Manager (*)
[log] Settings for the HSE-Logger

(*) Module paths are noted from the application base path (i.e. the path the startup.vi sits in).

The config.ini file itself is usually not saved in source code control to avoid overwriting each other's local configuration. Instead, there will be a config.ini.default file which serves as a template for the actual configuration file.


Unit folders

The configuration folder will contain one or more Unit directories. A unit is a specific installation or location of an application. Each of these unit directories contains a full set of configuration files. This system serves as a way to manage multiple different sets of configuration data, both in source code control and for each installed instance of the application.

Examples for units could be

  • Unit_Teststation01, Unit_Teststation02, Unit_Teststation03
  • Unit_Shopfloor, Unit_Local-Joerg, Unit_Local-Manu, Unit_Local-Alex

The config.ini file defines which unit directory the application should use.


Module Configuration

The HSE Way of working defines that each DQMH module has their own, separate configuration file located in the unit subdirectory of the application's config directory.

A DQMH module named Dummy would require a configuration file by the name of dummy.ini (Note that they are not case sensitive):

Any DQMH module implementing the HSE DQMH Flavour should have their descriptor defined in their config file:

  [global]
  ; The descriptor is used for the VI's Front Panel Window titlebar 
  ; and for the entries in the UI Manager's Run-Time Menu.
  descriptor = "A Dummy"

Framework Modules

More information on the configuration of the HSE Framework module can be found on the corresponding pages:


Alternative Paths

You can provide specific locations for your application's <%appname%>_Config and <%appname%>_Data folders by adding the following entries to your application's .ini file(*). Replace <%appname%> with your actual application name.

(*) The application .ini file is a configuration file that resides in the application directory (the directory containing the application as returned by LabVIEW's Application Directory VI) and has the same name as the project itself.

LabVIEW allows specifying a customized .ini configuration file when building an executable. This .ini file will have the same name as the .exe file and will be copied into the same folder as the .exe. See the NI's knowledge base article on combining an .ini with an executable.

Relative Paths

You can provide paths relative to the application directory:

  [HSE]
  configdir=a\\relative\\subdir\\<%appname%>_Config
  datadir=<%appname%>_Data

Absolute Paths

You can provide absolute paths:

  [HSE]
  configdir=C:\\some\\directory\\<%appname%>_Config
  datadir=z:\\another\\drive\\<%appname%>_Data

Real-Time

Relative paths are not supported for RT Systems. Here's an example of how to place configuration files for the DB Connector module:

1. Add a configuration file for the application c/<appName>/<appName.ini and place absolute paths for config and data directories:

  [HSE]
  configdir = "/c/LoggerTest/Config"
  datadir = "/c/LoggerTest/Data"

2. Place the content of your configuration folder in the configdir:

code/dqmh/hse-application-template/configuration.txt · Last modified: 2024/07/17 11:04 by 40.77.167.33