Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

two analog input- measurements simultaneously

Hi there,
 
I'm trying to continuously read two analog-input lines simultaneously but I get an error!
 
Can anyone help me please?
 
Kind regards Peter
0 Kudos
Message 1 of 8
(4,649 Views)
okay, I think I've fixed my bug now. I didn't know how to select more than one line.  Now I've selected Dev1/ai0:Dev1:ai4   . That means, that I read 5 analog lines at the same time, does it? That's why I must get a 1-dimensional array of waveform... and with "index array" I can seperate them.
 
The problem is:
 
If I activate a digital line and wire the line with one of the 5 analog inputs, each graph changes the state alltough only one of the 5 lines is high.
 
Can someone help me please?
 
Kind regards Peter
Download All
0 Kudos
Message 2 of 8
(4,647 Views)
this is the right attachement ... sorry
0 Kudos
Message 3 of 8
(4,643 Views)

The VI looks ok, maybe it has something to do with your external connections? I guess you have connected your digital outputs to your analog inputs? How exactly does your connection llok like? Which value do you set for your digital output port, and what exactly do you see on your analog inputs? Do they switch to +5Volts , or do you see a peak? Maybe a screenshot of your results would help.

 

0 Kudos
Message 4 of 8
(4,608 Views)
Hello Andre,
thanks for you reply!
 
I wired analog-input 0 with digital-output 0 and  digital-gnd with analog-gnd.
 
kind regards peter
 
ps: yesterday the signal was exactly a line, but now... !?
0 Kudos
Message 5 of 8
(4,604 Views)
First of all, it depends on your input terminal configuration, which pins you have to connect. As it is in your VI, you havent´connected the input at the DAQmx Create Channel.vi, so it will use the default configuration which is "differential mode" for E- and M-series boards. This means that you have to connect the ground to channel x+8. So if you measure channel 0, you have to connect the ground to channel 8, not to the analog ground.
 
So now you have to options:
1. Leave the VI as it is, and connect the digital ground to channel 8,9,10,11 and 12
2. Leave your connections as they are, and change the input terminal configuration to "Referenced single ended"
 
Second thing is, that you should connect a signal to all analog inputs (so digital output 0 to analog output 0, digital output 1 to output 1 and so on). If one of the analog inputs has no connection, it is not defined which signal it will show.
 
Hope this helps!
 
Message 6 of 8
(4,582 Views)
hi andre,
 
thank you very much, now it works. I've change the input terminal configuration to "RSE" and wired 5 different signals to each analog-input and it works :).
 
But when I wire only one input, for exampl ain-0, the other graphs show the same signal until I wire them with ground or a different signal. Can I avoid this?
 
kind regards peter
0 Kudos
Message 7 of 8
(4,542 Views)
sorry, I'm a donkey 🙂

I haven't understood/reognized the last phrase in your reply, but you've answered my second question too!

Now I'm a lucky fellow!!

Thank you very much for your patience, I don't know what I would have done without this great forum!!!

Kind regards Peter
Message 8 of 8
(4,538 Views)