Hi Olivier,<br><div class="gmail_quote"><br>It seems you are not familiar with CiA 402<span>, which your driver is using. The ethercat master will not enable your driver automatically, it is your job to do that.<br><br>Does your driver have some manuals for CoE </span><span><span>CiA402</span>? 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 </span><span> according to the CiA402 document</span>.<br>
<br><span>Generally, the sequence to enable a CiA 402 driver would be something like following:<br>1) If the slave is in SWITCH_ON_DISABLED status, it needs to get READY_TO_SWITCH_ON first by setting </span><span><span>controlword</span> = 0x06;<br>
2) when your driver is READY_TO_SWITCH_ON, setting controlword to 0x07 to switch it on.<br>3) And when it has the status SWITCHED_ON, set 0x0F to </span><span><span>the controlword </span>will enable Operation. After that your driver should be enabled.
<br><br>Regards,<br>Jun<br>
</span><div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 20, 2012 at 12:21 PM, Olivier Tempier <span dir="ltr"><<a href="mailto:olivier.tempier@lirmm.fr" target="_blank">olivier.tempier@lirmm.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Jun,<br>
thanks for your answer.<div><br>
<br>
>well, can you specify the meaning of "can't read/write
RxPDOS"?<br></div>
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...<br>
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...<br>
It's why i say that i can't read or write RxPDOS.<br>
With TXPDOS, i have the same value with ethercat and via USB
interface.<br>
And i don't understand why...<div><br>
<br>
>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? <br></div>
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... :(<br>
<br>
<span>I hoped</span> <span>to have been
more</span> <span>clear</span> about my problem<br>
Best regards,<br>
Oliver Tempier<br>
<br>
Le 20/11/2012 12:02, Jun Yuan a écrit :<br>
</div><div><div>
<blockquote type="cite">Hi Olivier,<br>
<br>
well, can you specify the meaning of "can't read/write RxPDOS"?<br>
<br>
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?<br>
<pre>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);
</pre>
And you've tried to set EPOS3_0_Target_Torque to 0,<br>
<pre>EC_WRITE_S16(domain1_pd + EPOS3_0_Target_Torque,0);</pre>
<div class="gmail_extra">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? <br>
<br>
Best Regards,<br>
Jun <br>
<br>
<div class="gmail_quote">On Tue, Nov 20, 2012 at 10:40 AM,
Olivier Tempier <span dir="ltr"><<a href="mailto:olivier.tempier@lirmm.fr" target="_blank">olivier.tempier@lirmm.fr</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hello,<br>
I try to use an maxon EPOS3 driver with igh ethercat
library.<br>
I wrote a test code in c, all seems ok. I don't see any
message error in debug file.<br>
But i can't read/write RxPDOS and i don't see why... I have
no problem to read TXPDOs...<br>
I join debug file and my source file.<br>
I'm on this problem for a week, i'm starting to go crazy :p<br>
Please, If someone could help me?<br>
Regards<br>
Oliver TEMPIER<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
etherlab-users mailing list<br>
<a href="mailto:etherlab-users@etherlab.org" target="_blank">etherlab-users@etherlab.org</a><br>
<a href="http://lists.etherlab.org/mailman/listinfo/etherlab-users" target="_blank">http://lists.etherlab.org/mailman/listinfo/etherlab-users</a><br>
<br>
</blockquote>
</div>
<br>
<br></div></blockquote></div></div></div></blockquote></div></div></div></div></div><br>