Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx resource problems

Solved!
Go to solution

Hello,

I'm using a cDAQ 9172 with the following modules:

9237 to measure force

9205 to measure another analog in

9263 to output an analog voltage

9472 to control a few relays.

 

I've started with simple program to setup the channels and run but I get the message that one or more resources is in use.

Attached are two pictures. One is of the main VI where I get the error. The second is the subvi that sets up the channels.

 

I only want to have access to one or more of the channels for single point reads/writes in the main loop.

 

Any ideas what I'm doing wrong?

 

Thanks

Download All
0 Kudos
Message 1 of 5
(3,240 Views)
Solution
Accepted by topic author jeff_scharpf

Hi Jeff,

 

The cDAQ-9172 only has one timing engine per subsystem.  You are trying to use the 9237 and 9205 at the same time in separate tasks which causes the reservation error.  The work around is to add both sets of channels to the same task.  Just wire the task output of one create channel into the task input of the other.  Read will return data from both channels.  It sounds like you don't want that but you can always ignore the data you don't care about.

 

Case 6 of this KB describes the issue.

Message 2 of 5
(3,225 Views)

Thanks for the response Mark! I think I understand what you mean. If I wire two create channels together I will get one task, am I correct to assume that when I read the data, it will be an array of those channels?


So I won't need two reads, just one? Does this work the same for output? Can I mix input with output channels into one task?

 

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

You are correct.  You'll have one task and reads will return an array of channel data.  You don't need to call read twice.  You will need to use one of the multi channel reads like Analog 2D DBL (N Chan N Samp) if you aren't already.

 

The same idea works for output.  You can call create channel on multiple analog output channels all in the same task and use an N Channel Write. 

 

Tasks have to contain the channels of the same type.  So a task must be all analog input, analog output, digital input, or digital output channels.  You can't mix and match.

0 Kudos
Message 4 of 5
(3,213 Views)

Excellent Mark thanks you got me on the right track!Smiley Very Happy

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