NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Executable Window Hidden

When using the function "Call Executable" from my understanding you can set the Initial Window State to "Show Normally, Activated". To me this means that if i run cmd.exe then it will show the black cmd.exe window. This is true when no expressions or standard input is passed to it.

 

My problem happens when I try to run a standard Input Expression or file on local machine (these are the only two that I have tried). When I run either of these additional features my black cmd.exe window fails to display but when I open the Task Manager it is running in the background. Why is that, and how do I get this prompt to continue to show? (it is how I want to view the progress of a 24 hour test that I am running)

0 Kudos
Message 1 of 9
(5,887 Views)

Hi,

 

I have a few questions that should help in the troubleshooting. When you run with a Standard Input can you bring the window to the front manually or do you only see the process? What type of file are you trying to point to (for the File on Local Computer)? How do you have the Wait Options configured?

Evan See
National Instruments
0 Kudos
Message 2 of 9
(5,852 Views)

When I run the call executabe window to my custom .exe and I insert a .txt file in the Standard Input, no window pops up or even opens. I can tell that it is running because the .exe is listed in the Task manager and there is correct communication between the PC and the external microcontroller that is connected.

For my actual program in the Call Settings I am calling a .exe and in the Standard Input I am pointing to a .txt. For testing purposes in the Call Settings I am just calling cmd.exe and pointing to a .txt file with a few basic commands (cd, dir and other basic commands) and I am getting the same results (program running in task manager but no window showing)

For the wait options I have the Wait Condition set to "Wait for Exit" and for the error and failure I have them both set to Ignore.

 

I am kind of at a loss as to what to try next...

0 Kudos
Message 3 of 9
(5,848 Views)

Could you explain what your custom executable is set up to do? What program/language was it created in?

 

The Standard Input/Output was created to more easily call scripting languages, such as Python or Perl. Does this executable has stdin stdout commands in it?

Evan See
National Instruments
0 Kudos
Message 4 of 9
(5,820 Views)

One workaround you might try is to use an external file for the input instead of the callexecutable setting and pass it on the command line as follows:

 

myexe.exe < inputfile.txt

 

-Doug

0 Kudos
Message 5 of 9
(5,802 Views)

My custom executable is a c program that takes voltage points and how long to hold the voltage and sends this data to a microcontroller via usb. The microcontroller then creates a waveform in the time domain and then datalogs specific events that i am measuring. The micro then sends the actual waveform datapoints (actual time it reached x,y) and then also a parameter that I am measuring. This exe never writes back to the comand prompt but to a .txt datalog.

 

What I would like to see is the comand prompt with the input text (that is called from a .txt file) in it so I can verify (manually) that it is working and where it is in my sweep.

0 Kudos
Message 6 of 9
(5,791 Views)

Can anyone verify that if they run the Call Executable and call cmd.exe. Set the initial Window State: Show Normally, Activated. And then Run this step. The window is opened and waiting for input correct?

 

Now go to the Standard Input tab and change the input method to String and run a basic command such as ping

 

dir 

 

1.1.1.1 -n 1 -w 3000 > null 

 

From my understanding of this function this window should also open then list the dir wait 3 seconds and then either stay open or wait for close (depending on how the wait condition is setup). Is my understanding of this correct?

 

When i do these steps the Window does not open and I want to verify that I have not messed something up in my setup.

0 Kudos
Message 7 of 9
(5,772 Views)

I think when you change the input method, stdio is redirected to be set programmatically by TestStand, and thus no console window is created.

 

-Doug

0 Kudos
Message 8 of 9
(5,765 Views)

@wdoler wrote:

My custom executable is a c program that takes voltage points and how long to hold the voltage and sends this data to a microcontroller via usb. The microcontroller then creates a waveform in the time domain and then datalogs specific events that i am measuring. The micro then sends the actual waveform datapoints (actual time it reached x,y) and then also a parameter that I am measuring. This exe never writes back to the comand prompt but to a .txt datalog.

 

What I would like to see is the comand prompt with the input text (that is called from a .txt file) in it so I can verify (manually) that it is working and where it is in my sweep.


I think if you are redirecting input from a file, it will not show that input on the console, unless your application echos that input to stdout.

 

-Doug

0 Kudos
Message 9 of 9
(5,762 Views)