DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Importing measurement range with DIAdem Data-PlugIn

I programmed a Data-PlugIn for a application specific file format.
These files contain 4 channels of binary data, which are directly memorized from 4 seperate 12-Bit A/D-converters.
(see example 3 of DIAdem DataPlugIn-Help)
 
Option Explicit
Sub ReadStore(File)
  'Create Block.  This is a binary file format.
  Dim Block : Set Block = File.GetBinaryBlock()
  'Add four channels to the block.
  Dim Channel1 : Set Channel1 = Block.Channels.Add("Channel1", eI32)
  Dim Channel2 : Set Channel2 = Block.Channels.Add("Channel2", eI32)
  Dim Channel3 : Set Channel3 = Block.Channels.Add("Channel3", eI32)
  Dim Channel4 : Set Channel4 = Block.Channels.Add("Channel4", eI32)
  'Create a channel group in USI
  Dim ChannelGroup : Set ChannelGroup = Root.ChannelGroups.Add("MyChannelGroup")
 
  'Add the channels from above to the new channel group.
  ChannelGroup.Channels.AddDirectAccessChannel(Channel1)
  ChannelGroup.Channels.AddDirectAccessChannel(Channel2)
  ChannelGroup.Channels.AddDirectAccessChannel(Channel3)
  ChannelGroup.Channels.AddDirectAccessChannel(Channel4)
End Sub
 
My question now is, whether it is possible to tell DIAdem which measurement range corresponds to the steps of the A/D-converter.
 
What I imagined was to write into the first 4 bytes of the file format a specific factor, which will be read out by the DIAdem Data-Plugin.
After that DIAdem should divide the 4096 A/D-steps with that factor, so you can see the real voltage of the measured signal in "DIAdem-View".
 
Does anyone know how to implement that issue?
 
Thanx for your replies,
Markus
0 Kudos
Message 1 of 2
(3,233 Views)
Hello Markus,

There is a property with the name 'Factor'. With this property you can multiply the channel values with the AD-converter value.
If you look in the DIAdem Help for the keyword 'Factor' you get more information and an example.
Further it is posible to add an offset to the channel vales.

Best Regards,
Wolfgang Z

0 Kudos
Message 2 of 2
(3,209 Views)