Progress bar


Recommended Posts

Yes, just set the progress bar to display a global variable, then update that global from within the sequence. Make sure the range on the progress bar is appropriate. The thing is, if your sequence is running at full bore, doesn't have any delay()'s in it, and is at priority 2 or higher, then you are not letting the DAQFactory user interface update itself. This is why you see it update only at the end of the sequence. Try putting a small delay, even delay(0.01) inside your loop.

Link to comment
Share on other sites

Yes, that is because when you call a sequence as a function, i.e.: sequencename() instead of using beginseq(sequencename) you are running the script in the thread of the calling script. The action of a button runs in the main thread of the application which handles the user interface. Since the thread is tied up doing your script it can't do anything else with the user interface.

You should never put script that takes a long time inside (or called from) the action of a screen control. You should always put it in a sequence and then start that sequence using beginseq() to run it in a background thread.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.