Line Timeout#
This is useful if you want to send incomplete frames (partial frames), acquired until the timeout occurred, to the host computer.
The feature is only available on Basler racer 2 S cameras with GigE interface.
该功能的使用#
运作原理#
If the Line Timeout feature is enabled and the LineTimeout
parameter is set, the counting of the line timeout starts as soon as the last line trigger has been issued. If the next line trigger is not received within the time set by the LineTimeout
parameter, the following occurs:
- Only the lines acquired up to the point when the command was executed are delivered, i.e. transmitted as partial frame to the host computer.
- A line timeout event is generated, if the event has been enabled.
Example: The unplanned stop of a conveyor belt transporting the test objects causes the line timeout to expire, thus leading to an interruption of the image acquisition process, as no further line triggers are received. The partial frame is sent to the host computer for further processing.
Setting the Line Timeout#
- 设置
BslLineTimeoutEnable
parameter totrue
. - 设置
BslLineTimeout
parameter to the desired time in μs.
When setting the BslLineTimeout
parameter take into account the following:
- The value for the exposure time should be smaller than the
BslLineTimeout
parameter. - Speed of the transportation device (e.g., a conveyor belt): The value of the
BslLineTimeout
parameter must be large enough. If the speed of the transportation device varies, for example, i.e., sometimes it is slow, sometimes faster, make sure that theLineTimeout
parameter value is larger than the maximum time the conveying device takes. - Regular stops of the transportation device play a role. The
LineTimeout
parameter value should be larger than the maximum time regular stops take.
示例代码#
/* 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 */
/* Enable the Line Timeout feature */
errRes = PylonDeviceSetBooleanFeature(hdev, "BslLineTimeoutEnable", 1);
CHECK(errRes);
/* Set the line timeout in microseconds */
errRes = PylonDeviceSetIntegerFeature(hdev, "BslLineTimeout", 1000000);
CHECK(errRes);
您也可以使用 pylon Viewer 轻松设置参数。