Typical CNC Milling Machine Control Software Modular Design

The typical CNC milling machine introduced in this paper mainly consists of the machine tool operation panel, the three linear axes of X, Y, and Z, the upper axis, and the auxiliary functions of the machine tool such as hydraulic pressure, lubrication, and cooling system. The electrical system of the machine tool includes a digital control system (CNC), a digital servo drive system, a spindle frequency conversion speed control system, and a machine input/output PLC control system. The electrical system mainly completes the man-machine dialogue and the feed of the coordinates of the three-axis machine tool, the operation of the main shaft, and the control of the hydraulic pressure, lubrication, and cooling system of the machine tool. The three coordinates of the machine adopt HEIDEHAIN linear encoder full closed loop feedback, the machine tool spindle is electric spindle, using Schneider inverter control, according to the structural characteristics of the machine, its electrical control system is equipped with the French NUM company's NUM1050 digital control system , Servo drive configured corresponding MDLUNUMDRIVE numerical control servo drive system. The PLC control program of this three-coordinate machine tool is based on the built-in PLC function of the NUM1050 all-digital control system and is developed with the corresponding software platform. Therefore, the flexibility and easy maintenance of the PLC program are closely related to the high performance of the NUM1050 CNC system. 1 NUM1050 numerical control system NUM1050 is an open, powerful digital control system, using 64-bit CPU68040, for data processing and coordinate control, with a fast processing speed, high precision of position control. The graphic function in the system manages the CNC panel display and keyboard: The memory is used to store the operating program, PLC program and user files: powerful communication function enables the CNC to communicate with the host computer through the RS232 serial port and the network interface: axis control board For controlling the movement of digital or analog axes: The internal PLC manages the machine via input/output modules: CNC software manages the machining program, machine data, computer trajectory and speed, and monitors the movement of the axes. 2 NUM1050 Built-in PLC Features The PLC uses the input/output interface provided by the NUM system to exchange data with the outside world. The data in the storage area is refreshed through the scan cycle of the PLC. The PLC reads the data through the %I variable and the PLC outputs the data to the outside world. It is done with the %Q variable. The data is exchanged between the built-in PLC and the NC through the exchange area. The contents in the exchange area are input/output data between the NC and the PLC. NC outputs data to the PLC. The PLC reads the %R variable from the swap area. The data sent from the PLC to the NC is put into the swap area through the %W variable and is read by the NC. The scan cycle is automatically performed by the system. Bits and bits of all variables of %R and %W have a specific meaning and are specifically provided to the PLC to control the operation of the NC and coordinate the actions between the external device and the NC. 3 NUM1050 PLC program structure characteristic NUM numerical control system PLC programming has the ladder diagram, the assembly language and the high level language (C language) several ways, its procedure all uses the task module and the subroutine module design. The task module of the PLC program includes: %INI, %TS0~4, %TF0~15, %TH0~15. Subroutines are modeled as %SP0~255. These subroutines can be called by the task module or between subroutines. The functions of each module are as follows: Initialization task %INI: The system executes once each time the system is powered on. Cyclic task %TS: The system executes %TS0 first and TS1 to 4 are executed in sequence. The %TS0 execution cycle is equal to each RTC (real-time clock control) cycle, ie, 20 ms, and %TS1 to 4 are executed every 5 RTC cycles (100 ms). The background task %TS has lower priority than the cyclic task %TS and the interrupt task %TH and can be used for waiting tasks. Background tasks can continue for several RTC cycles and can be interrupted by the cyclic task. The interrupt (real-time) task %TH is used for higher priority events without having to wait for the RTC loop to end. The interrupted (real-time) task %TH has a higher priority than the cyclic task %TS and the background task %TF. Error message list %9999.9: Machine error message file. 4 The design and realization of the PLC program of the three-axis CNC planer milling machine The design of the PLC program is inseparable from a good software platform and hardware environment. The NUM1050 numerical control system provides machine tool manufacturers with rich software resources and powerful software development tools. Such as PLCTOOL, SETTOOL, PCTOOLKIT and so on. All of them are based on the use of the WINDOWS platform, which brings great convenience to the development of the machine's electrical control system. Among them PLCTOOL can carry on the programming of PLC ladder diagram or high-level language C conveniently, have abundant instruction set and timer, counter unit, graphical interface, use and operate are flexible and convenient. The PLC program of this three-axis NC milling machine was developed and designed on the PLCTOOL software platform. Taking into account the actual application, this three-coordinate machine adopts ladder diagram language to design the PLC program. Its advantages are intuitive, dynamic display, and easy to debug and maintain. With the input/output modules and the machine operator panel provided by the NUM 1050 CNC system, it is very easy to control the machine's movement and other functions, because the machine's operation panel has a programmable, custom key. The machine control panel provided by the NUM system is connected to the system via fiber optic cable, which increases the reliability. According to the characteristics of PLC program structure of NUM1050, when designing the PLC program of this three-coordinate machine tool, all functions of the machine tool are assigned to different module control. Since this machine tool has no special interrupt task, the initialization task %INI, cyclic task %TS, and subroutine module %SP are used to design the program. %TS0 scan cycle is 20ms, so the important subroutines are called in %TS0. The auxiliary functions of the machine such as hydraulic pressure, cooling, lubrication, etc. are controlled in the task modules %TS1~3. The machine coordinates, spindle and related Part of the control is borne by the subroutine %SP module of the ladder diagram. The PLC program structure and each module of the three-axis CNC milling machine is introduced as follows: %INI: The system is called before other tasks are executed, and is executed only once when the PLC is powered on. It is not controlled by the PTC cycle, and some variables are initialized. %TS0: Call a subroutine. %TS1: Controls the machine aid function rail lubrication and hydraulic system. The rail lubrication cycle is controlled by the timer in the PLC program. %TS2: Controls the machine cooling system. Automatic cooling and manual cooling can be selected on the machine's operation panel. %TS3: Controls the loosening of the machine tool spindle and tool clamping. %SP0: Used to control the flashing of the indicator on the machine's operation panel. Most of the custom buttons on the machine control panel provided by the NUM1050 system have indicator lights. When using some functions that require special reminders, the buttons use flashing lights to show eye-catching, such as machine tool failure reset button, and tool change. Complete the key and more. %SP2: Controls the custom buttons on the machine operator panel. The user-defined keys on the operator panel must be programmed in PLC to be effective, and the functions of the keys are defined according to the needs of the machine tool. According to the user's requirements, the functions of the machine start, cooling control, spindle start/stop, tool change completion, and machine tool fault reset are designed on the operation panel of this three-axis NC milling machine. %SP3: Security check for controlling coordinate motion and coordinate limits. %SP4: M function decoding. This module is used to define the M06 function when the tool change ends. %SP5: Control axis servo enable. %SP6: This module controls all the functions of the spindle part, including spindle cooling, spindle lubrication, tool clamping, spindle motor, spindle inverter, etc. %SP20: Display control of machine fault information. When the machine tool fails, the fault number and fault content need to be displayed on the display page. When there are multiple faults on the machine tool, the system can display the faults in sequence. The time for each fault is set in this subroutine module. This module is called by other related modules. All the functions and controls of this three-axis NC milling machine are realized by the above modules. Among them, %SP2, %SP3, %SP5 and %SP6 are the core of the PLC program of this machine tool. The PLC program is designed in a modular way, and each module can be individually debugged, which improves the efficiency of machine debugging. When problems occur during debugging, problems can be quickly found, and different functions of the machine tool use different submodules. It shows that the program structure is clear at a glance. Through the individual debugging of each sub-module and the final electromechanical coupling, it is proved that this set of PLC program design ideas and methods are effective. 5 Summary After this three-axis CNC milling machine was tensioned and debugged, the machine tool works normally and meets the requirements. The machine tool meets the acceptance criteria. Practice has proved that this three-coordinate machine tool control software design is successful, and some of the basic modules of the design and development also has good portability, in the subsequent use of the NUM1000 series CNC typical CNC machine tool ladder diagram design slightly modified It can be used to lay a good foundation for the design of PLC control software of the same series of CNC machine tools.

Electric Fat Bike

Electric Fat Bike,Fat Tire Electric Bike,E Bike Folding Electric Bike,Electric Foldable Fat Tire Bicycle

Myatu Moped Technology Co.Ltd. , https://www.myatugroup.com