INOS
xml Configuration

Introduction

The COP xml files are used for both describing and configuring the COP hardware.

See COP configuration for a more in-depth explanation about the workings of the different xml files and how they play together.

User config file

General file description

The user configuration xml file needs to be a valid and parseable XML file. It is a stripped down version of the base hardware config xml file. The elements that are not changeable by the user are taken out. For each configurable node an attribute Id must exist with the same number as in the hardware config xml file.

Merging user and system files

After scanning the bus the master has now a system file for each module. It then looks for user configuration files that need to be merged with the system files. User config files are stored as database tables with a name starting with xcfg-. A file is used if the product code and address match the scanned module. If a match is found then all xml nodes in the user file are merged with their respective nodes in the system file. This is done by looking for the xml node on the same level as the user node with the same Id. The name is not used for comparison as this is one of the properties changeable by the user. If an attribute with the same name is found then the value in the system file is overwritten with the value from the user file. Attributes only present in the system file are left unchanged. Attributes only present in the user file are added to the system file. However only attributes used by software make sense.

Evaluation of the file

Attribute evaluation is made in two steps: First an attribute (optional or required) is searched for in the current node where it is used. If the attribute is not found then it is searched for in the parent node. This acts as a default value that can still be overridden in some subnodes. Not all attributes make sense to be looked up in the parent as there is no sensible default value.

Example of the hierarchical attribute lookup:

<Ports Port.CycleTime="1000000"> <--! default CycleTime -->
<Port Name=...> <--! CycleTime missing, taken from parent -->
</Port>
<Port Name=... CycleTime="500000"> <--! CycleTime for this port only -->
</Port>
</Ports>

Content

File header

A standard xml file header.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

Needed in every file to form a valid xml file.

Card node

<Card Name="COP-IT" ProductCode="611144600" VendorId="0" Address="0" Svn="$LastChangedRevision$">

The main card node describes the card in general, what product it is, what version the file has.

AttributeDescriptionRequired
Name Name of the card as it will appear in the field bus. X
ProductCode Code number as used in Indel for orders. X
VendorId Identifier of the producing company, 0=Indel.
Address Address of the module. For COPBus this is the address switch of the module. X
Svn Subversion revision of the xml file.
Options Bus module options, see cinosbusmoduledef.h, DF_INOS_BUS_MOD_OPTION_*.

Startup section

<Startup>
<Act Name="Port.Write.ADCStatus.Oversampling">2</Act>
</Startup>

Some modules need some initialisation or default values written by the master e.g. range selection or analogue adjustment values coming from the Eeprom. These actions can be defined in the Startup section. The Name defines the variable to be written, the node value ist the value to write. There is only one Startup node but it can contain several Act (Action) nodes.

AttributeDescriptionRequired
Name Inco path of variable to be written (in the module). X
Options Startup action options, see cinoscopmodule.h, DF_INOS_COP_STRT*.

Ports section

<Ports>
<Port Name=...>
</Port>
</Ports>

The Ports node contains all the Port subnodes describing the hardware ports. There is only one Ports node.

AttributeDescriptionRequired
Port.CycleTime Default cycle time for all ports unless a specific time is defined in a Port.

Port

<Port Name="Bout" Id="0" CycleTime="1000000">
<Channel Name=...>
</Channel>
</Port>

The Port node holds all the information about the port itself which is needed for the transfer. The Channel subnodes describe what to do with the data in the master (for realtime data).

AttributeDescriptionRequired
Name Name of the port, used in inco registration. X
Id Virtual id of the port, used for merging with system config. Without id the Port's attributes can not be configured by the user.
CycleTime Desired cycle time of this port, must match general bus config. E.g. GinLink has four categories, the CycleTime must match one of those.

Channel

<Channel Name="Bin0" Id="0" Type="0" Hook="LDC" Range="3" Filter="MAvg" Description="no idea what this channel should be for">
<Hook Name=...>
</Hook>
<Filter Name=...>
</Filter>
</Channel>

The Channel node describes how a (part of the) port should be handled in the process image. Each Channel will create a process image channel.

