LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

standard input communication between applications

Hi,

I need to process the data aquired in labview via some third party app, residing in a separate terminal. 

I may easily launch it through system exec vi, though I would need more interactive communication.

The typical scenario would be launching this app (ROOT toolkit from root.cern.ch, actually), 

keeping it's command line window open and at given times signalling this app launched from labview to update the data analysis stuff.

(this means connecting to an existing quite big project, and rewriting that in Labview would not be a great idea).

 

What I would like to achieve is:

 (sorry for bad 'pseudocode' down there):

 

open 'daughter' analysis app

 

while I need data:

     gather some data,

     write it to the disk,  (easy, no problems there)

     write to the standard input of the daughter app 'execute analysis'

 

 

Can such writing to a daughter process be achieved? What would be 'correct' way of doing that?

 

Regards

Michal

 

 

Message Edited by mdwuznik on 12-11-2008 11:27 AM
0 Kudos
Message 1 of 4
(2,897 Views)

Hi mdwuznik,

      This question has come up before and I don't think it's generally possible to write to StdIn or read StdOut while the DOS window is executing.  If LabVIEW is launched from a DOS window, then it's possible to read StdOut (via the Windows API)  but that's not what you're after...

 

      Perhaps you could open a telnet session to the PC (from LabVIEW) and run the third party app "interactively" - instead of using System Exec(?)

 

After creating a special user and "TelnetClients" group, I've just telnetted to the PC I'm sitting at - obtaining a C:\ prompt.

 

Cheers!

Message Edited by tbd on 12-11-2008 11:43 PM
Message Edited by tbd on 12-11-2008 11:44 PM
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 2 of 4
(2,868 Views)

Well, I found both ends to be TCP-aware enough, that I pass messagese through localhost tcp connection instead of standard input/output.

Solved the handshaking problems too... 

0 Kudos
Message 3 of 4
(2,850 Views)

As it appears ROOT is not just some typical DOS app (that needs to be run from a "command line window",) here's a link for interested readers. (see Networking pdf.)

 

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 4 of 4
(2,839 Views)