Getting basic communications working with a leadshine CS3E-D1008

More
03 Dec 2022 13:50 #258425 by petervg
I just installed linuxcnc 2.10.0 (compiled from source) and successfully installed ethercat thanks to the sticky post " Ethercat installation from repositories - how to step by step " by rodw. I was able to get all the way to the end where a test is done and this seems to work:

petervg@LinuxcncEthercat:~/dev/linuxcnc-cia402$ halcmd loadusr -W lcec_conf ethercat-conf.xml
petervg@LinuxcncEthercat:~/dev/linuxcnc-cia402$ halcmd show pin lcec
Component Pins:
Owner   Type  Dir         Value  Name
     4  u32   OUT    0x00000001  lcec.conf.master-count
     4  u32   OUT    0x00000004  lcec.conf.slave-count

Next I tried to get the vendor and product ID from the drive (a leadshine CS3E-D1008) which seems to work. The ID's are 0x00004321 and 0x00001200.

petervg@LinuxcncEthercat:~/linuxcnc/configs/sim.axis$ ethercat slaves -v
=== Master 0, Slave 0 ===
Device: Main
State: PREOP
Flag: +
Identity:
  Vendor Id:       0x00004321
  Product code:    0x00001200
  Revision number: 0x00000001
  Serial number:   0x00000000
DL information:
  FMMU bit operation: no
  Distributed clocks: yes, 64 bit
  DC system time transmission delay: 0 ns
Port  Type  Link  Loop    Signal  NextSlave  RxTime [ns]  Diff [ns]   NextDc [ns]
   0  MII   up    open    yes             -   3083336620           0           0
   1  MII   down  closed  no              -            -           -           -
   2  N/A   down  closed  no              -            -           -           -
   3  N/A   down  closed  no              -            -           -           -
Mailboxes:
  Bootstrap RX: 0x1000/128, TX: 0x1100/128
  Standard  RX: 0x1000/64, TX: 0x1100/64
  Supported protocols: CoE, FoE
General:
  Group: Close Loop Stepper Drive
  Image name:
  Order number: CS3E-D1008
  Device name: CS3E-D1008(COE)
  CoE details:
    Enable SDO: yes
    Enable SDO Info: no
    Enable PDO Assign: yes
    Enable PDO Configuration: yes
    Enable Upload at startup: no
    Enable SDO complete access: no
  Flags:
    Enable SafeOp: no
    Enable notLRW: no
  Current consumption: 0 mA

So I changed the ID's in rod's xml file ( github.com/rodw-au/linuxcnc-cia402/blob/main/ethercat-conf.xml ) like this:
<slave idx="0" type="generic" vid="00004321" pid="00001200" configPdos="true">

But when I try "halcmd show pin lcec", I keep getting the same output while I was expecting to be able to see a little more details. Not sure if this is relevant, but I think either this just shows some configuration without communicating with the drive, or I'm not understanding this correctly yet. If I unplug the drive, the output stays the same.

I did try unloading and reloading the lcec component (halcmd unloadusr lcec_conf) and reloading, but no change.

What do I need to do to test if linuxcnc can at least "talk" to the drive without doing a lot of configuration? I'm still learning ethercat, and I'm having some trouble getting linuxcnc to start. This way I'm trying to figure out if the problem is in the sourcecode I compiled or in an error in my own configuration.







 

Please Log in or Create an account to join the conversation.

More
03 Dec 2022 17:04 #258441 by db1981
linuxcnc-ethercat consits of two components.

lcec_conf userspace component for configuring the setup and telling the master the config from parsing the xml file.

and the realtime component lcec for starting the ethercat thread and establishing communication.

to get any pins or slave communication you have to load the realtime part too.
The following user(s) said Thank You: petervg

Please Log in or Create an account to join the conversation.

Time to create page: 0.221 seconds
Powered by Kunena Forum