Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensor not entering OP state #251

Closed
dgehri opened this issue Feb 5, 2019 · 10 comments
Closed

Sensor not entering OP state #251

dgehri opened this issue Feb 5, 2019 · 10 comments

Comments

@dgehri
Copy link

dgehri commented Feb 5, 2019

Hi,

I know that this sounds similar to many other posts here. But I've tried hard to find a solution and could use some help.

I'm trying to bring a force sensor into OP mode, but of course it fails with "StatusCode= 1e : Invalid input configuration". Unlike similar issues in this forum, the data dumped by slaveinfo looks good to me:

C:\slaveinfo.exe \Device\NPF_{024D720E-5DFD-4E16-8619-C6076D023768} -map
SOEM (Simple Open EtherCAT Master)
Slaveinfo
Starting slaveinfo
ec_init on \Device\NPF_{024D720E-5DFD-4E16-8619-C6076D023768} succeeded.
1 slaves found and configured.
Calculated workcounter 3
Not all slaves reached safe operational state.
Slave 1 State=12 StatusCode=  1e : Invalid input configuration

Slave:1
 Name:ATI EtherCAT F/T Sensor
 Output size: 64bits
 Input size: 224bits
 State: 18
 Delay: 0[ns]
 Has DC: 1
 DCParentport:0
 Activeports:1.0.0.0
 Configured address: 1001
 Man: 00000732 ID: 26483052 Rev: 00010111
 SM0 A:1000 L: 128 F:00010026 Type:1
 SM1 A:1400 L: 128 F:00010022 Type:2
 SM2 A:1800 L:   8 F:00010064 Type:3
 SM3 A:1c00 L:  28 F:00010020 Type:4
 FMMU0 Ls:00000000 Ll:   8 Lsb:0 Leb:7 Ps:1800 Psb:0 Ty:02 Act:01
 FMMU1 Ls:00000008 Ll:  28 Lsb:0 Leb:7 Ps:1c00 Psb:0 Ty:01 Act:01
 FMMUfunc 0:1 1:2 2:3 3:0
 MBX length wr: 128 rd: 128 MBX protocols : 0c
 CoE details: 23 FoE details: 01 EoE details: 00 SoE details: 00
 Ebus current: 0[mA]
 only LRD/LWR:0
PDO mapping according to CoE :
  SM2 outputs
     addr b   index: sub bitl data_type    name
  [0x0000.0] 0x7010:0x01 0x20 UNSIGNED32   Control 1
  [0x0004.0] 0x7010:0x02 0x20 UNSIGNED32   Control 2
  SM3 inputs
     addr b   index: sub bitl data_type    name
  [0x0008.0] 0x6000:0x01 0x20 INTEGER32    Fx/Gage0
  [0x000C.0] 0x6000:0x02 0x20 INTEGER32    Fy/Gage1
  [0x0010.0] 0x6000:0x03 0x20 INTEGER32    Fz/Gage2
  [0x0014.0] 0x6000:0x04 0x20 INTEGER32    Tx/Gage3
  [0x0018.0] 0x6000:0x05 0x20 INTEGER32    Ty/Gage3
  [0x001C.0] 0x6000:0x06 0x20 INTEGER32    Tz/Gage3
  [0x0020.0] 0x6010:0x00 0x20 UNSIGNED32   SubIndex 000
  [0x0024.0] 0x6020:0x00 0x20 UNSIGNED32   SubIndex 000
End slaveinfo, close socket
End program

I've also attached the XML file for this device. I'm trying to use the "simple_test" example code, more or less as is, to enter OP mode. As you probably can tell, I'm not an expert in this domain, and any hint to what would be needed to fix this would be appreciated!

-- Daniel

SDO:

>slaveinfo.exe \Device\NPF_{024D720E-5DFD-4E16-8619-C6076D023768} -sdo
SOEM (Simple Open EtherCAT Master)
Slaveinfo
Starting slaveinfo
ec_init on \Device\NPF_{024D720E-5DFD-4E16-8619-C6076D023768} succeeded.
1 slaves found and configured.
Calculated workcounter 3
Not all slaves reached safe operational state.
Slave 1 State=12 StatusCode=  1e : Invalid input configuration

