LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Waveform from an analog Input for each channel

How can I display a waveform after gathering data from my ai-scan for each channel. I want to have different waveforms for each channel. Also is there a way to select different channels when the program is running.
0 Kudos
Message 1 of 2
(2,658 Views)
PierT,

There are a couple of ways you can go about getting a waveform datatype of your data. The first (and easiest) is to right-click the AI 1-scan.vi and go to Select Type>>Single-Point Waveform. This would output a waveform datatype for you. I recommend reading the help file on that, though, because it may not be exactly the waveform type you are hoping for.

The other way would be to manually build the waveform. This would mean building an array of values from each channel and passing that into the Build Waveform.vi as the Y input. Then you would have to include the t0 and dt information, as this is what constitutes a waveform datatype.

You may want to use a multi-scan VI, rather than a single-scan VI like you are using now, because that will give you an array of points from each channel each time the VI runs.

As for being able to select the channels to read while it's running, it would be tricky, but it's possible. You could have the user select the channels from an array of booleans and then read the channels where there is a true in the array. Or you could use an event structure.

Tyler S
0 Kudos
Message 2 of 2
(2,638 Views)