Network Related Parameters (GigE Cameras)#

Network-related parameters allow you optimize the performance of Basler ace GigE cameras.

This topic describes the most important network-related parameters.

Payload Size#

The value of the PayloadSize parameter indicates the total size in bytes of the image data plus any chunk data transmitted. Packet headers are not included.

This parameter is read-only.

Packet Size#

The GevSCPSPacketSize parameter specifies the maximum size of a data packet transmitted via Ethernet. The value is in bytes.

The parameter should always be set to the maximum size that your network hardware can handle.

By default, the packet size is set to 1 500 bytes. This will be sufficient for most configurations. If required, you can increase the packet size to reduce Ethernet overhead load and improve network efficiency. Basler recommends increasing the packet size to a maximum of 9 014 bytes.

The size of the leader and the trailer always remains the same, regardless of the packet size. You should bear in mind that the last data packet is, in most cases, smaller than the others.

Info

  • If you increase the packet size above 1 500 bytes, you must enable the so-called Jumbo Frames support on all network devices involved including any switches.
  • Whenever you increase the packet size on the camera side, you must also adjust the packet size of your network controller card. Otherwise, streaming may fail due to blocked packets.

Inter-Packet Delay#

If your network hardware can't handle the incoming packet rate, it is useful to increase the delay between packet transmissions. This may reduce the amount of dropped packets. Note that this also slows the data transmission. As a result, the camera's frame rate may decrease.

The GevSCPD parameter sets the inter-packet delay in ticks. By default, one tick equals 8 ns. With PTP enabled, one tick equals 1 ns.

Info

To check the tick frequency, check the GevTimestampTickFrequency parameter value. This value indicates the number of clock ticks per second.

Frame Transmission Delay#

The GevSCFTD parameter sets a delay in ticks between when a camera would normally begin transmitting an acquired frame and when it actually begins transmission. By default, one tick equals 8 ns. With PTP enabled, one tick equals 1 ns.

In most cases, this parameter should be set to zero.

However, if your network hardware can't handle spikes in network traffic (e.g., if you are triggering multiple cameras simultaneously), you can use the frame transmission delay parameter to stagger the start of image data transmissions from each camera.

Bandwidth Assigned#

The GevSCBWA parameter indicates the bandwidth in bytes per second that can be used by the camera to transmit image and chunk data, to handle packet resends, and to control data transmission. The assigned bandwidth can be adjusted by changing the inter-packet delay and the frame transmission delay settings.

This parameter is read-only.

Bandwidth Reserve#

The GevSCBWR parameter specifies which portion of the assigned bandwidth is reserved to handle packet resends and to control data transmission.

The setting is expressed as a percentage of the assigned bandwidth.

Example: If a bandwidth of 30 MByte/s is assigned to the camera and the GevSCBWR parameter is set to 5 %, the bandwidth reserve will be 1.5 MByte/s.

Bandwidth Reserve Accumulation#

You can use the GevSCBWRA parameter to handle situations when the network connection becomes unstable, e.g., because of a sudden EMI burst. In these situations, a larger number of packet resends may be needed to transmit an image. The bandwidth reserve accumulation is basically an extra pool of resends that the camera can use in unusual situations.

The GevSCBWRA parameter is a multiplier used to set the maximum number of resends that can be held in the "accumulator pool".

Example: Assume that the current bandwidth reserve setting is large enough to allow up to 5 packet resends during a frame period. Also assume that the bandwidth reserve accumulation (GevSCBWRA parameter) is set to 3. With these settings, the accumulator pool can hold a maximum of 5 x 3 = 15 resends.

Bandwidth Reserve Mode#

If available, the BandwidthReserveMode parameter allows you to configure the bandwidth reserve and bandwidth reserve accumulation in a single step.

You can set the parameter to the following values:

  • Standard: The camera is configured for use with moderate bandwidth demands.
  • Performance: The camera is configured for use with high bandwidth demands.
  • Manual: No preset is used. You can configure the bandwidth reserve and bandwidth reserve accumulation manually.

