LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with PCI 6040 in reading multiple analog inputs.

i am using PCI-6040 in my appliation. I am required to read 8 analog inputs. I started with reading two analog inputs  (A00 & A01) using two DAQs.I found that only  one of them is reading the input and other just reads 0V always.
 
if i use single step  both DAQ will work properly. Also if i use "Highlight Execution" button then both DAQ work properly. but if i try running it ( without single step and " Highlight execution" ) one of them dont work properly.
 
summary is, if i use two ( or more ) DAQ in same VI is one of them will not work. But if i use only one DAQ in VI, it is working properly. I checked it for both channels .( A00 and A01 )
 
i tried using single DAQ for both inputs. But after configuring for the same if found that DAQ is giving only one output pin.
 
i am new to Labview and i am in need of desparate help
 
please help me
 
thanks in advance..
0 Kudos
Message 1 of 11
(3,339 Views)
There is no way (apart from guessing) to troubleshoot this without looking at a posted vi.



0 Kudos
Message 2 of 11
(3,329 Views)
Hi there,
 
gwd is right. Please attach your VI to your post and we can take a look at it.  Another tip is to try to open and understand a DAQmx example from the NI Example Finder.  One good example for you would be Acq&Graph Voltage-Int Clk.vi under Hardware Input and Output >> DAQmx >> Analog Measurements.  Just change the Physical Channels to your hardware settings (eg. 'Dev1/ai0:1' to test channels AI0 and AI1).  Let me know if you have any other questions
 
Way S.
NI UK Applications Engineer 
0 Kudos
Message 3 of 11
(3,320 Views)

Hi ,

thanks for ur time. Instead of using one DAQ assistant for each channel i used single DAQ assistant to read all 8 channels and extracted the data as an array. After doing this the DAQ was reading the analog inputs properly.

0 Kudos
Message 4 of 11
(3,297 Views)
HI
Pls find the attached VI. When i read all 8 inputs as an array there was no problem. But i want to know why it will not read inputs properly if i used separate "DAQ assistant" for seperate inputs
 
In the attached VI i am reading Channel A0 and A1 using separate "DAQ assistant"
0 Kudos
Message 5 of 11
(3,292 Views)
HI
Pls find the attached VI. When i read all 8 inputs as an array there was no problem. But i want to know why it will not read inputs properly if i used separate "DAQ assistant" for seperate inputs
 
In the attached VI i am reading Channel A0 and A1 using separate "DAQ assistant"
0 Kudos
Message 6 of 11
(3,293 Views)

Hi,

You can only have one input task and one output task configured for a DAQ device at any one time. Each 'DAQ assistant' creates a DAQmx task. So you will not be able to use separate 'DAQ assistants' for different inputs, because doing so effectively creates multiple input tasks. 

Let me know if you have any other questions.

Way S.

NI UK Applications Engineer

0 Kudos
Message 7 of 11
(3,289 Views)
if that is the case. I am using 8 analog output in the same application and i have used 8 separate DAQ for 8 outputs and they are working fine.
 
and the same attached VI works well if " Highlight  execution " button is pressed. Problem occurs only if u run the application.
 
 
0 Kudos
Message 8 of 11
(3,280 Views)


@Shash.jain wrote:
if that is the case. I am using 8 analog output in the same application and i have used 8 separate DAQ for 8 outputs and they are working fine.
 
and the same attached VI works well if " Highlight  execution " button is pressed. Problem occurs only if u run the application.
 
 


Of course hightlight execution works. You are not running both assistants at the same time. I'm sure your other program is enforcing data flow in a way your probably don't understand but they are executing sequentially. Just add all of your channels to the same assistant. There are instructions on how to do it when you start the assistant but all you have to do is hold down the CTL or SHIFT key to select multiple channels. Even if you choose to sequentially start two or more separate assistants, that is a very inefficient method as each time the task for each has to started and stopped.
0 Kudos
Message 9 of 11
(3,277 Views)
Hi
In previous example i connected Error Out of one DAQ to error in of other DAQ to ensure that execution happens sequentially. Now it is working fine.
 
Thanks
0 Kudos
Message 10 of 11
(3,268 Views)