LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading digitalized potentiometer values from NI USB-6211 using C#

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.

0 Kudos
Message 1 of 3
(4,459 Views)

Not too many C# (or Signal Express) users in the LabVIEW board. Perhaps you should post to the Multfunctio DAQ board

0 Kudos
Message 2 of 3
(4,454 Views)

Hi daniel2887,

 

Here is the pinout of your device:

 

18785i70BB52370AC0AD5F

From what you have described you have it set up for a Single ended measurment. You'll want to check this in your code:

 

18795i41C26A7A279F0C65

That and you will also want to verify in Measurment and Automation Explorer that your device is Dev1.

 

Regards,

 

Dustin D

0 Kudos
Message 3 of 3
(4,431 Views)