Application of S7-200PLC in the design of medium frequency quenching machine

The action uses its analog input, PID controller and pulse width adjustment high-speed output function to achieve automatic voltage regulation.

1 Overview The intermediate frequency quenching machine tool is to turn the power frequency power supply into an 8 kHz intermediate frequency power supply through the frequency conversion machine to heat the workpiece. It has the advantages of fast heating speed, easy heating control, high production efficiency, less oxidative decarburization and less quenching distortion. It is mainly used for gear single-tooth oil quenching. In the design task, the requirements of the electrical control part: (1) the workpiece can be manually adjusted; (2) the quenching process is automatically completed; (3) the output voltage of the inverter can be automatically adjusted. At present, the control circuit generally adopts relay control, and also uses a programmable controller (referred to as PLC) to control the automatic completion of the workpiece action and the quenching process. The voltage regulation is generally based on the deviation of the output voltage of the inverter through the voltage detection loop, the single junction transistor trigger circuit and the thyristor rectifier circuit to change the magnitude of the motor excitation current, so that the generator voltage remains stable. Due to the large number of discrete components and contacts in the design, full consideration should be given to system wiring optimization and reliability.

2 Design Ideas We use ST200 series PLC produced by Siemens as the control center, so we only need to design some simple peripheral circuits to control the movement of the workpiece, realize the automatic adjustment of the output voltage of the inverter, and optimize the circuit outside the electrical control system. High sex.

Among the CPUs of the ST200 series, the CPU222, CPU224, and CPU226 have digital I/O ports, PWM generators up to 20 kHz, PID controllers, and expandable analog I/O ports. An external circuit can be designed to provide a setting signal and a voltage feedback signal to the CPU. The PID controller of the CPU calculates a value of 0~1.0, and the value is converted and sent to the control register of the PWM generator to control the pulse. The width is then adjusted by the output voltage of a PWM amplifier to the excitation winding of the inverter to regulate the output voltage. It can be seen that changing the setting signal can realize the smooth adjustment of the output voltage of the inverter; when the setting signal is unchanged, the feedback signal changes due to factors such as load parameter changes (such as from no load to loading) and power supply voltage fluctuations. The PID controller outputs a corresponding value to change the pulse width of the PWM generator, so that the excitation current changes accordingly, ensuring the stability of the output voltage of the inverter and achieving a stable heating effect.

This PWM generator plus PWM amplifier voltage regulation system has three distinct advantages over the thyristor rectifier regulation system. First, due to the high switching frequency, only the DC output of the excitation winding of the inverter can obtain a DC current with a small ripple, and the form factor is better than that of the thyristor system. Second, because of the high switching frequency, the system responds quickly and dynamically. The ability to resist load disturbance is strong; the third is less discrete components and high reliability.

In addition, the configuration of the ST200PLC is also very flexible, and the CPU and expansion modules can be selected according to the reasonable cost performance according to the number of interfaces input and output of the system and the functions required by the system.

The main function of 3ST200PLC S-200PLC is a kind of programmable controller, which is suitable for automation of detection and control in various industries and various occasions. The scope of use can cover from simple control of alternative relays to more complicated automation control. There are four basic models of the port 221, the port 222, the port 224, and the port 226. According to the actual control object and requirements, the CPU224 is selected. The machine integrates 14 input and 10 output total 24 digital I/O ports. It has relay output and transistor output. It can connect 7 expansion modules with 13K bytes. Program and digital storage space, 6 independent 30kHz high-speed counters, 2 independent PWM generators, PID controller, 1 RS485 communication/programming port, PPI communication protocol, MPI communication protocol and free-mode communication capability.

3.1PWM Generator The S-200CPU has two PWM generators that generate waveforms with adjustable pulse widths, which are assigned to digital outputs Q0.0 and Q0.1, and output continuous, duty cycle adjustable pulses. The increment of pulse period and pulse width is Ls or ms, the period of variation is 50~65535ms, and the range of pulse width is 0~ PWM generator has one control byte, 16-bit unsigned period time value and A pulse width value. These values ​​are set by the user and are all stored in the specified special memory. Once the bits of these special memories are set to the desired operation, these operations can be called by executing the pulse instruction (PLS) to program the PWM generator from the settings. The output port outputs the desired pulse.

