Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How to disarm counter when output is low

I am using both counters on an E-series board- Counter0 to generate a hi-frequency pulse train and Counter1 to modulate it with a low-frequency square wave by gating the first counter with the second.  This seems to work fine.  However, now I need to use this scheme in a "burst" mode which I must software-time since there's no third counter to control the "burst" period.  I've tried two ways and both methods seem to end the burst mode with the counter output in an arbitrary position (hi or low).  I need it to stop with the controlled counter output at a low state consistently.  I've tried gating counter1 with a digital output line and toggling the dig out in software, and also tried disarming counter0 w/counter control vi after the desired "burst" period has elapsed.  Both of these seem to occasionally stop the controlled counter in a high output state. 
 
Is there a better way of doing this?  I am using NI-DAQ 6.9 but I don't want to rewrite in DAQ-mx unless it will really solve the problem.  Plus I'm on a machine w/ LV 6.1 only.


0 Kudos
Message 1 of 6
(3,742 Views)

I'm not sure exactly what you need from your "burst mode" but perhaps you could disarm/stop the controlled hi-freq counter to force it to revert to its idle (probably "low") state?  Then you would start it again when you need to create another burst.

Or you may want to stop and re-start both counters.  If so, make sure to stop the controlled counter before the controlling counter and then re-start the controlling counter before the controlled counter.

Hope this helps,

-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.
Message 2 of 6
(3,737 Views)
I've already tried all the options you suggest- the problem is that the "idle" state of each counter, as you call it, is not controllable without resetting, and reconfiguring, the counter.  I guess I can do this but what a pain.  Just "disarming" the counter can disarm it in either a high or low ouput state depending on where the output is at the exact moment the "disarm" control command is sent..


0 Kudos
Message 3 of 6
(3,733 Views)
If you have another output you can control, you could use a TTL AND gate (SN7408) with the counter and the output. Set the output low, the AND gate will output a low. Set the output high to pass the state of the counter out. In effect acts as a gate.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 4 of 6
(3,731 Views)
Hello Garvacious,

You can use the Counter Get Attribute VI to check the output state of the counter.  This might give you some better results but it will not guarantee that the counters wil be left in a low output state.  I think the method that AnalogKid2DigitalMan mentioned would be the most reliable.

Message Edited by E.Lee on 07-22-2005 10:18 AM

Eric
DE For Life!
0 Kudos
Message 5 of 6
(3,722 Views)

Thanks, E. Lee-  what I'm really trying to ask here is if this behavior is normal when gating a counter or disabling a counter output.  Is the output suppoed to end up in an indeterminate state?  I would think at least when gating the counter that if the gate goes low, the output should end up low.  If this is normal I think the best solution for me is to just reset and reconfigure the counter every time, which seems to work.

 



0 Kudos
Message 6 of 6
(3,704 Views)