INGEAR.NET.ABLink

 

PeerMessage.Protocol Property

Sets/Returns protocol messaging for Allen-Bradley Controller

[Visual Basic]
Public Property Protocol As MSGPROTOCOL _
    
[C#]
public MSGPROTOCOL Protocol {get; set;}

Property Value

MSGPROTOCOL.CIP - For messages from ControlLogix, CompactLogix, MicroLogix and ControlLogix Gateway

MSGPROTOCOL.CSP - For messages from PLC-5E and SLC 5/05

Remarks

The default value is MSGPROTOCOL.CIP.

Changing this property after the Listen method is called will have no affect.

 

Example

VB Try   ' *******************************   ' * initialize class   Dim peerMsg as New PeerMessage()   ' *******************************   ' * set the protocol message type   peerMsg.Protocol = MSGPROTOCOL.CSP   ' *******************************   ' * listen for messages from PLC   peerMsg.Listen() Catch ex As System.Exception   Console.WriteLine(ex.Message) End Try    C# try {   ///////////////////////////////////   // initialize  class   PeerMessage peerMsg = new PeerMessage();   ///////////////////////////////////   // set message protocol type   peerMsg.Protocol = MSGPROTOCOL.CSP;   //////////////////////////////////   // listen form messages from PLC   peerMsg.Listen(); } catch(System.Exception ex) {   Console.WriteLine(ex.Message); }    

See Also

IPAddressNIC | Listen