[etherlab-users] Knowing when the packet has finished cycle
Jordi Blanch Carles
jordi_blanch at encopim.com
Wed Oct 19 15:26:11 CEST 2011
Hello, as I told you, I don't want to insist in this point because it
seems to be annoying you, if it is not possible to know when the
packet has arrived and nobody can send any clue on how to do it, we
will find another solution to our problem.
Thank you very much to everybody.
Best regards.
Quoting Richard Hacker <ha at igh-essen.com>:
> Hello,
>
> Please let me put things straight: there is no way of knowing when
> an EtherCAT
> packet has arrived, because there is *NO need to*!!!!
>
> Digital computer controlled systems are sampled data systems with
> one inherent
> delay cycle from input to output. They are not analog computers. In the limit
> when the cycle time tends to zero they start to *look like* analog computers.
> Where this limit is depends on your application!
>
> So, normal controllers running EtherCAT do:
> calculate;
> exchange io;
> wait;
> calculate
> exchange io;
> wait;
> ... till the end of time
>
> Inside "exchange io", data from the calculation is output to the
> slaves and AT
> THE SAME TIME the input slaves are sampled (ecrt_master_send() ).
> These inputs
> wait until the next calculation step before they get processed.
>
> Inside calculate, ethercat data frames are fetched from the ethernet card
> (ecrt_master_receive() ), processed for inputs (which were fetched while the
> program was sleeping) (ecrt_domain_process() ), running your control
> algorithm, and queuing the outputs from your controller (ecrt_domain_queue()
> ). The important thing to note, is that the ethercat frames must be
> waiting on
> the ethernet card before the master is requested to fetch them, otherwise the
> master will puke and think the frame was lost. Thus fetching data too early
> before the frame has arrived will get you into trouble. That is why
> it is VERY
> IMPORTANT to sleep after "exchange io".
>
> If this concept does not suit your timing requirements, then EtherCAT is not
> your solution - you need directly attached IO where you can synchronously
> sample inputs, calculate and write outputs. Just before giving up on
> EtherCAT,
> it has been tested at rates to 10kHz ;)
>
> Oh by the way, we and many others have been working successfully
> with EtherCAT
> on a number of not so small applications for a few years without needing
> synchronous IO.
>
> - Richard
>
> On Wednesday 19 October 2011 10:52:03 Jordi Blanch Carles wrote:
>> In our case, the whole EtherCat loop would be:
>>
>> ask_for_inputs() <----- ecrt_domain_queue + ecrt_master_send
>> wait_for_packet_received()
>> process_inputs() <----- ecrt_master_receive + ecrt_domain_process
>>
>> make_calculations()
>>
>> send_outputs() <----- ecrt_domain_queue + ecrt_master_send
>>
>> wait_for_next_period()
>>
>
> Mit freundlichem Gruß
>
> Richard Hacker
>
> --
> ------------------------------------------------------------------------
>
> Richard Hacker M.Sc.
> richard.hacker at igh-essen.com
> Tel.: +49 201 / 36014-16
>
> Ingenieurgemeinschaft IgH
> Gesellschaft für Ingenieurleistungen mbH
> Heinz-Bäcker-Str. 34
> D-45356 Essen
> Amtsgericht Essen HRB 11500
> USt-Id.-Nr.: DE 174 626 722
> Geschäftsführung:
> - Dr.-Ing. S. Rotthäuser,
> - Dr.-Ing. T. Finke,
> - Dr.-Ing. W. Hagemeister
> Tel.: +49 201 / 360-14-0
> http://www.igh-essen.com
>
> ------------------------------------------------------------------------
>
Jordi Blanch Carles
Unidad de Ensayo y Control
ENCOPIM S.L.
C/. del Parc, 5 (nave 13)
P.I. Els Pinetons
E-08291 RIPOLLET (Barcelona)
Tel: (+34) 935 94 23 47
Fax: (+34) 935 94 64 15
==========================================================
La información contenida en la presente transmisión es confidencial y su
uso únicamente está permitido a su(s) destinatario(s). Si Ud. no es la
persona destinataria de la presente transmisión, rogamos nos lo
comunique de manera inmediata por teléfono (+34 935 942 347) y destruya
cualquier copia de la misma (tanto digitales como en papel).
The information contained in this transmission is confidential and is
intended only for the use of the addressee(s). If you are not the
designated recipient of this transmission, please advise us immediately
by telephone (+34 935 942 347) and destroy any copies (digital and
paper).
======================================================
More information about the Etherlab-users
mailing list