Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with DAQ MX with USB-6009

Solved!
Go to solution

Hey guys, I would be pleasure if any of you can help me!

 

I want measure the voltages of a place, and it was working fine, but now I want to measure the temperature from the room too.. and that's my problem.

When I put 2 DAQ virtual channels it won't work, I receive an error when I tryed to read the Voltage and the Temperature.

 

Error -50103 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).vi:1

 

Possible reason(s):

The specified resource is reserved. The operation could not be completed as specified.

Task Name: _unnamedTask<17C>

 

If I click on continue, I receive the same error again and again and again...

Can any one help me on that?

 

How can I measure more than one thing with DAQ MX?

Because if I measure only one thing it works, but when I try 2 or more it crash.

 

I will upload the vi's and one image with the code!

 

Thanks

0 Kudos
Message 1 of 11
(4,409 Views)

This is an extremely common error that beginners make and you would certainly found numerous posts if you had searched the forum for the error code.

 

To answer one more time, you cannot have more than one task running at a time for a single hardware resource (in this case, analog input). Just use a single task with multiple channels like you already have. You just need to wire the DAQmx Create channel for the thermistor into the task you created for the voltage measurements.

0 Kudos
Message 2 of 11
(4,406 Views)

Ok Dennis, I'm sorry but I tryed to search at forum but not with the error, but with DAQMX... so I couldn't find....

Thanks for the help, Now I understand but now I'm receiving a new error... When the program is measuring the temperature I receive that error:

 

Error -200479 occurred at DAQmx Create Channel (AI-Temperature-Thermistor-Iex).vi:1

Possible reason(s):

Measurements: Specified operation cannot be performed while the task is running.

Task Name: _unnamedTask<223>

 

I ready at forum that I have to put the Start Task out of the while loop, but how can I do that?

My entire program is in a while loop

because I´m measuring in a place and i want to read this values via tcp/ip

so I didn't know how can I put the Start task out of the while loop =/

 

Only if I can put the entire DAQMX virtual channel out from the loop, it will work?

because I want to measure from one to one second!

 

Any help here?

 

Thanks

Message Edited by EduU on 09-30-2009 10:12 AM
Message Edited by EduU on 09-30-2009 10:14 AM
0 Kudos
Message 3 of 11
(4,400 Views)

Your error does not require you to move anything. If you want the best performance, you should move it outside the loop and all you have to do is move the functions. It's just a matter of clicking and dragging. Why can't you do that?

 

 

 

 

 

Message Edited by Dennis Knutson on 09-30-2009 10:13 AM
0 Kudos
Message 4 of 11
(4,388 Views)

Thanks Dennis, I did what you said....

But now I have one more problem, When I tryed read the temperature at DAQmx read 1D waveform

I received this error:

 

Error -200429 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).vi:1

 

Possible reason(s):

Measurements: Value passed to the Task/Channels In control is an empty string (or I/O control).

The value must refer to a valid task or valid channels.

 

Why this is happen? I know I'm a begginer and I'm doing my best...

I will make the LABview course, basic I & II at the end of this year at my vacation

I upload the VI again and a new picture!

 

Thanks

Download All
0 Kudos
Message 5 of 11
(4,380 Views)
Use ONE DAQmx Read. You've got a single task and all of the data from all channels is going to be returned with a single read. You will obviously have to change how the array is indexed.
0 Kudos
Message 6 of 11
(4,373 Views)

Ok I understood that I can only use 1 DAQmx Read

But how can i change the array? I don't know how to do that....

Could you upload a image for me?

or a new VI so I can see what are you talking about!

 

Thanks Dennis

0 Kudos
Message 7 of 11
(4,368 Views)
You are already doing an Index Array in the code. Did someone else write that? That's all you need to do to get the temperature data for a separate graph.
0 Kudos
Message 8 of 11
(4,361 Views)

Yes, I know I have a index array at my code. 

well I didn't understand what are u saying with "someone else write that"

I upload the VI in my last post..... 

I have an output from first read that is a 2D waveform Nsamples N channels

and to temperature I need a 1D waveforme N samples N channels

 

and I didn't know how to do that...

I think if you fix that and send me a picture

i will understand much better!

 

Thanks Dennis and sorry for my poor english!

0 Kudos
Message 9 of 11
(4,332 Views)
Solution
Accepted by EduU

You would do something like this. I really don't remember if the data is sorted by column or rows when you return a 2D array. This is for the temp data in the last column. If it's sorted by rows, then wire the '7' into the row input of the Index Array. Or, move the Index Array to before the Transpose Array.

 

You may want to use the Delete From Array function to remove the temp data before you pass it to the for loop. That's up to you. The for loop you have is also constructed badly. Make use of the Auto-Index feature of a for loop and you don't need to wire up the for loop's 'N' terminal and can eliminate the Index Array function inside the for loop.

 

Spend some time and take the LabVIEW tutorials and look at the shipping examples to get an idea of how for loops work and options for Indexing Arrays.

 

Get Temp Data.PNG

0 Kudos
Message 10 of 11
(4,327 Views)