Slave:1
 Name:ATI EtherCAT F/T Sensor
 Output size: 64bits
 Input size: 224bits
 State: 18
 Delay: 0[ns]
 Has DC: 1
 DCParentport:0
 Activeports:1.0.0.0
 Configured address: 1001
 Man: 00000732 ID: 26483052 Rev: 00010111
 SM0 A:1000 L: 128 F:00010026 Type:1
 SM1 A:1400 L: 128 F:00010022 Type:2
 SM2 A:1800 L:   8 F:00010064 Type:3
 SM3 A:1c00 L:  28 F:00010020 Type:4
 FMMU0 Ls:00000000 Ll:   8 Lsb:0 Leb:7 Ps:1800 Psb:0 Ty:02 Act:01
 FMMU1 Ls:00000008 Ll:  28 Lsb:0 Leb:7 Ps:1c00 Psb:0 Ty:01 Act:01
 FMMUfunc 0:1 1:2 2:3 3:0
 MBX length wr: 128 rd: 128 MBX protocols : 0c
 CoE details: 23 FoE details: 01 EoE details: 00 SoE details: 00
 Ebus current: 0[mA]
 only LRD/LWR:0
 CoE Object Description found, 26 entries.
 Index: 1000 Datatype: 0007 Objectcode: 07 Name: Device type
  Sub: 00 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 000
          Value :0x00001389 5001
 Index: 1001 Datatype: 0005 Objectcode: 07 Name: Error register
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x00 0
 Index: 1008 Datatype: 0009 Objectcode: 07 Name: Device name
  Sub: 00 Datatype: 0009 Bitlength: 00b8 Obj.access: 0007 Name: SubIndex 000
          Value :ATI EtherCAT F/T Sensor
 Index: 1009 Datatype: 0009 Objectcode: 07 Name: Hardware version
  Sub: 00 Datatype: 0009 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 000
          Value :n.a.
 Index: 100a Datatype: 0009 Objectcode: 07 Name: Software version
  Sub: 00 Datatype: 0009 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 000
          Value :5.10
 Index: 1018 Datatype: 0023 Objectcode: 09 Name: Identity
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x04 4
  Sub: 01 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Vendor ID
          Value :0x00000732 1842
  Sub: 02 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Product code
          Value :0x26483052 642265170
  Sub: 03 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Revision
          Value :0x00010111 65809
  Sub: 04 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Serial number
          Value :0x00000000 0
 Index: 10f1 Datatype: 002a Objectcode: 09 Name: Error Settings
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x02 2
  Sub: 01 Datatype: 0007 Bitlength: 0020 Obj.access: 003f Name: Local Error Reaction
          Value :0x00000001 1
  Sub: 02 Datatype: 0007 Bitlength: 0020 Obj.access: 003f Name: Sync Error Counter Limit
          Value :0x00000004 4
 Index: 1601 Datatype: 0021 Objectcode: 09 Name: DO RxPDO-Map
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x02 2
  Sub: 01 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 001
          Value :0x70100120 1880097056
  Sub: 02 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 002
          Value :0x70100220 1880097312
 Index: 1802 Datatype: 002a Objectcode: 09 Name: TxPDO Parameter
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x09 9
  Sub: 07 Datatype: 0001 Bitlength: 0001 Obj.access: 0087 Name: TxPDOState
          Value :FALSE
  Sub: 09 Datatype: 0001 Bitlength: 0001 Obj.access: 0087 Name: TxPDO Toggle
          Value :FALSE
 Index: 1a00 Datatype: 0021 Objectcode: 09 Name: DI TxPDO-Map
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x08 8
  Sub: 01 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 001
          Value :0x60000120 1610613024
  Sub: 02 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 002
          Value :0x60000220 1610613280
  Sub: 03 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 003
          Value :0x60000320 1610613536
  Sub: 04 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 004
          Value :0x60000420 1610613792
  Sub: 05 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 005
          Value :0x60000520 1610614048
  Sub: 06 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 006
          Value :0x60000620 1610614304
  Sub: 07 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 007
          Value :0x60100020 1611661344
 Index: 1c00 Datatype: 0005 Objectcode: 08 Name: Sync manager type
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x04 4
  Sub: 01 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 001
          Value :0x01 1
  Sub: 02 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 002
          Value :0x02 2
  Sub: 03 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 003
          Value :0x03 3
  Sub: 04 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 004
          Value :0x04 4
 Index: 1c12 Datatype: 0006 Objectcode: 08 Name: RxPDO assign
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x01 1
  Sub: 01 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: SubIndex 001
          Value :0x1601 5633
 Index: 1c13 Datatype: 0006 Objectcode: 08 Name: TxPDO assign
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x01 1
  Sub: 01 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: SubIndex 001
          Value :0x1a00 6656
 Index: 1c32 Datatype: 0029 Objectcode: 09 Name: SM output parameter
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x20 32
  Sub: 01 Datatype: 0006 Bitlength: 0010 Obj.access: 000f Name: Synchronization Type
          Value :0x0000 0
  Sub: 02 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Cycle Time
          Value :0x00000000 0
  Sub: 04 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Synchronization Types supported
          Value :0x401e 16414
  Sub: 05 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Minimum Cycle Time
          Value :0x0007a120 500000
  Sub: 06 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Calc and Copy Time
          Value :0x00000000 0
  Sub: 08 Datatype: 0006 Bitlength: 0010 Obj.access: 003f Name: Get Cycle Time
          Value :0x0000 0
  Sub: 09 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Delay Time
          Value :0x00000000 0
  Sub: 0a Datatype: 0007 Bitlength: 0020 Obj.access: 003f Name: Sync0 Cycle Time
          Value :0x00000000 0
  Sub: 0b Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: SM-Event Missed
          Value :0x0000 0
  Sub: 0c Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Cycle Time Too Small
          Value :0x0000 0
  Sub: 20 Datatype: 0001 Bitlength: 0001 Obj.access: 0007 Name: Sync Error
          Value :FALSE
 Index: 1c33 Datatype: 0029 Objectcode: 09 Name: SM input parameter
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x20 32
  Sub: 01 Datatype: 0006 Bitlength: 0010 Obj.access: 000f Name: Synchronization Type
          Value :0x0000 0
  Sub: 02 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Cycle Time
          Value :0x00000000 0
  Sub: 04 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Synchronization Types supported
          Value :0x401e 16414
  Sub: 05 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Minimum Cycle Time
          Value :0x0007a120 500000
  Sub: 06 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Calc and Copy Time
          Value :0x00000000 0
  Sub: 08 Datatype: 0006 Bitlength: 0010 Obj.access: 003f Name: Get Cycle Time
          Value :0x0000 0
  Sub: 09 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Delay Time
          Value :0x00000000 0
  Sub: 0a Datatype: 0007 Bitlength: 0020 Obj.access: 003f Name: Sync0 Cycle Time
          Value :0x00000000 0
  Sub: 0b Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: SM-Event Missed
          Value :0x0000 0
  Sub: 0c Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Cycle Time Too Small
          Value :0x0000 0
  Sub: 20 Datatype: 0001 Bitlength: 0001 Obj.access: 0007 Name: Sync Error
          Value :FALSE
 Index: 2020 Datatype: 002a Objectcode: 09 Name: Tool Transform
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x06 6
  Sub: 01 Datatype: 0007 Bitlength: 0020 Obj.access: 033f Name: Rx
          Value :0x00000000 0
  Sub: 02 Datatype: 0007 Bitlength: 0020 Obj.access: 033f Name: Ry
          Value :0x00000000 0
  Sub: 03 Datatype: 0007 Bitlength: 0020 Obj.access: 033f Name: Rz
          Value :0x00000000 0
  Sub: 04 Datatype: 0007 Bitlength: 0020 Obj.access: 033f Name: Dx
          Value :0x00000000 0
  Sub: 05 Datatype: 0007 Bitlength: 0020 Obj.access: 033f Name: Dy
          Value :0x00000000 0
  Sub: 06 Datatype: 0007 Bitlength: 0020 Obj.access: 033f Name: Dz
          Value :0x00000000 0
 Index: 2040 Datatype: 002a Objectcode: 09 Name: Calibration
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x3e 62
  Sub: 01 Datatype: 0009 Bitlength: 0040 Obj.access: 0007 Name: Serial Number
          Value :FT25272
  Sub: 02 Datatype: 0009 Bitlength: 00f0 Obj.access: 0007 Name: Part Number
          Value :SI-580-20
  Sub: 03 Datatype: 0009 Bitlength: 0040 Obj.access: 0007 Name: Calibration Family
          Value :ECat
  Sub: 04 Datatype: 0009 Bitlength: 00f0 Obj.access: 0007 Name: Calibration Time
          Value :2018-07-26 04:00:00Z
  Sub: 05 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FxG0
          Value :0xfffff93f 4294965567
  Sub: 06 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FxG1
          Value :0xffffffef 4294967279
  Sub: 07 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FxG2
          Value :0x00001b76 7030
  Sub: 08 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FxG3
          Value :0xffff8ed2 4294938322
  Sub: 09 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FxG4
          Value :0x00000169 361
  Sub: 0a Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FxG5
          Value :0x00006f2b 28459
  Sub: 0b Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FyG0
          Value :0xffffe92c 4294961452
  Sub: 0c Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FyG1
          Value :0x00008003 32771
  Sub: 0d Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FyG2
          Value :0x00000bf1 3057
  Sub: 0e Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FyG3
          Value :0xffffbe7f 4294950527
  Sub: 0f Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FyG4
          Value :0x0000029a 666
  Sub: 10 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FyG5
          Value :0xffffc032 4294950962
  Sub: 11 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FzG0
          Value :0x0000a3cb 41931
  Sub: 12 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FzG1
          Value :0x00000316 790
  Sub: 13 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FzG2
          Value :0x00009d06 40198
  Sub: 14 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FzG3
          Value :0x000005ab 1451
  Sub: 15 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FzG4
          Value :0x00009d38 40248
  Sub: 16 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix FzG5
          Value :0x00000497 1175
  Sub: 17 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TxG0
          Value :0xffffffd2 4294967250
  Sub: 18 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TxG1
          Value :0x000000e6 230
  Sub: 19 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TxG2
          Value :0xfffffd81 4294966657
  Sub: 1a Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TxG3
          Value :0xffffff74 4294967156
  Sub: 1b Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TxG4
          Value :0x00000296 662
  Sub: 1c Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TxG5
          Value :0xffffff9e 4294967198
  Sub: 1d Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TyG0
          Value :0x00000309 777
  Sub: 1e Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TyG1
          Value :0x0000000d 13
  Sub: 1f Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TyG2
          Value :0xfffffe47 4294966855
  Sub: 20 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TyG3
          Value :0x000000bd 189
  Sub: 21 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TyG4
          Value :0xfffffe86 4294966918
  Sub: 22 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TyG5
          Value :0xffffff2f 4294967087
  Sub: 23 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TzG0
          Value :0x00000051 81
  Sub: 24 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TzG1
          Value :0xfffffe63 4294966883
  Sub: 25 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TzG2
          Value :0x00000048 72
  Sub: 26 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TzG3
          Value :0xfffffe58 4294966872
  Sub: 27 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TzG4
          Value :0x00000011 17
  Sub: 28 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Matrix TzG5
          Value :0xfffffe60 4294966880
  Sub: 29 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: Force Units
          Value :0x02 2
  Sub: 2a Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: Torque Units
          Value :0x03 3
  Sub: 2b Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Max Fx Counts
          Value :0x22921900 580000000
  Sub: 2c Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Max Fy Counts
          Value :0x22921900 580000000
  Sub: 2d Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Max Fz Counts
          Value :0x45243200 1160000000
  Sub: 2e Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Max Tx Counts
          Value :0x01312d00 20000000
  Sub: 2f Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Max Ty Counts
          Value :0x01312d00 20000000
  Sub: 30 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Max Tz Counts
          Value :0x01312d00 20000000
  Sub: 31 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Counts Per Force
          Value :0x000f4240 1000000
  Sub: 32 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: Counts Per Torque
          Value :0x000f4240 1000000
  Sub: 33 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Gain G0
          Value :0x036f 879
  Sub: 34 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Gain G1
          Value :0x0367 871
  Sub: 35 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Gain G2
          Value :0x0367 871
  Sub: 36 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Gain G3
          Value :0x036b 875
  Sub: 37 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Gain G4
          Value :0x0361 865
  Sub: 38 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Gain G5
          Value :0x0357 855
  Sub: 39 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Offset G0
          Value :0x7269 29289
  Sub: 3a Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Offset G1
          Value :0x770d 30477
  Sub: 3b Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Offset G2
          Value :0x73dc 29660
  Sub: 3c Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Offset G3
          Value :0x7168 29032
  Sub: 3d Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Offset G4
          Value :0x7542 30018
  Sub: 3e Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Offset G5
          Value :0x72a1 29345
 Index: 2060 Datatype: 002a Objectcode: 09 Name: Monitor Condition 1
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x03 3
  Sub: 01 Datatype: 0004 Bitlength: 0020 Obj.access: 033f Name: Threshold Value
          Value :0x00000000 0
  Sub: 02 Datatype: 0005 Bitlength: 0008 Obj.access: 033f Name: Axis
          Value :0x00 0
  Sub: 03 Datatype: 0001 Bitlength: 0001 Obj.access: 033f Name: CompareGreaterThan
          Value :FALSE
 Index: 2080 Datatype: 002a Objectcode: 09 Name: Diagnostic Readings
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x04 4
  Sub: 01 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: 6V Supply Sense
          Value :0x0b42 2882
  Sub: 02 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Thermistor
          Value :0x0000 0
  Sub: 03 Datatype: 0003 Bitlength: 0010 Obj.access: 0007 Name: VBridge Volts
          Value :0x4389 17289
  Sub: 04 Datatype: 0003 Bitlength: 0010 Obj.access: 0007 Name: VBridge Current
          Value :0xffffff75 -139
 Index: 2090 Datatype: 002a Objectcode: 09 Name: Version
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x03 3
  Sub: 01 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Major
          Value :0x0001 1
  Sub: 02 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Minor
          Value :0x0000 0
  Sub: 03 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Revision
          Value :0x0010 16
 Index: 6000 Datatype: 002a Objectcode: 09 Name: Reading Data
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x06 6
  Sub: 01 Datatype: 0004 Bitlength: 0020 Obj.access: 0087 Name: Fx/Gage0
          Value :0xf5fb0000 -168099840
  Sub: 02 Datatype: 0004 Bitlength: 0020 Obj.access: 0087 Name: Fy/Gage1
          Value :0x04cb0000 80412672
  Sub: 03 Datatype: 0004 Bitlength: 0020 Obj.access: 0087 Name: Fz/Gage2
          Value :0x0a510000 173080576
  Sub: 04 Datatype: 0004 Bitlength: 0020 Obj.access: 0087 Name: Tx/Gage3
          Value :0x00106400 1074176
  Sub: 05 Datatype: 0004 Bitlength: 0020 Obj.access: 0087 Name: Ty/Gage3
          Value :0x0018f000 1634304
  Sub: 06 Datatype: 0004 Bitlength: 0020 Obj.access: 0087 Name: Tz/Gage3
          Value :0x021d8a00 35490304
 Index: 6010 Datatype: 0007 Objectcode: 07 Name: Status Code
  Sub: 00 Datatype: 0007 Bitlength: 0020 Obj.access: 0087 Name: SubIndex 000
          Value :0xc0000010 3221225488
 Index: 6020 Datatype: 0007 Objectcode: 07 Name: Sample Counter
  Sub: 00 Datatype: 0007 Bitlength: 0020 Obj.access: 0087 Name: SubIndex 000
          Value :0x002754ad 2577581
 Index: 7010 Datatype: 002a Objectcode: 09 Name: Control Codes
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x02 2
  Sub: 01 Datatype: 0007 Bitlength: 0020 Obj.access: 007f Name: Control 1
          Value :0x00000000 0
  Sub: 02 Datatype: 0007 Bitlength: 0020 Obj.access: 007f Name: Control 2
          Value :0x00000000 0
 Index: f000 Datatype: 002a Objectcode: 09 Name: Modular device profile
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x02 2
  Sub: 01 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Module index distance
          Value :0x0010 16
  Sub: 02 Datatype: 0006 Bitlength: 0010 Obj.access: 0007 Name: Maximum number of modules
          Value :0x0003 3
 Index: f010 Datatype: 0007 Objectcode: 08 Name: Module profile list
  Sub: 00 Datatype: 0005 Bitlength: 0008 Obj.access: 0007 Name: SubIndex 000
          Value :0x03 3
  Sub: 01 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 001
          Value :0x00000064 100
  Sub: 02 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 002
          Value :0x000000c8 200
  Sub: 03 Datatype: 0007 Bitlength: 0020 Obj.access: 0007 Name: SubIndex 003
          Value :0x0000012c 300
