LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format intensity graph into common streaming video format

I am collecting data, which is continuously plotted as a 3-d intensity graph.

I would like to stream these graphs, or "images" real time over
an internet connection to remote viewers. Is there a way of encoding and
streaming the data so that viewers can see it in Windows Media Player?

I have Labview 7.0 and NI Vision.

Thanks,
Christine
0 Kudos
Message 1 of 5
(2,934 Views)
I’m not sure about streaming information to Windows Media Player, but LabVIEW does provide a really nice way of streaming information (including 3D graphs) via DataSocket. In fact, there is even an example program that ships with LabVIEW to demonstrate streaming live images via DataSocket. The example is called DS 3D Graph Reader.vi and DS 3D Graph Writer.vi and are located in C:\Program Files\National Instruments\LabVIEW [x.x]\examples\comm\datasktxwin.llb.

Hope this helps. 🙂
0 Kudos
Message 2 of 5
(2,900 Views)
Christine,

Kileen has an excellent suggestion, as always, but I am going to guess that you have the following constraints:
- Your remote viewers may not have LabVIEW or may not want to run a LabVIEW application to view your data
- You may not want to do much additional programming to support the functionality

The first constraint is probably the big one. My initial solution was to suggest using the LabVIEW Web Publishing tool (Tools >> Web Publishing Tool) to publish your front panel so that it could be viewed and/or controlled remotely. However, the 3D Graph does not show up properly in a remote panel. This technique also requires an extra download of a browser plugin/run-time engine for each remote viewer.

After some thought, I came up with a better idea:
- Modify your VI to spit out snapshots of its front panel on a periodic basis (very easy) and save them to disk
- Create a simple Web page that displays that image and automatically reloads it on a periodic basis
- Use the LabVIEW Web server (or, really, any Web server like Apache, etc.) to publish the Web page

I modified a 3D Surface Graph example that ships with LabVIEW to do all of this (see attached, LV 7.0). Just run the example and it should fire up a Web page with a pseudo-streaming image of the VI's panel. Anyone can access the page as long as there are no firewall restrictions, and no special software of any kind is needed by the remote viewers.

Hope this is closest to what you were after,
John
Message 3 of 5
(2,891 Views)
Wow, this is an awesome alternative solution, John. Kudos to you for the example -- I'm quite impressed. I agree that my previous solution did have its constraints. I had thought of remote front panels, but had overlooked the fact that you can specify the refresh rate of the VI to simulate the streaming data nature of updating the graph.

Good call on this one!! 🙂

Kileen
0 Kudos
Message 4 of 5
(2,886 Views)
For completeness, I should probably point out that the LabVIEW Web server ships with an even easier way to view a VI front panel that doesn't involve any browser plugin or code at all. I'm referring to the ".snap" and ".monitor" directives that you can use with the LabVIEW HTTP server.

I don't really like the .monitor approach for trying to view a panel animation, though, because it doesn't work with all browsers, and I'm definitely a Firefox fan. There are workarounds, and they involve coding the HTML to force a refresh, much like my example does. My alternative approach here has the potential benefit that it can piggyback onto an existing, non-LabVIEW HTTP server.

--John
Message 5 of 5
(2,817 Views)