LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with data acquisition from two AI channels (error -50103)

Hello,
 
Although there are some discusions about this topic I couldn't fix my problem. I am able to read and display  the pressure data from a single channel as you can see in singlechannelDAQ.vi. But now I need to read and display the pressure data from the second AI channel. First I thought it could be so easy that I just copy and paste the same code and run it. But the result is error -50103. Then I understood the cause of the problem. (With multiplexed data acquisition boards (E-Series and M-Series), only one analog input and one analog output task can be run at the same time. This is the case because all analog input channels require use of the same channel multiplexer and sample clock.) I found some solutions in this forums and adapted my code (twochanneltry1.vi) but it didn't work as well. There are also some solutions which offer to sample, read the first channel then stop the task and do the same procedure for the second channel. It doesn't suit to me , I think because I acquire the pressure datas in a while loop and it should stop when I press the stop button. I hope I could describe the problem clearly. I also want to display the results in two different graphs. Any help would be highly appreciated.
 
 
Best regards,
 
Ahmet
Download All
0 Kudos
Message 1 of 6
(3,176 Views)
You said you understood the issue with not being able to run multiple tasks but then you created multiple tasks in your two channel example. I'm sure all of the previous discussions said the solution was to define multiple channels with the DAQmx Create Channel.
Message 2 of 6
(3,162 Views)
Use one task!

With this channeld name:


Ton

Message Edited by TonP on 08-06-2007 03:55 PM

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 6
(3,160 Views)

Thanks Dennis Knutson and TonP for your replies.  I couldn't try this code with my DAQ card yet, but I don't expect any problem. It works fine with the simulated signal perfectly and solves my problem. But I have a question. What would be a solution, if I had wanted to configure one AI channel as RSE and the other channel as differential. Now we use differential configuration common for both channels, in this case we couldn't.

Thanks for your concern.

Ahmet

0 Kudos
Message 4 of 6
(3,142 Views)
Make it differential, and connect the (-) of you RSE channel to the analog ground.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 6
(3,133 Views)

If you want different terminal configurations for the channels, then you use separate DAQmx Create Channel functions.

Message Edited by Dennis Knutson on 08-07-2007 05:52 AM

Message 6 of 6
(3,130 Views)