Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Redirecting Standard Input/Output for LabWindows/CVI Executables

Primary Software: LabWindows/CVI Development Systems>>Full Development System
Primary Software Version: 8.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I have created a LabWindows/CVI executable that contains standard Input/Output (I/O) commands such as printf(). I am calling this executable 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, the ability 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.

Related Links:
KnowledgeBase 2QE9312G: Redirecting Standard Input/Output in the LabWindows/CVI Development Environment

Attachments:





Report Date: 09/01/2006
Last Updated: 09/14/2006
Document ID: 410FG2KG

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit