High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching waveform and binary conversion is unequal in NI PCI-5922

Hi, this is my first question here. Anything I did incorrectly please let me know.

Let's start. First of all, I have a system of computer with NI-scope card PCI-5922 (model 32 MB/channel memory) and the system can collect measurement data normally. The measurement condition is sampling rate 1MS/second with 1 second duration for each loop. In one measurement, there are a lot of loop with different parameter setting (externally, not involved in Ni-scope loop) that can stacks up to 16 hours of measurement period in one time running LabView.

The problem is I tried to decrease the measurement period by searching in NI website and forum as well as document provided by NI and found that the method I use right now "niScope fetch measurement 1D cluster" that return voltage waveform array is the sub vi block that consume time much more than it should be. In one loop the system measure 1 million samples in 1 second, so consumption time of this block should not exceed few seconds, but I found it is 6.6 seconds. There are adivces to change fetching data from "voltage waveform (converted 64 bit data)" to "raw binary (8 or 16 or 32 bt data) then convert to voltage waveform by using Gain and Offset. I tried it and time period decreased from 6.6seconds to only 1 second !!. However, the data array seems to be another story. All binary data converted by using gain multiplication then add offset to get result show higher value and more fluctuation. Both gain and offset I got from waveform info directly provided from the fetch vi block.

Please help me clarify what I should do. I follow direction from NI document but still got in accurate result, even decreasing measurement time goal is achieved.  Thank you.

 

PS. My system is NI scope PCI-5922 (measured actual data rate is 100MB/s, so no problem of transfering bottle neck). One measurement consists of a large number of loops with different temperature and injection currecnt to my test sample, can be several minutes to many hours. Each loop consist of fetching data from PCI-5922 with 1 million samples in 1 second (onboard memory is 32MB, enough for each loop) then clear waveform after fetching done completely.

 

PS2. In my opinion, I suspect the anti-alias filter in the 5922 card. But this should apply to both binary and voltage waveform, right ? I already tried fetch binary and voltage waveform once in the same measurement before clear waveform and still found difference in data as described above. If the filter is unable to be turned off it should apply on both converted voltage waveform and binary data, correct me if I'm wrong.

0 Kudos
Message 1 of 3
(5,124 Views)

Hello,

 

Welcome to the NI discussion forums!  Can you demonstrate (possibly with code or screenshots) how you are converting the binary data to waveform data and also provide sample data showing how this results in the inaccurate results?  Also can you link the NI document that you mentioned?

------------------------------------------------------------------------------------------

Jon F.
Technical Support Engineer
National Instruments
0 Kudos
Message 2 of 3
(5,110 Views)

Hi, sorry for late reply. I just found solution and test it for a bit while to confirm before post here.

 

This is my finding. I found I misunderstood the sequence of the waveform processing. First I've heard that there is an Anti-alias filter that is unavoidable, so I feel like this is the cause of inaccurate result of my fetched data. I assumed that data from fetching binary is direct from memory on-board and it has no effect from filter.

 

Actually, this is not true. I revise my thought again about anti-alias filter. Due to it can't be avoided in any case, so fetching binary will not be the exception too. I rechecked my VI again and found there is a block of waveform processing and a low pass FIR filter setting in the Ni-scope property nodes. I edited my VI again to add the additional FIR low pass filter with same condition then trim the result array at head and tail (because of unstable result of ramping up to stable and ramping down) then compare to the orginal data of waveform from Ni-scope card (fetch same time and clear waveform later, so raw data should be the same). Found that every data point comparison one by one in the same time stamp has difference in only around E-15 precision. I'm sure that what I'm doing is the right way now.

 

After solving problem of inaccurate data fetching, from changing "Fetch measurement voltage waveform" to "Fetch binary" (I chose DBL due to my PCI-5922 run at 1MS/s so I32 is enough but I found time usage comparison of I32 and DBL are the same, so it is worth to use DBL) then convert to voltage waveform by using Gain and Offset in calculation. Then I put whole array into additional low pass filter (same condition mentioned in NI-scope property nodes) final step, I crop to cut ramping up and down in same amount of tabs parameter in the filter. I got same result ^__^

 

Time saving is very big. Before I improved, time of fetching 1 loop cost me 6.6 seconds and now with new way of fetching by binary and throw every calculation to computer instead of NI-scope card, time usage left only 1.2 seconds (save 5.4 seconds !!!). My long run measurement of many hours left only few hours !!

Anyway, all idea I got is from NI document and resources as well as all the people in this forum.

 

Thank you very much ^__^ My LabView project was done now, and may be I will never have a touch with LabView anymore due to my workplace almost use Visual studio to control the automatic machine. If I have anything again, I should walk through this forum carefully before asking like this time ^^

 

Sorry for the reference document I referred to. I'm at home right now. When I go to office again, I'll update to you ^^, thanks AirFrantz !!

Message 3 of 3
(5,093 Views)