02-12-2014 07:01 AM
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?
02-13-2014 02:19 PM
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/
02-14-2014 06:07 AM
I am using 2010
02-14-2014 08:12 AM
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?
02-17-2014 10:57 AM
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.
05-22-2014 11:07 AM
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?
05-27-2014 02:42 PM
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?
05-28-2014 05:32 AM
it runs fine on a dell 390 (dual core) but crawls on a dell 380 (single core)
05-29-2014 10:51 AM
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?
05-30-2014 05:25 AM
its consitantly slow. it should take 10 seconds to run the programming routine. on the Dell 380 it takes 1 minute +