Sign in to follow this  
Followers 0
iJAF

Communications M340<=>STBs - TTL not enough!

13 posts in this topic

Hi, I'm using a modicon PLC (M340 )with some STBs NIP2212 in a big gigabit optic fiber ring gigabit topology network !!! Everything is working fine ! But when testing the redundancy of the ring network (by disconnecting network segments) and the packets have to travel by the longest side of the ring (lot of network nodes) the communications are lost !! Through packet monitoring, we believe that the default TTL value (time to live) of 10 is not enough (more than 10 jumps) !!! The network analist said to me that I must have a TTL al least of 32 (64 recommended) I'm using the IOScan in a NOE0100 card ! I have contacted the local schneider support and they said that I can't change the TTL of the IOScan TCP packets of 10 :O !!! Have you got any suggestions in order to solve this problem !?! Thank you !!

Share this post


Link to post
Share on other sites
explain well what you means lost of communication. Explain better the test you are performing. After you reconnect the ring how much time does it takes to estabilish its functionality? Modicon STB never re-connect to the M340?? Are you configuring Hiper-ring protocol or what? Are you using Schneider switches or what? Did you change anything in Advantys NIP ethernet web configuration?

Share this post


Link to post
Share on other sites
Hi thank you for your feedback !!! I'm the responsible for the M340 and NIP2212 software/configs ! The M340 is in one local and the STBs are spread along various localizations ! Between that is a large ring topology gigabit network based on optic fiber that is not of my responsibility !! Everything is working fine when the ring is closed ! The problem appears only in network redundancy tests, by disconnecting optic fiber segments of the ring, to force the packets to travel through the longest side of the ring ! The problems were reported to me (PLC Comms & software), but the what causes for this loss of communications is somewhere in the network infraestructure ! With the help of the network analist (the network is not of my responsibility) the packet communications between M340 and one STB were analyzed ! Through this analysis they told me that the TCP packets were constructed with a TTL (Time to Live) value of 10 !!! This value is sufficient to communicate when the ring is OK, but is very low when the packets have to travel along the longest side of the ring routers ! They traced the routes of the packets and said that I must have a minimum TTL of 32 to work correctly !!! But I cannot change this value in configs !!! Thank you !

Share this post


Link to post
Share on other sites
Are they using Managed Switches from Schneider or whatelse?? I suppose it is a problem related to the ring protocol adopted by the switches. I don't think (but never be sure!!) you have to find such a solution in the controller (TTL = 10 means 10 seconds: it would be enough!!). How many switches do you have in the network architecture?

Share this post


Link to post
Share on other sites
http://en.wikipedia.org/wiki/Time_to_live I am looking at Premium READ_VAR traffic right now and the TTL is 64. I wonder if the M340 would be the same? If so, that would meet your stated requirement. I don't think the IOScanner TTL is user adjustable - I have never seen it be adjusted. Even if Schneider can't do it now, will they consider it as a feature request? But even if they agree, it could probably takes months to get a solution (maybe even to make a decision) so it may not be a viable option now. What's the cost of migrating the data portions to READ/WRITE VARs - with all the associated logic to manage these? If there are only a couple of IOScanner lines than it's probably not too bad. But if you have a lot of IOScanner lines then it can be prohibitive. Some other options, in no particular order: 1. Don't route, use switches on the ring (at least some of them, enough to drop below 10 hops) 2. Some routers (CISCO?) can be configured to NOT decrement the TTL as packets pass through. Can your routers? 3. Some routers can be used to alter the TTL (Mikrotik Router) - put this after the IOScanner interface (NOE0100, NOE0110, NOC0401) but before the main network. 4. Add a data concentrator - say one of these: Redlion DSP and use this device to read/write your field data, but have it local to the M340 PLC. If you don't own the network, options 1 & 2 probably are not possible. Options 3 & 4 you would own but require purchase of hardware. Changing to Read Var requires no hardware, but will cost programming time. Let us know what final option you choose (here or otherwise) - I am curious how you solve this. Edited by billysmithde2

Share this post


