Method: AddWaveformProperties for ProcessedChannel
- Updated2024-09-12
- 2 minute(s) read
DataPlugin > Methods > Method: AddWaveformProperties for ProcessedChannel
Method: AddWaveformProperties for ProcessedChannel
Adds waveform properties to a channel, which combines values form other channels (ChannelsToProcess), in order to create a waveform channel.
Waveform channels contain the x-part and the y-part of a curve in a channel. The y-part contains the (measurement) values. The x-part might be the measured time. The Waveform properties specify the x-part that is a linear specification with a start value and a step width.
Object.AddWaveformProperties(Increment, StartOffset, [XChannelName], [XChannelUnit], [StartTime], [TimePreference], [NumberOfSamples])
Object | ProcessedChannel Object with this method | ||||||
Increment | Double Specifies the step width of the x-part of the waveform channel. | ||||||
StartOffset | Double Specifies the offset of the x-part of the waveform channel. | ||||||
[XChannelName] | String Specifies the name of the x-part of the waveform channel. The default channel name is Time. | ||||||
[XChannelUnit] | String Specifies the unit of the x-part of the waveform channel. | ||||||
[StartTime] | UsiTimeDisp Specifies the start time of the x-part of the waveform channel. | ||||||
[TimePreference] | Enumeration with the following selection terms:
| ||||||
[NumberOfSamples] | LongInteger Specifies the block size of the values of the waveform channel. The default value is 1. |
The following example generates the channel MyChannel in the Measurements channel group. The channel contains the values, which are added rowwise, of the 64-bit Real type DirectAccess channels from the Measurements channel group. Then the example adds waveform properties the the MyChannel channel.
Dim ChannelGroup: Set ChannelGroup = Root.ChannelGroups("Measurements") Dim ProcessedChn: Set ProcessedChn = ChannelGroup.Channels.AddProcessedChannel("MyChannel",eR64,eAddProcessor) Dim Channel For Each Channel in Channelgroup.Channels If Channel.IsKindOf(eDirectAccess) and (Channel.DataType = eR64) Then Call ProcessedChn.Channels.Add(Channel) End If Next Call ProcessedChn.AddWaveformProperties(1, 0, "Time", "s")