AttributeDescriptionRequired
Name Name of the Channel, used in inco registration in image. X
NameType Type of name. Can be used to tell the system how the channel name should look like. Currently only one option is available: NameType="unique", means the channel name is taken as it is. If not provided, the channel name looks like this 'ModuleName.ChannelName'.
Description Description of the channel, used in inco registration in image. Requires an actual INCO explorer to be shown. X
Id Virtual Id of the Channel, used for merging with system config. X
Unit Unit of the process image channel.
Type Defines the variant of the handler if it implements different types. The available types must be looked up and implemented in the corresponding bus port handler.
Range Indicates the Range selected at startup in analogue channels. The number should be one of the supported ranges, see cinosadcchannels.h, DF_INOS_ADC_RANGE*.
Hook Defines additional hooks used in this image channel. A hook is called after the raw input data has been processed but before the data is placed in the process image (or vice versa for outgoing data). Used e.g. to convert voltage into degrees. Currently supported types: CUR, CUSTOM, CUSTOMDAC, LDC, PT1, TCE, THC.
Char Inco characteristics used in registration of the image channel.
Min Minimum value for inco registration.
Max Maximum value for inco registration.
Overwrite Set the overwrite bit in the process image channel.
OverwriteValue Set the process image channel to a preset value, used together with Overwrite.
Filter The attribute defines the used Filter(s) for the analogue value. It is a comma separated list of the used filters, the order in the string defines the order of the usage. Currently supported types: MAvg, Bit, EWMA, LowPass, Notch.
ZeroAdjust Only used for channels of type PT1 or for PT1 Hooks: Adjustment value for degree table lookup.
UserFactor Only used for channels of type TDC: Set the user factor to adjust the measure value.
UserOffset Only used for channels of type TDC: Set the user offset to adjust the measure value.
Inv Only used for channels of type INP and OUT: Invert the digital value.

Channel hook

<Hook Name="LDC" Id="10" SupplyVoltage="0.0" TransCoefficient="2.0" NominalLoad="784.8"
CorrectionFactor="1.0" SupplyVoltageChannelName="Bout" Unit="N" TaraFilterLength="2000"/>

A Channel can have several Hooks that are called after processing the raw values. The hooks can process the value even more until it is stored in the process image. Hooks are optional but if the Channel defines a Hook attribute then the defined Hook node has to exist as well. It can already exist in the system configuration.

AttributeDescriptionRequired
Name Name of the hook, must exist in the software. Currently supported hooks: CUR, CUSTOM, CUSTOMDAC, LDC, PT1, TCE, THC. X
Id Virtual id of the Hook, used for merging with system config. X
Unit Unit of the calculated value, used in registering image channel.
ShuntOhm Only used in hook CUR: [Ohm].
Factor Only used in hook CUSTOM and CUSTOMDAC: General calculation factor.
Offset Only used in hook CUSTOM and CUSTOMDAC: General calculation offset.
Min Only used in hook CUSTOM and CUSTOMDAC: Lower limit of processed value (in hook units).
Max Only used in hook CUSTOM and CUSTOMDAC: Upper limit of processed value (in hook units).
SupplyVoltage Only used in hook LDC: Supply voltage of the loading cell [V].
TransCoefficient Only used in hook LDC: Transmission coefficient for calculation [mV/V].
NominalLoad Only used in hook LDC: Nominal load [kg].
CorrectionFactor Only used in hook LDC: Correction factor (normal = 1.0).
SupplyVoltageChannelName Only used in hook LDC: Channel to measure the supply voltage of the loading cell if defined.
TaraFilterLength Only used in hook LDC: Filter length.
CurrentSource Only used in hook PT1: Name of Pt100 current source channel.
CurrentmA Only used in hook PT1: Required current if current source requested [mA].
TableType Only used in hook THC: Name of THC table (INOS-THCA-*NAME*).
IsConstant Only used in hook THC: Flag to indicate a constant compensation.
CompensationValue Only used in hook THC: Compensation value for constant compensation.
CompensationName Only used in hook THC: Name of compensation channel if not constant compensation.
MaxVoltage Only used in hook THC: Max. valid voltage mV.

Channel filter

<Filter Name="MAvg" Id="0" Type="int32" Length="256"/>

A Channel can have several Filters that are called after processing the raw values. The filters are used to smoothen the value before it is stored in the process image. Filters are optional but if the Channel defines a Filter attribute then the defined Filter node must exist as well. It can already exist in the system configuration. The following filters are available :

Moving average

Example :

