LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable two counters simultaneously

Hi,

 

I have two counter which are generateing pulses at the same rate but with 90° phase. For this I use the "DAQmx Create Channel(CO-Pulse Generation-Time).vi". How can I disable both counters after a given impulse count and at the same time? At the moment when I disable them one is running a little bit longer than the other.

 

 

Cheers,

harle

0 Kudos
Message 1 of 7
(3,186 Views)

can you define, "a little bit longer" in time (1 sec, 0.5 sec, 1 msec)??  how "simultaneous" are you looking to achieve??

 

you should be able to do the close or stop in parallel and have then stop pretty much simultaneously.

Kenny

0 Kudos
Message 2 of 7
(3,144 Views)
In this case "a little bit longer" is about 4 cycles at 10kHz. It would be fine if it would work at 35kHz. The difference in time must not be more than 5-10µs.
0 Kudos
Message 3 of 7
(3,127 Views)

How are you writing the counter output information, ie are you using the DAQmx Write.vi > Counter > Single Sample > Single channel, or multiple channel, etc?

 

Can you post a screen shot of your code??

 

With the DAQmx vi's, you should be able to have them stop at the same time pretty easily.

Kenny

0 Kudos
Message 4 of 7
(3,114 Views)

At the moment it looks like this:

 

0 Kudos
Message 5 of 7
(3,106 Views)

If you need the times exact within 5-10 usec, you will *have* to use a hardware-signal based method.  You won't be able to count on any software-timed method to do this. The simplest way I can think of is to configure both pulse generation tasks to have a "pause trigger".  If you configure them to pause when low, then you just need to assert that line to high when you want the pulse trains to stop. 

 

Depending on your DAQ board, you may be able to do this with no wiring.  Many boards have DIO lines that can also be mapped over to be used as counter inputs.

 

-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 6 of 7
(3,093 Views)

Thanks for the help. I presumed somethink like this.

 

How can I configure the counters to pause on a low input?

0 Kudos
Message 7 of 7
(3,075 Views)