Sign in to follow this  
Followers 0
gravitarfdh

EWeb throughput

32 posts in this topic

I've been goofing around with an eweb module as a possible solution to get tag data to a Level 2 system (Unix HPUX) with a Java interface. Got it working using CIPmessage.... commands. What I am running into is possible data over-run problems. I have a Java class that reads a block of 20 DINT tags in a single http post request. In order to simulate the loading I will be requiring, I call that method 30 times, back to back, then wait for a period of time, say, 1 second. While this program is running I see 2 behaviours.... 1) If I surf to the module and open up a data view (2 tags in the view) and hit "update", I have a good change of faulting the device. 2) From time to time (3 times an hour) one of the reads from the Java program takes over 3 seconds, when normally the read completes in 40 ms. I then tried to back it off a little and tried One read, once a second, of 100 Dint's and get only 50, but can still crash the thing by surfing to the device, and still get the odd 3 second response. I think I'm just overworking the thing. Any Thoughts? Grav

Share this post


Link to post
Share on other sites
I wouldn't say you are over working it yet First you say you are using CIPMessage but you are reading DINTs. Are the DINTs tags on a controller in the same chassis as the EWEB? When you say you are calling the routine 30 times back to back, are you waiting for the data to get back before you execute the next request? Also, are you familiar with RsLogix 5000s Task Monitor?

Share this post


Link to post
Share on other sites
You probably should contact techsupport on this issue because most likely engineering needs to be involved in performance issue. But before engineering getting involved few things you need to clarify: First off, I don't understand why you use CIP messages to read tags? Did you try to capture Ethernet traffic on the EWEB port? This may tell you where bottleneck is. Also how busy your PLC? what other comms it does? What overhead timeslice is set at? As you see too many variables involved, but you should definately contact support with traffic capture so they can analyze it. Edited by Contr_Conn

Share this post


Link to post
Share on other sites
Thanks for the replies. I guess the crux of the matter is that if I want to poll 200 tags, once a second, then possible write 100 tags sporatically, you all feel this is possible. That is what I wanted to hear. The Dint's are all on the same chassis as the eweb, and the machine is not doing any control, it is a spare. All reads ar synchronous (I wait for the data before issueing another request). I guess I should be carefull of the terminology I use, as "Fault" in my case means crash, requiring a hard reset. Definately repeatable (the machine is remote to me, so I have standing orders with my PLC guys, if they see the red light on the eweb, yank it! ). I am not a PLC programmer (I only play one on TV ). I am more of an interface guy, with a long history of Fortran, C, C++ on VMS systems, using interchange, 6001net, and more recently Windows machine and RSLinx/OPC. I write and maintain programs for process control - modeling, tracking and the like. Our task at this point is to come up with a way to get CLX data in to the Unix box (Java) natively, if we can. The EWeb certainly seems like a slick way to go here (in the absence of any supported API). My opinion of the EWeb is that it exposes several interesting interfaces, that on the surface seem ok, but it is only with your imagination, that you realize that with these simple tools, quite a bit is possible. Edited by gravitarfdh

Share this post


Link to post
Share on other sites
I don't think 200 tags a second should be any problem but I will look a little more into what you are doing. We need to work on your methods a little bit. I would use the XML method Start by reading THIS technote. It is not a Java code but it will start giving you a feel for using the XML. It is actually a Javascript example which I know is not the same as Java I am running a little short on time this morning but I will try to elaborate more this evening Go to AB Knowledgebase HERE and type "eweb" under keyword. Read through those technotes. I think there is a VB example there which you would probably be familiar with and may be able to convert to Java. I am not a Java programmer but when I was first toying with the EWEB my brother who is a Java programmer was able to read the XML tags from the Eweb. Oh and search the AB Section of this site for "eweb". I think I posted a stripped down XML loader for Javascript sometime ago that may be easier for you to understand. If you can't find it I will repost this evening. Keep us posted TW

Share this post