<Filter Name="MAvg" Id="0" Type="int16" Length="256"/>

Attributes :

AttributeDescription
Name Name of the filter: MAvg
Id Virtual id of the filter, used for merging with system config
Length Length of the average filter buffer

Bit filter

Example :

<Filter Name="Bit" Id="0" Type="int16" MinDelta="2"/>

Attributes :

AttributeDescription
Name Name of the filter: Bit
Id Virtual id of the filter, used for merging with system config
Min Lower limit of value
Max Upper limit of value
MinDelta Minimum required change to last value

Exponentially Weighted Moving Average Filter

http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average

Example :

<Filter Name="EWMA" Id="0" Type="int16" MaxDelta="10500" Weight="0.5"/>

Attributes :

AttributeDescription
Name Name of the filter: EWMA
Id Virtual id of the filter, used for merging with system config
MaxDelta Maximum taken over change between two samples.
Weight Filter weight.

IIR LowPass filter

Example :

<Filter Name="LowPass" Id="0" Type="int16" F="100" Q="0.7" Gain="-5.0"/>

Attributes :

AttributeDescription
Name Name of the filter: LowPass
Id Virtual id of the filter, used for merging with system config.
F Limitation frequency [Hz]
Q Quality
Gain Filter gain [dB]

IIR Notch filter

Example :

<Filter Name="Notch" Id="0" Type="int16" F="250" Q="0.7" Gain="-5.0"/>

Attributes :

AttributeDescription
Name Name of the filter: Notch
Id Virtual id of the filter, used for merging with system config.
F Limitation frequency [Hz]
Q Quality
Gain Filter gain [dB]

SSI CardChannels

<CardChannels>
<CardChannel Name="Channel_0" Id="0" Usage="Encoder">
<Usage Name="Encoder" Id="0">
<Startup/>
<Port Name=.../>
</Usage>
<Usage Name="SSI" Id="1" ChannelBits="24" ChannelClkDiv="19">
<Startup/>
</Usage>
</CardChannel>
<CardChannel Name="Channel_1" Id="1" Usage="Encoder">
<Usage Name=.../>
</CardChannel>
</CardChannels>

The SSI card allows for an extensive configuration that changes even basic information such as the used ports and channels. To be able to handle this the CardChannels node was introduced. The SSI card has six main channels and each one can be used in a different configuration, defined as CardChannel usage Usage. The CardChannel node has an attribute Usage that defines in which way this channel should be configured. This attribute is changeable with the user config. Upon start the content of the selected Usage node is copied into the main file area (Startup items into Startup section, Port items into Ports node). From here on the evaluation of the xml file and creation of the ports and channels is the same as in other cards. Although this system is now only used for SSI cards it is general enough to also use it for other cards if the need arises.

CardChannel

<CardChannel Name="Channel_0" Id="0" Usage="Encoder">
<Usage Name="Encoder" Id="0">
<Startup/>
<Port Name=.../>
</Usage>
<Usage Name="SSI" Id="1" ChannelBits="24" ChannelClkDiv="19">
<Startup/>
</Usage>
</CardChannel>

A CardChannel defines all the possible usages for this channel. Only one of them can be active at a time.

AttributeDescriptionRequired
Name Name of the CardChannel. X
Id Id used for merging with system config. X
Usage Attribute defining the channel configuration. X

CardChannel usage

<Usage Name="Encoder" Id="0">
<Startup/>
<Port Name=.../>
</Usage>

A CardChannel Usage defines the startup actions and ports that should be used if this usage is selected for this CardChannel.

AttributeDescriptionRequired
Name Name of the Usage. X
Id Id used for merging with system config. X
ChannelBits Only used for usage SSI: Number of bits that the sensor provides.
ChannelClkDiv Only used for usage SSI: Frequency divider used for polling sensor.

CardChannel cycle time

To set the default cycle time of the ports used in this card to a user defined value it has to be entered in the main Ports node as it is also possible with other module types.

<Card Name="MyCOP-SSI-0" ProductCode="611143000" VendorId="0" Address="0">
<Ports Port.CycleTime="250000">
</Ports>
<CardChannels>

To change the cycle time of one port or channel it can be entered as attribute in the Port node itself. It then also takes priority over the default setting in the Ports node. Pay attention that read and write ports of one channel should have the same cycle time.

