05-29-2018 09:35 AM
Good morning,
I need to set up a VI to count the number of digital pulses occurring in a set period of time so that my company can measure the RPM of a BLDC motor. As a start, I'd like to set up a VI to count the number of pulses in 1 second (over and over again) which will allow me to approximate RPM with some level of accuracy. However, I can't figure out how to count the number of pulses in a finite period of time and have the counter reset after the period of time is over. Can anyone help me out? I have attached the VI.
05-29-2018 10:03 AM
Does your program currently work as far as reading the counter value each time the loop executes? Can you just subtract the previous reading from the newest one to get the change in the pulse count?
05-29-2018 10:06 AM
I can get the counter to count up (ie the number continually increases as long as the motor is spinning). I would like to set it up so that I am subtracting the "current" count from the count at t=-1s, but I can't figure out how to do that.
05-29-2018 10:18 AM
Look into either the "shift register" or "feedback node". Either of those allow you to carry a value from one iteration of your loop over into the next iteration.