RTNet, SOEM: getting socket

Hi Flavian,

Can you check in the soem_core/CMakeLists.txt if the ENABLE_RTNET option
(line 26) is set to ON? It should, if not set it to ON, and rebuild the
soem_core.

You should also see the -DHAVE_RTNET as a compile option if you do 'make
VERBOSE=1'

Ruben

On Mon, Jun 10, 2013 at 4:31 PM, <f [dot] hautbois [..] ...> wrote:

> It seems like when compiling Soem_core does not use the posix skin.
>
> I noticed a line in the CMakeLists file in soem_core where it requires a
> "ENABLE_RTNET" variable which is set to false in build/CMakeCache...
>
> This is the only difference with the ethercat executable I mentioned in my
> previous message. (according to ldd it uses the skin posix).
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>

RTNet, SOEM: getting socket

Hi Ruben,

Line 26 is fine.

However with make VERBOSE=1, I don't come accross any -DHAVE_RTNET option
(maybe it is supposed to be set in a parent folder?), but I noticed this
line:
"-DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake
-DENABLE_RTNET=OFF", which comes before line 26 is interpreted.

Actually, there is this line in the Makefile:
> EXTRA_CMAKE_FLAGS=-DENABLE_RTNET=OFF

I'm not sure I should change it manually since this is an automatically
generated file though, but I think you may have some insight on what caused
it?

Flavian

2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>

> Hi Flavian,
>
> Can you check in the soem_core/CMakeLists.txt if the ENABLE_RTNET option
> (line 26) is set to ON? It should, if not set it to ON, and rebuild the
> soem_core.
>
> You should also see the -DHAVE_RTNET as a compile option if you do 'make
> VERBOSE=1'
>
> Ruben
>
>
>
>
> On Mon, Jun 10, 2013 at 4:31 PM, <f [dot] hautbois [..] ...> wrote:
>
>> It seems like when compiling Soem_core does not use the posix skin.
>>
>> I noticed a line in the CMakeLists file in soem_core where it requires a
>> "ENABLE_RTNET" variable which is set to false in build/CMakeCache...
>>
>> This is the only difference with the ethercat executable I mentioned in my
>> previous message. (according to ldd it uses the skin posix).
>> --
>> Orocos-Users mailing list
>> Orocos-Users [..] ...
>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>
>
>
>
> --
> Ruben Smits, Phd
> Chief Technology Officer
> Intermodalics BVBA
> +32479511786
> www.intermodalics.eu
>

RTNet, SOEM: getting socket

2013/6/11 Leopold Palomo-Avellaneda <leopold [dot] palomo [..] ...>

> A Dimarts, 11 de juny de 2013, Flavian Hautbois va escriure:
>> > Le 11 juin 2013 16:31, "Leopold Palomo-Avellaneda" <
>> leopold [dot] palomo [..] ...>
>> > a écrit :
>> > >
>> > > Flavian,
>> > >
>> > > I'm following your steps because I'm working on a CMaked version of
>> SOEM
>> > > 1.3.0.
>> >
>> > That would be great!
>>
>> I promise I will make it public when it worked ..
>>
>
> Ok. If you have some advice about my CPU limit exceeded error I'll take it
> though.
>
>
>>
>> >
>> > >
>> > > A Dimarts, 11 de juny de 2013, Flavian Hautbois va escriure:
>> > > > Ruben,
>> > > >
>> > > > I've been investigating in the previous error. (the CPU time limit
>> > > > exceeded).
>> > > > I narrowed it down to line ~401 of nicdrv.c in the soem_core src:
>> > > >
>> > > > >rval = send(*stack->sock, (*stack->txbuf)[idx], lp, 0)
>> > > >
>> > > > It turns out the EtherCAT frame is sent (I can visualize it with
>> > > > Wireshark), but somehow there must be a mutex problem and the CPU
>> time
>> > > > limit exceeded exception is raised. (I tried to set the ulimit up
>> to one
>> > > > hour without any success)
>> > >
>> > > Ok
>> > >
>> > > > Do you have any insight on this kind of error?
>> > >
>> > > yes, in the soem 1.3.0. But I must investigate.
>> > >
>> > > > Thanks,
>> > > >
>> > > > Flavian
>> > > >
>> > > > PS : the slaveinfo error was fixed but is irrelevant, as it is
>> linked to
>> > > > the fact that it does not run in a RT thread natively, but does
>> through
>> > the
>> > > > deployer-xenomai.
>> > >
>> > > but reports you slaves? because I can run the program but no slaves
>> found.
>> >
>> > I had to add a line to force it to go to primary mode right before it
>> calls
>> > the send function, I don't have the exact line here but it's something
>> like
>> > "pthread(pthread_self, SCHED_FIFO, &params)".
>> >
>> > Without it no ethercat frames are sent and the send function returns -1,
>> > with it my slaves are properly configured but you shouldnt use this
>> version
>> > with the orocos deployer IMO.
>>
>> please, could you be more concrete?
>>
>>
> In build/soem_core/src/slaveinfo.c, line 291, add:
>
> > struct sched_param param = { .sched_priority = 1};
>
> > pthread_setschedparam(pthread_selft(), SCHED_FIFO, &param);
>
> That's the only thing I've changed and it works.
>
>
>
>> Leopold
>>
>>
>> --
>> --
>> Leopold Palomo-Avellaneda <leopold [dot] palomo [..] ...>
>> Institut d'Organització i Control de Sistemes Industrials -IOC-
>> Universitat Politècnica de Catalunya -UPC-
>>
>> Institute of Industrial and Control Engineering
>> Technical University of Catalonia
>> Avda. Diagonal 647, pl. 11
>> 08028 BARCELONA (Spain)
>>
>> Tel. +34-934017163
>> Fax. +34-934016605
>>
>
>
>
> --
> F. Hautbois
>

