changeset 8 | f2ebe943c686 |
parent 6 | e36a85dc2730 |
child 11 | e58d78234412 |
7:a5c18da4e781 | 8:f2ebe943c686 |
---|---|
125 { |
125 { |
126 EC_DBG(KERN_ERR "EtherCAT duplicate slave check!"); |
126 EC_DBG(KERN_ERR "EtherCAT duplicate slave check!"); |
127 return -1; |
127 return -1; |
128 } |
128 } |
129 |
129 |
130 // No slaves. |
130 // No slaves. |
131 if (slave_count == 0) |
131 if (slave_count == 0) |
132 { |
132 { |
133 EC_DBG(KERN_ERR "EtherCAT: No slaves in list!"); |
133 EC_DBG(KERN_ERR "EtherCAT: No slaves in list!"); |
134 return -1; |
134 return -1; |
135 } |
135 } |
138 |
138 |
139 if ((cmd = EtherCAT_broadcast_read(master, 0x0000, 4)) == NULL) |
139 if ((cmd = EtherCAT_broadcast_read(master, 0x0000, 4)) == NULL) |
140 { |
140 { |
141 return -1; |
141 return -1; |
142 } |
142 } |
143 |
143 |
144 if (EtherCAT_async_send_receive(master) != 0) |
144 if (EtherCAT_async_send_receive(master) != 0) |
145 { |
145 { |
146 return -1; |
146 return -1; |
147 } |
147 } |
148 |
148 |
149 if (cmd->working_counter != slave_count) |
149 if (cmd->working_counter != slave_count) |
150 { |
150 { |
151 EC_DBG(KERN_ERR "EtherCAT: Wrong number of slaves on bus: %i / %i\n", |
151 EC_DBG(KERN_ERR "EtherCAT: Wrong number of slaves on bus: %i / %i\n", |
152 cmd->working_counter, slave_count); |
152 cmd->working_counter, slave_count); |
153 EtherCAT_remove_command(master, cmd); |
153 EtherCAT_remove_command(master, cmd); |
154 |
154 |
155 return -1; |
155 return -1; |
156 } |
156 } |
157 else |
157 else |
158 { |
158 { |
159 EC_DBG("EtherCAT: Found all %i slaves.\n", slave_count); |
159 EC_DBG("EtherCAT: Found all %i slaves.\n", slave_count); |
160 } |
160 } |
161 |
161 |
162 EtherCAT_remove_command(master, cmd); |
162 EtherCAT_remove_command(master, cmd); |
163 |
163 |
164 // For every slave in the list |
164 // For every slave in the list |
165 for (i = 0; i < slave_count; i++) |
165 for (i = 0; i < slave_count; i++) |
166 { |
166 { |
167 cur = &slaves[i]; |
167 cur = &slaves[i]; |
175 // Set ring position |
175 // Set ring position |
176 cur->ring_position = -i; |
176 cur->ring_position = -i; |
177 cur->station_address = i + 1; |
177 cur->station_address = i + 1; |
178 |
178 |
179 // Write station address |
179 // Write station address |
180 |
180 |
181 data[0] = cur->station_address & 0x00FF; |
181 data[0] = cur->station_address & 0x00FF; |
182 data[1] = (cur->station_address & 0xFF00) >> 8; |
182 data[1] = (cur->station_address & 0xFF00) >> 8; |
183 |
183 |
184 if ((cmd = EtherCAT_position_write(master, cur->ring_position, 0x0010, 2, data)) == NULL) |
184 if ((cmd = EtherCAT_position_write(master, cur->ring_position, 0x0010, 2, data)) == NULL) |
185 { |
185 { |
186 return -1; |
186 return -1; |
187 } |
187 } |
188 |
188 |
189 if (EtherCAT_async_send_receive(master) != 0) |
189 if (EtherCAT_async_send_receive(master) != 0) |
190 { |
190 { |
191 return -1; |
191 return -1; |
192 } |
192 } |
193 |
193 |
194 if (cmd->working_counter != 1) |
194 if (cmd->working_counter != 1) |
195 { |
195 { |
196 EC_DBG(KERN_ERR "EtherCAT: Slave %i did not repond while writing station address!\n", i); |
196 EC_DBG(KERN_ERR "EtherCAT: Slave %i did not repond while writing station address!\n", i); |
197 return -1; |
197 return -1; |
198 } |
198 } |
199 |
199 |
200 EtherCAT_remove_command(master, cmd); |
200 EtherCAT_remove_command(master, cmd); |
201 |
201 |
202 // Read base data |
202 // Read base data |
203 |
203 |
204 if ((cmd = EtherCAT_read(master, cur->station_address, 0x0000, 4)) == NULL) |
204 if ((cmd = EtherCAT_read(master, cur->station_address, 0x0000, 4)) == NULL) |
205 { |
205 { |
208 } |
208 } |
209 |
209 |
210 if (EtherCAT_async_send_receive(master) != 0) |
210 if (EtherCAT_async_send_receive(master) != 0) |
211 { |
211 { |
212 EtherCAT_remove_command(master, cmd); |
212 EtherCAT_remove_command(master, cmd); |
213 |
213 |
214 EC_DBG(KERN_ERR "EtherCAT: Could not send command!\n"); |
214 EC_DBG(KERN_ERR "EtherCAT: Could not send command!\n"); |
215 return -1; |
215 return -1; |
216 } |
216 } |
217 |
217 |
218 if (cmd->working_counter != 1) |
218 if (cmd->working_counter != 1) |
219 { |
219 { |
220 EtherCAT_remove_command(master, cmd); |
220 EtherCAT_remove_command(master, cmd); |
221 |
221 |
222 EC_DBG(KERN_ERR "EtherCAT: Slave %i did not respond while reading base data!\n", i); |
222 EC_DBG(KERN_ERR "EtherCAT: Slave %i did not respond while reading base data!\n", i); |
223 return -1; |
223 return -1; |
224 } |
224 } |
225 |
225 |
226 // Get base data |
226 // Get base data |
227 cur->type = cmd->data[0]; |
227 cur->type = cmd->data[0]; |
228 cur->revision = cmd->data[1]; |
228 cur->revision = cmd->data[1]; |
229 cur->build = cmd->data[2] | (cmd->data[3] << 8); |
229 cur->build = cmd->data[2] | (cmd->data[3] << 8); |
230 |
230 |
231 EtherCAT_remove_command(master, cmd); |
231 EtherCAT_remove_command(master, cmd); |
232 |
232 |
233 // Read identification from "Slave Information Interface" (SII) |
233 // Read identification from "Slave Information Interface" (SII) |
234 |
234 |
235 if (EtherCAT_read_slave_information(master, cur->station_address, |
235 if (EtherCAT_read_slave_information(master, cur->station_address, |
236 0x0008, &cur->vendor_id) != 0) |
236 0x0008, &cur->vendor_id) != 0) |
237 { |
237 { |
288 if (!found) |
288 if (!found) |
289 { |
289 { |
290 EC_DBG(KERN_ERR "EtherCAT: Unknown slave device" |
290 EC_DBG(KERN_ERR "EtherCAT: Unknown slave device" |
291 " (vendor %X, code %X) at position %i.\n", |
291 " (vendor %X, code %X) at position %i.\n", |
292 i, cur->vendor_id, cur->product_code); |
292 i, cur->vendor_id, cur->product_code); |
293 return -1; |
293 return -1; |
294 } |
294 } |
295 } |
295 } |
296 |
296 |
297 length = 0; |
297 length = 0; |
298 for (i = 0; i < slave_count; i++) |
298 for (i = 0; i < slave_count; i++) |
319 EC_DBG(KERN_DEBUG "EtherCAT: Slave %i - Address 0x%X, \"%s %s\", s/n %u\n", |
319 EC_DBG(KERN_DEBUG "EtherCAT: Slave %i - Address 0x%X, \"%s %s\", s/n %u\n", |
320 i, pos, slaves[i].desc->vendor_name, slaves[i].desc->product_name, |
320 i, pos, slaves[i].desc->vendor_name, slaves[i].desc->product_name, |
321 slaves[i].serial_number); |
321 slaves[i].serial_number); |
322 |
322 |
323 pos += slaves[i].desc->data_length; |
323 pos += slaves[i].desc->data_length; |
324 } |
324 } |
325 |
325 |
326 master->slaves = slaves; |
326 master->slaves = slaves; |
327 master->slave_count = slave_count; |
327 master->slave_count = slave_count; |
328 |
328 |
329 return 0; |
329 return 0; |
408 { |
408 { |
409 udelay(10); |
409 udelay(10); |
410 |
410 |
411 if ((cmd = EtherCAT_read(master, node_address, 0x502, 10)) == NULL) |
411 if ((cmd = EtherCAT_read(master, node_address, 0x502, 10)) == NULL) |
412 return -2; |
412 return -2; |
413 |
413 |
414 if (EtherCAT_async_send_receive(master) != 0) |
414 if (EtherCAT_async_send_receive(master) != 0) |
415 { |
415 { |
416 EtherCAT_remove_command(master, cmd); |
416 EtherCAT_remove_command(master, cmd); |
417 return -3; |
417 return -3; |
418 } |
418 } |
419 |
419 |
420 if (cmd->working_counter != 1) |
420 if (cmd->working_counter != 1) |
421 { |
421 { |
422 EtherCAT_remove_command(master, cmd); |
422 EtherCAT_remove_command(master, cmd); |
423 EC_DBG(KERN_ERR "EtherCAT: SII-read status - Slave %04X did not respond!\n", |
423 EC_DBG(KERN_ERR "EtherCAT: SII-read status - Slave %04X did not respond!\n", |
424 node_address); |
424 node_address); |
429 { |
429 { |
430 memcpy(target, cmd->data + 6, 4); |
430 memcpy(target, cmd->data + 6, 4); |
431 EtherCAT_remove_command(master, cmd); |
431 EtherCAT_remove_command(master, cmd); |
432 break; |
432 break; |
433 } |
433 } |
434 |
434 |
435 EtherCAT_remove_command(master, cmd); |
435 EtherCAT_remove_command(master, cmd); |
436 |
436 |
437 tries_left--; |
437 tries_left--; |
438 } |
438 } |
439 |
439 |
708 EC_DBG(KERN_ERR "EtherCAT: Received corrupted frame (illegal length)!\n"); |
708 EC_DBG(KERN_ERR "EtherCAT: Received corrupted frame (illegal length)!\n"); |
709 EC_DBG(KERN_DEBUG "EtherCAT: tx_data content:\n"); |
709 EC_DBG(KERN_DEBUG "EtherCAT: tx_data content:\n"); |
710 EC_DBG(KERN_DEBUG); |
710 EC_DBG(KERN_DEBUG); |
711 for (i = 0; i < master->tx_data_length; i++) |
711 for (i = 0; i < master->tx_data_length; i++) |
712 { |
712 { |
713 EC_DBG("%02X ", master->tx_data[i]); |
713 EC_DBG("%02X ", master->tx_data[i]); |
714 if ((i + 1) % 16 == 0) EC_DBG("\n" KERN_DEBUG); |
714 if ((i + 1) % 16 == 0) EC_DBG("\n" KERN_DEBUG); |
715 } |
715 } |
716 EC_DBG("\n"); |
716 EC_DBG("\n"); |
717 EC_DBG(KERN_DEBUG "EtherCAT: rx_data content:\n"); |
717 EC_DBG(KERN_DEBUG "EtherCAT: rx_data content:\n"); |
718 EC_DBG(KERN_DEBUG); |
718 EC_DBG(KERN_DEBUG); |
733 EC_DBG(KERN_ERR "EtherCAT: Received corrupted frame (length does not match)!\n"); |
733 EC_DBG(KERN_ERR "EtherCAT: Received corrupted frame (length does not match)!\n"); |
734 EC_DBG(KERN_DEBUG "EtherCAT: tx_data content:\n"); |
734 EC_DBG(KERN_DEBUG "EtherCAT: tx_data content:\n"); |
735 EC_DBG(KERN_DEBUG); |
735 EC_DBG(KERN_DEBUG); |
736 for (i = 0; i < master->tx_data_length; i++) |
736 for (i = 0; i < master->tx_data_length; i++) |
737 { |
737 { |
738 EC_DBG("%02X ", master->tx_data[i]); |
738 EC_DBG("%02X ", master->tx_data[i]); |
739 if ((i + 1) % 16 == 0) EC_DBG("\n" KERN_DEBUG); |
739 if ((i + 1) % 16 == 0) EC_DBG("\n" KERN_DEBUG); |
740 } |
740 } |
741 EC_DBG("\n"); |
741 EC_DBG("\n"); |
742 EC_DBG(KERN_DEBUG "EtherCAT: rx_data content:\n"); |
742 EC_DBG(KERN_DEBUG "EtherCAT: rx_data content:\n"); |
743 EC_DBG(KERN_DEBUG); |
743 EC_DBG(KERN_DEBUG); |
759 EC_DBG(KERN_ERR "EtherCAT: Received frame with incomplete command header!\n"); |
759 EC_DBG(KERN_ERR "EtherCAT: Received frame with incomplete command header!\n"); |
760 EC_DBG(KERN_DEBUG "EtherCAT: tx_data content:\n"); |
760 EC_DBG(KERN_DEBUG "EtherCAT: tx_data content:\n"); |
761 EC_DBG(KERN_DEBUG); |
761 EC_DBG(KERN_DEBUG); |
762 for (i = 0; i < master->tx_data_length; i++) |
762 for (i = 0; i < master->tx_data_length; i++) |
763 { |
763 { |
764 EC_DBG("%02X ", master->tx_data[i]); |
764 EC_DBG("%02X ", master->tx_data[i]); |
765 if ((i + 1) % 16 == 0) EC_DBG("\n" KERN_DEBUG); |
765 if ((i + 1) % 16 == 0) EC_DBG("\n" KERN_DEBUG); |
766 } |
766 } |
767 EC_DBG("\n"); |
767 EC_DBG("\n"); |
768 EC_DBG(KERN_DEBUG "EtherCAT: rx_data content:\n"); |
768 EC_DBG(KERN_DEBUG "EtherCAT: rx_data content:\n"); |
769 EC_DBG(KERN_DEBUG); |
769 EC_DBG(KERN_DEBUG); |
787 EC_DBG(KERN_ERR "EtherCAT: Received frame with incomplete command data!\n"); |
787 EC_DBG(KERN_ERR "EtherCAT: Received frame with incomplete command data!\n"); |
788 EC_DBG(KERN_DEBUG "EtherCAT: tx_data content:\n"); |
788 EC_DBG(KERN_DEBUG "EtherCAT: tx_data content:\n"); |
789 EC_DBG(KERN_DEBUG); |
789 EC_DBG(KERN_DEBUG); |
790 for (i = 0; i < master->tx_data_length; i++) |
790 for (i = 0; i < master->tx_data_length; i++) |
791 { |
791 { |
792 EC_DBG("%02X ", master->tx_data[i]); |
792 EC_DBG("%02X ", master->tx_data[i]); |
793 if ((i + 1) % 16 == 0) EC_DBG("\n" KERN_DEBUG); |
793 if ((i + 1) % 16 == 0) EC_DBG("\n" KERN_DEBUG); |
794 } |
794 } |
795 EC_DBG("\n"); |
795 EC_DBG("\n"); |
796 EC_DBG(KERN_DEBUG "EtherCAT: rx_data content:\n"); |
796 EC_DBG(KERN_DEBUG "EtherCAT: rx_data content:\n"); |
797 EC_DBG(KERN_DEBUG); |
797 EC_DBG(KERN_DEBUG); |
878 |
878 |
879 @param master EtherCAT-Master |
879 @param master EtherCAT-Master |
880 @param node_address Adresse des Knotens (Slaves) |
880 @param node_address Adresse des Knotens (Slaves) |
881 @param offset Physikalische Speicheradresse im Slave |
881 @param offset Physikalische Speicheradresse im Slave |
882 @param length Länge der zu lesenden Daten |
882 @param length Länge der zu lesenden Daten |
883 |
883 |
884 @return Adresse des Kommandos bei Erfolg, sonst NULL |
884 @return Adresse des Kommandos bei Erfolg, sonst NULL |
885 */ |
885 */ |
886 |
886 |
887 EtherCAT_command_t *EtherCAT_read(EtherCAT_master_t *master, |
887 EtherCAT_command_t *EtherCAT_read(EtherCAT_master_t *master, |
888 unsigned short node_address, |
888 unsigned short node_address, |
912 @param master EtherCAT-Master |
912 @param master EtherCAT-Master |
913 @param node_address Adresse des Knotens (Slaves) |
913 @param node_address Adresse des Knotens (Slaves) |
914 @param offset Physikalische Speicheradresse im Slave |
914 @param offset Physikalische Speicheradresse im Slave |
915 @param length Länge der zu schreibenden Daten |
915 @param length Länge der zu schreibenden Daten |
916 @param data Zeiger auf Speicher mit zu schreibenden Daten |
916 @param data Zeiger auf Speicher mit zu schreibenden Daten |
917 |
917 |
918 @return Adresse des Kommandos bei Erfolg, sonst NULL |
918 @return Adresse des Kommandos bei Erfolg, sonst NULL |
919 */ |
919 */ |
920 |
920 |
921 EtherCAT_command_t *EtherCAT_write(EtherCAT_master_t *master, |
921 EtherCAT_command_t *EtherCAT_write(EtherCAT_master_t *master, |
922 unsigned short node_address, |
922 unsigned short node_address, |
946 |
946 |
947 @param master EtherCAT-Master |
947 @param master EtherCAT-Master |
948 @param ring_position (Negative) Position des Slaves im Bus |
948 @param ring_position (Negative) Position des Slaves im Bus |
949 @param offset Physikalische Speicheradresse im Slave |
949 @param offset Physikalische Speicheradresse im Slave |
950 @param length Länge der zu lesenden Daten |
950 @param length Länge der zu lesenden Daten |
951 |
951 |
952 @return Adresse des Kommandos bei Erfolg, sonst NULL |
952 @return Adresse des Kommandos bei Erfolg, sonst NULL |
953 */ |
953 */ |
954 |
954 |
955 EtherCAT_command_t *EtherCAT_position_read(EtherCAT_master_t *master, |
955 EtherCAT_command_t *EtherCAT_position_read(EtherCAT_master_t *master, |
956 short ring_position, |
956 short ring_position, |
977 @param master EtherCAT-Master |
977 @param master EtherCAT-Master |
978 @param ring_position (Negative) Position des Slaves im Bus |
978 @param ring_position (Negative) Position des Slaves im Bus |
979 @param offset Physikalische Speicheradresse im Slave |
979 @param offset Physikalische Speicheradresse im Slave |
980 @param length Länge der zu schreibenden Daten |
980 @param length Länge der zu schreibenden Daten |
981 @param data Zeiger auf Speicher mit zu schreibenden Daten |
981 @param data Zeiger auf Speicher mit zu schreibenden Daten |
982 |
982 |
983 @return Adresse des Kommandos bei Erfolg, sonst NULL |
983 @return Adresse des Kommandos bei Erfolg, sonst NULL |
984 */ |
984 */ |
985 |
985 |
986 EtherCAT_command_t *EtherCAT_position_write(EtherCAT_master_t *master, |
986 EtherCAT_command_t *EtherCAT_position_write(EtherCAT_master_t *master, |
987 short ring_position, |
987 short ring_position, |
1007 und fügt es in die Liste des Masters ein. |
1007 und fügt es in die Liste des Masters ein. |
1008 |
1008 |
1009 @param master EtherCAT-Master |
1009 @param master EtherCAT-Master |
1010 @param offset Physikalische Speicheradresse im Slave |
1010 @param offset Physikalische Speicheradresse im Slave |
1011 @param length Länge der zu lesenden Daten |
1011 @param length Länge der zu lesenden Daten |
1012 |
1012 |
1013 @return Adresse des Kommandos bei Erfolg, sonst NULL |
1013 @return Adresse des Kommandos bei Erfolg, sonst NULL |
1014 */ |
1014 */ |
1015 |
1015 |
1016 EtherCAT_command_t *EtherCAT_broadcast_read(EtherCAT_master_t *master, |
1016 EtherCAT_command_t *EtherCAT_broadcast_read(EtherCAT_master_t *master, |
1017 unsigned short offset, |
1017 unsigned short offset, |
1036 |
1036 |
1037 @param master EtherCAT-Master |
1037 @param master EtherCAT-Master |
1038 @param offset Physikalische Speicheradresse im Slave |
1038 @param offset Physikalische Speicheradresse im Slave |
1039 @param length Länge der zu schreibenden Daten |
1039 @param length Länge der zu schreibenden Daten |
1040 @param data Zeiger auf Speicher mit zu schreibenden Daten |
1040 @param data Zeiger auf Speicher mit zu schreibenden Daten |
1041 |
1041 |
1042 @return Adresse des Kommandos bei Erfolg, sonst NULL |
1042 @return Adresse des Kommandos bei Erfolg, sonst NULL |
1043 */ |
1043 */ |
1044 |
1044 |
1045 EtherCAT_command_t *EtherCAT_broadcast_write(EtherCAT_master_t *master, |
1045 EtherCAT_command_t *EtherCAT_broadcast_write(EtherCAT_master_t *master, |
1046 unsigned short offset, |
1046 unsigned short offset, |
1066 |
1066 |
1067 @param master EtherCAT-Master |
1067 @param master EtherCAT-Master |
1068 @param offset Logische Speicheradresse |
1068 @param offset Logische Speicheradresse |
1069 @param length Länge der zu lesenden/schreibenden Daten |
1069 @param length Länge der zu lesenden/schreibenden Daten |
1070 @param data Zeiger auf Speicher mit zu lesenden/schreibenden Daten |
1070 @param data Zeiger auf Speicher mit zu lesenden/schreibenden Daten |
1071 |
1071 |
1072 @return Adresse des Kommandos bei Erfolg, sonst NULL |
1072 @return Adresse des Kommandos bei Erfolg, sonst NULL |
1073 */ |
1073 */ |
1074 |
1074 |
1075 EtherCAT_command_t *EtherCAT_logical_read_write(EtherCAT_master_t *master, |
1075 EtherCAT_command_t *EtherCAT_logical_read_write(EtherCAT_master_t *master, |
1076 unsigned int offset, |
1076 unsigned int offset, |
1092 |
1092 |
1093 Durchsucht den Kommandoring nach einem freien Kommando, |
1093 Durchsucht den Kommandoring nach einem freien Kommando, |
1094 reserviert es und gibt dessen Adresse zurück. |
1094 reserviert es und gibt dessen Adresse zurück. |
1095 |
1095 |
1096 @param master EtherCAT-Master |
1096 @param master EtherCAT-Master |
1097 |
1097 |
1098 @return Adresse des Kommandos bei Erfolg, sonst NULL |
1098 @return Adresse des Kommandos bei Erfolg, sonst NULL |
1099 */ |
1099 */ |
1100 |
1100 |
1101 EtherCAT_command_t *alloc_cmd(EtherCAT_master_t *master) |
1101 EtherCAT_command_t *alloc_cmd(EtherCAT_master_t *master) |
1102 { |
1102 { |
1103 int j; |
1103 int j; |
1104 |
1104 |
1105 for (j = 0; j < ECAT_COMMAND_RING_SIZE; j++) // Einmal rum suchen |
1105 for (j = 0; j < ECAT_COMMAND_RING_SIZE; j++) // Einmal rum suchen |
1106 { |
1106 { |
1107 // Solange suchen, bis freies Kommando gefunden |
1107 // Solange suchen, bis freies Kommando gefunden |
1108 if (master->cmd_reserved[master->cmd_ring_index] == 0) |
1108 if (master->cmd_reserved[master->cmd_ring_index] == 0) |
1109 { |
1109 { |
1110 master->cmd_reserved[master->cmd_ring_index] = 1; // Belegen |
1110 master->cmd_reserved[master->cmd_ring_index] = 1; // Belegen |
1111 |
1111 |
1178 ist. Wenn ja, wird es entfernt und die Reservierung wird |
1178 ist. Wenn ja, wird es entfernt und die Reservierung wird |
1179 aufgehoben. |
1179 aufgehoben. |
1180 |
1180 |
1181 @param master EtherCAT-Master |
1181 @param master EtherCAT-Master |
1182 @param rem_cmd Zeiger auf das zu entfernende Kommando |
1182 @param rem_cmd Zeiger auf das zu entfernende Kommando |
1183 |
1183 |
1184 @return 0 bei Erfolg, sonst < 0 |
1184 @return 0 bei Erfolg, sonst < 0 |
1185 */ |
1185 */ |
1186 |
1186 |
1187 void EtherCAT_remove_command(EtherCAT_master_t *master, |
1187 void EtherCAT_remove_command(EtherCAT_master_t *master, |
1188 EtherCAT_command_t *rem_cmd) |
1188 EtherCAT_command_t *rem_cmd) |
1227 |
1227 |
1228 @param master EtherCAT-Master |
1228 @param master EtherCAT-Master |
1229 @param slave Slave, dessen Zustand geändert werden soll |
1229 @param slave Slave, dessen Zustand geändert werden soll |
1230 @param state_and_ack Neuer Zustand, evtl. mit gesetztem |
1230 @param state_and_ack Neuer Zustand, evtl. mit gesetztem |
1231 Acknowledge-Flag |
1231 Acknowledge-Flag |
1232 |
1232 |
1233 @return 0 bei Erfolg, sonst < 0 |
1233 @return 0 bei Erfolg, sonst < 0 |
1234 */ |
1234 */ |
1235 |
1235 |
1236 int EtherCAT_state_change(EtherCAT_master_t *master, |
1236 int EtherCAT_state_change(EtherCAT_master_t *master, |
1237 EtherCAT_slave_t *slave, |
1237 EtherCAT_slave_t *slave, |
1252 } |
1252 } |
1253 |
1253 |
1254 if (EtherCAT_async_send_receive(master) != 0) |
1254 if (EtherCAT_async_send_receive(master) != 0) |
1255 { |
1255 { |
1256 EtherCAT_remove_command(master, cmd); |
1256 EtherCAT_remove_command(master, cmd); |
1257 |
1257 |
1258 EC_DBG(KERN_ERR "EtherCAT: Could not set state %02X - Unable to send!\n", state_and_ack); |
1258 EC_DBG(KERN_ERR "EtherCAT: Could not set state %02X - Unable to send!\n", state_and_ack); |
1259 return -2; |
1259 return -2; |
1260 } |
1260 } |
1261 |
1261 |
1262 if (cmd->working_counter != 1) |
1262 if (cmd->working_counter != 1) |
1263 { |
1263 { |
1264 EtherCAT_remove_command(master, cmd); |
1264 EtherCAT_remove_command(master, cmd); |
1265 |
1265 |
1266 EC_DBG(KERN_ERR "EtherCAT: Could not set state %02X - Device did not respond!\n", state_and_ack); |
1266 EC_DBG(KERN_ERR "EtherCAT: Could not set state %02X - Device did not respond!\n", state_and_ack); |
1267 return -3; |
1267 return -3; |
1268 } |
1268 } |
1269 |
1269 |
1270 EtherCAT_remove_command(master, cmd); |
1270 EtherCAT_remove_command(master, cmd); |
1271 |
1271 |
1272 slave->requested_state = state_and_ack & 0x0F; |
1272 slave->requested_state = state_and_ack & 0x0F; |
1273 |
1273 |
1274 tries_left = 1000; |
1274 tries_left = 1000; |
1275 |
1275 |
1281 0x0130, 2)) == NULL) |
1281 0x0130, 2)) == NULL) |
1282 { |
1282 { |
1283 EC_DBG(KERN_ERR "EtherCAT: Could not check state %02X - Out of memory!\n", state_and_ack); |
1283 EC_DBG(KERN_ERR "EtherCAT: Could not check state %02X - Out of memory!\n", state_and_ack); |
1284 return -1; |
1284 return -1; |
1285 } |
1285 } |
1286 |
1286 |
1287 if (EtherCAT_async_send_receive(master) != 0) |
1287 if (EtherCAT_async_send_receive(master) != 0) |
1288 { |
1288 { |
1289 EtherCAT_remove_command(master, cmd); |
1289 EtherCAT_remove_command(master, cmd); |
1290 |
1290 |
1291 EC_DBG(KERN_ERR "EtherCAT: Could not check state %02X - Unable to send!\n", state_and_ack); |
1291 EC_DBG(KERN_ERR "EtherCAT: Could not check state %02X - Unable to send!\n", state_and_ack); |
1292 return -2; |
1292 return -2; |
1293 } |
1293 } |
1294 |
1294 |
1295 if (cmd->working_counter != 1) |
1295 if (cmd->working_counter != 1) |
1296 { |
1296 { |
1297 EtherCAT_remove_command(master, cmd); |
1297 EtherCAT_remove_command(master, cmd); |
1298 |
1298 |
1299 EC_DBG(KERN_ERR "EtherCAT: Could not check state %02X - Device did not respond!\n", state_and_ack); |
1299 EC_DBG(KERN_ERR "EtherCAT: Could not check state %02X - Device did not respond!\n", state_and_ack); |
1300 return -3; |
1300 return -3; |
1301 } |
1301 } |
1302 |
1302 |
1303 if (cmd->data[0] & 0x10) // State change error |
1303 if (cmd->data[0] & 0x10) // State change error |
1304 { |
1304 { |
1305 EtherCAT_remove_command(master, cmd); |
1305 EtherCAT_remove_command(master, cmd); |
1306 |
1306 |
1307 EC_DBG(KERN_ERR "EtherCAT: Could not set state %02X - Device refused state change (code %02X)!\n", state_and_ack, cmd->data[0]); |
1307 EC_DBG(KERN_ERR "EtherCAT: Could not set state %02X - Device refused state change (code %02X)!\n", state_and_ack, cmd->data[0]); |
1308 return -4; |
1308 return -4; |
1309 } |
1309 } |
1310 |
1310 |
1311 if (cmd->data[0] == (state_and_ack & 0x0F)) // State change successful |
1311 if (cmd->data[0] == (state_and_ack & 0x0F)) // State change successful |
1312 { |
1312 { |
1313 EtherCAT_remove_command(master, cmd); |
1313 EtherCAT_remove_command(master, cmd); |
1314 |
1314 |
1315 break; |
1315 break; |
1316 } |
1316 } |
1317 |
1317 |
1318 EtherCAT_remove_command(master, cmd); |
1318 EtherCAT_remove_command(master, cmd); |
1319 |
1319 |
1320 tries_left--; |
1320 tries_left--; |
1321 } |
1321 } |
1322 |
1322 |
1323 if (!tries_left) |
1323 if (!tries_left) |
1324 { |
1324 { |
1340 setzt Sync-Manager und FMMU's, führt die entsprechenden |
1340 setzt Sync-Manager und FMMU's, führt die entsprechenden |
1341 Zustandsübergänge durch, bis der Slave betriebsbereit ist. |
1341 Zustandsübergänge durch, bis der Slave betriebsbereit ist. |
1342 |
1342 |
1343 @param master EtherCAT-Master |
1343 @param master EtherCAT-Master |
1344 @param slave Zu aktivierender Slave |
1344 @param slave Zu aktivierender Slave |
1345 |
1345 |
1346 @return 0 bei Erfolg, sonst < 0 |
1346 @return 0 bei Erfolg, sonst < 0 |
1347 */ |
1347 */ |
1348 |
1348 |
1349 int EtherCAT_activate_slave(EtherCAT_master_t *master, |
1349 int EtherCAT_activate_slave(EtherCAT_master_t *master, |
1350 EtherCAT_slave_t *slave) |
1350 EtherCAT_slave_t *slave) |
1369 return -1; |
1369 return -1; |
1370 |
1370 |
1371 if (EtherCAT_async_send_receive(master) < 0) |
1371 if (EtherCAT_async_send_receive(master) < 0) |
1372 { |
1372 { |
1373 EtherCAT_remove_command(master, cmd); |
1373 EtherCAT_remove_command(master, cmd); |
1374 |
1374 |
1375 return -1; |
1375 return -1; |
1376 } |
1376 } |
1377 |
1377 |
1378 if (cmd->working_counter != 1) |
1378 if (cmd->working_counter != 1) |
1379 { |
1379 { |
1380 EtherCAT_remove_command(master, cmd); |
1380 EtherCAT_remove_command(master, cmd); |
1381 |
1381 |
1382 EC_DBG(KERN_ERR "EtherCAT: Resetting FMMUs - Slave %04X did not respond!\n", |
1382 EC_DBG(KERN_ERR "EtherCAT: Resetting FMMUs - Slave %04X did not respond!\n", |
1383 slave->station_address); |
1383 slave->station_address); |
1384 return -2; |
1384 return -2; |
1385 } |
1385 } |
1386 |
1386 |
1396 return -1; |
1396 return -1; |
1397 |
1397 |
1398 if (EtherCAT_async_send_receive(master) < 0) |
1398 if (EtherCAT_async_send_receive(master) < 0) |
1399 { |
1399 { |
1400 EtherCAT_remove_command(master, cmd); |
1400 EtherCAT_remove_command(master, cmd); |
1401 |
1401 |
1402 return -1; |
1402 return -1; |
1403 } |
1403 } |
1404 |
1404 |
1405 if (cmd->working_counter != 1) |
1405 if (cmd->working_counter != 1) |
1406 { |
1406 { |
1407 EtherCAT_remove_command(master, cmd); |
1407 EtherCAT_remove_command(master, cmd); |
1408 |
1408 |
1409 EC_DBG(KERN_ERR "EtherCAT: Resetting SMs - Slave %04X did not respond!\n", |
1409 EC_DBG(KERN_ERR "EtherCAT: Resetting SMs - Slave %04X did not respond!\n", |
1410 slave->station_address); |
1410 slave->station_address); |
1411 return -2; |
1411 return -2; |
1412 } |
1412 } |
1413 |
1413 |
1420 { |
1420 { |
1421 if (desc->sm0) |
1421 if (desc->sm0) |
1422 { |
1422 { |
1423 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0800, 8, desc->sm0)) == NULL) |
1423 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0800, 8, desc->sm0)) == NULL) |
1424 return -1; |
1424 return -1; |
1425 |
1425 |
1426 if (EtherCAT_async_send_receive(master) < 0) |
1426 if (EtherCAT_async_send_receive(master) < 0) |
1427 { |
1427 { |
1428 EtherCAT_remove_command(master, cmd); |
1428 EtherCAT_remove_command(master, cmd); |
1429 |
1429 |
1430 return -1; |
1430 return -1; |
1431 } |
1431 } |
1432 |
1432 |
1433 if (cmd->working_counter != 1) |
1433 if (cmd->working_counter != 1) |
1434 { |
1434 { |
1435 EtherCAT_remove_command(master, cmd); |
1435 EtherCAT_remove_command(master, cmd); |
1436 |
1436 |
1437 EC_DBG(KERN_ERR "EtherCAT: Setting SM0 - Slave %04X did not respond!\n", |
1437 EC_DBG(KERN_ERR "EtherCAT: Setting SM0 - Slave %04X did not respond!\n", |
1438 slave->station_address); |
1438 slave->station_address); |
1439 return -3; |
1439 return -3; |
1440 } |
1440 } |
1441 |
1441 |
1442 EtherCAT_remove_command(master, cmd); |
1442 EtherCAT_remove_command(master, cmd); |
1443 } |
1443 } |
1444 |
1444 |
1445 if (desc->sm1) |
1445 if (desc->sm1) |
1446 { |
1446 { |
1447 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0808, 8, desc->sm1)) == NULL) |
1447 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0808, 8, desc->sm1)) == NULL) |
1448 return -1; |
1448 return -1; |
1449 |
1449 |
1450 if (EtherCAT_async_send_receive(master) < 0) |
1450 if (EtherCAT_async_send_receive(master) < 0) |
1451 { |
1451 { |
1452 EtherCAT_remove_command(master, cmd); |
1452 EtherCAT_remove_command(master, cmd); |
1453 |
1453 |
1454 return -1; |
1454 return -1; |
1455 } |
1455 } |
1456 |
1456 |
1457 if (cmd->working_counter != 1) |
1457 if (cmd->working_counter != 1) |
1458 { |
1458 { |
1459 EtherCAT_remove_command(master, cmd); |
1459 EtherCAT_remove_command(master, cmd); |
1460 |
1460 |
1461 EC_DBG(KERN_ERR "EtherCAT: Setting SM1 - Slave %04X did not respond!\n", |
1461 EC_DBG(KERN_ERR "EtherCAT: Setting SM1 - Slave %04X did not respond!\n", |
1462 slave->station_address); |
1462 slave->station_address); |
1463 return -2; |
1463 return -2; |
1464 } |
1464 } |
1465 |
1465 |
1466 EtherCAT_remove_command(master, cmd); |
1466 EtherCAT_remove_command(master, cmd); |
1467 } |
1467 } |
1468 } |
1468 } |
1469 |
1469 |
1470 // Change state to PREOP |
1470 // Change state to PREOP |
1479 if (desc->fmmu0) |
1479 if (desc->fmmu0) |
1480 { |
1480 { |
1481 memcpy(fmmu, desc->fmmu0, 16); |
1481 memcpy(fmmu, desc->fmmu0, 16); |
1482 |
1482 |
1483 fmmu[0] = slave->logical_address0 & 0x000000FF; |
1483 fmmu[0] = slave->logical_address0 & 0x000000FF; |
1484 fmmu[1] = (slave->logical_address0 & 0x0000FF00) >> 8; |
1484 fmmu[1] = (slave->logical_address0 & 0x0000FF00) >> 8; |
1485 fmmu[2] = (slave->logical_address0 & 0x00FF0000) >> 16; |
1485 fmmu[2] = (slave->logical_address0 & 0x00FF0000) >> 16; |
1486 fmmu[3] = (slave->logical_address0 & 0xFF000000) >> 24; |
1486 fmmu[3] = (slave->logical_address0 & 0xFF000000) >> 24; |
1487 |
1487 |
1488 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0600, 16, fmmu)) == NULL) |
1488 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0600, 16, fmmu)) == NULL) |
1489 return -1; |
1489 return -1; |
1490 |
1490 |
1491 if (EtherCAT_async_send_receive(master) < 0) |
1491 if (EtherCAT_async_send_receive(master) < 0) |
1492 { |
1492 { |
1493 EtherCAT_remove_command(master, cmd); |
1493 EtherCAT_remove_command(master, cmd); |
1494 |
1494 |
1495 return -1; |
1495 return -1; |
1496 } |
1496 } |
1497 |
1497 |
1498 if (cmd->working_counter != 1) |
1498 if (cmd->working_counter != 1) |
1499 { |
1499 { |
1500 EtherCAT_remove_command(master, cmd); |
1500 EtherCAT_remove_command(master, cmd); |
1501 |
1501 |
1502 EC_DBG(KERN_ERR "EtherCAT: Setting FMMU0 - Slave %04X did not respond!\n", |
1502 EC_DBG(KERN_ERR "EtherCAT: Setting FMMU0 - Slave %04X did not respond!\n", |
1503 slave->station_address); |
1503 slave->station_address); |
1504 return -2; |
1504 return -2; |
1505 } |
1505 } |
1506 |
1506 |
1513 { |
1513 { |
1514 if (desc->sm0) |
1514 if (desc->sm0) |
1515 { |
1515 { |
1516 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0800, 8, desc->sm0)) == NULL) |
1516 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0800, 8, desc->sm0)) == NULL) |
1517 return -1; |
1517 return -1; |
1518 |
1518 |
1519 if (EtherCAT_async_send_receive(master) < 0) |
1519 if (EtherCAT_async_send_receive(master) < 0) |
1520 { |
1520 { |
1521 EtherCAT_remove_command(master, cmd); |
1521 EtherCAT_remove_command(master, cmd); |
1522 |
1522 |
1523 return -1; |
1523 return -1; |
1524 } |
1524 } |
1525 |
1525 |
1526 if (cmd->working_counter != 1) |
1526 if (cmd->working_counter != 1) |
1527 { |
1527 { |
1528 EtherCAT_remove_command(master, cmd); |
1528 EtherCAT_remove_command(master, cmd); |
1529 |
1529 |
1530 EC_DBG(KERN_ERR "EtherCAT: Setting SM0 - Slave %04X did not respond!\n", |
1530 EC_DBG(KERN_ERR "EtherCAT: Setting SM0 - Slave %04X did not respond!\n", |
1531 slave->station_address); |
1531 slave->station_address); |
1532 return -3; |
1532 return -3; |
1533 } |
1533 } |
1534 |
1534 |
1535 EtherCAT_remove_command(master, cmd); |
1535 EtherCAT_remove_command(master, cmd); |
1536 } |
1536 } |
1537 |
1537 |
1538 if (desc->sm1) |
1538 if (desc->sm1) |
1539 { |
1539 { |
1540 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0808, 8, desc->sm1)) == NULL) |
1540 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0808, 8, desc->sm1)) == NULL) |
1541 return -1; |
1541 return -1; |
1542 |
1542 |
1543 if (EtherCAT_async_send_receive(master) < 0) |
1543 if (EtherCAT_async_send_receive(master) < 0) |
1544 { |
1544 { |
1545 EtherCAT_remove_command(master, cmd); |
1545 EtherCAT_remove_command(master, cmd); |
1546 |
1546 |
1547 return -1; |
1547 return -1; |
1548 } |
1548 } |
1549 |
1549 |
1550 if (cmd->working_counter != 1) |
1550 if (cmd->working_counter != 1) |
1551 { |
1551 { |
1552 EtherCAT_remove_command(master, cmd); |
1552 EtherCAT_remove_command(master, cmd); |
1553 |
1553 |
1554 EC_DBG(KERN_ERR "EtherCAT: Setting SM1 - Slave %04X did not respond!\n", |
1554 EC_DBG(KERN_ERR "EtherCAT: Setting SM1 - Slave %04X did not respond!\n", |
1555 slave->station_address); |
1555 slave->station_address); |
1556 return -3; |
1556 return -3; |
1557 } |
1557 } |
1558 |
1558 |
1559 EtherCAT_remove_command(master, cmd); |
1559 EtherCAT_remove_command(master, cmd); |
1560 } |
1560 } |
1561 } |
1561 } |
1562 |
1562 |
1563 if (desc->sm2) |
1563 if (desc->sm2) |
1564 { |
1564 { |
1565 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0810, 8, desc->sm2)) == NULL) |
1565 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0810, 8, desc->sm2)) == NULL) |
1566 return -1; |
1566 return -1; |
1567 |
1567 |
1568 if (EtherCAT_async_send_receive(master) < 0) |
1568 if (EtherCAT_async_send_receive(master) < 0) |
1569 { |
1569 { |
1570 EtherCAT_remove_command(master, cmd); |
1570 EtherCAT_remove_command(master, cmd); |
1571 |
1571 |
1572 return -1; |
1572 return -1; |
1573 } |
1573 } |
1574 |
1574 |
1575 if (cmd->working_counter != 1) |
1575 if (cmd->working_counter != 1) |
1576 { |
1576 { |
1577 EtherCAT_remove_command(master, cmd); |
1577 EtherCAT_remove_command(master, cmd); |
1578 |
1578 |
1579 EC_DBG(KERN_ERR "EtherCAT: Setting SM2 - Slave %04X did not respond!\n", |
1579 EC_DBG(KERN_ERR "EtherCAT: Setting SM2 - Slave %04X did not respond!\n", |
1580 slave->station_address); |
1580 slave->station_address); |
1581 return -3; |
1581 return -3; |
1582 } |
1582 } |
1583 |
1583 |
1584 EtherCAT_remove_command(master, cmd); |
1584 EtherCAT_remove_command(master, cmd); |
1585 } |
1585 } |
1586 |
1586 |
1587 if (desc->sm3) |
1587 if (desc->sm3) |
1588 { |
1588 { |
1589 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0818, 8, desc->sm3)) == NULL) |
1589 if ((cmd = EtherCAT_write(master, slave->station_address, 0x0818, 8, desc->sm3)) == NULL) |
1590 return -1; |
1590 return -1; |
1591 |
1591 |
1592 if (EtherCAT_async_send_receive(master) < 0) |
1592 if (EtherCAT_async_send_receive(master) < 0) |
1593 { |
1593 { |
1594 EtherCAT_remove_command(master, cmd); |
1594 EtherCAT_remove_command(master, cmd); |
1595 |
1595 |
1596 return -1; |
1596 return -1; |
1597 } |
1597 } |
1598 |
1598 |
1599 if (cmd->working_counter != 1) |
1599 if (cmd->working_counter != 1) |
1600 { |
1600 { |
1601 EtherCAT_remove_command(master, cmd); |
1601 EtherCAT_remove_command(master, cmd); |
1602 |
1602 |
1603 EC_DBG(KERN_ERR "EtherCAT: Setting SM3 - Slave %04X did not respond!\n", |
1603 EC_DBG(KERN_ERR "EtherCAT: Setting SM3 - Slave %04X did not respond!\n", |
1604 slave->station_address); |
1604 slave->station_address); |
1605 return -3; |
1605 return -3; |
1606 } |
1606 } |
1607 |
1607 |
1608 EtherCAT_remove_command(master, cmd); |
1608 EtherCAT_remove_command(master, cmd); |
1609 } |
1609 } |
1610 |
1610 |
1611 // Change state to SAVEOP |
1611 // Change state to SAVEOP |
1612 if (EtherCAT_state_change(master, slave, ECAT_STATE_SAVEOP) != 0) |
1612 if (EtherCAT_state_change(master, slave, ECAT_STATE_SAVEOP) != 0) |
1628 /** |
1628 /** |
1629 Setzt einen Slave zurück in den Init-Zustand. |
1629 Setzt einen Slave zurück in den Init-Zustand. |
1630 |
1630 |
1631 @param master EtherCAT-Master |
1631 @param master EtherCAT-Master |
1632 @param slave Zu deaktivierender Slave |
1632 @param slave Zu deaktivierender Slave |
1633 |
1633 |
1634 @return 0 bei Erfolg, sonst < 0 |
1634 @return 0 bei Erfolg, sonst < 0 |
1635 */ |
1635 */ |
1636 |
1636 |
1637 int EtherCAT_deactivate_slave(EtherCAT_master_t *master, |
1637 int EtherCAT_deactivate_slave(EtherCAT_master_t *master, |
1638 EtherCAT_slave_t *slave) |
1638 EtherCAT_slave_t *slave) |
1651 Aktiviert alle Slaves. |
1651 Aktiviert alle Slaves. |
1652 |
1652 |
1653 @see EtherCAT_activate_slave |
1653 @see EtherCAT_activate_slave |
1654 |
1654 |
1655 @param master EtherCAT-Master |
1655 @param master EtherCAT-Master |
1656 |
1656 |
1657 @return 0 bei Erfolg, sonst < 0 |
1657 @return 0 bei Erfolg, sonst < 0 |
1658 */ |
1658 */ |
1659 |
1659 |
1660 int EtherCAT_activate_all_slaves(EtherCAT_master_t *master) |
1660 int EtherCAT_activate_all_slaves(EtherCAT_master_t *master) |
1661 { |
1661 { |
1678 Deaktiviert alle Slaves. |
1678 Deaktiviert alle Slaves. |
1679 |
1679 |
1680 @see EtherCAT_deactivate_slave |
1680 @see EtherCAT_deactivate_slave |
1681 |
1681 |
1682 @param master EtherCAT-Master |
1682 @param master EtherCAT-Master |
1683 |
1683 |
1684 @return 0 bei Erfolg, sonst < 0 |
1684 @return 0 bei Erfolg, sonst < 0 |
1685 */ |
1685 */ |
1686 |
1686 |
1687 int EtherCAT_deactivate_all_slaves(EtherCAT_master_t *master) |
1687 int EtherCAT_deactivate_all_slaves(EtherCAT_master_t *master) |
1688 { |
1688 { |
1707 |
1707 |
1708 Erstellt ein "logical read write"-Kommando mit den |
1708 Erstellt ein "logical read write"-Kommando mit den |
1709 Prozessdaten des Masters und sendet es an den Bus. |
1709 Prozessdaten des Masters und sendet es an den Bus. |
1710 |
1710 |
1711 @param master EtherCAT-Master |
1711 @param master EtherCAT-Master |
1712 |
1712 |
1713 @return 0 bei Erfolg, sonst < 0 |
1713 @return 0 bei Erfolg, sonst < 0 |
1714 */ |
1714 */ |
1715 |
1715 |
1716 int EtherCAT_write_process_data(EtherCAT_master_t *master) |
1716 int EtherCAT_write_process_data(EtherCAT_master_t *master) |
1717 { |
1717 { |
1751 Empfängt ein zuvor gesendetes "logical read write"-Kommando |
1751 Empfängt ein zuvor gesendetes "logical read write"-Kommando |
1752 und kopiert die empfangenen daten in den Prozessdatenspeicher |
1752 und kopiert die empfangenen daten in den Prozessdatenspeicher |
1753 des Masters. |
1753 des Masters. |
1754 |
1754 |
1755 @param master EtherCAT-Master |
1755 @param master EtherCAT-Master |
1756 |
1756 |
1757 @return 0 bei Erfolg, sonst < 0 |
1757 @return 0 bei Erfolg, sonst < 0 |
1758 */ |
1758 */ |
1759 |
1759 |
1760 int EtherCAT_read_process_data(EtherCAT_master_t *master) |
1760 int EtherCAT_read_process_data(EtherCAT_master_t *master) |
1761 { |
1761 { |