Obtain and Modify IP Configuration

You are currently viewing the documentation for version 2.5.0. To access documentation for other versions, click the "Switch Version" button located in the upper-right corner of the page.

■ To use the latest version, visit the Mech-Mind Download Center to download it.

■ If you're unsure about the version of the product you are using, please contact Mech-Mind Technical Support for assistance.

This topic introduces how to obtain and modify the current IP address, subnet mask, and gateway of the laser profiler with the modify_ip_configurations sample on Windows.

Please refer to Usage Guide for HALCON Samples to obtain the samples and check the prerequisites for using the samples.

Select the Laser Profiler

Follow these steps to select the laser profiler whose IP configuration you want to obtain or modify.

  1. Open the sample in HDevelop: Open HDevelop, and drag the sample into HDevelop.

  2. Step over the program (click the step over button in the toolbar repeatedly), until the Variable Inspect: MechEyeProfilerInfos window pops up.

  3. This window displays all the available laser profilers. Double-click the laser profiler that you want to connect, and copy the name after unique_name: or user_name:.

    camera name
    user_name is the custom laser profiler name. You can customize the camera name in Mech-Eye Viewer.
  4. Locate the following line, and replace LNX with the copied unique_name or user_name.

    DeviceInfo := 'LNX'

Obtain the IP Address, Subnet Mask and Gateway

Follow these steps to obtain the current IP address, subnet mask and gateway of the laser profiler:

Run the sample by clicking run in the toolbar or pressing the F5 key. In the Control Variables area, check the following variables for the current IP address, subnet mask, and gateway of the laser profiler.

  • CurrentIPAddressString: IP address

  • CurrentSubnetMaskString: subnet mask

  • CurrentDefaultGatewayString: gateway

Set Static IP Address

This sample sets a static IP address by default. Follow these steps to modify the IP address, subnet mask and gateway of the laser profiler:

  1. Click reset in the toolbar to reset program execution.

  2. Locate the following line, and change the IP address, subnet mask and gateway to the values to be set:

    IPAddressString := '192.168.1.100'
    SubnetMaskString := '255.255.255.0'
    DefaultGatewayString := '192.168.1.1'
  3. Run the sample by clicking run in the toolbar or pressing the F5 key.

  4. Restart the laser profiler to make the new settings take effect.

Set Dynamic IP Address

Follow these steps to dynamically assign an IP address to the laser profiler:

  1. Click reset in the toolbar to reset program execution.

  2. Locate the following line, and replace true with false.

    set_framegrabber_param (AcqHandle, 'GevCurrentIPConfigurationPersistentIP', true)
  3. Run the sample by clicking run in the toolbar or pressing the F5 key.

  4. Restart the laser profiler to make the new settings take effect.

When the laser profiler is connected to the computer directly, the IP address of the laser profiler cannot be dynamically assigned.

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.