LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Want to count number of times "1" comes in digital signal.

I am using USB 6210 I/O and want to count the pulses in my digital signal generated by gear tooth sensor. I have integrated the whie loop within the case structure. Firstly case structure identifies the "1" value in digital signal and starts incrementing the local variable. The While loop I used is to increment  once only when single pulse comes. if i remove the while loop then it increments the local variable continously till next zero comes(in a single pulse).

But even after having while loop within the case structure and changing the while loop stop condition to "stop if true", the program stuck in the while loop.


Can anybody tell me how to do this ?

0 Kudos
Message 1 of 10
(3,212 Views)

Can you show us the code that you have developed. It must be a simple logic to count when you use the shift register.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 10
(3,210 Views)

Check this VI.

 

I took 1000 sample n after that calculated  for Each Signal "1"s. If Yes add +1 else No.

Munna
0 Kudos
Message 3 of 10
(3,182 Views)

Hi,

 

Please find attached zip file, it should help you. its developed in LabVIEW 2010.

 

 

 

Miraz....

Kudos is better option to thank somebody on this forum.Smiley Wink

With Regards

Miraz
Kudos is better option to thank somebody on this forum
------------------------------------------------------------------------------
0 Kudos
Message 4 of 10
(3,169 Views)

The Boolean Crossing PtByPt is perfect for this


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 10
(3,147 Views)

@Indiano wrote:

I am using USB 6210 I/O and want to count the pulses in my digital signal generated by gear tooth sensor...


You should really just use one of the hardware counters for this.

 

SimplePulseCounter.png

 

 

Best Regards,

John Passiak
0 Kudos
Message 6 of 10
(3,127 Views)

Hi,

 

Thanks. But i had applied some digital logic in my code and it is working for me nicely.

 

With Regards,

Indiano

0 Kudos
Message 7 of 10
(3,090 Views)

You are right, but fortunetly i have applied some digital logic with shift registers.

Anyway, Thanks.

0 Kudos
Message 8 of 10
(3,087 Views)

@Indiano wrote:

 

Thanks. But i had applied some digital logic in my code and it is working for me nicely.


If anyone in this thread helped you, feel free to give some kudos.  It looks like several good developers came up with some helpful ideas and they deserve some thanks.

0 Kudos
Message 9 of 10
(3,058 Views)

@Indiano wrote:

You are right, but fortunetly i have applied some digital logic with shift registers.

Anyway, Thanks.


Fair enough, but doing it this way will ultimately limit how fast of a signal you can measure (might not be an issue for you).

 

 

Best Regards,

John Passiak
Message 10 of 10
(3,044 Views)