LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get data from two channel in Labview 7

Any body out there, I'm a beginner.
I have DAQCard-AI-16XE-50 on window XP. Trying to read pressure data from two channel. But do no how to do it. Anybody out there who can assist me please?
0 Kudos
Message 1 of 10
(3,590 Views)
Hi,
The easiest way out for you right away is go to Labview7/examples and see some hardware DAQ examples which can help you right away,if you cant get any help , reply again we shall send you a example.
vicky
0 Kudos
Message 2 of 10
(3,589 Views)
Hi Bale,

Your best place to start would be the shipping examples. In LabVIEW go to Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage. This folder has examples that will allow you to acquire the voltage from your pressure transducers. Start with the example called "Cont Acq&Graph Voltage-Int Clk.vi" This program will continuously input the voltage from your pressur sensor. Make sure you put in the correct min and max voltages that your pressure sensor is sending for accuracy (especially if those signals are in the millivolt range).

Since you are using two pressure sensors, you will need to set up the program to take data from two channels. Put the pressure sensors on analog input channels 0 and 1
of your DAQCard. Under "Physical Channel" select "Dev1/ai0." This will acquire data from device 1, analog input 0. To acquire from multiple channels type "Dev1/ai0:1" This wil take data from channels 0 through 1.
0 Kudos
Message 3 of 10
(3,589 Views)
Hi Salvador
Thank you for your concern. But unfortunately I'm not using DAQmx, As you know the device I have (DAQCard-AI-16XE-50) is not compatible with DAQmx.
Could you help me on this problem, if I'm using Traditional DAQ.
Thank you in advance.
0 Kudos
Message 4 of 10
(3,589 Views)
hi,
You can find examples in this folder of your comp.
C:\Program Files\National Instruments\LabVIEW 7.1\examples\daq\anlog_io for all your problems in daq.
vicky
0 Kudos
Message 5 of 10
(3,589 Views)
Hi Bale-suk,

Sorry for the confusion! However, we do have an example that will do the exact same thing written in traditional DAQ.

In LabVIEW go to Help >> Find Examples >> Hardware Input and Output >> Traditional DAQ >> Analog Input >> General >> Cont Acq&Graph (buffered).vi.

Enter both of your channels in the "channels" array. You will have to add channel 0 in index 0, then hit the arrow to see index 1 and enter channel 1.

Again, if your sensor is providing voltage in the millivolt rante, enter that in the "input limits" for each channel (scroll through index to input for each channel).
0 Kudos
Message 6 of 10
(3,589 Views)
Oh! Thanks so much Dear Salvador.
It is a lot for a beginner like me.
I thank you for the guide you provided me.
...
If you don't mind would you assist me again.
Here is the problem.
I'm trying to measure pressure with the two channel, I have two pressure tranducers connected to each channel. The result that i got is interms of voltage. How can I get a pressure result, or where can I go to calibrate the tranducers.
A lot of thanks in advance for the help.

Cheers!
0 Kudos
Message 7 of 10
(3,589 Views)
Hello Bale-suk,

To convert the voltage you are reading into a pressure reading, you will need to scale the voltages according your sensor's specifications.

To do this, you have two options: Set up a custom scale in Measurement and Automation Explorer (MAX) or perform you scaling in your LabVIEW Application.
In MAX, right click on Data Neighborhood and select Create New... Then select Traditional NI-DAQ Virtual Channel and follow the channel wizard to set up you virtual channel. You will probably want to set this channel up as an Analog Input Voltage measurement. Select New Custom Scale when asked to "Define the Signal's Scaling." Enter the scale information from your transducer's specifications. Now, in LabVIEW, you c
an enter the virtual channel name, rather than the channel number, and the scaling will be done automatically.

To scale your voltage to pressure in LabVIEW, you would just have to make use of the Numeric Arithmetic functions to scale each value as it is read in. For example, if your voltage transducer measures 1.5 PSI/mV, then a voltage measurement of 2 mV would correspond to a pressure measurement of 2 mV * 1.5 PSI/mV = 3 PSI.

Let me know if you have further questions.

Sincerely,
Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 8 of 10
(3,589 Views)
Dear Salvador
As you have guided me I was using Cont Acq&Graph (buffered).vi from the example that is available in LabView.
As you have mentioned in the previous explanation I did enter the two channel that I want to read. But unfortunately error has occured, that says I'm trying to wire 2D array in to 1D array, and the help menu guided me to use Build array, and it doesn't work.
I have attached the VI I tried to use to read from two channel.
Could you teach me where I luck the knowledge of fixing my problem

Thank you for your unlimited help.
0 Kudos
Message 9 of 10
(3,579 Views)
Hi Bale-Suk,

What you did was accidentally change the dimension of the channel array. You changed it from a 1D to a 2D array by pulling down the array index to give the array another dimension. To view more channels in the array, pull down the channels. The attatched picture will help:
0 Kudos
Message 10 of 10
(3,564 Views)