Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to generate a pulse train from a counter and count the pulses with the other counter on a NI USB 6259 DAQmx.

Solved!
Go to solution
If i run "Gen Dig Pulse.vi" and then i run "Count Digital events.vi" to count the pulses (from NI Example Finder) the counter CTR1 don't work and LabView 8.0 shows this error:
 
Error -50103 occurred at DAQmx Start Task.vi:1
 
Possible reason(s):
The specified resource is reserved. The operation could not be completed as specified.
Task Name: _unnamedTask<1B>
 
Why?
Help me!!
 
 
0 Kudos
Message 1 of 4
(5,617 Views)
Hi,
are you using the same counter to generate a pulse train (output) and count the pulses (input)? This is what Labview error message means.You have to use one counter to generate the pulse train (like ctr0) and another counter (like ctr1) to count the pulse. To do this you have to connect the output (for your board ctr0 out is on pin 2) to the input of the other counter  (for your board ctr1 source is on pin 42) . I've already tested this configuration with that 2 examples running at the same time and all works.
 
Let me know
 
Clara
0 Kudos
Message 2 of 4
(5,599 Views)
Many Thanks Clara!
What you say it's true for a continuous pulse train,but I want to generate a finite pulse train so i use "Gen Dig Pulse Train-Finite" in the NI example Finder (excuse me for this mistake in my posted question!!!)
If i run this program alone,it work correctly but it don' t work together the "Count Digital events".
Obviously I use two different counter!!
My problem is that i want generate a finite pulse train and visualize the number of it simultaneously.
I don't know....maybe  it's possible to make this operation with a single counter and the right property node!!!!
 
 
 
 
 
 
 
 
 
0 Kudos
Message 3 of 4
(5,582 Views)
Solution
Accepted by topic author Elettrico.ing

Hi;

 

Here is the fix for your problem.

 

The cause is that "Gen Dig Pulse Train-Finite" is using both Ctr0 and Ctr1.

 

Please refer to:

 

      " When performing a finite pulse train generation, one counter generates the pulse train, and the other counter generates a pulse that acts as a gate for the first counter. If you change the pulse train to generate continuously or

     only generate one pulse, you can run two counter tasks at the same time without error." 

    http://digital.ni.com/public.nsf/allkb/04BEDD9E9E91ED3486256D180048116D

 

I have used Ctr0 and Ctr2,  skipping Ctr1 as it is reserved by ""Gen Dig Pulse Train-Finite". I works fine.

 

Kizito.

 

Message 4 of 4
(5,046 Views)