How the PowerConfigs work

This page gives you an overview of how the PowerConfigs work when inserted/edited in the PARA module, when templates/DP lists are created ("ASCII out") and when edited templates/DP lists are imported ("ASCII in") (more information on the layout and structure of the powerconfig file is given on the page Structure of the powerconfig file).

PowerConfigs are defined using CTRL. The definition includes the following script sections, which are finally put together into a CTRL script as part of mass configuration, and executed using the CTRL function evalScript(). These script sections are located on the separate tabs of the PowerConfig Editor:

These definitions are made using the PowerConfig Editor and saved in the file. Ultimately scripts are generated from these definitions at runtime.

You should pay attention when using comments within a script in the powerconfig file (but also when editing using the different tabs of the PowerConfig Editor). The comments should begin with /* and end with */. If you add a comment by using prefixed slashes //, problems can occur when reading out the file. These problems can occur because the single sections of the file also begin with this sign.

When a PowerConfig is inserted at the master data point, a script from the following sections is executed:

  1. Variables: Initialization of the defined variables.

  2. Default values: Setting of the values that were configured in the Default section. These values are displayed in the configuration screen after insertion and can be changed when configuring the PowerConfig.

When the PowerConfig configuration panel opens (see PowerConfig configuration at the data point), the following steps are executed:

  1. Variables : Initialization of the defined variables.

  2. Input: Using dpGet(), the configured values are retrieved from the Event Manager and written to the variables.

  3. Input calculation: Before displaying the values in the configuration panel, an optional calculation can be performed on them.

  4. Manual input: The user can subsequently alter all the dynamic attributes that are displayed in the configuration panel.

  5. Clicking on OK in the configuration panel assigns the set values to the variables.

  6. Output calculation : An optional calculation can be performed in this step before the values are set.

  7. Output: The values are set by means of dpSetWait().

The following steps are performed for an "ASCII out":

  1. Variables : Initialization of the defined variables.

  2. Input: Using dpGet(), the configured values are retrieved from the database and written to the variables.

  3. Input calculation : Before exporting the values into an ASCII file, an optional calculation can be performed on them.

  4. Manual input : Only the dynamic attributes, which can be amended later, are included in the export into an ASCII file.

The following steps are performed for an "ASCII in":

  1. Variables : Initialization of the defined variables.

  2. Input: Using dpGet(), the configured values are retrieved from the Event Manager and written to the variables.

  3. Input calculation : An optional computation can be performed on the values before further processing.

  4. Manual input : The dynamic attributes have already been changed in the ASCII file in this case.

  5. The variables are supplied with the values defined from the file or with the values retrieved from the Event Manager.

  6. Output calculation : An optional calculation can be performed in this step before the values are set.

  7. Output : The values are set by means of dpSetWait().

All the definitions for a PowerConfig are set in the specific tabs of the dedicated Editor. The following pages describe the functions of each of the tabs.