LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Read VI returns empty waveform

Solved!
Go to solution

So, I'm writing an interface for the NI USB-6229 in LabVIEW 2018 on Windows 10.

 

The DAQmx Read VI will usually write data to the file just fine (unless I change the "number of samples" control, but I think that is an unrelated issue), but the main problem is that no matter what settings I use for that VI it always returns an array of empty waveforms. Why is it doing this? Am I using it wrong? Is it a gotcha-type of problem? I need those waveforms so I can display the data as it is being collected. I am stumped and would appreciate any feedback.

 

P.S. Sorry the block diagram is so big.

0 Kudos
Message 1 of 3
(2,181 Views)
Solution
Accepted by topic author duwaar

Are you sure it is empty?  Did you put probes on the Waveform wires coming from the DAQmx Read?  Do you get any error message?

 

One thing odd I see.  You take the array data and do an array size on that.  Then you proceed to do an index array on that value.

 

Well if you have a 3 waveform array, the number 3 comes out.  But those are elements 0, 1, and 2.  So when you try to index waveform 3, it doesn't exist.  It will give you an empty array.

 

daq_1.5_BD

 

 

Message 2 of 3
(2,153 Views)

Woohoo! That issue that you pointed out wasn't the problem, itself, but fixing that mistake led me to the actual problem; I needed to put a shift register in the for loop after 22 in the attached image.

Thank you so much!

0 Kudos
Message 3 of 3
(2,144 Views)