Class ChanAi
Version 1.0
Modified 26-MAY-2023 14:29:27.00
 Configures an analog input channel independent of the
 type of physical Ai-card. The conversion from signal
 value to actual value is done by polynomials.

 Figure below shows the steps in Ai-signal conversion and
 attributes of interest. The internal filtering concerns local
 Ai signals, i.e remote Ai-signals are not affected.
 Quantities of Importance for Handling Ai Signals

 SigValue is converted to ActualValue via sensor
 function s, sensor polynomial p and filter function f
 according to,
         ActualValue = f ( p( s(SigValue) ) ) , where
 the choice of

         -- sensor function s, is determined by SensorTypeCode
         -- sensor polynomial p, is determined by  SensorPolyType
         -- filter function f, is determined by FilterType in Ai object

 For linear conversion the conversion from rawvalue to engineering value can be
 specified by four ranges

 - raw value range            RawValRangeLow - RawValRangeHigh
 - channel signal value range ChannelSigValRangeLow - ChannelSigValRangeHigh
 - sensor signal value range  SensorSigValRangeLow - SensorSigValRangeHigh
 - actual value range         ActValRangeLow - ActValRangeHigh

Raw value is the value read by the card or received from the bus. This converted to
the signal value of the channel, typically +/-10 V, +/-5 V or +/-20 mA. The part of
this range that is actually utilized by the sensor, that could be for example 4-20 mA
is then converted to engineering unit.



Hints
 ChanAi objects are configured below a suitable card
 object.

 Rack and card objects to different I/O systems are
 documented separately.
 To create card object with channel objects belonging to
 it the function 'Configure Card' in "Utility Window" is
 recommended.

Object graph

See also



RtBody attributes pwr_sClass_ChanAi
String80 Description   Optional text, for example to describe the channel or
its employment.
AttrRef SigChanCon   Name of a signal object, i.e. Ai object, connected with
the channel object.
String40 Identity   The identity of the channel. Optional, for example Ai0
to denote the first channel, physical cable marking,
etc.
UInt16 Number   The Number attribute is used to associate the ChanAi
object to a fixed channel on the card named by
SigChanCon. The physical channels of the card are
numbered in the interval {0,1, ... , (MaxNoOfChannels-1)},
where MaxNoOfChannels is an attribute in the card
object.
The channels of the card are numbered according to the
instructions of the card manufacturer.
Boolean ConversionOn   Specifies if the RawValue should be updated or not.
FALSE means no updating; TRUE means that RawValue
should be updated at the period of ScanInterval.
UInt32 ScanInterval   Specifies, in relation to the period T0, how often
RawValue will be read in and converted to ActualValue.

The IO job handles local Ai-signals by the period T0 =
CycleTimeBus and remote signals by the period T0 =
CycleTimeSerial; see IOHandler).
ScanInterval have to be >= 1.

RawValue will be updated by the period: ScanInterval * T0.
Boolean CalculateNewCoef  
Float32 RawValRangeLow   The Low and High values of RawValRange specifies the
raw value range of the channel.
Float32 RawValRangeHigh  
Float32 ChannelSigValRangeLow   The Low and High values of ChannelSigValRange specifies the
signal range of the channel.
Float32 ChannelSigValRangeHigh  
Float32 SigValPolyCoef0  
Float32 SigValPolyCoef1  
String16 SigValueUnit   Engineering unit for SigValue, for example Voltage.
UInt16 SensorTypeCode   Obsolete.
AiSensorTypeEnum SensorPolyType   Specifies in which way SigValue will be converted to
ActualValue. The possible types of conversions are:

0 No conversion
1 Linerar converson.
2 Parabolic conversion.
3 Squareroot conversion.
4 Signed squareroot conversion.
Float32 SensorPolyCoef0   The constant term in a SensorPolyType expression; see
above.
Float32 SensorPolyCoef1  
Float32 SensorPolyCoef2  
Float32 SensorSigValRangeLow   The Low and High values of SensorSigValRange specifies the
part of the ChannelSigValRange that is used by the sensor.
For example, the channel can have a signal range of -20 - 20 mA
but the sensor only utilizes 4 - 20 mA.
Float32 SensorSigValRangeHigh  
Float32 ActValRangeLow   The Low and High values of ActValRange specifies the
range of the ActualValue of the signal. These values are
correlated to the SensorSigValRange.
Float32 ActValRangeHigh  
DataRepEnum Representation   Specifies the data representation of the raw value.


