gclib 2.0.9
Communications API for Galil controllers and PLCs
 
Loading...
Searching...
No Matches

◆ IP_Assigner()

static int IP_Assigner ( gclib  gclib,
string  serial_num,
byte  address 
)
inlinestatic

Assigns controller an IP Adress given a serial number and a 1 byte address.

Parameters
gclibA gclib object.
serial_numThe serial number of a Galil controller.
addressA 1 byte value to be added to the new IP Address.
Returns
The success status or error code of the function.

This function will listen on the network for controllers requesting an IP Address.
If a detected controller matches the serial number provided by the user, a new IP Address will be assigned based on the first 3 bytes of the detected IP Address combined with the user defined 1 byte address.

See ip_assigner_example.cs for an example.

For VB.NET, see definition in file ip_assigner.vb

Definition at line 36 of file ip_assigner.cs.

References Examples.GALIL_EXAMPLE_ERROR, Examples.GALIL_EXAMPLE_OK, gclib.GAssign(), gclib.GCommand(), gclib.GInfo(), gclib.GIpRequests(), gclib.GOpen(), and vector().

Referenced by IP_Assigner_Example.Main().