Baumer GAPI SDK

Starting with the Version 2.9.0, the Baumer GAPI SDK also supports cameras with 10 GigE interface according to IEEE802.3an (10GBase-T Copper) and IEEE802.3ae (Fiber Optic).

However, the utilized PC system must support the increased bandwidth of the 10 GigE Interface. If the PC system is not capable to support the increased bandwidth,  it will result in dropping packets and corrupted images.


Recommended PC systems and configuration

The Baumer GAPI SDK is tested with two 10 GigE cameras operating at maximum bandwidth and utilizing the Baumer Filter Driver. The acquired images are displayed by the Camera Explorer. Besides display, no other background operations, such as third party software, Antivirus software or any user interaction, are executed on the PC.

Notice

For optimal performance on Windows Systems it is strongly recommended utilizing the included Baumer Filter Driver.

 

Hardware

Baumer considers the hardware that is used for these tests to be the minimum recommended configuration:

CPU

Intel® Core™ i7-7820X (8 Cores, 3,6 GHz)

RAM

2 x 16 GB RAM (Dual-Channel)

NIC

Intel(R) Ethernet Converged Network Adapter X550-T2

 

The test described causes a load of around 15% on the above-mentioned PC system.

Since additionally to image acquisition and display, processes of image processing have to be executed in the running application, a significantly more powerful system might be required.

 

Operating system

Baumer recommends the 64bit operating systems Windows 7 (min. SP1) and Windows 10 (min. V1607) including the latest patches as well as all modern Linux variants (e. g. Ubuntu 16.4, Debian 9.3, Fedora 27).

 

Recommended System Configuration

The process of image acquisition depends on parameterization as well as processes running in parallel. In the event of corrupted images, check the following configuration parameters:

Parameter

Recommended action

Windows OS / Firewall

deactivate if necessary

Windows OS / Defender Antivirus

deactivate if necessary

Windows OS / Power Profile

set to high performance

Network Settings / Paket Size

set to maximum

Network Settings / Jumbo Frames

set to maximum

Network Settings / Receive Buffer Count

set to maximum

Baumer GAPI / bsysgige.xml

Streaming via socket driver

set StreamSocketSize to 64 MB

Streaming via filter driver

set FilterDriverBufferCount to 50.000

 

MaxResendsPerPacket

set to 44

ResendRetryTreshold

set to 100

 

Camera Explorer Image and Package Statistics View

The Camera Explorer provides statistics information in the info view. You can use this view to check the stability of the image stream.

VT_Camera_Explorer_Network_Statistics_Info_View.png
Camera Explorer Network Statistics Info View
Possible Reasons for Lost Packets

In a typical camera system no packet should be lost in the network as vision networks are usually rather small and separated.  If packets are lost in the network we recommend to rework the system so the issue can be mitigated. We consider such a network as not fit for purpose for machine-vision applications.

The most common cause for lost packets is that packets which are received correctly by the Ethernet stack are filling up the available packet queues as they are not retrieved by the software quickly enough. If a packet queue is filled up all further incoming packets must be discarded by the Ethernet stack.

If the packet queues are filled up over longer periods it is likely that the PC system is not powerful enough for the given application.

However, even on a very powerful PC system, just a short interruption of receiving application can fill the packet queues and lead to dropped (missing) packets. In those cases the resend algorithm can help retrieve the required packets.

 

Notice

The most common reason for those interruptions are caused by the operation system schedulers minimum time for switching between tasks. On Windows® systems the switching between two tasks takes around 15 ms. This can be enough to fill the packet queues of the system so that packets are dropped or missed.

 

Resend Algorithm – Network Advice

In theory, 10 GigE is capable of a maximum bandwidth of 10 Gbit/s. The GigE Vision Standard utilizes the UDP protocol which allows 100 % exploitation of the available network bandwidth without reserving capacity for required packet resend.

For any packet resend operation if required, the Baumer GAPI requires some bandwidth to be available. Especially in extensive network configurations where loss of packets  is more of an issue, it is recommend to consume not more than 90% of the maximum bandwidth for system and camera configuration to ensure there is enough capacity left for any packet resend.

