#FSM get samples get_samples States: START GO_TO_POSITION PREPARE_ARM FORWARD_CONTROL TAKE_SAMPLES END Events: ok position_failed arm_moved sample_took classifier_ready position_reached START: ok -> GO_TO_POSITION Go to the distributor. The distributor to reach shall be setted in the fsm structure. GO_TO_POSITION: position_reached -> PREPARE_ARM Go to the position desired, it is very near the position of the distributor in case it is a ice distributor or sample distributor. PREPARE_ARM: arm_moved -> FORWARD_CONTROL Prepare the arm to the correct position. FORWARD_CONTROL: position_reached -> TAKE_SAMPLES End the position to the distributor. TAKE_SAMPLES: sample_took: more -> . Continue to take samples and classify the next sample. sample_took: no_more -> END If the quantity of samples are taken, then go backward and continue classifying the samples.