Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

two tasks (two channels) for one device.

Hello All,

I am trying to get voltage and temperature from one device (6015/BNC) at the same time. Using MAX I can do that. But when I use C, it seems I always get error 50103 "specified resource is reserved". Here is part of my code:







I have read some posts here. It seems impossible to create two tasks for one device at the same time. Then I wonder how MAX can do this? I guess that actually it creates two voltage channels, but converts automatically the voltage of thermocouple channel to Temperature? Are there anything I am missing? What is best way to measure both voltage and temperature (by thermocouple) at the same time?

Thanks a lot.


Message Edited by SiPHER on 03-03-2006 01:14 PM

0 Kudos
Message 1 of 9
I think you should be able to create the global channels (one temperature and one voltage) in MAX first, then create a single analog input task using both channels in your application.  I'm not sure of the C calls but in LabVIEW the VI I would use is "DAQmx Create" and specifiy the two channels that I made in MAX as inputs.
I hope this is somewhat useful.
0 Kudos
Message 2 of 9

Hi Sipher,

You can only have one analog input task at a time on a DAQ device. However, you can have multiple channels with multiple configurations in a single task. I recommend following the advice given earlier: set up the task in MAX with your different channels, then call DAQmxLoadTask in your code.

Michael P
National Instruments
0 Kudos
Message 3 of 9
Michael and Jon, Thanks for your help. I was thinking how I can follow Jon's advice without LabView. From Michael's answer I see "DAQmxLoadTask" can do the job. Thanks for help. I will try this way. Sorry I do not have any experience about this. If I want to run DAQmxLoadTask to get a task from MAX, does it mean I should always keep MAX running at background? Or I should tell C where to find the saved task at MAX folder? Thanks. sipher

Message Edited by SiPHER on 03-06-2006 02:32 PM

0 Kudos
Message 4 of 9
Hi Sipher,
No, you don't need to have MAX open to use a task. Just make sure you save whatever changes you make to a task in MAX before using them in your code. All you need to tell C is the name of the task (a string value) -- in DAQmxLoadTask.
Michael P
National Instruments
0 Kudos
Message 5 of 9
Hi there,

I've got the same problem using diadem 9.1 (9.10.2036), daqmx 8.0 (8.0.0f0) with other hardware:
M-Serie PXI-6229 with PXI-8184 connected to a SC-2345.

When I create some channels, they're working properly in MAX 4.0 (, but in DIAdem I get the error message:
"... -50103 specified resource is reserved... " (only when at least 2 channels are selected; one single channel works!)

I really hope, that someone can tell me what's wrong, or what I've done wrong.

Thanks in advance!

Kind regards,

Matthias Urban
0 Kudos
Message 6 of 9

Put both channels in a DAQmx Task. Then you can read from the task and both channels will be read together. Also, make sure that you close the test panels window in MAX before using the device in DIAdem. Basically, make sure that nothing else on your computer is using the hardware before trying to use it. This includes making sure that you clear the DAQmx Task when you are finished with it, so the resource will not be reserved anymore.
Michael P
National Instruments
0 Kudos
Message 7 of 9

thanks for your reply, but as far as I know DIAdem can't read DAQmx-Tasks...
No other hardware is accessing the two Global channels.
The same configuration worked on the same system measuring 15 channels, but yet after DIAdem reinstallation it doesn't work not even with 2 channels. There must be a driver problem!? (DAQmx 8.0 is installed)

Matthias U.

0 Kudos
Message 8 of 9
Now it works!!! Smiley Happy
Reinstalling MAX and DAQmx8.0 and "deleting" the Hardware (PXI 6229 and SC2345) in MAX and configuring all again helped.

For the future I'd really appreciate more (DAQ-)support for DIAdem-DAC functions:
DIAdem is a very handy all-in-one-tool for measuring, online viewing, and saving the data, without using labview!
Thus I hope it will not be downgraded to only a viewing and documentation tool in future!!!

In my case more than 90% of measuring are simple and slow (max 100Hz) multichannel measurements of temperatures, pressure and Voltage Inputs. With DIAdem (for me) it normally took 5 minutes to configure everything necassary and get a ready to run (and save) measurement.
In LabVIEW you have to be experienced and it get's even more complicated the more different channels you need (i.e. 10 CAN Messages with different scales + 16 Analog Inputs). In my case I've not the time to configure for hours to get ready to measure 4 different temperatures "J", "K" (i.e. with the USB-Module).
Of course LabVIEW has it's advantages (and I use it too) in flexibility - nearly everything seems possibly ... but this takes time...

Finally I hope DIAdem as a "Data-Logging-Tool" will get the same importance like LabVIEW in the future.


0 Kudos
Message 9 of 9