Ankit Goila | 30 May 17:24 2013
Picon

Setting up EtherLab (Matlab/Simulink dependency) in RT-Preempt

Hi,

I am working on setting up a real-time control framework on my machine with RT-Preempt kernel. I have a functioning EtherCAT master set up on the machine and am able to communicate with the slaves by writing executable files.

I am looking to set up the same system with Matlab/Simulink functionality. For this, I need to install EtherLab on my machine. However, its installation is somehow not compatible with RT-Preempt and it always prompts for RTAI.

Since RTAI and RT-Preempt are different architectures, I assume there must be a similar way to configure EtherLab to work with RT-Preempt? I might be missing out something important. I will be really grateful if anyone could help me out with this.

Thanks,

Ankit

--
Ankit Goila
U-M ID: 83509056
Graduate Student (2012-2014)
M.S.E Mechanical Engineering
University of Michigan, Ann Arbor
Contact: 734-747-0829

<div><div dir="ltr">
<div>
<div>
<div>
<div>Hi,<br><br>
</div>I am working on setting up a real-time control framework on my machine with RT-Preempt kernel. I have a functioning EtherCAT master set up on the machine and am able to communicate with the slaves by writing executable files. <br><br>I am looking to set up the same system with Matlab/Simulink functionality. For this, I need to install EtherLab on my machine. However, its installation is somehow not compatible with RT-Preempt and it always prompts for RTAI. <br><br>Since RTAI and RT-Preempt are different architectures, I assume there must be a similar way to configure EtherLab to work with RT-Preempt? I might be missing out something important. I will be really grateful if anyone could help me out with this. <br>
</div>
<br>
</div>Thanks,<br><br>
</div>Ankit<br clear="all"><div><div><div><div><div>
<br>-- <br><div dir="ltr">
<div><span>Ankit Goila</span></div>

<span>U-M ID: 83509056</span><br><div><span>Graduate Student (2012-2014)</span></div>

<div><span>M.S.E Mechanical Engineering</span></div>
<div><span>University of Michigan, Ann Arbor</span></div>

<div><span>Contact: 734-747-0829</span></div>
<div><br></div>
</div>
</div></div></div></div></div>
</div></div>
RIYAS | 29 May 19:41 2013
Picon

How to configure Digital I/O lines in AM335x – Industrial Communication Engine (ICE) and control motors in AM335x Industrial Development Kit (IDK)

Hi,

I am using Texas Instruments AM335x – Industrial Communication Engine (ICE) and AM335x Industrial Development Kit (IDK) as slave deives in my ethercat network. 

I want to control the digital i/o in ICE board and motor lines in IDK board. I am using an application which can read/write all the registers using an open source master ethercat running from linux pc. Is it possible to do using this app?

In ICE and IDK, i am running pre-built ethercat slave code  which was provided with the device by default.

Also I noticed that, according to Bechoff site, EtherCAT_IPCore_Altera_V2.4.0_Datasheet_all_v1i0 "0xf00 to 0xf03" is the address for DIgital I/O. 
But these registers are missing in the  EtherCAT_firmware_API_Guide.pdf.

Also I noticed that, when I am writing these registers, it is failing.(I monitores using wireshark app).

So can I access the register's directly, by calling any registers or what changes I need to make it work.

Regards,

Riyas.k
<div><div dir="ltr">
<div>Hi,</div>
<div><br></div>
<div>I am using Texas Instruments AM335x &ndash; Industrial Communication Engine (ICE) and AM335x Industrial Development Kit (IDK) as slave deives in my ethercat network.&nbsp;</div>
<div>
<br>
</div>
<div>I want to control the digital i/o in ICE board and motor lines in IDK board. I am using an application which can read/write all the registers using an open source master ethercat running from linux pc. Is it possible to do using this app?</div>
<div><br></div>
<div>In ICE and IDK, i am running pre-built ethercat slave code &nbsp;which was provided with the device by default.</div>
<div><br></div>
<div>Also I noticed that, according to Bechoff site, EtherCAT_IPCore_Altera_V2.4.0_Datasheet_all_v1i0 "0xf00 to 0xf03" is the address for DIgital I/O.&nbsp;</div>
<div>But these registers are missing in the &nbsp;EtherCAT_firmware_API_Guide.pdf.</div>
<div><br></div>
<div>Also I noticed that, when I am writing these registers, it is failing.(I monitores using wireshark app).</div>
<div><br></div>
<div>So can I access the register's directly, by calling any registers or what changes I need to make it work.</div>
<div><br></div>
<div>Regards,</div>
<div><br></div>
<div>Riyas.k</div>
</div></div>
Picon

R: Re: Re: R: Re: R: SDO stress

Maybe some race conditions can happen if multiple reads or writes even 
on different 
drives take place at the same time due to datagram 
overlappings.
Writing my test program I improved a lot reliability 
reading or writing one SDO value 
at once.
This is just what I 
experienced.

----Messaggio originale----
Da: raziebe <at> gmail.com
Data: 
28/05/2013 16.51
A: "paluan.luca <at> tiscali.it"<paluan.luca <at> tiscali.it>

Cc: "etherlab-users <at> etherlab.org"<etherlab-users <at> etherlab.org>
Ogg: Re: 
Re: [etherlab-users] R: Re: R: SDO stress

I did not say i am sending 
R/W at the same super packet, and it is
impossible since there is a 
single datagram for coe.
I have the captures from the drives, and the 
packets are OK. ie, data does
arrive to the master interface card. yet 
there are no corruptions and no
unmatches.

On Tue, May 28, 2013 at 5:
22 PM, paluan.luca <at> tiscali.it <
paluan.luca <at> tiscali.it> wrote:

>
> 
Multiple Sdo read or write operation at once is for sure an error
> 
source:
> this is one of the advices I received from servos vendor
> 
(Kollmorgen support).
> Only one read or one write at once or you'll 
get
> an error almost immediatly.
> Thanks for your answer.
> Best 
Regards, Luca
> Paluan
>
> ----Messaggio originale----
> Da: 
raziebe <at> gmail.com
> Data:
> 28/05/2013 15.52
> A: "paluan.luca <at> tiscali.
it"<paluan.luca <at> tiscali.it>
>
> Cc: "etherlab-users <at> etherlab.org"
<etherlab-users <at> etherlab.org>
> Ogg: Re:
> [etherlab-users] R: Re: R: 
SDO stress
>
> this problem does not relate to
> R/W , it can happen 
with just reads.
> The problem lies somewhere in the
> datagram state, 
for some reason, a
> datagram may be
> sent to to gather
> the mailbox 
response, but its state remains BUSY. this is
> stops the
> entire
> 
fsm from performing any other sdo related tasks, as depicted
> here:
>