End slaveinfo, close socket
End program
@dgehri
Copy link
Author

dgehri commented Feb 5, 2019

I'm also adding the Wireshark capture during simple_test.exe \Device\NPF_{024D720E-5DFD-4E16-8619-C6076D023768}.

simple_test_wireshark.zip

@ArthurKetels
Copy link
Contributor

Thanks for all the info. The strange thing is that there seems to be nothing wrong with the configuration. Both the eeprom (SII), xml (ESI) and wireshark show the same data.

Still, going from pre-op to safe-op throws a slave error 0x001e invalid input configuration.

My guess is there must be a timing issue in the slave. Could you test with twincat3 (can try out for free for 30 days) if you can get the slave to operational? And if yes, show me the wireshark trace.

@dgehri
Copy link
Author

dgehri commented Feb 7, 2019

Thank you for getting back to me!

I'm going to try TwinCAT 3, yes. But in the meantime, I have the following info:

I have a ECAT master from Elmo Motion Control ("GMAS"), and I tried to use it to set up the ECAT configuration with the sensor. The strange thing is that, if I let it detect the sensor, it too will fail to bring it to OP state.

However, when, on the master, I disable the use of the DC (see image below, Enable is unchecked), it can bring it into OPERATIONAL state and I can see process data coming in. Unfortunately, I don't think I can log this with Wireshark.