RTNet, SOEM: getting socket

Using a grep command, the only occurence of -DHAVE_RTNET is in line 30 of
the CMakeLists.txt file of /soem_core. However it is inside an if statement
that is never accessed because ENABLE_RTNET is OFF (yet it supposed to be
set to ON on line 26).

2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>

> Hi Ruben,
>
> Line 26 is fine.
>
> However with make VERBOSE=1, I don't come accross any -DHAVE_RTNET option
> (maybe it is supposed to be set in a parent folder?), but I noticed this
> line:
> "-DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake
> -DENABLE_RTNET=OFF", which comes before line 26 is interpreted.
>
> Actually, there is this line in the Makefile:
> > EXTRA_CMAKE_FLAGS=-DENABLE_RTNET=OFF
>
> I'm not sure I should change it manually since this is an automatically
> generated file though, but I think you may have some insight on what caused
> it?
>
> Flavian
>
>
> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
>
>> Hi Flavian,
>>
>> Can you check in the soem_core/CMakeLists.txt if the ENABLE_RTNET option
>> (line 26) is set to ON? It should, if not set it to ON, and rebuild the
>> soem_core.
>>
>> You should also see the -DHAVE_RTNET as a compile option if you do 'make
>> VERBOSE=1'
>>
>> Ruben
>>
>>
>>
>>
>> On Mon, Jun 10, 2013 at 4:31 PM, <f [dot] hautbois [..] ...> wrote:
>>
>>> It seems like when compiling Soem_core does not use the posix skin.
>>>
>>> I noticed a line in the CMakeLists file in soem_core where it requires a
>>> "ENABLE_RTNET" variable which is set to false in build/CMakeCache...
>>>
>>> This is the only difference with the ethercat executable I mentioned in
>>> my
>>> previous message. (according to ldd it uses the skin posix).
>>> --
>>> Orocos-Users mailing list
>>> Orocos-Users [..] ...
>>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>>
>>
>>
>>
>> --
>> Ruben Smits, Phd
>> Chief Technology Officer
>> Intermodalics BVBA
>> +32479511786
>> www.intermodalics.eu
>>
>
>
>
> --
> F. Hautbois
>

Ruben Smits's picture

RTNet, SOEM: getting socket

Hi Flavian,

On Tue, Jun 11, 2013 at 9:29 AM, Flavian Hautbois <f [dot] hautbois [..] ...>wrote:

> Using a grep command, the only occurence of -DHAVE_RTNET is in line 30 of
> the CMakeLists.txt file of /soem_core. However it is inside an if statement
> that is never accessed because ENABLE_RTNET is OFF (yet it supposed to be
> set to ON on line 26).
>
>
> 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
>
>> Hi Ruben,
>>
>> Line 26 is fine.
>>
>> However with make VERBOSE=1, I don't come accross any -DHAVE_RTNET option
>> (maybe it is supposed to be set in a parent folder?), but I noticed this
>> line:
>> "-DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake
>> -DENABLE_RTNET=OFF", which comes before line 26 is interpreted.
>>
>> Actually, there is this line in the Makefile:
>> > EXTRA_CMAKE_FLAGS=-DENABLE_RTNET=OFF
>>
>> I'm not sure I should change it manually since this is an automatically
>> generated file though, but I think you may have some insight on what caused
>> it?
>>
>>
the ENABLE_RTNET flag is indeed forced to OFF by default in the Makefile
(it overrides the value set in the CMakeLists.txt), you can safely set it
to on in the Makefile.

Ruben

> Flavian
>>
>>
>> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
>>
>>> Hi Flavian,
>>>
>>> Can you check in the soem_core/CMakeLists.txt if the ENABLE_RTNET option
>>> (line 26) is set to ON? It should, if not set it to ON, and rebuild the
>>> soem_core.
>>>
>>> You should also see the -DHAVE_RTNET as a compile option if you do 'make
>>> VERBOSE=1'
>>>
>>> Ruben
>>>
>>>
>>>
>>>
>>> On Mon, Jun 10, 2013 at 4:31 PM, <f [dot] hautbois [..] ...> wrote:
>>>
>>>> It seems like when compiling Soem_core does not use the posix skin.
>>>>
>>>> I noticed a line in the CMakeLists file in soem_core where it requires a
>>>> "ENABLE_RTNET" variable which is set to false in build/CMakeCache...
>>>>
>>>> This is the only difference with the ethercat executable I mentioned in
>>>> my
>>>> previous message. (according to ldd it uses the skin posix).
>>>> --
>>>> Orocos-Users mailing list
>>>> Orocos-Users [..] ...
>>>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>>>
>>>
>>>
>>>
>>> --
>>> Ruben Smits, Phd
>>> Chief Technology Officer
>>> Intermodalics BVBA
>>> +32479511786
>>> www.intermodalics.eu
>>>
>>
>>
>>
>> --
>> F. Hautbois
>>
>
>
>
> --
> F. Hautbois
>

RTNet, SOEM: getting socket

Hi Ruben,

