LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send Shell commands to Mate Terminal on Linux Debian through LabVIEW

Hello,

I am currently trying to make a LabVIEW VI on Linux Debian to run commands on the Mate Terminal. I know the proper shell commands to use on the terminal to connect an SSH server. Right now, I am in the process to try to make the process automated instead. I've used both SystemExec.VI and Pipes for this purpose. I know the SystemExec.VI requires a script file instead of sending the commands one at a time (if possible I would like to send commands one at a time to include prompts for the operator to verify the IP addresses. However, so far I've been unsuccessful since the first command is executed but then the session turns off before the next command is sent. I haven't attempted to use a shell script file yet, but before I start trying I just wanted to see if there was a better method to send shell commands to the Mate-Terminal (or any other terminal) in an automated manner. 

0 Kudos
Message 1 of 4
(3,214 Views)

Hi mamad95,

 

It seems that the SystemExec.VI would be your best option in this scenario. For clarification, are you looking for the shell to prompt the user or LabVIEW to prompt the user?

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

Neither, I have a set of commands that I want to execute when I open the SSH connection in an automated manner. However, once the first command is done, the connection is opened and then closed immediately afterwards. This issue is not just for SSH connection, but if it is possible to send multiple commands (that depends on the commands before it) to perform certain tasks automatically without the user's input. For example, suppose I would like to generate a text file command (using Vim) and then insert the content (the text) then issue another command to close Vim.

0 Kudos
Message 3 of 4
(3,146 Views)

Okay, was just curious on that clarification as to the expected functionality of what you were trying to accomplish. Regardless, SystemExec.VI will still be your best option in this scenario

0 Kudos
Message 4 of 4
(3,115 Views)