I therefore suspect a clock issue, but don't know how to configure the equivalent timing on SOEM. I've attached the XML configuration file used by ELMO for this slave, and in the section, one can see the sequence of configuration commands. Again, I assume that SOEM actually performs most of them automatically based on the slave EEPROM data, but maybe I would have to perform some of them manually, but again, don't now why.

image

Best,
Daniel

@ArthurKetels
Copy link
Contributor

Hello Daniel,

I guess you have given the solution to your problem already. The use of DC is most likely triggering the slave to behave wrongly.

To test this, comment the following line in simple_test:
ec_configdc();
This function enables the distributed clock preparation in SOEM. Without it DC is not used.

I can see in the ESI that this slave has two modes, SM synchronous and SYNC0 synchronous. Perhaps the firmware in the slave has the wrong checks internally to decide in which mode it should go.

@dgehri
Copy link
Author

dgehri commented Feb 7, 2019

Hello Arthur. If only... I tried that but the problem is the same (see attached Wireshark log, linux/simple_test.c with ec_configdc() commented out).

simple_test_disabled_ec_configdc.zip

@dgehri
Copy link
Author

dgehri commented Feb 7, 2019

Update. I tried to apply the PreOp -> SafeOp init as described in the sensor's XML configuration file (see above), and hence added the following in the P->S hook:

    printf("Configure PreOp -> SafeOp (state = %d)\n", ec_slave[slave].state);
    int wkc = 1;
    auto configadr = ec_slave[slave].configadr;

    // set sm 2 (output)
    smt.StartAddr = htoes(0x1800);
    smt.SMlength = htoes(0x0008);
    smt.SMflags = htoel(0x00010064);
    ec_FPWR(configadr, ECT_REG_SM2, sizeof(ec_smt), &smt, EC_TIMEOUTRET);

    // set sm 3 (input)
    smt.StartAddr = htoes(0x1c00);
    smt.SMlength = htoes(0x0020);
    smt.SMflags = htoel(0x00010000);
    ec_FPWR(configadr, ECT_REG_SM3, sizeof(ec_smt), &smt, EC_TIMEOUTRET);

