Switching control method of timing controller
By adjusting the clock crystal oscillator frequency in real time to compensate for clock drift, the problem of time measurement error in traditional timing controllers under temperature changes is solved, achieving high-precision gate control and improving finished product quality and production stability.
Patent Information
- Application Number
- CN202510017361.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-01-06
AI Technical Summary
When faced with clock drift issues, the frequency stability of traditional timing controllers is affected by changes in ambient temperature, leading to time measurement errors, which in turn affect the accuracy of gate switching actions and consequently impact the quality of the finished product.
By collecting ambient temperature data in real time based on a temperature sensor, the frequency of the clock crystal oscillator is dynamically adjusted to compensate for clock drift, ensuring the stability and accuracy of the timing controller's switching control.
It achieves high-precision time measurement of the timing controller under different temperature environments, ensuring the accuracy of the gate switch action and improving the quality of finished products and production efficiency.
Smart Images

Figure CN119773173B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of timing controller technology, and more specifically, to a switching control method for a timing controller. Background Technology
[0002] In needle valve hot runner injection molding systems, timing controllers play a crucial role. They are responsible for precisely controlling the opening and closing times of the gates based on the injection signals from the injection molding machine, thereby influencing the process of molten plastic filling the mold cavity. Proper timing control not only ensures a weld-line-free product and improves the surface quality of the molded product, but also optimizes product quality by adjusting the injection volume at each gate, preventing defects or underfilling. However, existing timing controllers have limitations that restrict their performance and application range.
[0003] In practical applications, one challenge faced by timing controllers is clock drift. As a core component for timing within electronic devices, the frequency stability of the clock crystal oscillator is directly affected by changes in ambient temperature. When the temperature rises or falls, the oscillator's output frequency undergoes a slight change, leading to errors in time measurement. While these errors may not be noticeable in the short term, they can accumulate over long periods or in applications requiring extremely high time resolution, potentially causing significant time deviations. This can affect the accuracy of gate switching actions and ultimately the quality of the finished product.
[0004] Therefore, an optimized switching control method for timing controllers is desired. Summary of the Invention
[0005] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a switching control method for a timing controller, which dynamically adjusts the frequency of a clock crystal oscillator to compensate for clock drift based on real-time ambient temperature data collected by a temperature sensor, thereby ensuring the stability and accuracy of the switching control of the timing controller.
[0006] According to one aspect of this application, a switching control method for a timing controller is provided, comprising: electrically connecting the timing controller to a power supply, and turning on the timing controller via an ON / OFF button to put the timing controller into a standby state; receiving a control mode selected by a user, and receiving control parameters input by the user; determining the type of injection signal input based on the type of injection molding machine; determining the type of output voltage based on the type of solenoid valve; and automatically controlling the opening and closing of the gate based on the control mode and the control parameters after receiving an injection signal from the injection molding machine, wherein the timing controller adjusts the frequency of a clock crystal oscillator to compensate for clock drift based on ambient temperature data collected by a temperature sensor.
[0007] In the above-mentioned switching control method of the timing controller, the control modes include a two-stage timing control mode and a four-stage timing control mode.
[0008] In the above-mentioned switching control method of the timing controller, when the control mode is a two-segment timing control mode, the control parameters include timing resolution, delay time, and gate opening time; when the control mode is a four-segment timing control mode, the control parameters include timing resolution, first delay time, first gate opening time, second delay time, and second gate opening time.
[0009] In the above-mentioned switching control method of the timing controller, after receiving the injection signal from the injection molding machine, the timing controller automatically controls the opening and closing of the gate based on the control mode and the control parameters, including: after receiving the injection signal, the timing controller performs preliminary verification on the injection signal to check whether the injection signal conforms to the preset standard format and logical conditions; after determining that the injection signal conforms to the preset standard format and logical conditions, the control mode and the control parameters are loaded; based on the ambient temperature data collected by the temperature sensor, the frequency of the clock crystal oscillator is adjusted; based on the frequency of the clock crystal oscillator, the current time point is determined as the start time of the timing task; based on the control parameters, a timing task instance is created to obtain a queue of timing task instances; the queue of timing task instances is executed to automatically control the opening and closing of the gate.
[0010] In the above-described switching control method of the timing controller, adjusting the frequency of the clock crystal oscillator based on the ambient temperature data collected by the temperature sensor includes: acquiring ambient temperature values at multiple sampling points collected by the temperature sensor; calculating the average of the ambient temperature values at the multiple sampling points as the current ambient temperature value; determining the actual clock frequency value based on the current ambient temperature value; calculating the difference between the actual clock frequency value and the ideal clock frequency to obtain an error signal; and inputting the error signal into a PID controller to obtain a frequency control signal, wherein the frequency control signal is used to adjust the frequency of the clock crystal oscillator.
[0011] In the above-mentioned switching control method of the timing controller, determining the actual clock frequency value based on the current ambient temperature value includes: obtaining a temperature-frequency relationship curve; and searching the temperature-frequency relationship curve for a clock frequency value corresponding to the current ambient temperature value as the actual clock frequency value.
[0012] In the above-described switching control method of the timing controller, the error signal is input to the PID controller to obtain a frequency control signal. The frequency control signal is used to adjust the frequency of the clock crystal oscillator, including: determining a frequency proportional gain portion; determining a frequency integral gain portion; determining a frequency differential gain portion; adding the frequency proportional gain portion, the frequency integral gain portion, and the frequency differential gain portion to obtain a frequency increment; and generating the frequency control signal based on the frequency increment, wherein the frequency control signal is a PWM signal.
[0013] Compared with the prior art, the switching control method of the timing controller provided in this application is based on the real-time acquisition of ambient temperature data by a temperature sensor and the dynamic adjustment of the clock crystal oscillator frequency to compensate for clock drift, thereby ensuring the stability and accuracy of the switching control of the timing controller. Attached Figure Description
[0014] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0015] Figure 1 The illustration shows a flowchart of a switching control method for a timing controller according to an embodiment of this application.
[0016] Figure 2 The illustration shows a flowchart of a timing controller automatically controlling the opening and closing of the gate based on the control mode and the control parameters after receiving an injection signal from an injection molding machine, according to an embodiment of this application.
[0017] Figure 3 The illustration shows a flowchart of adjusting the frequency of a clock crystal oscillator based on ambient temperature data collected by the temperature sensor, according to an embodiment of this application. Detailed Implementation
[0018] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.
[0019] Figure 1The diagram illustrates a flowchart of a switching control method for a timing controller according to this application. The switching control method includes the following steps: S1, electrically connecting the timing controller to a power source and turning it on via an ON / OFF button to put it into a standby state; S2, receiving a control mode selected by the user and receiving control parameters input by the user; S3, determining the type of injection signal input based on the type of injection molding machine; S4, determining the type of output voltage based on the type of solenoid valve; S5, after receiving an injection signal from the injection molding machine, the timing controller automatically controls the opening and closing of the gate based on the control mode and the control parameters, wherein the timing controller adjusts the frequency of the clock crystal oscillator based on ambient temperature data collected by a temperature sensor to compensate for clock drift.
[0020] In step S1, the timing controller is electrically connected to the power supply, and the timing controller is turned on using the ON / OFF button to put it into standby mode. Specifically, the timing controller is designed with one or more power interfaces for connecting to different types of power supplies such as AC220V and DC24V. These interfaces not only need to meet safety standards, such as overvoltage protection and short-circuit protection, but also need to ensure good contact with the power supply to prevent unstable power supply due to poor contact. Once the power cable is inserted into the power interface of the timing controller and a secure connection is ensured, the first step of electrical connection is completed. Next, after the power connection is completed, the device is started by pressing the ON / OFF button on the timing controller. This button is actually a mechanical button that contains a circuit that changes the state of the circuit when pressed. Specifically, when the user presses the ON / OFF button, it triggers a switching action that connects the power management module on the main control board, thereby activating the system initialization program. During this process, the power management module is responsible for monitoring whether the input voltage is stable, and after detecting a suitable voltage level, it gradually supplies power to various subsystems, including but not limited to the microprocessor, memory, and various sensor interfaces. This gradual power-on method avoids damage to electronic components from sudden large currents, and also helps reduce electromagnetic interference (EMI) and improve system stability.
[0021] With a stable power supply, the timing controller enters standby mode. At this time, the timing controller performs a series of operations. First, the microprocessor loads pre-stored firmware code, which includes the operating system kernel and all necessary drivers to manage and coordinate communication between various hardware components. Then, the system checks its own health status, such as whether the memory is working properly and whether there are any abnormal sensor readings. All of this is to ensure that all functions operate as expected once the system officially enters operating mode. Furthermore, in standby mode, the timing controller maintains a low power consumption level, performing only the most basic monitoring activities, waiting to receive further instructions from the user or for specific events to occur, such as the arrival of an injection molding signal.
[0022] In step S2, the control mode selected by the user and the control parameters input by the user are received. That is, considering the diversity and complexity of injection molding processes, as well as different requirements for product quality and production efficiency, different injection molded products, mold designs, and material properties may require different gate opening and closing logics to ensure optimal molding results in practical applications. Therefore, providing multiple control modes can meet these diverse needs, enabling the timing controller to adapt more flexibly to various injection molding tasks and achieve higher precision and efficiency.
[0023] In one example, the control modes include a two-stage timing control mode and a four-stage timing control mode. The two-stage timing control mode is suitable for relatively simple applications with high time control requirements. In this mode, users only need to set two parameters: delay time and gate opening time, to meet basic time control needs. This simplified design reduces operational difficulty and is particularly suitable for small or standardized production environments where the injection molding process is relatively simple and does not require excessive complex adjustments. For example, on some small plastic product production lines, using the two-stage timing control mode allows for rapid equipment adjustment to adapt to frequently changing product types while ensuring consistent quality for each product.
[0024] However, for more complex and variable injection molding processes, the four-stage timing control mode offers more precise time management capabilities. This mode not only includes all the parameters of the two-stage mode but also adds four additional time periods: the first delay time, the first gate opening time, the second delay time, and the second gate opening time. For example, in a typical four-stage control scenario, T1 and T3, as delay time periods, are primarily used to set the duration of the gate closure period; while T2 and T4 correspond to the gate opening period, used to control the speed and amount of material injection. This design allows users to make fine-tuning adjustments for different process stages, thus better matching specific injection molding conditions. For instance, in the production of large injection molded parts or multi-cavity molds, due to multiple gates and longer cooling times, the four-stage timing control mode can help optimize material flow throughout the entire injection cycle, reduce the probability of defects such as bubbles and shrinkage, and improve yield.
[0025] Based on this, in a specific example, when the control mode is a two-segment timing control mode, the control parameters include timing resolution, delay time, and gate opening time; when the control mode is a four-segment timing control mode, the control parameters include timing resolution, first delay time, first gate opening time, second delay time, and second gate opening time.
[0026] Specifically, in the four-segment timing control mode, there is a dual transition between delay-open and open-delay, and these two state transitions are significantly correlated. In the embodiments of this application, especially when the delay-open-delay control of multiple gates is involved, a suspension-activation-suspension state transition mechanism is adopted for control.
[0027] For the suspended-activated state transition, both the suspended state read and the activated state write are performed simultaneously. That is, the delayed state is read while the open state is written, and it is simultaneously checked whether the read delayed state and the written open state have the same state ID, i.e., the same controlled entity. Therefore, in response to the read delayed state and the written open state originating from the same entity, the delayed state interrupt is enabled (e.g., adding the delayed state to an interrupt instance), while the open state interrupt is disabled (e.g., removing the open state from the interrupt instance).
[0028] Similarly, for the active-suspended state transition, the active state is read and the suspended state is written simultaneously. That is, the open state is read and the delayed state is written at the same time, and it is simultaneously checked whether the read open state and the written delayed state have the same state ID, that is, the same controlled subject. Therefore, in response to the read open state and the written delayed state originating from the same subject, the open state interrupt is enabled, for example, the open state is re-added to the interrupt instance, and the delayed state interrupt is disabled, for example, the delayed state is removed from the interrupt instance.
[0029] In a more specific example, the timing control card has two built-in control programs: a two-segment timing control mode and a four-segment timing control mode. The factory default setting is the two-segment timing control mode. Users can select and adjust these control modes and their related parameters through specific operating procedures to meet different production needs.
[0030] With the timing control card powered on, the user can press and hold the SET key and the up key simultaneously for 2 seconds. The upper display will then show "-TD-", while the lower display will show the current control mode: "-yvd0-" (indicating two-segment timing control) or "-165-" (indicating four-segment timing control). By pressing the up or down key, the user can switch between "-yvd0-" (two-segment timing control) and "-165-" (four-segment timing control). Once the desired control mode is selected, pressing and holding the SET key for 1 second will exit the parameter setting mode and save the changes.
[0031] For two-stage timing control, users can enter the parameter setting mode by pressing and holding the SET button for 1 second. The upper display will show "AB", while the lower display will show the current mode (A or B). Users can switch between modes A and B by pressing the up or down arrow keys, and then press and hold the SET button again for 1 second to exit the parameter setting and save the changes. To select the timing resolution, users can press the SET button once after entering the parameter setting mode. The upper display will show "dot", and the lower display will show the current resolution (0.01 or 0.1). Users can adjust the resolution to 0.1 or 0.01 by pressing the up or down arrow keys, and then press and hold the SET button for 1 second to exit the parameter setting and save the changes. The delay time setting is achieved by pressing the SET button twice after entering the parameter setting mode. The upper display will show "delt", and the lower display will show the current delay time. Users can adjust the delay time by pressing the up or down arrow keys, and finally press and hold the SET button for 1 second to exit the parameter setting and save the changes. To set the gate opening time, the user needs to press the SET button three times after entering the parameter setting mode. At this time, the upper display will show "open," and the lower display will show the current opening time. The user can adjust the opening time by pressing the up or down button. Similarly, pressing and holding the SET button for one second exits the parameter setting mode and saves the changes. Note that this setting menu is only accessible when mode B is selected.
[0032] For the four-segment timing control mode, users can also enter the parameter setting mode by pressing and holding the SET button for 1 second. At this time, the upper display will show "AB", while the lower display will show the current mode (A or B). Users can switch between modes A and B by pressing the up or down arrow keys, and then press and hold the SET button again for 1 second to exit the parameter setting and save the changes. The method for selecting the timing resolution is the same as for the two-segment timing control mode: after entering the parameter setting mode, the user presses the SET button once; the upper display will show "dot", and the lower display will show the current resolution (0.01 or 0.1). Users can adjust the resolution to 0.1 or 0.01 by pressing the up or down arrow keys, and then press and hold the SET button for 1 second to exit the parameter setting and save the changes. To set the delay time T1, after entering the parameter setting mode, press the SET button twice. The upper display will show "T1", and the lower display will show the current delay time. Users can adjust the delay time by pressing the up or down arrow keys, and finally press and hold the SET button for 1 second to exit the parameter setting and save the changes. To set the gate opening time T2, the user needs to press the SET button three times after entering the parameter setting mode. The upper display will show "T2," and the lower display will show the current opening time. The user can adjust the opening time using the up or down arrow keys. Similarly, pressing and holding the SET button for one second exits the parameter setting mode and saves the changes. To set the delay time T3, the user needs to press the SET button four times after entering the parameter setting mode. The upper display will show "T3," and the lower display will show the current delay time. The user can adjust the delay time using the up or down arrow keys. Finally, pressing and holding the SET button for one second exits the parameter setting mode and saves the changes. To set the gate opening time T4, the user needs to press the SET button five times after entering the parameter setting mode. The upper display will show "T4," and the lower display will show the current opening time. The user can adjust the opening time using the up or down arrow keys. Finally, pressing and holding the SET button for one second exits the parameter setting mode and saves the changes.
[0033] Furthermore, offering multiple control modes enhances system compatibility and scalability. With the continuous improvement of industrial automation and technological advancements, new injection molding technologies and materials are constantly emerging, requiring control systems to possess sufficient flexibility to adapt to these changes. By introducing different control modes, the timing controller can adapt to the requirements of new injection molding machines or new processes without altering the hardware structure, simply through software updates or parameter adjustments.
[0034] Furthermore, throughout the parameter input process, the timing controller provides a real-time feedback mechanism. Whenever the user modifies a parameter, the latest setting value is immediately displayed on the screen, allowing the user to stay informed about the current status. In addition, to prevent data loss due to unforeseen circumstances, the system automatically saves the new settings after each valid change, ensuring that even sudden events such as power outages do not affect existing configurations. Simultaneously, to ensure security and stability, all input parameters are validated by the system to ensure they conform to preset ranges and logical conditions. If any abnormal values are detected, the system will issue a warning to remind the user to recheck the input, preventing problems caused by incorrect configuration.
[0035] In step S3, the type of injection signal input is determined based on the type of injection molding machine. Specifically, the timing controller has diverse input interfaces to adapt to different types of injection molding machines. It should be understood that there are significant differences between different injection molding machine manufacturers and models, especially in terms of signal output standards. Some older or brand-specific injection molding machines may use analog voltages (such as 0-10VDC) as injection signals, while modern equipment tends to use digital signals (such as 24VDC or 220VAC switching signals). Furthermore, some injection molding machines provide pulse width modulation (PWM) signals or other forms of coded signals. This diversity of signal types means that the timing controller must be able to identify and adapt to various input signals to ensure correct interpretation of instructions from the injection molding machine. If the timing controller cannot accurately understand the received signals, it may lead to incorrect gate opening and closing timing, thereby affecting product quality and production efficiency.
[0036] Therefore, to accommodate different injection molding machine manufacturers and models, the timing controller is designed to support multiple input interfaces to ensure compatibility with signals emitted by different types of injection molding machines. In a specific example, the timing controller supports multiple forms of injection molding signal input, including 24VDC, 220VAC, and switch signals. Users can select the appropriate signal input method according to the type of injection molding machine they are using and complete the corresponding configuration through simple jumper settings. For example, for a 24VDC signal input, the user needs to short-circuit the two jumpers to positions 1, 2, and 3 of the first socket (JP1 socket) respectively, while leaving the second socket (JP2 socket) floating; for a 220VAC signal input, the connection of the first socket needs to be adjusted; and for a switch signal input, the connection of the second socket should be adjusted. This flexible hardware design allows the timing controller to be widely compatible with various common injection molding machine models on the market, without being limited to specific brands or models. Furthermore, it allows users to quickly switch between different signal input types simply by adjusting external connections without changing the internal circuitry.
[0037] Once the interface is ready, this application will also initiate an initialization procedure to verify the validity of the input signal. Specifically, upon receiving the injection molding signal, the timing controller will perform a preliminary verification of the signal, checking whether it conforms to the preset standard format and logic conditions. For example, for a 24VDC switching signal, the system may check whether the high and low level changes of the signal are as expected; while for a 220VAC signal, it will focus on the quality of the voltage waveform and frequency stability.
[0038] In step S4, the type of output voltage is determined based on the type of solenoid valve. It should be understood that electromagnetic interference (EMI), power fluctuations, and other factors can affect the normal operation of electrical equipment. For a timing controller, selecting the correct output voltage type can effectively reduce the risks caused by voltage mismatch. For example, when using a 24V DC solenoid valve, the timing controller will output a 24V DC level at a predetermined time to open or close the solenoid valve; if it is a 220V AC solenoid valve, it will output a 220V AC level at the same time. Such output control not only ensures the normal operation of the solenoid valve but also avoids the risk of equipment damage caused by excessively high or low voltage, thereby improving the stability and reliability of the entire system.
[0039] In a specific example, the configuration can be completed with simple jumper cap settings. Specifically, for a 24V DC solenoid valve, the user needs to short-circuit the two jumpers to positions 1 and 3 of the third socket (JP3 socket), while leaving the fourth socket (JP4 socket) and the fifth socket (JP5 socket) floating. For a 220V AC solenoid valve, the connection of the fifth socket should be adjusted, i.e., short-circuiting positions 1 and 3, while leaving the third and fourth sockets floating. If it is a switch output, the connection of the fourth socket needs to be adjusted. This flexible hardware design allows the timing controller to be widely compatible with various solenoid valves commonly found on the market, without being limited to specific brands or models. Furthermore, it allows users to quickly switch between different output voltage types simply by adjusting the external connections without changing the internal circuitry.
[0040] In step S5, after receiving the injection signal from the injection molding machine, the timing controller automatically controls the opening and closing of the gate based on the control mode and the control parameters. The timing controller adjusts the frequency of the clock crystal oscillator based on the ambient temperature data collected by the temperature sensor to compensate for clock drift.
[0041] It is understandable that injection molding processes have extremely high requirements for time control, especially the timing of gate opening and closing. The opening and closing of the gate directly affects the material injection speed, pressure distribution, and the quality and yield of the final product. Therefore, the timing controller must be able to accurately respond to instructions from the injection molding machine and execute corresponding actions according to pre-set control modes and parameters. In this way, the most precise time control can be achieved for each injection cycle, thereby achieving consistency and efficiency. For example, in multi-cavity molds or multi-stage injection molding processes, the injection time, pressure, and temperature conditions are not the same at each stage. To achieve precise control over these subtle differences, the timing controller needs to have highly flexible time management capabilities. Users can select a two-stage or four-stage timing control mode according to the specific injection molding machine type and set key parameters such as delay time and opening time for each stage. This not only helps optimize material flow within the injection cycle and reduce the probability of defects such as bubbles and shrinkage, but also improves yield and reduces scrap rate. However, some factors inevitably exist in the industrial environment that can affect the clock crystal oscillator, causing its output frequency to drift. This drift directly affects the timing accuracy of timed tasks, thus impacting product quality. For example, in high-temperature environments, the crystal oscillator frequency may increase, causing the system to perceive the elapsed time as longer than it actually is; conversely, in low-temperature environments, the opposite is true. To avoid this, the timing controller employs an advanced temperature compensation mechanism.
[0042] In one example, such as Figure 2 As shown, after receiving the injection signal from the injection molding machine, the timing controller automatically controls the opening and closing of the gate based on the control mode and the control parameters, including: S51, after receiving the injection signal, the timing controller performs preliminary verification on the injection signal to check whether the injection signal conforms to the preset standard format and logical conditions; S52, after determining that the injection signal conforms to the preset standard format and logical conditions, the control mode and the control parameters are loaded; S53, based on the ambient temperature data collected by the temperature sensor, the frequency of the clock crystal oscillator is adjusted; S54, based on the frequency of the clock crystal oscillator, the current time point is determined as the start time of the timing task; S55, based on the control parameters, a timing task instance is created to obtain a queue of timing task instances; S56, the queue of timing task instances is executed to automatically control the opening and closing of the gate.
[0043] In step S51, after receiving the injection signal, the timing controller performs a preliminary verification of the injection signal to check whether it conforms to a preset standard format and logical conditions. It should be understood that only injection signals that conform to the preset standard format and logical conditions will be used to initiate subsequent timing tasks. For example, in some cases, the injection molding machine may issue incorrect signals due to malfunctions or other abnormalities. Accepting all signals indiscriminately may cause the timing controller to make incorrect responses, thereby affecting the entire production process and even damaging the equipment. Therefore, by rigorously checking the received injection signals, such problems can be effectively prevented, improving the reliability and safety of the system.
[0044] In a specific example, the timing controller first performs a level detection on the received injection signal to confirm that its voltage level is within a preset range. For example, for a 24V DC signal, the system checks whether the high level of the signal is stable between 20V and 28V, and whether the low level is close to 0V. This detection can eliminate false triggering caused by power fluctuations or line noise. Next, the timing controller measures the pulse width of the signal to ensure that it conforms to the standard format issued by the injection molding machine. Typically, the injection molding machine sends a pulse signal with a certain width to indicate the start time of injection, and this pulse width value is predefined. If the received signal pulse width does not conform to the preset value, it will be regarded as an invalid signal and ignored.
[0045] In addition, the timing controller also verifies the logical conditions of the signals. Specifically, it checks the intervals and sequence relationships between multiple consecutive pulses. For example, in some complex multi-stage injection molding processes, the injection molding machine may continuously send multiple different types of signals to indicate different operation stages. The timing controller needs to ensure that these signals arrive in the correct order and that the intervals between each signal are within the allowable range. This not only ensures the validity of the signals but also enhances the system's anti-interference capability. To achieve the above verification function, the timing controller integrates a dedicated signal processing module. This module is responsible for monitoring the status changes of the input ports in real time and checking each signal one by one according to preset standard formats and logical conditions. Once a signal that does not meet the requirements is found, the system will immediately stop further processing and record the relevant error information for maintenance personnel to refer to. Conversely, if the signal passes all verification steps, it will be considered valid and trigger subsequent operations, such as loading control modes and parameters, starting timed tasks, etc.
[0046] In step S52, once the signal is confirmed to be valid, the timing controller loads the user-preset control mode and related parameters. These parameters may include delay time, gate opening time, etc., which directly determine the specific timing of gate opening and closing. For the two-stage timing control mode, the user sets the delay time and gate opening time; while for the four-stage timing control mode, the first delay time, the first gate opening time, the second delay time, and the second gate opening time need to be configured additionally. This multi-stage time management method greatly improves the system's adaptability and controllability, enabling it to handle even complex and ever-changing injection molding tasks with ease.
[0047] In a specific example, under two-stage control, the timing controller supports two different operating modes: simple delay control (mode A) and delay plus open time control (mode B). The specific operating logic for these two modes is as follows: In simple delay control (mode A), upon receiving the injection signal, the gate is closed during the delay time (T1). Once the delay time ends, the gate opens and remains open until the injection time signal ends. For example, if the injection time is 10 seconds and the delay time is set to 3 seconds, the gate will open 3 seconds after receiving the injection signal, remain open for 7 seconds, and finally close. This mode is suitable for scenarios where the gate operation needs to be initiated after a certain delay, ensuring sufficient time for the material to be injected into the mold. In delay plus open time control (mode B), upon receiving the injection machine signal, the gate remains closed during the delay time (T1). After the delay time ends, the gate opens and remains open for the set open time (T2); after the open time ends, the gate begins to close and remains closed. For example, if the injection time is 10 seconds, the delay time is 2 seconds, and the opening time is 5 seconds, then after receiving the injection signal and delaying for 2 seconds, the gate opens and remains open for 5 seconds before closing. This mode provides finer timing control and is suitable for situations requiring precise control of the gate's opening and closing timing.
[0048] In a specific example, for the four-stage control method, each mode includes four stages of time control (T1, T2, T3, T4) to meet more complex process requirements. In a specific example, the A working mode (timed cycle control) under the four-stage control method means that once the control card starts the injection cycle, it will strictly execute the four stages sequentially according to the set time intervals until the entire four-stage set time is completed, regardless of whether the injection time signal is present. For example, the gate closes in stage T1, opens in stage T2, closes again in stage T3, opens again in stage T4, and finally closes after all stages are completed. In contrast, the B working mode (signal-triggered control) under the four-stage control method is more flexible. In this mode, when the injection time signal disappears, regardless of the time period the control card is in, its timed working cycle will immediately end, and the gate will close. For example, if the injection time signal ends prematurely in any stage, the current timed cycle will immediately terminate, and the gate will close. This mode allows the system to dynamically adjust according to actual production conditions, improving its ability to cope with unexpected situations.
[0049] In step S53, to ensure the accurate execution of the timing task, the timing controller adjusts the frequency of the internal clock crystal oscillator based on the ambient temperature data collected by the temperature sensor. This is because in industrial environments, changes in ambient temperature can significantly affect the clock crystal oscillator, causing its output frequency to drift. Without compensation, this drift will directly affect the timing accuracy of the task, thus impacting product quality. For example, in high-temperature environments, the crystal oscillator frequency may increase, causing the system to perceive the elapsed time as longer than it actually is; conversely, in low-temperature environments, the opposite is true. To avoid this, the timing controller employs an advanced temperature compensation mechanism.
[0050] In one example, such as Figure 3 As shown, adjusting the frequency of a clock crystal oscillator based on ambient temperature data collected by the temperature sensor includes: S531, acquiring ambient temperature values at multiple sampling points collected by the temperature sensor; S532, calculating the average of the ambient temperature values at the multiple sampling points as the current ambient temperature value; S533, determining the actual clock frequency value based on the current ambient temperature value; S534, calculating the difference between the actual clock frequency value and the ideal clock frequency to obtain an error signal; S535, inputting the error signal into a PID controller to obtain a frequency control signal, the frequency control signal being used to adjust the frequency of the clock crystal oscillator.
[0051] Specifically, the built-in temperature sensor samples the ambient temperature at preset time intervals (e.g., once per second). This time interval depends on the balance between required accuracy and response speed. To reduce noise interference and improve measurement accuracy, the timing controller may use the average of multiple samples as the current temperature reading, resulting in more stable and reliable temperature information. The timing controller then stores the temperature data over a period of time, which not only helps to establish a historical record of temperature change trends but can also be used to detect anomalies or predict future temperature trends.
[0052] Based on the temperature-frequency relationship curve provided by the manufacturer or obtained through experimental calibration, the timing controller can convert the current temperature into a corresponding temperature compensation coefficient. This curve describes how the clock crystal oscillator frequency changes at different temperatures. As new temperature data becomes available, the temperature compensation coefficient is updated in real time to ensure it always reflects the latest temperature conditions. In one example, determining the actual clock frequency value based on the current ambient temperature includes: acquiring the temperature-frequency relationship curve; and searching the temperature-frequency relationship curve for the clock frequency value corresponding to the current ambient temperature value as the actual clock frequency value.
[0053] In this way, the timing controller can maintain high-precision time measurement capabilities even when the ambient temperature changes. Furthermore, this dynamic adjustment mechanism not only effectively handles short-term temperature fluctuations but also adapts to long-term environmental changes, ensuring the long-term stability of the system. For example, in industrial environments, where the temperature rises or falls slowly due to heat generated by equipment operation or other factors, this mechanism ensures that the clock frequency remains within an ideal range, thereby maintaining the accuracy of timing tasks.
[0054] However, relying solely on lookup tables cannot completely eliminate the effects of clock drift, as temperature changes in real-world applications are often continuous and complex. Therefore, a PID controller is introduced in the timing controller to further optimize the clock frequency adjustment process. The PID controller is a classic feedback control system widely used in various automation fields. It continuously monitors the difference between the actual clock frequency and the ideal clock frequency (i.e., the error signal) and adjusts the output signal accordingly to eventually reach a stable state. In this case, the PID controller's role is to generate a frequency control signal based on the calculated error signal to adjust the frequency of the clock crystal oscillator.
[0055] In one example, the error signal is input to a PID controller to obtain a frequency control signal, which is used to adjust the frequency of the clock crystal oscillator. The frequency control signal includes: determining a frequency proportional gain portion; determining a frequency integral gain portion; determining a frequency differential gain portion; adding the frequency proportional gain portion, the frequency integral gain portion, and the frequency differential gain portion to obtain a frequency increment; and generating the frequency control signal based on the frequency increment, wherein the frequency control signal is a PWM signal.
[0056] Specifically, the PID controller acquires two key values: the ideal clock frequency (i.e., the expected frequency at standard temperatures) and the actual clock frequency calculated based on the current temperature coefficient. The ideal clock frequency is typically the frequency value calibrated by the manufacturer before shipment, under standard environmental conditions (e.g., 25°C). The actual clock frequency is calculated from real-time temperature data collected by the built-in temperature sensor, combined with a pre-stored temperature-frequency relationship curve. Subtracting the actual value from the ideal value yields an error signal. This error represents the degree to which the current clock frequency deviates from the ideal state. For example, if the ideal frequency is 16MHz, but the actual frequency becomes 15.9MHz due to changes in ambient temperature, the error is 0.1MHz. This error signal is the basic input to the PID controller, used for subsequent adjustment calculations.
[0057] Next, the proportional component of the PID controller acts directly on the error, and its output is proportional to the magnitude of the error. This means that if the error is large, the output will also be large, and vice versa. Proportional control provides immediate correction, helping to quickly reduce the error. However, proportional control alone may not completely eliminate steady-state error (i.e., the residual error after long-term operation) because it only corrects the error at the current moment, without considering historical accumulated error. Therefore, the PID controller also introduces an integral component, which considers the cumulative effect of all errors over a period of time. The integral component attempts to eventually reach a zero-error state by gradually increasing or decreasing the output. Integral control can effectively solve the steady-state error problem that may occur in proportional control, ensuring accuracy in long-term operation. However, excessively high integral gain may cause the system to become unstable and oscillate. In addition, the derivative component focuses on the rate of change of the error, that is, the speed at which the current error changes compared to the previous moment. It can help the system predict future errors and react in advance, thereby speeding up the system's response and suppressing oscillations. Derivative control helps to achieve a smooth adjustment process and avoids oscillations caused by overcorrection.
[0058] Furthermore, proportional, integral, and derivative control methods are combined. Each component has its unique gain coefficients (Kp, Ki, Kd), which determine their respective impact on the overall output. The key to comprehensive adjustment lies in finding suitable values for Kp, Ki, and Kd, which is an iterative process involving experimental testing, behavior observation, and fine-tuning based on specific application scenarios. Good parameter settings allow the system to reach the required clock frequency quickly and stably. The output value calculated using the PID formula above represents the clock frequency increment that needs adjustment. This increment is represented as: ;in, It is an error signal. It is an error signal. This is the variable within the integration interval. This formula combines the contributions of the proportional, integral, and derivative components to determine the final frequency increment. Finally, the calculated frequency increment is applied to the internal clock generator to adjust its operating frequency. Meanwhile, considering the practical limitations of the hardware, each adjustment is made in the smallest adjustable unit to ensure that the adjusted frequency is as close as possible to the target value without exceeding the range. For example, if the clock crystal oscillator supports adjustments in 1kHz increments, the calculated frequency increment will be rounded to the nearest integer multiple of 1kHz.
[0059] After each adjustment, a short-cycle, high-precision counter is used to measure the new clock frequency to confirm whether it meets expectations. This step verifies the effectiveness of the adjustment and provides feedback for further optimization. The high-precision counter can complete multiple measurements in a short period to ensure the accuracy of the results. In long-term operation, even small adjustments can lead to error accumulation. Therefore, the system needs to monitor this potential error and make timely corrections, such as recalibrating or adjusting PID parameters. To achieve this, the system can periodically record the frequency deviation over a period of time and trigger an automatic calibration procedure when necessary to ensure the clock frequency is always at its optimal level.
[0060] In another preferred embodiment, as described above, in the actual four-segment timing control mode, it is usually necessary to ensure the total gate opening time. Therefore, given that the first gate opening time plus the second gate opening time are determined, there will be a first delay state interruption instance out-of-instance time T1, a first open state interruption instance out-of-instance time T2, and a second delay state interruption instance out-of-instance time T3. In order to achieve more precise control of state-related tasks in the interruption instance, it is also desirable to use this to calibrate the proportional gain coefficient of the PID controller. Integral gain coefficient and differential gain coefficient .
[0061] Specifically, the proportional gain coefficient is calibrated based on the proportion of interrupted instance tasks, that is, the proportional parameter is set... ,but .
[0062] Regarding the integral gain coefficient, based on the proportional parameter and the integral relationship, we have: .
[0063] Furthermore, regarding the differential coefficients, based on the proportional parameter and according to the differential relationship, we have: ,in and All of these are weighted parameters related to the inherent frequency of the clock crystal oscillator, which improves the error behavior of the PID controller to the queuing response to interrupt instances, thereby achieving the control accuracy of the PID controller under nonlinear conditions.
[0064] In step S54, after temperature compensation, the crystal oscillator reaches the ideal frequency. The next crucial step is to generate a precise timestamp to serve as the start time for the timing task. This timestamp is not just a simple count value, but the result of multiple layers of calibration and verification. Specifically, the timing controller uses a high-precision counter to track every pulse generated by the crystal oscillator and converts it into time units (such as milliseconds or microseconds). Simultaneously, the system periodically synchronizes with an external standard time source (such as a GPS clock or other network time protocol server) to ensure that the local timestamp is consistent with global standard time. Upon receiving a valid injection signal from the injection molding machine, the timing controller immediately records the timestamp and uses it as the current determined time point.
[0065] In steps S55 and S56, based on the generated timestamps, the timing controller creates timed task instances according to the control parameters. Each instance contains specific execution times and operation instructions, such as opening or closing a solenoid valve. To ensure that these tasks are executed strictly according to the predetermined schedule, the timing controller employs an event-driven scheduling mechanism. Under this mechanism, whenever a preset time point is reached, the corresponding timed task is triggered and executed. Specifically, the timing controller maintains a queue of timed task instances and processes these tasks sequentially according to time. When the preset time point is reached, the timing controller retrieves the corresponding timed task instance from the queue and executes the corresponding action according to the operation instructions, such as sending a signal to the solenoid valve to control the opening and closing of the gate. This event-driven scheduling mechanism ensures that all timed tasks are executed at the correct time, thereby achieving precise control over the opening and closing of the gate.
[0066] This invention offers the following advantages: High-precision time control: By employing an advanced temperature compensation mechanism and PID algorithm to dynamically adjust the frequency of the clock crystal oscillator, the timing controller maintains highly stable timing performance under various temperature conditions. This high-precision time control is crucial for time-critical production processes such as injection molding, significantly improving product quality and production efficiency.
[0067] Flexible task scheduling mechanism: Based on the generated timestamps, the timing controller creates timed task instances according to the control parameters and employs an "event-driven" scheduling mechanism to ensure that each task is executed strictly according to the predetermined schedule. This mechanism not only improves production flexibility but also enhances system adaptability, allowing users to flexibly configure delay times and open times according to different production process requirements, thereby achieving more precise time control.
[0068] Strong Adaptability: The system supports multiple control modes (such as two-stage timing control mode and four-stage timing control mode) and allows users to adjust task priorities or add new task instances according to actual conditions. This design not only solves the limitations of the original control system, but also reserves ample expansion space for new equipment and technologies that may be introduced in the future, ensuring the long-term applicability and upgrade potential of the system.
[0069] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0070] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0071] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.
[0072] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0073] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A switching control method for a timing controller, characterized in that, include: Connect the timing controller to the power supply and turn it on using the ON / OFF button to put the timing controller into standby mode. It receives the control mode selected by the user and the control parameters input by the user; The type of injection signal input is determined based on the type of injection molding machine. The type of output voltage is determined based on the type of solenoid valve. After receiving the injection signal from the injection molding machine, the timing controller automatically controls the opening and closing of the gate based on the control mode and the control parameters. The timing controller adjusts the frequency of the clock crystal oscillator based on the ambient temperature data collected by the temperature sensor to compensate for clock drift. The adjustment of the frequency of the clock crystal oscillator based on the ambient temperature data collected by the temperature sensor includes: The ambient temperature values at multiple sampling points collected by the temperature sensor are obtained; The average of the ambient temperature values at the multiple sampling points is calculated as the current ambient temperature value. The actual clock frequency value is determined based on the current ambient temperature value; The difference between the actual clock frequency value and the ideal clock frequency is calculated to obtain the error signal; The error signal is input to the PID controller to obtain a frequency control signal, which is used to adjust the frequency of the clock crystal oscillator.
2. The switching control method of the timing controller as described in claim 1, characterized in that, The control modes include a two-stage timing control mode and a four-stage timing control mode.
3. The switching control method of the timing controller as described in claim 2, characterized in that, When the control mode is a two-segment timing control mode, the control parameters include timing resolution, delay time, and gate opening time; when the control mode is a four-segment timing control mode, the control parameters include timing resolution, first delay time, first gate opening time, second delay time, and second gate opening time.
4. The switching control method of the timing controller as described in claim 1, characterized in that, Upon receiving an injection signal from the injection molding machine, the timing controller automatically controls the opening and closing of the gate based on the control mode and the control parameters, including: Upon receiving the injection signal, the timing controller performs a preliminary verification of the injection signal to check whether the injection signal conforms to the preset standard format and logical conditions; After determining that the injection signal conforms to the preset standard format and logical conditions, the control mode and the control parameters are loaded; The frequency of the clock crystal oscillator is adjusted based on the ambient temperature data collected by the temperature sensor. Based on the frequency of the clock crystal oscillator, the current time point is determined as the start time of the timing task; Based on the control parameters, create scheduled task instances to obtain a queue of scheduled task instances; The queue of the scheduled task instances is executed to automatically control the opening and closing of the gate.
5. The switching control method of the timing controller as described in claim 4, characterized in that, Determining the actual clock frequency value based on the current ambient temperature value includes: Obtain the temperature-frequency relationship curve; The clock frequency value corresponding to the current ambient temperature value is searched on the temperature-frequency relationship curve and used as the actual clock frequency value.
6. The switching control method of the timing controller as described in claim 5, characterized in that, The error signal is input to the PID controller to obtain a frequency control signal, which is used to adjust the frequency of the clock crystal oscillator, including: Determine the frequency proportional gain component; Determine the frequency integral gain portion; Determine the frequency differential gain component; The frequency increment is obtained by adding the frequency proportional gain portion, the frequency integral gain portion, and the frequency differential gain portion together. The frequency control signal is generated based on the frequency increment, and the frequency control signal is a PWM signal.
7. The switching control method for a timing controller as described in claim 6, characterized in that, The determination of the frequency proportional gain, the determination of the frequency integral gain, and the determination of the frequency differential gain include: Extract the time outside the first delayed state interrupt instance, the time outside the first open state interrupt instance, and the time outside the second delayed state interrupt instance; Based on the time outside the first delayed state interruption instance, the time outside the first open state interruption instance, and the time outside the second delayed state interruption instance, calculate the first proportional parameter and the second proportional parameter; Based on the first proportional parameter and the second proportional parameter, adjust the proportional gain coefficient, integral gain coefficient and derivative gain coefficient.
Citation Information
Patent Citations
Time-keeping method of time synchronization device
CN103269262A
Multi-point glue feeding mold with timing sequence valve needle opening and closing function
CN118789765A