gclib  1.34.15
Communications API for Galil controllers and PLCs
IP Assigner Example

C++ C# Visual Basic
Example Example Example
Logic Logic Logic
Instructions Instructions Instructions

We are always interested in what our customers would like to see! To request any new examples or supported languages, please email suppo.nosp@m.rt@g.nosp@m.alil..nosp@m.com.

Concepts

This example demonstrates:

  • How to issue basic commands.
  • How to listen on the network for Galil Controllers requesting an IP Address.
  • How to assign a Galil Controller an IP Address.
  • How to connect to a controller via IP Address.
  • How to get information on a connected controller such as MAC Address and Serial Number.

Prerequisites

A Galil controller connected to the same network as the host computer.

Command Line Arguments

This example requires 2 arguments:

  • The serial number of your controller. The value to use is the number after the prefix on the controller's serial number marking. For example, if the serial number is marked as BV-1234, the value to use for this argument is 1234.
  • A value between 1-254 that defines the last byte of the newly assigned IP Address. This example will assign an IP address that matches your computer's IP address, with the last byte changed. For example, if your IP address is 192.168.42.92 and 96 is specified, the controller will be assigned 192.168.42.96. The example will ping the IP address to ensure that the IP address is not already taken.
ip_assigner_example.exe 1234 96