Jump to content

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


Rick Yahn

Recommended Posts

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 have attached the vi tried so far but I can't seem to reliably adjust the position of the output pulse after starting the vi, nor is this vi using a known ref point (Z-pulse).

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

Download File:post-5840-1164133237.vi

Link to comment

Hey Rick,

Saw your post and thought I'd send you a little help. First I'd read the following application note from NI:

http://zone.ni.com/devzone/cda/tut/p/id/5387

What this shows is the ability to configure your counter card to send a signal when the terminal count is reached, you could then couple this with a start trigger on the counter coming from the Z pulse and an start your initial tick count at 2^32-1-(offset). For example if you set your initial tick count to 4294967195 and started the counter from the z-pulse, the counter would roll over at 100 counts from the z pulse, this could be configured according to the NI application to send a pulse to your camera.

Hope things are well at QG...keep in touch, this is a great resource for all things Labview.

Randy

P.S. in this configuration you would need to reset/restart the counter after each output trigger. Depending on how often this is happening you may miss a signal or two in between but you would at least have a repeatable offset from the z-pulse

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 have attached the vi tried so far but I can't seem to reliably adjust the position of the output pulse after starting the vi, nor is this vi using a known ref point (Z-pulse).

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

Link to comment

Rick,

Thinking about it some more you could probably set up the hardware to output a pulse based on an external clock (in this case the encoder signal) which has been divided. For example you could set the encoder as the clock and divide by 2048 so that every 2048th count the output would be generated (the output signal is separately configured). The trick to this is the start trigger for the output signal (your offset value), I'd have to play with the hardware to figure out how to make it work.

Randy

Hey Rick,

Saw your post and thought I'd send you a little help. First I'd read the following application note from NI:

http://zone.ni.com/devzone/cda/tut/p/id/5387

What this shows is the ability to configure your counter card to send a signal when the terminal count is reached, you could then couple this with a start trigger on the counter coming from the Z pulse and an start your initial tick count at 2^32-1-(offset). For example if you set your initial tick count to 4294967195 and started the counter from the z-pulse, the counter would roll over at 100 counts from the z pulse, this could be configured according to the NI application to send a pulse to your camera.

Hope things are well at QG...keep in touch, this is a great resource for all things Labview.

Randy

P.S. in this configuration you would need to reset/restart the counter after each output trigger. Depending on how often this is happening you may miss a signal or two in between but you would at least have a repeatable offset from the z-pulse

Link to comment

Sorry, don't have LV here at my network PC so haven't been been able to look at the attached vi.

I'd probably approach this as a retriggerable single pulse generation. The Z-index signal would be wired / configured as the start trigger and the A channel would be configured as the timebase used to count #low ticks and #high ticks. You might also need to configure # ticks initial delay = #low ticks for proper behavior. I'd set #high ticks = 2 (the minimum allowed) to be ready for the next trigger as quickly as possible.

The upside of this method is that you can change pulse specs on they fly, without stopping the task. The downside is that you can't use the extreme values of phase delay, only [2, 2046].

-Kevin P.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.