Define and retrieve device parameters

Last modified by Lev Andronov on 2024/10/28 16:41

Set\get camera or frame grabber parameters\properties

Camera of frame grabber parameters are named using GenIcam standard (which may be different than the display name represented in GUI). 

To view API commands, open it in the Vision Point application under the Frame Grabber or Camera tab. Clicking on a property will display it's description and relevant API commands in the Code Sample window below.

fg_properties.png

Camera's parameters

Camera set\get commands are described in paragraphs "Camera Parameters - Setters" and "Camera Parameters - Getters" of the Vision Point API Data Book.

Example:

How to set/get "Exposure Time" camera parameter:

// Getting camera parameter type
KYFG_GetCameraValueType(cameraHandle, "ExposureTime")

// Getting value of 'ExposureTime'
KYFG_GetCameraValueFloat(cameraHandle, "ExposureTime");

// Setting value of 'ExposureTime'
KYFG_SetCameraValueFloat(cameraHandle, "ExposureTime", 8997.5);

Camera XML:

Camera parameter names often vary depending on the manufacturer. To find the correct names for specific features, please refer to the camera's documentation or its XML file (How to extract camera XML file?). The XML specifies the type of parameter. Parameter Frame Rate in some XML specified as:

Float Name="AcquisitionFrameRate" NameSpace="Standard"

The proper API command:

KYFG_SetCameraValueFloat(camHandle, "AcquisitionFrameRate", 35.0)

Frame grabber's parameters

Frame Grabber set\get commands are described in paragraphs "Frame Grabber Parameters - Setters" and "12. Frame Grabber Parameters - Getters" of the Vision Point API Data Book.

Example:

How to set/get "Camera Discovery Delay" parameter.

// Getting parameter type
KYFG_GetGrabberValueType(grabberHandle, "CameraDiscoveryDelay")

// Getting value of 'CameraDiscoveryDelay'
KYFG_GetGrabberValueInt(grabberHandle, "CameraDiscoveryDelay");

// Setting value of 'CameraDiscoveryDelay'
KYFG_SetGrabberValueInt(grabberHandle, "CameraDiscoveryDelay", 4000);
KAYA Instruments © 2024. All Rights Reserved.