Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Single pulse input ....delay the output....change the pulse width.... 6602 with vb6 DAQmx

I have 2 scenarios.
 
Scenario 1
I have an index pulse that I am taking in from an encoder.  I would like to input that single pulse signal into a counter and delay it's output.
 
Scenario 2
I have an index pulse that I am taking in from an encoder.  I would like to input that single pulse signal into a counter and change it's pulse width.
 
 
Are these scenarios possible?
 
I am using VB6 and I have just started using DAQmx.
 
I need code help if possible.  What DAQmx functions do I use?
 
Also what counter pins would I use?
 
Any help will be greatly appreciated.
0 Kudos
Message 1 of 2
(3,803 Views)

Big Guy,

Actually, you pretty much have to BOTH delay the pulse AND change the pulse width.

Scenario 1:  There really isn't any counter functionality available to take in an input pulse and then generate an output pulse where BOTH leading and trailing edges are delayed by some specified amount.  It's simple enough to delay the leading edge, but you'd need to define the output pulse width as a fixed constant, independent of the input pulse's width.  I only know LabVIEW so I don't have any info on VB calls.  Search for terms like "retriggerable single pulse."

Scenario 2:  In programming this output pulse width, there will also need to be some delay.  It can be very small (<= 0.1 microsec), but can't be "0"

By default, the appropriate pin to use for the input pulse would be one of the counters' Gate inputs.  Note: if you'd like to use this delayed pulse like an encoder z-index signal, you might have trouble because it won't be sync'ed to the A,B phases.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 2
(3,797 Views)