Re: [etherlab-users] how to implement EoE example?

2017-05-08 Thread Gavin Lambert
No, as I said before the Etherlab master will recognise EoE devices and make a 
Linux network interface for them.  So you send regular Ethernet packets to that 
interface, just as you would any other physical network interface.

 

From: Ruika You [mailto:crazylinux...@gmail.com] 
Sent: Tuesday, 9 May 2017 03:00
To: Gavin Lambert <gavin.lamb...@compacsort.com>
Cc: etherlab-users@etherlab.org
Subject: Re: [etherlab-users] how to implement EoE example?

 

Thanks!

I read beckhoff EL6614 document carefully again. 

As I understood, data is transferred by mailbox. So can I just use SDO to send 
and receive data?

 

Refer to 
<https://infosys.beckhoff.com/english.php?content=../content/1033/el6601_el6614/2356692619.html
 
<https://infosys.beckhoff.com/english.php?content=../content/1033/el6601_el6614/2356692619.html=>
 =>.

 

On Fri, May 5, 2017 at 10:52 PM, Ruika You <crazylinux...@gmail.com 
<mailto:crazylinux...@gmail.com> > wrote:

Thanks for your reply.

 

You mean I no need to write kernel module for EoE, even though EoE is kernel 
module of ethercat master. 

 

I found some useful information from follow post:

<https://www.mail-archive.com/etherlab-users@etherlab.org/msg01559.html>

 

As Thomas Bitsky, Jr. comment:

void
send_callback(void *cb_data)
{
ec_master_t *m = (ec_master_t *) cb_data;
down(_sem);
ecrt_master_send_ext(m);
up(_sem);
}
 
void
receive_callback(void *cb_data)
{
ec_master_t *m = (ec_master_t *) cb_data;
down(_sem);
ecrt_master_receive(m);
up(_sem);
 }
 
If they are not in the program and activated by ecrt_master_callbacks, then
there is no lock-up. Of course, EoE doesn't work.

 

I will add code into user space application and give a try. But I confused that 
how can I send data and receive data if there is no call back function?

 

Thanks!

-chengxi  

  

 

On Fri, May 5, 2017 at 7:27 AM, Gavin Lambert <gav...@compacsort.com 
<mailto:gav...@compacsort.com> > wrote:

I don’t use EoE myself, but as I understand it the kernel component of the 
master (which exists even if your application is only in userspace) creates 
regular Linux ethernet devices for the EoE ports of the slaves, and takes care 
of the message relaying itself.  So your application doesn’t need to do 
anything special and the userspace application (or any other process on the PC) 
can send packets to those devices just like any other network interface.  You 
might need to assign it a static IP before regular apps will talk to it, though.

 

From: etherlab-users [mailto:etherlab-users-boun...@etherlab.org 
<mailto:etherlab-users-boun...@etherlab.org> ] On Behalf Of Ruika You
Sent: Friday, 5 May 2017 02:45
To: etherlab-users@etherlab.org <mailto:etherlab-users@etherlab.org> 
Subject: [etherlab-users] how to implement EoE example?

 

Dear all,

 

Recently I am trying to implement EoE and do read all threads related EoE in 
this mailing list.But I  still do not understand well.

First of all, If I am not wrong EoE only works in kernel space? Unfortunatelly, 
currently my application works in user space. So in this case, I had better to 
run two master one in user space with current application, another one in 
kernel space with EoE?

 

Secondly, if anyone have experience with EoE, would you mind share one example?

 

Now I can start EoE and ping through eoe between two machines. I am not clear 
how to send data and receive data, like tty serial example? but El6614 does not 
have .xml file.

 

Any hints are appreciated.

 

Thanks very much!  

 

 

 

___
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users


Re: [etherlab-users] how to implement EoE example?

2017-05-08 Thread Ruika You
Thanks!
I read beckhoff EL6614 document carefully again.
As I understood, data is transferred by mailbox. So can I just use SDO to
send and receive data?

Refer to 
<*https://infosys.beckhoff.com/english.php?content=../content/1033/el6601_el6614/2356692619.html=
<https://infosys.beckhoff.com/english.php?content=../content/1033/el6601_el6614/2356692619.html=>*
>.

On Fri, May 5, 2017 at 10:52 PM, Ruika You <crazylinux...@gmail.com> wrote:

