LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating DAQmx task using DAQ Assistant

Hi,

 

I'm trying to acquire two signals, one is a vibration signal from an accelerometer, and another one is a tachometer signal. I'm using the NI cDAQ 9174 chassis. Before running the real thing, I used two signal generators for creating the two signals that I want to acquire. What I did, I connected these two signal generators to an AI module NI 9201 that was placed in the chassis. I used two channels on the same module. On the block diagram of my vi, I used two DAQ assistant Express vi to collect the signals from both generators. When I hit the run button, I received an error message below...


Error 50103 occurred at DAQmx Start Task.vi

NI Platform Services: The specified resource is reserved. The operation could not be completed as specified.

 

I know that the solutions to this error have been posted on ni.com and the discussion forum...but I would like a solution that is specific to my exact case. My knowledge and understanding are quite limited...I read as much as I could, but there are things that I just cannot simply understand, and I ended up confused and don't know what to do.

 

From what I read, I cannot use multiple DAQ Assistant Express VIs to access channels on the same DAQ board...so, how do I create one DAQ Assistant Express VIs that can acquire two signals?

 

I really appreciate those who can help me. I attached a snippet of the vi that caused me to get the error message

 

Thanks.

 

So, my problem is

0 Kudos
Message 1 of 9
(3,283 Views)

Sounds like it's time to graduate from LabVIEW kindergarden.Smiley Wink  The DAQ Assistant can only take you so far.  Look at some of the DAQmx examples and try to code this yourself using the more advanced primitives (oxymoron? Smiley Indifferent).  You'll quickly wonder why you ever bothered with the Express stuff.  Post back if you get stuck.  Ironically, most of us can't help you very much with the DAQ Assistant because we don't ever use it but we can certainly advise you about DAQmx functions.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 2 of 9
(3,273 Views)

You add more than one channel into the list of channels inside the Express VI.  Then the Express VI provides you with a blue wire that contains both signals that you will need to split using the Split Signals vi.

Message 3 of 9
(3,268 Views)

Thanks NIquist...and I wondered why they even bothered creating the Express stuff esp DAQ Assistant when most advanced LabVIEW experts are not using it....I'm going to try to code it...wish me luck

0 Kudos
Message 4 of 9
(3,266 Views)

Thanks Raven...perfect explanation...I will try this right away... 🙂

0 Kudos
Message 5 of 9
(3,260 Views)

NI wants to make LabVIEW even more accessible than it already it is for new users and you can't blame them for that.  Unfortunately it does require a bit of "unlearning" when you progress beyond what you can accomplish with all the wizards.  DAQmx is pretty amazing once you come to terms with the concept of tasks.  A good trick for weaning yourself off of the Assistant is to go as far as you can with it, then convert the Express VI into a front panel.  You can now see and edit what's under the hood in the wizard generated code and take it from there.  I often open the example code that's closest to my application and then modify it to speed up my coding time.  No sense re-inventing the wheel.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 6 of 9
(3,253 Views)

This may not be relevant in your case but FYI, beware that conversion to the Dynamic Data Type results in a loss of timing information that is present in the waveform type.  Ease of use usually comes with a price.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 7 of 9
(3,246 Views)

Hi Raven,

 

I did as what you've explained...the only thing is, after splitting the signal, where should I wired the second output signals on the Split Signal.vi....when I wired them to the same place, a merge signal vi is automatically created (please refer to the snippets)

 

Thanks

Download All
0 Kudos
Message 8 of 9
(3,233 Views)

What do you want to do with each of the channels?  If you want to go to 2 different places, then split them.

 

If you want them to go to the same place like a graph, then don't split them.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 9 of 9
(3,219 Views)