INGEAR.NET.ABLink

 

Controller.IPAddress Property

Sets/Returns Ethernet IP Address of Allen-Bradley Controller

[Visual Basic]
NotOverridable Public Property IPAddress As String _
    Implements IController.IPAddress
[C#]
public string IPAddress {get; set;}

Property Value

Dotted-decimal string (e.g "192.168.1.32")

Implements

IController.IPAddress

Remarks

IP Address is a dotted decimal IP address of the target PLC

The IPAddress property must be set before invoking Connect method

Exceptions

Exception Type Condition
ArgumentNullException Thrown if IPAddress set to a null reference (Nothing in Visual Basic)
ArgumentOutOfRangeException Thrown if IPAddress.Length is less that 7 characters.

Example

VB


' ********************************
' * initialize controller Dim MyPLC as New ABLink.Controller()
' *********************************
' * set the ip address MyPLC.IPAddress = "192.168.1.32"
' ********************************
' * connect the PLC MyPLC.Connect() C# ///////////////////////////////////
// initialize controller
 ABLink.Controller MyPLC = new ABLink.Controller();
 
///////////////////////////////////
// set the ip address MyPLC.IPAddress = "192.168.1.32";
 
///////////////////////////////////
// connect to the PLC MyPLC.Connect();

See Also

Controller Class | ABLink Namespace | Connect