03-15-2017 03:39 AM
Good morning i'm new with DAQmx, until yesterday i used traditional DAQ.
I must to do some readings in a while loop that i stop when i need.
I read single channels.
If in prova 3 esempi i use three subroutine with the same filename it works good, if i change one subroutine with a perfect copy but with file name different, i've got an error 50103 "The specified resource is reserved. The operation could not be completed as specified."
I end my ideas, i need help.
Thank you
03-15-2017 04:01 AM - edited 03-15-2017 04:02 AM
Buongiorno Gigatrek,
you are trying to read 3 channels from one module in your cDAQ chassis - but you are trying to allocate them in 3 different DAQmx tasks: this will not work (with a MUX device) as you have learned by now!
Put those three channels into one task!
(LabVIEW comes with a lot of example VIs, there are also examples showing how to use more than just one channel.)
On your "Prova 3" VI: don't create and kill DAQmx task in each iteration of your loop. This is also explained in the example VIs!
03-23-2017 02:22 AM
I had the problem that i cant' read vith multichannel read and the problem was explained to me by NI support.
The new releases of Labview work in parallel, so if yuo put three single channel read with relative tasks in three row from top to bottom, they go simultaneusly.
I solve the problem using a flat sequence with one single channel red in every flat frame.
Thank you
03-23-2017 04:23 AM
No, you did not solve the problem. You just created a bad workaround using flat sequence structure. This is not a proper way to use DAQmx. You need to specify multi channels in a single task, and read an array using the proper polymorphic instance of the DAQmx Read functions. Did you look at the DAQmx examples?
03-23-2017 05:46 AM - edited 03-23-2017 05:46 AM
GIGATREK wrote: I solve the problem using a flat sequence with one single channel red in every flat frame.
That is a horrible solution. There are many things wrong with your setup. Here is how you should be doing it. Notice we create one task to handle all of the channels. Then we read all of the channels together and do the same math on the arrays. This makes the program a lot more scalable and easier to maintain. And also notice that we have the creation before the main loop and we stop after that loop. This makes life a lot easier on the hardware and the drivers. You will also get better readings faster.
03-23-2017 08:25 AM
Thank you crossrulz for your answer but i wrote that i can't use multiple reading.
Now i know multichannel read and i use it in a subVI but in other i can't.
I need slow reading and the way that i use work perfectly.
Probably if i need speedy reading or waveform analisys, i'm agree with you that the best way to use DAQmx is multiple read.
Best regards