12-18-2007 10:33 AM
12-19-2007 01:48 PM
Hi Charly2007,
I don’t readily see anything wrong with the code you’ve posted, but I would like to understand your overall application better. It sounds like you are trying to run different processes simultaneously, such as acquiring data and processing events (like updating the user interface). Is that correct?
I’m not quite sure what you mean when you say you “need to check for function timeout for safety while the function is acquiring the data”. Are you asking about how to program a timeout into a data acquisition function or to do something different?
Please explain your overall program and how you envision the flow. Also, list what steps you’ve tried and what has/hasn’t worked so that the problem/resolution are clear for other community user. Thanks.
12-20-2007 09:08 AM
12-21-2007 02:24 PM
Hi Charly2007,
Right now you are doing a finite acquisition, which will not allow other processes to execute until it’s done. Another way of acquiring data is with a continuous acquisition. I suggest starting with the example code to see how it’s set up. You would specify how many samples to read per loop iteration, and the program would do this until you tell it to stop. In this loop you could check the status of a stop button or’d with some logic (like a timer control) that checks to see if 5 minutes has elapsed. That way your program will stop if either the time has elapsed or you press the stop button.
Hope that helps!