This paper presents an embedded controller of low cost and high performance for industrial robot. The ARM microprocessor is chosen as the main controller for the processor. Based on the 7-segment cubic spline interpolation algorithm, a real-time control for the robot is implemented. This proposed trajectory method can perfectly generates speed S-curve shape for a start-stop process of the robot. In this article a programming language, G-code, is developped for the robots motion control by using the editing interface we designed specially on PC platform. With all the features for 2-4 degree of freedom robot application, the editing interface has been developed for editing and compiling G-code, which can be downloaded into the microprocessor with the custom communication protocol through communication interface. The programming method of the G-code language is easy to learn and use for the non-professional users. The paper describes the design and implementation in detail for the controller, which was validated on our designed SCARA robot, and it worked reliably.