LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digitizer V/LSB ?

Hello,

 

I am using PXI digitizers (5122 and 5152) with LabView 8.0.  I write the data in I16 binary format to save disk space.  How can I extract the Volts per LSB information to reconstruct the voltages afterwards offline ?  I would like this information to go into a setup file that is written before any triggering takes place.  Also, what I am looking for can be reconstructed from the true range, the gain and the number of bits, so extracting these would be useful, but I am not sure that what I select as range is the actual range (i.e. selecting +-5 V for instance seems to actually give something like +-4.8 V).

 

Philippe

0 Kudos
Message 1 of 10
(3,915 Views)
Duplicate
Message Edité par BenjaminR le 11-07-2008 10:38 AM

    Benjamin R.


Senior LabVIEW Developer @Neosoft


0 Kudos
Message 2 of 10
(3,898 Views)

Sorry, but it's not really obvious what is duplicate and where I can find the answer to my question (extracting V/LSB, or gain and range, before a trigger).  Could you be more specific ?

 

Philippe 

0 Kudos
Message 3 of 10
(3,836 Views)
This is very simple. You have to find the weight of each bit. Use this formulae (daq range)/(2^n-1). n is number of bits in your converter.  As an example. My old daq-516 card has range equal to +5/-5 volt and 16 bit resolution. Then the formula will give (5-(-5))/65535 as bit weight. Multiply this number with the daq output, and you have the result in voltage


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 10
(3,825 Views)

Actually, it's not that simple.  With my 8-bit 5152 on the +-2 V range, your formula gives 4/255 = 15.7 mV.  Yet the I16 ADU output actually ranges from -32768 to 32512.  If I multiply these values by 15.7 mV, I get several hundred Volts.  There must be a gain someplace, but I have yet to find it.  Any ideas how to access it ?  I can get the V/ADU with Fetch Binary vi, but this implies having to wait for a trigger before getting the information.  I can't believe there isn't an easier way.

 

Philippe 

0 Kudos
Message 5 of 10
(3,815 Views)
My formula is correct:manwink: But i think you are using the wrong VI setting then are reading from the 8 bit scope. The "

"niScope Fetch Binary" is poly type. I guess the default setting  is I16. So this Vi works fine on your 14 bit data, but the output from the 8 bit scope is a mess. Select the right setting for the "niScope Fetch Binary" VI by right clicking on it and I guess your system will work fine. Take a look at this document

http://www.ni.com/pdf/manuals/371134a.pdf


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 10
(3,795 Views)
Most of the NI-SCOPE read VIs have a wfm info cluster which contains the scaling information you want.  Note that this is calibrated, so will not perfectly correspond to the "ideal" situation you list above.
0 Kudos
Message 7 of 10
(3,769 Views)

Thanks for your answer.  Yes, that is the scaling information I want, and yes I can get it from read VIs (like the wvfm info in niScope Fetch Binary), but isn't there some way to get the info before doing any reads ?  I would like to save the information before the triggering starts.  I guess I can just set up a bogus immediate trigger, do a bogus read, save the scaling info, then set up the real trigger I want, and do the acquisition, but that seems sort of complicated.  Calibrated vs ideal isn't an issue at this point.

 

Philippe 

0 Kudos
Message 8 of 10
(3,759 Views)

You can wrap your data,scaling and time stamp info in a cluster and save it as a datalog file. This way you can reconstruct your data 100%. If your cluster is pure numeric it will have very little overhead.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 9 of 10
(3,754 Views)

I have to comply with an existing data format, so I don't think that would work, unfortunately.

 

Philippe 

0 Kudos
Message 10 of 10
(3,745 Views)