Up | Configuration | Examples | Release Notes

 

  

 
Configuration

RT Controller program is configured via configuration file named "RTController.gui.exe.config" placed in the same folder where main program executable file "RTController.gui.exe" exists. Configuration file is XML format and can be easily changed with text editor.

Configuration schema file: RTController.xsd.zip

Example configuration file: RTController.gui.exe.config.zip

Configuration file has two main sections:

  • <nlog> - for RT Controller logging configuration (detailed description could be found there). Make sure that targets are wrapped with asynchronous wrapper so console messages are processed asynchronously (see sample configuration).
  • <RTController> - for RT Controller functional configuration.

<RTController>

RT Controller configuration section has following attributes:

  • ResuscitatorIniPath - Path to rescusitator ini file. It will be used for alive check.
  • ResuscitatorIniKeyName - Application key name in rescusitator ini file. It will be used for alive check.
  • ResuscitatorIniUpdateInterval - Rescusitator ini file update interval. Value is in ms.

Example:

<RTController xmlns="http://www.todivel.no/schemas/RTController.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ResuscitatorIniPath="Rescusitator.ini" ResuscitatorIniKeyName="RTController" ResuscitatorIniUpdateInterval="5000">

RT Controller configuration section has following sections:

  • <counters>
  • <inputs>
  • <outputs>
  • <tasks>
  • <scheduler>

 

<counters>

counters element contains list of counter elements.

All counters have following attributes:

  • name - must be unique between counters.

Following counter types are supported:

  • <counter xsi:type="PerformanceCounter" name="PerformanceCounter" HighPriority="false" Resolution="1" />

    Performance counter is timer based counter. It uses PC timer to provide counting and runs with high resolution (1ms).

    Additional attributes:

    • HighPriority - Should the counter thread be set to High priority (default is normal).
    • Resolution - Sleep time inside the counter thread (default is 1).

  • <counter xsi:type="AdvantechCounter" name="AdvantechCounter" DeviceId="1000" Channel="0"/>

    Advantech counter is for advantech card 1780U. It is able to get the counter from the card itself. Card then can be connected to encoder.

    Additional attributes:

    • DeviceId - Advantech device id (integer);
    • Channel - counter id (integer).

  • <counter xsi:type="PipeCounter" name="PipeCounter" PipeName="Counter1" />

    Pipe counter is for external counters. The requirement for pipe counter is that client must open the pie (connect to it) send 8 byte message (first 4 bytes integer with length of message, rest 4 bytes is counter value). This way it is possible to drive counter from external software.

    Additional attributes:

    • PipeName - Name of a server pipe which will be open for clients.

 

<inputs>

inputs element contains list of input elements.

All inputs have following attributes:

  • name - must be unique between inputs.
  • CooldownPeriod - cooldown period in microseconds to ignore input changes. Input will not be updated after detected value change for cooldown period.

Following input types are supported:

  • <input xsi:type="ScorpionInput" name="ScorpionInput 1" />

    Scorpion input is input that can only be used via API (software trigger). It is not hooked up anywhere.

  • <input xsi:type="AdvantechInput" name="AdvantechInput 1" DeviceId="1000" Channel="0" />

    Advantech input is for advantech card 1780U or 1730. It is able to get digital input state from these cards.

    Additional attributes:

    • DeviceId - Advantech device id (integer);
    • Channel - input id (bit number of input).

 

<outputs>

outputs element contains list of output elements.

All outputs have following attributes:

  • name - must be unique between outputs.

Following output types are supported:

  • <output xsi:type="ScorpionOutput" name="ScorpionOutput 1" IPAddress="localhost:8700" MethodName="Mymethod" />

    Scorpion output uses InternetMessenger to transfer callback to Scorpion. It is capable to call function in scorpion.

    Parameters:

    • IPAddress - IP address of the machine. Format IP:port;
    • MethodName - Script name that will be executed. 3 parameters will be sent:
      1. Output name (string)
      2. Output value (bool)
      3. performance counter value (long)

  • <output xsi:type="AdvantechOutput" name="AdvantechOutput 1" DeviceId="1000" Channel="0" />

    Advantech digital output for card 1780U or 1730. It sets cards output to specified value.

    Parameters:

    • DeviceId - Advantech device id (integer);
    • Channel - Output id (output bit number).

 

<tasks>

tasks element contains list of task elements.

All tasks have following attributes:

  • name - must be unique between tasks.

Following task types are supported:

  • <task xsi:type="PeriodicTask" name="PeriodicTask" Period="1000000" PulseLength="50000" SetOutputValue="true" ResetOutputValue="false" RawOutputs="AdvantechOutput 7" />

    Task that is repeated at defined intervals. It produces pulse on specified inputs of secified length. Use this task to create repeatable pulses (example: periodic camera trigger).

    Parameters:

    • Period - Period for the task (next task will be performed after this period);
    • PulseLength - Length of a pulse that will be created;
    • SetOutputValue - Value to set (on pulse start);
    • ResetOutputValue - Value to reset (on pulse end);
    • RawOutputs - Comma separated list of output names to use (names are from configuration).

 

<scheduler>

Scheduler sets parameters for schedulers that are created for each counter. Scheduler sends update events to API. Scheduler attributes apply for all defined counters.

scheduler configuration section has following attributes:

  • resolution - counter events number after which notification to GUI will be sent. Example: Counter runs at 10000 events per second but we need only 10 events per second for API then we set resolution to 1000 and we will get event each 1000 counter value updates.

Example:

<scheduler resolution="1000" />


Scorpion Vision Version XII : Build 646 - Date: 20170225
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2017 Tordivel AS.