Nicht registrierte Slaves in PREOP schalten.
--- a/master/master.c Fri Feb 24 13:14:51 2006 +0000
+++ b/master/master.c Fri Feb 24 13:34:31 2006 +0000
@@ -483,8 +483,8 @@
return -1;
// Check if slave was registered...
- if (!slave->type || !slave->registered) {
- printk(KERN_INFO "EtherCAT: Slave %i was not registered.\n", i);
+ if (!slave->type) {
+ printk(KERN_INFO "EtherCAT: Slave %i has unknown type!\n", i);
continue;
}
@@ -541,6 +541,14 @@
if (unlikely(ec_slave_state_change(slave, EC_SLAVE_STATE_PREOP)))
return -1;
+ // Slaves that are not registered are only brought into PREOP
+ // state -> nice blinking and mailbox comm. possible
+ if (!slave->registered) {
+ printk(KERN_WARNING "EtherCAT: Slave %i was not registered!\n",
+ slave->ring_position);
+ continue;
+ }
+
// Set FMMUs
for (j = 0; j < slave->fmmu_count; j++)
{
--- a/rt/msr_module.c Fri Feb 24 13:14:51 2006 +0000
+++ b/rt/msr_module.c Fri Feb 24 13:34:31 2006 +0000
@@ -59,8 +59,9 @@
uint32_t angle0;
ec_field_init_t domain1_fields[] = {
+ {},
+ {(void **) &ssi_value, "1", "Beckhoff", "EL5001", ec_ipvalue, 0, 1},
{(void **) &dig_out1, "2", "Beckhoff", "EL2004", ec_opvalue, 0, 1},
- {(void **) &ssi_value, "3", "Beckhoff", "EL5001", ec_ipvalue, 0, 1},
{(void **) &inc_value, "0:4", "Beckhoff", "EL5101", ec_ipvalue, 0, 1},
{}
};
@@ -72,7 +73,7 @@
// Prozessdaten lesen und schreiben
EtherCAT_rt_domain_xio(domain1);
- angle0 = (uint32_t) *inc_value;
+ //angle0 = (uint32_t) *inc_value;
}
/*****************************************************************************/
@@ -165,14 +166,14 @@
goto out_release_master;
}
- EtherCAT_rt_master_debug(master, 2);
- if (EtherCAT_rt_canopen_sdo_addr_read(master, "0:3", 0x100A, 1,
+#if 1
+ if (EtherCAT_rt_canopen_sdo_addr_read(master, "1", 0x100A, 1,
&version)) {
printk(KERN_ERR "Could not read SSI version!\n");
goto out_release_master;
}
printk(KERN_INFO "Klemme 3 Software-version: %u\n", version);
- EtherCAT_rt_master_debug(master, 0);
+#endif
ipipe_init_attr(&attr);
attr.name = "IPIPE-MSR-MODULE";