3.2 PID controller The PID controller adjusts the output to ensure that the deviation is zero, so that the system reaches a steady state. The deviation is the difference between the set value and the process variable (ie, the feedback signal).

The PID operation is performed by the PID loop instruction using the input and configuration information in the loop table. The instruction has two operands, TABLE and LOOP, where TABLE is the starting address of the loop table; LOOP is the loop number, which can be an integer of 07. .

Offset address field type description Process variable input must be in 01.0 set value input must be in 01.0 output value input/output must be in 01.0 gain input proportional constant, positive and negative sampling time can be input positive number, the unit is second integral time input positive number The unit is a differential number and enters a positive number. The unit is divided into points. The input/output must be in the 01.0 process variable. The input of the previous item must be initialized before the 01.0 PID controller is used. The gain and time constant can be initially determined by engineering calculations or empirical formulas, but further adjustments are needed to achieve optimal results. The set value and the process variable size, range, and engineering unit may be different. The PID instruction must be converted to a real number of 00.

4 Control system hardware The PLC part of the control system consists of CPU224, digital expansion module EM223, analog module EM231 and corresponding peripheral circuits. The block diagram is shown as shown.

CPU224 selects DC 24V transistor output mode. As the control center of the system, input signal acquisition, output control signal, PWM control, logic judgment and PID calculation are executed according to the instruction.

EM223 digital hybrid input/output module, 24V DC 4 input / 4 output. The system requires a total of 18 input ports and 13 output ports. The CPU224 itself integrates 14 inputs and 10 outputs with a total of 24 I/O ports, so an EM223 expansion module is required.

Control System Hardware Block Diagram The EM231 analog expansion module has 4 analog inputs. The module is used as the input port for the PID calculation and the input of the process variable. The DIP setting switch of the module is set to 101xxx, the analog input range is unipolar 010V, the resolution is 2. 5mV, and the EM231 can be used in 250Ls. The analog to digital conversion is completed.

The peripheral circuit includes (1) a feedback signal circuit, the intermediate frequency voltage of the main circuit is fed back by the intermediate frequency transformer, and a 0100V intermediate frequency signal is rectified, filtered, and divided into a 010V feedback signal, and sent to the input terminals B+ and B- of the EM231; (2) Set the input circuit, adjust the potentiometer, input a 010V analog signal to the EM231, input to the input terminals A+ and A- of the EM231; (3) PWM amplifying circuit, using the switching action of the high-power transistor, DC The power supply is converted into a square wave voltage with a frequency of 2000 Hz (this frequency is set by the program and can be adjusted according to the control effect), and is applied to the field winding of the intermediate frequency unit. The average voltage of the field winding is changed by the control of the pulse width of the CPU 224, and the excitation is adjusted. Current, so as to achieve the purpose of adjusting the output voltage of the inverter.

5 software to achieve S-200 programming and data transfer can be through two ways of real software PC, using Windows 98 or Windows NT4.0 operating system. This article uses the second method, connected by a PC/PPI cable. Connect the RS232 end of the PC/PPI cable (labeled "PC") to the serial port COM1 or COM2 of the computer, and the other end (labeled "PPI") to the communication port of the S-200CPU, in STEP7~Micro/WIN3.1 Next, establish an online connection between the PC and the S-200 CPU. In this way, it is possible to program and implement data transfer with the S7~200 CPU on the PC.

The block diagram, as shown, includes a main program, three subroutines, and an interrupt program.

5.1 Main program The main program realizes the manual operation of the workpiece and the automatic heating and quenching process of the workpiece, and calls three subroutines using the special memory bits SM0.1 and SM0.6 block diagram. SM0.1 is only set when the CPU scans for the first time. It is used to call subroutine 0 and subroutine 2 to initialize the PWM and PID. SM1000 is triggered once every 2 scans, and subroutine 1 is called to modify the pulse width. Therefore, the subsequent scan does not call subroutine 0 and subroutine 2, and the subroutine 1 is called once, which reduces the scan time and optimizes the program structure.

