04-04-2014 05:53 AM
04-04-2014 05:59 AM - edited 04-04-2014 06:02 AM
no it is configured to acquire one sample with a sample interval of 0.33333 s. However for one sample the sample rate doesn't even has any influence because it will acquire one sample and then stop, so there is no chance the sample interval will ever get involved, although it is a safe bet that the according counters are programmed anyhow, but who cares.
Once a task is stopped (and having acquired the required amount of samples automatically stops it) you have to at least rearm the task again in order to get anymore samples acquired.
04-04-2014 06:06 AM
04-04-2014 06:33 AM
You don't really want to listen nor think! Play with the parameters of your Task configuration and you should be quickly able to come up with something. If you feel that is to difficult you should really try something else than programming.
04-04-2014 06:40 AM
I checked this again.
you are sooo wrong my friend.
I work in a sample mode - "Hardware Timed Single Point "
which means : (found that in the help) :
Acquire or generate samples continuously using hardware timing without a buffer.
the samples per channel parameter : "specifies the number of samples to acquire or generate for each channel in the task if sample mode is Finite Samples. If sample mode is Continuous Samples, NI-DAQmx uses this value to determine the buffer size".
if you only run the vi that i attached you will see that the loop is running 3 times per second.
04-04-2014 06:46 AM - edited 04-04-2014 06:50 AM
@hookso wrote:
I checked this again.
you are sooo wrong my friend.
I work in a sample mode - "Hardware Timed Single Point "
which means : (found that in the help) :
Acquire or generate samples continuously using hardware timing without a buffer.
the samples per channel parameter : "specifies the number of samples to acquire or generate for each channel in the task if sample mode is Finite Samples. If sample mode is Continuous Samples, NI-DAQmx uses this value to determine the buffer size".
if you only run the vi that i attached you will see that the loop is running 3 times per second.
Well but "Hardware Timed Single Point" is most likely not "Continous Samples" mode. I can't run the VI easily on this machine as I have not apropriate hardware available here.
04-04-2014 06:52 AM
that's right, that what i meant :
in hardware timed single point, this parameter has no influence. it does nothing, even if i write there 1000.
i'm talking with facts now :
how you explain the fact the the loop is running 3 times per second untill i stop it,
and when i click on delay it will insert 3 sec delay to the loop ,and still the "is late" parameter will not return "true" ?
04-04-2014 07:01 AM - edited 04-04-2014 07:06 AM
most likely because while the sampling is controlled by the hardware clock there is no consideration for being late. The sampling will simply happen in the background without any buffer and the DAQmx Read will retrieve whatever sample is there, or wait until one is there. There is no consideration for anything like buffer overflow (the flag that causes sampling late? to return true) since technically there is no buffer.
Yes you could argue that this should be implemented but much more than a product improvement suggestion will be hard to push through here.
04-04-2014 07:08 AM
If i had a buffer i did not need the is late function , because i could check if the buffer has more than one sample.
and if it is, i will know that i'm late - that the software loop is not keeping up with the buffer filling up.
please take a quick look at this :
http://www.ni.com/white-paper/3215/en/
the first example will show you that this "daqmx wait for next sample clock" function has been made for these situations,
when you have no buffer and you want to check if you missed reading a sample.
04-04-2014 07:44 AM
Okay some more basic questions- as I can't run your example here either.
How long is your wait?
When you run with the wait enabled, you can confirm that you see the sampling occur at a lower rate?
After the loop has run at least twice, when you hit stop do you see any error messages?