> void ec_fsm_slave_exec(
>         ec_fsm_slave_t *fsm /**≤ Slave
> 
state machine. */
>         )
> {
>     if (fsm->datagram->state ==
> 
EC_DATAGRAM_SENT
>         || fsm->datagram->state == 
EC_DATAGRAM_QUEUED)
> {
>         // datagram was not sent or received 
yet.
>         return;
>
> }
>
>     fsm->state(fsm);
> }
>
> code 
never executs fsm->state(fsm) because
> the top ( on queue) coe 
datagram
> remains in SENT state. i launched 8
> threads, each performs 
a sdo read, and
> got stuck in a few minutes. all
> but the top coe 
remained in the sdo_queue
> queue.
>
> Now, by capturing the
> network 
traffic i know that the packet is not sent.
> but i can see that
> the 
packet has changed its state to SENT, but it timed
> out ( i
> 
replaced  wait_event_interruptible to the timed wait version in
>
> 
ecrt_master_sdo_upload ) .
>
>
>
>
>
> On Thu, May 23, 2013 at 8:15 PM, 
paluan.
> luca <at> tiscali.it <
> paluan.luca <at> tiscali.it> wrote:
>
> > Yes 
I'm using
> Kollmorgen Servos, I'll try spacing Sdo operation with
> > 
some idle
> cycles and see if that improves the reliability.
> > I 
wrote
> > Kollmorgen
> support and they just recommended not to overlap 
Sdo
> > requests.
> >
> Unfortunatly I cannot avoid Sdo operations 
during normal
> > cycle since
> some variables cannot be pdo mapped.
> 
> Thanks Luca
> >
> > ----
> > Messaggio
> originale----
> > Da: 
tbj <at> automateddesign.com
> > Data: 23/05/2013
> > 16.19
>
> > A: "paluan.
luca <at> tiscali.it"<paluan.luca <at> tiscali.it>
> > Cc: "etherlab-
>
> > 
users <at> etherlab.org"<etherlab-users <at> etherlab.org>
> > Ogg: Re:
> 
[etherlab-
> > users] R: SDO stress
> >
> > This is probably a useless 
aside,
> but what servo
> > drive are you using? I
> > have nothing but 
problems
> with SDO reads and
> > writes on the Kollmorgen AKD
> > 
drive, regardless
> of the EtherCAT master
> > used. If I don't space 
them out by
> > 100ms or
> so, the drive gives
> > inconsistent 
responses. I've spent a year
> >
> trying to improve the
> > situation, 
but to no avail. My plan is to use
> the
> > EtherCAT master as
> > the 
controller so I can avoid SDO usage with
> the drive.
> >
> > Thomas C.

> > Bitsky Jr. | Lead Developer
> > ADC |
> automateddesign.com
> > P: 
630-783-1150
> > F: 630-783-1159 M: 630-632-6679
>
> >
> >
> > On Thu, 
May 23, 2013 at 5:10 AM,
> > paluan.luca <at> tiscali.it <
> >
> paluan.
luca <at> tiscali.it> wrote:
> >
> > >
> > >
> > > Hello,
> > >
> > I've 
been
> struggling with Sdo write since 3 mounths without a
> > >
> > 
solution up
> to now.
> > > I wrote a stress test which writes and 
reads what
> >
> > >
> written on three Sdo for three Servos in a 
preemptive real time loop:
> >
>
> > >
> > > after some hours of work 
the application hangs and the ethercat
>
> > master
> > > shows a 
download/upload Sdo Timeout error problem.
> > >
> I've
> > checked 
that
> > > only one read or one write takes place at a
> time, for
> > 
example:
> > > start
> > > write SDO1 for first servo
> > > end
> write 
SDO1 for
> > first servo
> > > start read
> > > SDO1 for first servo
> 
>
> > end read SDO1 for
> > first servo
> > > start write SDO2 for
> > 
> first
> servo
> > > end write SDO2 for
> > first servo
> > > start 
read SDO2 for
> first
> > > servo
> > > end read SDO2 for
> > first 
servo
> > > ...
> > > start
> write SDO1 for second
> > > servo
> > > 
end write
> > SDO1 for second servo
> >
> > start read SDO1 for second 
servo
> > >
> > > end read
> > SDO1 for second
> servo
> > > start 
write SDO2 for second servo
> > > end
> > > write
> > SDO2
> for second 
servo
> > > start read SDO2 for second servo
> > > end read
> > >
>
> > 
SDO2 for second servo
> > > ....
> > > So each write doesn't overlap 
each
> read
> > for
> > > each servo.
> > > As far as I know managing 
Sdo inside
> real time loop
> > is not
> > > reliable: I mean it 
usually works, but for
> a software which
> > manages
> > > Servos is 
not enough.
> > > If someone has
> advices or suggestions
> > is 
welcome.
> > >
> > > Best Regards, Luca Paluan
>
> > >
> > > ----
Messaggio
> > originale----
> > > Da:
> > > RBenYehuda <at> manz.com
> >
> > 
Data: 22/05/2013 13.36
> > > A:
> > "etherlab-users <at> etherlab.
> > > 
org"
> <etherlab-users <at> etherlab.org>
> > > Ogg:
> > [etherlab-users] 
SDO stress
> >
> >
> > > Hey
> > >
> > >
> > > I have been tracking the

> > following problem:
> > >
> I generate bulk of sdo
> > > reads and 
sdo writes (
> > upload /
> downloads).  after some time the sdo
> > > 
read
> > > hangs.  I made a
> >
> capture with tcpdump and noticed that 
the
> > > failure lies in etherlab.
>
> > it appears that
> > > after 
some time etherlab
> > > does not try to send
> a
> > mail box response 
read from the mailbox, even
> > > though
> > > the
> slave
> > "said" 
he has the data available ( by replying to read
> > >
> request).
> > >

> > Why this bug fixed ?
> > >
> > > thank you
> > > raz
> > >
> > >
>

> > >
> > _______________________________________________
> > > 
etherlab-
> users
> > mailing
> > > list
> > > etherlab-users <at> etherlab.
org
> > > http:
> //lists.etherlab.
> > >
> > 
org/mailman/listinfo/etherlab-users
> > >
> > >
> > >
>
> > >
> > > 
Senza L’IMU il mercato
> > immobiliare potrebbe riprendersi.
> Inizia 
ora la
> > > ricerca della tua
> > Casa!  http://tiscali.casa.
> 
it/vendita?partner=Tiscali
> > >
> >
> 
_______________________________________________
> > > etherlab-users
> 
>
> mailing list
> > > etherlab-users <at> etherlab.org
> > > http://lists.
etherlab.
>
> > org/mailman/listinfo/etherlab-users
> > >
> >
> >
> >
> 
>
> > Senza L’IMU il
> mercato immobiliare potrebbe riprendersi. Inizia 
ora la
> > ricerca della
> tua Casa!  http://tiscali.casa.it/vendita?
partner=Tiscali
> >
> _______________________________________________
> 
> etherlab-users
> mailing list
> > etherlab-users <at> etherlab.org
> > 
http://lists.etherlab.
> org/mailman/listinfo/etherlab-users
> >
>
>
>

> --
> https://sites.google.
> com/site/ironspeedlinux/
>
>
>
>
>
> 
Senza L’IMU il mercato immobiliare potrebbe riprendersi. Inizia ora la

> ricerca della tua Casa!  http://tiscali.casa.it/vendita?
partner=Tiscali
>

--

-- 
https://sites.google.com/site/ironspeedlinux/

Senza L’IMU il mercato immobiliare potrebbe riprendersi. Inizia ora la ricerca della tua Casa!  http://tiscali.casa.it/vendita?partner=Tiscali
_______________________________________________
etherlab-users mailing list
etherlab-users <at> etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users
Picon

R: Re: R: Re: R: SDO stress


Multiple Sdo read or write operation at once is for sure an error 
source:
this is one of the advices I received from servos vendor 
(Kollmorgen support).
Only one read or one write at once or you'll get 
an error almost immediatly.
Thanks for your answer.
Best Regards, Luca 
Paluan

----Messaggio originale----
Da: raziebe <at> gmail.com
Data: 
28/05/2013 15.52
A: "paluan.luca <at> tiscali.it"<paluan.luca <at> tiscali.it>

Cc: "etherlab-users <at> etherlab.org"<etherlab-users <at> etherlab.org>
Ogg: Re: 
[etherlab-users] R: Re: R: SDO stress

this problem does not relate to 
R/W , it can happen with just reads.
The problem lies somewhere in the 
datagram state, for some reason, a
datagram may be
sent to to gather 
the mailbox response, but its state remains BUSY. this is
stops the 
entire
fsm from performing any other sdo related tasks, as depicted 
here:

void ec_fsm_slave_exec(
        ec_fsm_slave_t *fsm /**≤ Slave 
state machine. */
        )
{
    if (fsm->datagram->state == 
EC_DATAGRAM_SENT
        || fsm->datagram->state == EC_DATAGRAM_QUEUED) 
{
        // datagram was not sent or received yet.
        return;

}

    fsm->state(fsm);
}

code never executs fsm->state(fsm) because 
the top ( on queue) coe datagram
remains in SENT state. i launched 8 
threads, each performs a sdo read, and
got stuck in a few minutes. all 
but the top coe remained in the sdo_queue
queue.

Now, by capturing the 
network traffic i know that the packet is not sent.
but i can see that 
the packet has changed its state to SENT, but it timed
out ( i 
replaced  wait_event_interruptible to the timed wait version in

ecrt_master_sdo_upload ) .

On Thu, May 23, 2013 at 8:15 PM, paluan.
luca <at> tiscali.it <
paluan.luca <at> tiscali.it> wrote:

> Yes I'm using 
Kollmorgen Servos, I'll try spacing Sdo operation with
> some idle 
cycles and see if that improves the reliability.
> I wrote
> Kollmorgen 
support and they just recommended not to overlap Sdo
> requests.
> 
Unfortunatly I cannot avoid Sdo operations during normal
> cycle since 
some variables cannot be pdo mapped.
> Thanks Luca
>
> ----
> Messaggio 
originale----
> Da: tbj <at> automateddesign.com
> Data: 23/05/2013
> 16.19

> A: "paluan.luca <at> tiscali.it"<paluan.luca <at> tiscali.it>
> Cc: "etherlab-

> users <at> etherlab.org"<etherlab-users <at> etherlab.org>
> Ogg: Re: 
[etherlab-
> users] R: SDO stress
>
> This is probably a useless aside, 
but what servo
> drive are you using? I
> have nothing but problems 
with SDO reads and
> writes on the Kollmorgen AKD
> drive, regardless 
of the EtherCAT master
> used. If I don't space them out by
> 100ms or 
so, the drive gives
> inconsistent responses. I've spent a year
> 
trying to improve the
> situation, but to no avail. My plan is to use 
the
> EtherCAT master as
> the controller so I can avoid SDO usage with 
the drive.
>
> Thomas C.
> Bitsky Jr. | Lead Developer
> ADC | 
automateddesign.com
> P: 630-783-1150
> F: 630-783-1159 M: 630-632-6679

>
>
> On Thu, May 23, 2013 at 5:10 AM,
> paluan.luca <at> tiscali.it <
> 
paluan.luca <at> tiscali.it> wrote:
>
> >
> >
> > Hello,
> >
> I've been 
struggling with Sdo write since 3 mounths without a
> >
> solution up 
to now.
> > I wrote a stress test which writes and reads what
>
> > 
written on three Sdo for three Servos in a preemptive real time loop:
>

> >
> > after some hours of work the application hangs and the ethercat

> master
> > shows a download/upload Sdo Timeout error problem.
> > 
I've
> checked that
> > only one read or one write takes place at a 
time, for
> example:
> > start
> > write SDO1 for first servo
> > end 
write SDO1 for
> first servo
> > start read
> > SDO1 for first servo
> 
> end read SDO1 for
> first servo
> > start write SDO2 for
> > first 
servo
> > end write SDO2 for
> first servo
> > start read SDO2 for 
first
> > servo
> > end read SDO2 for
> first servo
> > ...
> > start 
write SDO1 for second
> > servo
> > end write
> SDO1 for second servo
> 
> start read SDO1 for second servo
> >
> > end read
> SDO1 for second 
servo
> > start write SDO2 for second servo
> > end
> > write
> SDO2 
for second servo
> > start read SDO2 for second servo
> > end read
> >

> SDO2 for second servo
> > ....
> > So each write doesn't overlap each 
read
> for
> > each servo.
> > As far as I know managing Sdo inside 
real time loop
> is not
> > reliable: I mean it usually works, but for 
a software which
> manages
> > Servos is not enough.
> > If someone has 
advices or suggestions
> is welcome.
> >
> > Best Regards, Luca Paluan

> >
> > ----Messaggio
> originale----
> > Da:
> > RBenYehuda <at> manz.com
> 
> Data: 22/05/2013 13.36
> > A:
> "etherlab-users <at> etherlab.
> > org"
<etherlab-users <at> etherlab.org>
> > Ogg:
> [etherlab-users] SDO stress
> 
>
> > Hey
> >
> >
> > I have been tracking the
> following problem:
> > 
I generate bulk of sdo
> > reads and sdo writes (
> upload / 
downloads).  after some time the sdo
> > read
> > hangs.  I made a
> 
capture with tcpdump and noticed that the
> > failure lies in etherlab.

> it appears that
> > after some time etherlab
> > does not try to send 
a
> mail box response read from the mailbox, even
> > though
> > the 
slave
> "said" he has the data available ( by replying to read
> > 
request).
> >
> Why this bug fixed ?
> >
> > thank you
> > raz
> >
> >

> >
> _______________________________________________
> > etherlab-
users
> mailing
> > list
> > etherlab-users <at> etherlab.org
> > http:
//lists.etherlab.
> >
> org/mailman/listinfo/etherlab-users
> >
> >
> >

> >
> > Senza L’IMU il mercato
> immobiliare potrebbe riprendersi. 
Inizia ora la
> > ricerca della tua
> Casa!  http://tiscali.casa.
it/vendita?partner=Tiscali
> >
> 
_______________________________________________
> > etherlab-users
> 
mailing list
> > etherlab-users <at> etherlab.org
> > http://lists.etherlab.

> org/mailman/listinfo/etherlab-users
> >
>
>
>
>
> Senza L’IMU il 
mercato immobiliare potrebbe riprendersi. Inizia ora la
> ricerca della 
tua Casa!  http://tiscali.casa.it/vendita?partner=Tiscali
> 
_______________________________________________
> etherlab-users 
mailing list
> etherlab-users <at> etherlab.org
> http://lists.etherlab.
org/mailman/listinfo/etherlab-users
>

--

-- 
https://sites.google.
com/site/ironspeedlinux/


Senza L’IMU il mercato immobiliare potrebbe riprendersi. Inizia ora la ricerca della tua Casa!  http://tiscali.casa.it/vendita?partner=Tiscali
_______________________________________________
etherlab-users mailing list
etherlab-users <at> etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users
pier | 27 May 14:59 2013
Picon

Beckhoff EL2252...


Dear Florian And Etherlab Users

we are trying to use the Beckhoff  Timestamp n. 2 outputs module...

The autodetect of the cstruct do corresponds partially to the XML file

so we adjusted from to :

/* Master 0, Slave 3, "EL2252"
  * Vendor ID:       0x00000002
  * Product code:    0x08cc3052
  * Revision number: 0x00130000
  */

ec_pdo_entry_info_t slave_3_pdo_entries[] = {
     {0x1d09, 0x81, 8}, /* Activate */
     {0x1d09, 0x90, 64}, /* StartTime */
     {0x7000, 0x01, 1}, /* Output */
     {0x7000, 0x02, 1}, /* TriState */
     {0x7010, 0x01, 1}, /* Output */
     {0x7010, 0x02, 1}, /* TriState */
     {0x0000, 0x00, 4},
};

ec_pdo_info_t slave_3_pdos[] = {
     {0x1602, 1, slave_3_pdo_entries + 0}, /* DC Sync Activate */
     {0x1603, 1, slave_3_pdo_entries + 1}, /* DC Sync Start */
     {0x1600, 2, slave_3_pdo_entries + 2}, /* Channel 1 */
     {0x1601, 3, slave_3_pdo_entries + 4}, /* Channel 2 */
     {0x1604, 0, NULL}, /* Reserved */
};