<Usage Name="Encoder" Id="0">
<Port Name="EncData_0" Id="0" CycleTime="125000">
<Channel Name="..."/>
</Port>

User config examples

COP-ADC bridge

The COP-ADC card has additionally to normal ADC channels also the possibility to use a bridge. The outputs are on the pins X2:19..22, the input can be any of the other ADC channels (see COP documentation).

The output is fixed 10V, so the differential input has to be set to -5V..+5V. This is easily done by setting the channel range to 8, see cinosadcchannels.h, DF_INOS_ADC_RANGE*.

<Channel Name="MyADC_0_0" Id="0" Type="0" Range="8"/>

However the COP-ADC card has a global amplifier for all channels that needs to be adjusted as well. This is usually done in the startup section as it doesn't change while the application is running. 1 is used for the 1* value ranges (10V, 1V, 100mV..), 0 is used for the 5* ranges (5V, 500mV...).

<Startup>
<Act Name="Port.Write.ADCStatus.Range">0</Act>
</Startup>

This affects also the other channels. If they need to have a 1* range then the bridge input also has to use a range of the 1* kinds. With -10V...+10V some precision is lost compared to the -5V..+5V range.

To calculate the value of the bridge (e.g. to convert the ADC value of a force into N) the LDC (load cell) hook can be used. The values need to be adjusted to the used bridge. The SupplyVoltageChannelName attribute is not necessary as there is no defined output channel for the bridge, it's a fixed 10V supply.

<Channel Name="MyADC_0_0" Id="0" Type="0" Range="8" Hook="LDC">
<Hook Name="LDC" SupplyVoltage="10.0" TransCoefficient="2.0" NominalLoad="784.8" CorrectionFactor="1.0" Unit="N" TaraFilterLength="2000"/>
</Channel>

Custom ADC conversion

If the value of an ADC channel needs to be converted into some other unit it's possible to use a custom hook to convert the ADC value into any desired unit. The Factor and Offset attributes are needed for the conversion, the Min and Max properties define the valid range. If the value is outside this range then the channel is set on error, the value appears red in the INCO-Explorer.

<Channel Name="MyADC_0_0" Id="0" Type="0" Range="0" Hook="CUSTOM">
<Hook Name="CUSTOM" Factor="1.0" Offset="0" Unit="abc" Min="-10500" Max="10500"/>
</Channel>

Custom DAC conversion

If the value of a DAC channel needs to be converted from some other unit it's possible to use a custom hook to convert the user DAC value into the mV/mA requested by the system. The Factor and Offset attributes are needed for the conversion, the Min and Max properties define the valid user range. If the value is outside this range then the channel is set on error, the value appears red in the INCO-Explorer.

<Channel Name="MyDAC_0_0" Id="0" Type="0" Range="0" Hook="CUSTOMDAC">
<Hook Name="CUSTOMDAC" Factor="2.5" Offset="0" Unit="abc" Min="-4000" Max="4000"/>
</Channel>

Use ADC as PT100

If there's no (free) PT100 channel available then this functionality can also achieved using an ADC channel together with a DAC channel. The DAC channel is used as current supply for the PT100 sensor, the ADC channel will measure the voltage and convert it to a temperature.

To configure a DAC channel as current source the range needs to be set accordingly. See cinosdacchannels.h, DF_INOS_DAC_RANGE* for predefined numbers, range 32 is 0..+20mA.

<Channel Name="MyDAC_1" Id="0" Type="0" Range="32" />

The ADC channel will measure the voltage and convert it into a temperature using a hook. The hook needs the used current source channel, in this example MyDAC_1. If you change the name of the channel then don't forget to adjust the name in the hook as well.

Filters can be used to smoothen the values. However they are not necessary and can also be left out.

<Channel Name="MyADC_1" Id="0" Type="0" Range="1" Filter="MAvg,Bit">
<Hook Name="PT1" CurrentSource="MyDAC_1" CurrentmA="4" />
<Filter Name="MAvg" Type="int16" Length="20"/>
<Filter Name="Bit" Type="int16" MinDelta="2"/>
</Channel>

System config file

Overview

