LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LaunchExecutableEx command

I am trying to automate a segger flasher for production testing.  I created a .bat file that runs the jflasharm.exe file with command line paramters.  The .bat file reads the return value from the jflasharm.exe and creates a log file.  If I use the start /min jflasharm.exe to run the file the ExecutableHasTerminated function indicates the program has terminated even though it is still running.  I would like to hide the flasher program in the background and only display my labwindows gui.  Any suggestions?

0 Kudos
Message 1 of 11
(5,120 Views)

Hi Joncombat,

 

What version of LabWindows/CVI do you have? You might be able to find something with the Win32 API Interface to CVI that allows you to minimize windows other than the CVI GUI. See the following links:

 

http://zone.ni.com/reference/en-XX/help/370051Y-01/cvi/programmerref/windowssdkincludefiles/

 

http://zone.ni.com/reference/en-XX/help/370051Y-01/cvi/programmerref/availability_win32_functions/

 

http://zone.ni.com/reference/en-XX/help/370051Y-01/cvi/programmerref/calling_windows_sdk_functions/

 

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 11
(5,099 Views)

I am using 2010

0 Kudos
Message 3 of 11
(5,081 Views)

I am also trying to launch 12 different processes.  it appears labwindows is missing a few and cannot determine that they have stopped running.  Any suggestions?

0 Kudos
Message 4 of 11
(5,076 Views)

Hi Joncombat,

 

The ExecutableHasTerminated function only returns whether an application started with the CVI command LaunchExecutableEx has terminated. So if you're launching processes with a separate executable, CVI would not be able to tell if any of them have terminated (at least with the ExecutableHasTerminated function). 

 

http://zone.ni.com/reference/en-XX/help/370051P-01/cvi/libref/cviexecutablehasterminated/

 

You can make a call into the Win32 API which should allow you to control windows, menus, icons, etc. Look on the MSDN website for calls to minimize other windows and maximize the CVI GUI.

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 5 of 11
(5,055 Views)

I moved this test software to a different pc (DELL 380) and the ExecutableHasTerminated() function causes the executable being launched to be very slow to respond.  Any suggestions?  Is there a cvi environment setting that might be causing this issue?

0 Kudos
Message 6 of 11
(4,849 Views)

What type of computer were you using originally? Is it only on the Dell 380 that you notice this occurrence? Have you tried any other computers.

 

What are other differences on this computer? Is the version of CVI different? What operating system was on each machine?

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 7 of 11
(4,796 Views)

it runs fine on a dell 390 (dual core) but crawls on a dell 380 (single core)

0 Kudos
Message 8 of 11
(4,779 Views)

Hi Joncombat,

 

It makes sense to me that an execution would take longer on a single core processor than on a dual core processor. So that may be what we're looking at. What do you mean when you say that the executable launched is slow to respond? Does it take a while to launch and then runs fine or is it constantly slow to respond? What happens in this executable? What is the overall goal?

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 9 of 11
(4,755 Views)

its consitantly slow.  it should take 10 seconds to run the programming routine.  on the Dell 380 it takes 1 minute +

0 Kudos
Message 10 of 11
(4,738 Views)