INGEAR.NET.Logix

 

Controller.Path Property

Sets/Returns Ethernet IP Address of Allen-Bradley Controller

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

Property Value

Dot-delimited string representing the CIP path

Implements

IController.Path

Remarks

ControlLogix/CompactLogix Local Processors

A Local processor resides in the same chassis or back place as the Ethernet Module.  For a ControlLogix processor set the Path property to  SLOT  NUMBER where the CPU resides in the I/O chassis.   For a CompactLogix processor set the Path property to "0".

ControlLogix Remote Processors

Processors residing in remote chassis' are connected to the local chassis by one or bridge modules.  You can address remote processors by supplying one or more segments (network hops) in the Path property.

Syntax: <segment 1>.<segment 2>.<segment n>.1.<slot>

Segment Syntax:  1.<slot>.<channel>.<node>

1. - indicates chassis back plane

<slot> - indicates chassis slot number of bridge module

<channel> - indicates output channel (usually A or B ) of the bridge module to send the message

<node> - node address of destination bridge module to receive the message.

 

Example: Remote Path  1.2.A.6.1.0

1.

Chassis Back plane

2.

Slot number of bridge module

A.

Send message out Channel 'A' on bridge module

6.

Destination node 6 on remote chassis

1.

Chassis back plane on remote

0

Slot '0' on remote chassis is location of ControlLogix CPU

 

 

Exceptions

Exception Type Condition
ArgumentNullException Thrown if Path set to a null reference (Nothing in Visual Basic)
ArgumentOutOfRangeException Thrown if Path.Length is less than 1 character.

Example

VB
 Try
   ' *******************************
   ' * initialize controller class
   Dim MyPLC as New Logix.Controller()
   ' *******************************
   ' * set the IP Address
   MyPLC.IPAddress = "192.168.1.31"
   ' *******************************
   ' * set CPU Slot number
   MyPLC.Path = "2"
   ' *******************************
   ' * connect to the PLC
   MyPLC.Connect()
 Catch ex As System.Exception
   Console.WriteLine(ex.Message)
 End Try
   
 C#
 try
 {
   ///////////////////////////////////
   // initialize controller class
   Logix.Controller MyPLC = new Logix.Controller();
   ///////////////////////////////////
   // set the IP address
   MyPLC.IPAddress = "192.168.1.31";
   //////////////////////////////////
   // set CPU slot number
   MyPLC.Path = "2";
   //////////////////////////////////
   // connect the PLC
   MyPLC.Connect();
 }
 catch(System.Exception ex)
 {
   Console.WriteLine(ex.Message);
 }    

See Also

Controller Class | Logix Namespace | Path | Connect