Help Understanding what a SOCKET connection is.

DaveMac

Member
Join Date
May 2003
Location
South Carolina
Posts
34
My IT guys are asking me if we can connect to my ControlLogix via a SOCKET connection. My problem is we do not know enough about each other stuff to even start. I understand a socket connect is a possibly a TCP style of data traveling around a network being heard by a PC listing on a particular socket or port number.



My question is without VB,C or any other app besides their Java on their end and me running Linx on my end can we talk? They want a socket connection but is that doable and if so where can I be educated?





Thanks!
 
You need to talk to your IT guys and see what they want. The terminoloy may differ from location to location.
 
Last edited:
Basically they want a number. I have say 10 photoeyes. When PE01 makes I will send them a message saying it made say be sending an integer of 1. They question is how do you get data from a PLC to a PC. They already hate me for having Linx and RSSQL and RS VIEW on the network because they are IT but they really do not want any other software involved in this process because it is theirs not engineering. You guys know the drill.
 
I am confused

Why does IT need to know?

It depends, if you have RSLinx Pro then you can OPC the information into Excel;


There are other methods, please offer details.
 
Socket connections are possible to the Controllogix though I am not very experienced in them. What you need to look at is the 1756-EWEB but I don't think the socket connection feature of the EWEB is what IT wants

This module is a little different than the other communications modules in that it doesn't require the middle man such as RsLinx to communicate with a computer. I think this is what they are looking for. Pretty much any program that can generate an HTTP request can communicate with the Controllogix. This includes Internet Explorer, VB, C, etc.

Now the EWEB is absolutely my favorite module of the Controllogix system and I could go on and on about why it is the key to bridging the gap between IT and the Plant in many systems and why it is the greatest thing Rockwell has come out with in a long time but why don't you verify that this is what they want before I elaborate too much
 
There is some confusion as to a socket connection or a TCP connection. I would try to clarify that with them. It looks like it supports up to 64 connections.

Each time you send a MSG or use a VB or C program to communicate over the network, the software opens an connection, sends or receive info and then should close that connection.

For example in a SLC505.
They have 3 types, 16K,32K and 64K. They support 8, 16, or 24 connections.
You can run the SLC505 out of connections by opening to many at once. I believe but am not sure that the ControlLogix processors support different numbers of connections depending on the processor.

I found this document on the AB website.
http://www.ab.com/en/epub/catalogs/12762/2181376/2416247/360807/1837522/tab2.html
 
Mark, not quite. These sockets he is speaking of are connections to ports. For instance port most of us are connecting over port 8080 to view this site.

If we want the Controllogix to print to an Ethernet printer we would make a socket connection to port 9100 typically

You are limited to 20 of any combination of the following types of sockets. UDP, TCP Client, TCP Server, and TCP Listen Only
 
Just to clarify a few things
DaveMac said:
I understand a socket connect is a possibly a TCP style of data traveling around a network being heard by a PC listing on a particular socket or port number.

This is the correct terminoligy and the Eweb is probably capable depending on the details but...


My question is without VB,C or any other app besides their Java on their end and me running Linx on my end can we talk? They want a socket connection but is that doable and if so where can I be educated?
Ask them if they can work with HTTP request and XML. Java is capable of this and I think this is what they really want.
 
Analogy: An IP address is the 'Phone Number' for the building. A Socket is the particular 'Extension' in the building.

So, for example, if you need to talk to Joe Musthavecontrol, you would dial '1-800-ITISGOD', then extension '666'.

Under TCP, sockets (also known sometimes, and not precicely correctly, as 'Ports') have typically defined
'extensions'.

When you 'Dial in' to a webserver, you typically call '10.0.0.1:80', and ask it to respond to you at '192.0.0.1:9876'. The '10.0.0.1' is the webservers host IP address, the port number is 80 (http), your computers host address is '192.0.0.1', and the socket you want to talk over is 9876.

So what is '9876' ? It's a arbitrary FREE 'socket' number used to establish a link to the webserver. And, typically, the webserver will respond on a different socket than 80, as it has to maintain connections to all users. What do the sockets do? they establish a private (not secure, just unique) connection between your requesting application (a browser) and the server application (the web server). If it weren't for sockets, you couldn't have multiple IP applications open at one time effectively.

So, what is the fine difference between sockets and ports? A Port is usually considered to be an 'Open Extension' that is waiting for something to connect to it, in order to perform a particular service. Querying a servers Port 80 will ask it to open a SEPERATE socket connection to your browser. Querying a servers Port 25 will ask it to open a SEPERATE socket connection to your mail client. Probably clear as mud, but it's some information.