Following inos files are used together with xml configuration:

  • cinoscopmaster.h
  • cinoscopmodule.h
  • cinosbusport.h
  • cinosbusporthandler.h
  • cinosbusporthandleradc.h
  • cinosbusporthandlerdac.h
  • cinosbusporthandlerinp.h
  • cinosbusporthandlerout.h
  • cinosbusporthandlerpos.h
  • cinosbusporthandlerpt1.h
  • cinosbusporthandlerrange.h
  • cinosbusporthandlertdc.h
  • cinosbusporthandlerthc.h
  • cinoschannelhook.h
  • cinoscurhooks.h
  • cinoscustomizeadchooks.h
  • cinoscustomizedachooks.h
  • cinosfilter.h
  • cinosfilterbit.h
  • cinosfilterewma.h
  • cinosfiltermavg.h
  • cinosldchooks.h
  • cinospt100hooks.h
  • cinostcehooks.h
  • cinosthchooks.h
  • inos_xml.h
  • xmlparser.h

General file description

The xml file needs to be a valid and parseable XML file. It contains all the important information about the module's or card's features. Besides the functional description it also has information about the card and the file itself.

Evaluation of the file

Attribute evaluation is made in two steps: First an attribute (optional or required) is searched for in the current node where it is used. If the attribute is not found then it is searched for in the parent node. This acts as a default value that can still be overridden in some subnodes. Not all attributes make sense to be looked up in the parent as there is no sensible default value.

Example of the hierarchical attribute lookup:

<Ports Port.CycleTime="1000000"> <--! default CycleTime -->
<Port Name=...> <--! CycleTime missing, taken from parent -->
</Port>
<Port Name=... CycleTime="500000"> <--! CycleTime for this port only -->
</Port>
</Ports>

Content

File header

A standard xml file header.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

Needed in every file to form a valid xml file.

Card node

<Card Name="COP-IT" ProductName="COP-IT" ProductCode="611144600" VendorId="0"
Type="0x0A" Version="1" Svn="$LastChangedRevision$" xmlns:Range="_"
xmlns:RawRange="_" xmlns:RawOffset="_" xmlns:Ref1Val="_" xmlns:Pt1Ref100Val="_"
xmlns:Pt1Ref270Val="a">

The main Card node describes the card in general, what product it is, what version the file has.

AttributeDescriptionRequired
Name Name of the card as it will appear in the field bus, changeable by the user in the user config file. X
ProductName Designated name for this product (card). X
ProductCode Code number as used in Indel for orders. X
VendorId Identifier of the producing company, 0=Indel. X
Type Type family of this card. Several products can be of the same type if only small options are different between them. X
Version Main version of the xml file. X
Svn Subversion revision of the xml file. X
NoEeprom Flag to indicate that the module has no eeprom. Set to 1 to prevent the warning that the eeprom could not be read.
RamSize Size of COP RAM in words.
RamProtect Protects ports F8/F9 which are used for COP RAM. If this is set then the system first needs to enable writing to these ports.
LittleEndian Set to 1 if the COP RAM is in little endian.
BusName Bus name that will be prepended to the card name if it needs this.
BusOptions Bus options used if card requires it.
Options Card options, see cinosbusmodule.h, DF_INOS_BUS_MOD_OPTION*.
MasterPorts Enable ports on master module (9), only used for testing.
xmlns:* Only used to form a valid xml file without warnings, depends on the used attributes in the channels.
Test Enable testing: master is registered, more output.

Info section

<Infos>
<Info Name="Description" Type="string">8 analog inputs, 8 analog outputs</Info>
</Infos>

The entries in Infos are just taken as description for this card and are not used otherwise. There is only one Infos node but it can contain several Info nodes.

AttributeDescriptionRequired
Name "Description" X
Type "string" X

Startup section

<Startup>
<Act Name="Port.Write.ADCStatus.Oversampling">2</Act>
</Startup>

Some modules need some initialisation or default values written by the master e.g. range selection or analogue adjustment values coming from the eeprom. These actions can be defined in the Startup section. The Name defines the variable to be written, the node value ist the value to write. There is only one Startup node but it can contain several Act (Action) nodes.

AttributeDescriptionRequired
Name Inco path of variable to be written (in module). X
Options Startup action options, see cinoscopmodule.h, DF_INOS_COP_STRT*.

Ports section

<Ports LastCyclic="0xF9">
<Port Name=...>
</Port>
</Ports>

