Solution
You can take advantage of the networking capabilities that LabVIEW, LabWindows™/CVI™, and Measurement Studio offer with IMAQ hardware and software. There are several ways for you to stream video from one networked computer to another.
- TCP/IP
- DataSocket
- LabVIEW Web Server
- LabVIEW Web Services
- Creating an ActiveX Control for the Web
- Network Streams
- Network Shared Variables
TCP/IPTCP/IP is a great way to transfer images over the network. TCP/IP offers reliable, guaranteed, and ordered delivery of data over a network. Unlike DataSocket, TCP/IP has less overhead for each packet, which results in faster transfer rate. Both the sender and receiver are required to be actively listening on the same port for the application to work. You can implement your program such that you have multiple clients on the same port, however you will need to manage each session programmatically yourself.
Streaming Images from a Compact Vision System to a Local AVI demonstrates how to stream images from a CVS to a Windows machine using TCP communication and save the images to an AVI.
DataSocket DataSocket is a programming tool that enables you to read, write and share data between applications and/or different data sources/targets. DataSocket can access data in local files, HTTP, and FTP servers. DataSocket is easy to use and all of the client/server sessions are handled automatically by the DataSocket server. The DataSocket server also has security features implemented to ensure that only clients you want can log on. DataSocket does NOT guarantee proper delivery, so you can miss frames.
LabVIEW Web Server You can take advantage of the Web Publishing capabilities in LabVIEW to publish images on a front panel VI to the web via the LabVIEW Web Server. This is easy to do and takes no additional programming. However, the display will be non-deterministic and most likely it will have a "flashing" update. Since the entire front panel is published as an image of the HTML page, the entire image will update each time. This may take a long time, and unnecessary updates of other front panel objects will be done. Refer to Creating HTML Documents and Embedding VI Front Panel Images in the
LabVIEW Help for more information.
LabVIEW Web Services LabVIEW Web Services allows you to remotely monitor a LabVIEW application using a custom web-based client. A simple example of this would be a VI that acquires images and publishes them to the web. The advantage of this over the traditional LabVIEW Web Server is that it's possible to publish only the acquired image, instead of an image of the entire front panel. However, unlike with the Web Server, some programming is required for implementation.
Refer to
Auto Refresh for LabVIEW Web Service Using LabVIEW for more information.
Creating an ActiveX Control for the WebBoth DataSocket and IMAQ functionalities can be used through a web using an ActiveX control. To develop the DataSocket web page, you must create a DataSocket reader component with which users connect to the server, automatically read and display the IMAQ image and disconnect from the server. You can create component with ActiveX controls and Visual Basic code to manipulate those controls and save this component as an ActiveX control. After making the ActiveX control, you can insert it into a web page.
Refer to
Measurement Studio Help for more information.
Network StreamsNetwork Streams allow easily configurable lossless communication of data over a network. They require both a reader and writer endpoint of which there must be a 1 to 1 match, but provide an easy way to create lossless TCP/IP communication.
Network Shared VariablesNetwork Shared Variables provide a quick and easy way to configure network communication between NI applications. They are configured at edit time, and can be used to transfer a variety of data types. Network Shared Variables can be configured with buffers to allow lossless data transfer, or as lossy transfer mechanisms to ensure up-to-date data. One advantage of Network Shared Variables is that they can have both multiple readers and multiple writers.
Refer to
Using the LabVIEW Shared Variable for more information.