LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if a physical data channel has data on it

I am aquiring data continuously and am trying to check if there is data on the physical line, if there is digital data I want it to be passed to the next stage, if there is not I want the data diguarded. Is there a way of checking this digital line for inactivity because  when I suspend the data flow the clock continues to clock and my buffer just fills with empty data.

 

Thanks 

0 Kudos
Message 1 of 6
(2,721 Views)

Acquiring data from what?  Can you provide some sample code to give us some idea of where you are?


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 6
(2,712 Views)

Digital data from an I2S device, when there is no audio (data on line 2)  I would like the producer to not queue the data. Is there a way of checking for a series of inactivity for the line

0 Kudos
Message 3 of 6
(2,696 Views)

correct attachment

0 Kudos
Message 4 of 6
(2,688 Views)

You should get a timeout error from the DAQmx Read if there is no data availalbe.  Are you not getting an error?

 

As for your consumer loop, there is no need to check to see if there is data in the queue.  Just call the Dequeue Element.  If there is no data in the queue, then it sleeps until there is data (assuming you don't use a timeout).  It will then pass out the data as soon as it is available.


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 5 of 6
(2,670 Views)

I am still receiving data on two of the other lines for this reason I dont get a time out error, when the one line I want to check is inactive none of the data is valuable. I have tried aquiring the data by a seperate daq express VI but because the line is already being read it wont allow me to aquire the data another way to check for inactivity.

0 Kudos
Message 6 of 6
(2,649 Views)