> Thanks for your reply.
>
> You mean I no need to write kernel module for EoE, even though EoE is
> kernel module of ethercat master.
>
> I found some useful information from follow post:
> <*https://www.mail-archive.com/etherlab-users@etherlab.org/msg01559.html
> <https://www.mail-archive.com/etherlab-users@etherlab.org/msg01559.html>*>
>
> As Thomas Bitsky, Jr. comment:
>
>> void
>> send_callback(void *cb_data)
>> {
>> ec_master_t *m = (ec_master_t *) cb_data;
>> down(_sem);
>> ecrt_master_send_ext(m);
>> up(_sem);
>> }
>>
>> void
>> receive_callback(void *cb_data)
>> {
>> ec_master_t *m = (ec_master_t *) cb_data;
>> down(_sem);
>> ecrt_master_receive(m);
>> up(_sem);
>>  }
>>
>> If they are not in the program and activated by ecrt_master_callbacks, then
>> there is no lock-up. Of course, EoE doesn't work.
>>
>>
> I will add code into user space application and give a try. But I confused
> that how can I send data and receive data if there is no call back function?
>
> Thanks!
> -chengxi
>
>
> On Fri, May 5, 2017 at 7:27 AM, Gavin Lambert <gav...@compacsort.com>
> wrote:
>
>> I don’t use EoE myself, but as I understand it the kernel component of
>> the master (which exists even if your application is only in userspace)
>> creates regular Linux ethernet devices for the EoE ports of the slaves, and
>> takes care of the message relaying itself.  So your application doesn’t
>> need to do anything special and the userspace application (or any other
>> process on the PC) can send packets to those devices just like any other
>> network interface.  You might need to assign it a static IP before regular
>> apps will talk to it, though.
>>
>>
>>
>> *From:* etherlab-users [mailto:etherlab-users-boun...@etherlab.org] *On
>> Behalf Of *Ruika You
>> *Sent:* Friday, 5 May 2017 02:45
>> *To:* etherlab-users@etherlab.org
>> *Subject:* [etherlab-users] how to implement EoE example?
>>
>>
>>
>> Dear all,
>>
>>
>>
>> Recently I am trying to implement EoE and do read all threads related EoE
>> in this mailing list.But I  still do not understand well.
>>
>> First of all, If I am not wrong EoE only works in kernel space?
>> Unfortunatelly, currently my application works in user space. So in this
>> case, I had better to run two master one in user space with current
>> application, another one in kernel space with EoE?
>>
>>
>>
>> Secondly, if anyone have experience with EoE, would you mind share one
>> example?
>>
>>
>>
>> Now I can start EoE and ping through eoe between two machines. I am not
>> clear how to send data and receive data, like tty serial example? but
>> El6614 does not have .xml file.
>>
>>
>>
>> Any hints are appreciated.
>>
>>
>>
>> Thanks very much!
>>
>>
>>
>
>
___
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users


Re: [etherlab-users] how to implement EoE example?

2017-05-07 Thread Gavin Lambert
No, you don’t need to write any kernel code, that’s already there.

 

The send/receive callbacks are mainly for use with RTAI or Xenomai 
implementations where the application is implemented in a super-kernel layer.  
You don’t need to use them for a userspace application.

 

From: Ruika You [mailto:crazylinux...@gmail.com] 
Sent: Saturday, 6 May 2017 02:53
To: Gavin Lambert <gavin.lamb...@compacsort.com>
Cc: etherlab-users@etherlab.org
Subject: Re: [etherlab-users] how to implement EoE example?

 

Thanks for your reply.

 

You mean I no need to write kernel module for EoE, even though EoE is kernel 
module of ethercat master. 

 

I found some useful information from follow post:

<https://www.mail-archive.com/etherlab-users@etherlab.org/msg01559.html>

 

As Thomas Bitsky, Jr. comment:

void
send_callback(void *cb_data)
{
ec_master_t *m = (ec_master_t *) cb_data;
down(_sem);
ecrt_master_send_ext(m);
up(_sem);
}
 
void
receive_callback(void *cb_data)
{
ec_master_t *m = (ec_master_t *) cb_data;
down(_sem);
ecrt_master_receive(m);
up(_sem);
 }
 
If they are not in the program and activated by ecrt_master_callbacks, then
there is no lock-up. Of course, EoE doesn't work.

 

I will add code into user space application and give a try. But I confused that 
how can I send data and receive data if there is no call back function?

 

Thanks!

-chengxi  

  

 

On Fri, May 5, 2017 at 7:27 AM, Gavin Lambert <gav...@compacsort.com 
<mailto:gav...@compacsort.com> > wrote:

I don’t use EoE myself, but as I understand it the kernel component of the 
master (which exists even if your application is only in userspace) creates 
regular Linux ethernet devices for the EoE ports of the slaves, and takes care 
of the message relaying itself.  So your application doesn’t need to do 
anything special and the userspace application (or any other process on the PC) 
can send packets to those devices just like any other network interface.  You 
might need to assign it a static IP before regular apps will talk to it, though.

 

From: etherlab-users [mailto:etherlab-users-boun...@etherlab.org 
<mailto:etherlab-users-boun...@etherlab.org> ] On Behalf Of Ruika You
Sent: Friday, 5 May 2017 02:45
To: etherlab-users@etherlab.org <mailto:etherlab-users@etherlab.org> 
Subject: [etherlab-users] how to implement EoE example?

 

Dear all,

 

Recently I am trying to implement EoE and do read all threads related EoE in 
this mailing list.But I  still do not understand well.

First of all, If I am not wrong EoE only works in kernel space? Unfortunatelly, 
currently my application works in user space. So in this case, I had better to 
run two master one in user space with current application, another one in 
kernel space with EoE?

 

Secondly, if anyone have experience with EoE, would you mind share one example?

 