Link to post
Share on other sites
Thanks... No worries about XML and parsing here, do it all the time. I think I'll play around with that for a while. Gotto call my network guy and make sure the port I'm using is set up properly. Grav.... P.S. Tried to sign up as Gravitar but that was taken Hey, I bet he doesn't have Atari's Gravitar in his games room

Share this post


Link to post
Share on other sites
According to THIS manual, page 48 these are the capablities of the XML 10 tags in 100ms 100 tags in 350ms 1000 tags in 3s Suprise Gravitar hasn't chimed in about you copying his name

Share this post


Link to post
Share on other sites
Red OK light I guess? in this case crash log created that can be accessed via webpage. Techsupport should be able to look at it. If this is repeatable, then techsupport should be able to load your code and get the same "crash" result. The bottom line - it should not crash... And make sure eweb has current firmware Edited by Contr_Conn

Share this post


Link to post
Share on other sites
I think my funky crashes are due to network settings. It seems to be getting confused with the autonegotiate. I'll have to get my network guy to hard code it to 100 full. We've seen crashes like this even with enbt modules, when the switch thinks full, and the unit thinks half Tech support was already dialed in, no worries, getting great support. I am posting here as a second resource, and to get contacts outside of RA for real-world experience. Grav

Share this post


Link to post
Share on other sites
What firmware are you running? I know there were some problems with DNS being enabled but I thought they were solved. I would like to know more about what you are saying and how to replicate it. I have several ENBTs and would like to make sure I don't run into the same problem

Share this post


Link to post
Share on other sites
There is a simple rule about autonegotiation: - If autonegotiation does not work, try to force BOTH ends (one end will not work) - If force working, then it means you have network problems. Fix your network problems until negotiation works. - once network fixed , then leave it with autonegotiate. DO NOT LEAVE IT FORCED, you are looking for trouble, because froced baud/duplex will put you down one day. Next, you mentioned red light before, but now you are saying this is autonegotiation that never red lights the EWEB. It can lock up on the ethernet port, but can't cause the crash. Just intresting what techsupport said - can you share please?And by any chance are you using EWEB Java toolkit? Edited by Contr_Conn

Share this post


Link to post
Share on other sites
Talked to my network guy, and he would prefer autonegotiate, but he said fixing at 100 full will be solid. Latest firmware 4.3.2. Must be something other than the ethernet settings then, because the red light is happening Not using a toolkit. I think I'm trying everything else though Tried some ASP stuff today, that's cool. Can return to you XML in any format you like! My target method is /rockform/CIPmessage?, a relatively undocumented approach to getting data out of the box, but a very efficient means of getting contigous blocks of data. Like say, an array of Dint's. you basically tell the thing the start address and how many elements you want. 40 ms response time for 20 elements, 90 ms response time for 100. The down side is having to encode and decode commands from hex, but heck, I'm a programmer, that's what I do. My understanding of the Duplex issue, is that if the switch thinks full, and the enbt thinks half, or vise versa, then there are circumstances where either the switch or the unit will be told to shut up, and never be given the all clear. But then again, I'm a programmer, not a network guy. I trust my network guy implicitly. Grav

Share this post


Link to post
Share on other sites
Firmware 4.3 released for redundancy systems only, it is not released as a stand-along item. May be something in there because not too many people using it yet. I am running 4.x for months and did not have any lock ups while using this module for VPN connection to my local test network. Red Light: question again - what light? EWEB has 3 lights. Can you be more specific? At this point I recomend that you call techsupport and let them handle this.

Share this post


Link to post
Share on other sites
Just an observation. Just because the Ethernet can send and receive at 100 Mbs that doesn't mean it can in reality. Tag based communications are extremely slow compared to lower level methods of transfer. What I find so interesting is that people get hung up on the 100 Mbs and ignore the full/half duplex capabilities. Another MAJOR problem is the Ethernet process itself. It takes a lot of clock cycles to process and Ethernet packet and the tag based comms makes that much worse. On top of that the Ethernet controller must communicate with the PLC and that also takes time.

Share this post


Link to post
Share on other sites
Peter is correct, CIP message is no an efficient way to read tags. That is why I asked the same question in my first post "Why CIP MSG used?" XML dataviews is a better way, I think,

