09-01-2005 11:47 AM
09-01-2005 12:09 PM - edited 09-01-2005 12:09 PM
Message Edited by Isaak on 09-01-2005 12:17 PM
09-01-2005 12:16 PM
There is nothing wrong using local variables if they are really needed, e.g. for the UI code. They should not be used for pure computations (e.g. to "avoid" wires). In your case, they are definitely not needed.
Local variables have several drawbacks.
For more details, you might want to look at my old post here and other post in that thread. 🙂
09-01-2005 01:25 PM
Just a quick note on event structures: keep the code running inside each event to a minimum otherwise you will see a hang effect. The event structure is for GUI responsiveness to avoid polling so running any long routines inside of an event defeats the purpose of the structure in the first place. Yes the producer/consumer design pattern solves this so you can handle GUI events quickly in a gui event loop and handle DAQ and processing an their own loop, with message passing to share information. Just put a long wait inside an event and see what happens to the program.
Paul
09-01-2005 01:26 PM
When I said keep the events inside of the event structure short, I would suggest 250ms max, I find anything over .5sec to appear unresponsive but maybe I am impactions.
Paul