Abstract: This article introduces a method for displaying the actual rotational speed of a winding machine during coil winding by using encoder sampling and PLC precise calculation. It also briefly explains the application of the sampled winding speed in the equipment.
1. Introduction
Early development of electronic products lagged behind. For a long time, equipment could not accurately display rotation speed and related parameters through electrical control systems. Most equipment used mechanical counters, which could only record the final number of revolutions and could not accurately measure the current rotation speed. This had a great impact on high-end industries such as national defense, which had high requirements for product quality. It was impossible to quickly improve product quality and there was a great deal of uncontrollability, which seriously restricted the upgrading of supporting equipment in the electronics industry.
During the winding process of a winding machine, in order for the operator to subjectively observe the current winding speed, it is generally necessary to display the current machine speed on the monitor in real time. In traditional winding, a speed measuring motor is usually added to the end of the rotating shaft. A certain speed corresponds to a certain voltage value, and then the corresponding speed is calculated through a certain conversion formula. This method is not only less accurate, but also bulky, which usually restricts its installation. Rotary encoders, on the other hand, are widely used in various industrial control applications due to their low cost, small size, ease of installation, convenient maintenance, long life, and simple and accurate calculation when combined with PLC.
2. Principle
In typical winding machines, we usually use an A/D conversion module to convert the analog value (0~5V) of the potentiometer into a digital value (0~16000). After PLC calculation, the frequency of the inverter is controlled via RS485 communication to achieve stepless speed regulation of the motor , thereby realizing the winding of the coil. Then, a rotary encoder is used for sampling, and the PLC performs precise calculations. Finally, the winding machine speed is displayed in real time on the touch screen. At the same time, using the sampled winding motor speed, the PLC calculates and matches related motors (such as the active unwinding motor and the wire-laying motor), adjusting and setting various parameters to ensure that all parts work together organically, thus achieving automation and intelligence of the equipment.
First, we sample the number of pulses of the rotary encoder per unit time based on the PLC high-speed counter, calculate the number of pulse increments per second, and then calculate and display the current real-time speed of the equipment on the screen based on the number of lines of the selected encoder. We also calculate the speed of other motors by considering the relationship between the spindle and other matched motors, thus achieving automatic matching of the equipment.
1) Interrupted sampling
Therefore, in practical use, we should select different sampling times according to different application scenarios. If we only want to display the rotation speed on the terminal, we generally want the speed display to be stable, so we can choose a longer sampling time (such as 100ms); however, if we use the sampled winding motor speed to achieve coupling matching for other motor control, we generally want it to have good instantaneousness and strong follow-up, so that it can be fed back to other motors in a timely manner, and thus choose a shorter sampling time (such as 5ms).
Therefore, the length of sampling time should be tailored to local conditions and strictly differentiated according to the different requirements of the final use, in order to achieve the best sampling purpose.
1) Encoder line count selection
The encoder line count refers to the encoder's resolution. A higher encoder line count results in more accurate motor sampling, but also increases cost and computational complexity in the PLC. If the selected PLC has a low high-speed counting frequency, it can lead to internal counting errors and calculation overflows. Therefore, we should select an encoder with an appropriate line count based on the actual needs of the equipment and its configuration parameters to achieve optimal parameter configuration and measurement results.
5) Application of velocity sampling
The sampled speed not only allows us to intuitively observe the current spindle speed of the equipment, but also enables us to control the motors related to it using the sampled speed.
In an active wire feeding system, if the feeding speed is too fast, the wire will not have enough time to wind onto the spindle and will become slack. Conversely, if the feeding speed is too slow, the wire will experience uneven stress, leading to deformation. Therefore, the feeding speed must be matched with the spindle speed. During the winding process, since the linear speeds of the feeding motor and the winding motor must be consistent, we use the linear speed matching relationship to calculate the feeding speed via PLC and automatically control the feeding motor.
Therefore, in practical use, we should select different sampling times according to different application scenarios. If we only want to display the rotation speed on the terminal, we generally want the speed display to be stable, so we can choose a longer sampling time (such as 100ms); however, if we use the sampled winding motor speed to achieve coupling matching for other motor control, we generally want it to have good instantaneousness and strong follow-up, so that it can be fed back to other motors in a timely manner, and thus choose a shorter sampling time (such as 5ms).
Therefore, the length of sampling time should be tailored to local conditions and strictly differentiated according to the different requirements of the final use, in order to achieve the best sampling purpose.
1) Encoder line count selection
The encoder line count refers to the encoder's resolution. A higher encoder line count results in more accurate motor sampling, but also increases cost and computational complexity in the PLC. If the selected PLC has a low high-speed counting frequency, it can lead to internal counting errors and calculation overflows. Therefore, we should select an encoder with an appropriate line count based on the actual needs of the equipment and its configuration parameters to achieve optimal parameter configuration and measurement results.
5) Application of velocity sampling
The sampled speed not only allows us to intuitively observe the current spindle speed of the equipment, but also enables us to control the motors related to it using the sampled speed.
In an active wire feeding system, if the feeding speed is too fast, the wire will not have enough time to wind onto the spindle and will become slack. Conversely, if the feeding speed is too slow, the wire will experience uneven stress, leading to deformation. Therefore, the feeding speed must be matched with the spindle speed. During the winding process, since the linear speeds of the feeding motor and the winding motor must be consistent, we use the linear speed matching relationship to calculate the feeding speed via PLC and automatically control the feeding motor.
3. Electrical control hardware configuration
The main control functions of this system are the winding motor and the cable-laying motor. It handles the starting, stopping, manual/foot control, forward/reverse control of the winding motor, and left/right movement control of the cable-laying motor. It also needs to perform turn counting and speed sampling. Therefore, the system requires a PLC with a high-speed pulse output port, a high-speed counting port, and a certain number of I/O points. After comprehensive comparison, Siemens' S7-224XPCN PLC was selected, and HITECH's PWS6710T-P HMI was chosen for setting and displaying various parameters. The frequency converter is Delta Electronics' VFD015M21A, and the PLC communicates with the frequency converter via an RS485 port. The stepper system uses Lechuang's DMDT68A (driver) + DM3910H (motor). See Figures 1 and 2 below.
Figure 1 Motor control diagram
In Figure 1, M1 is a wound motor, M2 is a ribbon motor, A1 is a frequency converter, A2 is a stepper driver, and G is a switching power supply.
Figure 2 PLC schematic diagram
In Figure 2, A3 is the PLC, A4 is the touch screen, UC1 is the rotary encoder, and Y1 is used to control the direction of the ribbon motor.
4. Software programming
The PLC we selected is a Siemens XP224CN. The encoder sampling is set to A/B phase quadrature counting, and the high-speed counting mode is HSC0, so the pulse count is HC0. The interrupt event number is 10.
VD400 is the interrupt value, VD404 is the value before the interrupt, the sampling time is 25ms, the encoder has 200 lines, and VD436 is the speed display.
Figure 3 Interrupted sampling
Figure 4 Rotation speed calculation
5. Conclusion
In conclusion, speed sampling is crucial for equipment performance and operation, directly impacting product quality and safe production. It is a technology worthy of promotion and widespread application. The extensive use of rotary encoders in automated equipment allows for real-time speed display through the combined use of PLCs and rotary encoders. This enables coordinated operation with relevant control systems, fully leveraging the high processing speed and flexibility of PLCs. The resulting equipment is simple to operate, highly reliable, and has received positive user feedback, making it worthy of widespread promotion and application.