LabVIEW

cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Display data in Command Prompt

Hi,

I am logging data in text file in parallel I would like to display the CMD prompt as console output.

Something like Printf function.

How to achieve this.

Thanks,

Visuman

0 Kudos
Message 1 of 8
(6,398 Views)

Can you made string indicator and update it?

Or you want write in win CMD?

0 Kudos
Message 2 of 8
(6,396 Views)

I want to write in windows command prompt.

0 Kudos
Message 3 of 8
(6,389 Views)

there is the "System Exec.vi".

and cmd /c echo "Hello World!" for the 'command line' input will print to the command line. but a new window will open and close immediately.

 

even if you start you VI.exe from the cmd window, output from the system exec vi will not be seen there.

 

the best solution would be to log to file, and you could use the windows equivalent of 'tail -f FILE'.

 

but i'd like to be corrected.


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 4 of 8
(6,364 Views)

Yeah agree, I don't want to open each time separate CM window.

I do open the EXE with batch file and I would like to update the status of exe in the same CMD prompt.

 

Thanks Visuman

0 Kudos
Message 5 of 8
(6,359 Views)

a hackish solution:

 

save the following as "run.ps1"

Start-Process "BASEPATH\labview-cli-test.exe" -WindowStyle Hidden
Get-Content "BASEPATH2\test-logfile.txt" -Wait

then from a powershell run "run.ps1"

 

this will execute labview-cli-test.exe in the background, and then it will wait on changes to test-logfile.txt until you stop with CTRL+C.

 

note that the test-logfile.txt must exist when the command is executed


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 6 of 8
(6,350 Views)

Hi,

While executing showing error unknown parameter "run.ps1"

in CMD window.

0 Kudos
Message 7 of 8
(6,316 Views)

as i said in my post, this is a powershell script,

CMD prompt does not have the necessary tools.


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 8 of 8
(6,309 Views)