0

I’m implementing SDO communication using SOEM and SOES libraries but I’m having some problems, could someone help me? To go into detail I’m using a Pc with Ubuntu as Ethercat master and an ethercat slave which uses a LAN9252. The slave is connected to a pc with window 10 which is used to load the SOES program and once the software has been loaded, it remains connected in debug mode for checking the variables. I have a problem with the SDO communication. When i run, on my master, the slaveinfo.c program (this program is contained in the SOEM library) from command window with the optional parameter -sdo i obtain the following results:

SOEM (Simple Open EtherCAT Master) Slaveinfo Starting slaveinfo ec_init on enp2s0 succeeded. 1 slaves found and configured. Calculated workcounter 3

Slave:1 Name: SSC_Device Output size: 1024bits Input size: 1024bits State: 4 Delay: 0[ns] Has DC: 1 DCParentport:0 Activeports:1.0.0.0 Configured address: 1001 Man: 00000afc ID: 00010000 Rev: 00000001 SM0 A:1000 L: 128 F:00010026 Type:1 SM1 A:1200 L: 128 F:00010022 Type:2 SM2 A:1400 L: 128 F:00010064 Type:3 SM3 A:1600 L: 128 F:00010020 Type:4 FMMU0 Ls:00000000 Ll: 128 Lsb:0 Leb:7 Ps:1400 Psb:0 Ty:02 Act:01 FMMU1 Ls:00000080 Ll: 128 Lsb:0 Leb:7 Ps:1600 Psb:0 Ty:01 Act:01 FMMUfunc 0:1 1:2 2:0 3:0 MBX length wr: 128 rd: 128 MBX protocols : 04 CoE details: 0d FoE details: 00 EoE details: 00 SoE details: 00 Ebus current: 0[mA] only LRD/LWR:0 ec_slave[cnt].mbx_proto: 04 printSDO: 1 End slaveinfo, close socket End program

The problem is that i don’t see the PDO mapping in according to CoE. I checked the exchange of packages between master and slave, i saw that the master send a request and my slave receive it , then the slave send the response request but the master doesn’t receive it . From the slave debugger I checked the SM_status (Sync manager status SM1 0x080d) that is the register that indicate if the mailmox is full and if the master can read and i saw that this register doesn’t change value. Someone know what is the problem? the eeprom memory need to have a particular structure to allow a correct SDO comunication? Or maybe is only a slave software problem?

Thanks.

2 Answers2

0

call the slaveinfo programm with the parameter -map

Cheers Marco

  • 1
    Welcome to Stack Overflow. This isn't an answer. This is a comment. You should post these under the question as a comment. – Andy Jul 06 '20 at 18:02
  • Hi! yes i used also -map but it doesn't work anyway – AlexCorrado Jul 07 '20 at 15:23
  • 2 things: 1. your print out looks a bit strange "ec_slave[cnt].mbx_proto: 04 printSDO: 1" is this something you have added? 2. the slaveinfo program should print out "PDO mapping according to COE" even when there is something wrong with the master<->slave communication, only by given program argument -map. Why this is not shown in your post? This points to a problem on the master side. – Marco Walter Jul 08 '20 at 11:21
0

sudo ./slaveinfo eth2 -map

SOEM (Simple Open EtherCAT Master)
Slaveinfo
Starting slaveinfo
ec_init on eth2 succeeded.
1 slaves found and configured.
Calculated workcounter 3

Slave:1
 Name:Servo Drives
 Output size: 88bits
 Input size: 88bits
 State: 4
 Delay: 0[ns]
 Has DC: 1
 DCParentport:0
 Activeports:1.0.0.0
 Configured address: 1001
 Man: 0000029c ID: 02c30001 Rev: 00000003
 SM0 A:1000 L: 128 F:00010026 Type:1
 SM1 A:1400 L: 128 F:00010022 Type:2
 SM2 A:1800 L:  11 F:00010064 Type:4
 SM3 A:1c00 L:  11 F:00010020 Type:3
 FMMU0 Ls:00000000 Ll:  11 Lsb:0 Leb:7 Ps:1c00 Psb:0 Ty:02 Act:01
 FMMU1 Ls:0000000b Ll:  11 Lsb:0 Leb:7 Ps:1800 Psb:0 Ty:01 Act:01
 FMMUfunc 0:1 1:2 2:3 3:0
 MBX length wr: 128 rd: 128 MBX protocols : 0e
 CoE details: 2f FoE details: 01 EoE details: 01 SoE details: 00
 Ebus current: 0[mA]
 only LRD/LWR:0
PDO mapping according to CoE :
  SM2 inputs
     addr b   index: sub bitl data_type    name
Number of subindex: 4
  [0x000B.0] 0x6040:0x00 0x10 UNSIGNED16   Control Word
  [0x000D.0] 0x607A:0x00 0x20 INTEGER32    Position set-point
  [0x0011.0] 0x60FF:0x00 0x20 INTEGER32    Velocity set-point
  [0x0015.0] 0x6060:0x00 0x08 INTEGER8     Operation mode
  SM3 outputs
     addr b   index: sub bitl data_type    name
Number of subindex: 4
  [0x0000.0] 0x6041:0x00 0x10 UNSIGNED16   Status Word
  [0x0002.0] 0x6064:0x00 0x20 INTEGER32    Actual position
  [0x0006.0] 0x606C:0x00 0x20 INTEGER32    Actual velocity
  [0x000A.0] 0x6061:0x00 0x08 INTEGER8     Operation mode display
End slaveinfo, close socket
End program
Steve
  • 3
  • 4