Link to post
Share on other sites
Hi, thank you for the feedback ! No, I'm not using switches from schneider, and I don't know a lot form the network infrastructure equipment ! The problem is 90% for sure caused by the low TTL value of the IOScanning, because the STBs where the TTL distance is <10 are communicating (with the ring open) and the STBs with the distance of TTL >10 are not !!! Someday I will try some experiences to emulate the IOScanning !! I have never used the read_var and write_var functions ! Which is the best way to emulate the IOscanning via read an write vars with a scanning rate of ~250ms ?! read_var(ip_1) read_var(ip_2) read_var(ip_3) read_var(ip_4) [WAIT 50ms] write_var(ip_1) write_var(ip_2) write_var(ip_3) write_var(ip_4) [WAIT 200ms] read_var(ip_1) read_var(ip_2) read_var(ip_3) read_var(ip_4) ... I have attached the print screen of my ioscan config ! I never used the manual messaging, sorry for my "rookieness" Thank you

Share this post


Link to post
Share on other sites
Modbus Function 23 requires a write before a read (Modbus Spec), so I would only change your concept to: write1 write2 write3 write4 timer1 read1 read2 etc... This would emulate what you have now with IOScanner. There is a limit to the number of exchange blocks active at any given time but your requirement is small so you should not have any problem defining 8 blocks, 4 reads and 4 writes, and having the 4 active as you show. There are also TCP socket limits but I don't think with this IOScanner config you will have any trouble. I always put timers in between my network blocks, if only for development/troubleshooting. At commissioning, I might make timer1 _0ms_ so it is not used. However, for project development it is nice to have in here so you can slow down the comms cycle for troubleshooting.

Share this post


Link to post
Share on other sites
Thank you for the reply ! And if I have 7 scans in the IOScanner ?! Do you preview any possible problem in doing (for example) 7 read or write functions at the same time ?! Isn't it better to put an interval of 10 ms between read/write functions ?! Thank you very much again !!

Share this post


Link to post
Share on other sites
There is also a very important thing to me that I have in IOScan service, the health bit ( %iw0.1.0.1.0 -> example for the first element of IOScan list) that indicates me the loss of connection ! Right now, I just monitor this bit for each remote IO !! Have I got anything similar to this in manual messaging ?! What do you suggest to monitor the loss of connection for Remote IOS ?! I always used the scan service, sorry for my "rookieness" again ! Thank you again !

Share this post


Link to post
Share on other sites
If you have 7 IOScanner lines, it just becomes more important to know what the socket and Function Block limits are. If you can only have 4 running at once (not sure of the number off hand, might be 16), it's more work to be sure you can only have 4 active at a time. Not impossible, just more work. I don't know the limits off hand, so you should look them up in the manual / help. You can make your own health bit with the management report information. With the READ and WRITE_VARs, you will need to use a management table (array of 4 INTs, like type: ARRAY[0..3] of INT) which will includes such things as activity, a comms report, an operation report, timeout value, etc., with values that represent what is happening. You can make your own health bit or indicator by: 1. look at the activity bit - when block fires - it should go high 2. when block is done the activity bit falls, so check operations report. If not zero, there is a problem (from memory - this is all documented in the Unity help files, so the exact values could be wrong here, but the general idea should be the same)) 3. If operation report is zero, check comms report. If this is a number indicating a problem, then set your health bit 'bad' (or however you are doing it). If this indicates a good transaction, set your health bit as 'good'. Then you can use these derived health indicators just as you would with IOScanner.

Share this post


Link to post
Share on other sites
One more thing, I suppose that IOScan uses modbus function 23 ! But if I use the Read_Var an Write_Var, why did you said that these functions uses function 23 instead of function 16 and so ?! Thanks !

Share this post


Link to post
Share on other sites
Sorry for the confusion, but where did I say that READ/WRITE_VAR use FC23? IOScanner will use FC23 if you have both a read and write on the same line - this is about 2x as efficient as separate reads/writes (one network transaction instead of two). But not all devices support 23, so if FC23 fails, IOScanner will break it up into separate FC16 (write) and FC3(read) requests. Since READ/WRITE_VAR do not support FC23, you have to do two separate requests, one of each type, a write and then a read. I don't know what order Schneider does them (read before write or write before read), but the spec says FC23 does the write first. Since you are doing it by hand, you can do it either way. There is no 'right' way - you can make requests for reads/writes in any order you want - I only suggested this particular way to best match what you are already doing with IOScanner. If your only doing just reads or just writes, then this is all a moot point.

Share this post


Link to post
Share on other sites
Hi, i will advance to the READ/WRITE_VAR solution to emulate the IOScan ! Unfortunately this is the only option left ... I think the more critical case here is the m340 that "scan" the 7 STBs ! I think I can "fire" the 7 reads, wait some ms, and then fire the 7 writes ! In the worst case I will have 14 connections active at a time and I think that this is possible !! Edited by iJAF

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