Industrial Cameras FAQ/ Please show how to open camer...

Please show how to open camera specifying camera model name and serial number. (No.1507)

By using Cam_OpenFromInfo() function instead of Cam_Open() function, user application can open a camera whose model name and serial number are specified value. (It is necessary to call Sys_GetNumOfCameras() before opening cameras. )

The followings are example code for opening a camera whose model name is "CamModel" and whose serial number is "SerialNo". If user application has code for "Removed" event of the camera, append handle of "Removed" event object as an argument after camera handle argument.

CAM_HANDLE hCam = NULL;
CAM_API_STATUS uiSts = Cam_OpenFromInfo("CamModel", "SerialNo", NULL, &hCam);

In case of using .NET language in source code, use CreateDeviceObjectFromInfo() method of CameraSystem class instance instead of CreateDeviceObject() method.

CameraSystem camSystem = new CameraSystem();
...................................................................
CameraDevice cam = null;
CamApiStatus sts = camSystem.CreateDeviceObjectFromInfo("CamModel", "SerialNo", null, ref cam);

back

Was this FAQ helpful?

Please let us know your opinion about the FAQ so that we will be able to improve our FAQ. (Within 800 characters)
Note: If you need a reply to your inquiry (e.g. inquiry about products), please use the inquiries form provided on Contact Us page. Please note that we cannot answer to your questions filled in below.

Please click below to change the cookie settings used on our website.