Hi guys,
I'm designing a robot which turns on a base. To determine the position it's in, I use a button (NI-DAQ) which is pressed every few second.
Now I want to count the amount of button presses.
I have the a DAQ-module (which reads the inputs) running in a while loop. When I increment a counter using a case-structure when the button is pressed, my increment is repeated every clockpulse.
I tried using an Event structure to execute when the boolean changes its value but that didn't work.
Using a second boolean as control to stop the incrementation didn't work well either.
Any ideas on how to do this?