Hello Etherlab community,

Has anybody had problems with memory allocation or insufficient memory running 
etherlab-modules made from large Simulink models?

I encounter problems running kernelmodules generated from Simulink/SimMechanics 
with etherlab target. After successfully compiling the model and giving the 
insmod command I look at the model from testmanager (connection is successful) 
but the model doesn't seem to run (no channel changes values ,The Value 
Channels/Taskinfo/0/Period/Value is 0).
I included the output of /var/log/messages after insmod and rmmod of that model 
into the email. Also the ethercat hardware components never enter the 
operational state.
When I dramatically decrease the size of the model, it works, produces 
reasonable output and the ethercat hardware becomes operational.

So I got a hint that for my particular model I might have to increase the rtai 
stack size. I did that, but any value of stack_size above roughly 120000 yields 
an error message saying:
insmod: error inserting 'Test2_kmod.ko': -1 Cannot allocate memory
although the command: 'free' shows 500 Mb free memory and killing numerous 
other processes makes no difference.

I am running matlab2009b, Etherlab 1.3 (with SimMechanics support), Ethercat 
master 1.5 on Suse 10.3 with a 2.6.22.5-rtai-3.6.2 Kernel

Has anybody encountered anything like this before and knows what the problem 
might be?

Yours faithfully,
Jasper Westpfahl
Feb 22 14:50:48 MPT43 kernel: Inserting application.
Feb 22 14:50:48 MPT43 kernel: Number of sample times: 1
Feb 22 14:50:48 MPT43 kernel: Allocated 44 bytes for ecat_data: e96367c0
Feb 22 14:50:48 MPT43 kernel: ecs_reg_slave( tid = 0, master_id = 0, domain_id 
= 0, slave_alias = 0, slave_position = 1, vendor_id = 0x2, product_code = 
0x7d43052, sdo_config_count = 0, *sdo_config = 00000000, soe_config_count = 0, 
*soe_config = 00000000, *sync_info = f9314e9c, pdo_count = 4, *pdo_map = 
f9314ec4 )
Feb 22 14:50:48 MPT43 kernel: Allocated 108 bytes for master: f50fe740
Feb 22 14:50:48 MPT43 kernel: Allocated 8 bytes for master state: f34a2280
Feb 22 14:50:48 MPT43 kernel: Requesting master 0
Feb 22 14:50:48 MPT43 kernel: EtherCAT: Requesting master 0...
Feb 22 14:50:48 MPT43 kernel: EtherCAT: Successfully requested master 0.
Feb 22 14:50:48 MPT43 kernel:   f7992000 = ecrt_request_master(0)
Feb 22 14:50:48 MPT43 kernel: Allocated 112 bytes for slave: f54588c0
Feb 22 14:50:48 MPT43 kernel: Doing pdo_mapping 0
Feb 22 14:50:48 MPT43 kernel: Allocated 44 bytes for domain: e985fb80
Feb 22 14:50:48 MPT43 kernel: Allocated 8 bytes for domain state: f34a21e0
Feb 22 14:50:48 MPT43 kernel:   cf427800 = ecrt_master_create_domain(f7992000)
Feb 22 14:50:48 MPT43 kernel: New output domain 0:0 for tid 0 created
Feb 22 14:50:48 MPT43 kernel: Selecting Output Domain for PDO Entry #x7000
Feb 22 14:50:48 MPT43 kernel: Doing pdo_mapping 1
Feb 22 14:50:48 MPT43 kernel: Selecting Output Domain for PDO Entry #x7010
Feb 22 14:50:48 MPT43 kernel: Doing pdo_mapping 2
Feb 22 14:50:48 MPT43 kernel: Selecting Output Domain for PDO Entry #x7020
Feb 22 14:50:48 MPT43 kernel: Doing pdo_mapping 3
Feb 22 14:50:48 MPT43 kernel: Selecting Output Domain for PDO Entry #x7030
Feb 22 14:50:48 MPT43 kernel: Allocated 44 bytes for domain: cf427480
Feb 22 14:50:48 MPT43 kernel: Allocated 8 bytes for domain state: e31e9ea0
Feb 22 14:50:48 MPT43 kernel:   eba83b40 = ecrt_master_create_domain(f7992000)
Feb 22 14:50:48 MPT43 kernel: New input domain 0:0 for tid 0 created
Feb 22 14:50:48 MPT43 kernel: ecs_reg_slave( tid = 0, master_id = 0, domain_id 
= 0, slave_alias = 0, slave_position = 0, vendor_id = 0x2, product_code = 
0x44c2c52, sdo_config_count = 0, *sdo_config = 00000000, soe_config_count = 0, 
*soe_config = 00000000, *sync_info = 00000000, pdo_count = 0, *pdo_map = 
00000000 )
Feb 22 14:50:48 MPT43 kernel: Allocated 64 bytes for slave: ce84af40
Feb 22 14:50:48 MPT43 kernel: Allocated 92 bytes for master array: f7a8f5c0
Feb 22 14:50:48 MPT43 kernel: Allocated 44 bytes for input domain array: 
ce850d80
Feb 22 14:50:48 MPT43 kernel: Allocated 44 bytes for output domain array: 
e985e4c0
Feb 22 14:50:48 MPT43 kernel: Considering slave f54588c0 0:1 on master 
0(f7992000)
Feb 22 14:50:48 MPT43 kernel: Bit Offset f9317a28 1: 0
Feb 22 14:50:48 MPT43 kernel: Bit Offset f9317a2c 1: 1
Feb 22 14:50:48 MPT43 kernel: Bit Offset f9317a30 1: 2
Feb 22 14:50:48 MPT43 kernel: Bit Offset f9317a34 1: 3
Feb 22 14:50:48 MPT43 kernel: Considering slave ce84af40 0:0 on master 
0(f7992000)
Feb 22 14:50:48 MPT43 kernel: Allocated 8 bytes for input copy list: f1c85760
Feb 22 14:50:48 MPT43 kernel: Allocated 0 bytes for input io data: f1c857c0
Feb 22 14:50:48 MPT43 kernel: Allocated 8 bytes for output copy list: f1c857a0
Feb 22 14:50:48 MPT43 kernel: Allocated 1 bytes for output io data: f1c85800
Feb 22 14:50:48 MPT43 kernel: Assigning io Address 0 f1c85800
Feb 22 14:50:48 MPT43 syslog-ng[2008]: last message repeated 3 times
Feb 22 14:50:48 MPT43 kernel: ecrt_master_activate(f7992000)
Feb 22 14:50:48 MPT43 kernel: EtherCAT 0: Domain0: Logical address 0x00000000, 
1 byte, expected working counter 1.
Feb 22 14:50:48 MPT43 kernel: EtherCAT 0:   Datagram domain0-0: Logical offset 
0x00000000, 1 byte, type LWR.
Feb 22 14:50:48 MPT43 kernel: EtherCAT 0: Domain1: Logical address 0x00000001, 
0 byte, expected working counter 0.
Feb 22 14:50:48 MPT43 kernel: EtherCAT 0: Master thread exited.
Feb 22 14:50:48 MPT43 kernel: EtherCAT 0: Starting EtherCAT-OP thread.
Feb 22 14:50:48 MPT43 kernel: Releasing memory for domain: cf427480
Feb 22 14:50:48 MPT43 kernel: Releasing memory for domain: e985fb80
Feb 22 14:50:48 MPT43 kernel: Releasing memory for slave: f54588c0
Feb 22 14:50:48 MPT43 kernel: Releasing memory for slave: ce84af40
Feb 22 14:50:48 MPT43 kernel: Releasing memory for master: f50fe740
Feb 22 14:50:48 MPT43 kernel: Malloc'ed struct app *(f513b800) for rt_app 
*(f9314270)
Feb 22 14:50:48 MPT43 kernel: Application tid 0 running at 100000000ns
Feb 22 14:50:48 MPT43 kernel: Successfully registered application "Test2" with 
RT-AppCore.
Feb 22 14:50:48 MPT43 kernel: Default Trap Handler: vector 6: Suspend RT task 
f513b980
Feb 22 14:51:08 MPT43 kernel: Unused stack memory: 118128
Feb 22 14:51:08 MPT43 kernel: Stopped RT Timer
Feb 22 14:51:08 MPT43 kernel: ecs_end()
Feb 22 14:51:08 MPT43 kernel: EtherCAT 0: Releasing master...
Feb 22 14:51:08 MPT43 kernel: EtherCAT 0: Master thread exited.
Feb 22 14:51:08 MPT43 kernel: EtherCAT 0: Starting EtherCAT-IDLE thread.
Feb 22 14:51:08 MPT43 kernel: EtherCAT 0: Released.
Feb 22 14:51:08 MPT43 kernel: Releasing memory for master state: f34a2280
Feb 22 14:51:08 MPT43 kernel: Releasing memory for master array: f7a8f5c0
Feb 22 14:51:08 MPT43 kernel: Releasing memory for input copy list: f1c85760
Feb 22 14:51:08 MPT43 kernel: Releasing memory for domain state: e31e9ea0
Feb 22 14:51:08 MPT43 kernel: Releasing memory for input io data: f1c857c0
Feb 22 14:51:08 MPT43 kernel: Freeing memory e985e4c0
Feb 22 14:51:08 MPT43 kernel: Releasing memory for input domain array: ce850d80
Feb 22 14:51:08 MPT43 kernel: finished Freeing memory e985e4c0
Feb 22 14:51:08 MPT43 kernel: Releasing memory for output copy list: f1c857a0
Feb 22 14:51:08 MPT43 kernel: Releasing memory for domain state: f34a21e0
Feb 22 14:51:08 MPT43 kernel: Releasing memory for output io data: f1c85800
Feb 22 14:51:08 MPT43 kernel: Releasing memory for output domain array: e985e4c0
Feb 22 14:51:08 MPT43 kernel: Releasing memory for ecat_data: e96367c0
Feb 22 14:51:08 MPT43 kernel: Removed application "Test2".
Feb 22 14:51:08 MPT43 kernel: EtherCAT WARNING: Datagram f7992404 (master-fsm) 
was SKIPPED 1 time.
_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to