27 // EtherCAT |
27 // EtherCAT |
28 ec_master_t *master = NULL; |
28 ec_master_t *master = NULL; |
29 ec_domain_t *domain1 = NULL; |
29 ec_domain_t *domain1 = NULL; |
30 |
30 |
31 // Datenfelder |
31 // Datenfelder |
32 void *r_ssi_input, *r_ssi_status, *r_4102[3]; |
32 //void *r_ssi_input, *r_ssi_status, *r_4102[3]; |
33 |
33 |
34 // Kanäle |
34 // Kanäle |
35 uint32_t k_pos; |
35 uint32_t k_pos; |
36 uint8_t k_stat; |
36 uint8_t k_stat; |
37 |
37 |
38 ec_field_init_t domain1_fields[] = { |
38 ec_field_init_t domain1_fields[] = { |
39 {NULL, "1", "Beckhoff", "EL1014", "InputValue", 0}, |
39 {NULL, "1", "Beckhoff", "EL1014", "InputValue", 0}, |
40 {NULL, "2", "Beckhoff", "EL1014", "InputValue", 0}, |
40 {NULL, "2", "Beckhoff", "EL2004", "OutputValue", 0}, |
41 {NULL, "3", "Beckhoff", "EL1014", "InputValue", 0}, |
41 //{NULL, "3", "Beckhoff", "EL3162", "InputValue", 0}, |
42 {NULL, "4", "Beckhoff", "EL1014", "InputValue", 0}, |
42 {NULL, "4", "Beckhoff", "EL4132", "OutputValue", 0}, |
43 {NULL, "5", "Beckhoff", "EL1014", "InputValue", 0}, |
43 {NULL, "6", "Beckhoff", "EL5001", "InputValue", 0}, |
44 {NULL, "6", "Beckhoff", "EL2004", "OutputValue", 0}, |
|
45 {NULL, "7", "Beckhoff", "EL2004", "OutputValue", 0}, |
|
46 {NULL, "8", "Beckhoff", "EL2004", "OutputValue", 0}, |
|
47 {} |
44 {} |
48 }; |
45 }; |
49 |
46 |
50 /*****************************************************************************/ |
47 /*****************************************************************************/ |
51 |
48 |
125 goto out_release_master; |
122 goto out_release_master; |
126 } |
123 } |
127 |
124 |
128 //ecrt_master_debug(master, 2); |
125 //ecrt_master_debug(master, 2); |
129 |
126 |
|
127 #if 0 |
130 if (ecrt_master_sdo_write(master, "1", 0x4061, 1, 0, 1) || |
128 if (ecrt_master_sdo_write(master, "1", 0x4061, 1, 0, 1) || |
131 ecrt_master_sdo_write(master, "1", 0x4061, 2, 1, 1) || |
129 ecrt_master_sdo_write(master, "1", 0x4061, 2, 1, 1) || |
132 ecrt_master_sdo_write(master, "1", 0x4061, 3, 1, 1) || |
130 ecrt_master_sdo_write(master, "1", 0x4061, 3, 1, 1) || |
133 ecrt_master_sdo_write(master, "1", 0x4066, 0, 0, 1) || |
131 ecrt_master_sdo_write(master, "1", 0x4066, 0, 0, 1) || |
134 ecrt_master_sdo_write(master, "1", 0x4067, 0, 4, 1) || |
132 ecrt_master_sdo_write(master, "1", 0x4067, 0, 4, 1) || |
137 ecrt_master_sdo_write(master, "1", 0x406A, 0, 25, 1) || |
135 ecrt_master_sdo_write(master, "1", 0x406A, 0, 25, 1) || |
138 ecrt_master_sdo_write(master, "1", 0x406B, 0, 50, 1)) { |
136 ecrt_master_sdo_write(master, "1", 0x406B, 0, 50, 1)) { |
139 printk(KERN_ERR "EtherCAT: Failed to configure SSI!\n"); |
137 printk(KERN_ERR "EtherCAT: Failed to configure SSI!\n"); |
140 goto out_deactivate; |
138 goto out_deactivate; |
141 } |
139 } |
|
140 #endif |
142 |
141 |
143 //ecrt_master_debug(master, 0); |
142 //ecrt_master_debug(master, 0); |
144 |
143 |
145 #if 0 |
144 #if 0 |
146 printk(KERN_INFO "Writing alias...\n"); |
145 printk(KERN_INFO "Writing alias...\n"); |