<DIV> Hello,every!</DIV>
<DIV>I have used rtdm interface of ethercat master(version 1.5.2) and created an easy example:</DIV>
<DIV>The source code is:</DIV>
<DIV>#include "ecrt.h"</DIV>
<DIV>int main(void)</DIV>
<DIV>{</DIV>
<DIV> static ec_master_t *master = NULL;</DIV>
<DIV> static ec_master_state_t ms = {};</DIV>
<DIV> printf("Start requesting master...\n);</DIV>
<DIV> master = ecrt_request_master(0);</DIV>
<DIV> if(!master)</DIV>
<DIV> return -1;</DIV>
<DIV> ecrt_master_state(master,&ms);</DIV>
<DIV> ecrt_release_master(master);</DIV>
<DIV> </DIV>
<DIV> return 0;</DIV>
<DIV>}</DIV>
<DIV><FONT color=#000000>I compiled this example with lib ethercat_rtdm and run it, but got following error info:</FONT></DIV>
<DIV><FONT color=#ff00ff>Start requesting master...</FONT></DIV>
<DIV><FONT color=#ff00ff>Failed to get master state: Inappropriate ioctl for device</FONT></DIV>
<DIV>and "dmesg" info:</DIV>
<DIV><FONT color=#ff00ff>[ 1763.160719] EtherCAT: Requesting master 0...<BR>[ 1763.160730] EtherCAT: Successfully requested master 0.<BR>[ 1763.160736] RTDM: assertion failed at /rtai-3.9/rtai-3.9/addons/rtdm/../rtdm/rtdm_driver.h:574 (CONTEXT_IS_LOCKED(context))<BR>[ 1763.160921] EtherCAT 0: Releasing master...<BR>[ 1763.160927] EtherCAT 0: Released.</FONT></DIV>
<DIV><FONT color=#ff00ff></FONT> </DIV>
<DIV><FONT color=#000000>Anyone has occur such problem,may you give me some suggestions?</FONT></DIV>
<DIV>Thank you in advance!</DIV>
<DIV> </DIV>
<DIV> </DIV>