11-06-2008 07:47 AM
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
11-07-2008 10:37 AM - edited 11-07-2008 10:38 AM
12-03-2008 05:33 AM
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
12-03-2008 08:39 AM
12-03-2008 09:20 AM
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
12-03-2008 01:44 PM
"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.pdf12-04-2008 08:11 AM
12-04-2008 09:14 AM
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
12-04-2008 09:43 AM
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.
12-04-2008 10:05 AM
I have to comply with an existing data format, so I don't think that would work, unfortunately.
Philippe