This VB example finds the optimal packet size and modifies the packet size register of the camera accordingly. If the optimal packet size negotiaion failed, the packet size is set to 1500.
ActiveGigE1. Camera = 2
if MTU=0 then
The optimal packet size is determined using the packet negotiation functionality of GigE Vision cameras. Network packets of different sizes are requested from the camera until the maximum packet size possible for the current configuration is found. If the camera does not support the packet size negotiation, this method will return zero.
The value of the optimal packet size is typically defined by the maximum packet size supported by the network card and camera, whichever is lower. Setting the packet size to the optimal value reduces the CPU load during the video transmission.