Hi There,
I have been trying to setup a "CAT-IO" ethercat IO board, it's not unlike the DIEWU DIO board RodW made a config for.
Using the rpi-4-debian-bookworm-6.1.54-rt15-arm64-ext4-2023-11-17-1731 image, worked well.
Ethercat is up and running, ethecat-conf.xml seems to be accepted, I have only set up the outputs so far as I'm trying to do it piecemeal to reduce complexity.
Issue is, while I can see the pins in halshow, and I can set them - the outputs don't actually turn on at the IO device.
dmesg shows:
[18011.371947] EtherCAT: Requesting master 0...
[18011.371968] EtherCAT: Successfully requested master 0.
[18011.372513] EtherCAT 0: Domain0: Logical address 0x00000000, 42 byte, expected working counter 1.
[18011.372518] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 42 byte, type LWR.
[18011.372664] EtherCAT 0: Master thread exited.
[18011.372673] EtherCAT 0: Starting EtherCAT-OP thread.
I also don't see it going OP in $ethercat slaves, is it supposed to show OP here after linuxcnc is started and dmseg shows 'Starting EtherCAT-OP thread' as above?
cnc@CNC:~$ ethercat slaves
0 0:0 PREOP + IMC IO MODEL with EtherCAT
Here is The ethercat-conf.xml - sadly I cannot find anywhere any documentation on the spec for this document, so some is a guess, parts I'm unsure about are in
bold.
<!--
Slave0 EtherCat IO Card "CAT-IO"
www.aliexpress.us/item/3256805154534518....pt=glo2usa4itemAdapt
-->
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">
<slave idx="0" type="generic" vid="0x00090588" pid="0x00109252"
configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="3" dir="out">
<pdo idx="1600">
<!-- Digtial Outputs -->
<pdoEntry idx="2300" subIdx="01" bitLen="16" halType="complex">
<complexEntry bitLen="1" halPin="out-01" halType="bit"/>
<complexEntry bitLen="1" halPin="out-02" halType="bit"/>
<complexEntry bitLen="1" halPin="out-03" halType="bit"/>
<complexEntry bitLen="1" halPin="out-04" halType="bit"/>
<complexEntry bitLen="1" halPin="out-05" halType="bit"/>
<complexEntry bitLen="1" halPin="out-06" halType="bit"/>
<complexEntry bitLen="1" halPin="out-07" halType="bit"/>
<complexEntry bitLen="1" halPin="out-08" halType="bit"/>
<complexEntry bitLen="1" halPin="out-09" halType="bit"/>
<complexEntry bitLen="1" halPin="out-10" halType="bit"/>
<complexEntry bitLen="1" halPin="out-11" halType="bit"/>
<complexEntry bitLen="1" halPin="out-12" halType="bit"/>
<complexEntry bitLen="1" halPin="out-13" halType="bit"/>
<complexEntry bitLen="1" halPin="out-14" halType="bit"/>
<complexEntry bitLen="1" halPin="out-15" halType="bit"/>
<complexEntry bitLen="1" halPin="out-16" halType="bit"/>
</pdoEntry>
</pdo>
</syncManager>
</slave>
</master>
</masters>
Im just testing it in a simple my-mill sim setup, that I have added the lcec lines to:
Top of my-mill.hal file:
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec
loadrt sim_parport names=parport.0
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
loadrt pwmgen output_type=1
Code:
[code]I'm sorry to ask whats likely a simple question - I have tried for a few days and read everything I can before coming here to get help!
Can anyone pick the issue with my setup?
[/code]