07-06-2008 07:27 PM
07-07-2008 12:22 AM
First you must move the Wait(ms) function at the outside loop. When case is false you use 100% cpu.
At the timing palete you will find the functions for controling timing issues. Use the tick count function , or the get time-date to read the current time and compare it with the time your application started. Then use a local variable to reset the boolean button.
07-07-2008 01:15 AM
Here's a quick draft, see if you can adapt it for your tasks. It uses an event structure to only spin the loop if needed.
It will stop adding data after 10 seconds.
07-07-2008 06:36 PM
Thank you for your great help. This is the best way to solve my problem.
With warm regards
Harutyun Melikyan!