diishen
2008-07-16 16:10:12 UTC
Hey guys, First of all, this problem might sound a bit vague because I did not write this code so I am not 100% sure of what the problem really is; for those curious, this program was incomplete and I am picking it up from where the author left it a year ago. This is a modification of the Multi-Function-Ctr Retrigg Pulse Train Generation for AI Sample Clock VI example. I am hooking up a delay generation set at rate of 1000Hz to the BNC-2110. What is changed in the program are the following:-Rate is changed to 1000000 Hz -Samples per channel is changed to 750-Sample clock is changed to Finite Samples-Added number of triggers (N) and regions (R), N*R must be 1000-The program writes a binary .dat file which will be analyzed in MATLAB so the DAQmx Read in the case structure is set to Raw 1D U16-The program must run for a user-defined amount of time, and this is at least 5 minutes, at most 10 minutesSo before I even throw the .dat file into MATLAB for analysis, I already realized that everytime the .dat file has been created, the file size is different which means I am getting different amount of data each time. I suspect that it's the buffer size and/or the DAQmx Read timeout value but I still can't seem to make the file size consistent regardless of how I change it (indicating that more problems will surface when I throw this into my MATLAB code).I've attached both my VI and my MATLAB code (change extension to .m) for those interested. Any suggestions or ideas are greatly appreciated!Message Edited by diishen on 07-16-2008 11:09 AM
dummy1.vi:
http://forums.ni.com/attachments/ni/250/41580/1/dummy1.vi
dummy.txt:
http://forums.ni.com/attachments/ni/250/41580/2/dummy.txt
dummy1.vi:
http://forums.ni.com/attachments/ni/250/41580/1/dummy1.vi
dummy.txt:
http://forums.ni.com/attachments/ni/250/41580/2/dummy.txt