Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

finite pulse train, stop and count

Hi, i'm using Labview 8.2 with a DaqCard-6063E on Windows Vista. I generate a finite pulse train with a possibility to stop when ever I want, but how do I do to count the number of pulses?
(The application going to drive a stepper motor forward/backward so I need the number of pulses)
/Pelle
0 Kudos
Message 1 of 3
(3,566 Views)
I think you probably mean the 6036e, right?  I've got 2 basic ideas for you:
 
1. Always generate continuous pulses and always count on using your software to decide when to stop.  This is *probably* not the solution you want, but it would make life simpler if you can live with it.  The reason is that continuous pulse trains only require 1 counter so you can just count those pulses with the 2nd counter.  Finite pulsetrains use up both counters.   I suspect you need the finite pulsetrain though to define a nominal exact distance, but in case your software decides you must stop prematurely, you'd like to know where you are.
 
2. Configure an AI task or an AO task that uses your counter output as its sampling clock.  Then you can query the AI/AO task for a property like "Total Samples Acquired" or "...Generated" to get your step count.   You would do the query with a DAQmx property node -- either a Read or Write property node if I recall correctly (not presently near LV to check).   Note also that you should start your AI or AO task before starting the Counter task, and if you stop the counter task, do your query before stopping the AI / AO.
 
-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 3
(3,538 Views)

Kevin, thanks for your reply, and yes it is 6036e.
I will give your suggestions a try tomorrow. I tried to find an example in Labview that count the pulses of a pulse train but didn’t found any. Do you know if there are some?

Thanks
Pelle

0 Kudos
Message 3 of 3
(3,516 Views)