Presentation is loading. Please wait.

Presentation is loading. Please wait.

Welcome! Thank you for joining us. We’ll get started in a few minutes.

Similar presentations


Presentation on theme: "Welcome! Thank you for joining us. We’ll get started in a few minutes."— Presentation transcript:

1 Welcome! Thank you for joining us. We’ll get started in a few minutes.
You must join the teleconference to hear the audio portion of the broadcast. You cannot listen through your computer. Dial: You will hear hold music until the broadcast begins. This is expected. We will send the presentation and a recording of today’s broadcast to you within a few days after the session.

2 TechConnect Genius Webinar
Logix EtherNet/IP Socket Interface Arkady Nabutovsky Senior Support Engineer April 2014

3 Agenda 2. Logix Sockets Basics 3. Where to Start?
1. When Do We Need to Use Logix Sockets? 2. Logix Sockets Basics 3. Where to Start? 4. Knowledgebase Examples 5. Sockets in Add-On Instructions 6. Troubleshooting and Diagnostics

4 Introduction This Webinar will only cover methods available in ControlLogix and CompactLogix platforms. Similar methods are available for some other controllers including some MicroLogix PLCs. We will be using basic Logix CIP messaging concepts and Ethernet communications which were discussed in the January 2013 Webinar. Recorded presentation is available in the technote AID

5 Agenda 1. When we need to use Logix Sockets? 2. Logix Sockets Basics
3. Where to Start? 4. Knowledgebase Examples 5. Sockets in Add-On Instructions 6. Troubleshooting and Diagnostics

6 Logix Platform Communication Methods
Logix Controllers can only communicate with devices that understand the Common Industrial Protocol (CIP). Ethernet implementation of CIP is called EtherNet/IP. Peer Ethernet device must understand EtherNet/IP protocol to communicate with a Logix Controller via Ethernet. For all other devices the Logix platform is offering functionality that allows the user to implement any protocol using common TCP/IP methods. This functionality called “EtherNet/IP Socket Interface or “Logix Sockets”.

7 Logix Sockets Concept Controller sends the CIP message to the Socket Object of the Logix Ethernet module. Ethernet module converts this message to a TCP/IP packet, which is sent to the peer device, to establish bidirectional communication.

8 Introduction Logix Sockets were introduced in 2005 with 1756-EWEB module. It was later expanded to 1768-EWEB module. In 2012 it was expanded to most of the current modules and controllers ControlLogix Platform – implemented in Ethernet modules 1756-EN2T, 1756-EN2TR, 1756-EN3TR, 1756-EN2F rev 5.7 or higher 1756-EWEB version 4.11 or higher CompactLogix platform CompactLogix 5370 controllers: 1769-LyyR with dual Ethernet port Must have letter “R” in the part number 1768-EWEB

9 Agenda 1. When we need to use Logix Sockets? 2. Logix Sockets Basics
3. Where to Start? 4. Knowledgebase Examples 5. Sockets in Add-On Instructions 6. Troubleshooting and Diagnostics

10 Server-Client Concept of Logix Sockets
Two Ethernet devices participate in any network “conversation”. Device that makes a first move is called the “Client” (originator of communication). Device that is waiting for the connection is called the “Server” (target of communication). “Client” connects to a “Server” establishing a connection. Once connection is established, bidirectional communications can take place using “Read” and “Write” commands. Sequence of these commands is defined by the user and is application dependent.

11 Logix Controller as a TCP Client
Logix Controller establishes a Socket within the Ethernet module using “Create” message. Logix Controller connects to the Server using “Connect” message. Once connection is established, bidirectional communication is available using “Read” and “Write” messages. Connection can be terminated by the Logix controller using “Delete” message.

12 Logix Controller as a TCP Server
Logix Controller establishes a Socket within the Ethernet module using “Create” message. Logix Controller uses “Accept” message to accept an incoming connection from a client peer device. Once connection is established, bidirectional communication is available using “Read” and “Write” messages. Connection can be terminated by the Logix controller using “Delete” message.

13 Logix Server-Client Comparison
Logix Client Sequence CREATE CONNECT READ DELETE WRITE Logix Sever Sequence CREATE ACCEPT READ DELETE WRITE

14 Logix Server-Client Comparison
Logix Client Sequence CREATE CONNECT READ DELETE WRITE Logix Sever Sequence CREATE ACCEPT READ DELETE WRITE

15 TCP vs UDP TCP message: Implements full handshaking between two devices. Requires initial connection. Every packet must be acknowledged. Provides data integrity. UDP No built-in handshaking. Requires application to check data integrity and sequence. Much faster than TCP.

