homing.dot
1 # dot -Tpng homing.dot > homing.png 2 # dot -Txlib homing.dot 3 4 digraph finite_state_machine { 5 6 node [shape = doublecircle]; IDLE FINISHED 7 node [shape = circle]; 8 rankdir=LR; 9 START -> IDLE [ label = "errors" ]; 10 START -> UNLOCK [ label = "unlock needed" ]; 11 START -> UNLOCK_WAIT [ label = "unlock not needed" ]; 12 UNLOCK -> UNLOCK_WAIT 13 UNLOCK_WAIT -> SET_SWITCH_POSITION [ label = "searchvel 0 latchvel 0" ]; 14 UNLOCK_WAIT -> INDEX_ONLY_START [ label = "searchvel 0 latchvel !0 useindex" ]; 15 UNLOCK_WAIT -> INITIAL_SEARCH_START [ label = "searchvel !0 latchvel !0" ]; 16 INITIAL_BACKOFF_START -> INITIAL_BACKOFF_WAIT [ label = "delay times out" ]; 17 INITIAL_BACKOFF_WAIT -> INITIAL_SEARCH_START [ label = "!switch" ]; 18 INITIAL_SEARCH_START -> INITIAL_BACKOFF_START [ label = "switch" ]; 19 INITIAL_SEARCH_START -> INITIAL_SEARCH_WAIT [ label = "!switch" ]; 20 INITIAL_SEARCH_WAIT -> SET_COARSE_POSITION [ label = "switch" ]; 21 SET_COARSE_POSITION -> FINAL_BACKOFF_START [ label = "search/latch opposite" ]; 22 SET_COARSE_POSITION -> FALL_SEARCH_START [ label = "search/latch same sign" ]; 23 FINAL_BACKOFF_START -> FINAL_BACKOFF_WAIT [ label = "switch" ]; 24 FINAL_BACKOFF_WAIT -> RISE_SEARCH_START [ label = "!switch" ]; 25 RISE_SEARCH_START -> RISE_SEARCH_WAIT [ label = "!switch" ]; 26 RISE_SEARCH_WAIT -> INDEX_SEARCH_START [ label = "switch & index" ]; 27 RISE_SEARCH_WAIT -> SET_SWITCH_POSITION [ label = "switch & !index" ]; 28 FALL_SEARCH_START -> FALL_SEARCH_WAIT [ label = "switch" ]; 29 FALL_SEARCH_WAIT -> INDEX_SEARCH_START [ label = "!switch & index" ]; 30 FALL_SEARCH_WAIT -> SET_SWITCH_POSITION [ label = "!switch & !index" ]; 31 SET_SWITCH_POSITION -> FINAL_MOVE_START 32 INDEX_ONLY_START -> INDEX_SEARCH_WAIT 33 INDEX_SEARCH_START -> INDEX_SEARCH_WAIT 34 INDEX_SEARCH_WAIT -> SET_INDEX_POSITION [ label = "index found" ]; 35 SET_INDEX_POSITION -> FINAL_MOVE_START 36 FINAL_MOVE_START -> FINAL_MOVE_WAIT 37 FINAL_MOVE_WAIT -> LOCK [ label = "in position" ]; 38 LOCK -> LOCK_WAIT 39 LOCK_WAIT -> FINISHED 40 41 FINISHED -> IDLE 42 IDLE -> START 43 }