DIAdem Help

Property: Offset for DirectAccessChannel

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

Property: Offset for DirectAccessChannel

Specifies the offset that is added when a value is read.

This property, used with the Factor 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.Offset
ObjectDirectAccessChannel
Object with this property
Object.OffsetDouble 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 creates a new channel group with a DirectAccess channel. When the channel values are read, each value is first multiplied by the factor 2, and then the offset 5 is added.

Dim oBlock: Set oBlock= File.GetBinaryBlock()
Dim oChn  : Set oChn  = oBlock.Channels.Add("MyChannel",eI32)
Dim oMyGrp: Set oMyGrp= Root.ChannelGroups.Add("MyChannelGroup")
Dim oMyChn: Set oMyChn= oMyGrp.Channels.AddDirectAccessChannel(oChn)
oMyChn.Factor = 2
oMyChn.Offset = 5

Log in to get a better experience