EasyManua.ls Logo

SICK Ranger E

SICK Ranger E
124 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Reference Manual Chapter 8
Ranger E/D
©SICK AG • Advanced Industrial Sensors • www.sick.com • All rights reserved 97
iCon API
8.3 Changing Camera Configuration
There are two different ways of changing camera configuration from your application:
By using a parameter file which sets all configuration parameters at once.
By setting single parameter values using the setParameterValue() method.
Certain parameters in the camera cannot be changed while the camera is running (meas-
uring), for example parameters that enables or disables measurement components.
Before changing the value of such a parameter, the camera must be stopped, using the
camera object’s stop() method.
In the “Parameters” chapter you can see which parameters that can be changed while the
camera is measuring.
Changing parameter values may also affect the format of the data that is sent from the
camera. For example, enabling or disabling a measurement component will always result
in a new data format. Changing camera configuration by using a parameter file will most
certainly change the data format, since this affects all parameters in the camera.
If the data format is changed, the frame grabber must also be stopped, and it should be
updated with the new data format by using the setDataFormat() method of the frame
grabber object.
8.3.1 Using Parameter Files
Parameter files are uploaded to the camera with the fileLoadParameters() method,
and is usually used when the camera is being initialized. The parameter files are created
with Ranger Studio.
After changing camera configuration using a parameter file, your application should up-
date the data format used by the frame grabber by retrieving the new data format string
from the camera and passing it to the frame grabber by using the setDataFormat()
method of the frame grabber object.
8.3.2 Setting Single Parameter Values
To change the value of a single parameter, you specify which parameter to change by
supplying the name of the parameter and its location in the configuration hierarchy. Values
are always specified as strings.
For example, to change the width of the ROI for the image configuration’s settings:
string imageConfigPath = “<ROOT><CONFIGURATION name = ‘Image’>”;
string parameterName = “Number of columns”;
string newValue = “256”;
int errorCode = myCamera->setParameterValue(imageConfigPath, parameterName,
newValue, updateRequired,
dataFormatChanged);
Similarly, to change the threshold level of the first threshold in the Horizontal threshold
component named HorThr 1:
string horthrCompPath =
“<ROOT><CONFIGURATION name = ‘Measurement’><COMPONENT name ‘HorThr 1’)”;
string parameterName = “Threshold 1”;
string newValue = “256”;
int errorCode = myCamera->setParameterValue(horthrCompPath, parameterName,
newValue, updateRequired,
dataFormatChanged);

Table of Contents

Related product manuals