Concurrent CIP Data table messages

Adrian Rios

Member
Join Date
Mar 2009
Location
Nuevo Leon
Posts
13
Hi everybody I wish you could help me with this:
I have 4 CIP Data table read messages and 1 CIP Data table write message that communicates from a ControlLogix 5555 to another ControlLogix but when the messages executes I realize they do in an undesired way (one or two of them keep executing for a while but then they stop and let other messages execute). What I want is to receive them as they appear in ladder code or as the subject of this thread suggests to have them being sent concurrently all of them simultaneously, anyway they refer to different tags so they should be able to work well even at the same time (that would be great for sure!!).
Is this expected behavior? Am I doing something wrong? Hope any of you guys can throw more light about this.

Regards.

Adrian
 
Last edited:
Hi Adrian, and welcome to the Forum.

Because MSG instructions execute in ladder logic only when the rung conditions tell them to do so, you would have to post the code that manages the message instructions in order to have that examined.

If you have four CIP Data Table Read instructions executing to the same target controller, you should try to consolidate the target data so that it can all be read with a single message. Array Tags and User-Defined Data Types are two methods of accomplishing this.

If you cannot post your entire program, select only the rungs that manage the MSG traffic, right-click and Export them as a *.L5X file. This can be imported by a Forum user into another RSLogix 5000 project for examination.
 
This is the program

Thanks for the welcome, I´m sure this forum helps a lot of people and that is very noble.
Here I am attaching a picture of my ladder logic (comments in program are obsolete, so dont care about them).
The real thing is that I am not using another "real" ControlLogix, I am simulating one by software and sending request from a real one having the simulated one replying as a server. That is already implemented, I am just making some little changes and it works but, I dont know if my ladder logic or the objects I use are wrong but I keep receiving the same requests for a while and suddenly they stop and other executes, what I need is to have a full control of which messages executes and when.
By the way, I have used that many messages because I am using the maximum capacity of the EthernetIP messages through CIP Data table Read/Write and they have a limit of 500 bytes or something like that, so my messages move 220 elements (440 bytes).
Again thankyou for your help pals.
Adrian.

ReadMessages.jpg
 
Well, my error was the way I managed the messages to execute, as the help states those bits work asynchronously so, I changed it (thanx to a partner that do knows how to program a CL) to consider our own flags and counters instead of directly taking those from the messages, and it works nice.
However, sometimes ocurs a connection failure but it may be related when my server receives an unkown command 0x66 and my server doesnt know what to do with it. By the way the command only has another element 0x1234 that comes like this (in hex):

0000: 66 00 00 00 34 12 00 00 - 00 00 00 00 00 00 00 00 f...4...........
0010: 00 00 00 00 00 00 00 00 - ........

If someone knows what this command means, it would be great to correctly handle it.

Regards.
Adrian
 
This is the new program

The new program looks like this, every message know is validated with our own counters instead of directly checking the bits of the messages.
I know I need to đź“š more about all this stuff but I needed to do some ladder programming for my own purposes but I dont usually do it, I am a C/C++ programmer, but thanks in advance for the space to publish my doubts.

Adrian

fixed.jpg
 
Let me get this straight; Are you writing software that acts as an EtherNet/IP message emulator, or as an I/O server or client ?

Is your company a member of the ODVA, and do you have the EtherNet/IP specification ?

The MSG instructions cannot execute "simultaneously" because TCP is stack-based.

They can execute in sequence if you program each of them to execute once the previous one has completed.

If you can post *.PCAP captures of this traffic, somebody might be able to examine the entire packet.
 
Yes, I am writing software that acts as IO Server.
We bought a library for the EthernetIP driver but it is incomplete and I am making an effort to achieve good and robust performance with the server implementation.
Right now I am realizing that when the unconnected timeout message expires, the PLC sends a command 0x66 and really don´t know what to do in order to have the PLC not to close the connection and recover from the error and as you can see yes, we dont have the specification as we relied on the library we bought, the name is CELL (yeah, like the DBZ character haha) if want to check it out.
 
CELL was written by Ron Gage, who sold the rights to Linux Network Services (LNS). LNS has an ODVA vendor ID, but I don't know if they ever submitted their product for compliance testing.

Post a TCPDump or Wireshark capture of the message in progress.
 
Here is the TCPDump

As I can see it says Unregister session and it ocurs after one read message specifies error due to an unconnected message timeout and the most dangerous thing about it its that the PLC dont reconnect or recover from that error. What I think I should do is to increase the timeout in the message configuration togheter with some effort to assure my server will always be available, and maybe some work on the ladder logic to handle that timeout if any and clear it so it will reconnect, right now it reconnects after changing from program to run and I know thats not a feasible solution.
 
Adrian,

One packet out of context is very difficult to interpret.

If you can, post the actual *.PCAP file with traffic showing the ControlLogix connecting to your server, establishing an I/O connection, sending a MSG instruction, and having the MSG instruction fail.

Most users who do Ethernet analysis can read *.PCAP files from Wireshark or TCPDump.

I have customers who have had very good success with the EtherNet/IP stacks from Pyramid Solutions (www.pyrasol.com). They are ODVA tested and certified and very popular in the ControlLogix user community.
 
Im sorry for that

Here is part of the capture, it has the most significant part of the traffic, from what I see there exists two ACK that comes out of time and after the last one (comming from mi server) 32 seconds later ocurs the unregister session and my server try to reply with the same buffer it receives.
This server is on QNX Neutrino and written in C++, so we considered some software vendors that provide the capabilities we need and balance it with the price as you know this kind of software is expensive and it is only part of the system we develop.
The error condition Im sure it is caused due to a CPU demanding peak on the QNX platform where the server is running, so it is starving, it is completely anormal but it may ocurs thats why we must to find a way to recover from error conditions and I dont know if the reconnection dont ocurs because my server doesnt know how to reply to the unregister session command or it is unavoidable once the ACK arrived too late.
Hope this helps to clarify the issue.
Adrian
 
Here is the PLC program

Maybe this would give more information.
I think the reason the PLC doesnt reconnect is that on an error and due to the logic of the program it does not issue another message if the DN bit is set. Adding an OR between the DN and the ER bit I can assure the messages will continue to execute even if they fail.
 
These are the plc packets

These are the PLC packets.
10.1.0.57 the PLC (ControlLogix)
10.1.3.220 the emulated PLC (it is a virtual machine with QNX)
10.1.3.208 is my windows PC.
 

Similar Topics

I'm sure it's something simple I'm missing. I downloaded VMware VM and installed win 7 ult. I want to network the the VM with my win 10 so they...
Replies
0
Views
2,390
It's not directly PLC related but it is probably a problem that some forum members have solved in the past. The issue I have is that we are...
Replies
6
Views
3,336
I just purchased a copy of FactoryTalk View Studio (formally RSView Studio). It came with a concurrent activation. Per the RA website, this...
Replies
5
Views
11,763
Hi, First time poster, long time reader. I've got a mass flow controller device for controlling the flow of gas. It has a flowmeter and an...
Replies
4
Views
273
Hi Folks! Could I use the Studio 5000 to read/monitoring Stratix 5700 parameters? Like switch temperature for example
Replies
11
Views
359
Back
Top Bottom