Hi guys, I'm new here and have only been using Labview for a few weeks. So my question is certainly very trivial, but I get no further.
The following: I would like to measure the speed of a shaft using a Hall sensor. To do this, a magnet sticks to the shaft, which then passes the Hall sensor. The sensor then just switches true if the magnet is there and false if not. I am using LabView 2019 and an Arduino Uno via the Linx tool.
On the Arduino, I connected the Hall sensor via the digital pin. Now my idea for speed measurement was that I stop the time and every time the sensor switches True, i.e. one revolution is over, the time is stopped, saved and converted into the speed is displayed in the GUI. The time is then restarted. At the next rotation the new time is stopped again, the old saved value is overwritten and output again in the GUI as the speed. The problem here is how to save the value. How can I save the stopped time as a constant and overwrite it next time? I've already tried various things with arrays and shift registers, but none of this was effective.
But probably the problem is simply my lack of Labview experience, so I am grateful for any help and tips! Thanks to everyone !!!!!
If I am understanding your issue I believe this is the change you need to make. The solution is on the left and your original VI is on the right.
RPM VI Diff
In your VI you are passing the RPM to the shift register so on the next loop if you did not get a new revolution it will use the RPM as seconds and calculate the value again. What you want to do is pass the seconds value to the shift register this way on the next loop you are determining to use the new seconds value or old seconds value and then calculating RPM.
There are multiple ways you can solve the issue as long as you make sure the units of the value being passed into Select function are the same.