I modified the value in the makefile, it indeed built using RTNet this time
(the nm command shows there is a socket wrapper). The slaveinfo script now
works fine with rteth0.
However, the configure command in the Master component of test.ops shows
that there is still a socket problem (same behaviour as what I had with the
former slaveinfo script). My smell was that I needed to "make clean" and
remake soem_master and soem_beckhoff_drivers, which I did.
Now when I set up ifname="rteth0" in my Master component and execute the
Configure command, I get this error:

UCT limit time expired (core dumped)

Any idea?

Flavian

2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>

> Hi Flavian,
>
>
>
>
> On Tue, Jun 11, 2013 at 9:29 AM, Flavian Hautbois <f [dot] hautbois [..] ...>wrote:
>
>> Using a grep command, the only occurence of -DHAVE_RTNET is in line 30 of
>> the CMakeLists.txt file of /soem_core. However it is inside an if statement
>> that is never accessed because ENABLE_RTNET is OFF (yet it supposed to be
>> set to ON on line 26).
>>
>>
>> 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
>>
>>> Hi Ruben,
>>>
>>> Line 26 is fine.
>>>
>>> However with make VERBOSE=1, I don't come accross any -DHAVE_RTNET
>>> option (maybe it is supposed to be set in a parent folder?), but I noticed
>>> this line:
>>> "-DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake
>>> -DENABLE_RTNET=OFF", which comes before line 26 is interpreted.
>>>
>>> Actually, there is this line in the Makefile:
>>> > EXTRA_CMAKE_FLAGS=-DENABLE_RTNET=OFF
>>>
>>> I'm not sure I should change it manually since this is an automatically
>>> generated file though, but I think you may have some insight on what caused
>>> it?
>>>
>>>
> the ENABLE_RTNET flag is indeed forced to OFF by default in the Makefile
> (it overrides the value set in the CMakeLists.txt), you can safely set it
> to on in the Makefile.
>
> Ruben
>
>
>> Flavian
>>>
>>>
>>> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
>>>
>>>> Hi Flavian,
>>>>
>>>> Can you check in the soem_core/CMakeLists.txt if the ENABLE_RTNET
>>>> option (line 26) is set to ON? It should, if not set it to ON, and rebuild
>>>> the soem_core.
>>>>
>>>> You should also see the -DHAVE_RTNET as a compile option if you do
>>>> 'make VERBOSE=1'
>>>>
>>>> Ruben
>>>>
>>>>
>>>>
>>>>
>>>> On Mon, Jun 10, 2013 at 4:31 PM, <f [dot] hautbois [..] ...> wrote:
>>>>
>>>>> It seems like when compiling Soem_core does not use the posix skin.
>>>>>
>>>>> I noticed a line in the CMakeLists file in soem_core where it requires
>>>>> a
>>>>> "ENABLE_RTNET" variable which is set to false in build/CMakeCache...
>>>>>
>>>>> This is the only difference with the ethercat executable I mentioned
>>>>> in my
>>>>> previous message. (according to ldd it uses the skin posix).
>>>>> --
>>>>> Orocos-Users mailing list
>>>>> Orocos-Users [..] ...
>>>>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Ruben Smits, Phd
>>>> Chief Technology Officer
>>>> Intermodalics BVBA
>>>> +32479511786
>>>> www.intermodalics.eu
>>>>
>>>
>>>
>>>
>>> --
>>> F. Hautbois
>>>
>>
>>
>>
>> --
>> F. Hautbois
>>
>
>
>
> --
> Ruben Smits, Phd
> Chief Technology Officer
> Intermodalics BVBA
> +32479511786
> www.intermodalics.eu
>

RTNet, SOEM: getting socket

Sorry, the translation of the error was wrong.

The error is: "CPU time limit exceeded"

I tried to set "setActivity("Master", 0.001, HighestPriority,
ORO_SCHED_RT)" in the deployer, but the Configure command in the Master
component still throws a CPU time limit exceeded fault.

Moreover, I noticed that /soem_core/bin/slaveinfo rteth0 was not returning
the slave list (though there is a slave that is connected).

2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>

