LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting pulses

I am using a SCB-68 to receive a pulse which I use as a trigger to take a snap shot from a Firewire Camera. What I want to do it also count the number of pulses received. I need this to plot a graph having a single value corresponding to each pulse so one idea was to count the number of pulses and give the pulse count and value as the X & Y of an XY-graph. Or is there any better way to solve the problem?

 

0 Kudos
Message 1 of 5
(3,284 Views)

Hello.

 

The SCB-68 is a connector block. It can't count pulses on its own. You have to connect it to a DAQ device.

e.g. a M-Series device from NI has two counters. You can configure one of them to count your pulses.

 

Hope this helps.

Uli

Message Edited by UliB on 09-04-2008 02:09 PM
Message Edited by UliB on 09-04-2008 02:10 PM
0 Kudos
Message 2 of 5
(3,277 Views)

Hi,

 

     Well, my SCB-68 is connected to a PCI-6221. I was able to do the counting using the onboard hardware counter. BUt I was alos interested in making a software counter. I would appreciate some help on that.

 

 

Atyab

0 Kudos
Message 3 of 5
(3,261 Views)

Hello Atyab,

 

if you want a A/B counter in software, look at the attached picture. This a counter I use in FPGA (I did not create it). You can put it in a while loop and replace the local variables with shift registers.

Source A and Source B are your digital lines from the encoder.

software counter

Hope this helps.

Uli

Message Edited by UliB on 09-04-2008 04:37 PM
Message Edited by UliB on 09-04-2008 04:44 PM
0 Kudos
Message 4 of 5
(3,248 Views)
Hi ULiB. Well, I was able to do it in a much simpler way. I just used a Feedback Node and placed it in a Case Structure. I connected the value of the pulse I recieve to it and everytime the pulse is detected it toggles the case and  the value is incremented using the Feedback Node.
0 Kudos
Message 5 of 5
(3,176 Views)