I'm writing a VI that monitors two encoders in real time and outputs a given value. These encoders are extremely high precision (80,000 pulses per revolution) and I need a high sample rate (> 10kHz) to capture the required movement.
If I run the attached VI using the counters on a PCI-6281, my effective sampling rate of the quadrature decode is ~12,800 Hz for each channel. There is obviously a software bottleneck due to the binary file disk streaming in each loop. This is, or something just like it, is needed to "idiot proof" the VI. If somone stops the VI at any time, the state of the encoders needs to be saved.
What is troubling, is that when I switch the counters over to an NI-9402 in a cDAQ 9174 chassis, the effective sample rate for each channel drops to only ~420 Hz.
What is causing this sharp decrease in speed??
I assume that right now the task is software timed and perhaps I should switch to hardware timed?
What I need is for this to run as fast as the software bottleneck allows.