Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx - error 50202

Solved!
Go to solution

I'm using an application which is based on the vi shown below (after):

tdms_logging

 

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!

 

 

0 Kudos
Message 1 of 9
(5,607 Views)

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

 

 

 

0 Kudos
Message 2 of 9
(5,524 Views)

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.


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 3 of 9
(5,520 Views)

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

0 Kudos
Message 4 of 9
(5,517 Views)

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?

0 Kudos
Message 5 of 9
(5,501 Views)

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

0 Kudos
Message 6 of 9
(5,493 Views)

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):

loop.png

 

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)...

0 Kudos
Message 7 of 9
(5,485 Views)
Solution
Accepted by topic author flobsi_1

@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.


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 8 of 9
(5,483 Views)

Thanks a lot crossrulz - everything is working now!!!!!!!!!!!

0 Kudos
Message 9 of 9
(5,474 Views)