/*
  * This is Autodetected...
  * But no corresponding to XML informations....
  * All Registers are outputs here...
*/
ec_sync_info_t slave_3_syncs[] = {
     {0, EC_DIR_INPUT, 1, slave_3_pdos + 0, EC_WD_DISABLE},
     {1, EC_DIR_INPUT, 1, slave_3_pdos + 1, EC_WD_DISABLE},
     {2, EC_DIR_OUTPUT, 3, slave_3_pdos + 2, EC_WD_ENABLE},
     {3, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
     {4, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
     {0xff}
};

to :

// Completed From XML File....

ec_pdo_entry_info_t slave_3_pdo_entries[] = {
     {0x1d09, 0x81, 8}, /* Activate */
     {0x1d09, 0x90, 64}, /* StartTime */
     {0x7000, 0x01, 1}, /* Output */
     {0x7000, 0x02, 1}, /* TriState */
     {0x7010, 0x01, 1}, /* Output */
     {0x7010, 0x02, 1}, /* TriState */
     {0x0000, 0x00, 4}, /* Reserved */
     {0x1d09, 0x10, 64}, /* SysTime */
     {0x1d09, 0x11,  8}, /* Feedback */
};

ec_pdo_info_t slave_3_pdos[] = {
     {0x1602, 1, slave_3_pdo_entries + 0}, /* DC Sync Activate */
     {0x1603, 1, slave_3_pdo_entries + 1}, /* DC Sync Start */
     {0x1600, 2, slave_3_pdo_entries + 2}, /* Channel 1 */
     {0x1601, 2, slave_3_pdo_entries + 4}, /* Channel 2 */
     {0x1604, 0, NULL}, /* Reserved */
     {0x1a00, 1, slave_3_pdo_entries + 7}, /* SysTime..*/
     {0x1a01, 1, slave_3_pdo_entries + 8}, /* Feedback...*/
};

ec_sync_info_t slave_3_syncs[] = {
     {0, EC_DIR_OUTPUT, 1, slave_3_pdos + 0, EC_WD_DISABLE},
     {1, EC_DIR_OUTPUT, 1, slave_3_pdos + 1, EC_WD_DISABLE},

     {2, EC_DIR_OUTPUT, 2, slave_3_pdos + 2, EC_WD_ENABLE},

     {3, EC_DIR_INPUT,  1, slave_3_pdos + 4, EC_WD_DISABLE},

     {4, EC_DIR_INPUT,  1, slave_3_pdos + 5, EC_WD_DISABLE},
     {5, EC_DIR_INPUT,  1, slave_3_pdos + 6, EC_WD_DISABLE},

     {0xff}
};

Finally we get the configuration working  for etherlab but

the outputs remain always off and we read also the systime to 0....

On the module is declared an eeprom.... probably must be programmed ?

How to do that ? Must be Twincat software ?

I found here some messages on January :

http://www.mail-archive.com/etherlab-users-TgCWn71uKPpg9hUCZPvPmw <at> public.gmane.org/msg01741.html

But not a solution....

Best Regards

Pier

--

-- 

Perlsoft GmbH
Sennereigasse 27
3900 Brig
Switzerland

Tel. +41977022933

Picon

R: Re: R: SDO stress

Yes I'm using Kollmorgen Servos, I'll try spacing Sdo operation with 
some idle cycles and see if that improves the reliability.
I wrote 
Kollmorgen support and they just recommended not to overlap Sdo 
requests.
Unfortunatly I cannot avoid Sdo operations during normal 
cycle since some variables cannot be pdo mapped.
Thanks Luca

----
Messaggio originale----
Da: tbj <at> automateddesign.com
Data: 23/05/2013 
16.19
A: "paluan.luca <at> tiscali.it"<paluan.luca <at> tiscali.it>
Cc: "etherlab-
users <at> etherlab.org"<etherlab-users <at> etherlab.org>
Ogg: Re: [etherlab-
users] R: SDO stress

This is probably a useless aside, but what servo 
drive are you using? I
have nothing but problems with SDO reads and 
writes on the Kollmorgen AKD
drive, regardless of the EtherCAT master 
used. If I don't space them out by
100ms or so, the drive gives 
inconsistent responses. I've spent a year
trying to improve the 
situation, but to no avail. My plan is to use the
EtherCAT master as 
the controller so I can avoid SDO usage with the drive.

Thomas C. 
Bitsky Jr. | Lead Developer
ADC | automateddesign.com
P: 630-783-1150 
F: 630-783-1159 M: 630-632-6679

On Thu, May 23, 2013 at 5:10 AM, 
paluan.luca <at> tiscali.it <
paluan.luca <at> tiscali.it> wrote:

>
>
> Hello,
> 
I've been struggling with Sdo write since 3 mounths without a
> 
solution up to now.
> I wrote a stress test which writes and reads what

> written on three Sdo for three Servos in a preemptive real time loop:

>
> after some hours of work the application hangs and the ethercat 
master
> shows a download/upload Sdo Timeout error problem.
> I've 
checked that
> only one read or one write takes place at a time, for 
example:
> start
> write SDO1 for first servo
> end write SDO1 for 
first servo
> start read
> SDO1 for first servo
> end read SDO1 for 
first servo
> start write SDO2 for
> first servo
> end write SDO2 for 
first servo
> start read SDO2 for first
> servo
> end read SDO2 for 
first servo
> ...
> start write SDO1 for second
> servo
> end write 
SDO1 for second servo
> start read SDO1 for second servo
>
> end read 
SDO1 for second servo
> start write SDO2 for second servo
> end
> write 
SDO2 for second servo
> start read SDO2 for second servo
> end read
> 
SDO2 for second servo
> ....
> So each write doesn't overlap each read 
for
> each servo.
> As far as I know managing Sdo inside real time loop 
is not
> reliable: I mean it usually works, but for a software which 
manages
> Servos is not enough.
> If someone has advices or suggestions 
is welcome.
>
> Best Regards, Luca Paluan
>
> ----Messaggio 
originale----
> Da:
> RBenYehuda <at> manz.com
> Data: 22/05/2013 13.36
> A: 
"etherlab-users <at> etherlab.
> org"<etherlab-users <at> etherlab.org>
> Ogg: 
[etherlab-users] SDO stress
>
> Hey
>
>
> I have been tracking the 
following problem:
> I generate bulk of sdo
> reads and sdo writes ( 
upload / downloads).  after some time the sdo
> read
> hangs.  I made a 
capture with tcpdump and noticed that the
> failure lies in etherlab. 
it appears that
> after some time etherlab
> does not try to send a 
mail box response read from the mailbox, even
> though
> the slave 
"said" he has the data available ( by replying to read
> request).
> 
Why this bug fixed ?
>
> thank you
> raz
>
>
> 
_______________________________________________
> etherlab-users 
mailing
> list
> etherlab-users <at> etherlab.org
> http://lists.etherlab.
> 
org/mailman/listinfo/etherlab-users
>
>
>
>
> Senza L’IMU il mercato 
immobiliare potrebbe riprendersi. Inizia ora la
> ricerca della tua 
Casa!  http://tiscali.casa.it/vendita?partner=Tiscali
> 
_______________________________________________
> etherlab-users 
mailing list
> etherlab-users <at> etherlab.org
> http://lists.etherlab.
org/mailman/listinfo/etherlab-users
>

Senza L’IMU il mercato immobiliare potrebbe riprendersi. Inizia ora la ricerca della tua Casa!  http://tiscali.casa.it/vendita?partner=Tiscali
_______________________________________________
etherlab-users mailing list
etherlab-users <at> etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users
Picon

R: SDO stress


Hello,
I've been struggling with Sdo write since 3 mounths without a 
solution up to now.
I wrote a stress test which writes and reads what 
written on three Sdo for three Servos in a preemptive real time loop:

after some hours of work the application hangs and the ethercat master 
shows a download/upload Sdo Timeout error problem.
I've checked that 
only one read or one write takes place at a time, for example:
start 
write SDO1 for first servo
end write SDO1 for first servo
start read 
SDO1 for first servo
end read SDO1 for first servo
start write SDO2 for 
first servo
end write SDO2 for first servo
start read SDO2 for first 
servo
end read SDO2 for first servo
...
start write SDO1 for second 
servo
end write SDO1 for second servo
start read SDO1 for second servo

end read SDO1 for second servo
start write SDO2 for second servo
end 
write SDO2 for second servo
start read SDO2 for second servo
end read 
SDO2 for second servo
....
So each write doesn't overlap each read for 
each servo.
As far as I know managing Sdo inside real time loop is not 
reliable: I mean it usually works, but for a software which manages 
Servos is not enough.
If someone has advices or suggestions is welcome.

Best Regards, Luca Paluan

----Messaggio originale----
Da: 
RBenYehuda <at> manz.com
Data: 22/05/2013 13.36
A: "etherlab-users <at> etherlab.
org"<etherlab-users <at> etherlab.org>
Ogg: [etherlab-users] SDO stress

Hey

I have been tracking the following problem:
I generate bulk of sdo 
reads and sdo writes ( upload / downloads).  after some time the sdo 
read 
hangs.  I made a capture with tcpdump and noticed that the 
failure lies in etherlab. it appears that 
after some time etherlab 
does not try to send a mail box response read from the mailbox, even 
though
the slave "said" he has the data available ( by replying to read 
request).
Why this bug fixed ?

thank you
raz

_______________________________________________
etherlab-users mailing 
list
etherlab-users <at> etherlab.org
http://lists.etherlab.
org/mailman/listinfo/etherlab-users

Senza L’IMU il mercato immobiliare potrebbe riprendersi. Inizia ora la ricerca della tua Casa!  http://tiscali.casa.it/vendita?partner=Tiscali
_______________________________________________
etherlab-users mailing list
etherlab-users <at> etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users
Ben Yehuda, Raz | 22 May 13:36 2013

SDO stress

Hey

I have been tracking the following problem:
I generate bulk of sdo reads and sdo writes ( upload / downloads).  after some time the sdo read 
hangs.  I made a capture with tcpdump and noticed that the failure lies in etherlab. it appears that 
after some time etherlab does not try to send a mail box response read from the mailbox, even though
the slave "said" he has the data available ( by replying to read request).
Why this bug fixed ?

thank you
raz

rothgaenger | 22 May 13:26 2013

Re: etherlab-users Digest, Vol 72, Issue 12

Hello Matthieu,

thank you very much for your answer. I displayed the NIC information  
with terminal command "sudo lshw -C network":
   *-network:1
        description: Ethernet interface
        product: 82540EM Gigabit Ethernet Controller
        vendor: Intel Corporation
        physical id: 8
        bus info: pci <at> 0000:00:08.0
        logical name: eth2
        version: 02
        serial: 00:08:54:53:fa:42
        size: 1GB/s
        capacity: 1GB/s
        width: 32 bits
        clock: 66MHz
        capabilities: pm pcix bus_master cap_list ethernet physical tp  
10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
        configuration: autonegotiation=on broadcast=yes driver=e1000  
driverversion=7.3.21-k3-NAPI duplex=full firmware=N/A latency=64  
link=yes mingnt=255 multicast=yes port=twisted pair speed=1GB/s
        resources: irq:9 memory:f0820000-f083ffff ioport:d240(size=8)

Yes, I am using the generic driver because of information from  
etherlab.org: "Since version 1.5, there is a generic Ethernet driver  
among the native ones, that spans all Ethernet devices supported by  
the Linux kernel. Although it is not usable with realtime patches like  
RTAI (because it uses the lower network stack layers), it runs  
perfectly with realtime preemption."

Regards,
Marcel

Zitat von etherlab-users-request@...:

> Send etherlab-users mailing list submissions to
> 	etherlab-users@...
>
> 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@...
>
> You can reach the person managing the list at
> 	etherlab-users-owner@...
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of etherlab-users digest..."
>
>
> Today's Topics:
>
>    1. Re: WARNINGS: "Working counter changed" and "datagram
>       UNMATCHED" (matthieu bec)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 17 May 2013 20:36:18 -0700
> From: matthieu bec <mbec@...>
> Subject: Re: [etherlab-users] WARNINGS: "Working counter changed" and
> 	"datagram UNMATCHED"
> To: rothgaenger@...
> Cc: etherlab-users@...
> Message-ID: <5196F732.8060705@...>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hello Marcel,
>
> Two things you might want to check:
>
> - have a look at the 'dc_user' example (mlockall, nanosleep cycle). The
> 'user' example works with setitimer, that might be less deterministic
> somehow
>
> - are you using the 'generic' driver? have a look at patch drivers if
> your NIC is supported
>
> Regards,
> Matthieu
>
>
>
>
> On 05/02/2013 02:06 PM, rothgaenger@... wrote:
>>
>> Hello everybody!
>>
>> I am trying to build an etherlab-application based on the user-example.
>> I modified the source code for my bus configuration. After compiling and
>> running the program I received the following output:
>>
>> Configuring PDOs...
>> Activating master...
>> Starting timer...
>> Started.
>> 5 slave(s).
>> AL states: 0x02.
>> Link is up.
>> Domain1: WC 1.
>> Domain1: State 1.
>> Domain1: WC 4.
>> Domain1: WC 5.
>> Domain1: WC 6.
>> Domain1: State 2.
>> AL states: 0x08.
>> Domain1: WC 0.
>> Domain1: State 0.
>> Domain1: WC 6.
>> Domain1: State 2.
>> Domain1: WC 0.
>> Domain1: State 0.
>> Domain1: WC 6.
>> Domain1: State 2.
>>
>> The program works, the digital outputs are blinking/toggleing. I paid
>> attention to the domain working counter- and state changes. This
>> messages appear when the program is running a few seconds. The kernel
>> logs showed the following messages:
>>
>> tux <at> terminal:~$ sudo dmesg -c
>> [29842.462777] EtherCAT 0: Domain 0: Working counter changed to 0/6.
>> [29842.752788] EtherCAT WARNING: Datagram f73b59c0 (domain0-0) was
>> SKIPPED 2 times.
>> [29843.076180] EtherCAT WARNING 0: 1 datagram UNMATCHED!
>> [29843.472786] EtherCAT 0: Domain 0: Working counter changed to 6/6.
>> tux <at> terminal:~$ sudo dmesg -c
>> [29855.462831] EtherCAT 0: Domain 0: Working counter changed to 0/6.
>> [29855.882832] EtherCAT WARNING: Datagram f73b59c0 (domain0-0) was
>> SKIPPED 2 times.
>> [29856.084222] EtherCAT WARNING 0: 1 datagram UNMATCHED!
>> [29856.472779] EtherCAT 0: Domain 0: Working counter changed to 6/6.
>>
>> Here some infos about the system: Ubuntu 10.04 LTS with Kernel 2.6.31.6
>> and PREEMPT patch but same warnings also appear on a system without RT
>> PREEMPT.
>> etherlab version info:
>> tux <at> terminal:~$ sudo /opt/etherlab/bin/ethercat version
>> IgH EtherCAT master 1.5.1 0f7a243b03e4
>>
>> I can imagine there are timing problems because program is working and
>> the messages appear irregular. On the other side, EtherCAT is a
>> real-time capable system but does not require real-time, isn't it? Can
>> you tell me what's wrong in the program or what is the reason for warnings?
>>
>> Below you can see the program.
>>
>> Best Regards,
>> Marcel
>>
>>
>>
>>
>> #include <errno.h>
>> #include <signal.h>
>> #include <stdio.h>
>> #include <string.h>
>> #include <sys/resource.h>
>> #include <sys/time.h>
>> #include <sys/types.h>
>> #include <unistd.h>
>>
>> /****************************************************************************/
>>
>>
>> #include "ecrt.h"
>>
>> /****************************************************************************/
>>
>>
>> // Application parameters
>> #define FREQUENCY 100
>> #define PRIORITY 1
>>
>> // Optional features
>> #define CONFIGURE_PDOS  1
>> #define SDO_ACCESS      0
>>
>> /****************************************************************************/
>>
>>
>> // EtherCAT
>> static ec_master_t *master = NULL;
>> static ec_master_state_t master_state = {};
>>
>> static ec_domain_t *domain1 = NULL;
>> static ec_domain_state_t domain1_state = {};
>>
>> static ec_slave_config_t *sc_ana_in = NULL;
>> static ec_slave_config_state_t sc_ana_in_state = {};
>>
>> // Timer
>> static unsigned int sig_alarms = 0;
>> static unsigned int user_alarms = 0;
>>
>> /****************************************************************************/
>>
>>
>> // process data
>> static uint8_t *domain1_pd = NULL;
>>
>> #define BusCouplerPos  0, 0
>> #define PotentialPos   0, 1
>> #define DigOutSlavePos 0, 2
>> #define DigInSlavePos  0, 2
>> #define AnaInSlavePos  0, 3
>> #define ThermoSlavePos 0, 4
>>
>> #define Beckhoff_EK1100 0x00000002, 0x044c2c52
>> #define Beckhoff_EL9110 0x00000002, 0x23963052
>> #define Beckhoff_EL1859 0x00000002, 0x07433052
>> #define Beckhoff_EL3111 0x00000002, 0x0c273052
>> #define Beckhoff_EL3311 0x00000002, 0x0cef3052
>>
>>
>> // offsets for PDO entries
>> static unsigned int off_potential_status;
>> static unsigned int off_dig_out;
>> static unsigned int off_dig_in;
>> static unsigned int off_ana_in;
>> static unsigned int off_thermo_in;
>>
>> const static ec_pdo_entry_reg_t domain1_regs[] = {
>>      {PotentialPos,  Beckhoff_EL9110, 0x6000, 1, &off_potential_status},
>>      {DigOutSlavePos,  Beckhoff_EL1859, 0x7080, 1, &off_dig_out},
>>      {DigInSlavePos,  Beckhoff_EL1859, 0x6000, 1, &off_dig_in},
>>      {AnaInSlavePos,  Beckhoff_EL3111, 0x6000, 0x11, &off_ana_in},
>>      {ThermoSlavePos,  Beckhoff_EL3311, 0x6000, 0x11, &off_thermo_in},
>>      {}
>> };
>>
>> static unsigned int counter = 0;
>> static unsigned int blink = 0;
>>
>> /*****************************************************************************/
>>
>>
>> #if CONFIGURE_PDOS
>>
>> /* Master 0, Slave 1, "EL9110"
>>   * Vendor ID:       0x00000002
>>   * Product code:    0x23963052
>>   * Revision number: 0x00100000
>>   */
>>
>> ec_pdo_entry_info_t slave_1_pdo_entries[] = {
>>      {0x6000, 0x01, 1}, /* Input */
>> };
>>
>> ec_pdo_info_t slave_1_pdos[] = {
>>      {0x1a00, 1, slave_1_pdo_entries + 0}, /* PowerOK */
>> };
>>
>> ec_sync_info_t slave_1_syncs[] = {
>>      {0, EC_DIR_INPUT, 1, slave_1_pdos + 0, EC_WD_DISABLE},
>>      {0xff}
>> };
>>
>> /* Master 0, Slave 2, "EL1859"
>>   * Vendor ID:       0x00000002
>>   * Product code:    0x07433052
>>   * Revision number: 0x00100000
>>   */
>>
>> ec_pdo_entry_info_t slave_2_pdo_entries[] = {
>>      {0x7080, 0x01, 1}, /* Output */
>>      {0x7090, 0x01, 1}, /* Output */
>>      {0x70a0, 0x01, 1}, /* Output */
>>      {0x70b0, 0x01, 1}, /* Output */
>>      {0x70c0, 0x01, 1}, /* Output */
>>      {0x70d0, 0x01, 1}, /* Output */
>>      {0x70e0, 0x01, 1}, /* Output */
>>      {0x70f0, 0x01, 1}, /* Output */
>>      {0x6000, 0x01, 1}, /* Input */
>>      {0x6010, 0x01, 1}, /* Input */
>>      {0x6020, 0x01, 1}, /* Input */
>>      {0x6030, 0x01, 1}, /* Input */
>>      {0x6040, 0x01, 1}, /* Input */
>>      {0x6050, 0x01, 1}, /* Input */
>>      {0x6060, 0x01, 1}, /* Input */
>>      {0x6070, 0x01, 1}, /* Input */
>> };
>>
>> ec_pdo_info_t slave_2_pdos[] = {
>>      {0x1608, 1, slave_2_pdo_entries + 0}, /* Channel 9 */
>>      {0x1609, 1, slave_2_pdo_entries + 1}, /* Channel 10 */
>>      {0x160a, 1, slave_2_pdo_entries + 2}, /* Channel 11 */
>>      {0x160b, 1, slave_2_pdo_entries + 3}, /* Channel 12 */
>>      {0x160c, 1, slave_2_pdo_entries + 4}, /* Channel 13 */
>>      {0x160d, 1, slave_2_pdo_entries + 5}, /* Channel 14 */
>>      {0x160e, 1, slave_2_pdo_entries + 6}, /* Channel 15 */
>>      {0x160f, 1, slave_2_pdo_entries + 7}, /* Channel 16 */
>>      {0x1a00, 1, slave_2_pdo_entries + 8}, /* Channel 1 */
>>      {0x1a01, 1, slave_2_pdo_entries + 9}, /* Channel 2 */
>>      {0x1a02, 1, slave_2_pdo_entries + 10}, /* Channel 3 */
>>      {0x1a03, 1, slave_2_pdo_entries + 11}, /* Channel 4 */
>>      {0x1a04, 1, slave_2_pdo_entries + 12}, /* Channel 5 */
>>      {0x1a05, 1, slave_2_pdo_entries + 13}, /* Channel 6 */
>>      {0x1a06, 1, slave_2_pdo_entries + 14}, /* Channel 7 */
>>      {0x1a07, 1, slave_2_pdo_entries + 15}, /* Channel 8 */
>> };
>>
>> ec_sync_info_t el1859_syncs[] = {
>>      {0, EC_DIR_OUTPUT, 8, slave_2_pdos + 0, EC_WD_ENABLE},
>>      {1, EC_DIR_INPUT, 8, slave_2_pdos + 8, EC_WD_DISABLE},
>>      {0xff}
>> };
>>
>> /* Master 0, Slave 3, "EL3111"
>>   * Vendor ID:       0x00000002
>>   * Product code:    0x0c273052
>>   * Revision number: 0x00100000
>>   */
>>
>> ec_pdo_entry_info_t slave_3_pdo_entries[] = {
>>      {0x6000, 0x01, 1}, /* Underrange */
>>      {0x6000, 0x02, 1}, /* Overrange */
>>      {0x6000, 0x03, 2}, /* Limit 1 */
>>      {0x6000, 0x05, 2}, /* Limit 2 */
>>      {0x6000, 0x07, 1}, /* Error */
>>      {0x0000, 0x00, 1}, /* Gap */
>>      {0x0000, 0x00, 5}, /* Gap */
>>      {0x1c32, 0x20, 1},
>>      {0x1800, 0x07, 1}, /* TxPDO State */
>>      {0x1800, 0x09, 1}, /* TxPDO Toggle */
>>      {0x6000, 0x11, 16}, /* Value */
>> };
>>
>> ec_pdo_info_t slave_3_pdos[] = {
>>      {0x1a00, 11, slave_3_pdo_entries + 0}, /* AI TxPDO-Map Standard
>> Ch.1 */
>> };
>>
>> ec_sync_info_t el3111_syncs[] = {
>>      {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
>>      {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
>>      {2, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
>>      {3, EC_DIR_INPUT, 1, slave_3_pdos + 0, EC_WD_DISABLE},
>>      {0xff}
>> };
>>
>> /* Master 0, Slave 4, "EL3311"
>>   * Vendor ID:       0x00000002
>>   * Product code:    0x0cef3052
>>   * Revision number: 0x00120000
>>   */
>>
>> ec_pdo_entry_info_t slave_4_pdo_entries[] = {
>>      {0x6000, 0x01, 1}, /* Underrange */
>>      {0x6000, 0x02, 1}, /* Overrange */
>>      {0x6000, 0x03, 2}, /* Limit 1 */
>>      {0x6000, 0x05, 2}, /* Limit 2 */
>>      {0x6000, 0x07, 1}, /* Error */
>>      {0x0000, 0x00, 7}, /* Gap */
>>      {0x6000, 0x0f, 1}, /* TxPDO State */
>>      {0x1800, 0x09, 1},
>>      {0x6000, 0x11, 16}, /* Value */
>> };
>>
>> ec_pdo_info_t slave_4_pdos[] = {
>>      {0x1a00, 9, slave_4_pdo_entries + 0}, /* TC TxPDO-MapCh.1 */
>> };
>>
>> ec_sync_info_t slave_4_syncs[] = {
>>      {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
>>      {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
>>      {2, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
>>      {3, EC_DIR_INPUT, 1, slave_4_pdos + 0, EC_WD_DISABLE},
>>      {0xff}
>> };
>>
>> #endif
>>
>> /*****************************************************************************/
>>
>>
>> #if SDO_ACCESS
>> static ec_sdo_request_t *sdo;
>> #endif
>>
>> /*****************************************************************************/
>>
>>
>> void check_domain1_state(void)
>> {
>>      ec_domain_state_t ds;
>>
>>      ecrt_domain_state(domain1, &ds);
>>
>>      if (ds.working_counter != domain1_state.working_counter)
>>          printf("Domain1: WC %u.\n", ds.working_counter);
>>      if (ds.wc_state != domain1_state.wc_state)
>>          printf("Domain1: State %u.\n", ds.wc_state);
>>
>>      domain1_state = ds;
>> }
>>
>> /*****************************************************************************/
>>
>>
>> void check_master_state(void)
>> {
>>      ec_master_state_t ms;
>>
>>      ecrt_master_state(master, &ms);
>>
>>      if (ms.slaves_responding != master_state.slaves_responding)
>>          printf("%u slave(s).\n", ms.slaves_responding);
>>      if (ms.al_states != master_state.al_states)
>>          printf("AL states: 0x%02X.\n", ms.al_states);
>>      if (ms.link_up != master_state.link_up)
>>          printf("Link is %s.\n", ms.link_up ? "up" : "down");
>>
>>      master_state = ms;
>> }
>>
>> /*****************************************************************************/
>>
>>
>> void check_slave_config_states(void)
>> {
>>      ec_slave_config_state_t s;
>>
>>      ecrt_slave_config_state(sc_ana_in, &s);
>>
>>      if (s.al_state != sc_ana_in_state.al_state)
>>          printf("AnaIn: State 0x%02X.\n", s.al_state);
>>      if (s.online != sc_ana_in_state.online)
>>          printf("AnaIn: %s.\n", s.online ? "online" : "offline");
>>      if (s.operational != sc_ana_in_state.operational)
>>          printf("AnaIn: %soperational.\n",
>>                  s.operational ? "" : "Not ");
>>
>>      sc_ana_in_state = s;
>> }
>>
>> /*****************************************************************************/
>>
>>
>> #if SDO_ACCESS
>> void read_sdo(void)
>> {
>>      switch (ecrt_sdo_request_state(sdo)) {
>>          case EC_REQUEST_UNUSED: // request was not used yet
>>              ecrt_sdo_request_read(sdo); // trigger first read
>>              break;
>>          case EC_REQUEST_BUSY:
>>              fprintf(stderr, "Still busy...\n");
>>              break;
>>          case EC_REQUEST_SUCCESS:
>>              fprintf(stderr, "SDO value: 0x%04X\n",
>>                      EC_READ_U16(ecrt_sdo_request_data(sdo)));
>>              ecrt_sdo_request_read(sdo); // trigger next read
>>              break;
>>          case EC_REQUEST_ERROR:
>>              fprintf(stderr, "Failed to read SDO!\n");
>>              ecrt_sdo_request_read(sdo); // retry reading
>>              break;
>>      }
>> }
>> #endif
>>
>> /****************************************************************************/
>>
>>
>> void cyclic_task()
>> {
>>      int i;
>>
>>      // receive process data
>>      ecrt_master_receive(master);
>>      ecrt_domain_process(domain1);
>>
>>      // check process data state (optional)
>>      check_domain1_state();
>>
>>      if (counter) {
>>          counter--;
>>      } else { // do this at 1 Hz
>>          counter = FREQUENCY;
>>
>>          // calculate new process data
>>          blink = !blink;
>>
>>          // check for master state (optional)
>>          check_master_state();
>>
>>          // check for islave configuration state(s) (optional)
>>          //check_slave_config_states();
>>
>> #if SDO_ACCESS
>>          // read process data SDO
>>          read_sdo();
>> #endif
>>
>>      }
>>
>> #if 0
>>      // read process data
>>      printf("AnaIn: state %u value %u\n",
>>              EC_READ_U8(domain1_pd + off_ana_in_status),
>>              EC_READ_U16(domain1_pd + off_ana_in_value));
>> #endif
>>
>> #if 1
>>      // write process data
>>      EC_WRITE_U8(domain1_pd + off_dig_out, blink ? 0x06 : 0x09);
>> #endif
>>
>>      // send process data
>>      ecrt_domain_queue(domain1);
>>      ecrt_master_send(master);
>> }
>>
>> /****************************************************************************/
>>
>>
>> void signal_handler(int signum) {
>>      switch (signum) {
>>          case SIGALRM:
>>              sig_alarms++;
>>              break;
>>      }
>> }
>>
>> /****************************************************************************/
>>
>>
>> int main(int argc, char **argv)
>> {
>>      ec_slave_config_t *sc;
>>      struct sigaction sa;
>>      struct itimerval tv;
>>
>>      master = ecrt_request_master(0);
>>      if (!master)
>>          return -1;
>>
>>      domain1 = ecrt_master_create_domain(master);
>>      if (!domain1)
>>          return -1;
>>
>>      if (!(sc_ana_in = ecrt_master_slave_config(
>>                      master, AnaInSlavePos, Beckhoff_EL3111))) {
>>          fprintf(stderr, "Failed to get slave configuration.\n");
>>          return -1;
>>      }
>>
>> #if SDO_ACCESS
>>      fprintf(stderr, "Creating SDO requests...\n");
>>      if (!(sdo = ecrt_slave_config_create_sdo_request(sc_ana_in, 0x3102,
>> 2, 2))) {
>>          fprintf(stderr, "Failed to create SDO request.\n");
>>          return -1;
>>      }
>>      ecrt_sdo_request_timeout(sdo, 500); // ms
>> #endif
>>
>> #if CONFIGURE_PDOS
>>      printf("Configuring PDOs...\n");
>>      if (ecrt_slave_config_pdos(sc_ana_in, EC_END, el3111_syncs)) {
>>          fprintf(stderr, "Failed to configure PDOs.\n");
>>          return -1;
>>      }
>>
>>      if (!(sc = ecrt_master_slave_config(
>>                      master, DigOutSlavePos, Beckhoff_EL1859))) {
>>          fprintf(stderr, "Failed to get slave configuration.\n");
>>          return -1;
>>      }
>>
>>      if (ecrt_slave_config_pdos(sc, EC_END, el1859_syncs)) {
>>          fprintf(stderr, "Failed to configure PDOs.\n");
>>          return -1;
>>      }
>> #endif
>>
>>      // Create configuration for bus coupler
>>      sc = ecrt_master_slave_config(master, BusCouplerPos, Beckhoff_EK1100);
>>      if (!sc)
>>          return -1;
>>
>>      if (ecrt_domain_reg_pdo_entry_list(domain1, domain1_regs)) {
>>          fprintf(stderr, "PDO entry registration failed!\n");
>>          return -1;
>>      }
>>
>>      printf("Activating master...\n");
>>      if (ecrt_master_activate(master))
>>          return -1;
>>
>>      if (!(domain1_pd = ecrt_domain_data(domain1))) {
>>          return -1;
>>      }
>>
>> #if PRIORITY
>>      pid_t pid = getpid();
>>      if (setpriority(PRIO_PROCESS, pid, -19))
>>          fprintf(stderr, "Warning: Failed to set priority: %s\n",
>>                  strerror(errno));
>> #endif
>>
>>      sa.sa_handler = signal_handler;
>>      sigemptyset(&sa.sa_mask);
>>      sa.sa_flags = 0;
>>      if (sigaction(SIGALRM, &sa, 0)) {
>>          fprintf(stderr, "Failed to install signal handler!\n");
>>          return -1;
>>      }
>>
>>      printf("Starting timer...\n");
>>      tv.it_interval.tv_sec = 0;
>>      tv.it_interval.tv_usec = 1000000 / FREQUENCY;
>>      tv.it_value.tv_sec = 0;
>>      tv.it_value.tv_usec = 1000;
>>      if (setitimer(ITIMER_REAL, &tv, NULL)) {
>>          fprintf(stderr, "Failed to start timer: %s\n", strerror(errno));
>>          return 1;
>>      }
>>
>>      printf("Started.\n");
>>      while (1) {
>>          pause();
>>
>> #if 0
>>          struct timeval t;
>>          gettimeofday(&t, NULL);
>>          printf("%u.%06u\n", t.tv_sec, t.tv_usec);
>> #endif
>>
>>          while (sig_alarms != user_alarms) {
>>              cyclic_task();
>>              user_alarms++;
>>          }
>>      }
>>
>>      return 0;
>> }
>>
>> /****************************************************************************/
>>
>>
>>
>> _______________________________________________
>> etherlab-users mailing list
>> etherlab-users@...
>> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>
>
> --
> Matthieu Bec                GMTO Corp.
> cell : +1 626 354 9367      P.O. Box 90933
> phone: +1 626 204 0527      Pasadena, CA 91109-0933
>
>
> ------------------------------
>
> _______________________________________________
> etherlab-users mailing list
> etherlab-users@...
> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>
>
> End of etherlab-users Digest, Vol 72, Issue 12
> **********************************************

vilian_ch | 21 May 11:00 2013

Intel 82583 NIC Bug

 Hello,Everyone
We use Ethercat master(version 1.5.1) and Intel 82583 NIC to test our new PC. We found a bug about this kind of NIC:
we connect an ethercat slave with the NIC and get master info via "ethercat master", then we found the link state of the master
is UP and its had 1 one slave connected(this was all right). But when we disconnect the slave with NIC(cable disconnected), and then
we want to get the master info via "ethercat master", then it printed that the link state of the master was still UP and the number of slaves was also 1(this was definitely wrong!).
the linux version we used was 2.6.32, so I want to know is it a bug of 82583 ethercat NIC drive, or this version of EtherCAT master did not support 82583 correctly?
 
Thank you in advance!
 

 

----- 原始邮件 -----
发件人:etherlab-users-request <at> etherlab.org
收件人:etherlab-users <at> etherlab.org
主题:etherlab-users Digest, Vol 72, Issue 12
日期:2013年05月18日 18点00分

<div>
<div>&nbsp;Hello,Everyone</div>
<div>We use Ethercat master(version 1.5.1) and Intel 82583 NIC to test our new PC. We found a bug about this kind of NIC:</div>
<div>we connect an ethercat slave with the NIC and get master info via "ethercat master", then we found the link state of the master</div>
<div>is UP and its had 1 one slave connected(this was all right). But when we disconnect the slave with NIC(cable disconnected), and then</div>
<div>we want to get the master info via "ethercat master", then it printed that the link state of the master was still UP and the number of slaves was also 1(this was definitely wrong!).</div>
<div>the linux version we used was 2.6.32, so I want to know is it a bug of 82583 ethercat NIC drive, or this version of EtherCAT master did not support 82583 correctly?</div>
<div>&nbsp;</div>
<div>Thank you in advance!</div>
<div>&nbsp;</div>
<div>
<br>&nbsp;</div>
<br><div>
<div>----- &#21407;&#22987;&#37038;&#20214; -----<br>&#21457;&#20214;&#20154;&#65306;etherlab-users-request <at> etherlab.org<br>&#25910;&#20214;&#20154;&#65306;etherlab-users <at> etherlab.org<br>&#20027;&#39064;&#65306;etherlab-users Digest, Vol 72, Issue 12<br>&#26085;&#26399;&#65306;2013&#24180;05&#26376;18&#26085; 18&#28857;00&#20998;<br>
</div>
<br>
</div>
</div>
Steffen Dalgard | 15 May 11:50 2013
Picon

How to install and use Etherlab for a Xenomai target

Hi,
We are trying to install Etherlab on a Xenomai target together with ROS and OROCOS.
The plan is to have a user space rt-application calling the Igh master.
 
Does it exist a procedure for how to get this working?
 
I have tried to read through the mail archive and the examples, but have only found piecewise information.
   I have found mails mentioning patching of driver connecting Etherlab master to user space
   It seems to be special lib libetherkat_rtdm.so
 
Hope someone can help :-)
 
Best regards
Steffen Dalgard
SINTEF ICT
Norway
<div><div dir="ltr">
<div>Hi,</div>
<div>We are trying to install Etherlab on a Xenomai target together with ROS and OROCOS.</div>
<div>The plan is to have a user space rt-application calling the Igh master.</div>
<div>&nbsp;</div>
<div>
Does it exist a procedure for how to get this working?</div>
<div>
<span></span>&nbsp;</div>
<div>I have tried to read through the mail archive and the examples, but have only found piecewise information.</div>
<div>
<div> &nbsp;&nbsp; I have found mails mentioning patching of driver connecting Etherlab master to user space</div>
<div> &nbsp;&nbsp; It seems to be special lib <span>libetherkat_rtdm.so</span>
</div>
<div>&nbsp;</div>
<div>Hope someone can help :-)</div>
<div>&nbsp;</div>
<div>Best regards</div>
</div>
<div>Steffen Dalgard</div>
<div>SINTEF ICT</div>
<div>Norway</div>
</div></div>

Gmane