Before you spend too much time debugging your software, make sure the hardware is configured correctly and that the signals are connected correctly. You can do all of this in Measurement & Automation Explorer (MAX). Open up MAX and open a test panel for your particular board. You should be able to successfully acquire data in the test panel to make sure the signals are connected correctly. Then double check the AI configuration to see what mode you are acquiring in (e.g. RSE, NRSE, Differential). Once you are able to successfully acquire data in MAX, then take a look at your code. If you are still having problems, reply back and we can investigate further.