お使いのブラウザが古くなっていますので、このウェブサイトのすべての機能が表示されない可能性があります。 お使いのブラウザの更新する方法をご覧ください。

OK

How can I create a GigE Camera Device Object with a known IP address?

If you want to create a GigE camera object using the pylon C++ API part of the Basler pylon Camera Software Suite (version 2.0 or newer) without broadcasting multiple discovery messages on the network, you can use the technique described in this FAQ.

In some cases, especially when using multiple network adapters in a single PC, you may want to avoid broadcasting multiple discovery messages.

To do so you can create a GigE camera object using a known IP address. This means that for any given GigE camera, the camera should first be configured to have a persistent (fixed) IP address (e.g., 192.168.0.123), and you should know the IP address before using this technique.

Once you have assigned a persistent address to a camera, you can do the following:

#include <pylon/PylonIncludes.h>

#include <pylon/gige/BaslerGigEInstantCamera.h>

typedef Pylon::CBaslerGigEInstantCamera Camera_t;

using namespace Basler_GigECameraParams;

using namespace Pylon;

// Get the transport layer factory.

CTIFactory& TIFactory = CTIFactory::GetInstance();

//Create the transport layer.

ITransportLayer *pTI = TIFactory.CreateTI

( Camera_t::DeviceClass() );

// Create an empty GigE device info object.

CBaslerGigEDeviceInfo bdi( pTI->CreateDeviceInfo() );

// Initialize the device info object with the known IP address.

bdi.SetIpAddress("192.168.0.123");

// Create the camera device object.

Camera_t Camera( pTI->CreateDevice( bdi ) );

// Open the camera.

Camera.Open();