What is a motion controller?
Motion controllers are used to achieve precise position control, speed control, acceleration control, torque or force control of mechanical motion. Based on their structure, motion controllers can be classified into PLC programmable logic controllers, microcontroller controllers, stand-alone motion controllers, PC-based motion control cards, and network controllers.
For example, an electric motor can be controlled by a limit switch to move an object upwards to a designated position and then downwards. Alternatively, a time relay can be used to control the motor's forward and reverse rotation or to control it to rotate intermittently. The application of motion control in robotics and CNC machine tools is more complex than in specialized machines because the latter have simpler motion patterns and are often referred to as general motion control (GMC).
Motion controller architecture composition
A motion controller generates a feedback loop for the trajectory point (desired output) and closed position. Many controllers can also internally close a velocity loop. A driver or amplifier converts the motion controller's control signal (typically a speed or torque signal) into a higher-power current or voltage signal. More advanced intelligent drives can self-close position and velocity loops for more precise control. An actuator, such as a hydraulic pump, cylinder, linear actuator, or motor, outputs motion. A feedback sensor, such as a photoelectric encoder, resolver, or Hall effect device, feeds back the actuator's position to the position controller to achieve the closure of the position control loop.
Numerous mechanical components are used to convert the motion of an actuator into the desired motion. These include gearboxes, shafts, ball screws, toothed belts, couplings, and linear and rotary bearings. Typically, a motion control system functions as speed control and point-to-point control. There are many methods to calculate a motion trajectory, usually based on a velocity curve such as a triangular, trapezoidal, or S-shaped velocity curve. Examples include electronic gears (or electronic cams). In this case, the position of the driven shaft mechanically follows the position change of a driving shaft. A simple example is a system containing two turntables that rotate at a given relative angle. Electronic cams are more complex than electronic gears because they make the follow-up relationship between the driving and driven shafts a function. This curve can be non-linear, but it must be a functional relationship.
Advantages and disadvantages of motion controllers
Advantages of motion controllers:
(1) The hardware composition is simple. The system can be formed by simply plugging the motion controller into the PC bus and connecting the signal lines.
(2) Development can be carried out using the abundant software already available on PCs;
(3) The motion control software has good code universality and portability;
(4) There are many engineers who can carry out development work, and they can carry out development without much training.
Disadvantages of motion controllers:
(1) The motion controller with board structure uses gold finger connection and is fixed on one side. In most industrial sites with poor environment (serious vibration, dust and oil pollution), it is not suitable for long-term operation.
(2) Waste of PC resources. Due to the bundled sales of PCs, users actually only use a small portion of the PC resources. The unused PC resources not only cause idleness and waste, but also bring maintenance troubles.
(3) Overall reliability is difficult to guarantee, as the PC can be either an industrial PC or a commercial PC. After system integration, the reliability varies greatly and cannot be guaranteed by the motion controller.
(4) It is difficult to highlight the characteristics of the industry.
Functions of motion controller
1. Exercise planning function
In essence, these are the reference quantities that determine the velocity and position of the motion. Appropriate reference quantities not only improve the accuracy of the trajectory but also reduce the requirements on the rotational system and mechanical transmission components. General-purpose motion controllers typically provide motion planning methods based on constraints on quantities such as impact, acceleration, and velocity that can affect the accuracy of the dynamic trajectory; users can directly call the corresponding functions.
Motion planning that limits acceleration produces a trapezoidal velocity curve; motion planning that limits impact produces an S-shaped velocity curve. Generally speaking, for CNC machine tools, motion planning methods that limit acceleration and velocity reference quantities already achieve excellent dynamic characteristics. For rapid positioning systems with high acceleration and short stroke motion, there are strict requirements for positioning time and overshoot, often necessitating motion planning methods with continuous high-order derivatives.
2. Multi-axis interpolation and continuous interpolation functions
Multi-axis interpolation functionality provided by general-purpose motion controllers is widely used in the CNC machining industry. In recent years, the rapid development of the engraving market, especially the mold engraving machine market, has driven the development of continuous interpolation functionality in motion controllers. Mold engraving involves the machining of numerous short line segments, requiring minimal fluctuations in machining speed between segments and smooth transitions at speed change points. This necessitates motion controllers with speed look-ahead and continuous interpolation capabilities. Googol Technology has launched a continuous interpolation motion controller specifically designed for short line segment machining processes. This controller has achieved excellent applications in mold engraving, laser engraving, and planar cutting.
3. Electronic gear and electronic cam functions
Electronic gears and electronic cams can greatly simplify mechanical design and achieve many functions that are difficult to achieve with mechanical gears and cams. Electronic gears can synchronize the movement of multiple motion axes according to a set gear ratio, which makes motion controllers well-suited for applications such as fixed-length shearing and shaftless multi-color printing.
Furthermore, the electronic gear function can enable a motion axis to follow a function at a set gear ratio, whereby the function is determined by the motion of several other motion axes; an axis can also follow the combined speed of two other axes at a set ratio. The electronic cam function allows for programming changes to the cam shape, eliminating the need for re-grinding mechanical cams and greatly simplifying the machining process. This functionality enables the motion controller to find excellent applications in areas such as the hardening of mechanical cams, the cutting of irregularly shaped glass, and the production of fully motor-driven springs.
4. Comparison output function
This refers to a motion controller outputting one or more switching signals when the position reaches a set coordinate point during movement, without affecting the movement process itself. For example, in AOI (Automated Optical Inspection) flight detection, the motion controller's comparison output function enables the system to activate CCD rapid imaging when it reaches the set position, without affecting the movement. This significantly improves efficiency and image quality. Furthermore, this function of Googol Technology's universal motion controllers has also been well-appointed in laser engraving applications.
5. Probe signal latching function
It can latch the timing of probe signal generation and the position of each motion axis. Its accuracy depends only on the hardware circuitry and is unaffected by software or system inertia, making it well-suited for applications in the CCM measurement industry. Furthermore, an increasing number of OEMs are looking to integrate their extensive industry experience into motion control systems, customizing motion controller functionality for different applications and controlled objects. Googol Technology has developed a universal motion controller application development platform, enabling general-purpose motion controllers to possess a truly object-oriented open control structure and system reconfiguration capabilities. Users can load their own designed control algorithms into the motion controller's memory and reconstruct a special-purpose motion controller without altering the overall control system design.
Working principle and application of motion controller
We will explain in detail the application and working principle of motion controllers in CNC systems.
Traditional CNC machine tool control methods mainly include relay control, microcontroller control, and PLC control. Currently, CNC systems are increasingly trending towards openness, and relays, PLCs, and microcontrollers have relatively poor expandability and portability, failing to meet the development requirements of CNC systems. In recent years, motion controllers have been widely used due to their advantages such as good openness, portability, high reliability, powerful control functions, small size, and high cost-effectiveness. After development, motion controllers are now used in almost all industrial enterprises. Motion controllers can be applied to the CNC retrofitting of traditional machine tools as well as the design of new CNC machine tools, reducing costs, saving energy, and improving efficiency. This paper takes the control system of a robotic arm as an example to introduce the design of a CNC system based on a motion controller.
1. Overall Scheme of CNC System
As shown in Figure 1, the entire CNC system consists of two parts: hardware and software. The hardware part is further divided into control system hardware and electrical control cabinet. The control system hardware includes motion controllers, I/O (input/output) interfaces, drive modules, and execution modules; this is the core of the CNC system hardware. The electrical control cabinet consists of power circuits, control circuits, and signal indication circuits. Because existing motion controllers are small and highly integrated, they can be directly placed in the electrical control cabinet. The software programming of the CNC system is related to the hardware. Generally, motion controllers and touch screens provide programming tools and languages, allowing users to design the software according to their specific needs.
2. Working principle of the robotic arm
Figure 1 Overall Scheme Diagram of CNC System
The robotic hand handling mechanism described in this article typically transports a workpiece from one designated location to another, as shown in Figure 2. Before operation, the robotic hand is positioned at the set origin. The system has four limit switches (up, down, left, and right), each connected to a different input point in the motion controller. During operation, the robotic hand moves downwards from the origin, stopping upon hitting the lower limit switch. It then grips the workpiece. To ensure reliable clamping, a delay function is used, allowing the robotic hand to continue upwards after a 2-second delay. The same applies to the other three directions. Finally, the robotic hand releases the workpiece and places it in the designated location. To ensure reliable workpiece placement, a delay function is used again, allowing the robotic hand to continue upwards after a 2-second delay. Upon hitting the upper limit switch, it moves to the left, returning to the origin for the next gripping and placement cycle.
The robotic arm handling system has two modes: automatic and manual. In automatic mode, no human intervention is required and the system operates automatically. In manual mode, the operator can control the robotic arm's movements according to their needs.
3. CNC System Hardware Design
Figure 2. Flowchart of robotic arm process
The CNC system hardware mainly includes a motion controller, servo drive system, pneumatic clamping mechanism, touch screen, and other expansion modules and auxiliary hardware. The CNC system hardware design is shown in Figure 3.
(1) CNC System Hardware Design. The motion controller is a British Trio controller, which uses the latest microprocessor technology with a 32-bit 120-150MHz DSP and integrates the latest control theory and network technology. The Trio motion controller provides a rich set of standard interfaces, such as RS232C, RS485, USB, Ethernet, and CAN. Among them, RS232C and RS485 have HostLink and Modbus protocols, which can communicate directly with the touch screen. The Trio motion control programming language is a BASIC-like language developed by Trio itself. Its commands are the English words of the motion names. For example, axis is AXIS, relative movement is MOVE, absolute movement is MOVEABS, etc. In addition, TRIO also provides the ActiveX control for secondary development. Users can use high-level languages such as VB/VC/C++ to perform secondary development according to their own needs.
(2) A Pingtong touchscreen is selected. The Pingtong touchscreen uses a high-color, high-brightness digital LCD screen, which has good display effect and fast response. The touchscreen is connected to the motion controller via an RS485 interface. The touchscreen can set and display parameters. The status information of the robot can be displayed intuitively through the touchscreen. The robot can also send commands to the system to control the robot through the buttons and digital input functions on the touchscreen.
Figure 3. Servo system hardware design diagram
(3) The servo system selected is the Panasonic MINAS A5 series servo system, including a servo driver and a servo motor. This servo system can meet the requirements of high speed, high precision, and high performance. The servo driver and servo motor are connected through matching power lines and encoder lines. Two servo systems are required for the robot arm, one horizontal and one vertical. There are two limit switches in the horizontal and vertical directions respectively to control the stroke of the servo motor. In addition, there is a zero-return switch in the horizontal and vertical directions as a reference to set the zero point in the horizontal and vertical directions.
4. CNC system software design
The system software design mainly consists of three parts: host computer program design, control program design, and touch screen program design. Through the coordinated operation of the control program and the touch screen program, the corresponding functions of the robotic arm can be realized.
(1) Overall Software Design. To ensure the reliability and scalability of the software, the control program and touchscreen program adopt a modular design approach. As shown in Figure 4, the software is divided into three main parts: a management module, a control module, and a parameter module. Since the motion controller itself does not have an operating system or development environment, it must be developed and managed through a host computer. Therefore, the management module runs on the host computer; the control module runs in the motion controller, and the control program written on the host computer can be directly transferred to the motion controller, which then performs the corresponding functions according to the program; the parameter module is mainly used for setting and displaying parameters and can run on the touchscreen. This modular design improves the system's response speed and makes the system more stable and reliable.
(2) Partial Program Design. Since the motion controller runs on a PC, a host computer program needs to be developed to manage the CNC program. Generally, motion controllers provide an interface for host computer development. The ActiveX control in Trio is an interface used to combine with high-level languages. This article uses VB to write the host computer program. Simply add the ActiveX control to the project and call the relevant functions during programming.
The control program is divided into two parts: a manual control program and an automatic control program. In manual control mode, the robot arm mainly moves according to the button instructions on the touch screen. Each action can be executed step by step, and it is mainly used for installation, debugging, and maintenance. The automatic control program controls the robot arm to automatically complete the workpiece handling. The program uses external status information feedback to handle the workpiece according to a specified route. When a problem occurs, the system will run a protection program to prevent accidents. The robot arm's operating status and external feedback information are displayed on the touch screen in real time. The robot arm control flow is shown in Figure 5.
A touchscreen serves as a window for human-computer interaction. A touchscreen program consists of multiple screens, which makes human-computer interaction clearer and avoids accidental operations. The touchscreen interface mainly includes a main interface, a status display interface, and an operation interface, as shown in Figure 6.
Figure 4 Overall Software Design Diagram
Figure 5. Control Flowchart of the Robot Arm
Figure 6 Status display interface
5. Conclusion
With the continuous development of industrial control, new control methods are constantly emerging, and corresponding CNC systems also need to keep pace with the times. Using a motion controller as the core of a CNC system has the advantages of system simplicity and flexibility, minimal hardware requirements, and good openness. Experimental results met expectations, fulfilled the corresponding functions, and proved the feasibility of the system. CNC systems based on motion controllers can be applied not only to the development of new CNC systems but also to the CNC retrofitting of traditional machine tools, representing a new direction in the development of CNC systems.