04-01-2005 01:23 AM
04-05-2005
04:51 AM
- last edited on
04-25-2024
09:42 AM
by
Content Cleaner
I don't think that there is a good way to accomplish this task with the equipment you have.
With your equipment you could read the velocity data in software from the motion board. The maximum reading rate you could reach is a bit more than 200 Hz but this is not free of jitter. There is no good way to synchronize these readings with your analog data acquisition. You still could use breakpoints as an external scan clock for your AI operation but this would only give you the correlation between position and analog values. Additionally with the FlexMotion board this wouldn't be faster than 200 Hz again but at least it's synchronized.
So let's try another approach. You could use a counter of the 6023E to read the position/pulse width synchronized to your analog input operations. You would need to connect the encoder to the 6023E in this case. Still this is not a very good solution:
The 6023E doesn't provide direct connectivity for encoders. You could use the up/down counter feature but this would result in decreased resolution by the factor 4 as you could use only on edge of one phase unless you add some external circuitry like the LS7084 chip that transforms a quadrature encoder signal to a step/direction signal. You also would need to do y buffered acquisition for both, analog input and counter operation. Unfortunately the 6023E provides only one DMA channel. That means you would have to transfer the counter data by interrupts, adding significant load to your CPU. Depending on the CPU load and your acquisition rate this won't work at all (interrupt transfer rates greater than 1000 Hz are critical).
As these approaches are both not ideal I would recommend using a PCI-6220 instead of the PCI-6023E. This board is inexpensive and can be used with the same connector block as the 6023E. It provides direct connectivity to quadrature encoders and 6 DMA channels. Thus you will be able to do hardware timed analog and position measurements with up to 250.000 samples per second without significant CPU load. As the position measurement is also hardware timed it's very simple to calculate the velocity values.
Best regards,
Jochen Klier
National Instruments Germany