Main Content

GigE Vision Hardware

Troubleshooting GigE Vision Devices on Windows

If you are having trouble using the Image Acquisition Toolbox™ with a GigE Vision® camera on a Windows® machine, using the toolbox's gige adaptor, try the following:

  1. Install the Image Acquisition Toolbox Support Package for GigE Vision Hardware.

    Starting with version R2014a, each adaptor is available separately through MATLAB® Add-Ons. See Image Acquisition Support Packages for Hardware Adaptors for information about installing the adaptors.

  2. Go through the configuration steps of the GigE Vision Image Acquisition Quick Start Guide.

    In particular, confirm that:

    The installed Ethernet network adapter driver is provided by the network adapter manufacturer (and is not a custom high-performance driver installed for use with a third-party imaging application).

    Any packet filtering drivers from a third-party imaging application or an antivirus program are disabled (unchecked) in the camera connection Network Settings.

    A firewall is not blocking communication with the camera.

  3. Confirm that another imaging application is not connected to the camera.

  4. To refresh the list of detected devices, execute imaqreset followed by imaqhwinfo.

    imaqreset
    imaqhwinfo('gige')

    When using the gigecam interface, use the gigecamlist command to show a list of the detected GigE Vision cameras:

    gigecamlist
  5. Confirm that the camera is detected with other GigE Vision compliant imaging applications.

  6. Confirm that there are no issues with the GenICam™ runtime libraries installation (such as a conflict with a third-party imaging application) by executing the imaqsupport command and checking for any error messages in the GENICAM section.

    imaqsupport
  7. Certain camera vendor software setup programs also install DirectShow drivers for use with GigE Vision cameras. Uninstall the DirectShow drivers by using the vendor's software setup program, as these DirectShow drivers might cause issues with the camera being detected when using the gige adaptor.

Troubleshooting GigE Vision Devices on Linux

If you are having trouble using the Image Acquisition Toolbox with a GigE Vision camera on a Linux® machine, using the toolbox's gige adaptor, try the following:

  1. Install the Image Acquisition Toolbox Support Package for GigE Vision Hardware.

    Starting with version R2014a, each adaptor is available separately through MATLAB Add-Ons. See Image Acquisition Support Packages for Hardware Adaptors for information about installing the adaptors.

  2. Verify that the adaptor loads. You can use the imaqhwinfo command to list installed adaptors. The gige adaptor should be included on the list.

    If it does not load, make sure that GenICam is configured correctly using the imaqsupport function.

    If your camera requires a GenICam XML file on a local drive (most do not), and the adaptor loads but no devices are shown, check the MWIMAQ_GENICAM_XML_FILES environment variable, and make sure it contains the directory where your camera’s XML file is located.

  3. Make sure you did not install your camera vendor's filtering or performance networking driver. If you did, you should uninstall it.

  4. Make sure the Ethernet card is configured properly.

    For more information on this, see Types of Network Hardware Configuration.

    Also, if you have multiple cameras connected to multiple Ethernet cards, you cannot have them all set to automatic IP configuration. You must specify the IP address for each card and each card must be on a different subnet.

  5. Examine the connectivity of your device separately from using the Image Acquisition Toolbox. You may find using ping -b, arp, route, and ifconfig helpful with this.

  6. If your acquisition stops due to a dropped frame, you can set the IgnoreDroppedFrames property to 'on' to continue your acquisition with dropped frames. When this property is 'on', the NumDroppedFrames property keeps track of the number of frames dropped while the acquisition is running.

  7. You might receive an error message such as:

    “Block 23 is being dropped because packets are unavailable for resend.”

    If it does not mention buffer size, it is likely that packets are being dropped due to overload of the CPU. To lower the CPU load, raise the value of the PacketSize device-specific (source) property. In order to do this, you must be using hardware that supports jumbo frames.

    You might also want to calculate and set the PacketDelay device-specific (source) property.

    Also, if you are using a CPU that is older than an Intel Core® 2 Quad or equivalent AMD®, you might experience this type of error.

    If you have a slower computer and experience packet loss using the GigE Vision adaptor, you can set a packet delay to avoid overloading the computer. This action is useful in solving the performance issue if you cannot achieve your camera’s frame rate. The PacketDelay property is initially set to use your camera’s default value. You can then adjust the value if needed. The TimeStampTickFrequency property is read-only, but is available for calculating the actual packet delay value is being used.

    For more information on the new PacketDelay property and how to calculate packet delay, see this solution:

    https://www.mathworks.com/support/solutions/en/data/1-F36R0R/index.html

  8. If you are able to start acquisition without error but do not receive any frames, and if you are using a larger PacketSize, make sure that your hardware and the network between the computer and the camera support jumbo frames, and also that your Ethernet interface is set to allow them at the size that you are attempting to use.

  9. If you receive an error that says a block or frame is being dropped because a packet is unavailable for resend, one likely cause is that the buffer size of the socket could not be set to the reported value, for example 1000000.

    See your system administrator about using sysctl for net.core.rmem_max. For example, the system administrator could try:

    sysctl -w net.inet.udp.recvspace=1000000
  10. If your camera does not start a new acquisition at block 1, the toolbox attaches the block ID (frame ID) as metadata to the frame. If you want to know if you lost initial frames, you can check the metadata. If the first frame's block ID is not 1, you may have some missing frames. For example, use this command in MATLAB:

    [d t m]=getdata(vid,2);
    m(1)

    The answer includes the Block ID and the FrameNumber.

  11. Run the imaqsupport function for further troubleshooting information.

