[etherlab-users] etherlab-users Digest, Vol 136, Issue 8

Mohsen Alizadeh Noghani m.alizad3h at gmail.com
Sat Oct 6 07:40:40 CEST 2018


Dear Christoph,
Thanks, ecrt_slave_config_state was what I was looking for.
So in my first loop, I basically have
while (1)
{
...
        ecrt_slave_config_state(drive0, &slaveState0);
        ecrt_slave_config_state(drive1, &slaveState1);

        if (slaveState0.operational && slaveState1.operational)
        {
                printf("All slaves have reached OP state\n");
                break;
        }
...
}

Best,
Mohsen


On Fri, Oct 5, 2018 at 1:31 PM <etherlab-users-request at etherlab.org> wrote:

> Send etherlab-users mailing list submissions to
>         etherlab-users at etherlab.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.etherlab.org/mailman/listinfo/etherlab-users
> or, via email, send a message with subject or body 'help' to
>         etherlab-users-request at etherlab.org
>
> You can reach the person managing the list at
>         etherlab-users-owner at etherlab.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of etherlab-users digest..."
>
>
> Today's Topics:
>
>    1. Re: How to check if all slaves have       reached operational
>       state? (Ian Prochazka)
>    2. Re: How to check if all slaves have reached operational
>       state? (Christoph Schroeder)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 4 Oct 2018 17:15:34 -0400
> From: Ian Prochazka <jprochazka at persimmontech.com>
> To: Mohsen Alizadeh Noghani <m.alizad3h at gmail.com>,
>         "etherlab-users at etherlab.org" <etherlab-users at etherlab.org>
> Subject: Re: [etherlab-users] How to check if all slaves have   reached
>         operational state?
> Message-ID:
>         <
> A262E7BD3F5D9049ADBACCC455B324B801B259811C2D at SERVER.persimmontech.com>
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Would user command from OS console give you the answer:
>
> xxxxx at xxxxx<mailto:xxxxx at xxxxx::~$>::~$<mailto:xxxxx at xxxxx::~$> ethercat
> slaves
>
>
>
> The ethercat commands can be used while your application is running. Try
> 'ethercat --help' for other options
>
>
>
> Best regards,
>
> Ian
>
>
>
> ________________________________
> From: etherlab-users [etherlab-users-bounces at etherlab.org] On Behalf Of
> Mohsen Alizadeh Noghani [m.alizad3h at gmail.com]
> Sent: Thursday, October 04, 2018 3:06 AM
> To: etherlab-users at etherlab.org
> Subject: [etherlab-users] How to check if all slaves have reached
> operational state?
>
> Dear EtherLab users,
> After activating the master and starting frame exchange, is there a way to
> check whether all states have reached operational?
> Additional info:
> Currently, in my code<
> https://github.com/mohse-n/L7N_EtherLab/blob/master/simple_test.c>, I
> just send empty frames for long enough (trial and error) so that when I
> exit the loop, my slaves (servo drives) are in OP state.
> I have tried checking the working counter in the loop and exiting from it
> after the domain's working counter becomes equal to our expected value.
> However, there is still a small delay after that happens and the second
> slave reaching operational state.
> Best,
> Mohsen
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.etherlab.org/pipermail/etherlab-users/attachments/20181004/c3ea4ccb/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Fri, 5 Oct 2018 10:17:50 +0200
> From: Christoph Schroeder <christoph.schroeder at helmholtz-berlin.de>
> To: <etherlab-users at etherlab.org>
> Subject: Re: [etherlab-users] How to check if all slaves have reached
>         operational state?
> Message-ID: <9d29754c-7a92-1d11-c8bb-07058e17a442 at helmholtz-berlin.de>
> Content-Type: text/plain; charset="windows-1252"; Format="flowed"
>
> Hi Mohsen,
>
> additionally you can use ecrt_slave_config_state in your application. I
> call this function plus ecrt_master_state and ecrt_domain_state every other
> second to check the status of the whole setup.
>
> Best regards,
> Christoph
>
> On 10/4/18 11:15 PM, Ian Prochazka wrote:
> Would user command from OS console give you the answer:
>
> xxxxx at xxxxx<mailto:xxxxx at xxxxx::~$>::~$<mailto:xxxxx at xxxxx::~$> ethercat
> slaves
>
>
>
> The ethercat commands can be used while your application is running. Try
> 'ethercat --help' for other options
>
>
>
> Best regards,
>
> Ian
>
>
>
> ________________________________
> From: etherlab-users [etherlab-users-bounces at etherlab.org<mailto:
> etherlab-users-bounces at etherlab.org>] On Behalf Of Mohsen Alizadeh
> Noghani [m.alizad3h at gmail.com<mailto:m.alizad3h at gmail.com>]
> Sent: Thursday, October 04, 2018 3:06 AM
> To: etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org>
> Subject: [etherlab-users] How to check if all slaves have reached
> operational state?
>
> Dear EtherLab users,
> After activating the master and starting frame exchange, is there a way to
> check whether all states have reached operational?
> Additional info:
> Currently, in my code<
> https://github.com/mohse-n/L7N_EtherLab/blob/master/simple_test.c>, I
> just send empty frames for long enough (trial and error) so that when I
> exit the loop, my slaves (servo drives) are in OP state.
> I have tried checking the working counter in the loop and exiting from it
> after the domain's working counter becomes equal to our expected value.
> However, there is still a small delay after that happens and the second
> slave reaching operational state.
> Best,
> Mohsen
>
>
>
> _______________________________________________
> etherlab-users mailing list
> etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org>
> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>
>
>
> --
> (bb|[^b]{2})
>
> ________________________________
>
> Helmholtz-Zentrum Berlin f?r Materialien und Energie GmbH
>
> Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher
> Forschungszentren e.V.
>
> Aufsichtsrat: Vorsitzender Dr. Karl Eugen Huthmacher, stv. Vorsitzende Dr.
> Jutta Koch-Unterseher
> Gesch?ftsf?hrung: Prof. Dr. Bernd Rech (kommissarisch), Thomas Frederking
>
> Sitz Berlin, AG Charlottenburg, 89 HRB 5583
>
> Postadresse:
> Hahn-Meitner-Platz 1
> D-14109 Berlin
>
> https://www.helmholtz-berlin.de
>
> Abonnieren Sie unseren monatlichen Newsletter!<
> https://www.helmholtz-berlin.de/aktuell/pm/newsletter/>
> Subscribe to our monthly newsletter!<
> https://www.helmholtz-berlin.de/aktuell/pm/newsletter/index_en.html>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.etherlab.org/pipermail/etherlab-users/attachments/20181005/18f507c7/attachment-0001.html
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> etherlab-users mailing list
> etherlab-users at etherlab.org
> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>
>
> ------------------------------
>
> End of etherlab-users Digest, Vol 136, Issue 8
> **********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20181006/5945b15c/attachment-0002.htm>


More information about the Etherlab-users mailing list