> Hi Ruben,
>
> I modified the value in the makefile, it indeed built using RTNet this
> time (the nm command shows there is a socket wrapper). The slaveinfo script
> now works fine with rteth0.
> However, the configure command in the Master component of test.ops shows
> that there is still a socket problem (same behaviour as what I had with the
> former slaveinfo script). My smell was that I needed to "make clean" and
> remake soem_master and soem_beckhoff_drivers, which I did.
> Now when I set up ifname="rteth0" in my Master component and execute the
> Configure command, I get this error:
>
> UCT limit time expired (core dumped)
>
> Any idea?
>
> Flavian
>
>
> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
>
>> Hi Flavian,
>>
>>
>>
>>
>> On Tue, Jun 11, 2013 at 9:29 AM, Flavian Hautbois <f [dot] hautbois [..] ...>wrote:
>>
>>> Using a grep command, the only occurence of -DHAVE_RTNET is in line 30
>>> of the CMakeLists.txt file of /soem_core. However it is inside an if
>>> statement that is never accessed because ENABLE_RTNET is OFF (yet it
>>> supposed to be set to ON on line 26).
>>>
>>>
>>> 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
>>>
>>>> Hi Ruben,
>>>>
>>>> Line 26 is fine.
>>>>
>>>> However with make VERBOSE=1, I don't come accross any -DHAVE_RTNET
>>>> option (maybe it is supposed to be set in a parent folder?), but I noticed
>>>> this line:
>>>> "-DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake
>>>> -DENABLE_RTNET=OFF", which comes before line 26 is interpreted.
>>>>
>>>> Actually, there is this line in the Makefile:
>>>> > EXTRA_CMAKE_FLAGS=-DENABLE_RTNET=OFF
>>>>
>>>> I'm not sure I should change it manually since this is an automatically
>>>> generated file though, but I think you may have some insight on what caused
>>>> it?
>>>>
>>>>
>> the ENABLE_RTNET flag is indeed forced to OFF by default in the Makefile
>> (it overrides the value set in the CMakeLists.txt), you can safely set it
>> to on in the Makefile.
>>
>> Ruben
>>
>>
>>> Flavian
>>>>
>>>>
>>>> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
>>>>
>>>>> Hi Flavian,
>>>>>
>>>>> Can you check in the soem_core/CMakeLists.txt if the ENABLE_RTNET
>>>>> option (line 26) is set to ON? It should, if not set it to ON, and rebuild
>>>>> the soem_core.
>>>>>
>>>>> You should also see the -DHAVE_RTNET as a compile option if you do
>>>>> 'make VERBOSE=1'
>>>>>
>>>>> Ruben
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Jun 10, 2013 at 4:31 PM, <f [dot] hautbois [..] ...> wrote:
>>>>>
>>>>>> It seems like when compiling Soem_core does not use the posix skin.
>>>>>>
>>>>>> I noticed a line in the CMakeLists file in soem_core where it
>>>>>> requires a
>>>>>> "ENABLE_RTNET" variable which is set to false in build/CMakeCache...
>>>>>>
>>>>>> This is the only difference with the ethercat executable I mentioned
>>>>>> in my
>>>>>> previous message. (according to ldd it uses the skin posix).
>>>>>> --
>>>>>> Orocos-Users mailing list
>>>>>> Orocos-Users [..] ...
>>>>>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Ruben Smits, Phd
>>>>> Chief Technology Officer
>>>>> Intermodalics BVBA
>>>>> +32479511786
>>>>> www.intermodalics.eu
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> F. Hautbois
>>>>
>>>
>>>
>>>
>>> --
>>> F. Hautbois
>>>
>>
>>
>>
>> --
>> Ruben Smits, Phd
>> Chief Technology Officer
>> Intermodalics BVBA
>> +32479511786
>> www.intermodalics.eu
>>
>
>
>
> --
> F. Hautbois
>

RTNet, SOEM: getting socket

Ruben,

I've been investigating in the previous error. (the CPU time limit
exceeded).
I narrowed it down to line ~401 of nicdrv.c in the soem_core src:

>rval = send(*stack->sock, (*stack->txbuf)[idx], lp, 0)

It turns out the EtherCAT frame is sent (I can visualize it with
Wireshark), but somehow there must be a mutex problem and the CPU time
limit exceeded exception is raised. (I tried to set the ulimit up to one
hour without any success)

Do you have any insight on this kind of error?

Thanks,

Flavian

PS : the slaveinfo error was fixed but is irrelevant, as it is linked to
the fact that it does not run in a RT thread natively, but does through the
deployer-xenomai.

2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>

> Sorry, the translation of the error was wrong.
>
> The error is: "CPU time limit exceeded"
>
> I tried to set "setActivity("Master", 0.001, HighestPriority,
> ORO_SCHED_RT)" in the deployer, but the Configure command in the Master
> component still throws a CPU time limit exceeded fault.
>
> Moreover, I noticed that /soem_core/bin/slaveinfo rteth0 was not returning
> the slave list (though there is a slave that is connected).
>
>
> 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
>
>> Hi Ruben,
>>
>> I modified the value in the makefile, it indeed built using RTNet this
>> time (the nm command shows there is a socket wrapper). The slaveinfo script
>> now works fine with rteth0.
>> However, the configure command in the Master component of test.ops shows
>> that there is still a socket problem (same behaviour as what I had with the
>> former slaveinfo script). My smell was that I needed to "make clean" and
>> remake soem_master and soem_beckhoff_drivers, which I did.
>> Now when I set up ifname="rteth0" in my Master component and execute the
>> Configure command, I get this error:
>>
>> UCT limit time expired (core dumped)
>>
>> Any idea?
>>
>> Flavian
>>
>>
>> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
>>
>>> Hi Flavian,
>>>
>>>
>>>
>>>
>>> On Tue, Jun 11, 2013 at 9:29 AM, Flavian Hautbois <f [dot] hautbois [..] ...>wrote:
>>>
>>>> Using a grep command, the only occurence of -DHAVE_RTNET is in line 30
>>>> of the CMakeLists.txt file of /soem_core. However it is inside an if
>>>> statement that is never accessed because ENABLE_RTNET is OFF (yet it
>>>> supposed to be set to ON on line 26).
>>>>
>>>>
>>>> 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
>>>>
>>>>> Hi Ruben,
>>>>>
>>>>> Line 26 is fine.
>>>>>
>>>>> However with make VERBOSE=1, I don't come accross any -DHAVE_RTNET
>>>>> option (maybe it is supposed to be set in a parent folder?), but I noticed
>>>>> this line:
>>>>> "-DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake
>>>>> -DENABLE_RTNET=OFF", which comes before line 26 is interpreted.
>>>>>
>>>>> Actually, there is this line in the Makefile:
>>>>> > EXTRA_CMAKE_FLAGS=-DENABLE_RTNET=OFF
>>>>>
>>>>> I'm not sure I should change it manually since this is an
>>>>> automatically generated file though, but I think you may have some insight
>>>>> on what caused it?
>>>>>
>>>>>
>>> the ENABLE_RTNET flag is indeed forced to OFF by default in the Makefile
>>> (it overrides the value set in the CMakeLists.txt), you can safely set it
>>> to on in the Makefile.
>>>
>>> Ruben
>>>
>>>
>>>> Flavian
>>>>>
>>>>>
>>>>> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
>>>>>
>>>>>> Hi Flavian,
>>>>>>
>>>>>> Can you check in the soem_core/CMakeLists.txt if the ENABLE_RTNET
>>>>>> option (line 26) is set to ON? It should, if not set it to ON, and rebuild
>>>>>> the soem_core.
>>>>>>
>>>>>> You should also see the -DHAVE_RTNET as a compile option if you do
>>>>>> 'make VERBOSE=1'
>>>>>>
>>>>>> Ruben
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Jun 10, 2013 at 4:31 PM, <f [dot] hautbois [..] ...> wrote:
>>>>>>
>>>>>>> It seems like when compiling Soem_core does not use the posix skin.
>>>>>>>
>>>>>>> I noticed a line in the CMakeLists file in soem_core where it
>>>>>>> requires a
>>>>>>> "ENABLE_RTNET" variable which is set to false in build/CMakeCache...
>>>>>>>
>>>>>>> This is the only difference with the ethercat executable I mentioned
>>>>>>> in my
>>>>>>> previous message. (according to ldd it uses the skin posix).
>>>>>>> --
>>>>>>> Orocos-Users mailing list
>>>>>>> Orocos-Users [..] ...
>>>>>>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Ruben Smits, Phd
>>>>>> Chief Technology Officer
>>>>>> Intermodalics BVBA
>>>>>> +32479511786
>>>>>> www.intermodalics.eu
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> F. Hautbois
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> F. Hautbois
>>>>
>>>
>>>
>>>
>>> --
>>> Ruben Smits, Phd
>>> Chief Technology Officer
>>> Intermodalics BVBA
>>> +32479511786
>>> www.intermodalics.eu
>>>
>>
>>
>>
>> --
>> F. Hautbois
>>
>
>
>
> --
> F. Hautbois
>

