The optimal motion generation problem is solved subject to various actuator constraints while the motion is constrained to an arbitrary path. The considered objective function is a weighted time energy Jitnction while most of existing methods consider only the time-optimal problem. Wepresent some simulation results using a mathematical programming technique (Sequential Quadratic Programming) existing in the NPSOL sofrware.