LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error with subvi that calculates a count

Highlighted

I think that a single loop is sufficient. See if this works for you (may need a few tweaks. It both arrays transition at the same time, it will only count it if this happens at the second hall pulse, probably a reasonable choice, but modify as needed if you want something else.)

 

CountPulsesPerRevolution.png

 

It will stop once the second hall pulse is received. No need to continue.

(The "to I32" is only needed if you expect more than ~32k pulses per revolution.)

 

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 11 of 12
(100 Views)
Highlighted

You actually could take the orange comparison out of the loop.

 

To understand the code, here's a quick simulation, tapping and graphing some inner data. I am sure there are several other (potentially even simpler) ways to do about the same ... (there could even be bugs ;))

 

GauntPulsesPerRevolutionSim.png


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 12 of 12
(92 Views)