04-27-2011 11:35 AM
Hello,I need to acquire many single light pulses. I'm using pci-5122.The pulses are at 1Khz, I modified the example file "niScope EX Multi Record Fetch More Than Available Memory Producer Consumer 8_2.vi" as in attachment.I'd like a matrix output with a pulse waveform per row, but I don't know how to do that, I have problem extracting the waveform from the second (consumer) loop.Thanks for your help!
Solved! Go to Solution.
04-28-2011 04:15 AM
Hello,
I modified my vi as in attachment, now the writing to file is the same as in the example "
04-28-2011 05:03 AM
Hi,
in your VI you are writing to a TDMS file, thus a binary file. Would you like to save to a spreadsheet or txt file instead? Or simply have the waveform data available in other datatype in LabVIEW?
The output of Dequeue Element.vi is 1D array of waveform: each waveform element is a cluster of dt (a double value), t0 (a double value) and an array of double values. Thus, if you need to obtain a 2D array with all the data (if I understood correctly), you will have to index each elemnt of the 1D array of waveform, extract the double array contained in each waveform and then build a 2D array.
You can find an example here.
I hope this helps!
Bye,
Licia
04-28-2011 07:41 AM
Thank you!
That's exactly what I want to do, but I don't know how.
I will take a look at the example and let you know.
Thanks again!
04-28-2011 08:19 AM
Here it's how I solved it: after the Dequeue Element I used Index Array, Get Waveform Components, and I passed the data through the loop with a Auto-Indexed Tunnel, to the Write To Spreadsheet File.
The big problem was that I couldn't find out how to have a Auto-Indexed Tunnel, instead of a Loop Tunnel, so I copied it from a loop I had in another project where I automatically got an Auto-Indexed Tunnel.
04-28-2011 08:25 AM
Hi,
I'm really glad you have been able to solve and to have been of help!
In general, to enable auto-indexing on an output tunnel, you just have to right-click the tunnel and select "Enable indexing".
Bye!
Licia