03-15-2011 11:42 AM
If you look at your VI (acquisition 5 voies.vi), you'll notice that you take the data out of the DAQmx Assistant and branch your wire. One branch of the wire goes to your file write, while the other goes to your code for displaying data. This branch of the wire creates two copies of the data from the DAQmx assistant. One copy gets written to file. This copy is unaffected by anything that happens when you try to display the data. You then take the other copy of the data and attempt to display this. This is a reasonable approach to this problem. The biggest issue with your code is the method you are using to display this data. All of the data you expect to display does exist (it is contained in your array of waveforms), however it cannot be represented by a single scalar. This is why I was recommending that you use a graph indicator to display this data. The graph indicator can accept an array of waveforms as its input. This would replace all of the array manipulation code you have in your loop with a single waveform graph indicator.
Hope that helps,
Dan
03-15-2011 11:48 AM
Ok, I'll analyse what you've just written...and I forgot to post the VIs, so here they are.
03-15-2011 05:24 PM
Please, I've built another VI that seems better,... what do you think of this one ? I use "Generate DAQmx code" and it shows the waveforms
but unfortunately the waveforms aren't fluid on screen, when I take down the number of samples to about 100 then the waveforms are shown
in true real-time once again, tell me is it possible to do BOTH write the data to txt AND have nice waveforms per physical channel on screen ?
Also is it possible to use a "flat sequence" so that I could first "activate" each physical channel THEN launch the data acquisition with some sort of trigger, I know it's possible but how ?
Thank you,
03-16-2011 09:30 AM
You did not attach anything.
Simple arithmetic - Number of Samples/(Samples/Sec) = number of seconds to perform an acquisition.
Of course you can have a fast acquisition and write as many samples as you want. As noted earlier, you have the write function outside the loop and are only passing the very latest acquisition. This is LabVIEW 101. If you want to write each acquisition, simply place the write inside the loop. You would be doing an acquire, write, acquire, write, etc.
No sequence structure! If you have a physical channel control, before starting the VI, simply click on it and select browse to select the channels. Then click on the run button.