[etherlab-users] Slave RxPDOs exchange problem

Jun Yuan j.yuan at rtleaders.com
Tue Nov 20 20:41:23 CET 2012


Hi Olivier,

can you execute the command 'ethercat slaves -v' in terminal? Maybe you've
got a driver with 'Enable notLRW: yes', which means the driver doesn't
support LRW command. In that case, you will need to split your RxPDOs and
TxPDOSs into two different domains.

Regards,
Jun

On Tue, Nov 20, 2012 at 4:54 PM, Olivier Tempier
<olivier.tempier at lirmm.fr>wrote:

>  Hi Jun,
> You 're right I'm not familiar with CiA 402, and with ethercat, and with
> linux :p
> I found the sequence in manual, but the slave don't take the READY_TO_SWITCH_ON
> by setting controlword = 0x06...
> When i'm in OP mode i try to write  0x06 and this do nothing...
> If i make the sequence step by step via USB no problem.
> Thanks for your help.
> Best Regards
> Oliver Tempier
>
> Le 20/11/2012 13:55, Jun Yuan a écrit :
>
> Hi Olivier,
>
> It seems you are not familiar with CiA 402, which your driver is using.
> The ethercat master will not enable your driver automatically, it is your
> job to do that.
>
> Does your driver have some manuals for CoE CiA402? Search for the
> instruction for the controlword 0x6040 and the statusword 0x6041 to see how
> to turn your driver on.  Implement it in your code according to the
> CiA402 document.
>
> Basically, the sequence to enable a CiA 402 driver would be like following:
> 1) If the slave is in SWITCH_ON_DISABLED status, it needs to get
> READY_TO_SWITCH_ON first by setting controlword = 0x06;
> 2) when your driver is READY_TO_SWITCH_ON, setting controlword to 0x07 to
> switch it on.
> 3) And when it has the status SWITCHED_ON, set 0x0F to the controlword will
> enable Operation. After that your driver should be enabled.
>
> Regards,
> Jun
>
>
> On Tue, Nov 20, 2012 at 12:21 PM, Olivier Tempier <
> olivier.tempier at lirmm.fr> wrote:
>
>>  Hi Jun,
>> thanks for your answer.
>>
>>
>> >well, can you specify the meaning of "can't read/write RxPDOS"?
>>  I change value with usb cable for example, i enable the driver and the
>> Control_World value change and i enter 500 in torque value. The motor
>> turn...
>> I try to read Control_World via ethercat. It always stay to 0x00 and i
>> try to enter 0 in torque register  via ethercat to stop the motor and the
>> value never change and stay to 500...
>> It's why i say that i can't read or write RxPDOS.
>> With TXPDOS, i have the same value with ethercat and via USB interface.
>> And i don't understand why...
>>
>>
>> >So you know how to write a RXPDO. Everything look fine. I didn't see you
>> write any other RxPDOs, so why did you say you can't read/write them? Where
>> is exactly the problem?
>>  Yes, i think i understand how to write or read RXPDO but my code have no
>> effect on the driver's register... I have no error but nothing happen... :(
>>
>> I hoped to have been more clear about my problem
>> Best regards,
>> Oliver Tempier
>>
>> Le 20/11/2012 12:02, Jun Yuan a écrit :
>>
>> Hi Olivier,
>>
>> well, can you specify the meaning of "can't read/write RxPDOS"?
>>
>> in your code, you read the EPOS3_0_Control_Word, which shows 0x00. It
>> looks fine, as you didnot set the value to anything else. So you CAN read
>> RxPDO EPOS3_0_Control_Word. And by default it is 0x00. What did you expect?
>>
>> printk(KERN_INFO PFX "RxPDOs********************************************************************* \n");
>> status=EC_READ_U16(domain1_pd + EPOS3_0_Control_Word);
>> printk(KERN_INFO PFX "Robotics => Cyclic_task=>EPOS3_0 Control Word = %d \n",status);
>>
>>
>> And you've tried to set EPOS3_0_Target_Torque to 0,
>>
>> EC_WRITE_S16(domain1_pd + EPOS3_0_Target_Torque,0);
>>
>> So you know how to write a RXPDO. Everything look fine. I didn't see you
>> write any other RxPDOs, so why did you say you can't read/write them? Where
>> is exactly the problem?
>>
>> Best Regards,
>> Jun
>>
>> On Tue, Nov 20, 2012 at 10:40 AM, Olivier Tempier <
>> olivier.tempier at lirmm.fr> wrote:
>>
>>> Hello,
>>> I try to use an maxon EPOS3 driver with igh ethercat library.
>>> I wrote a test code in c, all seems ok. I don't see any message error in
>>> debug file.
>>> But i can't read/write RxPDOS and i don't see why... I have no problem
>>> to read TXPDOs...
>>> I join debug file and my source file.
>>> I'm on this problem for a week, i'm starting to go crazy :p
>>> Please, If someone could help me?
>>> Regards
>>> Oliver TEMPIER
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> etherlab-users mailing list
>>> etherlab-users at etherlab.org
>>> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>>>
>>>
>>
>>
>> --
>> Jun Yuan
>> [Aussprache: Djün Üän]
>>
>> Robotics Technology Leaders GmbH
>> Am Loferfeld 58, D-81249 München
>> Tel: +49 89 189 0465 24 <%2B49%2089%20189%200465%2024>
>> Mobile: +49 176 2176 5238 <%2B49%20176%202176%205238>
>> Fax: +49 89 189 0465 11 <%2B49%2089%20189%200465%2011>
>> mailto: j.yuan at rtleaders.com
>>
>> Umlautregel in der chinesischen Lautschrift Pinyin: Nach den Anlauten y,
>> j, q, und x wird u als ü ausgesprochen, z.B. yu => ü,  ju => dschü,  qu =>
>> tschü,  xu => schü.
>>
>>
>>
>
>
> --
> Jun Yuan
> [Aussprache: Djün Üän]
>
> Robotics Technology Leaders GmbH
> Am Loferfeld 58, D-81249 München
> Tel: +49 89 189 0465 24
> Mobile: +49 176 2176 5238
> Fax: +49 89 189 0465 11
> mailto: j.yuan at rtleaders.com
>
> Umlautregel in der chinesischen Lautschrift Pinyin: Nach den Anlauten y,
> j, q, und x wird u als ü ausgesprochen, z.B. yu => ü,  ju => dschü,  qu =>
> tschü,  xu => schü.
>
>
>


-- 
Jun Yuan
[Aussprache: Djün Üän]

Robotics Technology Leaders GmbH
Am Loferfeld 58, D-81249 München
Tel: +49 89 189 0465 24
Mobile: +49 176 2176 5238
Fax: +49 89 189 0465 11
mailto: j.yuan at rtleaders.com

Umlautregel in der chinesischen Lautschrift Pinyin: Nach den Anlauten y, j,
q, und x wird u als ü ausgesprochen, z.B. yu => ü,  ju => dschü,  qu =>
tschü,  xu => schü.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20121120/a88200d9/attachment-0003.htm>


More information about the Etherlab-users mailing list