DIAdem Help

Property: Values for ProcessedChannel

  • Updated2024-09-12
  • 1 minute(s) read

Property: Values for ProcessedChannel

Returns the single value of a Channel at a specific channel position.

Object.Values(iIndex)
ObjectProcessedChannel
Object with this property
iIndexLongInteger
Specifies the channel position.
Object.ValuesVariant with read access
Note  The Size property contains the current number of values of a channel.

The following example generates a new MyChannel channel that contains the values, which are added rowwise, of the Real type DirectAccess channels. The example then totals the values of the MyChannel channel and saves the result in the new Sum channel property.

Dim ProcessedChn, Channel
Set ProcessedChn = ChannelGroup.Channels.AddProcessedChannel("MyChannel",eR64,eAddProcessor)
For Each Channel in ChannelGroup.Channels
  If Channel.IsKindOf(eDirectAccess) and (Channel.DataType = eR64) Then
    Call ProcessedChn.Channels.Add(Channel)
  End If
Next

Dim i, Sum
For i = 1 to ProcessedChn.Size
  Sum = Sum + ProcessedChn.Values(i)
Next
Call ProcessedChn.Properties.Add("Sum",Sum)