forcing page update in sequence


Recommended Posts

Is it possible to force a page update(redraw) from a sequence? I am developing a product tester the runs a series of tests on the device under test (DUT). My test currently takes about 25 seconds to run. My problem is that the screen stays frozen the entire time my test is running. The test is actual broken down into four subsections who's results are displayed on the page. I would like it if the user could see each of these test results displayed as each sub test completes so the test display would update four times during the test. This way the user has some idea of how the test is progressing and doesn't have to wait for the test to complete to see the screen update.

This tester is using a labjack U3 and the way I have it setup is; When the tester is idle(not running a test) I have the input channels updating at 10hz and I can monitor and control the hardware in a service mode. The end user doesn't have access to this screen unless I let them but the channels are always streaming at 10Hz until they start testing regardless.

When they click the 'test' button from their test page it calls the main tester sequence as a function. This main function then calls the four test functions in turn. Each of these function turns off the channel timing for all the inputs, explicitly manipulates the channels to perform the test, then sets the channels back to 10Hz when it done. So the channels streaming is basically being turned off and back on four times during the testing. It's redundant but I do it so I can run each test independently.

As I said this series of test take about 25 seconds to run and the screen will not update during the run. Much of this test time is spent in Delay() instructions waiting for the DUT to power up. It was my understanding that DAQ Factory could use the time during these delay instructions to do other stuff like updating the pages? Since my test spends like 90% of this test routine in delay instruction why can't it update the page? I've tried to set the page update rate to like 10Hz so it would try it's hardest to redraw the screen but no luck.

So is there a way to force a page to redraw during a sequence? Does the channel timing affect the page redraws?

One other question. Same project different topic. I just added a real pushbutton switch to the labjack that the user can use to run the test so they don' t have to use the keyboard or mouse. Since the only indication I currently have that the test is running is the depressed 'test' button on the screen, I would like to setup this real button to 'press' the screen button instead of just running the same sequence as the screen button. That way they can still see the screen button depressed during the test. So is there a way to active a screen component other then clicking on it. Maybe the addListener if I understand it correctly?

Anyway, sorry to be so long winded. If anybody has any ideas...

Thanks in advance.

Link to comment
Share on other sites

OK, I corrected the problem but more importantly I understand the issue. By calling a function from the action of a component it causes it to run that code in the main thread so I was tying up the main thread until my code finished.

I realized that a quick sequence would run in the main thread but did know that by calling my main routine as a function instead of just starting it that it would cause it to also run in the main thread. Makes sense though.

Anyway, It was an easy fix and thanks for the help. Great support as usual.

Link to comment
Share on other sites


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