10-05-2023 12:43 PM
Is there a way to read the output setpoint from each channel of NI 9264? When I first load the C# application, I would like to read the voltages that are currently being generated out of the NI 9264. I tried using the AnalogSingleChannelReader class, but that doesn't seem to work since these are all analog output channels, and not input.
Solved! Go to Solution.
10-05-2023 05:20 PM
Nope, you cannot readback the actual voltage. When you init a DAQmx task, nothing is being generated. You can assume it is at 0V.
Why do you think it is actually generating something?
Please refer to https://www.ni.com/docs/en-US/bundle/ni-daqmx/page/mxcncpts/taskstatemodel.html
10-05-2023 06:52 PM
Running the example program "Generate Voltage Update" from National Instruments, I can set the voltage output of Analog output 0 ("ao0") to 4V and verify that it generates 4V. If I then restart the program, ao0 is still generating 4V, and not 0V. The same is true for any voltage I program.
The problem is, when I restart the program, the software has no way of knowing what the current setpoint is.
10-05-2023 07:03 PM
DAQ Device Continues to Output Voltage or Current After Closing Device Session
How Can I Maintain an Output Voltage After a Task has Stopped on a Dynamic Signal Generator?
Set ExcitationIdleOutputBehavior property to change this behavior.
10-05-2023 09:43 PM
Interesting, thanks of the information! I prefer having the idle output behavior to continue outputting the existing value as it's currently doing. I was just hoping I could read what that existing value is when I load up a new software instance. Any ideas how?
10-06-2023 07:15 AM
Unfortunately, the answer is no. You can store the last output value in a file and read it back when you restart.
Reference: Re: Cannot read back the output from an analog output channel