Discussion:
Acquiring two analog channels consecutively. While one is being acquired the second is being processed.
(too old to reply)
aleksandr
2008-08-05 20:40:08 UTC
Permalink
Hi, I need to acquire two different channels consecutively, while using processing time as efficiently as possible.  I want acquisition from channel one to start on a trigger and finish after N samples have been acquired.  On the next trigger acquisition should start from channel two and simultaneously process the already stored channel 1 data.  It should continue acquiring one channel while processing the other.  I've been able to realize consecutive acquisition using a flat sequence and two DAQmx tasks, but that does not seem to be processor efficient.  Execution speed is important here, so I'll need to analyze the acquired data from one channel while the second channel is being acquired, is there a way that I could set this up in Labview?Regards,Aleksandr
Hillman
2008-08-06 11:40:05 UTC
Permalink
Hi Aleksandr
 
A common design technique for acquiring and anaylsising data is to use the master/slave design. Where all the functions that acquire data are in one loop, and functions that require the data are in the other. ( I apologies if you already know this). This is an efficient block diagram because the processor does not waste cycles polling for an event. So this would allow you to efficiently analyze the data from one task as its being acquired.
 
So theres no reason why you can't have two of these running consecutively. Espically if your no worried about synchronization between the two tasks.
 
Is there any reason why you want 'While one is being acquired the second is being processed'?
 
Other things to be processor efficient, remember all loops should contain a small time delay to allow the processor sleep time to complete other tasks, such as windows tasks etc. And a note about sequence structure is there obviously prevent parallelism in labview.
 
thanks
aleksandr
2008-08-06 20:10:04 UTC
Permalink
Hi Hillman, Thank you for the help, I've set it up as you describe and it works well, I was overcomplicating it without a reason.Aleksandr
Hillman
2008-08-07 08:40:20 UTC
Permalink
Hi Aleksandr,
 
Im glad that worked - its my pleasure to help.
 
Thanks for the rating and have a nice day. Message Edited by Hillman on 08-07-2008 09:32 AM
Loading...