Current location - Education and Training Encyclopedia - Graduation thesis - Model essay on graduation thesis of computer programming
Model essay on graduation thesis of computer programming
Students majoring in computer programming should write a professional paper when they graduate. The following is my carefully prepared paper on macro programming. You can refer to the following!

Abstract: With the development of modern manufacturing technology and the increasing popularity of CNC machine tools, CNC machining has been widely used, and more and more people are learning and using CNC programming. At present, in China's numerical control industry, most people are used to manual programming for simple two-dimensional machining programming (manual programming here actually refers to ordinary programming), while automatic programming (automatic programming here mainly refers to automatic programming of CAD/CAM software) is generally used to realize the machining of curved parts, but few people use macro programming, and some people even don't know it at all. So what is a macro program? What is the function of macro program? This paper discusses this problem.

Keywords: general programming macro programming CAD/CAM software programming

1 Types and concepts of NC programming

NC programming is generally divided into manual programming and CAD/CAM automatic programming, which programming method should be adopted according to the difficulty of machining specific parts.

1. 1 manual programming

Manual programming refers to the analysis of parts drawings, determination of processing technology, numerical calculation, preparation of parts processing program sheet, program input into numerical control system and program verification are all done manually. Manual programming can be divided into ordinary programming and macro programming. The so-called ordinary programming is actually relative to macro programming. It is a manual programming method that most people often use. This programming method uses ISO code or other standard code instructions for programming. The function of each code is fixed and developed by the system manufacturer. Users only need to program according to the regulations, and all parameter coordinates are set in advance. But sometimes these fixed format instructions can't meet the flexible needs of users. For the hole system shown in figure 1, if the number and distribution diameter of holes are changed at any time according to the situation during machining, the program of using fixed coordinates is obviously not flexible enough. Therefore, CNC system provides macro programs for users, which makes programming more flexible.

Automatic programming of 1.2 CAD/CAM

CAD/CAM automatic programming, also known as computer-aided numerical control programming, is an automatic programming method which integrates machining process planning and numerical control programming on the basis of CAD model of machined parts. With the help of automatic programming software, the programming process is to model the machining of parts on the computer, select machine tools and tools, determine the tool motion mode and cutting parameters, and automatically generate tool paths and program codes. Finally, after post-processing, the machining program is generated according to the file format specified by the machine tool used. Through serial communication, the machining program is transmitted to the numerical control unit of the numerical control machine tool. At present, the main automatic programming softwares are UG, Cimatron, MasterCAM, CATIA, CAXA, etc.

2 Macro programming and ordinary programming comparison

2. 1 program comparison

There are some differences between user macro programs and ordinary programs. Table 1 is their brief comparison.

2.2 Functional comparison

Ordinary programming has the advantages of flexibility, convenience and quickness for simple two-dimensional machining, but for some two-dimensional machining, such as machining the flat-bottomed circular groove shown in Figure 2 with CNC milling machine, the programming time is too long. Suppose the existing milling cutter is? 16, processed from outside to inside, row spacing 12 mm, only one layer is 2 mm deep. The following FANUC0i system is programmed by ordinary program and macro program respectively.

General programming is as follows:

0000 1 M03S800

G54G90G00X52。 Y0Z 100 Z5

G0 1Z-2F40 G02I-52F200

G0 1X40 G02I-40

G0 1X28 G02I-28

g0 1x 16 G02I- 16

G0 1X4 G02I-4

G00Z 100 M30

Macro programming is as follows:

00002 G0 1X# 1F200

