LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
ryk

Suggestion 2 for Network Variable libraries in LabWindows/CVI.

Status: New

Include a function to programmatically re-start the NI Variable Engine if it is found to be stopped.

Although the NV libraries include a function to detect whether the NI Varible Engine service is running, there is no function included in the library to facilitate re-starting the NI Variable Engine service. 

For those The method that I am aware of to restart this service is to use the ANSI C system() function with an embedded command line:

 

 

Index = 0;                                           

CNVVariableEngineIsRunning(&running);

while((!running) && (index++ < 5))

{

System(“net start \"NI Variable Engine\"");

                Delay(0.1);

                CNVVariableEngineIsRunning(&running);

}

if(!running) return -1;

 

Learning this required some time spent on the web, looking through old posts on how to solve the same problem in LabView.  Rather than spending that time, it would have been more productive to just pull it out of the library.