This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Using Remote IP/GigE Camera With NI MAX and LabVIEW

Updated Sep 23, 2022

Environment

Driver

  • Vision Acquisition Software

Other

  • Ethernet IP camera
  • GigE camera

This article explains how to use IP/GigE cameras located on different subnets compared to the host PC.

Before trying any of the steps explained in this article make sure you have a basic connection with the camera by trying a ping command. If you do not get a successful connection contact your IT team to solve this issue. 

IP Camera

NI only supports Internet Protocol (IP) cameras manufactured by Basler and Axis and Vision Acquisition Software (VAS) version 18.5 or earlier is required.
  • NI MAX

    • In order to detect a remote IP camera on NI MAX, the following steps must be followed:
      • Add the IP camera information to a file named "IPCameras.ini" and saved it in C:\Users\Public Documents\National Instruments\NI-IMAQdx\Data
      • The IP camera information includes the following:
        • [IPcameras]
        • Serial_Number* = IP address, URL, Vendor, Model
      • Note: Add an empty line after the last entry.
      • * The Serial_Number must be numerical (decimal) and there is no need to match the real camera's Serial Number. Using hexadecimal or other numeric representations could make NI MAX not able to recognize the camera. For example, if your camera's Serial Number is "CA5CF22", use "12345" instead (you can use any other decimal value). The Serial Number must be unique for each camera.
Screenshot_1.png
The image above shows an example of an IP camera Axis M1031 (Model) from AXIS (Vendor), with the Serial Number 12345 and the IP address 10.2.164.25. The URL can be obtained from the camera's documentation. For this example, the following tool was used.

At this point, the camera should be available on NI MAX under My System >> Devices and Interfaces >> Network Devices.
  • LabVIEW

    • Once the IP camera is detected properly on NI MAX you can use it normally in LabVIEW by using the camera Name.

GigE camera

  • NI MAX

    • Remote GigE cameras can not be added to NI MAX.
  • LabVIEW

    • Despite you can not use remote GigE cameras from NI MAX, you can do it from LabVIEW. To achieve this you need to use the IMAQdx Discover Ethernet Cameras.vi and format the Session In input of the IMAQdx Open Camera.vi to ip:<Camera IP Address>.
Screenshot_1.png
 
 
 

The following images show the results on NI MAX and LabVIEW after following the steps described above.

IP Camera

  • NI MAX

IP MAX.png
  • LabVIEW

    • Using the Grab.vi LabVIEW (2018 SP1) example with the "cam0" Axis IP camera.

IP FP.png

GigE Camera

  • LabVIEW

    • Using the Acquire Every Image.vi LabVIEW example with the GigE Camera (IP address = 10.34.9.91)
GigE BD.png
The block diagram must be modified to include the IMAQdx Discover Ethernet Cameras.vi and format the Session In input of the IMAQdx Open Camera.vi to ip:<Camera IP Address>.
GigE FP.png