ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous sampling and software timer problem

Hello,
 
I am reading 14 channels at a sample rate of 10kHz continuously with an asynchronous callback(the acquisition may never stop). I send these samples with UDP to an other application. This works fine. The only problem is that this operation takes so much time.
 
I also have a software timer wich checks a digital channel (trigger) every 100ms. If this trigger is high, I have to stop buffering the data to my own made "pretrigger" array. Instead, I have to start buffering the data in an other array so the "pretrigger" samples and the "trigger" samples are seperately buffered. When the trigger is low again (let's say that the pulse width is about 5 seconds), I have to write the two buffers of samples to a file.
 
Like I mentioned before, the acquisition of samples and sending these with UDP is taking very much time. This causes the program not to reach the software timer in time. Thus the buffering action of the "trigger" samples will not start in time.
 
Is there any other way to trigger? I think that the start trigger and pause trigger are not an option, because I don't want to stop the acquisition. Can anyone please help me with this.
 
Thanks in advance,
 
Souza
 
 

Message Edited by Souza on 08-26-2005 03:08 AM

0 Kudos
Message 1 of 3
(2,964 Views)
Would a reference trigger operation accomplish what you need?  You can specify a total number of samples to acquire and a number of pretrigger samples.  With a reference trigger the hardware monitors for a digital pulse.  Once the trigger is received, the posttrigger samples are acquired.

If the number of pretrigger and posttrigger samples you need can be determined ahead of time, then I believe this would work for you.
0 Kudos
Message 2 of 3
(2,931 Views)
Hello jason,
 
I thought that a reference trigger can only be applied with a finite acquisition and not with continuous acquisition. By the way, I solved the problem by using my analog callback as a timer. This works good enough for me.
 
Thanks for your reply
 
Souza
0 Kudos
Message 3 of 3
(2,917 Views)