I'm running linuxcnc with EtherCAT support installed according to Nico2017's instructions
here
. So, running bleeding edge linuxcnc-2.9.0~pre0 and latest linuxcnc-ethercat with latest commit from 2019-11-21 - "Add omron g5 support".
I have an Omron G5/R88D-KN04H-ECT servo drive. It is detected by 'ethercat slaves':
Code:
$ ethercat slaves
0 0:0 PREOP + R88D-KN04H-ECT G5 Series ServoDrive/Motor
I can read e.g. "Position actual value":
Code:
$ ethercat upload -p 0 -t int32 0x6064 0x0
0xfffde579 -137863
However the drive will not enter OP mode when I run these halrun commands:
Code:
loadrt threads name1=master period1=1000000
loadusr -W lcec_conf linuxcnc/configs/ecat-test.xml
loadrt lcec
addf lcec.read-all master
addf lcec.write-all master
start
... and the motor position is also not read correctly in HAL:
Code:
halcmd: getp lcec.0.0.pos-fb-raw
0
My ecat-test.xml file looks like this:
Code:
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">
<slave idx="0" type="OmrG5"/>
</master>
</masters>
/var/log/messages looks like this after execulting the halrun commands above:
Code:
Jun 4 20:38:18 debian kernel: [ 2379.133439] EtherCAT: Requesting master 0...
Jun 4 20:38:18 debian kernel: [ 2379.133443] EtherCAT: Successfully requested master 0.
Jun 4 20:38:18 debian kernel: [ 2379.133566] EtherCAT 0: Domain0: Logical address 0x00000000, 40 byte, expected working counter 3.
Jun 4 20:38:18 debian kernel: [ 2379.133568] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 40 byte, type LRW at 0000000045db7704.
Jun 4 20:38:18 debian kernel: [ 2379.134668] EtherCAT 0: Master thread exited.
Jun 4 20:38:18 debian kernel: [ 2379.134671] EtherCAT 0: Starting EtherCAT-OP thread.
Jun 4 20:38:18 debian kernel: [ 2379.134743] EtherCAT WARNING 0: 1 datagram UNMATCHED!
Any idea what I'm doing wrong?