This paper describes the design and implementation of a customized controller which can control AC servers instead of PC in some specific occasions.
The controller uses only one CPLD as the main control chip, does not need MCU and external memory, and has simple peripheral circuit design.
The parameters are configured and stored using FLASH inside CPLD to make it more flexible to meet the requirements of some industrial occasions. The characteristics of the controller are low cost, simple structure, strong real-time performance and certain practicability. AC servo drives in industrial applications are generally controlled by upper computers to achieve various purposes, but in some simple situations, the use of upper computers not only costs a lot, but also does not make full use of the resources. In these cases, if the customized controller is used, although it does not have the generality of upper computers, it can achieve the desired purpose at a very low cost, so it can provide users with it.
Multiple options.
The basic principle of the controller is to send different pulse control signals to the AC server according to the input and set algorithm, and display state information to users, input from external feedback and human-machine interface, and output includes control signal and status information. The scheme uses CPLD as the main control chip, CPLD processes according to the user’s key operation and external feedback input, outputs the corresponding control signal according to the established algorithm, and displays the feedback information and state of the module; the key array is dynamically scanned and sampled by CPLD; the external input signal is connected to CPLD through optocoupler isolation, and the output control signal is differentially converted to the output interface, which can be effectively lifted. High controller security; display module includes digital tube and LED indicator lamp; CPLD is the core part of the controller, which can realize storage management, input and output processing, control signal generation and other functions. The example is a carton thruster, which consists of four parts: controller, AC server, AC motor and transmission part (including sensors); controller sends position commands to the server, servo drives motor, motor drives transmission part, sensor feeds specific information back to the controller in the course of motion; in addition, users can control the thruster through the operation interface of the controller. Following are the instructions for sensor trigger signals, keys and menus. The working process of the propeller is as follows: when the startup key is pressed and the running light is on, if the forward trigger signal is received, the propeller rotates a stroke at the speed set by the parameters.
After completion, the propeller stops waiting for new orders until all the journeys are completed. At this time, press the return key, the propeller gradually accelerates from stationary to the maximum speed set by the parameters and returns to the origin. When it reaches the deceleration position, the propeller will gradually decelerate to the lowest speed set by the parameters, and then maintain the speed. When it reaches the origin, the propeller stops.
In any case, press the stop button and the propeller movement will stop immediately. In addition, when the propeller encounters positive or negative limits, it will stop moving. By pressing the forward (or backward) button, the propeller will move slowly (or backward) in a point-by-point manner. The controller uses Altera’s MAXII CPLD chip as the main control logic.
This series of chips do not need external memory to access configuration data, but also have user Flash memory (UFM), which allows users to save their own design data, and the data will not be lost after power-down. In addition, UFM has an internal oscillator (3.3 to 5.5 MHz), which can be used as the clock source of CPLD when the time requirement is not strict, thus eliminating the external clock, not only saving cost, but also making full use of resources.
According to the resource requirement of the controller, thermostatic element EMP1270 is designed and selected. The chip has 1270 LE, 1kB user Flash memory. Figure 1 gives a detailed design description.
Each module in CPLD adopts parametric design, which can adapt to the change of design by modifying parameters. For example, the sub-module BIN2BCD can realize the conversion from any binary number to BCD code by modifying BIT_LEN, DEC_LEN and CNT_LEN. The customized controller has the advantages of low cost, easy operation and flexible design. It can make full use of CPLD resources and advantages in realization and customize according to users’needs.