Troubleshooting GigE Vision Devices on macOS

If you are having trouble using the Image Acquisition Toolbox software with a GigE Vision camera on a macOS machine using the toolbox's gige adaptor, try the following:

  1. Install the Image Acquisition Toolbox Support Package for GigE Vision Hardware.

    Starting with version R2014a, each adaptor is available separately through MATLAB Add-Ons. See Image Acquisition Support Packages for Hardware Adaptors for information about installing the adaptors.

  2. Verify that the adaptor loads. You can use the imaqhwinfo command to list installed adaptors. The gige adaptor should be included on the list.

    If it does not load, make sure that GenICam is installed and the environment variables exist. You can check this using the imaqsupport function.

    If your camera requires a GenICam XML file on a local drive (most do not), and the adaptor loads but no devices are shown, check the MWIMAQ_GENICAM_XML_FILES environment variable, and make sure it contains the directory where your camera’s XML file is located.

  3. Make sure you did not install your camera vendor's filtering or performance networking driver. If you did, uninstall it.

  4. Make sure the Ethernet card is configured properly.

    For more information on this, see Types of Network Hardware Configuration.

    Also, if you have multiple cameras connected to multiple Ethernet cards, you cannot have them all set to automatic IP configuration. You must specify the IP address for each card, and each card must be on a different subnet.

  5. Examine the connectivity of your device separately from using the Image Acquisition Toolbox. You may find using ping -b, arp, route, and ifconfig helpful with this process.

  6. If your acquisition stops due to a dropped frame, you can set the IgnoreDroppedFrames property to 'on' to continue your acquisition with dropped frames. When this property is 'on', the NumDroppedFrames property keeps track of the number of frames dropped while the acquisition is running.

  7. You might receive an error message such as the following:

    “Block 23 is being dropped because packets are unavailable for resend”.

    If it does not mention buffer size, it is likely that packets are being dropped due to overload of the CPU. To lower the CPU load, raise the value of the PacketSize device-specific (source) property. In order to do this, you must be using hardware that supports jumbo frames.

    You might also want to calculate and set the PacketDelay device-specific (source) property.

    Also, if you are using a CPU that is older than an Intel Core 2 Quad or equivalent AMD, you might experience this type of error.

    If you have a slower computer and experience packet loss using the GigE Vision adaptor, you can set a packet delay to avoid overloading the computer. This setting is useful in solving the performance issue if you cannot achieve your camera’s frame rate. The PacketDelay property is initially set to use your camera’s default value. You can then adjust the value if needed. The TimeStampTickFrequency property is read-only but is available for calculating the actual packet delay value is being used.

    For more information on the new PacketDelay property and how to calculate packet delay, see this solution:

    https://www.mathworks.com/support/solutions/en/data/1-F36R0R/index.html

  8. If you are able to start acquisition without error but do not receive any frames, and if you are using a larger PacketSize, make sure that your hardware and the network between the computer and the camera support jumbo frames, and also that your Ethernet interface is set to allow them at the size that you are attempting to use.

  9. If you receive an error that says a block or frame is being dropped because a packet is unavailable for resend, one likely cause is that the buffer size of the socket could not be set to the reported value, for example 1000000.

    See your system administrator about using sysctl for net.core.rmem_max. For example, the system administrator could try:

    sysctl -w net.inet.udp.recvspace=1000000
  10. If your camera does not start a new acquisition at block 1, the toolbox attaches the block ID (frame ID) as metadata to the frame. If you want to know if you lost initial frames, you can check the metadata – if the first frame's block ID is not 1, you may have some missing frames. For example, use this command in MATLAB:

    [d t m]=getdata(vid,2);
    m(1)

    The answer includes the Block ID and the FrameNumber.

  11. Run the imaqsupport function for further troubleshooting information.