Category: EtherCAT
Good day
I am currently trying to configure my linuxcnc to communicate with an RTelligent (Shenzhen Ruitech) RS750E AC Servo Drive.
So far, I think I've correctly compiled an ethercat-conf.xml file for the single slave (for now) (from here) but am struggling with any further steps. I can successfully read registers (ie cia-controlword) and things like that, I can attempt to write them - by setting pins eg setp lcec.0.0.cia-controlword 15, but there is no change in cia-statusword. The same applies for opmode.
Additionally, my drive never seems to exit PREOP. sudo ethercat states -p0 OP doesn't change state from PREOP. I figure that there is something I might need to do with registers, either in a specific order, or through the PC software (RSConfigurator), but the latter is rather confusing and i've had no success attempting such. I can change it to and from INIT (without errors) to PREOP (without errors), but as soon as I try SAFEOP or OP it stalls back to PREOP and has an error flag. I assume this means my XML might be wrong.
I've also attempted to set up my ethercat.hal and changed the joint/axis info in my axis-edited.ini, but still no change occurs on the drive or servo.
I cannot find any documentation on these AC servo drives from RTelligent here, but I will also be sending their support a ticket to see if they can help me. The appropriate files are below:
ethercat-conf.xml:
[code]<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000">
<slave idx="0" type="generic" vid="00000A88" pid="0a880013" configPdos="tru>
<!-- Joint 0 -->
<syncManager idx="0" dir="out">
</syncManager>
<syncManager idx="1" dir="out">
</syncManager>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword">
<pdoEntry idx="607a" subIdx="00" bitLen="32" halPin="target-position">
<pdoEntry idx="60b8" subIdx="00" bitLen="16" halPin="touchprobefuncti>
</pdo>
<pdo idx="1601">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword0>
<pdoEntry idx="607a" subIdx="00" bitLen="32" halPin="target-position0>
<pdoEntry idx="6081" subIdx="00" bitLen="32" halPin="target-velocity">
<pdoEntry idx="6083" subIdx="00" bitLen="32" halPin="target-accel" ha>
<pdoEntry idx="6084" subIdx="00" bitLen="32" halPin="target-decel" ha>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType=">
</pdo>
<pdo idx="1602">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="drivecontrol2" h>
<pdoEntry idx="6083" subIdx="00" bitLen="32" halPin="accelcommand2" h>
<pdoEntry idx="6084" subIdx="00" bitLen="32" halPin="decelcommand2" h>
<pdoEntry idx="60ff" subIdx="00" bitLen="32" halPin="targetvelocomman>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="modeofoperation2">
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="603f" subIdx="00" bitLen="16" halPin="errorcode" halTy>
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" >
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" h>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position">
<pdoEntry idx="60b9" subIdx="00" bitLen="16" halPin="touchprobestat" >
<pdoEntry idx="60ba" subIdx="00" bitLen="32" halPin="touchprobe1pos" >
<pdoEntry idx="60fd" subIdx="00" bitLen="32" halPin="digitalinputs" h>
</pdo>
<pdo idx="1a01">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="drivecontroltx1">
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="modeofoperationtx>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-velocity">
<pdoEntry idx="60fd" subIdx="00" bitLen="32" halPin="digitalinputs1" >
</pdo>
</syncManager>
<dcConf assignActivate="300" sync0Cycle="1"/>
</slave>
</master>
</masters>
a modified ethercat-conf, with the same results:
[code]<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000">
<slave idx="0" type="generic" vid="0x00000A88" pid="0x0A880013" configPdos="true">
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1A00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position"/>
</pdo>
</syncManager>
<dcConf assignActivate="300" sync0Cycle="1"/>
</slave>
</master>
</masters>
ethercat.hal:
[code]loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec
addf lcec.read-all servo-thread
addf lcec.write-all servo-thread
setp lcec.0.0.opmode 8
setp lcec.0.0.cia-controlword 15
setp lcec.0.0.opmode 8
[/code][/code][/code]