This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Redirecting Standard Input/Output for LabWindows™/CVI™ Executables

Updated May 11, 2018

Reported In

Software

  • LabWindows/CVI

Issue Details

I have created a LabWindows/CVI executable that contains standard Input/Output (I/O) commands such as printf(). I am calling this executable externally from the Windows command prompt and would like the output to be redirected to the Windows console instead of the LabWindows/CVI console.
Is this possible?

 

Solution

Yes, is it possible to redirect standard I/O is possible. 

By default, LabWindows/CVI uses its own console for standard I/O commands.
To redirect the commands, open your LabWindows/CVI project, select Build » Target Settings, and enable the Create console application option.
If you disable this option, LabWindows/CVI creates your executable as a Windows GUI application.
If you enable this option, LabWindows/CVI creates your executable as a console application. Console applications create a Windows console window (Command Prompt or MS-DOS Prompt) and set the standard I/O port to the console. 

Rebuild your LabWindows/CVI executable, call it from the Windows command prompt and notice the redirection of the standard I/O commands.