I am trying to make a program in Visual Basic 2010 Express that will be able to count incoming pulses over a variable amount of time (set by the user) and only report the amount of counts when the time is over. Instead of putting the program to sleep (as is suggested by the counter/timer example) I wanted to do it in a way that won't stop the rest of my program. At first I tried using the internal timer (mode 10) but I couldn't get it to work properly. Would I want to set it into a while loop so it doesn't read the counter until the internal timer reaches that point? If that is the way to go I can't seem to properly reset the counters and timer so that the program can run multiple times. My other idea was to try and set up a stream where the length of the stream is the variable amount of time set by the user. If that is the way to go, I have no clue how to properly set up the stream with a counter in Visual Basis.
Thank you for any help you can give me. It is much appreciated.