Turntable inertia switching system and method based on PLC communication
Automatic detection and adjustment of turntable inertia through photoelectric sensors and PLC communication systems solves motor problems caused by changes in turntable inertia, enables parameter updates without power outages, improves production line continuity and changeover efficiency, and reduces maintenance costs.
Patent Information
- Application Number
- CN202511102472.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-09-16
AI Technical Summary
In the existing technology, changes in turntable inertia cause motor vibration, abnormal noise or excessive speed loop gain. Manual switching relies on the operator's memory and is prone to misselection. It requires power off and reset, which cannot meet continuous production requirements. The maintenance cost is high after the parameters are solidified.
The turntable type is detected by a photoelectric sensor, and the PLC determines the inertia ratio parameters. These are then written to the direct-drive motor driver in real time via EtherCAT communication, eliminating the need for power-off reset. The PDO mapping and delayed write mechanism of EtherCAT communication enable automatic matching and dynamic adjustment of parameters.
It realizes fully automatic matching of turntable inertia, improves the continuity and changeover efficiency of the production line, reduces maintenance costs, and avoids manual errors and downtime.
Smart Images

Figure CN120652907A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial automation control, and in particular to a turntable inertia switching system and method based on PLC communication. Background Art
[0002] In automated assembly or inspection stations, frequent replacement of turntables of varying specifications (diameter, mass) is common. Since the turntable's inertia varies with the square of its geometry and mass, and direct-drive motors are typically factory-tuned to a fixed inertia, this can lead to significant increases in system inertia, noticeable motor vibration and noise, after replacing a larger turntable. Replacing a smaller turntable with a smaller one can result in excessive speed loop gain, overshoot, and jitter. Frequent manual parameter retuning is time-consuming and experience-dependent, severely impacting production line cycle time and yield.
[0003] To alleviate these issues, a semi-automatic solution using an "offline parameter table + manual switching" has emerged in the industry. Technicians pre-measure the corresponding moment of inertia ratios for each turntable model using servo debugging software and burn this information into the drive as a parameter table. When the turntable is replaced, the corresponding parameters are manually selected using the HMI or DIP switches, and the parameters take effect after the drive is powered off and restarted. This approach eliminates the need for repeated auto-tuning, improves model changeover efficiency, and reduces the difficulty of on-site debugging.
[0004] However, the above solution still has obvious shortcomings: manual switching relies on the operator's memory and judgment, which is prone to wrong selection or omission; after switching, the power must be turned off or the drive must be reset, resulting in instantaneous shutdown, which cannot meet the needs of continuous production; once the parameter table is solidified, any newly added turntable models need to be burned again on site, which has high maintenance costs. Summary of the Invention
[0005] The purpose of the present invention is to provide a turntable inertia switching system and method based on PLC communication, which solves the problems that manual switching relies on the operator's memory and judgment, which is prone to wrong selection and omission; after switching, the power must be turned off or the driver must be reset, resulting in instantaneous shutdown and unable to meet continuous production needs; once the parameter table is solidified, new turntable models need to be burned again on site, resulting in high maintenance costs.
[0006] To achieve the above object, the present invention provides a turntable inertia switching method based on PLC communication, comprising the following steps: The photoelectric sensor detects the type of turntable currently installed and transmits the detection signal to the PLC; The PLC determines the turntable type based on the detection signal and matches the corresponding moment of inertia ratio parameters; The PLC writes the moment of inertia ratio parameters into the direct drive motor driver via EtherCAT communication; After the parameter writing is completed, the direct drive motor enable is automatically restored, making the drive effective immediately without powering off or resetting.
[0007] Among them, the photoelectric sensor detects the type of turntable currently installed and transmits the detection signal to the PLC: The photoelectric sensor is installed at a position where the large turntable can be sensed but the small turntable cannot be sensed, so as to distinguish turntables of different diameters.
[0008] Among them, the PLC determines the turntable type based on the detection signal and matches the corresponding rotational inertia ratio parameters. The moment of inertia ratio parameters are pre-determined by the automatic tuning software and stored in the PLC or drive.
[0009] The PLC writes the moment of inertia ratio parameter into the direct drive motor driver via EtherCAT communication, and the steps previously include: The PLC first disconnects the direct drive motor enable, and then restores the enable after the parameter writing is completed to avoid motor vibration or abnormal noise.
[0010] Among them, the PLC writes the moment of inertia ratio parameters to the direct drive motor driver through EtherCAT communication: EtherCAT communication uses PDO mapping. The PLC writes the moment of inertia ratio parameters to the preset index address, and the driver reads and updates the parameters in real time.
[0011] Among them, the PLC writes the moment of inertia ratio parameters to the direct drive motor driver through EtherCAT communication: After the PLC detects that the turntable has been replaced, it delays for a certain period of time before writing parameters to ensure system stability.
[0012] A turntable inertia switching system based on PLC communication, comprising a photoelectric sensor, a PLC, a direct drive motor driver, and automatic adjustment software, wherein the photoelectric sensor is connected to the PLC, the direct drive motor driver is connected to the PLC, and the automatic adjustment software is connected to the PLC; The photoelectric sensor is used to detect the type of the currently installed turntable and transmit the detection signal to the PLC; The PLC is used to determine the type of the turntable according to the detection signal, match the corresponding moment of inertia ratio parameter, and write the moment of inertia ratio parameter into the direct drive motor driver via EtherCAT communication; The direct drive motor driver is configured to receive and apply parameters; The automatic adjustment software is used to measure the rotational inertia ratio parameters of different turntables for the PLC to call.
[0013] The present invention provides a turntable inertia switching system and method based on PLC communication. The photoelectric sensor automatically detects the turntable type (such as large / small turntable). The PLC matches the pre-stored rotational inertia ratio parameters based on the detection signal and uses EtherCAT communication to write the parameters to the direct drive motor (DD motor) driver in real time to achieve dynamic parameter adjustment. Before writing the parameters, the motor enable is disconnected to avoid vibration. After completion, the operation is automatically resumed without power outage or manual intervention. The inertia parameters are pre-determined and stored by automatic adjustment software (such as Thunder), and support PDO mapping indexes (such as 16#2103) to achieve efficient data transmission. This solves the problems of traditional solutions that rely on manual switching, require power off and reset, and have poor scalability. It realizes fully automatic matching of turntable inertia, significantly improves production line continuity and changeover efficiency, and reduces maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.
[0015] Figure 1 It is a flowchart of the steps of the turntable inertia switching method based on PLC communication according to the first embodiment of the present invention.
[0016] Figure 2 It is a principle block diagram of a turntable inertia switching system based on PLC communication according to the second embodiment of the present invention.
[0017] In the figure: 201 - photoelectric sensor, 202 - PLC, 203 - direct drive motor driver, 204 - automatic adjustment software. DETAILED DESCRIPTION
[0018] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, but should not be understood as limiting the present invention.
[0019] The first embodiment of this application is: See also Figure 1 ,in, Figure 1 This is a flowchart of the steps of the turntable inertia switching method based on PLC202 communication according to the first embodiment of the present invention.
[0020] The present invention provides a turntable inertia switching method based on PLC202 communication, comprising the following steps: S101: Detect the type of the currently installed turntable through the photoelectric sensor 201 and transmit the detection signal to the PLC 202; Specifically, photoelectric sensor 201 (model E3ZG-D61-S, detection range 5-100mm) is installed in a position where it can be triggered by the large turntable (600mm diameter) but not by the small turntable (300mm diameter). This installation method is designed based on the physical characteristics of the different turntable diameters. When the large turntable enters its operating position, its edge enters the sensor's effective detection range (5-100mm). At this time, infrared light emitted by the emitter within photoelectric sensor 201 is reflected by the turntable surface. The receiver detects the reflected light and outputs a high-level signal (typically 24VDC). Conversely, when the small turntable is operating, it cannot enter the detection range due to its insufficient diameter, and the sensor output remains low. This digital signal is connected to the input module of PLC 202 (such as the %IX1.0 terminal) via a shielded cable. PNP wiring is used to ensure stable signal transmission. The wiring diagram shows that the brown sensor wire is connected to the positive terminal of the 24V power supply, the blue wire is connected to the negative terminal, and the black signal wire is connected to the input point of PLC 202. The PLC 202 detects changes in input status through periodic scanning (typical scan cycle 1ms). When %IX1.0 changes from 0 to 1, the program logic determines that the large turntable is currently installed; if the signal remains at 0, it is determined to be a small turntable. To ensure detection reliability, a software debounce filter (typically with a 20ms delay) is implemented to eliminate false triggering caused by mechanical vibration. The installation position and parameter settings (such as detection distance and response time) of the photoelectric sensor 201 are optimized based on the mechanical dimensions and motion characteristics of the turntable to ensure stable operation at different speeds. The entire process seamlessly transitions from physical detection to electrical signal conversion and then to logical judgment, providing accurate status input for the subsequent automatic switching of inertia parameters.
[0021] S102: PLC202 determines the type of turntable based on the detection signal and matches the corresponding moment of inertia ratio parameters; Specifically, when the digital signal (%IX1.0) from photoelectric sensor 201 is transmitted to PLC 202, the program within PLC 202 first verifies the signal's validity, including checking whether the signal's duration exceeds a preset debounce period (typically set to 20-50ms) to eliminate transient interference. Once this verification is successful, the program invokes the judgment logic written based on the IEC61131-3 standard: if %IX1.0 remains high for longer than the threshold, the "large dial flag" is triggered (e.g., %M0.0 = 1); if it remains low, the "small dial flag" is set (e.g., %M0.1 = 1). At this point, the PLC 202 indexes the rotational inertia ratio parameter table pre-stored in the data block (DB block) based on the flag status. This parameter table is pre-determined and fixed by the Thunder automatic tuning software 204. For example, the PT103 parameter value corresponding to the large dial is 264 (indicating an inertia ratio of 2.64), and the corresponding value for the small dial is 120 (1.20). The parameter storage format is a 16-bit integer (INT), and the address mapping is %DB1.DBW0 (large dial) and %DB1.DBW2 (small dial). To ensure real-time parameter call, the PLC 202 uses direct address access, transferring the matching parameter value via MOV instructions to a dedicated EtherCAT communication process data buffer (e.g., %QW15). This buffer has been PDO-mapped to the DD motor driver's PT103 parameter (index 16#2103, sub-index 16#00) via an XML configuration file. The entire parameter matching process is completed within a single scan cycle (typically 1ms) of the PLC202. A priority interrupt mechanism immediately pauses the current task and executes the parameter update when a turntable change signal is detected. This implementation strictly adheres to the deterministic control principles of the industrial PLC202. Parameters are stored in non-volatile FRAM to ensure data is not lost after power failures. CRC checksums also ensure the integrity of parameter transmission.
[0022] S103: PLC 202 writes the moment of inertia ratio parameter into the direct drive motor driver 203 via EtherCAT communication; Specifically, after the PLC 202 completes turntable type determination and parameter matching, it first executes a safety sequence. Using an axis control function block (e.g., MC_Power), it sets the DD motor enable signal (%Q0.0) to low, forcing the drive into a parameter-writable state. This step effectively prevents mechanical vibration caused by dynamic parameter adjustments. Subsequently, the PLC 202's EtherCAT master module initiates real-time data exchange. Using a preconfigured process data object (PDO) mapping channel, it packages the moment of inertia ratio parameters (e.g., 264 for the large turntable) stored in the %QW15 buffer into a data packet conforming to the EtherCAT frame format. This data packet is transmitted via a dedicated SYNC manager channel, utilizing a distributed clock (DC) synchronization mechanism to ensure time determinism and achieve synchronization accuracy of ±100ns. At the data link layer, the parameters are encapsulated as the payload within an EtherCAT telegram. The destination address points to the DD motor drive's slave index (e.g., location 0x1000), along with the pre-set parameter index (16#2103) and subindex (16#00). After receiving the telegram, the drive's ESC (EtherCAT slave controller) chip parses the parameter value and writes it into the corresponding object dictionary entry. It then sends an acknowledgment message (ACK) to the PLC202 via the CoE (CANopen over EtherCAT) protocol. To ensure the reliability of the parameter's effectiveness, a dual verification mechanism is implemented: the PLC202 monitors the "Parameter Updated" flag (bit 12) in the drive's Status Word. Furthermore, it reads the current value of the PT103 sensor via the SDO (Service Data Object) for readback verification. The PLC202 then automatically restores the enable signal, and the drive immediately applies the new parameters to adjust the PID algorithm coefficients for the current and speed loops.
[0023] S104: After the parameter writing is completed, the direct drive motor enable is automatically restored, making the drive effective immediately without powering off or resetting.
[0024] Specifically, after the PLC202 completes writing the moment of inertia ratio parameter (PT103) via EtherCAT communication and receives confirmation from the drive, it first performs multiple status verifications to ensure the parameters have been correctly loaded. The PLC202 program periodically reads the drive's Status Word (Object Dictionary Index 0x6041) to monitor the "Parameter Ready" flag in bit 12. It also compares the current PT103 value read back via the SDO (Service Data Object) with the set value. If both values are verified to be consistent, the enable recovery sequence begins. At this point, the PLC202 calls a PLC202open-compliant function block (such as MC_Power) to send a rising edge signal to the "Enable" bit 0 of the drive's Control Word (Control Word, Index 0x6040). This signal is transmitted to the drive in real time via EtherCAT Process Data (PDO). The drive employs a double-buffering mechanism to automatically and smoothly transition its motion control algorithm to avoid sudden torque changes when the new inertia parameters take effect. To ensure system stability, the PLC202 checks the drive's actual speed feedback (via the PDO object 0x606C) before sending the enable command. Only when the speed falls below a preset threshold (e.g., 5 rpm) does the enable operation take place. The drive's "soft start" function is simultaneously activated, gradually resuming operation via a preset acceleration ramp (typically set between 100-500 rpm / s²). The entire enable recovery process completes within 10ms, during which the PLC202 continuously monitors the drive's fault code (object 0x603F) and current feedback (object 0x6075). Any anomalies detected immediately trigger the Safe Torque Off (STO) function.
[0025] It solves the problems of traditional solutions that rely on manual switching, need to be reset by power off, and have poor scalability, and realizes fully automatic matching of turntable inertia, significantly improves production line continuity and changeover efficiency, and reduces maintenance costs.
[0026] The second embodiment of this application is: Based on the first embodiment, please refer to Figure 2 ,in, Figure 2 This is a principle block diagram of a turntable inertia switching system based on PLC202 communication according to a second embodiment of the present invention.
[0027] The turntable inertia switching system based on PLC 202 communication in this embodiment includes a photoelectric sensor 201 , a PLC 202 , a direct drive motor driver 203 and an automatic adjustment software 204 .
[0028] According to this specific embodiment, the photoelectric sensor 201 is connected to the PLC 202 , the direct drive motor driver 203 is connected to the PLC 202 , and the automatic adaptation software 204 is connected to the PLC 202 ; The photoelectric sensor 201 is used to detect the type of the currently installed turntable and transmit the detection signal to the PLC 202; The PLC 202 is used to determine the type of the turntable according to the detection signal, match the corresponding rotation inertia ratio parameter, and write the rotation inertia ratio parameter into the direct drive motor driver 203 through EtherCAT communication; The direct drive motor driver 203 is used to receive and apply parameters; The automatic adjustment software 204 is used to measure the rotational inertia ratio parameters of different turntables for the PLC 202 to call.
[0029] A turntable inertia switching system based on PLC202 communication of this embodiment is used. Since the diameters of the large and small turntables are different, the presence or absence of a signal from the Omron photoelectric sensor 201 (model: E3ZG-D61-S 2M, detection distance 5-100mm) can be used to determine whether it is a large turntable or a small turntable. The Omron photoelectric sensor 201 is installed in a position where the large turntable can sense the signal but the small turntable cannot. That is, the large turntable with a diameter of 600mm can be sensed by the sensor, but the small turntable with a diameter of 300mm cannot sense the sensor signal. PLC202 receives sensor signals and performs program logic processing. Different turntable inertia ratios transmit corresponding turntable inertia parameters. The DD motor driver communicates with PLC202 via EtherCAT. Process data (PDO settings) must be added to PLC202. Add output PDO index 16#2103, sub-index 16#00, 2 bytes (the XML file for the DD motor driver parameter moment of inertia ratio PT103 corresponds to Inovance index 16#2103, sub-index 16#00. The PT103 setting range is 0-50000, with a setting unit of 1%). Once the output PDO is added, it is automatically mapped and assigned an address. Specifically, the EtherCAT I / O mapped address is automatically assigned to an INT type variable. When the DD motor driver reads changes in the mapped data, the PT103 value changes accordingly. If the large turntable sensor receives a signal but the DD motor driver is not enabled, the program will delay for 5 seconds. The PLC202 will then transmit the large turntable inertia ratio parameter to the address variable mapped to the EtherCAT I / O. The written parameter takes effect immediately, allowing the DD motor driver to adapt to the different inertias. To use the device, disconnect the driver (this must be done to write parameters; otherwise, the DD motor will make unusual noises and vibrate). Import the DD motor driver XML file into the PLC202, create a motion axis, connect the DD motor driver communication cable, and open the DD motor driver Thunder software. Automatic adjustment will begin, calculating the PT103 moment of inertia ratio required for the large and small turntables (the PT103 setting range is 0-50,000, in 1% increments). After adjustment is complete, check the PT103 parameters to obtain the load's moment of inertia ratio. The PLC202 program logic process is as follows: ① The %IX1.0 signal on the PLC202 input module is connected. The Omron sensor detects the presence of a large turntable and generates a signal, turning on the IX1.0 signal. ② The axis control function block is disabled. ③ The delay timer is set to a 5-second delay. ④ The transmit command transmits the large turntable's moment of inertia ratio value, 264, to %QW15. The turntable sensor sends the turntable's inertia ratio data, i.e., the inertia parameter values corresponding to different loads, to the DD motor driver. This completes the inertia matching and enables the motor to control rotation.
[0030] It solves the problems of traditional solutions that rely on manual switching, need to be reset by power off, and have poor scalability, and realizes fully automatic matching of turntable inertia, significantly improves production line continuity and changeover efficiency, and reduces maintenance costs.
[0031] The above disclosure is merely one or more preferred embodiments of the present application and is not intended to limit the scope of the present application. A person skilled in the art will understand that all or part of the processes of the above embodiments and equivalent changes made in accordance with the claims of the present application are still within the scope of the present application.
Claims
1. A turntable inertia switching method based on PLC communication, characterized in that: The following steps are involved: The photoelectric sensor detects the type of turntable currently installed and transmits the detection signal to the PLC; The PLC determines the turntable type based on the detection signal and matches the corresponding moment of inertia ratio parameters; The PLC writes the moment of inertia ratio parameters into the direct drive motor driver via EtherCAT communication; After the parameter writing is completed, the direct drive motor enable is automatically restored, making the drive effective immediately without powering off or resetting.
2. The turntable inertia switching method based on PLC communication according to claim 1, characterized in that: The photoelectric sensor detects the type of turntable currently installed and transmits the detection signal to the PLC. The photoelectric sensor is installed at a position where the large turntable can be sensed but the small turntable cannot be sensed, so as to distinguish turntables of different diameters.
3. The turntable inertia switching method based on PLC communication according to claim 2, characterized in that: The PLC determines the turntable type based on the detection signal and matches the corresponding moment of inertia ratio parameters. The moment of inertia ratio parameters are pre-determined by the automatic tuning software and stored in the PLC or drive.
4. The turntable inertia switching method based on PLC communication according to claim 3, characterized in that: The PLC writes the moment of inertia ratio parameter into the direct drive motor driver via EtherCAT communication, and the steps previously include: The PLC first disconnects the direct drive motor enable, and then restores the enable after the parameter writing is completed to avoid motor vibration or abnormal noise.
5. The turntable inertia switching method based on PLC communication according to claim 4, characterized in that: The PLC writes the moment of inertia ratio parameters to the direct drive motor driver via EtherCAT communication. EtherCAT communication uses PDO mapping. The PLC writes the moment of inertia ratio parameters to the preset index address, and the driver reads and updates the parameters in real time.
6. The turntable inertia switching method based on PLC communication according to claim 5, characterized in that: The PLC writes the moment of inertia ratio parameters to the direct drive motor driver via EtherCAT communication. After the PLC detects that the turntable has been replaced, it delays for a certain period of time before writing parameters to ensure system stability.
7. A turntable inertia switching system based on PLC communication, applicable to the turntable inertia switching method based on PLC communication as claimed in claim 1, characterized in that: The system comprises a photoelectric sensor, a PLC, a direct drive motor driver and an automatic adjustment software, wherein the photoelectric sensor is connected to the PLC, the direct drive motor driver is connected to the PLC, and the automatic adjustment software is connected to the PLC; The photoelectric sensor is used to detect the type of the currently installed turntable and transmit the detection signal to the PLC; The PLC is used to determine the type of the turntable according to the detection signal, match the corresponding moment of inertia ratio parameter, and write the moment of inertia ratio parameter into the direct drive motor driver via EtherCAT communication; The direct drive motor driver is configured to receive and apply parameters; The automatic adjustment software is used to measure the rotational inertia ratio parameters of different turntables for the PLC to call.