The trajectory planning method with dynamics is the key to improving the motion performance of manipulators. The optimal control method (OCM) is a key technology to solve optimal problems with dynamics. There are direct and indirect methods in OCM; indirect methods are difficult to apply to engineering applications, and so direct methods are widely applied instead. The direct collocation method (DCM) is a technology in OCM to transform an optimal control problem (OCP) to a nonlinear problem (NLP), so that plenty of solvers can be used directly. However, the general DCM, for which it has been found that the explicit form of the right-hand-side (RHS) functions of state equations of the complex system in the OCP is hard to derive, is limited to solving the OCP of three-axis manipulators. This paper proposes an improved DCM to solve the OCP of six-axis manipulators, which can find the solution of the time-optimal trajectory for the motion of six-axis manipulators based on the improved DCM. The proposed method derives the RHS equations implicitly by introducing a Functional Mock-up Unit (FMU), which simplifies the representation of the RHS equations as a black-box model, so that the DCM can be applied to the OCP of six-axis manipulators. A simulation case of a three-axis manipulator accomplished in a related study works as a reference compared with our improved method to verify the solution consistence between the DCM using the explicit RHS equations or using the implicit RHS equations, and the loss of computational efficiency is acceptable. In the meantime, a simulation solution and an experiment of six-axis manipulators, which is a novel advancement, are presented to validate the proposed method.