M1- and M1+ are motor inputs that should come from the outputs of the HBridge; you control current and direction to the motor using the HBridge. I like the L9119S hbridge; it's inexpensive and efficient. I used it in this project as an example.
Well, i would address one of your problem :
One thing you need to understand while working with serial manipulator control inverse kinematic is concept of multi solution. With understanding that 6 dof serial manipulator usually consist of anthromorphic arm (basic 2 dof planar robot) and spherical wrist, therefore a multi solution possibly ...