OpenEtherCATsociety / SOEM

Simple Open Source EtherCAT Master
Other
1.36k stars 686 forks source link

Problem with using ODOT CN-8033 #811

Open gzovermas opened 6 months ago

gzovermas commented 6 months ago

We had use SOEM with Beckhoff IOs and servo drives sucessfully, but with ODOT CN-8033 we have problems. I test the most simple situation with only 1 modules of digital inputs CT-121F(16 DI). The traces of slaveinfo applications is attached. slaveinfo.txt ****slaveinfo.txt*** SOEM (Simple Open EtherCAT Master) Slaveinfo Starting slaveinfo ec_init on enp5s0 succeeded. 1 slaves found and configured. Calculated workcounter 0 Not all slaves reached safe operational state. Slave 1 State=12 StatusCode= 1e : Invalid input configuration

Slave:1 Name:CN-8033,Odot Output size: 0bits Input size: 0bits State: 18 Delay: 0[ns] Has DC: 1 DCParentport:0 Activeports:1.0.0.0 Configured address: 1001 Man: 00860816 ID: 20008033 Rev: 00010000 SM0 A:1000 L: 128 F:00010026 Type:1 SM1 A:1080 L: 128 F:00010022 Type:2 SM2 A:1100 L: 4 F:00010064 Type:3 SM3 A:1400 L: 4 F:00010020 Type:4 FMMUfunc 0:1 1:2 2:0 3:0 MBX length wr: 128 rd: 128 MBX protocols : 04 CoE details: 03 FoE details: 00 EoE details: 00 SoE details: 00 Ebus current: 0[mA] only LRD/LWR:0 CoE Object Description found, 18 entries.

I had tried to modifyed the SM2 and SM3 length, it will reach operational state, but other things still wrong. ec_slave[1].SM[2].SMlength = 0x0; ec_slave[1].SM[3].SMlength = 0x2; SM2 and SM3 length were change, but not any other things different. SM0 A:1000 L: 128 F:00010026 Type:1 SM1 A:1080 L: 128 F:00010022 Type:2 SM2 A:1100 L: 0 F:00000064 Type:3 SM3 A:1400 L: 2 F:00010020 Type:4 slaveinfo_sm.txt


I tried to set the pdo, but it returns the errors below:


int do_config(uint16 slave) {

uint8 u8val;
uint16 u16val;
int res = 0 ;

u8val = 0;
res += ec_SDOwrite(1, 0x1c13, 0x00, FALSE, sizeof(u8val), &u8val, EC_TIMEOUTRXM);

u16val = 0x1a00;
res += ec_SDOwrite(1, 0x1c13, 0x01, FALSE, sizeof(u16val), &u16val, EC_TIMEOUTRXM);

u8val = 1;
res += ec_SDOwrite(1, 0x1c13, 0x00, FALSE, sizeof(u8val), &u8val, EC_TIMEOUTRXM);

printf("init %d axis res : %d, %d\n", 1, slave, res);
return res;

}


output Time:1716429044.300 SDO slave:1 index:1c13.00 error:06010002 Attempt to write to a read only object Time:1716429044.303 SDO slave:1 index:1c13.01 error:06010002 Attempt to write to a read only object Time:1716429044.306 SDO slave:1 index:1c13.00 error:06010002 Attempt to write to a read only object slaveinfo_pdo.txt


What can advise us? Regards!

ArthurKetels commented 6 months ago

My advice is the same as in #661, ask the vendor for a firmware update. This is clearly a broken implementation, and should be fixed. The slave will not pass the mandatory slave conformance test like this.

The work around is clearly described in #661.