I'm trying to use a PXI-8106 RT and LabviewRT 8.5 as a PID controller to control 3 motors. I'm measuring the speed of the motors by measuring the frequency of the encoder with a 6608.
This article http://zone.ni.com/devzone/cda/tut/p/id/5423 claims a speed up to 107.5 khz. I've set ethernet to polling and usb off, I didn't turn off the CPU display, but I'll try that as soon as I can. However, I'm not anywhere close to 107khz, best I can get is about 10khz with one channel and about 2 khz with 3 channels. I realize the tests were done with analog inputs, but I was hoping that I'd get at least somewhere close using counters. With the 2Khz rate I really can't do what I need to do.
Does anyone know what a realistic rate would be with this setup?
I'm new at Labview so I may be doing something wrong, although I can't see what it could be. I've done quite a bit of research on the forums before I started to learn from other's examples.
Here's a couple of things I've learned trying to optimize my loops.
Seems like Daqmx has some issues with applying a scale. I have 2 scales, one is just a scale factor, 0.166, the other is .0002. When applying the .0002 factor in Daqmx my performance takes a huge hit, something like 10%! If I just leave it at hz, and do the scaling myself I see no performance penalty.
There is something strange about the timed loop % display in RT8.5, I wrote my own routine using expected end, actual end time, and the period to give me a % loop useage and it matches very well to the RT8.5 display for most of the time, however, when the loop starts missing iterations because I've gone over 100% the RT display drops down to about 50% which pretty much makes it useless.
I've attached a couple of shots of my test loop. I can get this one to almost hit 10 khz. the other screen shots are of how I set up the counter, and how I read the counter. the read counter has the error trap to restart itself. Also I set it to use DMA explicitly somewhere else in the program.
Thanks for any help.
Henri