LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide the standart console and use only CVI Stdio window?

Hallo,
I have to use in an Labwindows program extra dos console for an interpreter, and I would like to use CVI_STDIO_WINDOW Stdio port, but when I compile the project, in the background appear also the HOST_SYSTEM_STDIO port console!
The question is how to hide the normal console so that I can use only CVI window for Stdio console?
Another question is how to redirect the stdout to CVI_STDIO_WINDOW?
The printf function write now in the other console.
I am sure that I am doing something wrong, but what?:-(

Thank?s and Regards,
Nikolai
0 Kudos
Message 1 of 7
(4,161 Views)
You can set which window you use for STDIO with the function SetStdIOPort. Set it to CVI_STDIO_WINDOW to use CVI's Standard I/O window instead of the console.

Best Regards,

Chris Matthews
National Instruments
Message 2 of 7
(4,161 Views)
Hallo Chris,

I think the problem is a bit more complicate since I am using embedded TCL interpreter, which is running in a separated thread. I have following effect when I stats the program. The both CVI stdio and standard console appears and I am not able to force the window to appear only CVI style, also when I set CVI_STDIO_WINDOW to SetStdIOPort. Most probably the stupid TCL interpreter opens his own stdout and writes the output always there, so finally I have two console windows one in CVI style where I am able to write the commands and another one for the results. When I see the whole this story, I am start to crying!

Best Regards,

Nikolai
0 Kudos
Message 3 of 7
(4,161 Views)
I'm not sure what library you are using for the TCL script coding, but it apparently is opening a separate console and we can't control that. That code would have to be written and linked with the CVI RTE in order to follow our STDIO rules. You probably have no way of eliminating the console window from the TCL library calls.

Chris
0 Kudos
Message 4 of 7
(4,161 Views)
Yes, I also think there is no way and finally I found that?s not look so bad with the standard console. I can live with this! 🙂

Best Regards,

Nikolai
0 Kudos
Message 5 of 7
(4,161 Views)
Hi Nikoloai,

I have a problem like that you described. I don't know if your problem was the TCL interpreter.
I am not using any TCL interpreter and I have the same annoying windows.
Moreover, I had an application whithout threads management running well and, when I programmed threads, the console begans to appear.
I think then that our problem is based on threads, on something that we are doing wrong.

Have you encountered the solution to your problem?, or in general, has anybody an idea about what is happening?

Best regards,
silmarba.
0 Kudos
Message 6 of 7
(4,161 Views)
Hello Nikoloai:
I am sorry because I thought that the problem was the thread management. It was not.
My problem was that I put the "Create console Application" option to true.
Maybe this solution is the yours too. To disable the option your must go, from the project window:
"Build"->"Target Settings..."

I hope this helps to you.

Best regards,
silmarba.
0 Kudos
Message 7 of 7
(4,161 Views)