Hi Olivier,<br><br>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.<br>
<br>Regards,<br>Jun<br>
<br><div class="gmail_quote">On Tue, Nov 20, 2012 at 4:54 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>
You 're right I'm not familiar with CiA 402, and with ethercat,
and with linux :p<br>
I found the sequence in manual, but the slave don't take the <span>READY_TO_SWITCH_ON
by setting </span><span><span>controlword</span> = 0x06...<br>
When i'm in OP mode i try to write 0x06 and this do nothing...
<br>
If i make the sequence step by step via USB no problem.<br>
Thanks for your help.<br>
Best Regards <br>
Oliver Tempier<br>
</span>
<pre cols="72"></pre>
Le 20/11/2012 13:55, Jun Yuan a écrit :<br>
</div><div><div>
<blockquote type="cite">Hi Olivier,<br>
<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>Basically, the sequence to enable a CiA 402 driver would be
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 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 clear="all">
<br>
-- <br>
Jun Yuan<br>
[Aussprache: Djün Üän]<br>
<br>
Robotics Technology Leaders GmbH<br>
Am Loferfeld 58, D-81249 München<br>
Tel: <a href="tel:%2B49%2089%20189%200465%2024" value="+4989189046524" target="_blank">+49 89
189 0465 24</a><br>
Mobile: <a href="tel:%2B49%20176%202176%205238" value="+4917621765238" target="_blank">+49 176
2176 5238</a><br>
Fax: <a href="tel:%2B49%2089%20189%200465%2011" value="+4989189046511" target="_blank">+49 89
189 0465 11</a><br>
mailto: <a href="mailto:j.yuan@rtleaders.com" target="_blank">j.yuan@rtleaders.com</a><br>
<br>
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ü.<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Jun Yuan<br>
[Aussprache: Djün Üän]<br>
<br>
Robotics Technology Leaders GmbH<br>
Am Loferfeld 58, D-81249 München<br>
Tel: <a href="tel:%2B49%2089%20189%200465%2024" value="+4989189046524" target="_blank">+49 89 189 0465 24</a><br>
Mobile: <a href="tel:%2B49%20176%202176%205238" value="+4917621765238" target="_blank">+49 176 2176 5238</a><br>
Fax: <a href="tel:%2B49%2089%20189%200465%2011" value="+4989189046511" target="_blank">+49 89 189 0465 11</a><br>
mailto: <a href="mailto:j.yuan@rtleaders.com" target="_blank">j.yuan@rtleaders.com</a><br>
<br>
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ü.<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Jun Yuan<br>[Aussprache: Djün Üän]<br><br>Robotics Technology Leaders GmbH<br>Am Loferfeld 58, D-81249 München<br>Tel: <a href="tel:%2B49%2089%20189%200465%2024" value="+4989189046524" target="_blank">+49 89 189 0465 24</a><br>
Mobile: <a href="tel:%2B49%20176%202176%205238" value="+4917621765238" target="_blank">+49 176 2176 5238</a><br>
Fax: <a href="tel:%2B49%2089%20189%200465%2011" value="+4989189046511" target="_blank">+49 89 189 0465 11</a><br>mailto: <a href="mailto:j.yuan@rtleaders.com" target="_blank">j.yuan@rtleaders.com</a><br><br>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ü.<br>