On Tue, 4 Aug 2015, Karlsson & Wang wrote: > Date: Tue, 4 Aug 2015 14:12:43 +0200 > From: Karlsson & Wang <[email protected]> > Reply-To: EMC developers <[email protected]> > To: [email protected] > Subject: [Emc-developers] Hostmot 2 ethernet (queue packets) > > Occasionally I got some communication errors which of course might happen > especially during development. As far as I can tell from the source > "hm2_eth.c" row 445 "} while ((recv < 0) && ((t2 - t1) < 200*1000*1000));" > wait for 200ms before an error is generated. During this time new packets > are queued and with about three times the ordinary speed after the timeout. > > In a real time system with periodic data I consider queue data may cause > problem during congestion and suggest to just overwrite old data with new > data instead? > > I guess it might be a good idea to allow a lost packet every now and then > and just write a warning on console. > > Regards Nicklas Karlsson
Probably hm2_eth should set the default read timeout when running to about 1/2 the servo period but have the timeout accessable as a parameter (I am testing now with 4 cards at once running at 3 KHz, maximum read time is about 170 usec so you might want to set the timeout a bit longer than 1/2 the period) on a read timeout, a hal flag should be set so that things that use the read data (PID etc) can cycle skip until new data is available Similarly, on a write failure, a hal flag should be set so that state critical state changes can be verified > > ------------------------------------------------------------------------------ > _______________________________________________ > Emc-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-developers > Peter Wallace Mesa Electronics (\__/) (='.'=) This is Bunny. Copy and paste bunny into your (")_(") signature to help him gain world domination. ------------------------------------------------------------------------------ _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
