2897 is ambiguous. If the number of slaves is considered as right, the |
2897 is ambiguous. If the number of slaves is considered as right, the |
2898 bus is marked for validation, because it turned from tainted to |
2898 bus is marked for validation, because it turned from tainted to |
2899 normal state and it has to be checked, if all slaves are valid. Now, |
2899 normal state and it has to be checked, if all slaves are valid. Now, |
2900 the state of every single slave has to be determined. For that, a |
2900 the state of every single slave has to be determined. For that, a |
2901 (unicast) datagram is issued, that queries the first slave's ``AL |
2901 (unicast) datagram is issued, that queries the first slave's ``AL |
2902 Control Response'' attribute. $\rightarrow$~\textit{READ STATES} |
2902 Control Response'' attribute. $\rightarrow$~READ STATES |
2903 |
2903 |
2904 \item[READ STATES] If the current slave did not respond to its |
2904 \item[READ STATES] If the current slave did not respond to its |
2905 configured station address, it is marked as offline, and the next |
2905 configured station address, it is marked as offline, and the next |
2906 slave is queried. $\rightarrow$~\textit{READ STATES} |
2906 slave is queried. $\rightarrow$~READ STATES |
2907 |
2907 |
2908 If the slave responded, it is marked as online and its current state |
2908 If the slave responded, it is marked as online and its current state |
2909 is stored. The next slave is queried. $\rightarrow$~\textit{READ |
2909 is stored. The next slave is queried. $\rightarrow$~READ STATES |
2910 STATES} |
|
2911 |
2910 |
2912 If all slaves have been queried, and the bus is marked for |
2911 If all slaves have been queried, and the bus is marked for |
2913 validation, the validation is started by checking the first slaves |
2912 validation, the validation is started by checking the first slaves |
2914 vendor ID. $\rightarrow$~\textit{VALIDATE VENDOR} |
2913 vendor ID. $\rightarrow$~VALIDATE VENDOR |
2915 |
2914 |
2916 If no validation has to be done, it is checked, if all slaves are in |
2915 If no validation has to be done, it is checked, if all slaves are in |
2917 the state they are supposed to be. If not, the first of slave with |
2916 the state they are supposed to be. If not, the first of slave with |
2918 the wrong state is reconfigured and brought in the required state. |
2917 the wrong state is reconfigured and brought in the required state. |
2919 $\rightarrow$~\textit{CONFIGURE SLAVES} |
2918 $\rightarrow$~CONFIGURE SLAVES |
2920 |
2919 |
2921 If all slaves are in the correct state, the state machine is |
2920 If all slaves are in the correct state, the state machine is |
2922 restarted. $\rightarrow$~\textit{START} |
2921 restarted. $\rightarrow$~START |
2923 |
2922 |
2924 \item[CONFIGURE SLAVES] The slave configuration state machine is |
2923 \item[CONFIGURE SLAVES] The slave configuration state machine is |
2925 executed until termination. $\rightarrow$~\textit{CONFIGURE SLAVES} |
2924 executed until termination. $\rightarrow$~CONFIGURE SLAVES |
2926 |
2925 |
2927 If there are still slaves in the wrong state after another check, |
2926 If there are still slaves in the wrong state after another check, |
2928 the first of these slaves is configured and brought into the correct |
2927 the first of these slaves is configured and brought into the correct |
2929 state again. $\rightarrow$~\textit{CONFIGURE SLAVES} |
2928 state again. $\rightarrow$~CONFIGURE SLAVES |
2930 |
2929 |
2931 If all slaves are in the correct state, the state machine is |
2930 If all slaves are in the correct state, the state machine is |
2932 restarted. $\rightarrow$~\textit{START} |
2931 restarted. $\rightarrow$~START |
2933 |
2932 |
2934 \item[VALIDATE VENDOR] The SII state machine is executed until |
2933 \item[VALIDATE VENDOR] The SII state machine is executed until |
2935 termination. If the slave has the wrong vendor ID, the state machine |
2934 termination. If the slave has the wrong vendor ID, the state machine |
2936 is restarted. $\rightarrow$~\textit{START} |
2935 is restarted. $\rightarrow$~START |
2937 |
2936 |
2938 If the slave has the correct vendor ID, its product ID is queried. |
2937 If the slave has the correct vendor ID, its product ID is queried. |
2939 $\rightarrow$~\textit{VALIDATE PRODUCT} |
2938 $\rightarrow$~VALIDATE PRODUCT |
2940 |
2939 |
2941 \item[VALIDATE PRODUCT] The SII state machine is executed until |
2940 \item[VALIDATE PRODUCT] The SII state machine is executed until |
2942 termination. If the slave has the wrong product ID, the state |
2941 termination. If the slave has the wrong product ID, the state |
2943 machine is restarted. $\rightarrow$~\textit{START} |
2942 machine is restarted. $\rightarrow$~START |
2944 |
2943 |
2945 If the slave has the correct product ID, the next slave's vendor ID |
2944 If the slave has the correct product ID, the next slave's vendor ID |
2946 is queried. $\rightarrow$~\textit{VALIDATE VENDOR} |
2945 is queried. $\rightarrow$~VALIDATE VENDOR |
2947 |
2946 |
2948 If all slaves have the correct vendor IDs and product codes, the |
2947 If all slaves have the correct vendor IDs and product codes, the |
2949 configured station addresses can be safely rewritten. This is done |
2948 configured station addresses can be safely rewritten. This is done |
2950 for the first slave marked as offline. |
2949 for the first slave marked as offline. |
2951 $\rightarrow$~\textit{REWRITE ADDRESSES} |
2950 $\rightarrow$~REWRITE ADDRESSES |
2952 |
2951 |
2953 \item[REWRITE ADDRESSES] If the station address was successfully |
2952 \item[REWRITE ADDRESSES] If the station address was successfully |
2954 written, it is sear\-ched for the next slave marked as offline. If |
2953 written, it is sear\-ched for the next slave marked as offline. If |
2955 there is one, its address is reconfigured, too. |
2954 there is one, its address is reconfigured, too. |
2956 $\rightarrow$~\textit{REWRITE ADDRESSES} |
2955 $\rightarrow$~REWRITE ADDRESSES |
2957 |
2956 |
2958 If there are no more slaves marked as offline, the state machine is |
2957 If there are no more slaves marked as offline, the state machine is |
2959 restarted. $\rightarrow$~\textit{START} |
2958 restarted. $\rightarrow$~START |
2960 \end{description} |
2959 \end{description} |
2961 |
2960 |
2962 %------------------------------------------------------------------------------ |
2961 %------------------------------------------------------------------------------ |
2963 |
2962 |
2964 \subsection{The Idle State Machine} |
2963 \subsection{The Idle State Machine} |
2980 |
2979 |
2981 \begin{description} |
2980 \begin{description} |
2982 \item[START] The beginning state of the idle state machine. Similar to |
2981 \item[START] The beginning state of the idle state machine. Similar to |
2983 the operation state machine, a broadcast datagram is issued, to |
2982 the operation state machine, a broadcast datagram is issued, to |
2984 query all slave states and the number of slaves. |
2983 query all slave states and the number of slaves. |
2985 $\rightarrow$~\textit{BROADCAST} |
2984 $\rightarrow$~BROADCAST |
2986 |
2985 |
2987 \item[BROADCAST] The number of responding slaves is evaluated. If it |
2986 \item[BROADCAST] The number of responding slaves is evaluated. If it |
2988 has changed since the last time, this is treated as a topology |
2987 has changed since the last time, this is treated as a topology |
2989 change and the internal list of slaves is cleared and rebuild |
2988 change and the internal list of slaves is cleared and rebuild |
2990 completely. The slave scan state machine is started for the first |
2989 completely. The slave scan state machine is started for the first |
2991 slave. $\rightarrow$~\textit{SCAN FOR SLAVES} |
2990 slave. $\rightarrow$~SCAN FOR SLAVES |
2992 |
2991 |
2993 If no topology change happened, every single slave state is fetched. |
2992 If no topology change happened, every single slave state is fetched. |
2994 $\rightarrow$~\textit{READ STATES} |
2993 $\rightarrow$~READ STATES |
2995 |
2994 |
2996 \item[SCAN FOR SLAVES] The slave scan state machine is executed until |
2995 \item[SCAN FOR SLAVES] The slave scan state machine is executed until |
2997 termination. $\rightarrow$~\textit{SCAN FOR SLAVES} |
2996 termination. $\rightarrow$~SCAN FOR SLAVES |
2998 |
2997 |
2999 If there is another slave to scan, the slave scan state machine is |
2998 If there is another slave to scan, the slave scan state machine is |
3000 started again. $\rightarrow$~\textit{SCAN FOR SLAVES} |
2999 started again. $\rightarrow$~SCAN FOR SLAVES |
3001 |
3000 |
3002 If all slave information has been fetched, slave addresses are |
3001 If all slave information has been fetched, slave addresses are |
3003 calculated and EoE processing is started. Then, the state machine is |
3002 calculated and EoE processing is started. Then, the state machine is |
3004 restarted. $\rightarrow$~\textit{START} |
3003 restarted. $\rightarrow$~START |
3005 |
3004 |
3006 \item[READ STATES] If the slave did not respond to the query, it is |
3005 \item[READ STATES] If the slave did not respond to the query, it is |
3007 marked as offline. The next slave is queried. |
3006 marked as offline. The next slave is queried. |
3008 $\rightarrow$~\textit{READ STATES} |
3007 $\rightarrow$~READ STATES |
3009 |
3008 |
3010 If the slave responded, it is marked as online. And the next slave |
3009 If the slave responded, it is marked as online. And the next slave |
3011 is queried. $\rightarrow$~\textit{READ STATES} |
3010 is queried. $\rightarrow$~READ STATES |
3012 |
3011 |
3013 If all slave states have been determined, it is checked, if any |
3012 If all slave states have been determined, it is checked, if any |
3014 slaves are not in the state they supposed to be. If this is true, |
3013 slaves are not in the state they supposed to be. If this is true, |
3015 the slave configuration state machine is started for the first of |
3014 the slave configuration state machine is started for the first of |
3016 them. $\rightarrow$~\textit{CONFIGURE SLAVES} |
3015 them. $\rightarrow$~CONFIGURE SLAVES |
3017 |
3016 |
3018 If all slaves are in the correct state, it is checked, if any |
3017 If all slaves are in the correct state, it is checked, if any |
3019 E$^2$PROM write operations are pending. If this is true, the first |
3018 E$^2$PROM write operations are pending. If this is true, the first |
3020 pending operation is executed by starting the SII state machine for |
3019 pending operation is executed by starting the SII state machine for |
3021 writing access. $\rightarrow$~\textit{WRITE EEPROM} |
3020 writing access. $\rightarrow$~WRITE EEPROM |
3022 |
3021 |
3023 If all these conditions are false, there is nothing to do and the |
3022 If all these conditions are false, there is nothing to do and the |
3024 state machine is restarted. $\rightarrow$~\textit{START} |
3023 state machine is restarted. $\rightarrow$~START |
3025 |
3024 |
3026 \item[CONFIGURE SLAVES] The slave configuration state machine is |
3025 \item[CONFIGURE SLAVES] The slave configuration state machine is |
3027 executed until termination. $\rightarrow$~\textit{CONFIGURE SLAVES} |
3026 executed until termination. $\rightarrow$~CONFIGURE SLAVES |
3028 |
3027 |
3029 After this, it is checked, if another slave needs a state change. If |
3028 After this, it is checked, if another slave needs a state change. If |
3030 this is true, the slave state change state machine is started for |
3029 this is true, the slave state change state machine is started for |
3031 this slave. $\rightarrow$~\textit{CONFIGURE SLAVES} |
3030 this slave. $\rightarrow$~CONFIGURE SLAVES |
3032 |
3031 |
3033 If all slaves are in the correct state, it is determined, if any |
3032 If all slaves are in the correct state, it is determined, if any |
3034 E$^2$PROM write operations are pending. If this is true, the first |
3033 E$^2$PROM write operations are pending. If this is true, the first |
3035 pending operation is executed by starting the SII state machine for |
3034 pending operation is executed by starting the SII state machine for |
3036 writing access. $\rightarrow$~\textit{WRITE EEPROM} |
3035 writing access. $\rightarrow$~WRITE EEPROM |
3037 |
3036 |
3038 If all prior conditions are false, the state machine is restarted. |
3037 If all prior conditions are false, the state machine is restarted. |
3039 $\rightarrow$~\textit{START} |
3038 $\rightarrow$~START |
3040 |
3039 |
3041 \item[WRITE EEPROM] The SII state machine is executed until |
3040 \item[WRITE EEPROM] The SII state machine is executed until |
3042 termination. $\rightarrow$~\textit{WRITE EEPROM} |
3041 termination. $\rightarrow$~WRITE EEPROM |
3043 |
3042 |
3044 If the current word has been written successfully, and there are |
3043 If the current word has been written successfully, and there are |
3045 still word to write, the SII state machine is started for the next |
3044 still word to write, the SII state machine is started for the next |
3046 word. $\rightarrow$~\textit{WRITE EEPROM} |
3045 word. $\rightarrow$~WRITE EEPROM |
3047 |
3046 |
3048 If all words have been written successfully, the new E$^2$PROM |
3047 If all words have been written successfully, the new E$^2$PROM |
3049 contents are evaluated and the state machine is restarted. |
3048 contents are evaluated and the state machine is restarted. |
3050 $\rightarrow$~\textit{START} |
3049 $\rightarrow$~START |
3051 |
3050 |
3052 \end{description} |
3051 \end{description} |
3053 |
3052 |
3054 %------------------------------------------------------------------------------ |
3053 %------------------------------------------------------------------------------ |
3055 |
3054 |
3071 \begin{description} |
3070 \begin{description} |
3072 \item[START] In the beginning state of the slave scan state machine, |
3071 \item[START] In the beginning state of the slave scan state machine, |
3073 the station address is written to the slave, which is always the |
3072 the station address is written to the slave, which is always the |
3074 ring position~+~$1$. In this way, the address 0x0000 (default |
3073 ring position~+~$1$. In this way, the address 0x0000 (default |
3075 address) is not used, which makes it easy to detect unconfigured |
3074 address) is not used, which makes it easy to detect unconfigured |
3076 slaves. $\rightarrow$~\textit{ADDRESS} |
3075 slaves. $\rightarrow$~ADDRESS |
3077 |
3076 |
3078 \item[ADDRESS] The writing of the station address is verified. After |
3077 \item[ADDRESS] The writing of the station address is verified. After |
3079 that, the slave's ``AL Control Response'' attribute is queried. |
3078 that, the slave's ``AL Control Response'' attribute is queried. |
3080 $\rightarrow$~\textit{STATE} |
3079 $\rightarrow$~STATE |
3081 |
3080 |
3082 \item[STATE] The AL state is evaluated. A warning is output, if the |
3081 \item[STATE] The AL state is evaluated. A warning is output, if the |
3083 slave has still the \textit{Change} bit set. After that, the slave's |
3082 slave has still the \textit{Change} bit set. After that, the slave's |
3084 ``DL Information'' attribute is queried. |
3083 ``DL Information'' attribute is queried. |
3085 $\rightarrow$~\textit{BASE} |
3084 $\rightarrow$~BASE |
3086 |
3085 |
3087 \item[BASE] The queried base data are evaluated: Slave type, revision |
3086 \item[BASE] The queried base data are evaluated: Slave type, revision |
3088 and build number, and even more important, the number of supported |
3087 and build number, and even more important, the number of supported |
3089 sync managers and FMMUs are stored. After that, the slave's data |
3088 sync managers and FMMUs are stored. After that, the slave's data |
3090 link layer information is read from the ``DL Status'' attribute at |
3089 link layer information is read from the ``DL Status'' attribute at |
3091 address 0x0110. $\rightarrow$~\textit{DATALINK} |
3090 address 0x0110. $\rightarrow$~DATALINK |
3092 |
3091 |
3093 \item[DATALINK] In this state, the DL information is evaluated: This |
3092 \item[DATALINK] In this state, the DL information is evaluated: This |
3094 information about the communication ports contains, if the link is |
3093 information about the communication ports contains, if the link is |
3095 up, if the loop has been closed and if there is a carrier detected |
3094 up, if the loop has been closed and if there is a carrier detected |
3096 on the RX side of each port. |
3095 on the RX side of each port. |
3098 Then, the state machine starts measuring the size of the slave's |
3097 Then, the state machine starts measuring the size of the slave's |
3099 E$^2$PROM contents. This is done by subsequently reading out each |
3098 E$^2$PROM contents. This is done by subsequently reading out each |
3100 category header, until the last category is reached (type 0xFFFF). |
3099 category header, until the last category is reached (type 0xFFFF). |
3101 This procedure is started by querying the first category header at |
3100 This procedure is started by querying the first category header at |
3102 word address 0x0040 via the SII state machine. |
3101 word address 0x0040 via the SII state machine. |
3103 $\rightarrow$~\textit{EEPROM SIZE} |
3102 $\rightarrow$~EEPROM SIZE |
3104 |
3103 |
3105 \item[EEPROM SIZE] The SII state machine is executed until |
3104 \item[EEPROM SIZE] The SII state machine is executed until |
3106 termination. $\rightarrow$~\textit{EEPROM SIZE} |
3105 termination. $\rightarrow$~EEPROM SIZE |
3107 |
3106 |
3108 If the category type does not mark the end of the categories, the |
3107 If the category type does not mark the end of the categories, the |
3109 position of the next category header is determined via the length of |
3108 position of the next category header is determined via the length of |
3110 the current category, and the SII state machine is started again. |
3109 the current category, and the SII state machine is started again. |
3111 $\rightarrow$~\textit{EEPROM SIZE} |
3110 $\rightarrow$~EEPROM SIZE |
3112 |
3111 |
3113 If the size of the E$^2$PROM contents has been determined, memory is |
3112 If the size of the E$^2$PROM contents has been determined, memory is |
3114 allocated, to read all the contents. The SII state machine is |
3113 allocated, to read all the contents. The SII state machine is |
3115 started to read the first word. $\rightarrow$~\textit{EEPROM DATA} |
3114 started to read the first word. $\rightarrow$~EEPROM DATA |
3116 |
3115 |
3117 \item[EEPROM DATA] The SII state machine is executed until |
3116 \item[EEPROM DATA] The SII state machine is executed until |
3118 termination. $\rightarrow$~\textit{EEPROM DATA} |
3117 termination. $\rightarrow$~EEPROM DATA |
3119 |
3118 |
3120 Two words have been read. If more than one word is needed, the two |
3119 Two words have been read. If more than one word is needed, the two |
3121 words are written in the allocated memory. Otherwise only one word |
3120 words are written in the allocated memory. Otherwise only one word |
3122 (the last word) is copied. If more words are to read, the SII state |
3121 (the last word) is copied. If more words are to read, the SII state |
3123 machine is started again to read the next two words. |
3122 machine is started again to read the next two words. |
3124 $\rightarrow$~\textit{EEPROM DATA} |
3123 $\rightarrow$~EEPROM DATA |
3125 |
3124 |
3126 The complete E$^2$PROM contents have been read. The slave's identity |
3125 The complete E$^2$PROM contents have been read. The slave's identity |
3127 object and mailbox information are evaluated. Moreover the category |
3126 object and mailbox information are evaluated. Moreover the category |
3128 types STRINGS, GENERAL, SYNC and PDO are evaluated. The slave |
3127 types STRINGS, GENERAL, SYNC and PDO are evaluated. The slave |
3129 scanning has been completed. $\rightarrow$~\textit{END} |
3128 scanning has been completed. $\rightarrow$~END |
3130 |
3129 |
3131 \item[END] Slave scanning has been finished. |
3130 \item[END] Slave scanning has been finished. |
3132 |
3131 |
3133 \end{description} |
3132 \end{description} |
3134 |
3133 |
3150 \label{fig:fsm-slaveconf} |
3149 \label{fig:fsm-slaveconf} |
3151 \end{figure} |
3150 \end{figure} |
3152 |
3151 |
3153 \begin{description} |
3152 \begin{description} |
3154 \item[INIT] The state change state machine has been initialized to |
3153 \item[INIT] The state change state machine has been initialized to |
3155 bring the slave into the \textit{INIT} state. Now, the slave state |
3154 bring the slave into the INIT state. Now, the slave state change |
3156 change state machine is executed until termination. |
3155 state machine is executed until termination. $\rightarrow$~INIT |
3157 $\rightarrow$~\textit{INIT} |
|
3158 |
3156 |
3159 If the slave state change failed, the configuration has to be |
3157 If the slave state change failed, the configuration has to be |
3160 aborted. $\rightarrow$~\textit{END} |
3158 aborted. $\rightarrow$~END |
3161 |
3159 |
3162 The slave state change succeeded and the slave is now in |
3160 The slave state change succeeded and the slave is now in INIT state. |
3163 \textit{INIT} state. If this is the target state, the configuration |
3161 If this is the target state, the configuration is finished. |
3164 is finished. $\rightarrow$~\textit{END} |
3162 $\rightarrow$~END |
3165 |
3163 |
3166 If the slave does not support any sync managers, the sync manager |
3164 If the slave does not support any sync managers, the sync manager |
3167 configuration can be skipped. The state change state machine is |
3165 configuration can be skipped. The state change state machine is |
3168 started to bring the slave into \textit{PREOP} state. |
3166 started to bring the slave into PREOP state. |
3169 $\rightarrow$~\textit{PREOP} |
3167 $\rightarrow$~PREOP |
3170 |
3168 |
3171 Sync managers are configured conforming to the sync manager category |
3169 Sync managers are configured conforming to the sync manager category |
3172 information provided in the slave's E$^2$PROM. The corresponding |
3170 information provided in the slave's E$^2$PROM. The corresponding |
3173 datagram is issued. $\rightarrow$~\textit{SYNC} |
3171 datagram is issued. $\rightarrow$~SYNC |
3174 |
3172 |
3175 \item[SYNC] If the sync manager configuration datagram is accepted, |
3173 \item[SYNC] If the sync manager configuration datagram is accepted, |
3176 the sync manager configuration was successful. The slave may now |
3174 the sync manager configuration was successful. The slave may now |
3177 enter the \textit{PREOP} state, and the state change state machine |
3175 enter the PREOP state, and the state change state machine is |
3178 is started. $\rightarrow$~\textit{PREOP} |
3176 started. $\rightarrow$~PREOP |
3179 |
3177 |
3180 \item[PREOP] The state change state machine is executed until |
3178 \item[PREOP] The state change state machine is executed until |
3181 termination. $\rightarrow$~\textit{PREOP} |
3179 termination. $\rightarrow$~PREOP |
3182 |
3180 |
3183 If the state change failed, the configuration has to be aborted. |
3181 If the state change failed, the configuration has to be aborted. |
3184 $\rightarrow$~\textit{END} |
3182 $\rightarrow$~END |
3185 |
3183 |
3186 If the \textit{PREOP} state was the target state, the configuration |
3184 If the PREOP state was the target state, the configuration is |
3187 is finished. $\rightarrow$~\textit{END} |
3185 finished. $\rightarrow$~END |
3188 |
3186 |
3189 If the slave supports no FMMUs, the FMMU configuration can be |
3187 If the slave supports no FMMUs, the FMMU configuration can be |
3190 skipped. If the slave has SDOs to configure, it is begun with |
3188 skipped. If the slave has SDOs to configure, it is begun with |
3191 sending the first SDO. $\rightarrow$~\textit{SDO\_CONF} |
3189 sending the first SDO. $\rightarrow$~SDO\_CONF |
3192 |
3190 |
3193 If no SDO configurations are provided, the slave can now directly be |
3191 If no SDO configurations are provided, the slave can now directly be |
3194 brought into the \textit{SAVEOP} state and the state change state |
3192 brought into the SAVEOP state and the state change state machine is |
3195 machine is started again. $\rightarrow$~\textit{SAVEOP} |
3193 started again. $\rightarrow$~SAVEOP |
3196 |
3194 |
3197 Otherwise, all supported FMMUs are configured according to the PDOs |
3195 Otherwise, all supported FMMUs are configured according to the PDOs |
3198 requested via the master's realtime interface. The appropriate |
3196 requested via the master's realtime interface. The appropriate |
3199 datagram is issued. $\rightarrow$~\textit{FMMU} |
3197 datagram is issued. $\rightarrow$~FMMU |
3200 |
3198 |
3201 \item[FMMU] The FMMU configuration datagram was accepted. If the slave |
3199 \item[FMMU] The FMMU configuration datagram was accepted. If the slave |
3202 has SDOs to configure, it is begun with sending the first SDO. |
3200 has SDOs to configure, it is begun with sending the first SDO. |
3203 $\rightarrow$~\textit{SDO\_CONF} |
3201 $\rightarrow$~SDO\_CONF |
3204 |
3202 |
3205 Otherwise, the slave can now be brought into the \textit{SAVEOP} |
3203 Otherwise, the slave can now be brought into the SAVEOP state. The |
3206 state. The state change state machine is started. |
3204 state change state machine is started. |
3207 $\rightarrow$~\textit{SAVEOP} |
3205 $\rightarrow$~SAVEOP |
3208 |
3206 |
3209 \item[SDO\_CONF] The CoE state machine is executed until termination. |
3207 \item[SDO\_CONF] The CoE state machine is executed until termination. |
3210 $\rightarrow$~\textit{SDO\_CONF} |
3208 $\rightarrow$~SDO\_CONF |
3211 |
3209 |
3212 If another SDO has to be configured, a new SDO download sequence is |
3210 If another SDO has to be configured, a new SDO download sequence is |
3213 begun. $\rightarrow$~\textit{SDO\_CONF} |
3211 begun. $\rightarrow$~SDO\_CONF |
3214 |
3212 |
3215 Otherwise, the slave can now be brought into the \textit{SAVEOP} |
3213 Otherwise, the slave can now be brought into the SAVEOP state. The |
3216 state. The state change state machine is started. |
3214 state change state machine is started. |
3217 $\rightarrow$~\textit{SAVEOP} |
3215 $\rightarrow$~SAVEOP |
3218 |
3216 |
3219 \item[SAVEOP] The state change state machine is executed until |
3217 \item[SAVEOP] The state change state machine is executed until |
3220 termination. $\rightarrow$~\textit{SAVEOP} |
3218 termination. $\rightarrow$~SAVEOP |
3221 |
3219 |
3222 If the state change failed, the configuration has to be aborted. |
3220 If the state change failed, the configuration has to be aborted. |
3223 $\rightarrow$~\textit{END} |
3221 $\rightarrow$~END |
3224 |
3222 |
3225 If the \textit{SAVEOP} state was the target state, the configuration |
3223 If the SAVEOP state was the target state, the configuration is |
3226 is finished. $\rightarrow$~\textit{END} |
3224 finished. $\rightarrow$~END |
3227 |
3225 |
3228 The slave can now directly be brought into the \textit{OP} state and |
3226 The slave can now directly be brought into the OP state and the |
3229 the state change state machine is started a last time. |
3227 state change state machine is started a last time. |
3230 $\rightarrow$~\textit{OP} |
3228 $\rightarrow$~OP |
3231 |
3229 |
3232 \item[OP] The state change state machine is executed until |
3230 \item[OP] The state change state machine is executed until |
3233 termination. $\rightarrow$~\textit{OP} |
3231 termination. $\rightarrow$~OP |
3234 |
3232 |
3235 If the state change state machine terminates, the slave |
3233 If the state change state machine terminates, the slave |
3236 configuration is finished, regardless of its success. |
3234 configuration is finished, regardless of its success. |
3237 $\rightarrow$~\textit{END} |
3235 $\rightarrow$~END |
3238 |
3236 |
3239 \item[END] The termination state. |
3237 \item[END] The termination state. |
3240 |
3238 |
3241 \end{description} |
3239 \end{description} |
3242 |
3240 |
3259 \end{figure} |
3257 \end{figure} |
3260 |
3258 |
3261 \begin{description} |
3259 \begin{description} |
3262 \item[START] The beginning state, where a datagram with the state |
3260 \item[START] The beginning state, where a datagram with the state |
3263 change command is written to the slave's ``AL Control Request'' |
3261 change command is written to the slave's ``AL Control Request'' |
3264 attribute. Nothing can fail. $\rightarrow$~\textit{CHECK} |
3262 attribute. Nothing can fail. $\rightarrow$~CHECK |
3265 |
3263 |
3266 \item[CHECK] After the state change datagram has been sent, the ``AL |
3264 \item[CHECK] After the state change datagram has been sent, the ``AL |
3267 Control Response'' attribute is queried with a second datagram. |
3265 Control Response'' attribute is queried with a second datagram. |
3268 $\rightarrow$~\textit{STATUS} |
3266 $\rightarrow$~STATUS |
3269 |
3267 |
3270 \item[STATUS] The read memory contents are evaluated: While the |
3268 \item[STATUS] The read memory contents are evaluated: While the |
3271 parameter \textit{State} still contains the old slave state, the |
3269 parameter \textit{State} still contains the old slave state, the |
3272 slave is busy with reacting on the state change command. In this |
3270 slave is busy with reacting on the state change command. In this |
3273 case, the attribute has to be queried again. |
3271 case, the attribute has to be queried again. |
3274 $\rightarrow$~\textit{STATUS} |
3272 $\rightarrow$~STATUS |
3275 |
3273 |
3276 In case of success, the \textit{State} parameter contains the new |
3274 In case of success, the \textit{State} parameter contains the new |
3277 state and the \textit{Change} bit is cleared. The slave is in the |
3275 state and the \textit{Change} bit is cleared. The slave is in the |
3278 requested state. $\rightarrow$~\textit{END} |
3276 requested state. $\rightarrow$~END |
3279 |
3277 |
3280 If the slave can not process the state change, the \textit{Change} |
3278 If the slave can not process the state change, the \textit{Change} |
3281 bit is set: Now the master tries to get the reason for this by |
3279 bit is set: Now the master tries to get the reason for this by |
3282 querying the \textit{AL Status Code} parameter. |
3280 querying the \textit{AL Status Code} parameter. |
3283 $\rightarrow$~\textit{CODE} |
3281 $\rightarrow$~CODE |
3284 |
3282 |
3285 \item[END] If the state machine ends in this state, the slaves's state |
3283 \item[END] If the state machine ends in this state, the slaves's state |
3286 change has been successful. |
3284 change has been successful. |
3287 |
3285 |
3288 \item[CODE] The status code query has been sent. Reading the |
3286 \item[CODE] The status code query has been sent. Reading the |
3289 \textit{AL Status Code} might fail, because not all slaves support |
3287 \textit{AL Status Code} might fail, because not all slaves support |
3290 this parameter. Anyway, the master has to acknowledge the state |
3288 this parameter. Anyway, the master has to acknowledge the state |
3291 change error by writing the current slave state to the ``AL Control |
3289 change error by writing the current slave state to the ``AL Control |
3292 Request'' attribute with the \textit{Acknowledge} bit set. |
3290 Request'' attribute with the \textit{Acknowledge} bit set. |
3293 $\rightarrow$~\textit{ACK} |
3291 $\rightarrow$~ACK |
3294 |
3292 |
3295 \item[ACK] After that, the ``AL Control Response'' attribute is |
3293 \item[ACK] After that, the ``AL Control Response'' attribute is |
3296 queried for the state of the acknowledgement. |
3294 queried for the state of the acknowledgement. |
3297 $\rightarrow$~\textit{CHECK ACK} |
3295 $\rightarrow$~CHECK ACK |
3298 |
3296 |
3299 \item[CHECK ACK] If the acknowledgement has been accepted by the |
3297 \item[CHECK ACK] If the acknowledgement has been accepted by the |
3300 slave, the old state is kept. Still, the state change was |
3298 slave, the old state is kept. Still, the state change was |
3301 unsuccessful. $\rightarrow$~\textit{ERROR} |
3299 unsuccessful. $\rightarrow$~ERROR |
3302 |
3300 |
3303 If the acknowledgement is ignored by the slave, a timeout happens. |
3301 If the acknowledgement is ignored by the slave, a timeout happens. |
3304 In any case, the overall state change was unsuccessful. |
3302 In any case, the overall state change was unsuccessful. |
3305 $\rightarrow$~\textit{ERROR} |
3303 $\rightarrow$~ERROR |
3306 |
3304 |
3307 If there is still now response from the slave, but the timer did not |
3305 If there is still now response from the slave, but the timer did not |
3308 run out yet, the slave's ``AL Control Response'' attribute is |
3306 run out yet, the slave's ``AL Control Response'' attribute is |
3309 queried again. $\rightarrow$~\textit{CHECK ACK} |
3307 queried again. $\rightarrow$~CHECK ACK |
3310 |
3308 |
3311 \item[ERROR] If the state machine ends in this state, the slave's |
3309 \item[ERROR] If the state machine ends in this state, the slave's |
3312 state change was unsuccessful. |
3310 state change was unsuccessful. |
3313 |
3311 |
3314 \end{description} |
3312 \end{description} |
3332 |
3330 |
3333 \begin{description} |
3331 \begin{description} |
3334 \item[READ\_START] The beginning state for reading access, where the |
3332 \item[READ\_START] The beginning state for reading access, where the |
3335 read request and the requested address are written to the SII |
3333 read request and the requested address are written to the SII |
3336 attribute. Nothing can fail up to now. |
3334 attribute. Nothing can fail up to now. |
3337 $\rightarrow$~\textit{READ\_CHECK} |
3335 $\rightarrow$~READ\_CHECK |
3338 |
3336 |
3339 \item[READ\_CHECK] When the SII read request has been sent |
3337 \item[READ\_CHECK] When the SII read request has been sent |
3340 successfully, a timer is started. A check/fetch datagram is issued, |
3338 successfully, a timer is started. A check/fetch datagram is issued, |
3341 that reads out the SII attribute for state and data. |
3339 that reads out the SII attribute for state and data. |
3342 $\rightarrow$~\textit{READ\_FETCH} |
3340 $\rightarrow$~READ\_FETCH |
3343 |
3341 |
3344 \item[READ\_FETCH] Upon reception of the check/fetch datagram, the |
3342 \item[READ\_FETCH] Upon reception of the check/fetch datagram, the |
3345 \textit{Read Operation} and \textit{Busy} parameters are checked: |
3343 \textit{Read Operation} and \textit{Busy} parameters are checked: |
3346 \begin{itemize} |
3344 \begin{itemize} |
3347 \item If the slave is still busy with fetching E$^2$PROM data into |
3345 \item If the slave is still busy with fetching E$^2$PROM data into |
3348 the interface, the timer is checked. If it timed out, the reading |
3346 the interface, the timer is checked. If it timed out, the reading |
3349 is aborted ($\rightarrow$~\textit{ERROR}), if not, the check/fetch |
3347 is aborted ($\rightarrow$~ERROR), if not, the check/fetch datagram |
3350 datagram is issued again. $\rightarrow$~\textit{READ\_FETCH} |
3348 is issued again. $\rightarrow$~READ\_FETCH |
3351 |
3349 |
3352 \item If the slave is ready with reading data, these are copied from |
3350 \item If the slave is ready with reading data, these are copied from |
3353 the datagram and the read cycle is completed. |
3351 the datagram and the read cycle is completed. |
3354 $\rightarrow$~\textit{END} |
3352 $\rightarrow$~END |
3355 \end{itemize} |
3353 \end{itemize} |
3356 \end{description} |
3354 \end{description} |
3357 |
3355 |
3358 The write access states behave nearly the same: |
3356 The write access states behave nearly the same: |
3359 |
3357 |
3360 \begin{description} |
3358 \begin{description} |
3361 \item[WRITE\_START] The beginning state for writing access, |
3359 \item[WRITE\_START] The beginning state for writing access, |
3362 respectively. A write request, the target address and the data word |
3360 respectively. A write request, the target address and the data word |
3363 are written to the SII attribute. Nothing can fail. |
3361 are written to the SII attribute. Nothing can fail. |
3364 $\rightarrow$~\textit{WRITE\_CHECK} |
3362 $\rightarrow$~WRITE\_CHECK |
3365 |
3363 |
3366 \item[WRITE\_CHECK] When the SII write request has been sent |
3364 \item[WRITE\_CHECK] When the SII write request has been sent |
3367 successfully, the timer is started. A check datagram is issued, that |
3365 successfully, the timer is started. A check datagram is issued, that |
3368 reads out the SII attribute for the state of the write operation. |
3366 reads out the SII attribute for the state of the write operation. |
3369 $\rightarrow$~\textit{WRITE\_CHECK2} |
3367 $\rightarrow$~WRITE\_CHECK2 |
3370 |
3368 |
3371 \item[WRITE\_CHECK2] Upon reception of the check datagram, the |
3369 \item[WRITE\_CHECK2] Upon reception of the check datagram, the |
3372 \textit{Write Operation} and \textit{Busy} parameters are checked: |
3370 \textit{Write Operation} and \textit{Busy} parameters are checked: |
3373 \begin{itemize} |
3371 \begin{itemize} |
3374 \item If the slave is still busy with writing E$^2$PROM data, the |
3372 \item If the slave is still busy with writing E$^2$PROM data, the |
3375 timer is checked. If it timed out, the operation is aborted |
3373 timer is checked. If it timed out, the operation is aborted |
3376 ($\rightarrow$~\textit{ERROR}), if not, the check datagram is |
3374 ($\rightarrow$~ERROR), if not, the check datagram is issued again. |
3377 issued again. $\rightarrow$~\textit{WRITE\_CHECK2} |
3375 $\rightarrow$~WRITE\_CHECK2 |
3378 \item If the slave is ready with writing data, the write cycle is |
3376 \item If the slave is ready with writing data, the write cycle is |
3379 completed. $\rightarrow$~\textit{END} |
3377 completed. $\rightarrow$~END |
3380 \end{itemize} |
3378 \end{itemize} |
3381 \end{description} |
3379 \end{description} |
3382 |
3380 |
3383 %------------------------------------------------------------------------------ |
3381 %------------------------------------------------------------------------------ |
3384 |
3382 |
3464 |
3462 |
3465 The master module has a parameter \textit{ec\_eoeif\_count} to specify |
3463 The master module has a parameter \textit{ec\_eoeif\_count} to specify |
3466 the number of EoE interfaces (and handlers) per master to create. This |
3464 the number of EoE interfaces (and handlers) per master to create. This |
3467 parameter can either be specified when manually loading the master |
3465 parameter can either be specified when manually loading the master |
3468 module, or (when using the init script) by setting the |
3466 module, or (when using the init script) by setting the |
3469 \textit{EOE\_INTERFACES} variable in the sysconfig file (see |
3467 \$EOE\_INTERFACES variable in the sysconfig file (see |
3470 section~\ref{sec:sysconfig}). Upon loading of the master module, the |
3468 section~\ref{sec:sysconfig}). Upon loading of the master module, the |
3471 virtual interfaces become available: |
3469 virtual interfaces become available: |
3472 |
3470 |
3473 \begin{lstlisting} |
3471 \begin{lstlisting} |
3474 host# `\textbf{ifconfig -a}` |
3472 # `\textbf{ifconfig -a}` |
3475 eoe0 Link encap:Ethernet HWaddr 00:11:22:33:44:06 |
3473 eoe0 Link encap:Ethernet HWaddr 00:11:22:33:44:06 |
3476 BROADCAST MULTICAST MTU:1500 Metric:1 |
3474 BROADCAST MULTICAST MTU:1500 Metric:1 |
3477 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
3475 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
3478 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 |
3476 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 |
3479 collisions:0 txqueuelen:1000 |
3477 collisions:0 txqueuelen:1000 |
3516 \end{figure} |
3514 \end{figure} |
3517 |
3515 |
3518 \begin{description} |
3516 \begin{description} |
3519 \item[RX\_START] The beginning state of the EoE state machine. A |
3517 \item[RX\_START] The beginning state of the EoE state machine. A |
3520 mailbox check datagram is sent, to query the slave's mailbox for new |
3518 mailbox check datagram is sent, to query the slave's mailbox for new |
3521 frames. $\rightarrow$~\textit{RX\_CHECK} |
3519 frames. $\rightarrow$~RX\_CHECK |
3522 |
3520 |
3523 \item[RX\_CHECK] The mailbox check datagram is received. If the |
3521 \item[RX\_CHECK] The mailbox check datagram is received. If the |
3524 slave's mailbox did not contain data, a transmit cycle is started. |
3522 slave's mailbox did not contain data, a transmit cycle is started. |
3525 $\rightarrow$~\textit{TX\_START} |
3523 $\rightarrow$~TX\_START |
3526 |
3524 |
3527 If there are new data in the mailbox, a datagram is sent to fetch |
3525 If there are new data in the mailbox, a datagram is sent to fetch |
3528 the new data. $\rightarrow$~\textit{RX\_FETCH} |
3526 the new data. $\rightarrow$~RX\_FETCH |
3529 |
3527 |
3530 \item[RX\_FETCH] The fetch datagram is received. If the mailbox data |
3528 \item[RX\_FETCH] The fetch datagram is received. If the mailbox data |
3531 do not contain a ``EoE Fragment request'' command, the data are |
3529 do not contain a ``EoE Fragment request'' command, the data are |
3532 dropped and a transmit sequence is started. |
3530 dropped and a transmit sequence is started. |
3533 $\rightarrow$~\textit{TX\_START} |
3531 $\rightarrow$~TX\_START |
3534 |
3532 |
3535 If the received Ethernet frame fragment is the first fragment, a new |
3533 If the received Ethernet frame fragment is the first fragment, a new |
3536 socket buffer is allocated. In either case, the data are copied into |
3534 socket buffer is allocated. In either case, the data are copied into |
3537 the correct position of the socket buffer. |
3535 the correct position of the socket buffer. |
3538 |
3536 |
3539 If the fragment is the last fragment, the socket buffer is forwarded |
3537 If the fragment is the last fragment, the socket buffer is forwarded |
3540 to the network stack and a transmit sequence is started. |
3538 to the network stack and a transmit sequence is started. |
3541 $\rightarrow$~\textit{TX\_START} |
3539 $\rightarrow$~TX\_START |
3542 |
3540 |
3543 Otherwise, a new receive sequence is started to fetch the next |
3541 Otherwise, a new receive sequence is started to fetch the next |
3544 fragment. $\rightarrow$~\textit{RX\_\-START} |
3542 fragment. $\rightarrow$~RX\_\-START |
3545 |
3543 |
3546 \item[TX\_START] The beginning state of a transmit sequence. It is |
3544 \item[TX\_START] The beginning state of a transmit sequence. It is |
3547 checked, if the transmittion queue contains a frame to send. If not, |
3545 checked, if the transmittion queue contains a frame to send. If not, |
3548 a receive sequence is started. $\rightarrow$~\textit{RX\_START} |
3546 a receive sequence is started. $\rightarrow$~RX\_START |
3549 |
3547 |
3550 If there is a frame to send, it is dequeued. If the queue was |
3548 If there is a frame to send, it is dequeued. If the queue was |
3551 inactive before (because it was full), the queue is woken up with a |
3549 inactive before (because it was full), the queue is woken up with a |
3552 call to \textit{netif\_wake\_queue()}. The first fragment of the |
3550 call to \textit{netif\_wake\_queue()}. The first fragment of the |
3553 frame is sent. $\rightarrow$~\textit{TX\_SENT} |
3551 frame is sent. $\rightarrow$~TX\_SENT |
3554 |
3552 |
3555 \item[TX\_SENT] It is checked, if the first fragment was sent |
3553 \item[TX\_SENT] It is checked, if the first fragment was sent |
3556 successfully. If the current frame consists of further fragments, |
3554 successfully. If the current frame consists of further fragments, |
3557 the next one is sent. $\rightarrow$~\textit{TX\_SENT} |
3555 the next one is sent. $\rightarrow$~TX\_SENT |
3558 |
3556 |
3559 If the last fragment was sent, a new receive sequence is started. |
3557 If the last fragment was sent, a new receive sequence is started. |
3560 $\rightarrow$~\textit{RX\_START} |
3558 $\rightarrow$~RX\_START |
3561 \end{description} |
3559 \end{description} |
3562 |
3560 |
3563 \paragraph{EoE Processing} |
3561 \paragraph{EoE Processing} |
3564 |
3562 |
3565 To execute the EoE state machine of every active EoE handler, there |
3563 To execute the EoE state machine of every active EoE handler, there |
3627 interface. The slave stores the SDO configurations in a linked list, |
3624 interface. The slave stores the SDO configurations in a linked list, |
3628 but does not apply them at once. |
3625 but does not apply them at once. |
3629 |
3626 |
3630 \paragraph{SDO Download State Machine} |
3627 \paragraph{SDO Download State Machine} |
3631 |
3628 |
3632 The best time to apply SDO configurations is during the slave's |
3629 The best time to apply SDO configurations is during the slave's PREOP |
3633 \textit{PREOP} state, because mailbox communication is already |
3630 state, because mailbox communication is already possible and slave's |
3634 possible and slave's application will start with updating input data |
3631 application will start with updating input data in the succeeding |
3635 in the succeeding \textit{SAVEOP} state. Therefore the SDO |
3632 SAVEOP state. Therefore the SDO configuration has to be part of the |
3636 configuration has to be part of the slave configuration state machine |
3633 slave configuration state machine (see section~\ref{sec:fsm-conf}): It |
3637 (see section~\ref{sec:fsm-conf}): It is implemented via an SDO |
3634 is implemented via an SDO download state machine, that is executed |
3638 download state machine, that is executed just before entering the |
3635 just before entering the slave's SAVEOP state. In this way, it is |
3639 slave's \textit{SAVEOP} state. In this way, it is guaranteed that the |
3636 guaranteed that the SDO configurations are applied each time, the |
3640 SDO configurations are applied each time, the slave is reconfigured. |
3637 slave is reconfigured. |
3641 |
3638 |
3642 The transition diagram of the SDO Download state machine can be seen |
3639 The transition diagram of the SDO Download state machine can be seen |
3643 in figure~\ref{fig:fsm-coedown}. |
3640 in figure~\ref{fig:fsm-coedown}. |
3644 |
3641 |
3645 \begin{figure}[htbp] |
3642 \begin{figure}[htbp] |
3650 \end{figure} |
3647 \end{figure} |
3651 |
3648 |
3652 \begin{description} |
3649 \begin{description} |
3653 \item[START] The beginning state of the CoE download state |
3650 \item[START] The beginning state of the CoE download state |
3654 machine. The ``SDO Download Normal Request'' mailbox command is |
3651 machine. The ``SDO Download Normal Request'' mailbox command is |
3655 sent. $\rightarrow$~\textit{REQUEST} |
3652 sent. $\rightarrow$~REQUEST |
3656 |
3653 |
3657 \item[REQUEST] It is checked, if the CoE download request has been |
3654 \item[REQUEST] It is checked, if the CoE download request has been |
3658 received by the slave. After that, a mailbox check command is issued |
3655 received by the slave. After that, a mailbox check command is issued |
3659 and a timer is started. $\rightarrow$~\textit{CHECK} |
3656 and a timer is started. $\rightarrow$~CHECK |
3660 |
3657 |
3661 \item[CHECK] If no mailbox data is available, the timer is checked. |
3658 \item[CHECK] If no mailbox data is available, the timer is checked. |
3662 \begin{itemize} |
3659 \begin{itemize} |
3663 \item If it timed out, the SDO download is aborted. |
3660 \item If it timed out, the SDO download is aborted. |
3664 $\rightarrow$~\textit{ERROR} |
3661 $\rightarrow$~ERROR |
3665 \item Otherwise, the mailbox is queried again. |
3662 \item Otherwise, the mailbox is queried again. |
3666 $\rightarrow$~\textit{CHECK} |
3663 $\rightarrow$~CHECK |
3667 \end{itemize} |
3664 \end{itemize} |
3668 |
3665 |
3669 If the mailbox contains new data, the response is fetched. |
3666 If the mailbox contains new data, the response is fetched. |
3670 $\rightarrow$~\textit{RESPONSE} |
3667 $\rightarrow$~RESPONSE |
3671 |
3668 |
3672 \item[RESPONSE] If the mailbox response could not be fetched, the data |
3669 \item[RESPONSE] If the mailbox response could not be fetched, the data |
3673 is invalid, the wrong protocol was received, or a ``Abort SDO |
3670 is invalid, the wrong protocol was received, or a ``Abort SDO |
3674 Transfer Request'' was received, the SDO download is aborted. |
3671 Transfer Request'' was received, the SDO download is aborted. |
3675 $\rightarrow$~\textit{ERROR} |
3672 $\rightarrow$~ERROR |
3676 |
3673 |
3677 If a ``SDO Download Normal Response'' acknowledgement was received, |
3674 If a ``SDO Download Normal Response'' acknowledgement was received, |
3678 the SDO download was successful. $\rightarrow$~\textit{END} |
3675 the SDO download was successful. $\rightarrow$~END |
3679 |
3676 |
3680 \item[END] The SDO download was successful. |
3677 \item[END] The SDO download was successful. |
3681 |
3678 |
3682 \item[ERROR] The SDO download was aborted due to an error. |
3679 \item[ERROR] The SDO download was aborted due to an error. |
3683 |
3680 |
4100 section~\ref{sec:eoeimp}. Default: $0$ |
4097 section~\ref{sec:eoeimp}. Default: $0$ |
4101 \item[EOE\_BRIDGE] If this variable is set, all EoE interfaces will be |
4098 \item[EOE\_BRIDGE] If this variable is set, all EoE interfaces will be |
4102 added to a network bridge according to IEEE 802.1D after master |
4099 added to a network bridge according to IEEE 802.1D after master |
4103 startup. The variable must contain the name of the bridge. To use |
4100 startup. The variable must contain the name of the bridge. To use |
4104 this functionality, the kernel must be configured with the |
4101 this functionality, the kernel must be configured with the |
4105 \textit{CONFIG\_BRIDGE} option and the \textit{bridge-utils} package |
4102 CONFIG\_BRIDGE option and the \textit{bridge-utils} package must be |
4106 must be installed (i.~e. the \textit{brctl} command is needed). |
4103 installed (i.~e. the \textit{brctl} command is needed). |
4107 \item[EOE\_IP\_ADDRESS] The IP address of the EoE bridge. Setting this |
4104 \item[EOE\_IP\_ADDRESS] The IP address of the EoE bridge. Setting this |
4108 together with \textit{EOE\_IP\_NETMASK} will let the local host |
4105 together with \$EOE\_IP\_NETMASK will let the local host communicate |
4109 communicate with devices on the EoE bridge. |
4106 with devices on the EoE bridge. |
4110 \item[EOE\_IP\_NETMASK] IP netmask of the EoE bridge. |
4107 \item[EOE\_IP\_NETMASK] IP netmask of the EoE bridge. |
4111 \item[EOE\_EXTRA\_INTERFACES] The list of extra interfaces to include |
4108 \item[EOE\_EXTRA\_INTERFACES] The list of extra interfaces to include |
4112 in the EoE brid\-ge. Set this to interconnect the EoE bridge with |
4109 in the EoE brid\-ge. Set this to interconnect the EoE bridge with |
4113 other local interfaces. If \textit{EOE\_\-BRIDGE} is empty or |
4110 other local interfaces. If \$EOE\_\-BRIDGE is empty or undefined, |
4114 undefined, setting this variable has no effect. Important: The IP |
4111 setting this variable has no effect. Important: The IP address of |
4115 address of the listed interfaces will be cleared. Setting |
4112 the listed interfaces will be cleared. Setting |
4116 \textit{EOE\_\-IP\_\-ADDRESS} and \textit{EOE\_IP\_NETMASK} will |
4113 \$EOE\_\-IP\_\-ADDRESS and \$EOE\_IP\_NETMASK will re-enable them |
4117 re-enable them for IP traffic. |
4114 for IP traffic. |
4118 \item[EOE\_GATEWAY] The IP address of the default gateway. If this |
4115 \item[EOE\_GATEWAY] The IP address of the default gateway. If this |
4119 variable is set, the gateway will be renewed after bridge |
4116 variable is set, the gateway will be renewed after bridge |
4120 installation. This is necessary, if the default gateway's interface |
4117 installation. This is necessary, if the default gateway's interface |
4121 is one of the \textit{EOE\_EXTRA\_INTERFACES}. |
4118 is one of the \$EOE\_EXTRA\_INTERFACES. |
4122 \end{description} |
4119 \end{description} |
4123 |
4120 |
4124 %------------------------------------------------------------------------------ |
4121 %------------------------------------------------------------------------------ |
4125 |
4122 |
4126 \subsection{Monitoring and Debugging} |
4123 \subsection{Monitoring and Debugging} |
4327 modules for a different kernel than the running kernel, the target |
4324 modules for a different kernel than the running kernel, the target |
4328 kernel version can be specified with the \texttt{--with-linux} |
4325 kernel version can be specified with the \texttt{--with-linux} |
4329 argument. Example: |
4326 argument. Example: |
4330 |
4327 |
4331 \begin{lstlisting} |
4328 \begin{lstlisting} |
4332 host> `\textbf{./configure --with-linux="2.6.17-ipipe"}` |
4329 `\$` `\textbf{./configure --with-linux="2.6.17-ipipe"}` |
4333 host> `\textbf{make}` |
4330 `\$` `\textbf{make}` |
4334 \end{lstlisting} |
4331 \end{lstlisting} |
4335 |
4332 |
4336 The following commands have to be entered as \textit{root}: To install |
4333 The following commands have to be entered as \textit{root}: To install |
4337 the kernel modules, headers, the init script, the sysconfig file and |
4334 the kernel modules, headers, the init script, the sysconfig file and |
4338 the user space tools, the below command has to be executed: |
4335 the user space tools, the below command has to be executed: |
4339 |
4336 |
4340 \begin{lstlisting} |
4337 \begin{lstlisting} |
4341 host# `\textbf{make install}` |
4338 # `\textbf{make install}` |
4342 \end{lstlisting} |
4339 \end{lstlisting} |
4343 |
4340 |
4344 If the EtherCAT master shall be run as a service |
4341 If the EtherCAT master shall be run as a service |
4345 (recommended\footnote{Even if the EtherCAT master shall not be loaded |
4342 (recommended\footnote{Even if the EtherCAT master shall not be loaded |
4346 on system startup, the use of the init script is recommended for |
4343 on system startup, the use of the init script is recommended for |
4347 manual (un-)loading.}), the init script and the sysconfig file have |
4344 manual (un-)loading.}), the init script and the sysconfig file have |
4348 to be copied to the appropriate locations. The below example is |
4345 to be copied to the appropriate locations. The below example is |
4349 suitable for SUSE Linux. It may vary for other distributions. |
4346 suitable for SUSE Linux. It may vary for other distributions. |
4350 |
4347 |
4351 \begin{lstlisting} |
4348 \begin{lstlisting} |
4352 host# `\textbf{cd /opt/etherlab}` |
4349 # `\textbf{cd /opt/etherlab}` |
4353 host# `\textbf{cp etc/sysconfig/ethercat /etc/sysconfig/}` |
4350 # `\textbf{cp etc/sysconfig/ethercat /etc/sysconfig/}` |
4354 host# `\textbf{cp etc/init.d/ethercat /etc/init.d/}` |
4351 # `\textbf{cp etc/init.d/ethercat /etc/init.d/}` |
4355 host# `\textbf{insserv ethercat}` |
4352 # `\textbf{insserv ethercat}` |
4356 \end{lstlisting} |
4353 \end{lstlisting} |
4357 |
4354 |
4358 Now the sysconfig file \texttt{/etc/sysconfig/ethercat} (see |
4355 Now the sysconfig file \texttt{/etc/sysconfig/ethercat} (see |
4359 section~\ref{sec:sysconfig}) has to be customized: This is mainly done |
4356 section~\ref{sec:sysconfig}) has to be customized: This is mainly done |
4360 by uncommenting and adjusting the \textit{DEVICE\_INDEX} variable. It |
4357 by uncommenting and adjusting the \$DEVICE\_INDEX variable. It has to |
4361 has to be set to the index of the compatible network device to use |
4358 be set to the index of the compatible network device to use with |
4362 with EtherCAT, where the order of devices is dependent on their |
4359 EtherCAT, where the order of devices is dependent on their position in |
4363 position in the PCI bus: |
4360 the PCI bus: |
4364 |
4361 |
4365 \begin{lstlisting}[numbers=left,basicstyle=\ttfamily\scriptsize] |
4362 \begin{lstlisting}[numbers=left,basicstyle=\ttfamily\scriptsize] |
4366 host# `\textbf{lspci}` |
4363 # `\textbf{lspci}` |
4367 00:00.0 Host bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133] (rev 03) |
4364 00:00.0 Host bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133] (rev 03) |
4368 00:01.0 PCI bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133 AGP] |
4365 00:01.0 PCI bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133 AGP] |
4369 00:04.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40) |
4366 00:04.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40) |
4370 00:04.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C... |
4367 00:04.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C... |
4371 00:04.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller... |
4368 00:04.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller... |