Application of the hottest PLC in point position c

  • Detail

The application of PLC in the point control of CNC system

I. Introduction

CNC technology is developed by the comprehensive application of modern scientific and technological achievements such as electronic technology, computing technology, automatic control and automatic detection. At present, it is increasingly widely used in many fields, especially in the mechanical processing industry

the numerical control system is divided into point control system, linear control system and continuous control system according to its control mode. During machining, the point position control of CNC system is generally used on hole machining machine tools (such as CNC machine tools for drilling, reaming and boring). Its feature is that the moving parts of the machine tool can move accurately from one position to another, that is, the end position of the moving parts can be accurately controlled, but its motion trajectory is not considered, and the tool does not cut the workpiece in the moving process

the higher the transmission efficiency, there are two common methods to realize the point control of CNC system: one is to adopt a full-function CNC device, which has perfect functions, but its price is very expensive, and many functions are redundant for point control; The second is to adopt single board computer or single chip microcomputer control. This method not only needs software development, but also needs to design hardware circuits, interface circuits and drive circuits, especially considering the anti-interference problem in the industrial field

as the programmable controller (PL to achieve a total output value of 10billion yuan C in the plastic products industry by 2020) is an industrial control computer specially designed for application in the industrial environment, it has significant advantages such as strong anti-interference ability, high reliability, small volume, and is an ideal control device for electromechanical integration, through practice and in-depth research, This paper puts forward some opinions and methods about using PLC to control stepping motor to realize the point control function of NC system, introduces some problems that need to be recognized and solved in the development of control system, and gives the design idea of control system scheme and software and hardware structure, which has high application and reference value for industrial and mining enterprises to realize the transformation of related machine tools

II. Some problems that need to be recognized and solved in the development of control system

1 Step motor is a kind of digital actuator with good performance. In the point control of CNC system, step motor can be used as the driving motor. In the open-loop control, the stepping motor is controlled by a certain frequency pulse. Using PLC to directly generate pulses to control the stepping motor can effectively simplify the hardware circuit of the system and further improve the reliability. Because PLC works in a circular scanning mode, its scanning cycle is generally between a few milliseconds and tens of milli seconds, and the iron ore futures market has soared. Therefore, due to the limitation of PLC working mode and the influence of scanning cycle, the stepping motor cannot work at high frequency. For example, if the pulse frequency of controlling the stepping motor is 4000Hz, the pulse period is 0.25 milliseconds, so the order of magnitude of the pulse period is much smaller than the scanning period. If this frequency is used to control the stepping motor. The PLC has sent out many control pulses before completing the output refresh task, but the stepper motor is still motionless, resulting in a serious out of step phenomenon. If the pulse frequency of the control stepping motor is 100Hz, the pulse period is 10 milliseconds, which is about the same order of magnitude as the scanning period of PLC, and large errors may also occur when the stepping motor is running. Therefore, when using PLC to drive the stepping motor, in order to prevent the stepping motor from out of step and error during operation, the stepping motor should operate at low frequency, and the pulse signal frequency should be selected as about ten to tens of Hertz, which can be realized by program design

2. The contradiction between ensuring the positioning accuracy and improving the positioning speed

stepping motor can be of great use in industry. The speed of the machine is proportional to the frequency of its control pulse. When the stepping motor runs at extremely low frequency, its speed must be very low. In order to ensure the positioning accuracy of the system, the pulse equivalent, that is, the moving distance of the tool or workbench when the stepping motor rotates a step angle, cannot be too large. The combination of these two factors brings a prominent problem: the positioning time is too long. For example, if the working frequency of the stepping motor is 20Hz, i.e. 50ms, take the pulse equivalent as δ= 0.01mm/step, the moving distance of the tool or worktable in 1 second is 20x0.01 = 0.2mm, and the moving distance in 1 minute is 60x0.2 = 12mm. If the positioning distance is 120mm, the positioning time needs 10 minutes. Such a slow positioning speed is unbearable in actual operation

in order to ensure the positioning accuracy, the pulse equivalent cannot be too large, but it affects the positioning speed. Therefore, how to improve the positioning speed and ensure the positioning accuracy is a problem that needs to be seriously considered and practically solved

3. Modification of variable control parameters

when PLC is applied to point control, users obviously hope that when the field conditions change, some control parameters of the system can be modified accordingly, such as the change of step number of stepping motor, speed adjustment, etc. In order to meet the continuity of production, it is required to modify the variable parameters of the control system. Although the original setting parameters can be easily and quickly changed by using the programmer, the programmer generally cannot be handed over to the field operators; Although the modification of control parameters can also be realized by using the input keys of PLC and cooperating with software design, because PLC does not provide digital display unit, it is necessary to design digital input and display circuit separately for this purpose, which will greatly occupy the input point of PLC, resulting in increased hardware cost, inconvenient operation and slow data input speed. Therefore, we should consider developing other simple and effective methods to modify the variable control parameters of PLC

4. Other problems