Now I can start EoE and ping through eoe between two machines. I am not clear 
how to send data and receive data, like tty serial example? but El6614 does not 
have .xml file.

 

Any hints are appreciated.

 

Thanks very much!  

 

 

___
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users


Re: [etherlab-users] how to implement EoE example?

2017-05-05 Thread Ruika You
Thanks for your reply.

You mean I no need to write kernel module for EoE, even though EoE is
kernel module of ethercat master.

I found some useful information from follow post:
<*https://www.mail-archive.com/etherlab-users@etherlab.org/msg01559.html
<https://www.mail-archive.com/etherlab-users@etherlab.org/msg01559.html>*>

As Thomas Bitsky, Jr. comment:

> void
> send_callback(void *cb_data)
> {
> ec_master_t *m = (ec_master_t *) cb_data;
> down(_sem);
> ecrt_master_send_ext(m);
> up(_sem);
> }
>
> void
> receive_callback(void *cb_data)
> {
> ec_master_t *m = (ec_master_t *) cb_data;
> down(_sem);
> ecrt_master_receive(m);
> up(_sem);
>  }
>
> If they are not in the program and activated by ecrt_master_callbacks, then
> there is no lock-up. Of course, EoE doesn't work.
>
>
I will add code into user space application and give a try. But I confused
that how can I send data and receive data if there is no call back function?

Thanks!
-chengxi


On Fri, May 5, 2017 at 7:27 AM, Gavin Lambert <gav...@compacsort.com> wrote:

> I don’t use EoE myself, but as I understand it the kernel component of the
> master (which exists even if your application is only in userspace) creates
> regular Linux ethernet devices for the EoE ports of the slaves, and takes
> care of the message relaying itself.  So your application doesn’t need to
> do anything special and the userspace application (or any other process on
> the PC) can send packets to those devices just like any other network
> interface.  You might need to assign it a static IP before regular apps
> will talk to it, though.
>
>
>
> *From:* etherlab-users [mailto:etherlab-users-boun...@etherlab.org] *On
> Behalf Of *Ruika You
> *Sent:* Friday, 5 May 2017 02:45
> *To:* etherlab-users@etherlab.org
> *Subject:* [etherlab-users] how to implement EoE example?
>
>
>
> Dear all,
>
>
>
> Recently I am trying to implement EoE and do read all threads related EoE
> in this mailing list.But I  still do not understand well.
>
> First of all, If I am not wrong EoE only works in kernel space?
> Unfortunatelly, currently my application works in user space. So in this
> case, I had better to run two master one in user space with current
> application, another one in kernel space with EoE?
>
>
>
> Secondly, if anyone have experience with EoE, would you mind share one
> example?
>
>
>
> Now I can start EoE and ping through eoe between two machines. I am not
> clear how to send data and receive data, like tty serial example? but
> El6614 does not have .xml file.
>
>
>
> Any hints are appreciated.
>
>
>
> Thanks very much!
>
>
>
___
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users


Re: [etherlab-users] how to implement EoE example?

2017-05-04 Thread Gavin Lambert
I don’t use EoE myself, but as I understand it the kernel component of the 
master (which exists even if your application is only in userspace) creates 
regular Linux ethernet devices for the EoE ports of the slaves, and takes care 
of the message relaying itself.  So your application doesn’t need to do 
anything special and the userspace application (or any other process on the PC) 
can send packets to those devices just like any other network interface.  You 
might need to assign it a static IP before regular apps will talk to it, though.

 

From: etherlab-users [mailto:etherlab-users-boun...@etherlab.org] On Behalf Of 
Ruika You
Sent: Friday, 5 May 2017 02:45
To: etherlab-users@etherlab.org
Subject: [etherlab-users] how to implement EoE example?

 

Dear all,

 

Recently I am trying to implement EoE and do read all threads related EoE in 
this mailing list.But I  still do not understand well.

First of all, If I am not wrong EoE only works in kernel space? Unfortunatelly, 
currently my application works in user space. So in this case, I had better to 
run two master one in user space with current application, another one in 
kernel space with EoE?

 

Secondly, if anyone have experience with EoE, would you mind share one example?

 

Now I can start EoE and ping through eoe between two machines. I am not clear 
how to send data and receive data, like tty serial example? but El6614 does not 
have .xml file.

 

Any hints are appreciated.

 

Thanks very much!  

 

___
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users


[etherlab-users] how to implement EoE example?

2017-05-04 Thread Ruika You
Dear all,

Recently I am trying to implement EoE and do read all threads related EoE
in this mailing list.But I  still do not understand well.
First of all, If I am not wrong EoE only works in kernel space?
Unfortunatelly, currently my application works in user space. So in this
case, I had better to run two master one in user space with current
application, another one in kernel space with EoE?

Secondly, if anyone have experience with EoE, would you mind share one
example?

Now I can start EoE and ping through eoe between two machines. I am not
clear how to send data and receive data, like tty serial example? but
El6614 does not have .xml file.

Any hints are appreciated.

Thanks very much!
___
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users