Template Object
ConversionOn 1
ScanInterval 1
SensorTypeCode 0
SensorPolyType 1
ActValRangeLow -100
ActValRangeHigh 100
ChannelSigValRangeLow -10
ChannelSigValRangeHigh 10
SensorSigValRangeLow -10
SensorSigValRangeHigh 10
SigValueUnit V


Attributes detail


Description Attribute
Class Attribute
Type String80
Flags
Body RtBody
 Optional text, for example to describe the channel or
 its employment.

SigChanCon Attribute
Class Attribute
Type AttrRef
Flags STATE | INVISIBLE
Body RtBody
 Name of a signal object, i.e. Ai object, connected with
 the channel object.

Identity Attribute
Class Attribute
Type String40
Flags
Body RtBody
 The identity of the channel. Optional, for example Ai0
 to denote the first channel, physical cable marking,
 etc.

Number Attribute
Class Attribute
Type UInt16
Flags
Body RtBody
 The Number attribute is used to associate the ChanAi
 object to a fixed channel on the card named by
 SigChanCon. The physical channels of the card are
 numbered in the interval {0,1, ... , (MaxNoOfChannels-1)},
 where MaxNoOfChannels is an attribute in the card
 object.
 The channels of the card are numbered according to the
 instructions of the card manufacturer.

ConversionOn Attribute
Class Attribute
Type Boolean
Flags
Body RtBody
 Specifies if the RawValue should be updated or not.
 FALSE means no updating; TRUE means that RawValue
 should be updated at the period of ScanInterval.

ScanInterval Attribute
Class Attribute
Type UInt32
Flags
Body RtBody
 Specifies, in relation to the period T0, how often
 RawValue will be read in and converted to ActualValue.

 The IO job handles local Ai-signals by the period T0 =
 CycleTimeBus and remote signals by the period T0 =
 CycleTimeSerial; see IOHandler).
 ScanInterval have to be >= 1.

 RawValue will be updated by the period: ScanInterval * T0.

CalculateNewCoef Attribute
Class Attribute
Type Boolean
Flags
Body RtBody

RawValRangeLow Attribute
Class Attribute
Type Float32
Flags
Body RtBody
 The Low and High values of RawValRange specifies the
 raw value range of the channel.

RawValRangeHigh Attribute
Class Attribute
Type Float32
Flags
Body RtBody

ChannelSigValRangeLow Attribute
Class Attribute
Type Float32
Flags
Body RtBody
 The Low and High values of ChannelSigValRange specifies the
 signal range of the channel.

ChannelSigValRangeHigh Attribute
Class Attribute
Type Float32
Flags
Body RtBody

SigValPolyCoef0 Attribute
Class Attribute
Type Float32
Flags INVISIBLE | STATE
Body RtBody

SigValPolyCoef1 Attribute
Class Attribute
Type Float32
Flags INVISIBLE | STATE
Body RtBody

SigValueUnit Attribute
Class Attribute
Type String16
Flags
Body RtBody
 Engineering unit for SigValue, for example Voltage.

SensorTypeCode Attribute
Class Attribute
Type UInt16
Flags
Body RtBody
 Obsolete.

SensorPolyType Attribute
Class Attribute
Type AiSensorTypeEnum
Flags
Body RtBody
 Specifies in which way SigValue will be converted to
 ActualValue. The possible types of conversions are:

   0   No conversion
   1   Linerar converson.
   2   Parabolic conversion.
   3   Squareroot conversion.
   4   Signed squareroot conversion.

SensorPolyCoef0 Attribute
Class Attribute
Type Float32
Flags
Body RtBody
 The constant term in a SensorPolyType expression; see
 above.

SensorPolyCoef1 Attribute
Class Attribute
Type Float32
Flags
Body RtBody

SensorPolyCoef2 Attribute
Class Attribute
Type Float32
Flags
Body RtBody

SensorSigValRangeLow Attribute
Class Attribute
Type Float32
Flags
Body RtBody
 The Low and High values of SensorSigValRange specifies the
 part of the ChannelSigValRange that is used by the sensor.
 For example, the channel can have a signal range of -20 - 20 mA
 but the sensor only utilizes 4 - 20 mA.

SensorSigValRangeHigh Attribute
Class Attribute
Type Float32
Flags
Body RtBody

ActValRangeLow Attribute
Class Attribute
Type Float32
Flags
Body RtBody
 The Low and High values of ActValRange specifies the
 range of the ActualValue of the signal. These values are
 correlated to the SensorSigValRange.

ActValRangeHigh Attribute
Class Attribute
Type Float32
Flags
Body RtBody

Representation Attribute
Class Attribute
Type DataRepEnum
Flags
Body RtBody
 Specifies the data representation of the raw value.