> -----Original Message-----
> From: Gavin Lambert [mailto:gav...@compacsort.com]
> Sent: maandag 11 mei 2015 10:01
> To: 'Fredriek Vanneste'
> Cc: etherlab-users@etherlab.org
> Subject: RE: [etherlab-users] EtherLab with Omron Accurax PREOP-> OP fail
> 
> On 11 May 2015 18:32, quoth Fredriek Vanneste:
> > > > [17675.764159] EtherCAT 0: Starting EtherCAT-OP thread.
> > > > [17675.765211] estimation task[16822]: segfault at 10 ip
> > > > 00007f3254f8b537
> > > sp
> > > > 00007f3255378c20 error 4 in
> > > > libethercat_rtdm.so.1.0.0[7f3254f87000+8000]
> > > > [17675.870158] EtherCAT WARNING: Datagram ffff8801248f2688
> > > > (master-fsm)
> > > was
> > > > SKIPPED 1 time.
> > > > [17675.901068] Xenomai: RTDM: closing file descriptor 0.
> > > > [17675.901075] EtherCAT 0: Releasing master...
> > > > [17675.901088] EtherCAT 0: Master thread exited.
> > > > [17675.901097] EtherCAT 0: Starting EtherCAT-IDLE thread.
> > > > [17675.901146] EtherCAT 0: Released.
> > > > [17675.901160] Xenomai: native: cleaning up mutex "mutex" (ret=0).
> > > > [17676.874188] EtherCAT WARNING: Datagram ffff8801248f2688
> > > > (master-fsm)
> > > was
> > > > SKIPPED 1 time.
> > > >
> > > > Any ideas?
> > >
> > > Most likely you are passing incorrect parameters, or calling things
> > > in
> > the
> > > wrong order.  It's hard to say for sure exactly what without seeing
> > > your code.
> > >
> >
> > I have attached a file with the code I used in this example.
> > Thank you in advance.
> 
> You've never actually assigned anything to sc_motor, so it's still NULL.
> Hence the segfault.
> 
> You need to assign the local sc from main to it so that the other tasks
can
> see it.
> 
That was indeed an issue. I am one step closer to a solution now. 
I added sc_motor =ecrt_master_slave_config (master, 0,0,...); and the
functions mentioned before are now being executed!
Thank you!
I also added the ecrt_slave_config_dc(sc_motor, 0x0300,2500000,0,250000,0);
just befor the ecrt_slave_config_state(...);
If I run the program now, I am getting an error message but only after some
time(15seconds). (synchronization error and state change error)
Please find attached the output from "dmesg" .
There seems  to be a problem with SDO download of the PDO mapping and the
slave is not able to change state to SAFEOP or OP.

Fred 

