04-02-2008 05:09 AM
04-03-2008 07:49 AM
Hey Jon,
I have had a brief look at your code, and I think I have solved your saving issue. Please find the attached VI. It will require a bit of tinkering at your end, to fully integrate the new VI into your project, but hopefully it will solve your problems.
You are obviously well versed in LabView, so you will be able to follow the code with ease. I have added a couple of comments to the block diagram, so hopefully that will help further.
One of the major changes is - rather than loading the data froma file you have just created, the program will display the data just before it is saved. This simplifies the code greatly.
Other changes include
- The DAQmx channel is only stopped and started once.
- The number of samples to read per iteration is now defined at the DAQmxRead function. It no longer requires a loop of its own. By varying the number of samples to read, and the sampling rate, you can define how long the program aquires data before saving it.
- You no longer require loop timing. Infact, in the current set up, loop timing would eventually result in a buffer overspill.
I hope this has been of some use to you, and I look forward to hearing how you get on.
Best wishes
Rich
Ps. The attached VI is written in LV8.5. Dont hesitate to let me know if you are using an older version of LabView.