From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Streaming Images from a Compact Vision System to a Local AVI

Code and Documents



This example demonstrates how to stream images from a remote Compact Vision System (CVS) to a local Windows machine through TCP communication. The streamed images are then saved to an AVI file on the local machine.

The attached project, Stream CVS.lvproj, includes two VIs., which runs on the CVS, acquires images continuously from a Firewire camera using the high-level acquisition VIs, flattens the images to string data, and sends the data to the local machine through TCP/IP communication., on the local Windows machine, receives the string data, unflattens it back to images, and saves the images to an AVI file.



1.  Enter TCP Port, Timeout, Camera Name, and JPEG Quality values on Front Panel.

2.  Enter Remote IP Address and Remote Port values on Front Panel.

3.  Enter AVI Frames Per Second value and select various AVI Compression Filter options on Front Panel.

4.  Run

5. Run

6.  When prompted, select AVI file to write to.

7.  To stop acquisition, press STOP button on Front Panel.


Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.