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 91
iCon API
//Configure the camera using a parameter file
string myParameterFile = "C:/RangerE/ParameterFile.prm";
myCamera->fileLoadParameters(myParameterFile);
// Set basic frame grabber parameters.
// Use the FrameGrabberParameter object retrieved earlier.
// -- First, get the port from which the camera sends data
int cameraDataPort;
myCamera->getCameraDataPort(cameraDataPort);
myFGParameters->setCameraIP(cameraIP); // IP address of the camera
myFGParameters->setCameraPort(cameraDataPort); // Camera’s data port
myFGParameters->setBufferSize(50); // Framegrabber buffer memory size in MB
// Set the number of scans (buffer height) in both the frameegrabber and
// the camera.
myFGParameters->setNoScans(10); // Scans per IconBuffer
myCamera->setBufferHeight(10)
// etc...
// Get the data format and the packet size from the camera, and pass it
// to the frame grabber.
string cameraDataformat;
myCamera->getDataFormat("", cameraDataformat);
unsigned long packetSize;
myCamera->getPacketSize(packetSize);
myFGParameters->setDataFormat(cameraDataformat, packetSize);
// Initialize the frame grabber
myFramegrabber->connect();
Note that the FrameGrabber sub-class FGEthernet used in earlier versions of the product
is still available but no longer recommended.
Once connected to the camera and frame grabber, your application can start measuring by
using the following methods:
Start the frame grabber with its startGrab() method
Start the camera with its start() method.
Note that you should start the frame grabber before starting the camera. Otherwise the
first scans sent by the camera may not be received by the frame grabber.
When you are done with the camera, call the camera object’s close() method, and then
disconnect the frame grabber with the frame grabber object’s disconnect() method.
When the camera is started and measuring, it may alter between two states:
Started The camera is measuring and sending measurement data to the PC.
WaitingForEnable If the Use enable parameter is set in the parameter file, the camera
is waiting for the Enable signal to become high, and therefore not
sending any measurement data.
You can find out which state the camera currently is in by calling the Camera object’s
checkCamStatus() method. Notice however that if the camera is currently running,
asking for its status may interfere with the measurements and scans may be lost.

Table of Contents

Related product manuals