We have written a value (2v) to an output channel AO1 and was verified the value in hardware (voltmeter). The channel AO1 is wired to the input channel AI3. But when we read the value of AI3, we do not get the value that we have writtem. We have tried the behavior with and without a triggering source. In both cases, we did not get the value written to AO1, when reading from AI3.
The C++ code used for Analog value reading and writing is given below. Is there any issue with the below code?
Sometimes this kind of thing is due to a mismatch between the terminal configuration (RSE, NRSE, differential) and the physical wiring. You can use test panels in MAX to experiment with the configuration, and here's a summary about the recommended physical wiring. (The classic, more thorough article can be found here.)