Frame Jitter Max#

If the bandwidth reserve accumulation is set to a high value, the camera can experience a large burst of data resends during the transmission of a frame. This burst of resends will delay the start of the transmission of the next acquired frame. The GevSCFJM parameter indicates the maximum time in ticks (one tick = 8 ns) that the next frame transmission could be delayed due to a burst of resends.

This parameter is read-only.

Device Max Throughput#

The GevSCDMT parameter indicates the maximum amount of data (in bytes per second) that the camera is theoretically able to generate given its current settings and under ideal conditions without network restrictions. This parameter doesn't take into account whether the GigE network has the capacity to carry all of the data and does not consider any bandwidth required for resends.

If you are using the Acquisition Frame Rate parameter to control the camera's frame rate, the camera uses that parameter value to calculate the GevSCDMT parameter value. if you are using software triggering or hardware triggering to control the camera's frame rate, the camera uses the maximum frame rate allowed with the current camera settings to calculate the GevSCDMT parameter value.

This parameter is read-only.

Device Current Throughput#

The GevSCDCT parameter indicates the actual bandwidth (in bytes per second) that the camera uses to transmit image data and chunk data given the current camera settings.

If you are using the Acquisition Frame Rate parameter to control the camera's frame rate, the camera uses that parameter value to calculate the GevSCDCT parameter value. if you are using software triggering or hardware triggering to control the camera's frame rate, the camera uses the maximum frame rate allowed with the current camera settings to calculate the GevSCDCT parameter value.

This parameter is read-only.

Info

The GevSCDCT parameter indicates the bandwidth needed to transmit the actual image data and chunk data. The GevSCBWA parameter (bandwidth assigned) indicates the bandwidth needed to transmit image data and chunk data plus the bandwidth reserved to handle packet resends and to control data transmission.

If available, the DeviceLinkCurrentThroughput parameter allows you to limit the maximum available bandwidth for data transmission. For more information, see Device Information Parameters.

Heartbeat Timeout#

The GigE Vision standard requires implementation of a "heartbeat" routine to monitor the connection between the camera and the host computer. The GevHeartbeatTimeout parameter sets the heartbeat timeout (in milliseconds). If a timeout occurs, the camera releases the network connection and enters a state that allows reconnection.

By default, the heartbeat timeout is set to 3000 ms. Changing the value is not required for normal camera operation. However, if you are debugging an application and stop at a break point, a heartbeat timeout may occur and the connection to the camera may be lost. Therefore, you should increase the GevHeartbeatTimeout parameter value while debugging. When debugging is complete, you should return the timeout to its normal setting.

For more information, see the "Advanced Topics" topic, section "Debugging pylon Applications Using GigE Cameras", in the C++ Programmer's Guide and Reference Documentation delivered with the Basler pylon Camera Software Suite.

Info

The pylon API also provides a HeartbeatTimeout parameter that sets the heartbeat timeout on transport layer side. The HeartbeatTimeout and GevHeartbeatTimeout parameters are automatically synchronized. When you change one parameter, the other one adapts, and vice versa.

Stream Channel Selector#

The GigE Vision standard specifies a mechanism for establishing several separate stream channels between the camera and the computer. With the GevStreamChannelSelector parameter you can specify the stream channel that will be affected when other network related parameters are changed.

Currently, the cameras support only one stream channel, i.e., stream channel 0. Therefore, the GevStreamChannelSelector parameter is preset to StreamChannel0 and can't be changed.

Sample Code#