RTNet, SOEM: getting socket

Flavian,

I'm following your steps because I'm working on a CMaked version of SOEM
1.3.0.

A Dimarts, 11 de juny de 2013, Flavian Hautbois va escriure:
> Ruben,
>
> I've been investigating in the previous error. (the CPU time limit
> exceeded).
> I narrowed it down to line ~401 of nicdrv.c in the soem_core src:
>
> >rval = send(*stack->sock, (*stack->txbuf)[idx], lp, 0)
>
> It turns out the EtherCAT frame is sent (I can visualize it with
> Wireshark), but somehow there must be a mutex problem and the CPU time
> limit exceeded exception is raised. (I tried to set the ulimit up to one
> hour without any success)

Ok

> Do you have any insight on this kind of error?

yes, in the soem 1.3.0. But I must investigate.

> Thanks,
>
> Flavian
>
> PS : the slaveinfo error was fixed but is irrelevant, as it is linked to
> the fact that it does not run in a RT thread natively, but does through the
> deployer-xenomai.

but reports you slaves? because I can run the program but no slaves found.

Leopold

>
> 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
>
> > Sorry, the translation of the error was wrong.
> >
> > The error is: "CPU time limit exceeded"
> >
> > I tried to set "setActivity("Master", 0.001, HighestPriority,
> > ORO_SCHED_RT)" in the deployer, but the Configure command in the Master
> > component still throws a CPU time limit exceeded fault.
> >
> > Moreover, I noticed that /soem_core/bin/slaveinfo rteth0 was not returning
> > the slave list (though there is a slave that is connected).
> >
> >
> > 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
> >
> >> Hi Ruben,
> >>
> >> I modified the value in the makefile, it indeed built using RTNet this
> >> time (the nm command shows there is a socket wrapper). The slaveinfo
script
> >> now works fine with rteth0.
> >> However, the configure command in the Master component of test.ops shows
> >> that there is still a socket problem (same behaviour as what I had with
the
> >> former slaveinfo script). My smell was that I needed to "make clean" and
> >> remake soem_master and soem_beckhoff_drivers, which I did.
> >> Now when I set up ifname="rteth0" in my Master component and execute the
> >> Configure command, I get this error:
> >>
> >> UCT limit time expired (core dumped)
> >>
> >> Any idea?
> >>
> >> Flavian
> >>
> >>
> >> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
> >>
> >>> Hi Flavian,
> >>>
> >>>
> >>>
> >>>
> >>> On Tue, Jun 11, 2013 at 9:29 AM, Flavian Hautbois
<f [dot] hautbois [..] ...>wrote:
> >>>
> >>>> Using a grep command, the only occurence of -DHAVE_RTNET is in line 30
> >>>> of the CMakeLists.txt file of /soem_core. However it is inside an if
> >>>> statement that is never accessed because ENABLE_RTNET is OFF (yet it
> >>>> supposed to be set to ON on line 26).
> >>>>
> >>>>
> >>>> 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
> >>>>
> >>>>> Hi Ruben,
> >>>>>
> >>>>> Line 26 is fine.
> >>>>>
> >>>>> However with make VERBOSE=1, I don't come accross any -DHAVE_RTNET
> >>>>> option (maybe it is supposed to be set in a parent folder?), but I
noticed
> >>>>> this line:
> >>>>> "-DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake
> >>>>> -DENABLE_RTNET=OFF", which comes before line 26 is interpreted.
> >>>>>
> >>>>> Actually, there is this line in the Makefile:
> >>>>> > EXTRA_CMAKE_FLAGS=-DENABLE_RTNET=OFF
> >>>>>
> >>>>> I'm not sure I should change it manually since this is an
> >>>>> automatically generated file though, but I think you may have some
insight
> >>>>> on what caused it?
> >>>>>
> >>>>>
> >>> the ENABLE_RTNET flag is indeed forced to OFF by default in the Makefile
> >>> (it overrides the value set in the CMakeLists.txt), you can safely set
it
> >>> to on in the Makefile.
> >>>
> >>> Ruben
> >>>
> >>>
> >>>> Flavian
> >>>>>
> >>>>>
> >>>>> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
> >>>>>
> >>>>>> Hi Flavian,
> >>>>>>
> >>>>>> Can you check in the soem_core/CMakeLists.txt if the ENABLE_RTNET
> >>>>>> option (line 26) is set to ON? It should, if not set it to ON, and
rebuild
> >>>>>> the soem_core.
> >>>>>>
> >>>>>> You should also see the -DHAVE_RTNET as a compile option if you do
> >>>>>> 'make VERBOSE=1'
> >>>>>>
> >>>>>> Ruben
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Mon, Jun 10, 2013 at 4:31 PM, <f [dot] hautbois [..] ...> wrote:
> >>>>>>
> >>>>>>> It seems like when compiling Soem_core does not use the posix skin.
> >>>>>>>
> >>>>>>> I noticed a line in the CMakeLists file in soem_core where it
> >>>>>>> requires a
> >>>>>>> "ENABLE_RTNET" variable which is set to false in build/CMakeCache...
> >>>>>>>
> >>>>>>> This is the only difference with the ethercat executable I mentioned
> >>>>>>> in my
> >>>>>>> previous message. (according to ldd it uses the skin posix).
> >>>>>>> --
> >>>>>>> Orocos-Users mailing list
> >>>>>>> Orocos-Users [..] ...
> >>>>>>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Ruben Smits, Phd
> >>>>>> Chief Technology Officer
> >>>>>> Intermodalics BVBA
> >>>>>> +32479511786
> >>>>>> www.intermodalics.eu
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> F. Hautbois
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> F. Hautbois
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Ruben Smits, Phd
> >>> Chief Technology Officer
> >>> Intermodalics BVBA
> >>> +32479511786
> >>> www.intermodalics.eu
> >>>
> >>
> >>
> >>
> >> --
> >> F. Hautbois
> >>
> >
> >
> >
> > --
> > F. Hautbois
> >
>
>
>

