09-21-2009 05:01 PM
All,
I'm trying to play back some analog data with a cRIO (sampled at 300S/s) and I'm running into some timing issues. I can't access the file as fast as I'd like and I'm not sure how to pass the data between loops. I'm running a cRIO 9004 (1Khz clock) and I've attached the data. I've copied the TDMS file to the cRIO via the FTP utility.
- Ken
09-22-2009 06:18 PM
First of all Great use of State machines, you code was well organized for the most part, which is refreshing.
The best way to pass data between two loops is using a producer consumer architecture with cues.
As for your TDMS timing, you can reduce the longest data path through your read loop (combinatorial path). Count the greatest number of consecutively wired nodes, and make it smaller. You have a bunch of shared variable access that has to happen after the TDMS read but before the next loop iteration. One such method for improving speed here is pipelineing, this is most commonly used on the FPGA itself, but the reasoning for the real time host is the same.
Let me know if I need to elaborate on ay of these ideas.