04-13-2016 01:27 PM
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.
However, I would like to know how to plot each input in a separate plot but in the same chart, as shown below.
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.
04-13-2016 02:18 PM
I've managed to combine all three VIs. Is there any way I can improve it?
04-13-2016 03:27 PM
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.
04-13-2016 03:39 PM
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.
04-13-2016 07:37 PM - edited 04-13-2016 07:39 PM
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.
04-14-2016 03:40 PM - edited 04-14-2016 03:42 PM
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:
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:
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.