LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I run different commands in the same system exec window?

I want to open a window (cygwin) on my Xp machine and sent commands within that window. I then have to monitor what the responses are coming back into the window that was launched. Any ideas on how to do this? I have been playing with the system exec VI but can't seem to get it to do what I want. Any help would be appreciated. Thanks - Troy
0 Kudos
Message 1 of 8
(2,752 Views)
What sort of monitoring do you want to do? Perhaps it would be feasible to pipe the output of the command to a text file which you could then read into LabVIEW for analysis?
0 Kudos
Message 2 of 8
(2,729 Views)
What I am trying to is this...I already have the VI running setting up power levels, and monitoring other data. I then get to a point when I am ready monitor udp traffic for test across my link. Right now what I do is bring up a Cygwin window and send the traffic which is monitored at the other end of my network by another Cygwin window. This window is easily brought up via the system exec VI but then what I want to do is enter commands to start the traffic flow on one side of the network and monitor in the other window for packets that are being received/dropped.
0 Kudos
Message 3 of 8
(2,720 Views)
OK - so what I have found by looking around is I can open my cygwin window, send the commands to it using the windows scripting host invoke node and execute the test. Now the other half of the problem is how do I monitor what is being received in that window. In other words I have data that is being continuously updated in the receiver window that I have to monitor. Any ideas...?
0 Kudos
Message 4 of 8
(2,699 Views)
Hello,
 
Have you tried setting the wait until completion to true on the System Exec VI?  If so, the LabVIEW documentation claims that the parameter "standard output returns information from the program you called if wait until completion is TRUE. If wait until completion is FALSE, System Exec returns an empty string."
 
Could this be the answer to the problem of getting the data returned?
 
I hope this helps!
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 5 of 8
(2,679 Views)
If your output is text, can't you re-route the screen output to a text file by appending "> dosdata.txt" to the command line?

This will output the text to the above-mentioned text file which can then be read / controlled via LV.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 6 of 8
(2,671 Views)
JLS - I understand what you are saying here and have used that implementation before in many VIs. The problem is that I open a system exec window and then I have to log onto the machine I am using to receive the data. Then within that same window I have to send another command to initiate the program to receive the data that I am sending. That is where I was getting hung up. Thanks for the reply.
0 Kudos
Message 7 of 8
(2,665 Views)
I can output the text to a file and then read it. I thought of that before but this data I am reading is coming at me every second. That is alot of h/d interaction that I did not want to have to do. One of my s/w engineers helped me a little later by letting know about a utility for Linux called Netcat. This utility allows you to read and write data across a network connection. This implementation seems to be working fine. Thanks all for the replies to this subject.
0 Kudos
Message 8 of 8
(2,664 Views)