07-26-2010 11:41 AM
Hi,
I am using a cRio 9074 in scan mode and I have a fairly simple timed loop that should run at 5-10mSec periods to operate a pwm control. I also need to do some data logging and save two input signals (at approx. 1kS/sec). However, when I use write to spreadsheet, the loop speed drops and my timed loop period goes up to 50mSec. How can I speed this up, and what is the efficient way to save data in scan mode.
Thanks.
Solved! Go to Solution.
07-27-2010 05:36 PM
Hi Soheil,
If the Write to Spreadsheet File.vi seems to be negatively affecting your determinism, then I would recommend utilizing a producer/consumer architecture and moving your File I/O functions to the non-time-critical consumer loop.
I hope this helps!
- Greg J
07-27-2010 07:57 PM
The single best way to improve determinism is to divide your acquisition/logging into two distinct producer/consumer loops as VTHokie says. Next best improvement would probably be using a binary format file structure rather than Write to Spreadsheet, which converts all data to ASCII representation prior to writing to file. Writing to ASCII files rather than binary files degrades performance in four ways:
07-28-2010 04:58 AM
Hi Soheil,
You might want to check out the community example I have found regarding producer/consumer loops.
It could come in quite helpful.
http://decibel.ni.com/content/docs/DOC-2431
Any problems let me know.
07-28-2010 01:09 PM
Thanks all.
I am trying the producer/Consumer method and will keep you posted on the outcome.
Thanks,
Soheil
07-29-2010 03:20 PM
Thanks all.
The producer consumer method worked fine. I even tried the TDMS method but that was too slow too.