Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

error -50103 occured at DAQmx control

What I am trying to do:

Adquire multiple voltages at the same time (ai0, ai1, aix...) and graph each aix onto its own graph. Attached is my weak attempt at trying to do this I am totally new to labview please help.

 

Error Message

error -50103 occured at DAQmx control

Possible reason(s): The operation could not be completed as specified.The specified reserouce is reserved. The operation could not be completed as specified.

0 Kudos
Message 1 of 7
(8,171 Views)
Oops, forgot to mention. I am using NI PCI-6289
0 Kudos
Message 2 of 7
(8,170 Views)

Hi bzallthetime!  And welcome to the NI Discussion Forums!

 

Reading from multiple channels is one of the most common things to do, and is quite easy once you know the basics.  Rather than having two different DAQ Assistant VIs, you can just use one to read both channels.  In fact, only VI can be talking to your device at a time, which is why you were getting resources reserved.  The first DAQ Assist was trying to read from your card, so the physical resource (the card) was reserved and the second DAQ Assist could not access it.  [You can have one DAQ Assistant per type of task: Analog Input, Analog Output, Counter In, Counter Out, Digital In, Digital Out]

 

 

To have one DAQ Assistant read both (or more) channels at a time, double click on DAQ Assistant and hit the plus sign to add another voltage channel.   Then select what channel(s) you want to add.  Note you can add multiple channels at a time by holding CTRL or SHIFT when you select channels. (CTRL selects/deselects one channel at a time, SHIFT selects every channel between your first click and your second click)

 

DAQ Assistant.jpg  Add Channels.jpg

 

Once you have this, the output from the DAQ Assistant will be one wire with multiple signals.  This can be plotted directly to a waveform graph or chart (all plots on one) or you can split the signal into the multiple parts and have only one signal per graph/chart.

  

I highly recommend checking out Getting Started with NI-DAQmx: Basic Programming with NI-DAQmx which has a lot of great examples and tutorials of how to get started with DAQmx programming.  Then there is the motherload, the NI Example finder.  From LabVIEW go to Help » Find Examples. This has a list of so many great examples which come bundled with the DAQmx drivers.  They do use the more advanced DAQmx VIs, rather than the DAQ Assistant, but are really great learning tools.  The section you would be interested in right now is Hardware Input and Output » DAQmx » Analog Measurements » Voltage.  I especially recommend the example Cont Acq&Graph Voltage-Int Clk.vi. When you select the drop down for the Physical Channel, you can click Browse and select multiple channels to acquire at once, as well.

 

The attached VI uses the DAQ Assistant to do voltage acquisition on two channels, and plots them both on one graph as well as both on its own graph. Take a look at it and post back if you have any questions.

Eric S.
AE Specialist | Global Support
National Instruments
Message 3 of 7
(8,160 Views)
And I just saw that your VI was LabVIEW 8.2.  Sorry I uploaded mine for LabVIEW 2009.  Here's the file again in 8.2.
Eric S.
AE Specialist | Global Support
National Instruments
0 Kudos
Message 4 of 7
(8,155 Views)

Eric,

 

I have a PCI-6229  32 AI  I want 2 VIs to run simultaneously, each collecting AI on

separate lines.  One on AI0-AI15, the other on AI16-AI31

 

You say that with DAQ assistant this is not possible (as I have learned with error -50103).

 

Also, http://digital.ni.com/public.nsf/allkb/485201B647950BF886257537006CEB89

says "It is not possible to have multiple DAQmx tasks attempting to access the same physical device."

 

Please clear up this for me. Does this mean only DAQ assistant, or only DAQ Express or only

DAQmx?  Or does it mean ALL data acq in LabVIEW to the board?

 

I know there are other ways to do what I want, but I just thought I'd ask.

 

THX,

JIM

 

0 Kudos
Message 5 of 7
(6,951 Views)

Hi Eric,

 

Unfortunately, you cannot simultaneously open more than one communication session with the same device. This includes any kind of data acquisition.

 

Is there a reason why you do not run one VI that acquires the data then transfers the measurements to another two VI's?

Tarek B
Applications Engineer
National Instruments
0 Kudos
Message 6 of 7
(6,939 Views)
Thx. I'm doing exactly that. Jim
0 Kudos
Message 7 of 7
(6,935 Views)