16 IP Address and Port To establish a connection, Client needs to know:
The IP Address of the server. The Port number associated with this specific functionality. Port number is a 16 bit logical address within an Ethernet device that allows to connect application end points. The application at the remote Server must “agree” to receive messages at this port. A local Port on the client is also required when sending a socket message. In most of cases it can be selected automatically. Port number ranges are predefined for common functions and some of them are pre-assigned. Dynamic/private also available for user applications.

17 Path to Logix Ethernet module
CIP Messaging and Path Controller uses CIP messaging to communicate with the Ethernet module. Controller sends messages to the Ethernet module only; nothing is sent to the peer device directly. Message path for all messages point to the Logix Ethernet module. Ethernet module can be in the local or remote chassis and can be accessed via backplane or Ethernet. Technote AID explains Message Path basics. Path to Logix Ethernet module

18 Message Socket Create CREATE CONNECT READ WRITE DELETE SOCKET CREATE message reserves a logical Socket within a local Ethernet module. Message is sent from the controller to the Ethernet module. No data is sent to the peer device directly. Predefined Service of the CIP Generic Message Predefined UDT with Socket Description Returns Logical Instance Automatically Assigned to the created Socket

19 User Defined Data Types
Most of Socket Messages use User defined Data Types for Source and/or Destination. It’s important to keep UDT structure, sizes and data values to get quick results. Constant values that should not be modified Local Port Number must be specified for Server, optional for Client Local IP address should be 0

20 Message Socket Connect
CREATE CONNECT READ WRITE DELETE Connect message used by the Client to establish a connection to the Server The “Instance” number is returned by “Create” message. Instance number must be copied from the Destination Tag to all other socket messages. Predefined Service of the CIP Generic Message Predefined UDT with Connection Parameters Instance value provided by Create

21 Message Socket Connect
CREATE CONNECT READ WRITE DELETE Connect message can use IP Address or the Host Name of the peer device. IP Address or Host Name can be entered into the same string. Logix Ethernet module will resolve DNS name automatically. To use DNS, Logix Ethernet module. must have Name Server(s) defined. The same string will have a Port number. Format: <HOSTNAME>?Port=xx <IPADDRESS>?Port=xx Example: mydevice.rockwell.com?Port=123 ?Port=10001

22 Message Socket Accept CREATE ACCEPT READ WRITE DELETE ACCEPT message used by the Logix Module that operates as a server to accept an incoming connection from a Client. The “Instance” number returned by “Create” message is needed. Predefined Service of the CIP Generic Message Predefined UDTs with Connection Parameters Instance value provided by Create

23 Message Socket Read CREATE CONNECT READ WRITE DELETE Use “Read” and “Write” messages once connection is established. Sequence and data payload are determined by the protocol. “Read” message moves data from the Logix Ethernet module to the Controller tags. Predefined Service of the CIP Generic Message Predefined UDT with Connection Parameters Instance value provided by Create

24 Message Socket Write CREATE CONNECT READ WRITE DELETE “Write” message moves data from a Controller Tag to the Logix Ethernet Module. Ethernet Module then transmits this data to the peer device. Predefined Service of the CIP Generic Message Predefined UDT with Connection Parameters Instance value provided by Create

25 Message Socket Delete CREATE CONNECT READ WRITE DELETE “Delete” message closes connection and deletes a specific socket. Closing connection by default happens without peer device notification. This is suitable for most applications. To notify the peer “Linger” attribute needs to be set - AID “Delete All” message will delete all sockets in the Ethernet module. Predefined Service of the CIP Generic Message Instance value provided by Create

26 Agenda 1. When we need to use Logix Sockets? 2. Logix Sockets Basics
3. Where to Start? 4. Knowledgebase Examples 5. Sockets in Add-On Instructions 6. Troubleshooting and Diagnostics

27 Device Information Obtain device information TCP or UDP communication?
Will Logix controller be a Client or Server? If Logix controller will be a Client: Need to know the IP Address of the peer server. Port Number associated with this specific functionality. If Logix controller will be a Server: Need to know the local Port Number that peer client will be connected to.

28 Device Information Protocol information is specific to peer device.
Data format that devices are expected to send and receive. Special control commands embedded into strings. Delimiters or fixed length messages.

29 Windows Test Application
Use Windows based application instead of a peer device Eliminates any restrictions that peer device may have Allows to test initial handshaking on a specific port Send a receive test data Technote AID 32962 Windows application Logix files for Client, Server and UPD

30 Windows Test Application
Use computer to simulate peer device Use computer to simulate PLC Test PLC with device Computer Running Test Application

31 Agenda 1. When we need to use Logix Sockets? 2. Logix Sockets Basics
3. Where to Start? 4. Knowledgebase Examples 5. Sockets in Add-On Instructions 6. Troubleshooting and Diagnostics

