LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can a CVI Project control a Panel which was created and loaded into Memory from a different Project?

I have an application that has One Parent Panel and 'n' child panels,all of which maybe loaded into memory and Updated regularly.I want this Parent Panel to be accessible to users and allow them to view any child panel at any point.How can both of this be done simultaneously?

Normally, when User Events are processed, How will the updation of panels occur and Vice Versa?
0 Kudos
Message 1 of 4
(2,597 Views)
Hello

You could have your child panels displayed by using the DisplayPanel() function. To hide the panel, you can use the HidePanel() function. For an example on this , cehck out the example installed under CVI\Samples\userint\panels.prj

I hope this helps

Thanks

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(2,597 Views)
Hi Bilal,

Thanks for your response, but that wasnt exactly what I wanted to know.I believe,it was my fault, that I didnt frame the question properly.

Here is it,

I have a set of Panels(One Parent and 'n' child panels) that are regularly updated in my application(in no particular order).

Now , I also want to the user to be able to view any particular child panel he wants by clicking on the Main Panel.I want the user to have this ability completely throughout my application.

If i make a RunUserInterface() call and if i start processing user events, I will not be able to update my panels whenever i want them to.

The above said is true,if my programming happens in a singe thread.

Now, I have two questions.

First:

Is there anyway apart from
Multithreading , where Ill be able to solve the above problem,ie I should be able to update my panels as well as use process user events for my panels, simultaneously.

Second:

If I can do it only with Multithreading, will i be able to do it in Labwindows CVI 5.0.1

I cannot create a stand alone executable, for different constraints.So, I will be running my application from the project window.

I hope my questions are more clearer now.

Thnks in advance.
0 Kudos
Message 3 of 4
(2,597 Views)
Hello

unless i misunderstood something, you want to be able to make sure that any re-drawing that needs to happen on your child panel will occur, and also, that you will not miss any user events that come thru?

If this is the case, then one thing you can do is make sure that if you insde a loop that takes some time ( and makes the panels seem like they're frozen), call ProcessSystemEvents(), which would make CVI process any messages (drawing and user clicks) queued up. There is also the ProcessDrawEvents() events incase you're worried more about the drawing events not processed.

CVI 5 does not have support for debugging multi-threaded applications, so you might run into problems there.

So basically, I think you're best bet would be usin
g ProcessSystemEvents() and ProcessDrawEvents()s

I hope this helps

Bilal
Bilal Durrani
NI
0 Kudos
Message 4 of 4
(2,597 Views)