10-27-2011 12:08 PM
Hey guys,
I am really having trouble finishing this VI. What is the most efficient way of continuously writing three waveforms to a single text file? You can see in my attached VI that I have dynamic data coming from three separate DAQmx read VI's. I then convert the dynamic data types to single waveforms using the convert from dynamic data express VI, but I am not sure if this is the best conversion to use. If you right click a convert from dynamic data express VI and go to properties you can select a number of different types of conversion. That aside, from each single waveform I use get waveform components functions to get the amplitude data of the waveforms. From there I create a 2-D array from the 1-D amplitude arrays, transpose the 2-D array, convert it to a spreadsheet string and input that string into text file. I am worried that this I will be repeating data as the amplitude array grows. Basically in the end I want to create a text or spreadsheet file from my three waveforms, containing at least the amplitude data in columns. Please offer and suggestions as to the best way to go about this problem.
10-31-2011 03:19 PM
I am pretty sure you need to use the Merge Signal VI, If that does not work let me know.
10-31-2011 03:59 PM - edited 10-31-2011 04:06 PM
Hi guy,
"You can see in my attached VI that I have dynamic data coming from three separate DAQmx read VI's."
Wrong. You have set your DAQmxRead to deliver an array of waveforms! Probably you only need to choose "Single Channel, Waveform"... (As your task definition is hidden in MAX we cannot decide this from just reading the task name.)
"I then convert the dynamic data types to single waveforms using the convert from dynamic data express VI, but I am not sure if this is the best conversion to use."
As you already have an array of waveforms this surely isn'T the best conversion tool (as is shown by the red dots!). You could simply use IndexArray to get the first waveform - or use the approach above and get only one waveform from DAQmxRead...
"I am worried that this I will be repeating data as the amplitude array grows."
Why should it grow? There is nothing to grow...
I am pretty sure you don't need "Merge Signal" (those little ExpressVI "bast-ard" )...
Hey, wtf... NI uses a (easily to work-around) filter to replace "unwanted" wording by **bleep**! It's like watching (US-)American tv - but I'm not in the States...