05-15-2013 02:16 PM
Hi,
I am attempting to generate a pulse train to trigger a camera using an X4 quadrature encoder with A, B and Z index, the Ni 9401 and the NI 9172 chassis. My encoder generates 2500 pulses per revolution but I need a pulse train of 5 pulses every revolution to capture 5 images evenly spaced on my rotor. I want to capture these five locations for every revolution. Any help would be greatly appreciated
05-16-2013 08:54 AM
I don't know that particular cDAQ hw, but here's a starting point that oughta work with any of the counters I know of.
The idea is to trigger off the Z-index so you can set the phasing of the N pulses/rev. The initial delay is set to this phasing value, while high and low time split the available "ticks" needed to generate N pulses per rev. I've assumed that the 2500 pulses per rev is the post-quadrature resolution, such that ch A and B each have 625 cycles/rev.
Below is a LV 2010 snippet:
-Kevin P
05-16-2013 03:01 PM
Hi,
Thanks for your reply. This almost achieves my objective. Could you please give me a definition of each of the terms in the code listed below and what values to put in them if I want to get 5 evenly spaced pulses per revolution and my encoder generates 2500 cycles per turn.
- Pulses per revolution to generate:
- # revs worth of pulses
- Phase relative to Z (units of Cycle A)
- Cycles of Ch A per revolution
05-16-2013 03:32 PM
I also have a problem with the pulse duration. I get one big pulse and multiple smaller pulses of differing periods. It might be connected to the inputs into the code