Property: Factor for ProcessedChannel
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Properties > Property: Factor for ProcessedChannel
Property: Factor for ProcessedChannel
Specifies the factor that the read value is multiplied by.
This property, used with the Offset property, can be used to calibrate values as they are read in. The formula for conversion is as follows:
Value = Factor*File value + Offset.
Object.Factor
Object | ProcessedChannel Object with this property |
Object.Factor | Double with read and write access |
![]() | Note The properties Factor and Offset are ignored when text channels and time channels are read. For all other channel types, the conversion formula returns a Real result. |
The following example generates a new MyChannel channel in the Measurements channel group. The new channel contains the values added rowwise of the second, third, and fourth channels of the Measurements channel group. Each value of the MyChannel channel is also multiplied by the factor 2 and then the offset 5 is added.
Dim oChannelGroup, oProcessedChn, i Set oChannelGroup = Root.ChannelGroups("Measurements") Set oProcessedChn = oChannelGroups.Channels.AddProcessedChannel("MyChannel",eR64,eAddProcessor) oProcessedChn.Factor = 2 oProcessedChn.Offset = 5 For i = 2 to 4 Call oProcessedChn.Channels.Add(oChannelGroup.Channels(i)) Next