LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using a (tcl) script as source of data for VI

hi,

novice here, under a deadline.

we would like to display data coming from running a shell script. the data is a stream of lines, each with a datapoint as a floating point number.

bash$ ./my.tcl
12.5
15.2
18.3
17.2
14.3
...

the first tutorial, with a waveform graph and a stop button is what the display should look like (we'll enhance it later).

for input, though, instead of getting a simulated sine signal, we would like to read the output of the my.tcl script.

we found one example, but it calls wish (the tcl interpreter), once and it ends. we need to read a stream continuously.

all this under labview 8.5 for linux (under centos 4, if that matters).

we want to get the basics going. so that is the basic question.

later, once the basics are working, we would like to split what comes out of the script in channels.
the script will spit this out, e.g.:

port0: 10.2
port0: 11.3
port1: 11.2
port0: 13.4
port1: 15.2
...

you get the idea. multiple channels will be bundled in the standard output and they will need to be demultiplexed. they may come in in bursts (e.g. three readings at a time from port 0, two from port one, ...etc.).

we have some amount of control as to what the output of the script looks like.

we just got started two days ago with labview, and it's cool. however, connecting it to read from the external world in the way that it exists now is what we have not been able to do yet.

any help will be deeply appreciated, as we adopted this solution after dumping the atteempt to use tcl as the front end view, since we would like to do more sophisticated things down the road and labview is great for that.

thanks in advance!

carlos
0 Kudos
Message 1 of 2
(2,712 Views)
You need to do that with pipes.

There is some code to do that (OGPipes) but it was never finished (as far as
I know). I recently used it, but it has only support windows. Not much
helpful for you...

What I get from the Linux resources on the web, pipes are a lot easier to
implement then under windows. I might need to do this in a few weeks myself,
but don't have a Linux machine at the moment. Making a library wrapper in C
is probably the easiest way, altough you should be able to call the Linux
libraries for pipes directly from LabVIEW.

Regards,

Wiebe.


0 Kudos
Message 2 of 2
(2,694 Views)