It now goes into OP mode. I'll keep debugging, but just a quick question: I don't know anything about those flags -- are there any defines I should use instead, on if so, which?

@ArthurKetels
Copy link
Contributor

Forgive my stupidity, but I just missed the very obvious thing in the beginning. I guess my cold interferes with my brain too much.

The SM configuration SOEM tries is :

 SM2 A:1800 L:   8 F:00010064 Type:3
 SM3 A:1c00 L:  28 F:00010020 Type:4

The length of input SM3 is written as 28. But in reality it should be 32. There are 8 objects of 32bits. The reason is that SOEM asks the PDO mapping from the slave with CompleteAccess and the slave answers with only 7 objects. So SOEM tries to do as the slave instructs. The error is in the slave returning too little objects from the SDO CA request. See line 270 of simple_test_wireshark.

There are two solutions:

  1. Ask the manufacturer to fix the bug and update the firmware.
  2. Disable Complete Access for this slave.

After ec_config_init() but before ex_config_map() you can do
ec_slave[slc].CoEdetails &= ~ECT_COEDET_SDOCA;
to clear the Complete Access bit in the CoE capabilities list.

@dgehri
Copy link
Author

dgehri commented Feb 7, 2019

Thank you very much! This works like a charm!

I forwarded your comments to the manufacturer, too.

@dgehri
Copy link
Author

dgehri commented Feb 7, 2019

One last question: why is simple_test incrementing ++IOmap[0] in the RT callback?

@ArthurKetels
Copy link
Contributor

That is just the "simple" in simple_test. Just to show how one could manipulate the IOmap directly to transfer process data to the slaves. A test setup with a simple output slave will blink some leds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants