LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hardware-timed single point mode: how to determine if any sample acquired

Hello All,
  My question is in the subject. I conldn't use "DAQmx REad property-available samples per channnel" as it's for buffered operation.
  So how can I determine if a sample has been aquired and availabe for a DAQmx Read VI to read? I wish to know the answer in both MS windows Labview and RT cases.
 
Thanks
 
Feilong
 
 
0 Kudos
Message 1 of 7
(4,045 Views)

Hi Feilong,

I suggest using the available samples per channel property in order to accomplish this, one note is that if you are using a USB device, The property will return 0 until all of the data has been acquired, and then a non-zero value is returned. This is due to the firmware on USB M-series devices. I hope this helps!!

JaceD
Signal Sources Product Support Engineer
National Instruments
0 Kudos
Message 2 of 7
(4,018 Views)
Thanks JaceD.
but can I use this in hardware-timed single point mode?
 
feilong
 
0 Kudos
Message 3 of 7
(4,013 Views)

Hi Feilong,

My deepest apologies, I must have misread your previous post. You are correct that this property is not available in hardware-timed single point; due to the lack of a buffer for hardware timed single point you are not able to query to see if a sample is available. The hardware will take a sample on each sample clock edge and return this value, you should take this into consideration and verify that your read executes faster than the sample clock, otherwise you will receive a warning. Once again I do apologize for my earlier oversight and if I am misunderstanding your question please post back and I will re-evaluate my answer. As I see it now though there is not a way to gather this information due to the fact that there is not a buffer.  

JaceD
Signal Sources Product Support Engineer
National Instruments
0 Kudos
Message 4 of 7
(3,979 Views)
Thanks JaceD for your reply,
   So what will happen if there's no data acquired at a specific time instant when a DAQmx Read.vi is called? Does my vi going to produce an error and stop? I don't want this to happen. I prefer to have a warning and my loop will continue to run. Is it viable?
 
Feilong
 
 
0 Kudos
Message 5 of 7
(3,948 Views)

feilong wrote:
Thanks JaceD for your reply,
   So what will happen if there's no data acquired at a specific time instant when a DAQmx Read.vi is called? Does my vi going to produce an error and stop? I don't want this to happen. I prefer to have a warning and my loop will continue to run. Is it viable?
 
Feilong
 


Try it and find out! Smiley Wink
 
Let's say it does throw an error, use the error handling VI's to clear the error if it meets whatever particular error code gets thrown.


Message Edited by Ravens Fan on 01-02-2008 10:33 PM
0 Kudos
Message 6 of 7
(3,944 Views)
That sounds a good idea. thanks Ravens Fan .
0 Kudos
Message 7 of 7
(3,942 Views)