RTNet, SOEM: getting socket

Le 11 juin 2013 16:31, "Leopold Palomo-Avellaneda" <leopold [dot] palomo [..] ...>
a écrit :
>
> Flavian,
>
> I'm following your steps because I'm working on a CMaked version of SOEM
> 1.3.0.

That would be great!

>
> A Dimarts, 11 de juny de 2013, Flavian Hautbois va escriure:
> > Ruben,
> >
> > I've been investigating in the previous error. (the CPU time limit
> > exceeded).
> > I narrowed it down to line ~401 of nicdrv.c in the soem_core src:
> >
> > >rval = send(*stack->sock, (*stack->txbuf)[idx], lp, 0)
> >
> > It turns out the EtherCAT frame is sent (I can visualize it with
> > Wireshark), but somehow there must be a mutex problem and the CPU time
> > limit exceeded exception is raised. (I tried to set the ulimit up to one
> > hour without any success)
>
> Ok
>
> > Do you have any insight on this kind of error?
>
> yes, in the soem 1.3.0. But I must investigate.
>
> > Thanks,
> >
> > Flavian
> >
> > PS : the slaveinfo error was fixed but is irrelevant, as it is linked to
> > the fact that it does not run in a RT thread natively, but does through
the
> > deployer-xenomai.
>
> but reports you slaves? because I can run the program but no slaves found.

I had to add a line to force it to go to primary mode right before it calls
the send function, I don't have the exact line here but it's something like
"pthread(pthread_self, SCHED_FIFO, &params)".

Without it no ethercat frames are sent and the send function returns -1,
with it my slaves are properly configured but you shouldnt use this version
with the orocos deployer IMO.

