LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Update infobox in background

Solved!
Go to solution

I have many years of LabVIEW experience. I just started using LabWindows 8.5 and have a question about updating data in an infobox. I am executing my program in LabWindows as opposed to creating an executable so this behavior may be different in that respect. My code displays messages as the test progresses through the process. I initially get the number of visible lines within the infobox panel and save that value. During the process, I get the number of text box lines, subtract the number of visible lines in the infobox to compute the value to update the first visible line attribute. This is so that the infobox will display the last command that was executed. That works fine. I found that I need to call the DisplayPanel function to update the display. That works fine.

 

Heres the issue, If this process takes 30 minutes and I decide to open my outlook mail, every time the labwindows program performs a DisplayPanel, it pops the ladwindows program to the front. It is almost impossible for me to do any other work while the program is executing. I also noticed that when I execute some delay code (1 minute, 3 minutes, etc.) and I open my mail and then minimize the program, the labwindows panel will contain that outlook image until the next DisplayPanel function is performed. I also noticed that I can not scroll the infobox while it is being updated.

 

How would I update the labwindows infobox without having the program window always popping up to the front of other windows?

How can I allow the scroll to work or do I need to disable setting the first visible line attribute?

 

Thanks in advance for any ideas on this.

0 Kudos
Message 1 of 3
(2,866 Views)

Hi Wild Bill,

CVI panels should remain in the background unless you explicitly set them to float on top of other applications (you could do it in the UIR editor or programmatically): since I suppose you haven't done it, one possible causes of the behaviour you are observing is the repeated use of DisplayPanel funciton to update controls on the panel. You do not need to display again the panel for this purpose: simply call ProcessDrawEvents () somewhere in your code (possibly immediately after updating the textbox).

 

All other issues in your list may depend on how your program is designed; in particular, if you hav implemented all the 30 minutes process in a single callback into which you are not processing system events you won't be able to operate on the controls since all operator's actions are not processed until your callback finishes. While it is always possible to call ProcessSystemEvents () repeatedly in your code to handle user activity and screen updates, a better approach to this situation could be to develop the entire process into a timer firing some times per second, depending on the lenght of your process activity, and structuring the timer callback like a state machine. This is a far more elegant and robust solution for handling long lasting processes.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(2,850 Views)
Solution
Accepted by topic author Bill in Phoenix

Perfect !!!

 

Works great. Thank you for your help.

0 Kudos
Message 3 of 3
(2,846 Views)