Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Configure 9401 for buffered input and output

Solved!
Go to solution

I have a compact DAQ (9174) and the 9401 module.  I found the example for configuring the input and outputs separately.  But when I try to apply this to my application, I get the error: 

Device cannot be configured for input or output because lines and/or terminals on this device are in use by another task or route. This operation requires temporarily reserving all lines and terminals for communication, which interferes with the other task or route.

If possible, use DAQmx Control Task to reserve all tasks that use this device before committing any tasks that use this device. Otherwise, uncommit or unreserve the other task or disconnect the other route before attempting to configure the device for input or output.

Device: 9401-0
Digital Port: 0
Lines: 0, 1, 2, 3

Task Name: _unnamedTask<AE>

 

I tried starting with the example that works and just adding the bits and I think it has something to do with either the fact I'm using buffered output for sample clock but not sure.  I found the correlated output example and basically modified that to generate a waveform I need.  That part worked fine.  But when I then tried to use the input, that didn't work out so well.  Attached is the correlated example I tried with line0:3 as output and line7 as input on the 9401 and using the chassis counter as the source. 

 

Is there something with buffered outputs/inputs that won't allow using both at the same time?  or what am I missing?

 

 

0 Kudos
Message 1 of 2
(5,362 Views)
Solution
Accepted by topic author Sir_Mutt

Found my problem.  The RESERVE needs to happen just before the start task.  If trying to change the sample clock or anything after reserve, causes issues.

0 Kudos
Message 2 of 2
(5,342 Views)