soem: receiving data failed

I am having trouble with an ethercat connection to a custom made board.
The slave has 20 outputBytes (encoders + analog inputs) and 10 inputbytes (control values
for a motor + unused channels).

I wrote a driver using the beckhoff drivers as examples. I can get the slave in safe
operational state (4), but the slave only rarely gets into operational state (8).

I can send information to the slave: ec_send_processdata returns 1.

But I do not receive any data from the slave: ec_receive_processdata always returns 0.
Is this the cause of not getting into operational state (8)?

If the slave is in operational state (8) it gives warnings (receiving data failed)
and does not execute the 'update' function of the soemdriver.

If I force the update function of the driver (setting 'success' on TRUE in the updateHook()
of SoemMasterComponent) and use Wireshark to visualise the data in the ethercatframes
I can see the data i wrote to the slave on the 10 inputbytes. However the returned signal still has
WKC = 0 and the slave does not seem to write data on the 20 outputbytes.

How is it possible i can get into operational state(8) inconsistently?

Is the inability of the slave to write data on the ethercatframes related to the FMMU or the SM?

wkr

Jonas

soem: receiving data failed

Sorry if this is a really obvious question, but does the hardware on
your board support ethercat? I was under the impression that the
ability of slaves to modify ethernet packets in-flight was something
that required special (and proprietary) stuff in hardware.

Cheers,
Andrew

On Mon, Dec 2, 2013 at 6:17 PM, Jonas Vantilt
<Jonas [dot] Vantilt [..] ...> wrote:
>
> I am having trouble with an ethercat connection to a custom made board.
> The slave has 20 outputBytes (encoders + analog inputs) and 10 inputbytes (control values
> for a motor + unused channels).
>
> I wrote a driver using the beckhoff drivers as examples. I can get the slave in safe
> operational state (4), but the slave only rarely gets into operational state (8).
>
> I can send information to the slave: ec_send_processdata returns 1.
>
> But I do not receive any data from the slave: ec_receive_processdata always returns 0.
> Is this the cause of not getting into operational state (8)?
>
> If the slave is in operational state (8) it gives warnings (receiving data failed)
> and does not execute the 'update' function of the soemdriver.
>
> If I force the update function of the driver (setting 'success' on TRUE in the updateHook()
> of SoemMasterComponent) and use Wireshark to visualise the data in the ethercatframes
> I can see the data i wrote to the slave on the 10 inputbytes. However the returned signal still has
> WKC = 0 and the slave does not seem to write data on the 20 outputbytes.
>
> How is it possible i can get into operational state(8) inconsistently?
>
> Is the inability of the slave to write data on the ethercatframes related to the FMMU or the SM?
>
>
> wkr
>
> Jonas
>
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users

soem: receiving data failed

On Tue Dec 3 2013 10:08, Andrew Wagner [drewm1980 [..] ...] wrote:
>
>
>Sorry if this is a really obvious question, but does the hardware on
>your board support ethercat? I was under the impression that the
>ability of slaves to modify ethernet packets in-flight was something
>that required special (and proprietary) stuff in hardware.
>
Hi Andrew

Yes it does support ethercat: the people who made the board, tested it with
Twincat ethercat connection in Windows. I can see the slave information
(rosrun soem_core slaveinfo eth0) and it matches the information of the XML
file of the slave.

I can even communicate with the slave (ask the status of slave and adres
a whole bunch of registers) but it seems the slave cannot write his data on
the LRW (logical read and write). This could be the cause or the consequence
of the slave not reaching operational state.

regards
Jonas

>Cheers,
>Andrew
>
>On Mon, Dec 2, 2013 at 6:17 PM, Jonas Vantilt
><Jonas [dot] Vantilt [..] ...> wrote:
>>
>> I am having trouble with an ethercat connection to a custom made board.
>> The slave has 20 outputBytes (encoders + analog inputs) and 10 inputbytes (control values
>> for a motor + unused channels).
>>
>> I wrote a driver using the beckhoff drivers as examples. I can get the slave in safe
>> operational state (4), but the slave only rarely gets into operational state (8).
>>
>> I can send information to the slave: ec_send_processdata returns 1.
>>
>> But I do not receive any data from the slave: ec_receive_processdata always returns 0.
>> Is this the cause of not getting into operational state (8)?
>>
>> If the slave is in operational state (8) it gives warnings (receiving data failed)
>> and does not execute the 'update' function of the soemdriver.
>>
>> If I force the update function of the driver (setting 'success' on TRUE in the updateHook()
>> of SoemMasterComponent) and use Wireshark to visualise the data in the ethercatframes
>> I can see the data i wrote to the slave on the 10 inputbytes. However the returned signal still has
>> WKC = 0 and the slave does not seem to write data on the 20 outputbytes.
>>
>> How is it possible i can get into operational state(8) inconsistently?
>>
>> Is the inability of the slave to write data on the ethercatframes related to the FMMU or the SM?
>>
>>
>> wkr
>>
>> Jonas
>>