>
> Leopold
>
>
> >
> > 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
> >
> > > Sorry, the translation of the error was wrong.
> > >
> > > The error is: "CPU time limit exceeded"
> > >
> > > I tried to set "setActivity("Master", 0.001, HighestPriority,
> > > ORO_SCHED_RT)" in the deployer, but the Configure command in the
Master
> > > component still throws a CPU time limit exceeded fault.
> > >
> > > Moreover, I noticed that /soem_core/bin/slaveinfo rteth0 was not
returning
> > > the slave list (though there is a slave that is connected).
> > >
> > >
> > > 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
> > >
> > >> Hi Ruben,
> > >>
> > >> I modified the value in the makefile, it indeed built using RTNet
this
> > >> time (the nm command shows there is a socket wrapper). The slaveinfo
> script
> > >> now works fine with rteth0.
> > >> However, the configure command in the Master component of test.ops
shows
> > >> that there is still a socket problem (same behaviour as what I had
with
> the
> > >> former slaveinfo script). My smell was that I needed to "make clean"
and
> > >> remake soem_master and soem_beckhoff_drivers, which I did.
> > >> Now when I set up ifname="rteth0" in my Master component and execute
the
> > >> Configure command, I get this error:
> > >>
> > >> UCT limit time expired (core dumped)
> > >>
> > >> Any idea?
> > >>
> > >> Flavian
> > >>
> > >>
> > >> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
> > >>
> > >>> Hi Flavian,
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> On Tue, Jun 11, 2013 at 9:29 AM, Flavian Hautbois
> <f [dot] hautbois [..] ...>wrote:
> > >>>
> > >>>> Using a grep command, the only occurence of -DHAVE_RTNET is in
line 30
> > >>>> of the CMakeLists.txt file of /soem_core. However it is inside an
if
> > >>>> statement that is never accessed because ENABLE_RTNET is OFF (yet
it
> > >>>> supposed to be set to ON on line 26).
> > >>>>
> > >>>>
> > >>>> 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
> > >>>>
> > >>>>> Hi Ruben,
> > >>>>>
> > >>>>> Line 26 is fine.
> > >>>>>
> > >>>>> However with make VERBOSE=1, I don't come accross any -DHAVE_RTNET
> > >>>>> option (maybe it is supposed to be set in a parent folder?), but I
> noticed
> > >>>>> this line:
> > >>>>> "-DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake
> > >>>>> -DENABLE_RTNET=OFF", which comes before line 26 is interpreted.
> > >>>>>
> > >>>>> Actually, there is this line in the Makefile:
> > >>>>> > EXTRA_CMAKE_FLAGS=-DENABLE_RTNET=OFF
> > >>>>>
> > >>>>> I'm not sure I should change it manually since this is an
> > >>>>> automatically generated file though, but I think you may have some
> insight
> > >>>>> on what caused it?
> > >>>>>
> > >>>>>
> > >>> the ENABLE_RTNET flag is indeed forced to OFF by default in the
Makefile
> > >>> (it overrides the value set in the CMakeLists.txt), you can safely
set
> it
> > >>> to on in the Makefile.
> > >>>
> > >>> Ruben
> > >>>
> > >>>
> > >>>> Flavian
> > >>>>>
> > >>>>>
> > >>>>> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
> > >>>>>
> > >>>>>> Hi Flavian,
> > >>>>>>
> > >>>>>> Can you check in the soem_core/CMakeLists.txt if the ENABLE_RTNET
> > >>>>>> option (line 26) is set to ON? It should, if not set it to ON,
and
> rebuild
> > >>>>>> the soem_core.
> > >>>>>>
> > >>>>>> You should also see the -DHAVE_RTNET as a compile option if you
do
> > >>>>>> 'make VERBOSE=1'
> > >>>>>>
> > >>>>>> Ruben
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>> On Mon, Jun 10, 2013 at 4:31 PM, <f [dot] hautbois [..] ...> wrote:
> > >>>>>>
> > >>>>>>> It seems like when compiling Soem_core does not use the posix
skin.
> > >>>>>>>
> > >>>>>>> I noticed a line in the CMakeLists file in soem_core where it
> > >>>>>>> requires a
> > >>>>>>> "ENABLE_RTNET" variable which is set to false in
build/CMakeCache...
> > >>>>>>>
> > >>>>>>> This is the only difference with the ethercat executable I
mentioned
> > >>>>>>> in my
> > >>>>>>> previous message. (according to ldd it uses the skin posix).
> > >>>>>>> --
> > >>>>>>> Orocos-Users mailing list
> > >>>>>>> Orocos-Users [..] ...
> > >>>>>>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
> > >>>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>> --
> > >>>>>> Ruben Smits, Phd
> > >>>>>> Chief Technology Officer
> > >>>>>> Intermodalics BVBA
> > >>>>>> +32479511786
> > >>>>>> www.intermodalics.eu
> > >>>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> --
> > >>>>> F. Hautbois
> > >>>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>> --
> > >>>> F. Hautbois
> > >>>>
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> Ruben Smits, Phd
> > >>> Chief Technology Officer
> > >>> Intermodalics BVBA
> > >>> +32479511786
> > >>> www.intermodalics.eu
> > >>>
> > >>
> > >>
> > >>
> > >> --
> > >> F. Hautbois
> > >>
> > >
> > >
> > >
> > > --
> > > F. Hautbois
> > >
> >
> >
> >
> > --
> > F. Hautbois
> >
>
>
> --
> --
> Leopold Palomo-Avellaneda <leopold [dot] palomo [..] ...>
> Institut d'Organització i Control de Sistemes Industrials -IOC-
> Universitat Politècnica de Catalunya -UPC-
>
> Institute of Industrial and Control Engineering
> Technical University of Catalonia
> Avda. Diagonal 647, pl. 11
> 08028 BARCELONA (Spain)
>
> Tel. +34-934017163
> Fax. +34-934016605

RTNet, SOEM: getting socket

A Dimarts, 11 de juny de 2013, Flavian Hautbois va escriure:
> Le 11 juin 2013 16:31, "Leopold Palomo-Avellaneda" <leopold [dot] palomo [..] ...>
> a écrit :
> >
> > Flavian,
> >
> > I'm following your steps because I'm working on a CMaked version of SOEM
> > 1.3.0.
>
> That would be great!

I promise I will make it public when it worked ..

