07-12-2010 07:17 PM
Hi,
I'm trying to read digitalized values from a potentiometer connected NI USB-6211. I have the potentiometer's VDD pin connected to port 10 on the ADC, the output pin connected to port 15, and the ground pin connected to port 28. I can see the correct potentiometer output in Signal Express (0-5V).
Now I'm trying to read these output values using C#. I'm trying to use sample code that was installed along with LabView Signal Express - the sample code's name is AcqOneVoltageSample, for reference. The device specified in the code is Dev1/ai0. However, the output values from this sample code is a bit higher than 10V. The same value remains regardless of the position of the potentiometer. It seems that while I can see correct potentiometer output in LabView Signal Express, I can't get the C# API to achieve the same results.
I was wondering if someone could post a simple, short code snipped of how to read voltage values from USB-6211 using C#. Any other tips would be appreciated as well.
07-12-2010 08:01 PM
Not too many C# (or Signal Express) users in the LabVIEW board. Perhaps you should post to the Multfunctio DAQ board
07-13-2010 03:38 PM
Hi daniel2887,
Here is the pinout of your device:
From what you have described you have it set up for a Single ended measurment. You'll want to check this in your code:
That and you will also want to verify in Measurment and Automation Explorer that your device is Dev1.
Regards,