This function sets parameters in a connected camera.
To determine the supported types and values, the function camParameterRange can be used.
Input:
type : INT
The type of parameter to set.
1
|
- Brightness
|
2
|
- Contrast
|
3
|
- Saturation
|
4
|
- Hue
|
5
|
- Auto gain
|
6
|
- Auto white balance
|
7
|
- Adjust white balance.
|
8
|
- Red Balance
|
9
|
- Blue balance
|
10
|
- Gamma
|
11
|
- Power line frequency filter: 0 = Disabled, 1 = 50Hz, 2 = 60Hz, 3 = Auto(if supported).
|
12
|
- Auto exposure: 0 = Auto, 1 = Manual, 2 = Shutter priority, 3 = Aperture priority.
|
13
|
- Absolute exposure. Exposure time in 100μs units.
|
14
|
- Allow dynamic frame rate when Auto exposure is Auto or Aperture priority
|
value : DINT
The value to set. The exact meaning of this variable depends on the kind of parameter to set.
Returns: INT
0
|
- The parameter was set.
|
-1
|
- Failed to set the value. The camera may not support changing this parameter.
|
-3
|
- Invalid type.
|
-5
|
- Camera interface not open.
|
-7
|
- Value is outside the valid range.
|
Declaration:
FUNCTION camParameterSet : INT;
VAR_INPUT
type : INT;
value : DINT;
END_VAR;
Example:
camParameterSet(type:=1, value := 72);
|