LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter/timer rate

Solved!
Go to solution

Hi,

 

I am using the counter/timer input on a 6040E card for event counting.

 

I am using CTR0 and have specified the 20MHz clock as my source and connected my event to the gate (PFI9). I am counting a finite number of pulses and I am configuring the buffer using the DAmx Timing vi (sample clock instance).

 

My question is regarding the 'rate' input. As the counter source is set to the 20MHz is this not the rate? Can anyone advise as to how I choose a sensible rate value and what effect it has.

 

I normally use the rate for analogue IO buffers in order to set the buffer rate - I just can't quite see it's use in this instance.

 

Thanks

David
www.controlsoftwaresolutions.com
0 Kudos
Message 1 of 4
(2,516 Views)

Usually you have 2 types of things you want to do with counters, Count edges or count a clock between edges.

For edge counting you are incrementing (or decrementing) the count for each specified edge on a pfi line (you can select this) you can read this value periodically to see the current count.  For counter measurment you are counting the number of clock cycles (this is where the source is probably the 20MHz onboard clock) between specified edges at the at gate.  This is useful for frewuency or pulse duration measurments.  each measurment is buffered and you can read the buffer periodically.

 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 4
(2,500 Views)
Solution
Accepted by topic author DavidMaidman

I forgot to get to the rate part, for event counting the rate is how often you buffer the value of your edge count.

IE I am counting photons from a PMT, I want to see the cumulative count every 1ms so I wire the source to the PMT and run continious at 1khz, each second I read 1000pts and plot.  I think this is how the rate works.  For measurments, the clock is implicit so there is no rate since the ascnchronous edges determines when to write to buffer.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 3 of 4
(2,499 Views)

Hi, thanks - this is what I thought and just wanted some reassurance. I am updating some traditional DAQ VIs to DAQmx and you didn't need to specify a rate, only the source clock there.

 

Thanks 🙂

David
www.controlsoftwaresolutions.com
0 Kudos
Message 4 of 4
(2,490 Views)