08-06-2007 02:27 AM
08-06-2007 04:03 AM
08-06-2007 07:00 PM
Hi Raul,
In your first post, you asked whether it was possible to read back the output value of a digital or analog output. To read back the analog output value you simply need to create and analog input task and use the physical channel: “_ao0_vs_aognd" and/or "_ao1_vs_aognd". This will allow you to check the analog output level without using any physical connections to an analog input. Click here for the developer zone tutorial on how to do this within LabVIEW. You should be able to use the same physical channel names in C#. In regards to your second question, you should be able to read the value of the digital output by simply using the digital read single sample. This all occurs on the same digital output task.
In regards to your second post, the digital output should not reset unless you write a new value to the output. So, simply doing a DigitalSingleChannelReader should not reset the output value. Let me know if this is the case, but it shouldn’t be happening. Based on your second piece of code, you created a new task to read the digital line. You could do this within the same task as created in the first piece of code.
I hope this helps,
Paul C.