comp.lang.ada
 help / color / mirror / Atom feed
From: jan.de.kruyf@gmail.com
Subject: Re: silly ravenscar question
Date: Sat, 28 Feb 2015 11:57:00 -0800 (PST)
Date: 2015-02-28T11:57:00-08:00	[thread overview]
Message-ID: <4d288aff-66c7-49d8-8ffd-8fc80e9355c5@googlegroups.com> (raw)
In-Reply-To: <1p3tujcfe2x5b$.njfp7g1kpm79$.dlg@40tude.net>

On Friday, February 27, 2015 at 10:58:30 AM UTC+2, Dmitry A. Kazakov wrote:

> But TCP/IP is more flexible. Furthermore, 1Gbaud Ethernet is fast enough to
> outperform anything we could do at the nodes. It is not the bottleneck, so
> far. E.g. practically all field bus couplers are 100Kbaud. You will easily
> beat them with TCP/IP + NO_DELAY by going 1GBaud.

Yes, on bigger systems, but on cheap and not so nasty embedded stuff we might still have 100M ethernet for a while. So I do see the need still to limit my verbosity in the software (and in the frame size). Otherwise I will be back at the bandwidth you quoted from the measurements you did.

> 
> Right, but the problem is that in most cases the terminals run some
> asynchronous tasks which must be time stamped. For this they would use
> internal counters and you have the problem of translation these counters
> into the master clock and then into the PC clock. This is what does not
> work in EtherCAT.
> 
> Consider as an example an analogue input. You should be able to latch the
> clock at the end of a conversion and convert it into the PC clock. This
> would be "free run" mode.
> 
> As another example take a synchronous case with triggered AD conversions in
> multiple terminals. This does not work with EtherCAT either. It only looks
> synchronous, because you need to distribute the trigger signal to all
> terminals. Since the signal's frame arrives at the terminals with different
> latencies you must have time stamp (of some near future) in it. So, in
> fact, this is also asynchronous.
> 

I seem to smell some contradiction in you reasoning but nevermind that.
(I am a bit tired) 
On my side of things I need perfectly synchronized slaves for fast motion control. The hard real time is less important, so that is how I got to my last opinion.
then if I am ever in a position that I have to split the work over 2 pc's (and that might be closer as what I wish) I might just be very pleased when both the slave groups have the same sense of time.
On your side you need to be able to stamp your measurements with hard real time I understand. Or at least deduct the hard real time in some way.

So I did some more research on the ieee protocol, it looks as if it can handle it without a great investment in design time, etc.
There are 2 good linux stacks around, together with a hardware-time-stamping network card it would work well to sync the whole caboudle to hard real time. And in the case the master drops, one of the other boxes in the network becomes master. There can be some voting process every now and again.

>
> Yes, though to keep it balanced, one still could argue that the switch is
> the new weak point then, and that wiring is more complicated. Nevertheless
> star topology will win as it did when going from 10BNC to twisted pair.

Probably double the wiring cost. That is a great killer with the junior project managers. (my son is one, so I hear these noises on and off) 
I do not feel that a switch is a weak point. Only if you try to get away with office quality RJ45 without bolting down the cables right next to the switch, as you aught to do in any case, for grounding purposes.

> 
> If it consistently manipulates all time sources on the board, then OK. From
> our experience, it is better to leave clocks alone (and have no problem
> with negative adjustments) and only translate time stamps.

Before I got deeply into this fieldbus thing I set up a small model on the laptop to demonstrate some motordriver idea. I did have a jitter averaging design in there that worked quite well. It was basically the same as what is in the ieee circuitry in the STM controller. It works as a PI controller on the drift correction. Except my algorithm locked a lot faster than basic PI.

But that I did on the basis of a sync pulse every scan period like powerlink.
Ettercat has not got that I believe.
In any case that still only gives network time that then  must be translated for data gathering.

So with ieee you slowly walk past all stations once every 2 seconds or even slower and measure the cable delay. and add or subtract 1 bit to/from the drift register as needed. that is, as soon as the course time correction has been determined.


> M = mega? Wow!

Yes, but in my experience you might have to stop the processor clock for a bit while you measure. Especially on cheap 2 layer boards.

cheers, and thanks for your time. I highly appreciate your feedback.

j.



  reply	other threads:[~2015-02-28 19:57 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24  9:07 silly ravenscar question jan.de.kruyf
2015-02-24 10:29 ` Dmitry A. Kazakov
2015-02-24 11:11   ` jan.de.kruyf
2015-02-24 13:38     ` Dmitry A. Kazakov
2015-02-25  8:48       ` jan.de.kruyf
2015-02-25 10:46         ` Dmitry A. Kazakov
2015-02-25 17:35           ` jan.de.kruyf
2015-02-25 17:55             ` Dmitry A. Kazakov
2015-02-26  8:48               ` jan.de.kruyf
2015-02-26  9:47                 ` Dmitry A. Kazakov
2015-02-26 12:07                   ` jan.de.kruyf
2015-02-26 19:09                   ` jan.de.kruyf
2015-02-27  8:58                     ` Dmitry A. Kazakov
2015-02-28 19:57                       ` jan.de.kruyf [this message]
2015-03-01  9:27                         ` Dmitry A. Kazakov
2015-03-03  8:42                           ` jan.de.kruyf
2015-03-03 10:57                             ` Dmitry A. Kazakov
2015-02-24 11:02 ` Jacob Sparre Andersen
2015-02-24 11:23   ` jan.de.kruyf
2015-02-24 13:43     ` Bob Duff
2015-02-25  9:07       ` jan.de.kruyf
2015-02-25 17:50         ` Simon Wright
2015-02-26  7:35           ` jan.de.kruyf
2015-02-26 14:57             ` Simon Wright
2015-02-26 19:36               ` jan.de.kruyf
2015-02-27  8:45                 ` Simon Wright
2015-02-27  9:59                   ` jan.de.kruyf
2015-02-28  9:57                     ` Simon Wright
2015-02-28 19:08                       ` jan.de.kruyf
2015-02-28 20:23                         ` Simon Wright
2015-03-03  8:52                           ` jan.de.kruyf
2015-02-24 15:30     ` Brad Moore
2015-02-24 16:52       ` Simon Wright
2015-02-25  3:01         ` Dennis Lee Bieber
2015-02-24 11:22 ` slos
2015-02-24 12:16   ` jan.de.kruyf
2015-02-24 11:24 ` J-P. Rosen
2015-02-24 12:10   ` jan.de.kruyf
2015-02-24 13:58 ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox