06-01-2015 09:05 AM
Now tried to do as the document via 1 Daq Assistant but still not working. (Example simple queue) Any Ideas? with this?
06-01-2015 09:30 AM
06-01-2015 09:42 AM
06-01-2015 11:47 AM
Thank you for your reply! It is very helpful! I have checked the DAQmxCreateAIVoltageChan function and learn how to set the correct configuration. So I think I have solved completely my analog input problem.
To sum up:
1, you need to read in multiple analog input lines at the same time in one single task (e.g. set the line address to Dev1/ai0:1)
2, configure the channel to the correct mode in the DAQmxCreateAIVoltageChan, such as DAQmx_Val_RSE or DAQmx_Val_Diff. Be careful, in the example code "Acq-IntClk" installed with the drive, this mode is set to "DAQmx_Val_Cfg_Default", which means the default mode is used. I strongly adviced not using this mode unless you are sure what is actually going on. Personally I find the result is changing every time even I measure the same constant signal.
3, set the correct size of the data array into which you want to put the acquired data. For example, you are reading 2 lines, each line you want 100 samples, then set this array to data[200] otherwise a buffer error will show up.
Hope this can help the others!