[etherlab-users] Slave RxPDOs exchange problem
Jun Yuan
j.yuan at rtleaders.com
Tue Nov 20 14:16:46 CET 2012
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.
Generally, the sequence to enable a CiA 402 driver would be something 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
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20121120/0d25173d/attachment-0005.htm>
More information about the Etherlab-users
mailing list