The Ports node contains all the Port subnodes describing the hardware ports. There is only one Ports node.

AttributeDescriptionRequired
LastCyclic Number of the last port to be transferred cyclic with high speed.
Port.Size Default size for the ports unless a port defines a different size.
Port.CycleTime Default cycle time for all ports unless a different time is defined in a port.

Port

<Port Name="Bout" Id="0" Type="r" Number="0x00" Size="16" CycleTime="1000000">
<Channel Name=...>
</Channel>
<Reg Name=... />
</Port>

The Port node holds all the information about the port itself which is needed for the transfer. The Channel subnodes describe what to do with the data in the master. The Reg subnodes can be used to add additional registrations of the Port.

AttributeDescriptionRequired
Name Name of the port, used in inco registration. X
Id Virtual id of the port, used for merging with user config. Without id the port's attributes can not be configured by the user.
Type Access type: read, write or both. Valid values "r", "w", "rw". X
Number Port Number or address in the module's FPGA. X
Size Port size. Valid values "16", "32". If there is a 64 bit port in the FPGA then it must be configured as two 32 bit ports. X
CycleTime Desired cycle time of this port, must match general bus config. E.g. GinLink has four categories, the CycleTime must match one of those.
ArrayLength A port can be an array. This means that several consecutive ports will be transferred in one block.
Dist Distribution of the data, used in 3-port-modules. Valid values: "local", "public", "localpublic".
Priority Port priority, used in port sorting.
Options Port options, see cinosbusport.h for flags.
Channel.Handler Default handler for all channels unless a different handler is defined in a Channel.
Reg.Type Registry variable type, default type for registry entries unless defined otherwise.
Reg.Char Registry variable characteristic, default value for registry entries unless defined otherwise.
Reg.ComboData Default ComboData value for registry variables of type *combo.

Port registration

<Reg Name="OkLed:12..13" Type="uint16combo" ComboData="0;off;1;blink;2;inverse blink;3;on"/>
<Reg Name="EepWrEn:15"/>

The Reg node can be used to add additional registrations to the port if the covered bits are not used otherwise in a process image channel.

AttributeDescriptionRequired
Name Name of the registered variable. It must also contain the used bits. X
Type Inco type of the variable, defaults to uint16.
ComboData String for ComboData of variables of type Combo*.
Char Inco characteristics of registered variable.
Min Minimum value for inco registration.
Max Maximum value for inco registration.

Channel

<Channel Name="Bin0" Id="0" Unit="mV" Type="0" Hook="LDC" StartBit="0" Bits="16" Range="3" Pin="X1:20,18" Handler="ADC">
<Range Name=...>
</Range>
<Hook Name=...>
</Hook>
<Filter Name=...>
</Filter>
</Channel>

The Channel node describes how a (part of the) port should be handled in the process image. Each Channel will create a process image channel. The type of the data is defined by the Handler attribute. Each Channel can define which bits of the port are used in this image channel. The Handler is required, however it can also be placed in the parent Port node.

