LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

two counters simultaneously 6023e

well what i want is make a train pulse from one  counter (counter0) be the gate for another one (counter1) and for this i need the that two counters work simultaneosly bau when a try make this the labview guive me an error like you can see in the next picture above.

 

 

0 Kudos
Message 11 of 20
(1,535 Views)
0 Kudos
Message 12 of 20
(1,533 Views)
I think your problem is that a finite pulse tarin requires 2 counters each (configured automatically this way) one to do a pulsetrain, and one to count the finite number of requested pulses.  I could be wrong about this but I think I have seen this in the past.  continious pulsetrains will not require 2 counters.  so setting up two finite pulsetrains will give you a resource error.  The error indicates something allong these lines.  I always fint that there are never enough counters for any application.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 13 of 20
(1,528 Views)
thank you
 
you have reason the problem is  try make a finite train pulse and for this i need two counters
0 Kudos
Message 14 of 20
(1,526 Views)

I *think* you might be able to get there from here, but am not at hw to verify.

The idea is to keep your edge-counter set for Finite Sampling while setting your pulse train for Continuous.  This is probably what Paul (falkpl) was hinting at.  There are essentially at least 4 ways to try to perform buffered edge counting using another counter as the sampling clock.  I'm suggesting #1, you were trying #3.

1. Set edge-counting task as Finite and pulsetrain task as Continuous.  Requires 2 counters.  When edge-counting task is complete, must then stop pulsetrain task.

2. Set edge-counting task as Continuous and pulsetrain task as Finite.  Requires 3 counters.  When pulsetrain task is complete, read edge-counting buffer and stop task.

3. Set edge-counting task as Finite and pulsetrain task as Finite.  Requires 3 counters.  Both tasks complete themselves after specified # of samples.

4. Set edge-counting task as Continuous and pulsetrain task as Continuous.  Requires 2 counters.  Must monitor acquisition buffer and choose to read and retain only the first N samples (where N is the # you would have used for a Finite sampling task), then stop both tasks.

Good luck!

-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).
Message 15 of 20
(1,521 Views)

I have another problem the maximum number off samples that i can read to the buffer with board 6023E.

Because i try send a sygnal to the gate with the maximum frequency possible and that in my case 5E6 Hz (this signal is created with the counter0) and measure duryng two seconds and for make this how i can configure the input counter (counter1).

 

0 Kudos
Message 16 of 20
(1,508 Views)
What exact kind of counting / timing function are you trying to accomplish?  What will this 2 second buffer of data mean to your application?
 
There are often alternate ways to approach these measurements with various kinds of tradeoffs.  I very much doubt that you will be able to sustain a 5 MHz sampling rate for 2 seconds.  I'd be pretty surprised if you could even get 1 MHz.  But there may be a different measurement method that would provide you the info you need.
 
At this point I can only make a few guesses and comments, so here goes.  You've described a measurement where there is some sort of external Source signal that will actually make the count register increment on each active (rising by default) edge.  You are trying to buffer that count value at a sampling rate of 5 MHz to give you 10 million samples of the count register in 2 seconds.  You are likely getting errors because the board cannot pass the data over the PCI bus to system memory that fast that long.
 
Even if your hw could keep up, I have to wonder whether 5 MHz sampling is really necessary?  What is it you need to characterize with such precise timing?
 
I wonder whether you could instead use the 20 MHz internal clock as the Source signal and let your external signal be the Gate (sampling clock).  In a mode like this, the count register increments once every 50 nanoseconds.  When you get an active edge from your external signal, you'll buffer the count value.  This essentially timestamps the edges of your external signal and gives you even *better* timing precision.  The effective sampling rate is goverened by the pulse rate of your external signal.
 
One additional note: the maximum possible value the count register of an E-series device can contain is 2**24 - 1.  Incrementing at 20 MHz, your counter will reach its maximum 24-bit value in a little less than 1 second, then it will rollover to 0 and keep going.  In most apps, you can compensate for this in post-processing without any real complication, but awareness is the first needed step.
 
-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 17 of 20
(1,491 Views)
Thanks
 
What i have is system to make time resolved spectroscopy. And for do Time resolved spectroscopy  i need measure i signal (this signal cames from a fotomultiplier)  some nanoseconds (ideal) or microseconds after a excitation pulse. For have this precise delay i think but i dont know if it is correct, in use a counter to measure a signal and use another counter(counter1) to be the gate off the first counter (counter0) this last counter start after recive a trigger from the excitation source. And if i think correct with the result array from counter0 and know the frequency off the second counter i can correlate the results from the firs counter (counter(0) if the frequency off the second counter (counter1) and using diferent frequencys i can contruct all spectr along more or less one second. 
 
So iff you know what is the maximum frequency that i can use like a gate for counter0  and how many time can i mesure.
 
Iff you have another solution please tell me.
 
thanks 
0 Kudos
Message 18 of 20
(1,489 Views)

Sorry, I really know nothing about the field of spectroscopy at all.  I only know some things about measuring time intervals and pulsetrains in general.  I don't really understand what you need here in a functional sense.  The kind of description that would help me help you better might sound something like:

"I need to generate an array where each element is the # of photomultiplier pulses during a precisely-timed interval.  I want the t=0 point to be set by a different external trigger signal."

Also helpful:

1. What kind of rate might the photomultiplier fire at?

2. What size are the time interval bins?

3. Is the process repeatable?  Can you repeat a test multiple times in order to focus on a different portion of the response each time?

4. The term "gate" is used in different ways with counters.  Do you mean it to act like a sampling clock where there's an active edge?  Or like an enable signal where there's an active state?

Further thoughts:

A. I'm afraid I don't know if DAQmx supports triggering a counter task on an E-series board.  I've only used M-series MIO boards since switching to DAQmx.

B. Have you searched the Counter/Timer forum?  A lot of people have posted about photomultiplier measurements there.  Searching on "PMT" or "photomultiplier" should give you some to start with.

-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 19 of 20
(1,481 Views)

Are you trying to do a time response to a spectral execitation, I have done this almost the same thing, I did a time gated measurment using a 6602 and a hamamatsu PMT (Photon counting photomultiplier tube)  The time response was however much slower.  I was starting the collection after 10us post excitation and I collected bins of 150us for a total integrated time of 1500us.  I did this in a continious fassion with each excitation.  What are the details of the time resolved spec measurments.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 20 of 20
(1,474 Views)