The principle and scheme analysis of PLC positioning control program for stepping motor

A stepper motor is an actuator that converts electrical pulses into angular displacement. When the driver receives a pulse signal, it causes the motor to rotate by a fixed angle, known as the "step angle," in a specific direction. This precise movement allows for accurate positioning by controlling the number of pulses. Additionally, the speed and acceleration of the motor can be adjusted by varying the frequency of the pulses, enabling effective speed control. As a control-oriented motor, the stepper motor is widely used in open-loop systems due to its high accuracy and absence of accumulated error. **Positioning Principle and Scheme** When a stepper motor moves an actuator from one position to another, it typically goes through acceleration, constant speed, and deceleration phases. If the motor’s running frequency is below its starting frequency, it can start directly at that frequency and continue operating without issues. However, if the frequency is higher than the starting frequency, direct startup may cause the motor to lose steps or even stall. Similarly, sudden stops at high frequencies can lead to overshooting due to inertia, which affects positioning accuracy. While slower speeds prevent these issues, they reduce the efficiency of the system. To ensure both fast movement and precision, the motor must be accelerated and decelerated properly, avoiding step loss and overshoot. Two common methods for frequency control are linear and exponential curve approaches. The exponential method offers strong tracking but may lack stability during large speed changes, while the linear approach provides smooth motion and is easier to implement in software. This paper adopts the linear method for its simplicity and effectiveness. **Positioning Plan** To maintain accuracy, the pulse equivalent—how far the motor moves per step—must be small. However, this can slow down the process, reducing efficiency. To balance speed and accuracy, the positioning process is divided into two stages: coarse and fine positioning. In the coarse stage, a larger pulse equivalent, such as 0.1 mm/step, is used to move quickly. In the fine stage, a smaller pulse equivalent like 0.01 mm/step ensures precision. Since the fine positioning stroke is short (about 1/5 of the total), speed isn’t significantly affected. Mechanically, different gear systems can be used to switch between the two stages. For example, moving from point A to C (200 mm), AB (196 mm) is the coarse stage with 0.1 mm/step, and BC (4 mm) is the fine stage with 0.01 mm/step. The PLC automatically switches the gear mechanism at the end of coarse positioning, ensuring smooth and accurate movement. **Overview of the Positioning Program Design** Modern PLCs offer advanced functions beyond basic logic instructions. For instance, the Siemens S7-200 series provides PTO (Pulse Train Output) and PWM (Pulse Width Modulation) commands. PTO outputs square waves at up to 20 kHz, allowing users to control the number of pulses and period. PWM, on the other hand, allows variable duty cycles. This paper uses the multi-segment PTO mode for coarse positioning and single-segment mode for fine positioning. Assuming the motor starts at 2 kHz and reaches a maximum of 10 kHz, the acceleration and deceleration phases are calculated using the formula: **Cycle increment = (ECT - ICT) / Q** Where ECT is the end cycle time, ICT is the initial cycle time, and Q is the number of segments. For example, in a three-segment envelope table, the first segment accelerates with a period increment of 2, the second runs at constant speed with no change, and the third decelerates with an increment of 1. **Source Program** The main program initializes the coarse positioning parameters and calls the appropriate subroutines. It sets the PTO control word, defines the envelope table, and configures the pulse sequence. After completing the coarse positioning, the system switches to fine positioning, adjusting the pulse equivalent and period accordingly. Interrupts handle the completion of each phase, ensuring smooth operation and accurate positioning.

Logarithmic Periodic Antenna

Safety Cone Road Cone,Terminal Antenna Plastic,Logarithmic Periodic Antenna

Mianyang Ouxun Information Industry Co., Ltd , https://www.ouxunantenna.com