Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I output a phased Z-pulse from an encoder?

Greetings LabView'ers:

I'm having problems generating a repetitive, reliable, timing pulse that is x-number of A-pulses delayed after the Z-pulse of an encoder.

I need to be able to create a "phasing control" on the front panel for a user to vary an output pulse of a counter. This needs to be done throughout the 2048 pulses-per-rev of my encoder. In other words, I want to output a repetitive trigger pulse for use by another device at always count "x" (1 to 2048) of an encoder input controlling "x" through a front panel control.

My application is to trigger a camera at a specific encoder tick count after seeing a top-dead-center (Z-pulse) of an encoder to snap pictures at a precise location (tick count) every rev of the encoder. This needs to be done through hardware for accurate timing of the trigger pulse from the counter to my camera, and not done through Windows and vi loops. I have a M-series

multifunction daq bd, NI-6220, with only two counters available. I am running LabView 7.1. 

Thanks much in advance for your ideas!

Rick

0 Kudos
Message 1 of 2
(3,090 Views)

My network PC doesn't have LV so I can't post an example, just describe some things.

You should only need 1 of your counters to do this.  You might find more info by searching for terms like 'retriggerable pulse'.  Here are a few links I found:

http://digital.ni.com/public.nsf/websearch/8F070C8CFDFEC0FA86256F7A00141425?OpenDocument

http://forums.ni.com/ni/board/message?board.id=170&message.id=115482&requireLogin=False

Overview:  In LabVIEW, you would define a virtual channel for pulse generation.  Set it up with Units=Ticks.  There you also define initial delay, low time, and high time as #'s of A edges.  (I'd wire the same value to low time and to initial delay -- I'm not 100% certain which is used for triggered single pulses.)   You'll want your high time as short as possible (2 ticks) so your counter can be ready for the next trigger sooner.  Then drop down a DAQmx Channel property node.  Somewhere in there is a property like Timebase.Source where you can specify the A channel as the timebase.  To keep it as a single pulse, DON'T call DAQmx Timing.vi.  You can set up to trigger off Z using DAQmx Trigger.vi   To make it retriggerable, drop down a DAQmx Trigger property node.  Somewhere in there you can set Retriggerable=True.  Then call DAQmx Start.

-Kevin P.

.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 2
(3,079 Views)