e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
[   29.666957] e1000e 0000:00:19.0 eth0: 10/100 speed: disabling TSO
[   29.667006] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   32.606192] init: plymouth-upstart-bridge main process ended, respawning
[  245.795076] EtherCAT WARNING 0-0: Failed to clear PDO mapping.
[  245.795078] EtherCAT WARNING 0-0: Currently mapped PDO entries: 0x603F:00/16 
0x6041:00/16 0x6064:00/32 0x6077:00/16 0x6061:00/8 0x60B9:00/16 0x60BA:00/32 
0x60BC:00/32 0x60FD:00/32. Entries to map: 0x603F:00/16 0x6041:00/16 
0x6064:00/32 0x6077:00/16 0x6061:00/8 0x60B9:00/16 0x60BA:00/32 0x60BC:00/32 
0x60FD:00/32
[  245.795098] EtherCAT WARNING 0-0: Failed to configure mapping of PDO 0x1B02.
[  245.821067] EtherCAT WARNING 0-0: No application time supplied. Cyclic start 
time will not be in phase.
[  245.828076] EtherCAT 0: Domain 0: Working counter changed to 2/3.
[  246.738221] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[  246.742224] EtherCAT WARNING: Datagram ffff880124962d98 (domain0-0-main) was 
SKIPPED 1 time.
[  247.927565] EtherCAT 0: Releasing master...
[  247.927577] EtherCAT 0: Master thread exited.
[  247.927587] EtherCAT 0: Starting EtherCAT-IDLE thread.
[  247.927622] EtherCAT 0: Released.
[  248.851188] EtherCAT: Requesting master 0...
[  250.829987] EtherCAT ERROR 0-0: Timeout while setting state OP.
[  250.830000] EtherCAT: Successfully requested master 0.
[  250.830173] EtherCAT 0: Domain0: Logical address 0x00000000, 44 byte, 
expected working counter 3.
[  250.830176] EtherCAT 0:   Datagram domain0-0-main: Logical offset 
0x00000000, 44 byte, type LRW.
[  250.830264] EtherCAT 0: Master thread exited.
[  250.830267] EtherCAT 0: Starting EtherCAT-OP thread.
[  250.834513] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[  250.836641] EtherCAT 0: Domain 0: Working counter changed to 2/3.
[  250.838030] EtherCAT 0: Slave states on main device: SAFEOP.
[  250.838032] EtherCAT WARNING 0: No app_time received up to now, but master 
already active.
[  250.867641] EtherCAT ERROR 0-0: SDO download 0x1702:00 (1 bytes) aborted.
[  250.867646] EtherCAT ERROR 0-0: SDO abort message 0x06010002: "Attempt to 
write a read-only object".
[  250.867648] EtherCAT WARNING 0-0: Failed to clear PDO mapping.
[  250.867649] EtherCAT WARNING 0-0: Currently mapped PDO entries: 0x6040:00/16 
0x607A:00/32 0x60FF:00/32 0x6071:00/16 0x6060:00/8 0x60B8:00/16 0x607F:00/32. 
Entries to map: 0x6040:00/16 0x607A:00/32 0x60FF:00/32 0x6071:00/16 0x6060:00/8 
0x60B8:00/16 0x607F:00/32
[  250.867665] EtherCAT WARNING 0-0: Failed to configure mapping of PDO 0x1702.
[  250.891645] EtherCAT ERROR 0-0: SDO download 0x1B02:00 (1 bytes) aborted.
[  250.891650] EtherCAT ERROR 0-0: SDO abort message 0x06010002: "Attempt to 
write a read-only object".
[  250.891651] EtherCAT WARNING 0-0: Failed to clear PDO mapping.
[  250.891652] EtherCAT WARNING 0-0: Currently mapped PDO entries: 0x603F:00/16 
0x6041:00/16 0x6064:00/32 0x6077:00/16 0x6061:00/8 0x60B9:00/16 0x60BA:00/32 
0x60BC:00/32 0x60FD:00/32. Entries to map: 0x603F:00/16 0x6041:00/16 
0x6064:00/32 0x6077:00/16 0x6061:00/8 0x60B9:00/16 0x60BA:00/32 0x60BC:00/32 
0x60FD:00/32
[  250.891671] EtherCAT WARNING 0-0: Failed to configure mapping of PDO 0x1B02.
[  250.917648] EtherCAT WARNING 0-0: No application time supplied. Cyclic start 
time will not be in phase.
[  251.834134] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[  251.838807] EtherCAT WARNING: Datagram ffff8800c0682d98 (domain0-0-main) was 
SKIPPED 1 time.
[  251.838810] EtherCAT 0: Domain 0: 2 working counter changes - now 2/3.
[  252.269099] EtherCAT 0: Releasing master...
[  252.269115] EtherCAT 0: Master thread exited.
[  252.269124] EtherCAT 0: Starting EtherCAT-IDLE thread.
[  252.269159] EtherCAT 0: Released.
[  255.926815] EtherCAT ERROR 0-0: Timeout while setting state OP.

_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to