01-30-2010 04:17 PM
Hi,
Recently I changed a series of Case Structures into a more efficient Event Structure. However, I am no longer able to acquire voltage signals from 4 Analog Input terminals (NI-USB6251) with DAQmx Read and store them as a TDMS files. The code responsible for this is in Task 8 ("Start Current Scan") of the Event Structure of the code attached.
At first I thought I was calculating the "timeout" or "number of samples per ch" incorrectly. However, even when I set them to contant, large values DAQmx Read does not seem to run and upon stopping the program the TDMS File Viewer is empty. One thing I did change was moving TDMS Close into the Event Structure when it used to be outside of the large while loop previously. Could this be causing me trouble?
Alfredo
Solved! Go to Solution.
02-01-2010 05:19 PM
Hello Alfredo,
You sure do have a lot of code here. When you close the TDMS reference in your loop, the next loop iteration will have an invalid reference and so nothing will be written to file. Make sure to always close your references outside of your loops.