


Summary:The sequence function is a program designed to be reduced to simple actions in each state.The automatic batching system has high control requirements and the motor start and stop comply with sequence control. The function diagram method is used to realize the software design of the automatic batching control system.
Programmable controller programming language mainly has ladder diagram, sequence function chart, statement table, etc. But the more widely used is the ladder diagram and sequence function chart two kinds of language Ba. Ladder diagram is in the relay control system on the basis of the electrical schematic changes, its electrical logic relationship between the representation and the electrical schematic diagram is the same, so the ladder diagram language is relatively easy to get started straight is the most commonly used programming method, but the ladder diagram in the handling of complex control problems appear to be unable to do and sometimes feel helpless, even if you can barely prepare a complex sequence ladder diagram, the program is also Even if you can barely produce a complex sequential ladder diagram, the program is complex and difficult to understand. Sequence function chart language is a real graphical programming language, very good at dealing with complex sequence problems, is dedicated to industrial sequence control of a functional programming language, no matter how complex the sequence, it can be graphically expressed or described clearly.
1 Sequence Function Chart
Sequential function chart with an approximate flowchart to express the control process, mainly by the state (or step) directed line, transfer, action composition. Sequential function chart design method is the most basic design idea is to divide a system cycle into a number of sequentially connected stages, these stages are called states (or steps), and programming elements (M or S) to represent a state. The states are divided according to the state of the outputs, and the ON/OFF state of each output remains unchanged within any one state.45 Each functional diagram has at least one initial state waiting for an activation command, and the states are separated from each other by a directed line segment, with a short horizontal line drawn on the segment to indicate the transfer condition between the states, and when the condition is fulfilled the next state becomes active, and its corresponding action is executed. When a state is not activated, its corresponding action will not be executed.
2 Requirements of automatic dosage system
The automatic dosage system consists of hopper, conveyor and detection system. The dosage device can automatically recognize the truck in place and automatically dosage the truck. When the truck is detected to be full, the dosage system automatically stops dosage, and when there is not enough material in the hopper, it will stop dosage and feed the material automatically. When the start switch is closed, the red light I2 goes out and the green light L1 comes on, indicating that the car is allowed to drive in and prepare for loading. Initially, the hopper discharge door D2 is closed, if the material detection sensor S1 is OFF (the material in the hopper is not enough), the feed valve opens to feed (D1 bright). When S1 is ON (the material in the hopper is full). It stops feeding (D1 goes out). Motor M1, M2, M3 and M4 are OFF initially, when the car is driven to the loading position, limit switch SQ2 is ON, red light signal I2 light green light L1 off, while starting motor M4, after 2S, then start M3, then after 2S start M2, then after 2S finally start M1, then after 2S before opening the discharge valve (D2 light) material through the hopper under the material. When the car is full, the limit switch SQ1 is ON, the hopper is closed to stop discharging, M1 stops after 2S, M2 stops after M1 stops after 2S, M3 stops after M2 stops after 2S, M4 stops after M3 stops after 2S. At the same time, the red light I2 goes out and the green light L1 comes on, indicating that the car can be driven away. Close the "start" switch, the whole system of automatic dosage and loading stop running.
3 automatic dosage system hardware design
In this paper, the German Siemens S7-200PLC is selected as the controller of automatic dosage, Siemens S7-200PIC is a small PC. It is small in size and low in price, but it is very powerful, whether it is a stand-alone operation or network control can realize the automation field of almost all the control requirements. According to the automatic dosage control requirements, the system needs 4 inputs/10 outputs, choose Germany Siemens S7-200PLC CPU224 to do the controller, CPU224 has 14 inputs/10 outputs, so it can meet the control requirements.
For the control of automatic dosage, its working process is according to a certain sequence of work, the need for cyclic work, and the control requirements are more complex, if the ladder diagram method to design will feel a moment to start, this conforms to a certain sequence of tasks, the choice of the function diagram method is more simple and direct and will soon be able to get started on the programming.
Sequential function diagram method to realize sequential control, state division is very critical, according to the process flow of the control process into a number of phases, each phase corresponds to a state, state division, programming is just step by step. In a sequential function diagram, the transition between states requires two conditions, namely, that the state's predecessor state is active and that the transfer condition is satisfied. The two operations to be realized by a state transition are to reset all previous states connected to the directed line segments and the transfer condition, and to activate all subsequent states connected to the directed line segments and the transfer condition. Siemens S7-200 PLC was chosen to implement the automatic dosage control system. Although the S7200 PLC does not directly support function diagrams, it provides specialized sequential control instructions to easily convert function diagrams to ladder diagram or statement table language [89. The sequential control instructions are the start-of-state LSCRSbit, the transfer-of-state instruction SCRTSbit, and the end-of-state instruction SCRE. Even if you have to go through the conversion of sequential control instructions, using the function diagram language is much better and faster than other programming languages. Because each state is almost always divided into four steps, state start, action, transfer and end of state, although after the sequence of control instructions to convert the program is a little long, but almost all the process of copying, just need to simply modify the corresponding action and conversion conditions can be.
4 Conclusion
In the use of function charts to prepare the program need to pay attention to the handling of repetitive actions, repetitive actions to deal with the main reset method, soft components M auxiliary method, soft components S drive method, this paper, automatic dosage control system in the motor is a continuous process, so the use of is the reset method is more convenient to allow the action of the continuous effective for a period of time, until the encounter reset instruction. Sequential function diagram method to achieve automatic dosage program design, can be a complex control requirements into a number of steps, and then use the approximate steps: the state of the beginning of the processing action, transfer state to solve each step of the end of the difficult to easy, practical applications show that the realization of the hand to hand easily and efficiently, and compiled a clear and easy to understand the logic of the program.