Home > Function descriptions > History back  Previous chapter  Next chapter  Print  

InitCamera

uEye ActiveX Manual Version 4.00

InitCamera

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.

Hinweis

Note on multi-camera environments

When using multiple cameras in parallel operation on a single system, you should assign a unique camera ID to each camera. To initialize or select a camera with InitCamera(), the hb handle must previously have been set to the desired camera ID.

To initialize or select the next available camera without specifying a camera ID, hb has to be preset with 0.

Achtung

GigE uEye SE only

When you are using a GigE uEye SE camera, initialization will be aborted with an error message if the camera's starter firmware is not compatible with the installed driver. To initialize the camera, you have to write the proper starter firmware to the camera first. This is done using the InitCamera() function with corresponding parameter setting (see table below).

Updating the GigE uEye SE firmware can take up to 20 seconds. It is important not to disconnect the camera from the PC or power supply during this time. Otherwise, malfunctions could occur in the camera.

If you have initialized the camera with a driver version earlier than 3.40, you need to update the camera firmware manually using the IDS Camera Manager. Driver versions 3.40 and higher support automatic firmware updates.

Parameters

Parameter

Description

hb

0 and Activate1stCamera = FALSE:
Show dialog box to select the camera to initialize.

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 |
IS_ALLOW_STARTER_FW_UPLOAD

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

Activate1stCamera

Related functions

ExitCamera()


Suggestion for improvement? Send us your short Feedback on this chapter. Thank you very much!

For technical questions please contact you local distributor or use the support form on our website.


© 2012 IDS Imaging Development Systems GmbH
http://www.ids-imaging.com