Matlab code used to run the arm and spool in various control modes.