AttributeDescriptionRequired
Name Name of the channel, used in inco registration in image. X
Id Virtual id of the channel, used for merging with user config. X
Unit Unit of the process image channel.
Type Defines the variant of the handler if it implements different types. The available types must be looked up and implemented in the corresponding bus port handler.
StartBit Defines the first bit in the port used for this channel. Defaults to 0.
Bits Number of bits used for this channel. Defaults to 16 (Default port size).
Range Indicates the Range selected at startup in analogue channels. The number should be one of the supported ranges, see cinosadcchannels.h, DF_INOS_ADC_RANGE*.
Pin Additional hardware pin information, will be registered in the process image channel if available.
Handler Defines the type of the image channel, currently supported types: INP, OUT, ADC, DAC, POS, PT1, THC, TDC. X, in Port or Ports
Hook Defines additional hooks used in this image channel. A hook is called after the raw input data has been processed but before the data is placed in the process image (or vice versa for outgoing data). Used e.g. to convert voltage into degrees. Currently supported types: CUR, CUSTOM, CUSTOMDAC, LDC, PT1, TCE, THC.
Options Further port handler options e.g. to handle data "raw" without further calculation, see cinosbusporthandler.h, eOpt*.
Char Inco characteristics used in registration of the image channel.
Min Minimum value for inco registration.
Max Maximum value for inco registration.
Enabled Enable or disable channel, default is enabled.
Overwrite Enable channel overwriting to set channel to a fixed value.
OverwriteValue Value to set channel to if Overwrite is set to 1.
Filter The attribute defines the used filter(s) for the analogue value. It is a comma separated list of the used Filters, the order in the string defines the order of the usage. Currently supported types: MAvg, Bit, EWMA.
Ref0Val Only used for Channels of type THC: Reference value 0, can be an immediate value or be stored in Eeprom.
Ref1Val Only used for Channels of type THC: Reference value 1, can be an immediate value or be stored in Eeprom.
Pt1Ref100Chn Only used for Channels of type PT1: Reference channel for precise 100 Ohm value, used for temperature calculation.
Pt1Ref270Chn Only used for Channels of type PT1: Reference channel for precise 270 Ohm value, used for temperature calculation.
Pt1Ref100Val Only used for Channels of type PT1: Stored value of precise 100 Ohm resistor, used for temperature calculation.
Pt1Ref270Val Only used for Channels of type PT1: Stored value of precise 270 Ohm resistor, used for temperature calculation.
ZeroAdjust Only used for Channels of type PT1 or for PT1 Hooks: Adjustment value for degree table lookup.
PhAdjVariable Only used for Channels of type TDC: Inco variable in IT-module for phase adjustment.
BitNr Only used for Channels of type INP and OUT: Number of the bit in the Port that is handled by this Channel.
Gain Only used for Channels of type ADC and DAC: Gain used for calculating the analogue value. Usually superseeded by the selected Range but can be used for channels without Range.
Direction Only used for Channels of type POS: Invert direction.
Gray Only used for Channels of type POS: Enable Gray code on absolute position channel.
MaxPercentage1 Only used for Channels of type FLASH: Max percentage full output (0) or PWM1 (1/2).
MaxPercentage2 Only used for Channels of type FLASH: Max percentage PWM2 (1/2) not used for (0)

Channel range

<Range Name="0..150V" Number="0" Range="150" RawOffset="0" RawRange="2400" Unit="V" Char="0x0000001c" Min="0" Max="150.0">
<Cnd Name="Port.Read.ADCStatus.Range">0</Cnd>
<Act Name="Port.Write.PGAStatus.PGA_0">1</Act>
</Range>

An analogue channel can have several supported ranges, depending on the hardware. The selected range is important for calculating the correct end value but also for setting the hardware to the correct settings for the desired range.

AttributeDescriptionRequired
Name Name of the Range, used in inco registration in image channel. X
Number The unique number with which the Range is selected, see cinosadcchannels.h, DF_INOS_ADC_RANGE* for predefined numbers. X
RawOffset[:type] Defines the offset of the raw value.
RawRange[:type] Defines the range of the raw value.
Range Defines the range of the unit value.
Char Inco characteristics used in registration of the image channel.
Min Minimum value for inco registration.
Max Maximum value for inco registration.
Unit Desired unit of the end value, used in registering the image channel.
Type Defines the variant of the Handler if it implements different types.

Channel range condition

<Cnd Name="Port.Read.ADCStatus.Range">0</Cnd>

Not all ranges are always valid and simultaneously valid. Some hardware modules only support a few ranges which need to be defined in the xml file. If there is a global device for all ranges (e.g. an amplifier with two settings) then the Range can have a condition for when it is valid and can be selected. The variable is read and the value is compared to the required value. If the condition is true then the range is offered as selection in the image channel range selection.

AttributeDescriptionRequired
Name Path of the variable to read value from and test. X

Channel range action

<Act Name="Port.Write.PGAStatus.PGA_0">1</Act>

The Range can also contain an action to be executed if the range is selected. Usually this is writing to a registered variable in the hardware e.g. to select an amplification.

AttributeDescriptionRequired
Name Path of the variable to write X

Channel hook

<Hook Name="LDC" Id="10" SupplyVoltage="0.0" TransCoefficient="2.0" NominalLoad="784.8"
CorrectionFactor="1.0" SupplyVoltageChannelName="Bout" Unit="N" TaraFilterLength="2000"/>

A Channel can have several Hooks that are called after processing the raw values. The hooks can process the value even more until it is stored in the process image. Hooks are optional but if the Channel defines a Hook then the defined Hook node has to exist as well.