Share this post


Link to post
Share on other sites
Okay, I took a look and here are my results. 100 Dint tags, in a UDT array - contiguous. Dataview - 900 ms not bad ASP with ReadLogixTag - 900 ms not bad /rockform/CIPMessage - 90 ms wow! Of course, I am not monitoring CPU usage on the processor That would be "Why CIP MSG used?" Grav

Share this post


Link to post
Share on other sites
I can't verify the numbers for your CIP messages but your XML call times are extremely high. Can you go into a little more detail about what you are doing in your code? Perhaps things such as parsing the data and updating arrays and displays?

Share this post


Link to post
Share on other sites
Sure can I have put the timing around the url connection, with no parsing of the data. The data I am going after is in a UDT. I can account for the CIPMessage being faster, in that for the DataView, and the ASP stuff, each point in the array of 100 Dints is a separate read, but with the CIPMessage, the processor sees one read of 100 items. Im Pseudo code Save current time Set up URL Connect ot URL Dataview Read from connection, put in result String Save Current Time Print Current time and result string Grav

Share this post


Link to post
Share on other sites
I still don't understand how you are using CIP Message to read tags. Within controller we have CIP Data Table Read or write, that points to the specific UDT. Within EWEB you have only CIP Generic, that required Class, Instance, attribute. How you got this? I guess class is 6A, but what about instance? Instance is dynamic and can change if program reloaded I guess. Can you post an example?

Share this post


Link to post
Share on other sites
Sure can. This is actually kinda interesting, as it is not documented very well, and ther is all sorts of HEX involved. Works well too. This examples assumes you have an array Dint[10]. http://myIpAddress/rokform/CIPMessage?path...p;complexIOI=4C 03 91 04 44 69 6E 74&data=0A 00 It can be broken down to the following 4C - data table read 03 - 3 words in the rest of the command 91 - symbolic segment follows 04 - 4 bytes in the name 44 69 6E 74 - Hex representation of :Dint" 00 - Optional - padding byte. Segments must be word aligned (not used in my example). The data part asks to return 10 elements. The return is hex, with the first two hex numbers are the data type and the follow groups of 4 bytes represent the DINT, which you may have to re-arrange to decode. Note: Looks like the path=1,1 is not displaying properly Edit: One more thing. Cut and paste this in the browser. No coding on the Eweb. I then used a Java program thith the URLconnection class to retrieve the data, tne decode it. Edited by gravitarfdh

Share this post


Link to post
Share on other sites
Can you repost that string without http so browser keeps it correct please. or email it to me. thanks Edit: I think we got it: [xxx://myipaddress/rokform/CIPMessage?path=1,1&type=STRING&complexIOI=4C 03 91 04 44 69 6E 74&data=0a 00 Edited by Contr_Conn

Share this post


Link to post
Share on other sites
xxx://myipaddress/rokform/CIPMessage?path=1,1&type=STRING&complexIOI=4C 03 91 04 44 69 6E 74&data=0a 00 we got it working but changed "data" form 0A to 0a - looks like it is case sensitive. I see why it is faster because readlogixtags reads one tag at the time, and this method reads whole array in one shot. Too bad that tt is not documented anywhere. I know it is a part of CIP, but this structure is EWEB specific. Edited by Contr_Conn

Share this post


Link to post
Share on other sites
Yup that's correct. set up a tag array name "Dint" with a length of 10 and you can give it a go. It gets much more cumbersome if you want to access a udt like myDint.Dint. Grav

Share this post


Link to post
Share on other sites
I suspect the underlying code for the data view or java CIP calls probably use the CIPmessage, but have no evidence of that. Regadless, if you need to read an array of Dints or Floats, and your willing to decode ascii and swap bytes, you can get some real efficiencies here. My Java code used capitals by the way. Once I decode the type, I send the string into a class and it returns an array of integers or floats. Once you code up the hex to Long or Hex to Float once, it's done for good.

Share this post


Link to post
Share on other sites
I'm impressed. Will have to try that and compare. Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0