| Home > Function descriptions > | History back Previous chapter Next chapter Print |
InitCamera |
|
uEye ActiveX Manual Version 4.00
Syntax
LONG InitCamera (LONG hb)
Description
InitCamera() opens the driver and establishes contact to the hardware. If more than one uEye camera is connected to the system then there are several ways to initialize the cameras:
If a specific board has to be initialized, then the parameter hb must be preset with the relevant Camera-ID. The Camera-ID ist stored in the EEPROM memory of the camera and can be read out and changed with the IDS Camera Manager.
If it’s regardless of which cameras is initialized then the parameter hb can be preset with zero. Additionally, if the property "Activate1stCamera" is set to FALSE, a camera selection dialog box will be displayed to choose one of the available cameras manually. If the property "Activate1stCamera" is set to TRUE then the first unused camera will be chosen.
|
|
|
|
Parameters
Parameter |
Description |
hb |
0 and Activate1stCamera = FALSE: 0 and Activate1stCamera = TRUE: The first available camera will be initialized or selected. 1-254: The camera with the specified camera ID will be initialized or selected. |
hb | |
During initialization of the camera, this parameter checks whether a new version of the starter firmware is required. If it is, the new starter firmware is updated automatically (only GigE uEye SE cameras). To ensure backward compatibility of applications, always call InitCamera() without the IS_ALLOW_STARTER_FW_UPLOAD parameter first. Only if an error occurs, call the function with this parameter set (see ActiveX Sample Programs for code example). |
Return values
IS_SUCCESS |
Function executed successfully |
IS_NO_SUCCESS |
General error message |
IS_STARTER_FW_UPLOAD_NEEDED |
The camera's starter firmware is not compatible with the driver and needs to be updated. |
Example:
//Initialize first unused camera and don’t show dialog box:
// if Activate1stCamera is set to TRUE
ret = InitCamera(0);
//Show dialog box to select the camera to initialize:
// if Activate1stCamera is set to FALSE;
ret = InitCamera(0);
//Initialize the camera with ID = 3:
ret = InitCamera(3);
Related properties
Related functions