AttributeDescriptionRequired
Name Name of the Hook, must exist in the software. Currently supported Hooks: CUR, CUSTOM, CUSTOMDAC, LDC, PT1, TCE, THC. X
Id Virtual id of the Hook, used for merging with user config. X
Unit Unit of the calculated value, used in registering image Channel.
SupplyVoltage Only used in hook LDC: Supply voltage of the loading cell [V].
TransCoefficient Only used in hook LDC: Transmission coefficient for calculation [mV/V].
NominalLoad Only used in hook LDC: Nominal load [kg].
CorrectionFactor Only used in hook LDC: Correction factor (normal = 1.0).
SupplyVoltageChannelName Only used in hook LDC: Channel to measure the supply voltage of the loading cell if defined.
TaraFilterLength Only used in Hook LDC: Filter length.
TableType Only used in hook THC: Name of THC table (INOS-THCA-*NAME*).
IsConstant Only used in hook THC: Flag to indicate a constant compensation.
CompensationValue Only used in hook THC: Compensation value for constant compensation.
CompensationName Only used in hook THC: Name of compensation channel if not constant compensation.

Channel filter

<Filter Name="MAvg" Id="0" Type="int32" Length="256"/>

A Channel can have several Filters that are called after processing the raw values. The filters are used to smoothen the value before it is stored in the process image. Filters are optional but if the Channel defines a Filter then the defined Filter node must exist as well.

AttributeDescriptionRequired
Name Name of the Filter, must exist in the software. Currently supported filters: MAvg, Bit, EWMA. X
Id Virtual id of the filter, used for merging with user config. X
Type Number type of the filter.
Minimum Lower limit where bit filtering is switched off.
Maximum Upper limit where bit filtering is switched off.
MinDelta Minimum change in value to change current value.

Connectors section

<Connectors>
<Connector Name="X1" Type="0">
<Pin Name="1">PT100Ext+</Pin>
</Connector>
</Connectors>

The Connectors node contains additional information about the card's connector pins. Each pin can have a description about the usage. There is only one Connectors node.

AttributeDescriptionRequired
Name Name of the pin used in registration, usually just the pin number. X

SSI CardChannels

<CardChannels>
<CardChannel Name="Channel_0" Id="0" Usage="Encoder">
<Usage Name="Encoder" Id="0">
<Startup/>
<Port Name=.../>
</Usage>
<Usage Name="SSI" Id="1" ChannelBits="24" ChannelClkDiv="19">
<Startup/>
</Usage>
</CardChannel>
<CardChannel Name="Channel_1" Id="1" Usage="Encoder">
<Usage Name=.../>
</CardChannel>
</CardChannels>

The SSI card allows for an extensive configuration that changes even basic information such as the used ports and channels. To be able to handle this the CardChannels node was introduced. The SSI card has six main channels and each one can be used in a different configuration, defined as CardChannel usage. The CardChannel node has an attribute Usage that defines in which way this channel should be configured. This attribute is changeable with the user config. Upon start the content of the selected Usage node is copied into the main file area (Startup items into Startup section, Port items into Ports node). From here on the evaluation of the xml file and creation of the ports and channels is the same as in other cards. Although this system is now only used for SSI cards it is general enough to also use it for other cards if the need arises.

CardChannel

<CardChannel Name="Channel_0" Id="0" Usage="Encoder">
<Usage Name="Encoder" Id="0">
<Startup/>
<Port Name=.../>
</Usage>
<Usage Name="SSI" Id="1" ChannelBits="24" ChannelClkDiv="19">
<Startup/>
</Usage>
</CardChannel>

A CardChannel defines all the possible usages for this channel. Only one of them can be active at a time.

AttributeDescriptionRequired
Name Name of the CardChannel. X
Id Id used for merging with user config. X
Usage Attribute defining the channel configuration. X

CardChannel usage

<Usage Name="Encoder" Id="0">
<Startup/>
<Port Name=.../>
</Usage>

A CardChannel Usage defines the startup actions and ports that should be used if this usage is selected for this CardChannel.

AttributeDescriptionRequired
Name Name of the usage. X
Id Id used for merging with user config. X
ChannelBits Only used for usage SSI: Number of bits that the sensor provides.
ChannelClkDiv Only used for usage SSI: Frequency divider used for polling sensor.