Now, about your IT department... If they insist on taking control of the controls, make sure they also take responsibility for the process. Total responsibility, including safety. I suppose they can go so far as writing their own CIP protocol stack, and read / write data from a CLX processor, though doing so is not only arrogant, but irresponsible. They should just make use of RSLinx as an OPC Gateway (yes, you need Linx Gateway), and then play around with little Java OPC clients.
 
rdrast said:
They should just make use of RSLinx as an OPC Gateway (yes, you need Linx Gateway), and then play around with little Java OPC clients.
While I agree that they need to do this with responsibility just as you must in any situation such as this RsLinx is not necessary. Using the Eweb is just as safe as using RsLinx. Actually the Eweb is probably a little safer since it does require login. It is all in who will administor it. I would look into the Eweb as an alternative to RsLinx. We switched and it has worked great for us

Oh and an excellent explanation or ports
 
Assuming the goal is to read rom and write to a ControlLogix

1. I recommend DaveMac or the IT department buy a driver for the IT computer that communicates with the ControlLogix over Ethernet. DaveMac has not said what type of computer and OS the IT computer is so I can't recommend one.
2. Or download Ron Gage's Cell library. It is written for Linux but can be converted to many other OSs. This is much better than attempting to write a ControlLogix Ethernet library. It takes months to write a good ControlLogix Ethernet Library. I know because we did it. Rdrast's comments about being arrogant and irresponsible may be a little strong but it is foolish to attempt writing this software unless it is going to be used many times on a product as in our case.

Explaining sockets is like explaining how a car works when all you need to do is drive to the store. I was amused. How does explaining sockets, ports and connections get DaveMac to the end goal?

Focus on the goal first. Not the means.
 
I think ITs goals are to do this without the need for additional software. That is why I suggested the EWEB. Forget the socket connection. If you go back to my origonal post you will see I say the socket connection is not what IT is probably looking for.

Explaining sockets is like explaining how a car works when all you need to do is drive to the store. I was amused. How does explaining sockets, ports and connections get DaveMac to the end goal?

Focus on the goal first. Not the means
With the information that has been given I believe the EWEB is the correct solution
1. It will do the socket connections if they really want them
2. It allows you to read and write tags to the processor without the need for additional software such as RsLinx. Java can read these tags directly
 
I learned something.

2. It allows you to read and write tags to the processor without the need for additional software such as RsLinx. Java can read these tags directly
Rockwell has made it much easier to get report data from the ControlLogix. I agree with TW now. Get the 1756 EWEB. I will be an additional Ethernet card but you do want the IT guys messing with yours.

I just looked up 1756 EWEB. The EWEB uses XML as an application layer. This is very smart and XML is open. Microsoft has a libary that makes it relatively easy to generate or parse XML files. The downside is that XML files are big so the update rates will not be fast. This is a good enough reason for the IT guys to have their own EWEB card.
It looks like the updates are on the order of 4 times a minute.
At least the EWEB card wouldn't impact on performance to much at that rate.

This document would be a start.
http://literature.rockwellautomation.com/idc/groups/literature/documents/um/enet-um527_-en-p.pdf
 
You can actually continuously poll the tags. It will read roughly 1000 tags every 3 seconds.

There is a limit of 2500 XML tags at a time. If you need more it is not hard to do, especially if you are using a program such as Java, VB, etc
 
TWControls, are you using the 1756-EWEB? If so how are your IT guys accessing the ControlLogix? The the numbers you are quoting propaganda or from experience.

One must remember that just because you can doesn't mean you should. Requesting 1000 tags every 3 seconds will keep the ControlLogix busy as well as the 1756-EWEB.

The EWEB does look like a product an IT guy can love.

I am going to pass this on to our software engineering and our project manager. The ENBT is still better for accessing our product but EWEB seams relatively easy to use. This idea of using XML as an application layer may come in handy in other projects we do. Thanks for the tip.
 

Similar Topics

Took a new job and the controls schemes are fairly old and I'm used to Allen Bradley and Siemens. I'm looking to replace a pair of Superior...
Replies
1
Views
130
Hello Team, I am desperate for some help with an assessment I have as part of a Level 3 general engineering course. I am in a role that is much...
Replies
9
Views
414
Hi, To give some context of the situation and why I'm posting. I started a PLC module as part of a general engineering course last year and the...
Replies
6
Views
2,062
https://imgur.com/a/kKPtzyP We are making improvements to these motor controls by replacing these old resistor banks and DC generator with DC...
Replies
3
Views
1,820
I get so confused by Rockwell's licensing structure. I have two PC's that will be running the same SE application. Can/should I run this as...
Replies
7
Views
1,909
Back
Top Bottom