Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How to out signal by 2 counters at the same time?

how can i use Counter 0 and Counter 1 to out two different freqency signals at the same time?

Using counter 0 can work

Using counter 1 can work

but counter 0 and counter 1 can not work at  the same time

Yuzn_0-1696843210130.png

 

0 Kudos
Message 1 of 5
(2,325 Views)

Some DAQs tend to use more than one counter for Pulse Generation and hence may have used all available counters and when you try to generate another pulse output there aren't any counters left to use and show the error that the counter is already in use.

 

What DAQ are you using?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 5
(2,310 Views)

My daq is USB 6212. the daq has two counters (Ctr0 and Ctr1).

I certify that there is no other program using the counter 0 or 1 when i using this program.

 

0 Kudos
Message 3 of 5
(2,293 Views)

No, you misunderstood my explanation. Your top Ctr0 configuration itself used both the available counters on the card.

 

Note: ctr0 and ctr1 are terminal and not directly map to the counter resources on the DAQ

 

Refer to this article. It states that when you configure Finite pulse generation it uses two counters on the board.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P7eESAS&l=en-US

santo_13_0-1696859634682.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 4 of 5
(2,287 Views)

Do you have any other NI DAQ devices available to use (or budget to acquire one)?

 

What are some typical paramaters for these pulse trains (freq, duty cycle, # pulses)?   Are all those parameters crucial, or might "close enough" be "good enough"?

 

The very simplest thing you might do that gives you precise freq & duty cycle but with some uncertainty about # pulses is to generate 2 *continuous* pulse trains and use software timing methods to decide when to stop each task.  Your USB-6212 is capable of running 2 pulse trains simultaneously if neither is configured for finite samples.   (Both can be continuous, both can be single pulses by never calling DAQmx Timing, or you could have one of each type.)

 

When you use software timing methods, you should expect to miss your timing target by at least several msec pretty often, and also plan that you might miss even worse (20-100 msec?) occasionally.   How much this affects your # pulses depends on your pulse frequencies.

 

 

-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 5 of 5
(2,259 Views)