The manual operation of the workpiece includes the tightening of the quenching transformer, the engagement of the workpiece (gear), the rise and fall of the workpiece, etc., for the operator to load and unload and adjust the workpiece. In the automatic state, the process of ascending, descending, heating quenching, two indexing and counting of the workpiece is automatically completed until the entire workpiece is quenched and the automatic stop is completed. In the program design, it is also necessary to consider the requirements of the production process. In order to ensure uniform heating of the quenching surface, one tooth per quenching is to be divided twice, that is to say, one tooth is quenched. This is to solve a single, double-tooth problem, because the double-toothed gear is quenched by a tooth to be repeatedly quenched. Therefore, a switch is set to judge the PLC program through the I1.4 input point. If it is a single tooth, the automatic quenching ends when the count is completed. If it is a double tooth, the quenching counter counts once in half, so that repeated quenching can be avoided.

5.2 Subroutine 0 Subroutine 0 completes the PWM initialization. When the main program scans for the first time, subroutine 0 is called once, and Q0.0 is set as the high-speed pulse output port and reset. The initialization steps are as follows: Control byte 16D3 is sent to control register SMB67, so that PWM is defined as synchronous mode, in Ls, the cycle and pulse width are allowed to be modified; and the desired cycle value of 500Ls (ie, pulse) is written to control register SMW68. The frequency is 2 to the initial control pulse width of the control register SMW70 (ie, the initial output is 50%); the generator is programmed; the value is unchanged, the pulse width is allowed to be modified, and the PLS instruction can be executed without modifying the control byte later.

5.3 Subroutine 1 Subroutine 1 is used to modify the pulse width. A special register SM0. 6 of S7~200 can be used to make the main program call the subroutine once every 2 scans. 1. The result of the PID operation (in the variable memory VW500) is sent to the pulse width register SMW70. Execute the PLS instruction and output the pulse.

5.4 Subroutine 2 Subroutine 2 completes PID initialization. The parameters of the PID calculation are sent to the PID loop table VD100. The system setting parameters are initial value 50%, loop gain 0.8, sampling time 0.01 s, integration time 5 minutes, and differential time 25 minutes. The parameters of the PID are obtained by repeated adjustments. Set the timer interrupt every 100ms to execute the PID calculation. The interrupt corresponds to the interrupt event. 10. 5.5 Interrupt subroutine 0 This subroutine mainly performs PID operation. Since the type and range of PID calculation are strictly restricted, it must be input. The parameters are standardized and sent to the loop table VD100 for the PID to be calculated correctly.

The analog module EM231 automatically converts the set and feedback voltage signals into a 16-bit digital quantity. The CPU reads out from the specified address, normalizes it, stores it in the table, and performs PID calculation. Then, the operation result is read out from the VD108 of the loop table, multiplied by the PWM period of 500Ls, and rounded to a double integer, that is, the output pulse width is sent to the VW500 for subroutine 1 to call.

6 Conclusion The design has been officially run through assembly and tuning to meet design requirements. Thanks to the powerful function of S7~200PLC, the whole circuit is simplified, the electrical system is simple and clear, the reliability is high, and the maintenance is convenient.

In practical applications, PLC directly controls relays, low-power solenoid valves, etc. It is generally desirable to select PLC as the relay output, but the relay output has no pulse output function, so the PWM generator function cannot be used. That is to say, if the design must have the PWM generator function, then the PLC only selects the transistor output, then when the other output control object is the AC load, it is necessary to add a DC relay conversion link. Therefore, the author believes that if the output port of S7~200 can be designed as Q0.0 and Q0.1 as transistor output, and the rest output is relay output, then the application of S7~200PLC will be more convenient and more extensive.

(Finish)

Polyepoxysuccinic Acid (PESA)

Polyepoxysuccinic Acid,Epoxysuccinic Acid Homopolymer,Epoxysuccinic Acid,Polyoxirane-2 3-Dicarboxylic Acid

Shaanxi United Xingchuang International Co., Ltd. , https://www.lxcgj.com