Hi everyone,
I am struggeling with a problem for my DC motor control using LabView.
The DC Motor in a test stand is controlled by LabView via a Arduino board.
The control of the DC Motor using LINX within LabView works quite well.
I am able to set the motor's speed as well as its direction.
On the axis of the DC motor a flywheel is attached. To count the revolutions of this flywheel a hall sensor was added.
This hall sensor also is controlled via the arduino using LINX.
To count the signals of the sensor I added the edge detection VI from this forum.
I implemented a "overall counter" which counts all signals and calculates rpm using the elasped time express vi.
This counter works quite well.
Now I want to implement a counter which is counting and calculating rpm only if a signal is recognized.
I was able to start this counter via a case structur, which is true when a signal is counted and the motor speed is not zero.
My problem now is, that I don't know how to reset the counter when the case structure became false and then true again (reset at first signal?).
I was able to set back the counter this way "by accident". We just placed the "elapsed time" express vi outside of the case structure, while the indicator stayed inside.This way the value of the timer is stored and set back to zero when the case structure is true again.
Could you please help me to solve my problem.
I also attached the VI to this thread.
Thanks in advance!
Thomas
P.S.: I am using LV 19.0.1f1 (32bit), Windows 10 PC. The arduino is a arduino UNO.