LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Aquisition Problem

Hi, 

 

I am writing a program in labview that outputs voltages and reads current values, and the current values I read must be recorded onto an excel sheet. In order to retrieve these current values, I have used "Get Waveform Components vi," and then use "Delete from array" to delete from the array of doubles that I get from the waveform components. For some reason, when I record the data, I get arbitrary zeros in the middle of the data instead of actual current data, and I can't seem to figure out why. If you understand what the problem is or have had it before, and know how to fix it, please let me know. Attached here is an example of my current document. You can see that there are arbitrary zeros, which I do not even see on my waveform graph in the actual vi.

 

Thanks,

 

0 Kudos
Message 1 of 7
(2,780 Views)

Delete from array doesn't seem to be applicable here, but you'll have to upload your VI to get any more detailed help.

0 Kudos
Message 2 of 7
(2,773 Views)

Hi, 

 

This is the vi. It is a voltage zapping program. You can ignore most of it except for the part on the bottom where "Get waveform components" is used to retrieve current data. Thank you for your willingness to help.

0 Kudos
Message 3 of 7
(2,769 Views)

It's a bit of a mess going on there, and I've never used the dynamic data before so I can't help you there. Your zeros probably come from the array manipulation you're trying to do, you can place probes and breakpoints to see what the data going in looks like.

0 Kudos
Message 4 of 7
(2,700 Views)

Here are some recommendations that will make your code vastly easier for both you and "naive viewers" (namely us) to understand it:

  • Get rid of all of the Frame Sequences!  The large Triplex Frame is completely unnecessary, as the Error Lines provide all of the Sequencing that you require.  There is an internal Frame with a Wait inside it, but if you understand the Principle of Data Flow, you will realize that your timing will be better without the Frame.
  • Endeavor to keep your wires, as much as possible, running left-to-right, top-to-bottom, and straight.
  • Try to use less "real-estate" in your Block Diagrams.  The ideal size is a modest resolution (i.e. non-4K) Laptop Screen.  Some advocate 1024 x 768.
  • An excellent way to save real-estate (and "hide the irrelevant details") is to use sub-VIs.  Of course, you now need to show the sub-VIs to understand the logic ...
  • Have you ever tried the Clean-up Tool (it looks like a Broom in the top-center of the Block Diagram Window)?  It will do a Brute-Force rearrangement of your code to straighten wires, remove white space, etc.  Try it with a copy of the code first, just in case ...

Bob Schor

0 Kudos
Message 5 of 7
(2,686 Views)

Hi gregoryj,

 

Thank you for your suggestions. Do you know of an efficient way to convert waveform data into a 1D double array, and then isolate the values of that 1D array? I guess the first part of that process would be to use "Get waveform components," but how would I approach retrieving individual elements from a 1D array of doubles in the most efficient way possible? Please let me know.

 

Thanks,

0 Kudos
Message 6 of 7
(2,663 Views)

@kylonia wrote:
but how would I approach retrieving individual elements from a 1D array of doubles in the most efficient way possible? Please let me know.

Index Array to get an single data point.  Array Subet to get a series of data points.


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 7 of 7
(2,647 Views)