Bandwidth issues usually identify by corrupted images. There are several configuration options to reduce bandwidth:

It is also a good idea to set a packet delay (GevSCPD) to introduce small gaps between packages (see figure). This will spread the data of one image out and can help the system to process the data as it arrives at a slower but steady rate.

 

VT_Flow_of_packages_with_and_without_a_set_package_delay_GevSCPC.png
Flow of packages with and without a set package delay (GevSCPD)

Note

Calculation example, package delay

A 10 GigE Network provides a bandwidth of 10 Gbit/s which equals 10bit/ns. If the package size is set to 9000 Byte (72000 bit) one package will need around 7200 ns to be sent.

To introduce a 10% gap between each package GevSCPD would therefore be set to 720 ns

Attention: Different Camera might use different Units for the GevSCPD parameter, please refer to the Technical Data Sheet for more information.

 

Resend Algorithm – Configuration

The Baumer resend algorithm is responsible to re-transfer packets which were not received correctly. Quite often packages are dropped if the system is temporarily unable to process packages at the required speed during a spike in processing activity. There are a few parameters to configure the algorithm, the ideal values depend on the overall system and its performance. All parameters can be configured in the bsysgige.xml file.

VT_Necessary_minimum_packet_queue.png
Necessary minimum packet queue

The diagram above shows the necessary minimum packet queue depth for 1 GigE and 10 GigE in order for the system to be able to temporarily store enough incoming packets during one or two scheduler switches so they can be safely retrieved once the receiving thread is activated again by the scheduler. If the product out of ResendRetryThreshold and MaxResendPerPacket falls below the line, packets will be lost in the given situation. 

ResendRetryThreshold – As there might be a queue of packets waiting to be processed by the system a requested resend-packet will be queued at the end and cannot be confirmed as arrived immediately. The ResendRetryThreshold parameter sets the number of packets the system should wait until it is requested again or finally given up on. It is typically a good idea to wait a little bit before requesting a resend to allow the system to recover before giving any additional work to do.

 

Notice

Each camera has a hard limit, how many packet and/or images can be kept in memory to be resent if necessary. Therefore it is important to keep the abilities of the actual camera in mind as a very high ResendRetryThreshhold can mean that the camera is no longer able to provide the requested packet.

 

MaxResendsPerPacket – This parameter specifies how often a packet can be requested for resend before giving up. A high value increases the chance to recover a packet but will lead to a higher system load as lost packets might be requested over and over again.

In case the system does produce incomplete images the ResendRetryThreshold can be raised until no more incomplete images are received. If that doesn’t help the MaxResendsPerPacket should be raised to see if a stable transfer can be reached.

 

Notice

The product of ResendRetryThreshhold and MaxResendsPerPacket must always be smaller than the packet queue. Therefore you need to adjust the FilterDriverBufferCount and the StreamSocketSize accordingly.

 

Calculation example, resend parameters

How many packets are generated during a scheduler switch?

 1 GBit/s = 125 kByte/ms, at MTU size of 9000kbyte that are 13,888 Packets/ms

→ during 15,6ms scheduler switching 216 packets are generated

10 GBit/s = 1,25 Mbyte/ms at MTU size of 9000kbyte that are 138,88 Packets/ms

→ during 15,6ms scheduler switching 2167 packets are generated

 

Calculation of the resend parameters depending on the required packet queue depth:

 PQD = MRPP * RRT

 *PQD = PacketQueueDepth – The depth of the packet queue

 *MRPP = MaxResendPerPacket – Sets how often a package can be resent until giving up, raising it can produce additional network load.

 *RRT = ResendRetryThreshold –Sets the time until a resent is first requested, raising it can introduce latency while retrieving the images

 

Further Configuration and Optimization

Below we have collected some measurements to be taken in order to increase system performance and stability.

 

Windows

 

General Network Optimization

 


Related Topics

Please refer to the Baumer Application Note for general GigE configuration suggestions:


Support

Please contact our Technical & Application Support Center with any questions.

Phone: +49 3528 4386 845
E-mail: [email protected]

To the top