09-30-2009 09:27 AM
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
Solved! Go to Solution.
09-30-2009 09:38 AM
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.
09-30-2009 10:07 AM - edited 09-30-2009 10:14 AM
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
09-30-2009 11:11 AM - edited 09-30-2009 11:13 AM
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?
09-30-2009 12:01 PM
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
09-30-2009 12:25 PM
09-30-2009 12:40 PM
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
09-30-2009 01:19 PM
09-30-2009 03:42 PM
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!
09-30-2009 04:29 PM
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.