02-04-2014 10:34 AM
I'm using an application which is based on the vi shown below (after):
I run it using virtual channels as input signals (64 channels at 96 kHz). As long as the samples to read don't exceed a certain number (around 45s of measurement time) everything works fine. Using larger numbers I get an immediate error code 50202 from the "start task" vi.
I already update my NI-DAQmx Software to the latest version an neither cases over here applies for my system. Could the virtual channels be the problem? I won't have a chance to test it with a real setup the next weeks...
Any troubleshooting advice would be great!
Solved! Go to Solution.
02-11-2014 02:30 PM
Hi flobsi_1,
please refer to the following document:
http://digital.ni.com/public.nsf/allkb/E1E67695E76BA75B86256DB1004E9B07
When choosing a finite measurement method the buffer DAQmx is trying to allocate
might exceed the possible limits of your system.
One option is to override the automatic buffer allocation of like shown in the document linked above.
The second option would be to switch to a continous acquisition.
In both cases you will have to fetch the samples from the memory to make room for the new ones.
Simply use DAQmx Read in a loop and fetch a number of samples resulting in about 100ms to acquire
this number of samples (per channel).
96kS/s --> 960 Samples to read per channel.
Best regards,
Peter
02-11-2014 02:48 PM
I would recommend using the After case and changing the task type to continuous. With the Configure Logging set to just Log, I don't think you can even perform a read. So just put in a wait for as long as you need (probably an event structure with a timeout so you can abort). It is likely that you are setting the buffer size too large. So configure how long to acquire data. Leave the number of samples unwired in the DAQmx Timing. Let it use the default buffer size, which should be more than large enough.
02-11-2014 02:58 PM
Hi crossrulz,
you are right regarding the "Log" setting on the "DAQmx Configure Logging" Function - I didn't notice that.
So please flobsi_1 try just to override the buffer or
switch to the continous sampling option and cancel the task manually after the desired time.
Best regards,
Peter
02-12-2014 01:24 AM
Hi NI_PSI, crossrulz,
thanks for your advice!
I thought the whole advantage of the "Log" setting on the "DAQmx Configure Logging" functions is that all data is directly written on the harddrive without needing a buffer - am I wrong here?
I also thought about a loop, but I wasn't sure about the timestep between two loops. Say I acquire 100ms at 96kS/s, can it be guaranteed that the time step between sample 9600 and 9601 is the same as between let's say 9000 and 9001?
02-12-2014 03:34 AM
Hi flobsi_1,
If the acquisition is done with the hardware's onboard sample clock (default) the samples are taken with constant rate.
As long as you don't stop a task or the desired number of samples has been acquired the clock runs continously.
Best regards,
Peter
02-12-2014 06:45 AM
Hi NI_PSI,
overriding the buffer doesn't solve the problem - I'm still getting the same error code.
I integrated data streaming in a loop as shown here (still not with continuous sampling):
Here in each loop 96 kS are acquired -> 5s measurement time. Is there any better solution? I tried continuous sampling as well, but I didn't figure out a way to stop the "start measurement" vi (streaming is done here)...
02-12-2014 06:57 AM - edited 02-12-2014 06:57 AM
@flobsi_1 wrote:
I thought the whole advantage of the "Log" setting on the "DAQmx Configure Logging" functions is that all data is directly written on the harddrive without needing a buffer - am I wrong here?
The buffer that is being set is the buffer in the card. If you set the buffer size to something larger than the hardware can handle, then you will get an error (the task can't be verified).
Like I said before, use an event structure to time how long you acquire data for. Then you can also use a stop button to cancel.
02-12-2014 08:27 AM
Thanks a lot crossrulz - everything is working now!!!!!!!!!!!