In order to improve efficiency and automation of spraying, a automatic spray lance, which was regard as an robotic arm, was studied. It could reach the desired position automatically. A study was carried out using Denavit and Hartenberg (D-H) approach to automate the four Degrees of Freedom (DOF) robotic arm. The kinematics of robotic arm was constructed us D-H coordinate frame model. And the inverse kinematics has been solved with inverse transform technique. Some motion parameters could be acquired. Simulation of the robotic arm was studied using the Robotics Toolbox which is MATLAB software. Simulations’ content included homogeneous, construction of robot object, kinematics and trajectory. The results of simulation indicated that the movement of robotic arm could satisfy the demands of four DOF. The robotic was founded able to move to the desired position by simulating. The links’ motion parameters were reasonable and it provided a new spray lance for automatic sprayer.