Hello, has anyone had problems with using the "Resample Waveform (single shot).vi" for multiple waveforms on an RT system?
I've written a data logger that buffers data at 1 kHz, and then resamples that based on whatever sampling frequency the user has selected before saving to file. The user has the option of selecting 2 different sampling frequencies, so we have a second copy of the "resample and save to file" VI.
The strange thing is that the timed loop that does the resampling and saving to file seems to just hang (or die) sometimes, and I need to reboot the RT machine. At first this seemed to happen only when both resampling/saving VIs were running - as if they were competing for some shared resource, because the VI with the higher priority (higher by just 1) would usually win. I suspected NI's "Resample waveforms.vi" and put a disable structure around it in both VIs. They ran throughout the night, except they were logging at 1000 Hz all the time, which generated a ridiculous amount of data. I could tell that they were still running by the indicator on the loop counter, and that the files they generated were pretty big.
I tried creating an entirely new copy of the "Resample waveforms (single shot).vi" and all its sub VIs to use in one of the 2 resample and save VIs. That didn't work. I tried completely separating the VIs by having them run on two different RT machines. Again, one of the VIs stopped only 1 min later, while the other one lasted 15 hrs overnight. Up until now, it seems that the culprit is the resampling VI, but now it has just gotten confusing. The CPU usage on either one of these machines is not at a very high level. With all other VIs running, one RT is at about 60% and the other at about 40%. And, when one of the loops "dies", I do not see a spike in the memory or CPU usage - the loop stops and the CPU usage drops, as if the loop has removed itself from execution altogether.
I've contacted NI and have been trying things left and right for a while now. I'd really appreciate some help before my sanity flies out the window! I've attached a stripped down version of this data logging function in a LV8 project.
Thanks,
Sima