LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring multiple analog inputs with USB-6009

I'm trying to measure three analog inputs with a USB 6009 and display the data on a chart. Currently, I have managed to have all three input data plotted on the same chart as shown below.

 

Multiple inputs.PNG

 

However, I would like to know how to plot each input in a separate plot but in the same chart, as shown below.

 

Multiple plots.png

 

Also, I would like the plots to have an x-axis in units of seconds starting at zero, as demonstrated here: How Can I Plot My X-Axis in Units of Seconds Starting at Zero?

 

Essentially, I want to combine all three VIs in one, but I'm having difficulty making the data types compatible.

0 Kudos
Message 1 of 6
(4,249 Views)

I've managed to combine all three VIs. Is there any way I can improve it?

 

multiple plots starting at zero seconds.PNG

0 Kudos
Message 2 of 6
(4,232 Views)

Index Array is resizable.  You don't need to put 3 of them down.  Just drag the bottom border down, you'll get 3 outputs that are row 0, 1, and 2 by default.

 

Why are you doing that to get 3 separate 1-d arrays, then building that back into a 2-D array.  It seems like the end result is the same.  Try wiring the analog read directly to the chart's terminal.

0 Kudos
Message 3 of 6
(4,216 Views)

RavensFan wrote:  Try wiring the analog read directly to the chart's terminal.

A Transpose 2D Array may be needed if that does not work directly.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(4,212 Views)

I was thinking about that possibility, but I saw the way it was programmed, and knew it was yielding the same result.  Sometimes you can't be sure you aren't mixing up rows and columns until you play with it.  Here is the proof.

 

There is the possibility it behaves like a "Get Array Subset" by indexing out 3 rows from an unknown larger number and building them back into a 2-D array.  But the task was set up with only 3 channels, so I knew the 2-D array only had 3 rows.

 

0 Kudos
Message 5 of 6
(4,194 Views)

Thanks for the suggestion RavensFan. I wired the analog read directly to the chart's terminal and it gave me the same result. Here's the updated block diagram:

 

Phase 1.png

 

There is something else I need help with. I would like to incorporate another waveform chart that measures RPM using the event counter into the above waveform chart array. I currently have the RPM chart in its own VI as shown:

 

Phase 2 front panel.png

Phase 2 block diagram.png

 

I'm wondering if it's possible to synchronize the RPM chart with the other three charts and have them all start at zero seconds.

0 Kudos
Message 6 of 6
(4,150 Views)