LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

runuserinterface in parallel

I would like to have a gui that runs in parallel with the main thread of my code. I tried the following but the program does not give me access to my gui when I do this. My goal is to be able to have this panel continuously running from a dll call in teststand. What to I have to do to obtain parallel access to the gui while the program runs?
 
 
int CVICALLBACK GUIThreadFunction (void *functionData) {
    DisplayPanel (manual_panel_handle);
 RunUserInterface();
return 0;
}
Inside main
 manual_panel_handle = LoadPanel (0, "operator_gui.uir", MAN_PAN);
 DisplayPanel (manual_panel_handle); 
 CmtNewThreadPool (1, &pool_handle);    
 CmtScheduleThreadPoolFunction (pool_handle, GUIThreadFunction, NULL, &functionId);
 
  while(1) Delay(1);
0 Kudos
Message 1 of 6
(3,852 Views)

Hi Steve,

The simple thing to do is to launch your GUI via a step in a SequenceCall. Make this SequenceCall step to run in a New Thread or New Execution which you can do in the Specify Module dialogbox for the SequenceCall step type.

There are examples of running steps in parallel in the teststand\examples folder or on the NI website.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 6
(3,837 Views)
I don't see any multithreading options. All I see is a checkbox with "Always run in process". What example should I look at? There are quite a few and I don't understand what they are doing.
0 Kudos
Message 3 of 6
(3,823 Views)
Hi Steve,

Which version of TestStand are you using? Look at the attached screenshot to see the run in "New Execution" option.

Regards,
0 Kudos
Message 4 of 6
(3,819 Views)
Hi,
 
Highlight the SequenceCall step and select 'Specfy Module...'. The Edit SequenceCall Dialog will be displayed.
In the Edit SequenceCall Dialog and the control is Multithreading and Remote Execution.
 
Regards
Ray
 
 
Regards
Ray Farmer
0 Kudos
Message 5 of 6
(3,818 Views)

Hi,

There is this example

http://zone.ni.com/devzone/cda/epd/p/id/3386

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 6 of 6
(3,816 Views)