Handling the ver and hor motors for moving the grid as the sample moves