Device Configuration Files


If you open the labbCAN library via LCB_Open() you need to provide a path to a valid device configuration:

long Result = LCB_Open("config/testconfig_nemaxys_rotaxys");

A device configuration is a folder with a set of XML files which contain a complete description of the configuration of all devices in the current setup. Only devices that are properly configured in the device configuration are available in the labbCAN environment. The device configuration contains common settings (like data path, log file or global bus objects) and device specific settings. You create a device configuration with the device configurator in the CETONI Elements software. If you have a special device setup, that is not supported by the CETONI Elements device configurator, a valid device configuration is provided by cetoni on shipment of your devices.

Use the CETONI Elements software to configure your devices and to create a valid device configuration.

The device configuration is a set of XML files. Each device configuration has a main configuration file named device_configuration.xml. This file contains global settings like data path and logging file and also lists device plugins (device configuration files).

This is an example of a valid device configuration file:

1 <?xml version="1.0" encoding="utf-8"?>
2 <Properties version="20180426">
3  <labbCAN>
4  <Environment>
5  <LogCfgFilename>${COMMON_DOCUMENTS}/QmixElements/</LogCfgFilename>
6  <PluginDirectory>${APP_PATH}/plugins/labbcan</PluginDirectory>
7  <DataPath>${COMMON_DOCUMENTS}/QmixElements</DataPath>
8  </Environment>
9  <PluginList>
10  <Plugin>labbcan_ledarray</Plugin>
11  </PluginList>
12  <BusList>
13  <Bus>
14  <Type>Lcl::CCanooCANopenBus</Type>
15  <BusName>CANopenBus1</BusName>
16  <BaudRateKbit>1000</BaudRateKbit>
17  <Autostart>1</Autostart>
18  <ReadTimeoutMs>10</ReadTimeoutMs>
19  <WriteTimeoutMs>500</WriteTimeoutMs>
20  <HeartbeatTime_ms>1000</HeartbeatTime_ms>
21  </Bus>
22  </BusList>
23  <DeviceList/>
24  <ChannelList/>
25  </labbCAN>
26  <Core>
27  <PluginList>
28  <Plugin>qmixelements</Plugin>
29  <Plugin>scriptingsystem</Plugin>
30  <Plugin>labbcanservice</Plugin>
31  <Plugin>canopentools</Plugin>
32  <Plugin>qmixdevices</Plugin>
33  <Plugin>datalogger</Plugin>
34  <Plugin>qmixio</Plugin>
35  <Plugin>qmixcontroller</Plugin>
36  <Plugin>qmixv</Plugin>
37  </PluginList>
38  <ServiceWorkbenchVisible>0</ServiceWorkbenchVisible>
39  </Core>
40 </Properties>

For each plugin listed in <PluginList> there needs to be a plugin specific configuration file named like the plugin. E.g. the plugin nemaxys requires a configuration file nemaxys.xml in the same directory where the device_configuration.xml file is located. Because the labbCAN libraries are part of the CETONI SDK the configuration files are shared between the CETONI Elements software and the labbCAN libraries. Therefore the configuration files may contain configuration settings that are not required by the labbCAN libraries.


For each device that should be available in the labbCAN environment an device entry needs to exist in the device configuration files. The following sample shows a device configuration file for a single positioning axis:

1 <Device Name="neMAXYS1_Y">
2  <Type>Lcl::CEposAxis</Type>
3  <Bus>CANopenBus1</Bus>
4  <CANopenDevice NodeId="2">Usl::Epos::CEposDrive</CANopenDevice>
5  <RevolutionsPerMeter>250</RevolutionsPerMeter>
6  <MinPosition>0</MinPosition>
7  <MaxPosition>340000</MaxPosition>
8  <MaxVelocity>7000000</MaxVelocity>
9  <PositionPolarity>-1</PositionPolarity>
10  <PositionUnitsPerRevolution>8979.692307692310</PositionUnitsPerRevolution>
11  <VelocityUnitsPerRevolution>4384.615385</VelocityUnitsPerRevolution>
12  <TimeUnitsPerMinute>1</TimeUnitsPerMinute>
13  <HomingPriority>0</HomingPriority>
14  <ReadAxisConfigFromDevice>0</ReadAxisConfigFromDevice>
15  <Simulated>1</Simulated>
16 </Device>

Each device is a named entity. That means each <Device> XML tag has a Name attribute and a number of configuration parameters. Each device configuration supports the <Simulated> tag. With this tag its is possible to set a single device simulated. That means the labbCAN environment will create a simulated device that behaves similar like a real device. With this feature you can develop and test your software without the need to have a real device. You can even mix real and simulated devices. That means you can e.g. set only a single axis of an axis system to simulated.

You should only change settings in the configuration files that you really know. Changing device parameters may cause strange errors or even crashes of the physical devices if you provide wrong or faulty settings.