First of all you won't be able to acquire the velocity data with this approach with the desired timing. There are three reasons:
- The lowest resolution of the LabVIEW timer is 1 ms. So the closest to 5.4253E-2 s you could reach is 54 ms.
- The FlexMotion board is working asynchronously. Thus it won't return the velocity value at the exact time you send the read velocity command.
- Windows is not a real-time OS and will add some more jitter to your measurement.
.
For better results you should use a hardware based approach. The FlexMotion board provides a feature called High Speed Capturing (HSC). Provide an external TTL clock signal with the desired frequency and connect it to the trigger input. Use
this example to capture positions based on this hardware clock. The clock signal should be significantly faster than 18.41 Hz (=1/5.4253E-2) as you will need to calculate the velocity from this signal and the timing of the hardware clock.
Please note that for FlexMotion-6C boards the frequency is limited to about 100 Hz as you will have to reenable the HSC circuitry after each occurrence in software. By the way this is not the case with the new PCI-735x motion control boards that support HSC rates of 2 kHz.
Best regards,
Jochen Klier
National Instruments Germany