LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting dynamic DAQ data into an array?

In the end, I want to have written a VI that acts as an oscilloscope, converts the data onto an intensity plot, and retain the data from the intensity plot on a csv file.

1. actual oscilloscope
2. oscilloscope made from LabVIEW
3. intensity plot (histogram)
4. csv file

my 1 -> 2 is fine.  my 3 -> 4 is fine.  But there is something wrong when I go from 2 -> 3.
I think the problem lies in the fact that the DAQ's dynamic data takes many many smaples at once, but the intensity plot gathers the data too slowly.  So for very 100 samples the DAQ takes in and plots on my oscilloscope graph (the LabVIEW one I made), it only takes into account a few for the intensity plot.    Robot surprised

help?
0 Kudos
Message 1 of 5
(3,350 Views)
You are not using the Index Array and Replace Array Subset correctly. Even though you can wire dynamic data to the row and column inputs, you really shouldn't. These inputs are supposed to be integers. When you wire dynamic data to them, The dynamic data is converted to a scalar. I don't know if it's the first or last element in the data array, but in any case, you only get a single value out of the Index Array function. You can see that for yourself because it's a thin blue line that you have the increment function on. I've cleaned up your diagram and did an explicit conversion of the dynamic data to a 1D array. That;s shown below. As you can see, that creates broken wires to the Index Array and Replace Array Subset. I would suggest you do something similar and work on building the intensity graph differently.
Message 2 of 5
(3,341 Views)
I think I got what I wanted now.  BUT there is still a minor problem, the intensity chart still updates too slow.  😞
0 Kudos
Message 3 of 5
(3,330 Views)
I still cannot fiure out why the intensity chart does not updae as quickly as the "oscilloscope" that I made using LabVIEW.  I made an array that supposely takes in more data points and that should allow the intensity plot to have all the data it needs to add onto the histogram (intensity chart)

Any advice?
0 Kudos
Message 4 of 5
(3,322 Views)
Hello,
You should try to put some tests in to measure the time it takes to measure each part of your program.  I have a feeling that the delay in your loop is causing some issues if you choose a large frequency.
reggier
0 Kudos
Message 5 of 5
(3,308 Views)