Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR: DAQmx.DaqException: The specified resource is reserved. The operation could not be completed as specified.

Hi!

I have the following error at this line:
 
......Task.Start();
 
 

NationalInstruments.DAQmx.DaqException: The specified resource is reserved. The operation could not be completed as specified.

 

Task Name: _unnamedTask<8>

Status Code: -50103

at a(tCaseInsensitiveBasicString<unsigned short,_STL::char_traits<unsigned short>,_STL::allocator<unsigned short>,nNIDMXS100::tLocaleConsideringWideStringComparitor,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* , tStatus2* )

at a(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* , tTask* )

at NationalInstruments.DAQmx.Task.Control(TaskAction mode)

at NationalInstruments.DAQmx.Task.Start()

 

why is this possible? Maybe is the same task starting twice, or another tasks from other AI 's are making this error?
Please reply!
THANKS!

0 Kudos
Message 1 of 26
(25,063 Views)
hello klaus,

basically it is only possible to use a ressource of a board at one time. this means, that you can have one AI task, one AO task, one digital task and one for counter/timer in one program running. if you have another AI task in this program, then you receive the error you posted.

if you want to acquire more channels, you have to put them into the same task.

regards,
robert h
National Instruments
0 Kudos
Message 2 of 26
(25,053 Views)

thanks a lot!

Do I have any quality problems, if I fit tasks together to one, and send one? how can I do this?
Yours, Klaus

Message Edited by klaus11 on 08-02-2005 07:30 AM

0 Kudos
Message 3 of 26
(25,052 Views)
hello klaus,

you don't have qualitiy problems. it is the only possible way to use one ressource with more channels.

to add more channels to a task, modify the channel string, i.e. if it was originally "Dev1/ai0" set it to "Dev1/ai0:3" to use the first 4 channels.
you can specify channels as follows (taken from the DAQ help file):

Physical Channel Ranges
To specify a range of physical channels, use a colon between two channel numbers or two physical channel names:

Dev0/ai0:4
Dev0/ai0:Dev0/ai4

For digital I/O, you can specify a range of ports with a colon between two port numbers:

Dev0/port0:1

You also can specify a range of lines:

Dev0/port0/line0:4
Dev0/line0:31

You can specify channel ranges in reverse order:

Dev0/ai4:0
Dev0/ai4:Dev0/ai0
Dev0/port1/line3:0

Physical Channel Lists
Use commas to separate physical channel names and ranges in a list as follows:

Dev0/ai0, Dev1/ai0:3, Dev1/ai6
Dev0/port0, Dev0/port1/line0:2

regards,

roberth
National Instruments
Message 4 of 26
(25,043 Views)
Hello!

Thanks a lot for the help! Just a single question for the end:
How is it possible to read a single specific voltage from an AI, which I need from maybe task ai3 if I took three tasks togehter?
How can I just read all together?

Yours, Klaus from Austria
0 Kudos
Message 5 of 26
(25,041 Views)
hello klaus,

the read function, which returns more than one channels should return a dataarray. there you must index the value, of the channel, you want to read.

regards,
robert h
National Instrument
0 Kudos
Message 6 of 26
(25,018 Views)

Robert,

I have a similar case.

I use NI cDAQ-9172. I have different kind of modules. Currently I am testing with NI 9203 (Analog Current Input) and NI 9211 (Thermocouple Intput). I try to use separate task for each module, but I got the error. As you say I should combine all of the physical channel to 1 task. But how can I create different type of task for different type of signal (Voltage, Current, Temp)? Because each type of signal require using different setup for create task VI.

Waiting for your help.

Thang Nguyen

0 Kudos
Message 7 of 26
(24,210 Views)

Hi Thang,

I don’t know which environment you are in, but assuming you’re in LabVIEW you can just insert another DAQmx Create Channel VI and choose a different measurement type. I’ve attached a screenshot where I’ve done this. I started with the shipping example Cont Acq&Graph Voltage-Int Clk.vi and simply added the mentioned VI from a similar current measurement example.


Just make sure that you choose different Physical Channels for the different measurement types. (i.e. voltage on ai0 and current on ai1.)

P.S. You will typically get replies more quickly if you create a new thread (because some users only search for new threads and there’s less to read) for a new issue.



Message Edited by Mark E on 02-26-2008 05:43 PM
Mark E.
Precision DC Product Support Engineer
National Instruments

0 Kudos
Message 8 of 26
(24,185 Views)
Dear Robert,

you said "you can have one AI task, one AO task, one digital task and one for counter/timer in one program running. if you have another AI task in this program, then you receive the error you posted".

Suppose I have three sensors: 2 accelerometers, 1 displacement sensor for wall fissures measurement. So, I have 3 analog inputs (AI). I am compelled to group them within the same task, right? I guess I cannot create 1 task for the 2 accelerometers and 1 for the other sensor since all of them are AI.

My doubt is: am I compelled also to sample all of the 3 AI's with the same sampling rate? Is there the possibility of setting different sample rates for signals belonging to the SAME task? e.g.: accelerometer A and B are sampled at 8000Hz, displacement sensor at 10Hz.

Is this possible or do I have to use 8000Hz for all of the 3 sensors?

Thanks in advance.
0 Kudos
Message 9 of 26
(24,172 Views)

Ale83,

Through my research, I found that we can have only one rate for all of channels. You should select the highest rate for all channels, then using different delay for different output result, then we can get the result with different reate.

Please confirm this Robert.

Thank you.

 

0 Kudos
Message 10 of 26
(24,169 Views)