From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application not able to keep up with data acquisition error when sample number is low

Hi, having a slight issue trying to get a simple data acquisition VI do what I want (attached here). For reference, the DAQ is a usb-6009 (48kHz max) and I'm sampling the analog signal at 24kHz , to allow the digital channel to effectively sample at 24khz (though it is 'on demand'). 


What I want is for an analog input to be recorded when the digital input is high. If the code worked I would aim to implement this by taking the waveform data and appending it on a waveform through a shift register.


Unfortunately when I set the sample number to 1-10 (I would like to keep this low so that the data acquisition stops precisely when the digital input is 0) I get the error - why is this happening? 

Using samples = 25 means it works flawlessly , but this would be taking data points when I don't want them to be taken (i.e when the digital signal is off).

 

Thanks in advance! 🙂

0 Kudos
Message 1 of 2
(3,044 Views)

How EXACTLY are the tasks set up?

 

If the analog input task is continuous, then you will easily fill up the buffer because you are not reading the data.  If on demand, you are not getting your 24kHz.

 

What I would do is using another analog input and wire your digital line to it.  Then you can read a bunch of the data and filter out the data when the digital line is low.


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