Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Building an Analogue input by Garret Hellman

Hi there

I just built my first Analog Input using NI USB 6212 by copying it from Garret Hellman's video tutorial called: "Building an analog input".

The only difference between his VI and mine is that I am feeding an analog voltage to the AI 1 input of my 6212. For that reason, I replaced the Waveform Data (from the Read block of my VI to ID Data Array Display. Could you explain me why when I do run my VI, I am getting a voltage reading of about 5.45V when the actual input voltage is only 1.4 Volts? I am using a single RSE input AI on the device to input this voltage.

 

Thank you for your time......

0 Kudos
Message 1 of 7
(3,667 Views)

If your voltage source is grounded you should use differential instead of RSE terminal configuration.

This could be a reason why you see this offset.

 

 

Christian

0 Kudos
Message 2 of 7
(3,657 Views)

Thanking you for your reply Christian,

 

I have tried all possible configuration of voltage inputs (differential, RSE, NRSE) with the same outcome. May be the following observation would help to resolve this issue:

 

Now, I have gone back to the Garret Hellman's original Tutorial and copied it all without any changes made. When I run this VI, I always get one more extra signal that I am not feeding to my NI 6212 DAQmx!!!

For example, if I specify that I am employing 2 Analog inputs ai0:1, then I get 3 voltages displayed on the wafeform graph and the Data Display. The channels I specify on my DAQ are correct. I also can see that my Wafeform Display that is set to show the names of all individual channels, shows one more signal name called Voltage, while the others

that I specified during the Task creation for my DAQ are called Dev1/ai0, Dev1/ai1. If I increase number of channels to 3 (ai0:2) in my DAQ, then I get 4 signals displayed.

That fourth signal is usually somewhat smaller that the highest voltage that I am applying to the DAQ analogue input (around 4 Volts).

Assuming that this has something to do with creating an Analog read Task I have tried to delete/rename the existing task and create another one. No difference. 

 

When one tries to Create a New Task, the NI Max assistant prompts you to select: Acquire - Analog- Voltage..... As soon as you click on Voltage, this creates a channel/line called "Voltage". After that the NI MAX assistant prompt which channels you would like to specify for your task. So, without even selecting a channel (Dev1/ai0, Dev1/ ai1....so on) the first channel is already created. If I select only one channel Dev/ai0, then I am ending up with 2 channels on my display "Voltage" and Dev/ai1 See pictures attached.

 

Can someone explain why this happens.

Appreciate your time....

Download All
0 Kudos
Message 3 of 7
(3,605 Views)
That diagram does not make much sense. There is no DAQ Assistant. If what you really did was create a task in MAX and then used the DAQmx Create Channel for 3 other channels, then your acquisition is going to have the channels from MAX AND the channels in the VI.
0 Kudos
Message 4 of 7
(3,603 Views)

Thank you for your comment

It appears to be exactly what you think the problem was. The Measurements were doubled in MAX and my VI.  I am new to LabView and started to build my VI by learning from NI site. We always tend to stick to the method that we learnt or understand first. If I stick with my previous VI and remove the task from MAX it doesn't work. Catch 22.

So, could you tell me what do I do if I want to stick to my VI without using the DAQ assistant? I just tried to run it by employing the DAQ Assistant and got one million measurement in my output csv. file that would be hard handle in my next VI which is the one build on Report Development Tool.

 

I am sending you the original as you mentiond that the picture was not clear.

 

Appreciate you time in resolving my little problems as I saw you name on the web site many time resolving not such a trivial problems like mine.

Thank you

0 Kudos
Message 5 of 7
(3,598 Views)

I have no idea what VI you want someone to look at and what 'doesn't work' mean. Neither VI can possibly write one million entries to a file since you don't have a loop so the acquisition can only run once. You wouldn't be doing something as silly as using the run continuous button, would you? That would be wrong but if you did, you would be writing as long as the VI executes. The ICM Test Bench VI has two file writes and that is also silly.

0 Kudos
Message 6 of 7
(3,587 Views)

I worked it all out last night.... It is working as needed. To my inexperienced eye, it look like the MAX gives more flexible options than DAQ, as when you configure in MAX you

can set scaling, triggering, terminal config. RSE, NRSE or Dif. I have not seen that DAQ, but will learn.

Two files. I only organized to figure out which file format is more suitable to remove one later on.

Thank you for your comments Dennis.

0 Kudos
Message 7 of 7
(3,575 Views)