The host software is mainly composed of NC program editing module, manual operation, electrical control module, communication module, automatic processing, machine tool parameter adjustment, system positioning, and screw torque compensation. The following is an example of an open control design of a software module using an electrical control module as an example.
Electrical control is an integral part of all machine tools. In CNC machine tools, there are three implementation methods: external PLC, embedded PLC and virtual PLC. The various PLCs currently available on the market generally have communication functions, and can be integrated with the numerical control system through the communication interface. This electrical control method is called an externally mounted PLC; in addition, an intelligent I/O interface card can also be designed to pass The bus is directly integrated with the CNC system. The card has a CPU to complete the switching logic operation and control. This method is embedded. It is also possible to directly use the numerical control system host CPU to periodically perform logical operations, and to control the electrical switch with an ordinary switching I/O card. This method is called virtual PLC.
If the conventional programming method is adopted, different software interfaces must be designed for the above three electrical control methods. The main body of the numerical control system software directly relates to the implementation mode and details of the electrical control. Once the control mode changes, it will not be allowed. There are no major changes to the software. The software thus written is less versatile and difficult to adapt to unexpected changes. In order to increase the independence between software and hardware, we use object-oriented technology to open the system.
Obviously, the goal is the same regardless of the control method. After careful analysis, we found out the commonality between the three, and derived an abstract class CPlc, which provides all the external features of the CNC machine tool electrical control, and provides a complete message processing function for the CNC system main software. The other parts of the CNC system only need to send a message to the PLC object to make the electrical switch perform the corresponding action. This section does not cover details during electrical operation.
Based on the abstract class CPlc, the derived classes CExernalPlc, CEmbedPlc and CVirtualPlc are defined for the three methods. In these classes, the interpretation of the message and the operation of the hardware are completed. The electrical control portion software obtained according to this design idea has the structure shown in FIG. It can be seen from the figure that this design method adds an abstract class hierarchy between the main software of the numerical control system and the electrical control hardware, which weakens its interdependence and becomes two relatively independent parts. The numerical control system software obtained by this method has device-independent features. When a new hardware device appears, it only needs to derive a new object class on the original abstract class, interpret the message according to the common standard, and manipulate the hardware to make corresponding actions without any modification to other parts of the software. Greatly improve the efficiency of software design. In fact, after clear specification of the data structure and meaning of the message, anyone else can design new electrical control hardware and corresponding driver according to the specification, and integrate it into In the system. This is also the main purpose of software open design.
Figure 4 Abstract design of electrical control software
The above takes PLC as an example to illustrate the idea of ​​open design of CNC system software. We completed the software design of the CNC system according to this idea. Although it has been repeatedly analyzed and discussed in the early stage of development, after the system structure is determined, the software and hardware development is relatively smooth. From the development process and online debugging situation, the open design can effectively shorten the software development cycle and improve the quality of the CNC system software.
Previous page
Double J Hook,Double J Hook Straps,Double J Wire Hooks,Double Wire Display Hooks
Jiangsu Zhongyi Work Rigging Co., Ltd. , https://www.zy-rigging.com