LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Linux system command pipes

I am trying to integrate TCL scripting code with  LabVIEW in a way I can send every TCL command separately and read back the results (under Linux platform).

From searching and reading information on web pages I found out that the best way to do so is by using the System command pipes .

I tried to do it but with no success I couldn't write or read from the pipe. I also didn't find any example how to implement the command pipes.

 

Does any one has any example (labView 2009 Linux) of opening a system command pipes reading  data from it and writing data to the pipe?

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

Hello,

Here is an example that should help you get going.

Together with the help documentation, you should be able to get that Tcl code integrated.

Let us know how it goes, and feel free to upload an example once you get it working!

Jacob R. | Applications Engineer | National Instruments

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

Hello

 

The examples are for named pipes and it works fine for passing data to the pipe and read the data from it.

But it cannot processes commands. In order to write Tcl commands I need pipe that is able to interpreter commands.

So I tried the system command pipes but it can only process bash commands like ls or pwd but I didn't find a way to open the tclsh and process commands in TCL.

I had another problem with concatenating commands got error 6.

 

I attached the file I created can you find what I am doing wrong?

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

Hello,

Your program layout seems to be fine. I think it may be with the how you are trying to run tcl commands as bash commands. I believe the Open System Command Pipe VI only takes bash commands.

Take a look at this and let me know if that helps. It shows how to embed tcl script in bash script.

 

Jacob R. | Applications Engineer | National Instruments

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