LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

External and onboard sampling in parallel

Solved!
Go to solution
Hello everybody,

I made a simple example to demonstrate what I am trying to achieve but my problem can be summarized with one question: Is it possible to have in parallel one task that samples channel AI0 with the onboard clock and another task that samples channel AI1 with external clock source?

In my application I have 
1) One task measuring lets say pressure or temperature at one channel with the onboard clock
2) One task calculating the frequency of revolutions of incremental sensor (IRC)
3) One task sampling signal from laser probes using the IRC signal as external source

They are supposed to run in parallel

2+3 works perfect but when I add also 1 I get Error -50103 occurred at DAQmx Start Task.vi:1, The specified resource is reserved. The operation could not be completed as specified. Also 1+2 works perfect together. Program attached - it's just fast example.

Thanks a lot
Message Edited by ceties on 07-07-2009 08:26 AM
LV 2011, Win7
0 Kudos
Message 1 of 5
(2,631 Views)
Solution
Accepted by ceties

Trying to create more than one task for AI the same time result in the encountered error message....This is because AI can only have a single sample clock source. Due to device access, this is a prerequisite for a single device. Having more than one DAQ device will enable you to define two different clocks for the two devices.

 

 

hope this helps, 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 5
(2,618 Views)
Hi Norbert and thanks for your fast reply. It's exactly what I was afraid of. So unless I want to buy another device I will have to either a) make the onboard sampling task run and finish first and then do the task with external sampling or b) sample everything with the external clock. I guess there aren't any other options, right?
LV 2011, Win7
0 Kudos
Message 3 of 5
(2,615 Views)

Correct.

But if your external clock is faster than your internal (and constant!), you can sample both channels using the external clock. You might have to reduce the readings from the first channel, which should be sampled using the internal clock....

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 5
(2,613 Views)
Well the problem is that the external clock is IRC TTL signal - thus the sampling rate is not constant if the rpm is not constant...but it doesn't matter. Since I just need to measure aditional temeprature and pressure which don't change very fast I should be fine with sampling all with the external source. Thanks Norbert, I learned something new.
LV 2011, Win7
0 Kudos
Message 5 of 5
(2,608 Views)