Download presentation
Published byGregory Howard Modified over 9 years ago
1
Socket Services Lunch & Learn Presented by: Eric Paquette Automation Specialist Kendall Electric
2
Copyright © 2012 Kendall Electric, Inc. All rights reserved.
Agenda What Is It? Understanding Basic Socket Services How is it Different from Standard Ethernet Communications Explanation of New Hardware Capable of Socket Comms Socket Services Hints Setting it Up Review of Error Codes – Common and Others Some Examples Reference Tools Setting Up and Using Logging with the EWEB Copyright © 2012 Kendall Electric, Inc. All rights reserved.
3
Copyright © 2012 Kendall Electric, Inc. All rights reserved.
What is a socket? A socket is one of the most fundamental technologies of computer networking. Sockets allow applications to communicate using standard mechanisms built into network hardware and operating systems. Although socket technology may seem to be a relatively new topic, socket technology actually has been around for roughly two decades. Sockets are bidirectional, meaning that either side of the connection is capable of both sending (writing) and receiving (reading) data. The application that initiates communication is termed the “client” and the other application the “server”. Sockets are created using an IP address and a port number. Copyright © 2012 Kendall Electric, Inc. All rights reserved.
4
Who uses socket interfaces?
Almost all networked hardware and software. Historically sockets have been of interest mainly to computer programmers. Most, if not all, programming languages use libraries that implement application programming interfaces (API’s) to access socket communications. Microsoft uses Windows Sockets (Winsock). Since the widespread growth of Ethernet in factory floor automation, a need was created to make a more generic socket interface. Not all products speak EtherNet/IP. Copyright © 2012 Kendall Electric, Inc. All rights reserved.
5
Copyright © 2012 Kendall Electric, Inc. All rights reserved.
Types of sockets Sockets are divided into three categories: Stream, Datagram and Raw Stream TCP/IP Connection Oriented Most Common Requires two devices to establish a connection in advance Datagram UDP Connectionless Implicit More efficient data transfer Raw Custom low-level programming Not common Copyright © 2012 Kendall Electric, Inc. All rights reserved.
6
EtherNet/IP vs. Open-Socket Interface
EtherNet/IP is a protocol and does in fact use sockets to communicate between devices. EtherNet/IP products from Rockwell set up the socket connections automatically. No user programming is needed Copyright © 2012 Kendall Electric, Inc. All rights reserved.
7
What can I use Sockets for?
Non-Windows Based Workstations Control data can be easily consumed by an external application using the XML data markup (Data Views) Standard XML data presentation provides a platform neutral environment (works on all Operating Systems) w/ EWEB support Any Standard Ethernet Devices (ie: Robots) XML Data (via Data Views) Sockets Connection (using the MSG Instruction) RFID Readers The EWEB modules support both TCP and UDP socket types. Up to 20 Socket connections per module. The MSG instruction in RSLogix 5000 is used to setup and pass data thru Socket connections to other devices Printers Copyright © 2012 Kendall Electric, Inc. All rights reserved.
8
Which Rockwell Products Support an Open-Socket Services?
1756-EWEB 1768-EWEB 1756-EN2xx 1769-L30ER, 1769-L30ERM, 1769-L30ER-NSE, 1769-L33ER, 1769-L33ERM, and 1769-L36ERM CompactLogix controllers 1769-L24ER-QB1B, 1769-L24ER-QBFC1B, 1769-L27ERM-QBFC1B CompactLogix controllers 1769-L16ER, 1769-L18ER, 1769-L18ERM CompactLogix controllers Copyright © 2012 Kendall Electric, Inc. All rights reserved.
9
Copyright © 2012 Kendall Electric, Inc. All rights reserved.
How is it implemented? Rockwell Products that support open-socket services contain a socket object that is available for creating connection instances. Socket Instances are created in the EWEB using Message (MSG) Instructions in the PAC. The MSG instructions use a CIP Generic messages manage the Socket Instances. This is similar to the socket API function calls in most programming languages. Each MSG Instruction is configured to perform one of the many different Socket Services. (Create, Open, Read, Write, Delete, etc.) To communicate with another device you must understand the other devices application protocol. For example: the Socket Write must send the data in the proper format for the end device to understand it. Copyright © 2012 Kendall Electric, Inc. All rights reserved.
10
Socket Object Services
Create Socket Delete Socket Delete All Sockets Open Connection (Client) Accept Connection (Listen) Read Data Write Data Clear Log Join Multicast Address Drop Multicast Address Copyright © 2012 Kendall Electric, Inc. All rights reserved.
11
Copyright © 2012 Kendall Electric, Inc. All rights reserved.
Typical TCP Client Copyright © 2012 Kendall Electric, Inc. All rights reserved.
12
Copyright © 2012 Kendall Electric, Inc. All rights reserved.
Typical TCP Server Copyright © 2012 Kendall Electric, Inc. All rights reserved.
13
Using MSG Instructions
Copyright © 2012 Kendall Electric, Inc. All rights reserved.
14
Copyright © 2012 Kendall Electric, Inc. All rights reserved.
Socket Attributes Socket Attributes can also be obtained using message instructions. These are divided into two catergories: Class Attributes (apply to the Socket Object) Instance Attributes (apply to each Socket Instance) Copyright © 2012 Kendall Electric, Inc. All rights reserved.
15
Timeouts! Timeouts! Timeouts!
There are three types of timeouts to be concerned with: Service Timeouts Should be less than the MSG timeout Set in the Source Tag of the MSG MSG Instruction Timeouts 30 Sec is Default, can be up to 35 minutes Set in the MSG Configuration Tab Socket Instance Timeouts 5 minutes is default Set by accessing the Socket Instance Attributes Copyright © 2012 Kendall Electric, Inc. All rights reserved.
16
Copyright © 2012 Kendall Electric, Inc. All rights reserved.
Socket Object Logging The EWEB cards are capable of logging activity and errors and are stored in RAM of the module Logging is viewed on the Web Pages of EWEB module Items logged can be selectively chosen The log can be enabled, disabled, or cleared from within the controller using a Socket Class Attribute MSG Copyright © 2012 Kendall Electric, Inc. All rights reserved.
17
Socket Object Logging (cont’d)
Logging can be enabled for the following: Socket Create Requests Open Connection Requests Accept Connection Requests Read Requests Write Requests Delete Socket and Delete All Socket Requests Get / Set Attribute Requests Log All Service Errors Copyright © 2012 Kendall Electric, Inc. All rights reserved.
18
Socket Object Logging (cont’d)
A view of the EWEB Log Web Page Copyright © 2012 Kendall Electric, Inc. All rights reserved.
19
Copyright © 2012 Kendall Electric, Inc. All rights reserved.
Errors Message Instruction Errors contain two parts: Error Code Extended Error Code Error Codes 0 to FE are MSG Errors See page 165 of 1756-RM003N-EN-P Socket Service Errors Codes are generally FF When evaluating errors from Socket Service Messages, we typically look at the Extended Error Code See page 155 of ENET-UM527-EN-P Copyright © 2012 Kendall Electric, Inc. All rights reserved.
20
Knowledgebase Articles
48879 – Summary of EWEB socket Information 32962 – Sample Application in Ladder 40626 – Socket Service Hints – List of Hardware with Socket Support 66505 – Basic Socket Code in Structured Text 33240 – Using EWEB with Ethernet Printers 33672 – EWEB TCP Server application sample 34357 – Send UDP multicast messages Copyright © 2012 Kendall Electric, Inc. All rights reserved.
21
Copyright © 2012 Kendall Electric, Inc. All rights reserved.
Let’s see it in action! Demo Copyright © 2012 Kendall Electric, Inc. All rights reserved.
22
Thank you for attending this Lunch & Learn session! Questions?
Copyright © 2010 Kendall Electric, Inc. All rights reserved.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.