This paper introduces an automatic offline programming software for industrial robot which is used in the spraying system for movable hanging box, explains the structure, the core principle and realized function of the software, emphatically introduces the singularity problems in robot trajectory planning and solutions, and according to the actual spraying effect, related suggestions and prospects are proposed. This automatic off-line programming technology, not only can be used for robot trajectory planning, the development of a computer software that can automatically generate robot operation program, can also verify the rationality of the spraying process by using the simulation software, and then modify the program structure to achieve optimization, effectively avoids the singularity problem of robot motion. The use of software can avoid the manual operation of robot and graphic operation in off-line programming, and minimize human intervention. It has high value of popularization and application.