>
> >
> > A Dimarts, 11 de juny de 2013, Flavian Hautbois va escriure:
> > > Ruben,
> > >
> > > I've been investigating in the previous error. (the CPU time limit
> > > exceeded).
> > > I narrowed it down to line ~401 of nicdrv.c in the soem_core src:
> > >
> > > >rval = send(*stack->sock, (*stack->txbuf)[idx], lp, 0)
> > >
> > > It turns out the EtherCAT frame is sent (I can visualize it with
> > > Wireshark), but somehow there must be a mutex problem and the CPU time
> > > limit exceeded exception is raised. (I tried to set the ulimit up to one
> > > hour without any success)
> >
> > Ok
> >
> > > Do you have any insight on this kind of error?
> >
> > yes, in the soem 1.3.0. But I must investigate.
> >
> > > Thanks,
> > >
> > > Flavian
> > >
> > > PS : the slaveinfo error was fixed but is irrelevant, as it is linked to
> > > the fact that it does not run in a RT thread natively, but does through
> the
> > > deployer-xenomai.
> >
> > but reports you slaves? because I can run the program but no slaves found.
>
> I had to add a line to force it to go to primary mode right before it calls
> the send function, I don't have the exact line here but it's something like
> "pthread(pthread_self, SCHED_FIFO, &params)".
>
> Without it no ethercat frames are sent and the send function returns -1,
> with it my slaves are properly configured but you shouldnt use this version
> with the orocos deployer IMO.

please, could you be more concrete?

Leopold

RTNet, SOEM: getting socket

That might have something to do with the error.

2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>

> Hi Ruben,
>
> I modified the value in the makefile, it indeed built using RTNet this
> time (the nm command shows there is a socket wrapper). The slaveinfo script
> now works fine with rteth0.
> However, the configure command in the Master component of test.ops shows
> that there is still a socket problem (same behaviour as what I had with the
> former slaveinfo script). My smell was that I needed to "make clean" and
> remake soem_master and soem_beckhoff_drivers, which I did.
> Now when I set up ifname="rteth0" in my Master component and execute the
> Configure command, I get this error:
>
> UCT limit time expired (core dumped)
>
> Any idea?
>
> Flavian
>
>
> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
>
>> Hi Flavian,
>>
>>
>>
>>
>> On Tue, Jun 11, 2013 at 9:29 AM, Flavian Hautbois <f [dot] hautbois [..] ...>wrote:
>>
>>> Using a grep command, the only occurence of -DHAVE_RTNET is in line 30
>>> of the CMakeLists.txt file of /soem_core. However it is inside an if
>>> statement that is never accessed because ENABLE_RTNET is OFF (yet it
>>> supposed to be set to ON on line 26).
>>>
>>>
>>> 2013/6/11 Flavian Hautbois <f [dot] hautbois [..] ...>
>>>
>>>> Hi Ruben,
>>>>
>>>> Line 26 is fine.
>>>>
>>>> However with make VERBOSE=1, I don't come accross any -DHAVE_RTNET
>>>> option (maybe it is supposed to be set in a parent folder?), but I noticed
>>>> this line:
>>>> "-DCMAKE_TOOLCHAIN_FILE=`rospack find rosbuild`/rostoolchain.cmake
>>>> -DENABLE_RTNET=OFF", which comes before line 26 is interpreted.
>>>>
>>>> Actually, there is this line in the Makefile:
>>>> > EXTRA_CMAKE_FLAGS=-DENABLE_RTNET=OFF
>>>>
>>>> I'm not sure I should change it manually since this is an automatically
>>>> generated file though, but I think you may have some insight on what caused
>>>> it?
>>>>
>>>>
>> the ENABLE_RTNET flag is indeed forced to OFF by default in the Makefile
>> (it overrides the value set in the CMakeLists.txt), you can safely set it
>> to on in the Makefile.
>>
>> Ruben
>>
>>
>>> Flavian
>>>>
>>>>
>>>> 2013/6/11 Ruben Smits <ruben [dot] smits [..] ...>
>>>>
>>>>> Hi Flavian,
>>>>>
>>>>> Can you check in the soem_core/CMakeLists.txt if the ENABLE_RTNET
>>>>> option (line 26) is set to ON? It should, if not set it to ON, and rebuild
>>>>> the soem_core.
>>>>>
>>>>> You should also see the -DHAVE_RTNET as a compile option if you do
>>>>> 'make VERBOSE=1'
>>>>>
>>>>> Ruben
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Jun 10, 2013 at 4:31 PM, <f [dot] hautbois [..] ...> wrote:
>>>>>
>>>>>> It seems like when compiling Soem_core does not use the posix skin.
>>>>>>
>>>>>> I noticed a line in the CMakeLists file in soem_core where it
>>>>>> requires a
>>>>>> "ENABLE_RTNET" variable which is set to false in build/CMakeCache...
>>>>>>
>>>>>> This is the only difference with the ethercat executable I mentioned
>>>>>> in my
>>>>>> previous message. (according to ldd it uses the skin posix).
>>>>>> --
>>>>>> Orocos-Users mailing list
>>>>>> Orocos-Users [..] ...
>>>>>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Ruben Smits, Phd
>>>>> Chief Technology Officer
>>>>> Intermodalics BVBA
>>>>> +32479511786
>>>>> www.intermodalics.eu
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> F. Hautbois
>>>>
>>>
>>>
>>>
>>> --
>>> F. Hautbois
>>>
>>
>>
>>
>> --
>> Ruben Smits, Phd
>> Chief Technology Officer
>> Intermodalics BVBA
>> +32479511786
>> www.intermodalics.eu
>>
>
>
>
> --
> F. Hautbois
>