in order to achieve the requirements of digital change display and fault output code display in the process of point control, we have to design the digital output display circuit of PLC separately. At present, the price of PLC i/o points is still high, so we should focus on the selection of appropriate methods that can compress and display the output points. In addition, in order to ensure the safe and stable operation of the control system, we should also solve the safety protection problems of the control system, such as the travel protection of the system, the automatic detection of faulty components, etc

III. control system scheme

1 The positioning process is divided into two stages with different pulse equivalent

in order to obtain high positioning speed and ensure positioning accuracy, the whole positioning process can be divided into two stages: coarse positioning stage and fine positioning stage. In these two stages, the same frequency pulse is used to control the stepper motor, but different pulse equivalent is used. Rough positioning stage: since the tool does not cut the workpiece during the point positioning process, a larger pulse equivalent, such as 0.1mm/step or 1mm/step, or even higher, can be used at this stage. For example, if the control pulse frequency of the stepping motor is 20Hz, the pulse equivalent is 0.1mm/step, and the positioning distance is 120mm, the time required to complete the whole journey is 1 minute, so the speed can obviously meet the requirements. Precise positioning stage: when a larger pulse equivalent is used to make the tool or worktable quickly move close to the positioning point (that is, to complete the rough positioning stage), in order to ensure the positioning accuracy, a smaller pulse equivalent is used to enter the precise positioning stage, so that the tool or worktable slowly approaches the positioning point, for example, take the pulse equivalent of 0.01mm/step. Although the pulse equivalent becomes smaller, the positioning speed will not be affected because the precise positioning stroke is very short (it can be set as about one-fifth of the full stroke)

in order to achieve the above purpose, in terms of machinery, two sets of speed change mechanisms should be used. In the coarse positioning stage, the stepping motor directly drives the tool or worktable transmission, and in the fine positioning stage, the speed reduction transmission is adopted. Which of these two sets of speed change mechanisms is controlled by the electromagnetic clutch

2. The application of functional instructions to achieve BCD code dial data input

at present, the more advanced PLC not only has the basic logic instructions to meet the requirements of sequential control, but also provides a wealth of functional instructions. If the basic logic instruction is an abstract improvement of the relay control principle, then the function instruction is like an abstract improvement of the assembly language. BCD code data dial is a decimal dial data input device commonly used in computer control system. The dial has 0~9+ positions, and each position has corresponding digital indication. One dial can represent one decimal data. If you need to input multiple bits of data, you can use multiple BCD dials in parallel

the author selects the BCD code dial device to be applied to the PLC control system, so there is no need to design the digital input and display circuit, which effectively saves the input points of PLC, simplifies the hardware circuit, and uses advanced functional instructions to realize the storage and transmission of data, so it is very convenient to realize the input or modification of data (such as the modification of the set value of the counter, etc.). If it is combined with a simple hardware decoding circuit, It can display the dynamic changes of relevant parameters (such as the decreasing changes of motor steps, etc.). In order to avoid the fluctuation that may be caused to the system by turning the dial during the operation of the system, it is best to set an input key, and then press the key after confirming that all pieces of dial are in place. At this time, the data will be read and processed by the PLC

3. "Software coding and hardware decoding"

in order to meet the prerequisite of compressing the output point, the method of "software coding and hardware decoding" is used to design the digital output display circuit of PLC. For example, for the display of 9 or less fault states, software coding and hardware decoding can be used to compress the output points of the display fault to 4. The hardware circuit includes 74LS04, 74ls48, common cathode nixie tube and other devices

4. Automatic detection of PLC external component faults

due to the high reliability of PLC, most of the faults in PLC control system are not caused by PLC itself, but by external component faults. For example, the fusion welding and oxidation of common buttons or travel switch contacts correspond to short-circuit faults and open circuit faults respectively. Once the system automatically detects the component fault, it should not only have the sound and light alarm function, but also display the fault code immediately, so that the user can quickly determine the cause of the fault. In order to save space, the program design idea of this content is shown in references

IV. software and hardware structure of the control system

1 Software structure

the software structure is designed according to the control requirements and is mainly divided into five modules: stepper motor control module, positioning control module, data dial input and data transmission module, digital output display module, and automatic detection and alarm module of component failure

because the whole software structure is relatively large, the pulse controller generates a control pulse of 0.1 seconds to shift the shift register and provide six beat timing pulses. Through the three-phase six beat ring distributor, the three output relays Y430, y431, y432 control the stepper motor according to the power on mode of single double six beats. In order to realize positioning control, different counters are used to control the coarse positioning stroke and fine positioning stroke respectively, and the set value of the counter is determined according to the stroke. For example, if the tool or worktable wants to move from point a to point C, given that AC = 200mm, divide AC into two segments: AB and BC, ab = 196mm, BC = 4mm, AB segment is the coarse positioning stroke, using a pulse equivalent of 0.1mm/step to move quickly, using a 6-bit counter (c660/c661), while BC segment is the fine positioning stroke, using a pulse equivalent of 0.01mm/step to accurately position, using a 3-bit counter C460, while entering the fine positioning at the end of the coarse positioning, PLC automatically turns on electromagnetic switch

Copyright © 2011 JIN SHI