// Payload Size
int64_t payloadSize = camera.PayloadSize.GetValue();
// Packet Size
camera.GevSCPSPacketSize.SetValue(1500);
// Inter-Packet Delay
camera.GevSCPD.SetValue(1000);
// Frame transmission delay
camera.GevSCFTD.SetValue(1000);
// Bandwidth Assigned
int64_t bandwidthAssigned = camera.GevSCBWA.GetValue();
// Bandwidth Reserve
camera.GevSCBWR.SetValue(10);
// Bandwidth Reserve Accumulation
camera.GevSCBWRA.SetValue(10);
// Frame Jitter Max
int64_t jitterMax = camera.GevSCFJM.GetValue();
// Device Max Throughput
int64_t maxThroughput = camera.GevSCDMT.GetValue();
// Device Current Throughput
int64_t currentThroughput = camera.GevSCDCT.GetValue();
// Heartbeat Timeout
camera.GevHeartbeatTimeout.SetValue(5000);
INodeMap& nodemap = camera.GetNodeMap();
// Payload Size
int64_t payloadSize = CIntegerPtr(nodemap.GetNode("PayloadSize"))->GetValue();
// Packet Size
CIntegerPtr(nodemap.GetNode("GevSCPSPacketSize"))->SetValue(1500);
// Inter-Packet Delay
CIntegerPtr(nodemap.GetNode("GevSCPD"))->SetValue(1000);
// Frame transmission delay
CIntegerPtr(nodemap.GetNode("GevSCFTD"))->SetValue(1000);
// Bandwidth Assigned
int64_t bandwidthAssigned = CIntegerPtr(nodemap.GetNode("GevSCBWA"))->GetValue();
// Bandwidth Reserve
CIntegerPtr(nodemap.GetNode("GevSCBWR"))->SetValue(10);
// Bandwidth Reserve Accumulation
CIntegerPtr(nodemap.GetNode("GevSCBWRA"))->SetValue(10);
// Frame Jitter Max
int64_t jitterMax = CIntegerPtr(nodemap.GetNode("GevSCFJM"))->GetValue();
// Device Max Throughput
int64_t maxThroughput = CIntegerPtr(nodemap.GetNode("GevSCDMT"))->GetValue();
// Device Current Throughput
int64_t currentThroughput = CIntegerPtr(nodemap.GetNode("GevSCDCT"))->GetValue();
// Heartbeat Timeout
CIntegerPtr(nodemap.GetNode("GevHeartbeatTimeout"))->SetValue(5000);
INodeMap& nodemap = camera.GetNodeMap();
// Payload Size
int64_t payloadSize = CIntegerParameter(nodemap, "PayloadSize").GetValue();
// Packet Size
CIntegerParameter(nodemap, "GevSCPSPacketSize").SetValue(1500);
// Inter-Packet Delay
CIntegerParameter(nodemap, "GevSCPD").SetValue(1000);
// Frame transmission delay
CIntegerParameter(nodemap, "GevSCFTD").SetValue(1000);
// Bandwidth Assigned
int64_t bandwidthAssigned = CIntegerParameter(nodemap, "GevSCBWA").GetValue();
// Bandwidth Reserve
CIntegerParameter(nodemap, "GevSCBWR").SetValue(10);
// Bandwidth Reserve Accumulation
CIntegerParameter(nodemap, "GevSCBWRA").SetValue(10);
// Frame Jitter Max
int64_t jitterMax = CIntegerParameter(nodemap, "GevSCFJM").GetValue();
// Device Max Throughput
int64_t maxThroughput = CIntegerParameter(nodemap, "GevSCDMT").GetValue();
// Device Current Throughput
int64_t currentThroughput = CIntegerParameter(nodemap, "GevSCDCT").GetValue();
// Heartbeat Timeout
CIntegerParameter(nodemap, "GevHeartbeatTimeout").SetValue(5000);
// Payload Size
Int64 payloadSize = camera.Parameters[PLCamera.PayloadSize].GetValue();
// Packet Size
camera.Parameters[PLCamera.GevSCPSPacketSize].SetValue(1500);
// Inter-Packet Delay
camera.Parameters[PLCamera.GevSCPD].SetValue(1000);
// Frame transmission delay
camera.Parameters[PLCamera.GevSCFTD].SetValue(1000);
// Bandwidth Assigned
Int64 bandwidthAssigned = camera.Parameters[PLCamera.GevSCBWA].GetValue();
// Bandwidth Reserve
camera.Parameters[PLCamera.GevSCBWR].SetValue(10);
// Bandwidth Reserve Accumulation
camera.Parameters[PLCamera.GevSCBWRA].SetValue(10);
// Frame Jitter Max
Int64 jitterMax = camera.Parameters[PLCamera.GevSCFJM].GetValue();
// Device Max Throughput
Int64 maxThroughput = camera.Parameters[PLCamera.GevSCDMT].GetValue();
// Device Current Throughput
Int64 currentThroughput = camera.Parameters[PLCamera.GevSCDCT].GetValue();
// Heartbeat Timeout
camera.Parameters[PLCamera.GevHeartbeatTimeout].SetValue(5000);
// Payload Size
Int64 payloadSize = Pylon.DeviceGetIntegerFeature(hdev, "PayloadSize");
// Packet Size
Pylon.DeviceSetIntegerFeature(hdev, "GevSCPSPacketSize", 1500);
// Inter-Packet Delay
Pylon.DeviceSetIntegerFeature(hdev, "GevSCPD", 1000);
// Frame transmission delay
Pylon.DeviceSetIntegerFeature(hdev, "GevSCFTD", 1000);
// Bandwidth Assigned
Int64 bandwidthAssigned = Pylon.DeviceGetIntegerFeature(hdev, "GevSCBWA");
// Bandwidth Reserve
Pylon.DeviceSetIntegerFeature(hdev, "GevSCBWR", 10);
// Bandwidth Reserve Accumulation
Pylon.DeviceSetIntegerFeature(hdev, "GevSCBWRA", 10);
// Frame Jitter Max
Int64 jitterMax = Pylon.DeviceGetIntegerFeature(hdev, "GevSCFJM");
// Device Max Throughput
Int64 maxThroughput = Pylon.DeviceGetIntegerFeature(hdev, "GevSCDMT");
// Device Current Throughput
Int64 currentThroughput = Pylon.DeviceGetIntegerFeature(hdev, "GevSCDCT");
// Heartbeat Timeout
Pylon.DeviceSetIntegerFeature(hdev, "GevHeartbeatTimeout", 5000);
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
int64_t payloadSize = 0;
int64_t bandwidthAssigned = 0;
int64_t jitterMax = 0;
int64_t maxThroughput = 0;
int64_t currentThroughput = 0;
/* Payload Size */
errRes = PylonDeviceGetIntegerFeature(hdev, "PayloadSize", &payloadSize);
CHECK(errRes);
/* Packet Size */
errRes = PylonDeviceSetIntegerFeature(hdev, "GevSCPSPacketSize", 1500);
CHECK(errRes);
/* Inter-Packet Delay */
errRes = PylonDeviceSetIntegerFeature(hdev, "GevSCPD", 1000);
CHECK(errRes);
/* Frame transmission delay */
errRes = PylonDeviceSetIntegerFeature(hdev, "GevSCFTD", 1000);
CHECK(errRes);
/* Bandwidth Assigned */
errRes = PylonDeviceGetIntegerFeature(hdev, "GevSCBWA", &bandwidthAssigned);
CHECK(errRes);
/* Bandwidth Reserve */
errRes = PylonDeviceSetIntegerFeature(hdev, "GevSCBWR", 10);
CHECK(errRes);
/* Bandwidth Reserve Accumulation */
errRes = PylonDeviceSetIntegerFeature(hdev, "GevSCBWRA", 10);
CHECK(errRes);
/* Frame Jitter Max */
errRes = PylonDeviceGetIntegerFeature(hdev, "GevSCFJM", &jitterMax);
CHECK(errRes);
/* Device Max Throughput */
errRes = PylonDeviceGetIntegerFeature(hdev, "GevSCDMT", &maxThroughput);
CHECK(errRes);
/* Device Current Throughput */
errRes = PylonDeviceGetIntegerFeature(hdev, "GevSCDCT", &currentThroughput);
CHECK(errRes);
/* Heartbeat Timeout */
errRes = PylonDeviceSetIntegerFeature(hdev, "GevHeartbeatTimeout", 5000);
CHECK(errRes);

You can also use the pylon Viewer to easily set the parameters.