LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using two separate DAQmx tasks in one vi

Folks,

I have been told by Labview Technical folks that overlap processing is not possible with the given DAQmx drivers.  My desire is to speed up data acquisition during data capture on a coast down of a motor.  My vi already has a task whose main job is to collect very high resolution data (32,000 lines) over a wide frequency range ( 0-5 kHz).  This gives sufficient resolution to find and identify any peaks which can pinpoint issues with mechanical equipment.  The coast down is a different issue.  I don't need the resolution or the maximum frequency range.  So, if could use another task with a maximum frequency range of 0 - 2kHz and a resolution of 8000 lines.  

Can I call one of the tasks for the standard data acquisition and then call the other task for the coast down?  Are there any issues with resetting the hardware?

Regards,

Ron Brook

 

0 Kudos
Message 1 of 4
(834 Views)

Can you describe this in different words?  I really don't understand your use of terminology like "resolution = 32000 lines of data", or whether your "frequency range" refers to sample rate or to signal bandwidth.

 

Further, if you can keep up with the more demanding needs of the constant-speed portion of acquisition, it seems like it'd be kinda trivial to down-sample in software for the coast down.  What am I missing here?

 

All that said, I'm pretty certain you shouldn't try to approach this by switching between 2 tasks.  Just use one "overqualified" task that doesn't get interrupted.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 4
(823 Views)

@Coryman wrote:

Folks,

I have been told by Labview Technical folks that overlap processing is not possible with the given DAQmx drivers.  My desire is to speed up data acquisition during data capture on a coast down of a motor.  My vi already has a task whose main job is to collect very high resolution data (32,000 lines) over a wide frequency range ( 0-5 kHz).  This gives sufficient resolution to find and identify any peaks which can pinpoint issues with mechanical equipment.  The coast down is a different issue.  I don't need the resolution or the maximum frequency range.  So, if could use another task with a maximum frequency range of 0 - 2kHz and a resolution of 8000 lines.  

Can I call one of the tasks for the standard data acquisition and then call the other task for the coast down?  Are there any issues with resetting the hardware?

Regards,

Ron Brook

 


@Kevin_Price - I believe "Lines" here refer to "bins" in the FFT; to get higher resolution (lines) you need a longer data acquisition time. Sampling Rate will just just change the bandwidth, the resolution is always 1/T.

 

@Coryman - I would use the same Task, just do the following before the Coast down.

  1. Stop the current task
  2. Change the sampling rate
  3. Start the task with new sampling rate.

I assume you are using continuous acquisition, otherwise your previous task will stop automatically. The task's sampling rate can be changed without making a new task. So you can do the same with a finite acquisition.

 

mcduff

0 Kudos
Message 3 of 4
(804 Views)

May I ask an impertinent question?  What are you looking to find in the coast-down data?  Because any particular mechanical phenomena will be continuously passing through all frequencies from their full-speed freq down to 0 during this time.  Things that look like FFT "spikes" at constant speed will tend to get squashed and smeared across the whole spectrum from 0 up to that point.

 

This is admittedly not my field of expertise, but I would think that any useful analysis of the coast-down behavior is going to require something beyond a simple FFT.

 

But even if the FFT ends up being useful, I don't think changing the task is really going to help you much.  The necessary capture time is entirely dictated by your desired frequency *resolution*.  8000 lines over a 2 kHz range is a 0.25 Hz freq resolution.  That requires a 4 second capture time.  Period, end of story.  No matter what your sample rate is (well, as long as it's >= 4 kHz) and no matter what frequency range you can therefore examine.

 

Your steady-state 5 kHz freq range implies a 10 kHz sample rate.  Just let the task keep going during coast down.  Retrieve 4 seconds worth of samples to maintain your desired 0.25 Hz frequency resolution.  Sure, you'll *also* get data for the 2-5 kHz range that doesn't interest you, but that doesn't mean you have to pay attention to it or keep it.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 4
(787 Views)