We have purchased an NI Card PCI-MIO-16E-50 and managed to create some analog output with it. Now we are trying to read that voltage from AI Channel ACH0 on pin 68.
Our code runs on QNX OS, and has a cycle time of 100milliseconds. We have embedded the aiex1.cpp code into our code without anychange. In each cycle we try to read data from ACH0 but no matter what voltage we give to ACH0, we get a 10digit value.
1. Why is the aiex1.cpp code not working ?
2. How can we modify the aiex1.cpp code in order to function as intended for PCI-MIO-16E-50 ?
What are the exact values that you are getting and how does it compare with the voltage you are trying to measure? Is it possible that uValue is never assigned a value (please step through your code to confirm)?
Since you have already made AO work correctly, you are already aware that aiex1.cpp returns a single raw binary value from the analog to digital converter. I would not expect a value outside of -2048..2047.