LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using pipe IO in Labview 6 for Solaris

Hi,

I need to be able to communicate with a process from Labview. As I'm
using UNIX pipes seem to be a neat way of achieving this. However,
I've never used them before and am a little confused. Specifically the
"open_pipe.vi" requires "path to named pipe" as an input. How do I
determine the what the path to a named pipe is and/or how do I control
the name of the pipe if I open it first in the process I need to
communicate with?

As I understand it I will need two pipes - one to write to and one to
read from.

Any advice and pointers to web resources would be appreciated.

Many thanks,

Craig.
0 Kudos
Message 1 of 3
(2,982 Views)
Craig,
A pipe is essentially a file in UNIX (with some special features). For 'path to named pipe' you give it a path like any other file. The file is a fifo
(First In First Out) and is used (as you suggest) to communicate between applications. The main problem you will run into is that the application must understand how to use the named pipe. If it can't do that then you will have to come up with something else.
The basic operation would be:
Use Open pipe to create the named pipe file.
Start the application and point it's input / output
to the named pipe.
Use the Read and Write to communicate.
You should also realize that the read pipe, will read x bytes so you must know EXACTLY how many bytes to read. If you read too many you will simply get some part o
f the next item.

I have tried to use these before and never had any real success since there are so many problems with the process.
Good Luck
Kevin
0 Kudos
Message 2 of 3
(2,982 Views)

Hi, Craig

have you had any solution for this? I am also looking for this for Linux, but could not figure out how to connect the openPipe, the 'path to named pipe' is

unwriteable. and no other info available from LabView 8.2 help either.

Thanks

Xiaofeng

0 Kudos
Message 3 of 3
(2,693 Views)