M03S800 G02I[-# 1]

g54g 90g 00 x 52 y0z 100 # 1 = # 1- 12

End of Z5 1

G0 1Z-2F40 G00Z 100。

# 1=52 M30

And [# 1 GT 6] is 1

As can be seen from the above, macro programming is more concise and flexible than ordinary programming, because if the radius of machining arc groove becomes larger and the radius of cutter becomes smaller, the program of ordinary programming will become longer and longer, which is inconvenient to modify, while the program of macro programming will not become longer, so it will be more convenient to change several corresponding parameters or set these parameters as variables.

In addition, for some regular curves or surfaces that can be expressed by formulas, ordinary programming is far behind, and macro programming shows its unique advantages. As shown in fig. 3, it is difficult to finish the processing of elliptical groove with ordinary programming, but it is easier to program with macro program.

Suppose the existing milling cutter is? 8. From outside to inside, the row spacing is 6 mm, and only one layer is 2 mm deep. The following is based on FANUC0i system with macro programming.

Macro programming: while [#1le360] do1

O0003 #4=#2*COS[# 1]

M03S800 #5=#2*SIN[# 1]

g54g 90g 00x 36 y0z 100g 0 1X # 4Y # 5f 200

z 10 # 1 = # 1+ 1

G0 1Z-2F40 END 1

#2=36 #2=#2-6

#3=26 #3=#3-6

Although doing 2 ends 2

G0 1X#2F200 G00 Z 100

# 1=0 M30

3 characteristics of macro programming

The biggest feature of macro programming is to express the shape or size of rules with the shortest program, which is very easy to read and modify. The programmed program is very concise, logical and universal, and the machine tool is faster and more sensitive than the program generated by CAD/CAM software when executing this kind of program.

Macro programs are flexible, universal and intelligent. For example, for the programming of regular surfaces, using CAD/CAM software generally has some shortcomings, such as heavy workload, huge program, and difficulty in modifying machining parameters. As long as any machining parameters change, even intelligent software should recalculate the tool path according to the changed machining parameters. Although the calculation speed is fast, it is always a troublesome process. Macro program pays attention to the combination of machine tool function parameters and programming language. Flexible parameter setting also makes the machine tool have the best working performance, and at the same time gives the operator great adjustment freedom. From the perspective of modular processing, macro programs have the most modular ideas and qualifications. Programmers only need to complete the corresponding modular machining program design according to the geometric information of parts and different mathematical models. In application, they only need to input part information and machining parameters into the call statements of the corresponding modules, so that programmers can be freed from tedious and repetitive programming work, which has the effect of once and for all.

In addition, because the macro program basically contains all the machining information (such as the geometric size information of the tool used, etc.). ), and it is very simple and intuitive, and the processing state at that time can be easily reproduced through simple storage and call, which brings great convenience to periodic production, especially irregular interval production.

Comparison of machining performance between macro program and CAD/CAM software generation program

As long as any NC machining can be completely expressed by macro programs, even if it is complicated, its program length is relatively short, generally less than 60 lines, but at most 2KB.

On the one hand, macro programs are naturally short and pithy. Even the cheapest numerical control system, its internal program storage space is about 10KB, which can completely accommodate any complex macro program. So unlike CAD/CAM software, there is no need to consider the influence of the transmission speed of machine tools and external computers on the actual machining speed.

On the other hand, in order to describe the complex machining movement, the macro program will inevitably use all kinds of instruction codes in the numerical control system to the maximum extent, such as linear interpolation G0 1 instruction, circular interpolation G02/G03 instruction and so on. Therefore, when the machine tool executes the macro program, the computer of the numerical control system can directly perform interpolation operation, which is extremely fast, and the rapid response of the servo motor and the machine tool makes the processing efficiency extremely high.

For programs generated by CAD/CAM software, the situation is much more complicated.

Let's take another simple example. For example, when a milling cutter is used to process an inner circular hole in a spiral way, when the feed speed F=2000 mm/min is executed during the actual operation of the machine tool, the macro program is not only short, but also can maintain a very uniform and rapid spiral motion. In Cimatron software, even if similar tool paths are generated by external user functions, the tool paths are approximated by G0 1 according to the given error value, and the program is two orders of magnitude larger than the macro program. Moreover, even if the whole program is stored in the control system of the machine tool, it is not obvious when the actual speed of the machine tool is not up and the feed speed is less than 600 mm/min. If f is set to 65438, shivering? .

5 conclusion

To sum up, macro programs can simplify the tedious problems of ordinary programming in two-dimensional programming, and can solve the programming problems of regular curves and surfaces that ordinary programming can't solve. In addition, when machining regular surfaces, macro programs can overcome the inevitable machining problems in CAD/CAM software programming. Therefore, macro programming plays an irreplaceable role in general programming and CAD/CAM software programming.

refer to

[1] Chen Haizhou. Macro program of nc milling and its application examples.

Xie Xiaohong. Programming and machining technology of nc turning.

[3] Zhang Yingwei. Programming and machining technology of nc milling.

Analysis of network information security and prevention Abstract: In the early days of network development, people paid more attention to the convenience and availability of the network, but ignored the security of the network. When the network is only used to transmit general information, when the coverage area of the network is limited to a building and a campus, the security problem is not prominent. However, when key businesses such as banks run on the network, when the main business of enterprises runs on the network, and when the activities of government departments are increasingly networked, computer network security has become a problem that cannot be ignored.

With the development of technology, the network has overcome geographical restrictions and linked branches distributed in a region, a country or even the whole world. They use public transmission channels to transmit sensitive business information, and can directly or indirectly use the private network of an institution in some way. Due to business needs, the private networks of organizations and departments are inevitably directly or indirectly connected with external public networks. These factors make the network operation environment more complex, the distribution area more extensive and the use more diversified, which leads to the sharp decline of network controllability and the deterioration of security.

With the increasing dependence of organizations and departments on the network, relatively small networks also show some security problems, especially when the networks of organizations and departments will face various security threats from external networks, even if the network's own interests have no clear security requirements, it may be used by attackers, bringing unnecessary legal disputes. The attack of network hackers, the proliferation of network viruses and the security requirements of various network services constitute an urgent need for network security.

This paper analyzes and compares the threats and manifestations of existing network security, especially discusses the countermeasures to strengthen security, and describes the future development trend of this research field.

Network security; Information network; Network technology; safe

I. Introduction

1. 1 project background

With the rapid development of computer network technology, information network has become an important guarantee for social development. Information network involves government, military, culture, education and other fields. A large amount of information stored, transmitted and processed is important information such as government macro-control decision-making, commercial and economic information, bank fund transfer, stocks and securities, energy resources data and scientific research data. Many of them are sensitive information, even state secrets, so it will inevitably lead to various man-made attacks from all over the world (such as information leakage, information theft, data tampering, data deletion, computer viruses, etc.). ).

Usually, it is difficult to leave criminal evidence by using computer crimes, which also greatly stimulates the occurrence of computer high-tech crimes. With the sharp rise of computer crime rate, computer systems in various countries, especially network systems, are facing great threats and become one of the serious social problems, thus forming an urgent demand for network security.

1. 1. 1 computer network security threats and their manifestations

Computer network has the characteristics of diversity of composition, universality of terminal distribution, openness and interconnection of the network, which makes the network vulnerable to attacks by hackers, malicious software, virus Trojans, phishing websites and so on.

Common computer network security threats 1. 1. 1

(1) information leakage

The information was leaked to an unauthorized entity. It destroys the confidentiality of the system. Threats that can lead to information leakage include network monitoring, business flow analysis, electromagnetism, radio frequency interception, intentional or unintentional personnel, media cleaning, exploitation, authorized intrusion, physical intrusion, viruses, bots, backdoors, rogue software, phishing and so on.

(2) Integrity destruction

By taking advantage of loopholes, physical violations, authorization violations, viruses, trojans, loopholes, etc.

(3) Denial of service attack

Legally access information or resources, but illegally refuse or postpone time-related operations.

(4) Internet abuse

Legal users abuse the network and introduce unnecessary security threats, including illegal external connection, illegal internal connection, mobile risk, equipment abuse and business abuse.

1. 1. 1.2 Common manifestations of computer network security threats

(1) Natural disasters

Computer information system is just an intelligent machine, which is easily affected by natural disasters and environment (temperature, humidity, vibration, impact and pollution). At present, many of our computer rooms have no measures such as earthquake prevention, fire prevention, waterproof, lightning protection, electromagnetic leakage prevention or interference prevention, and the grounding system is also neglected in management, so the ability to resist natural disasters and accidents is poor. In daily work, equipment damage and data loss caused by power failure often occur. Due to noise and electromagnetic radiation, the network signal-to-noise ratio decreases, the bit error rate increases, and the security, integrity and availability of information are threatened.

(2) What are the vulnerabilities of network software? Back door?

Network software can't be 100% defect-free and bug-free. However, these vulnerabilities and defects are the first choice for hacker attacks. Most of the incidents of hackers breaking into the network are caused by imperfect security measures. Besides software? Back door? They are all set up by designers and programmers of software companies for their own convenience and are generally unknown to outsiders. Once? Back door? If the hole is opened, the consequences will be unimaginable.

(3) Threats and attacks by hackers

This is the biggest threat to the computer network. Hacking attacks can be divided into two types: non-destructive attacks and destructive attacks. Non-destructive attacks are usually aimed at destroying the operation of the system and not stealing system data. Denial of service attacks or information bombs are usually used. Destructive attacks are designed to invade other people's computer systems, steal confidential information of the system and destroy the data of the target system. Hackers usually use attack methods such as obtaining passwords, e-mail attacks, Trojan horse attacks, phishing scams and finding system vulnerabilities.

(4) Spam and spyware

Some people use email addresses? Openness and systematicness? Broadcasteability? Conduct business, religious, political and other activities, and force the mailbox? Push in? Other people's email address, forcing others to accept spam. Unlike computer viruses, the main purpose of spyware is not to destroy the system, but to steal system or user information.

(5) Computer crime

Computer crimes usually involve illegally invading computer information systems by stealing passwords, spreading harmful information, maliciously destroying computer systems, and committing corruption, theft, fraud and financial crimes. In the open network environment, a large amount of information flows online, which provides the target for criminals to attack. They use different means of attack to access or modify sensitive information flowing in the network, break into the computer system of users or government departments, peep, steal and tamper with data. Internet fraud that is not limited by time, place and conditions? Low cost and high profit? It also stimulated the growth of crime to some extent. Criminal activities against computer information systems are increasing.

(8) Computer virus

In the 1990s, a phenomenon once caused a worldwide panic. Computer virus? Its spread is very wide, its growth rate is amazing, and its losses are hard to estimate. Like Gray Ghost, it is attached to other programs and propagated to the system when these programs run. After the computer is infected with virus, the working efficiency of the system will be reduced, the system will crash or be destroyed, some files or all data will be lost, and even the computer motherboard and other components will be damaged.

Second, the network information security prevention strategy

2. 1 firewall technology

Firewall is the barrier of network security, and configuring firewall is one of the most basic, economical and effective security measures to realize network security. A firewall refers to hardware or software that is located between a computer and the network to which it is connected, or between two or more networks (such as LAN and Internet). All data flow between networks must pass through the firewall. Through the firewall, you can scan the communication between networks, close unsafe ports, prevent external DoS attacks, and intercept Trojan horses. , to ensure the security of the network and computer. General firewalls can achieve the following purposes: first, they can restrict others from entering the intranet and filter out unsafe services and illegal users; The second is to prevent intruders from approaching your defense facilities; The third is to restrict users from accessing special websites; The fourth is to facilitate the monitoring of Internet security.

2.2 Data encryption technology

Encryption is a way to confuse information so that unauthorized people can't understand it. There are two main types of encryption: private key encryption and public key encryption.

2.2. 1 private key encryption

Private key encryption is also called symmetric key encryption, because the key used to encrypt information is the key used to decrypt information. Private key encryption provides further compactness for information. It does not provide authentication, because anyone who uses the key can create encrypted messages. The advantages of this encryption method are high speed and easy to implement in hardware and software.

Public key encryption

Public key encryption appears later than private key encryption. Private key encryption uses the same key for encryption and decryption, while public key encryption uses two keys, one for encrypting information and the other for decrypting information. The disadvantage of public key encryption systems is that they are usually computationally intensive, so they are much slower than private key encryption systems. However, if we combine them, we can get a more complex system.

2.3 Access control

Access control is the main strategy of network security prevention and protection, and its main task is to ensure that network resources are not illegally used and accessed. Access control determines who can access the system, what resources can access the system and how to use these resources. Proper access control can prevent unauthorized users from obtaining data intentionally or unintentionally. The means of access control include user identification code, password, login control, resource authorization, authorization verification, log and audit. It is the main means to maintain network security and protect network resources, and it is also the key means to deal with hackers.

2.4 anti-virus technology

With the continuous development of computer technology, computer viruses have become more and more complex and advanced, posing a great threat to computer information systems. Antivirus software widely used for virus prevention can be divided into two categories: network antivirus software and stand-alone antivirus software. Single-machine antivirus software is generally installed on a single PC, that is, it analyzes and scans remote resources connected to local workstations, and detects and removes viruses. Network antivirus software is mainly based on network antivirus. Once a virus invades the network or spreads to other resources from the network, the network antivirus software will immediately detect and delete it. The invasion of virus is bound to pose a threat to system resources, so what should users do? Prevention before removal? . Many viruses are transmitted through the media, so users must pay attention to the media transmission of viruses. In the process of daily use of computers, we should develop the habit of regularly killing viruses. Users should install genuine antivirus software and firewall and upgrade to the latest version at any time. It is also necessary to update the installation patch of windows operating system in time, and don't log on to unknown websites.

2.5 security technology trends

China's information network security research has gone through two stages: communication secrecy and data protection, and is entering the research stage of network information security. Now, firewall, security router, security gateway, hacker intrusion detection and system vulnerability scanning software have been developed. However, because the field of information network security is a comprehensive and cross-disciplinary field, it comprehensively applies the long-term accumulation and latest development achievements of mathematics, physics, biochemical information technology, computer technology and other disciplines, and puts forward a systematic, complete and collaborative information network security solution. At present, it should be studied from five aspects: security architecture, security protocol, modern cryptography theory, information analysis and monitoring, and information security system. All the parts cooperate with each other to form an organic whole.

Due to the continuous improvement of computer operation speed, various cryptographic algorithms are facing new cryptographic systems, such as quantum cryptography, DNA cryptography, chaos theory and other new cryptographic technologies are being explored. Therefore, network security technology will become the key technology of information network development in 2 1 century.

Third, the conclusion

Generally speaking, network security is not only a technical problem, but also a security management problem. It is necessary to comprehensively consider safety factors and formulate reasonable objectives, technical schemes and relevant supporting laws and regulations. There is no absolutely safe network system in the world With the further development of computer network technology, network security protection technology will inevitably develop with the development of network applications.

refer to

1, Ge Xiuhui. Computer network security management [M]. Beijing: Tsinghua University Publishing House, 2008.

2, Zhang Lin, Huang Xianjiao. On Network Security Technology [J]. Computer Knowledge and Technology, 2006, (1 1).