LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Command line output

Is there a way to change the Windows/CVI output on a command line output program so that the screen won't close after compiling. The program brings up the dos command line screen when I compile it but closes once I finish inputing the variables. Is there an option in the preferences or command to keep it open till after I check the output.
0 Kudos
Message 1 of 4
(4,518 Views)
I think, you mean: the program brings up a dos window when _running_ it, right ? (I've never seen a program doing this when compiling it..).
if so, just build the program as 'command line application', then use (call) it from within a (cmd,ps) shell.

--
Once the game is over, the king and the pawn go back into the same box.
0 Kudos
Message 2 of 4
(4,511 Views)

For my CVI based console applications, I generally add the following lines to the end of my programs:

    while (KeyHit ())                   // Purge keyboard buffer
        GetKey ();
    printf ("\nPress a key to finish:");
    GetKey ();                          // Wait for user action
    return 0;

This allows any screen output to be inspected before the program is allowed to finish.

JR

0 Kudos
Message 3 of 4
(4,504 Views)
If changing it to a console application is not an option, another useful trick is to go into the environment preferences dialog (Options>>Environment) and make sure that you have the "Copy standard I/O to Debug Output window" option enabled. If you enable it, at least when you're debugging your project inside CVI, the output will persist in the CVI environment, even after your program terminates.
 
To see the contents of the Debug Output window, select Window>>Debug Output.
 
Luis
Message 4 of 4
(4,471 Views)