32 Knowledgebase Sample Applications
Multi-socket Server application – AID 33672 Up to 19 incoming client connections. Sockets communication portion is fully implemented and can handle connection errors, client disconnects and socket re-use. User responsibility is to parse the incoming data packets and respond to them if necessary. Windows based test application.

33 Knowledgebase Sample Applications
Simple Printing application – AID 33240 TCP client connection to a generic Ethernet printer on port 9100. Can be used for Printers with a parallel and USB interface when combined with Ethernet Print Servers. sends a stream of bytes to the printer and will not check if printer replies with any messages, errors or "busy" signals. It may be necessary to implement handshaking based on the actual protocol supported by the printer. Two applications available EWEB_PRINT_SINGLE prints one string with maximum length of 462 symbols. EWEB_PRINT_LARGE can print up to 20 strings of 462 symbols and can be expanded.

34 Knowledgebase Sample Applications
Modbus TCP Master/Slave – AID Modbus Master and Slave applications. Fully configurable via controller tags, no ladder changes require. Support multiple connections. Support basic Modbus commands. Application comes with detailed user manuals. Modbus TCP Master Quick Start guide AID

35 Agenda 1. When we need to use Logix Sockets? 2. Logix Sockets Basics
3. Where to Start? 4. Knowledgebase Examples 5. Sockets in Add-On Instructions 6. Troubleshooting and Diagnostics

36 Sockets in Add-On instructions
Add-On instructions are not set for Message use No local type message tags. Each message must be set as InOut parameter. Each message tag must be configured once AOI is implemented. Source and Destination parameters must be InOut type of tag. Message service code can’t be changed programmatically.

37 Sockets in Add-On instructions
How this applies to Sockets in AOI: You must have 4 or 5 messages defined as InOut Parameters: Create Connect (or Accept) Read (and/or Write) Delete AOI Export/Import must be performed at the Rung level or higher to preserve the message tag values and configuration.

38 Sockets in Add-On instructions
Technote AID “Example: Add On Instructions for Sockets”. Predefined UDT with Connection Parameters Preconfigured set of Socket Messages

39 Sockets in Add-On instructions
User Defined parameters Path to the Logix Module Data Structure for Create Message Data Structure for Accept Message Data Structure for Read Message Data Structure for Write Message Socket Instance Number

40 Sockets in Add-On instructions
Technote AID “Example: Add On Instructions for Sockets”

41 Sockets in Add-On instructions
Technote AID “AOI example for using sockets to read time from NTP or SNTP server”. Ethernet Module Location NTP Server Address Predefined UDT with Connection Parameters Preconfigured set of Socket Messages

42 Sockets in Add-On instructions
Technote AID : “Using Sockets for with Basic Login Authentication”. UDT for Text and Addresses Preconfigured set of Socket Messages Predefined UDT with Connection Parameters

43 Agenda 1. When we need to use Logix Sockets? 2. Logix Sockets Basics
3. Where to Start? 4. Knowledgebase Examples 5. Sockets in Add-On Instructions 6. Troubleshooting and Diagnostics

44 Troubleshooting Message Instructions
Verify that message instructions are getting .DN bit. If .ER bit is set then get Messages Fault Code. Most common fault codes are documented in pub ENET-AT002. Complete list of reported fault codes is in the technote AID Individual fault codes also can be found using Knowledgebase Search.

45 Troubleshooting Message Instructions
All messages must be “unconnected” for CompactLogix. All messages have same connected/cached settings for ControlLogix.

46 Diagnostic Webpages The diagnostics web pages for Socket Object Log, Socket Object Attributes, and Socket Object Diagnostics. For EN2xx Version 5 or later and CompactLogix 5370, navigate: Diagnostics -> Advanced Diagnostics -> Miscellaneous -> System Data -> Socket Object Log (or Attributes or Diagnostics).

47 The Socket Object Log Page
Logging is disabled by default and must be enabled using message instruction.

48 The Socket Object Log Page
The Socket Object Log shows a history of the last 100 events.

49 The Socket Object Pages
The Socket Object Diagnostics provides information about the socket. The Socket Object Attributes show current attribute states.

50 Wireshark Wireshark allows the conversation between the devices to be viewed. If the socket is connected to the computer, Wireshark can just be run on the computer. If the socket is between two devices, a switch with port mirroring enabled is required along with the computer. Refer to the technote AID

51 Wireshark Wireshark Example.

52 Troubleshooting resources
The EtherNet/IP Socket Interface Application Technique ENET-AT002A- EN-P from the Literature Library. The Knowledgebase:

53 Thank You for Watching!


Download ppt "Welcome! Thank you for joining us. We’ll get started in a few minutes."

Similar presentations


Ads by Google