Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Read value of Analog Output Pin in C#

Hi!

 

I'm controlling an analog output pin on my National Instruments PCI-6229 card from my C# application via DAQmx. 

 

On application start, I need to determine the current value of this output pin (a value that was set earlier).

 

I'm developing using Visual Studio 2010 and DAQmx, but without Measurement Studio.

 

I've found this solution via Google:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kGDISA2&l=en-US

 

But unfortunately, it is only described for LabView and LabWindows/CVI.

 

How can I read the actual value of an Analog Output pin in C# using just the DAQmx driver?

 

Thanks and best regards

Joerg

0 Kudos
Message 1 of 7
(6,009 Views)

Hi,

 

This example illustrates how to perform an analog output on multiple channels with in a single task in C# using NI-DAQmx

Continuous Analog Output on Multiple Channels with C# 

0 Kudos
Message 2 of 7
(5,999 Views)

Hi

 

For more information please go to the NI-DAQ™ Function Reference Manual for PC Compatibles

https://www.ni.com/docs/en-US/bundle/371644a/resource/371644a.pdf

 

Appendix B >> Valid Internal Analog Input Channels

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

 

Loopback Test

 

 

E Series, M Series, and X Series Internal Loopback Test

 

 

I hope this will help

Kind regards,

 

 

0 Kudos
Message 4 of 7
(5,996 Views)

Thanks for your help!

 

I tried to follow the instructions in the linked document "E Series, M Series, and X Series Internal Loopback Test".

 

Unfortunately, the internal connections don't show up in the channel name combo box in the test panel for analog input.

 

This is no surprise, since it says at the bottom of the page:

"In order to see this channel you must change the I/O filtering of this control.  For instructions on how to do this, see: How Do I Specify the Self-Test Channels in My NI-DAQmx VI? "

 

But this link again leads me to a page describing things in LabView. I don't have LabView installed. How can I enabled the internal loopback channels in C#?

 

While reading the analog output via loopback to analog input would work fine for me, I actually don't really need a loopback. All I want to know is to wich value the analog output was set before my own program starts. Sure the interface card "knows" which value is currently put out on the analog output. Is there really no way of having the interface card telling me what's the currently set value on the analog output?

 

Thanks a lot and best regards,

Joerg

0 Kudos
Message 5 of 7
(5,962 Views)

Hello.

 

Anyone...

 

Does anyone know if it can be done?

 

Does anyone know how to do it?

 

@Joerg: did you figure it out?

 

0 Kudos
Message 6 of 7
(5,809 Views)

Hi everyone, did you solve this problem? Provided links have no info on this question.

0 Kudos
Message 7 of 7
(5,425 Views)