Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQmx Error -50103 The Specified Resource is Reserved

Hello,

 

I have been using Traditional DAQ for my programs (without errors) and now I am trying to upgrade all the vis to DAQmx (but I keep getting the error mentioned).

 

This is my current setup:

DAQ Card: NI PCI-6023E

 

The program at fault is used to obtain 3 analog inputs (on aio, ai1, and ai2). However our current setup requires that we run an aditional instance of the program that also acquires 3 analog inputs (but on ai3, ai4, and ai6). So we run identical programs with identical code at the same time (only differing in the title of the file name which determines which channels each program is responsible for) Previously, when I was using Traditional DAQ this wasn't an issue, you could open up both programs at the same time and you would have no resource errors.

 

I have read http://digital.ni.com/public.nsf/allkb/485201B647950BF886257537006CEB89?OpenDocument  and I believe I narrowed it down to:

 

"Case 6: Concurrently running two or more analog input or analog output tasks.  This error can also be thrown when a program explicitly calls multiple tasks performing the same type of operation at the same time. As with the other two cases, this produces a situation where multiple independent tasks are concurrently attempting to access the same resource. Even though the tasks might be using different channels, this is still a conflict because they require use of the same analog to digital converter and sample clock. To resolve this issue, combine all operations of the same type into the same task. For DAQmx 7.3 and later, it is possible to do this even with multiple types of analog input if you use multiple DAQmx Create Channel VIs."

 

I am not really sure how to do this when I have to run two programs at the same time (this was the way it was coded originally and I took over the code). Is there a way to setup the Sample Clock vi differently so it doesn't complain if accessed by multiple programs? I also read something about a Convert Clock allowing multiple analog inputs for NI-DAQmx but not sure how to set that up either.

 

Thanks for any suggestions!

0 Kudos
Message 1 of 5
(3,663 Views)

You could have a single program that acquires data from all 6 channels and publish it so that two separate programs would extract just the pertinent channels for their instance. What programming language are you using?

0 Kudos
Message 2 of 5
(3,653 Views)

It's all written in labview.

 

Here is an image of the vi that gets called multiple times by each program (the channels are different for each program)

 

 

 

 

0 Kudos
Message 3 of 5
(3,650 Views)

You can use a single acquisition VI and publish to sharted variables, network streams, etc. If you are running in the development environment, you could use semaphores to prevent the acquisition VI being called simultaneously. This should work since you are starting and stopping the task inside the subVI.

Message 4 of 5
(3,640 Views)

Thanks for the help I'll give these approaches a shot

0 Kudos
Message 5 of 5
(3,637 Views)