CompactLogix sending CIP message to a PC

colorofwind

Lifetime Supporting Member
Join Date
Jun 2012
Location
Edmonton, Alberta
Posts
38
Hi, we've worked to figure out the CIP protocol for a few days. We intended to write a 2 way communication program using socket between Linux and PLC. However, the AB programming manuals didn't specify all the data that is sent. And the only example of real data (by each byte) is from a PLC to another PLC. We tried to send a packet of bytes (from the example) to the PLC but no response from the other end.

Maybe it's easier to implement only 1 way communication. So is it possible to set the PLC program in RSLogix 5000 and gets it to send the tag values we need to a local IP address (PC) and we'll decode it? How does MSG instruction work in this situation? Or are we even on the right track to tackle this problem?
 
Are you trying to read a specific Tag inside the controller, or establish a cyclic I/O connection ?

There are a handful of Linux projects for connecting to ControlLogix; are you using one of them, or starting from scratch ?
 
Are you trying to read a specific Tag inside the controller, or establish a cyclic I/O connection ?

There are a handful of Linux projects for connecting to ControlLogix; are you using one of them, or starting from scratch ?

Yes we are trying to read some tag values in the controller, mostly are temperature readings from thermocouple and the valves positions. It's better if we can start from scratch because we only need limited functions, and keep the program size as small as possible to run it on a Linux single board computer. But I'd like to see some linux projects and I'm sure it will be helpful to us.
 
My next step would be to get Wireshark traces of your application attempting to read the controller and compare them to traces of a known-working application (like RSLinx Classic) reading the controller.
 
I was able to exchange data between a CompactLogix and my linux box using the CIP/EthernetIP specs, the logix5000 data access manual and Wireshark.

That should be all that you need.
 
I was able to exchange data between a CompactLogix and my linux box using the CIP/EthernetIP specs, the logix5000 data access manual and Wireshark.

That should be all that you need.

Hi there, instead of Wireshark, we used another TCP/IP sniffer to track the packets sent and received. But still we encountered two problems.
1. The CIP/EthernetIP spec sheet didn't tell us the meaning of all bits that are sent to the PLC. Some definitions are very vague.
2. When we used an old version of CELL that was mentioned above, it can talk to PLC. But the process of exchanging information, or to shake hands with PLC, is different from what we read in the spec document. Although we can't successfully retrieve any tag value by using this program, the sniffer showed that it did communicate successfully with PLC.
 
You wrote your own code to do this?

Yeah. I havn't had the time to finish it though. My plan was to have it log data into an SQL database on my NAS.
Some day...

Hi there, instead of Wireshark, we used another TCP/IP sniffer to track the packets sent and received. But still we encountered two problems.
1. The CIP/EthernetIP spec sheet didn't tell us the meaning of all bits that are sent to the PLC. Some definitions are very vague.
2. When we used an old version of CELL that was mentioned above, it can talk to PLC. But the process of exchanging information, or to shake hands with PLC, is different from what we read in the spec document. Although we can't successfully retrieve any tag value by using this program, the sniffer showed that it did communicate successfully with PLC.

Does your sniffer know Ethernet/IP and CIP? Wireshark does, and it breaks it down for you.
1. Can you post which parts you are having trouble with?
2. I havn't tried CELL but maybe it's using connected messaging. That's what I did.

I would of recommended tuxeip, but i see that Stéphane already did.
 

Similar Topics

Hi I have a job to do which is to have a call button and a sounder on either end of a line so if the operator needs assistance they can press the...
Replies
10
Views
3,900
I am using a compactlogix 1769-L16ER BB1B to send a print string to a L-series Mathew printer. My main question is can I setup a TCP/IP...
Replies
4
Views
1,855
I had a project possibility fall in my lap yesterday, and I spent some time trying to figure out the mechanics of sending a couple values between...
Replies
12
Views
4,794
Has anyone ever tried to send email to multiple addresses with a CompactLogix. Manual examples affect sending to only one address (...
Replies
4
Views
4,060
Hello All, I have CompactLogix 1769-L33ER processor and I'm trying to send an e-mail from it. I'm following the instructions from this document...
Replies
31
Views
12,260
Back
Top Bottom