12-14-2009 08:24 AM
Hello
We are currently using af NI 6215-usb DAQ to aquiere signals from a quadrature encoder. At maximum speed the encoder generates roughly 33000 pulses per second, which we doesn't count accurately. Our DC-motor turns roughly 90 degrees too much. If we s,low the speed down, we are able to turn very precisely. We are using a digital filter on the counter with a minimum pulse width: 6,425*10^-6, which should fit our setup. Is the DAQ too slow? Or are we doing something wrong in our counting or setup of the counter??
Thanks in advance
Christian Carøe
12-16-2009 02:46 AM - edited 12-16-2009 02:48 AM
Hi Christian,
I can see that you are doing pretty much everything in one loop structure in Labivew. That's not recommanded when you are have Data acq. and Write to Disk functions. Write to Disk functions are slow compares to your Data Acq. part of the code, and it will slow down your loop execution.
You should implement parallel structures and using e.g. Queue Structures for passing data from Data Acq. loop to the Write to Disk loop.
See. "File --> New... --> VI --> From Template --> Frameworks -->Design Patterns --> ProducerConsumerData Structure" for more info.
For testing the USB-6215 and the Quad. encoder output you can basically create a new VI and only tests the Counter Input part of the code.
Please let me know if this helps.
Thanks!