Method and system for adjusting data transceiving of PLC (Programmable Logic Controller)
Through real-time data collection and status determination of the PLC controller, precise control of the output data is achieved, which solves the shortcomings of the traditional PLC controller in data collection and control, improves the accuracy and stability of the system, and reduces maintenance costs.
Patent Information
- Application Number
- CN202411004441.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-25
AI Technical Summary
Traditional PLC controllers have insufficient real-time and accuracy in input and output data collection, processing and control status determination, making it difficult to achieve precise control and optimization of output data.
By collecting the input and output data of the PLC controller in real time, the comparison between the expected output value and the actual output data is calculated, the control status is judged, and the output data is adjusted based on the judgment results, and the input and output data mapping is established using the I/O mapping table. relationship, monitor and correct abnormal output in real time.
It achieves precise control of the output data of the PLC controller, improves the accuracy and stability of the control system, enhances the adaptability and robustness of the system, reduces the need for manual intervention, and reduces maintenance costs.
Smart Images

Figure CN118672202A
Abstract
Description
Technical Field
[0001] The invention proposes a PLC controller data transmission and reception adjustment method and system, and relates to the technical field of data transmission and reception. Background Art
[0002] In the field of industrial automation, PLC (Programmable Logic Controller) is widely used in various production processes as a core control device. PLC achieves efficient and stable operation of production equipment through its powerful logic processing capabilities and precise control functions. However, with the continuous improvement of the level of production automation, the performance requirements for PLC controllers are becoming increasingly stringent. In particular, more accurate and efficient technical means are needed in terms of input and output data acquisition, processing, and control state determination of PLC controllers. Traditional PLC controller input and output data acquisition methods mostly rely on hardware interfaces and communication protocols. Although they can realize basic data transmission functions, they are insufficient in terms of real-time data acquisition, accuracy, and data processing capabilities. At the same time, the regulation and control of the output data of PLC control data often relies on manual settings and manual adjustments, making it difficult to achieve precise control and optimization of control data. Summary of the invention
[0003] The present invention provides a method and system for adjusting the data transmission and reception of a PLC controller, which is used to solve the problems of adaptive adjustment of controller output data. The present invention provides a method and system for regulating data transmission and reception of a PLC controller, the method comprising: S1: Collecting input and output data of the PLC controller, calculating the expected output value of the collected PLC control data, comparing the output data of the PLC control data with the expected output range, and then determining the control state of the PLC control data to obtain a state determination result; S2: Calculate the output adjustment rate of the PLC control data corresponding to the unqualified control state in the state judgment result, adjust the output data, compare the adjusted output data obtained with the expected output range, and then determine whether to re-adjust the output data.
[0004] Furthermore, the S1 includes: Acquire the input data and output data of the PLC controller according to the preset data acquisition sequence to form PLC control data; Preprocessing the PLC control data to obtain preprocessed PLC control data; Acquire an I / O mapping table of a PLC controller, and establish a mapping relationship between input data and output data of PLC control data through the I / O mapping table; The control state of the PLC control data is determined according to the information of the mapping relationship to obtain a state determination result.
[0005] Further, performing control state determination on the PLC control data according to the information of the mapping relationship to obtain a state determination result includes: Calculate an output expected value based on historical data of PLC control data combined with current data, and determine an output expected range based on the output expected value; Compare the output data of the PLC control data in the current data with the output expected range to obtain a first comparison result; A control state determination is performed on the PLC control data according to the first comparison result to obtain a state determination result.
[0006] Furthermore, the output expected value includes: The calculation formula of the output expected value is:
[0007] in, is the expected output value, is the maximum output data of historical data, is the minimum output data of historical data, for The corresponding input data, for The corresponding input data.
[0008] Further, determining the expected output range according to the expected output value includes: Set 1.5 times the calculated output expected value as the output upper limit value; Set 0.5 times the calculated output expected value as the output lower limit value; The interval value between the output upper limit value and the output lower limit value is the output expected range.
[0009] Further, performing control state determination on the PLC control data according to the first comparison result to obtain a state determination result includes: When the output data of the PLC control data in the current data is within the output expected range, the corresponding PLC control data is determined to be in a qualified control state; When the output data of the PLC control data in the current data is outside the output expected range, the corresponding PLC control data is determined to be in an unqualified control state; The qualified control state and the unqualified control state are the state determination results.
[0010] Further, the output adjustment rate of the PLC control data corresponding to the unqualified control state in the calculation state determination result is adjusted, the output data is adjusted, and the adjusted output data obtained by adjustment is compared with the output expected range, and then it is determined whether to re-adjust the output data, including: Obtain output data of PLC control data corresponding to the unqualified control state of the state determination result; Acquire real-time input data, calculate an output regulation rate according to the real-time input data, output data and an expected output range, and adjust the output data according to the output regulation rate to obtain adjusted output data; The adjusted output data is compared with the expected output range to obtain a second comparison result, and it is determined whether to re-adjust the output data according to the second comparison result.
[0011] Furthermore, the output regulation rate includes: The calculation formula of the output regulation rate is:
[0012] in, is the output regulation rate, To output data in real time, is the upper limit of the expected output range, is the lower limit of the expected output range. When is a positive number, set is 0, when When is a positive number, set is 0.
[0013] Further, comparing the adjusted output data with the expected output range to obtain a second comparison result, and determining whether to re-adjust the output data according to the second comparison result, includes: When the adjusted output data is within the expected output range, stopping the re-adjustment of the output data; When the adjusted output data is outside the output expected range, the output data is re-adjusted.
[0014] Furthermore, the system comprises: The control output state determination module is used to collect the input and output data of the PLC controller, calculate the output expected value of the collected PLC control data, compare the output data of the PLC control data with the output expected range, and then perform control state determination on the PLC control data to obtain a state determination result; The output judgment and adjustment module is used to calculate the output adjustment rate of the PLC control data corresponding to the unqualified control state in the state judgment result, adjust the output data, compare the adjusted output data obtained by adjustment with the expected output range, and then determine whether to re-adjust the output data.
[0015] Beneficial effects of the present invention: By comparing and adjusting the expected output value of the PLC control data with the actual output data, the system can achieve precise control of the output of the PLC controller, thereby improving the accuracy and stability of the entire control system. Through the state judgment and output adjustment mechanism, the system can promptly detect and correct abnormal outputs in the PLC control data to prevent these abnormal outputs from causing further damage or failure to the system. By continuously adjusting and optimizing the output data of the PLC controller, the system can gradually adapt to changes in the working environment, improve the adaptability and robustness of the system, and thus optimize the overall performance of the system. The system adopts real-time data acquisition and state judgment mechanisms, which can monitor the working status of the PLC controller in real time and adjust the output when necessary, thereby enhancing the reliability of the system. Through the automated control state judgment and output adjustment mechanism, the system can reduce the need for manual intervention and reduce maintenance costs and labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The present invention is a schematic diagram of a method for regulating data transmission and reception of a PLC controller. DETAILED DESCRIPTION
[0017] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0018] In one embodiment of the present invention, a method and system for adjusting data transmission and reception of a PLC controller is proposed by the present invention, and the method comprises: S1: Collecting input and output data of the PLC controller, calculating the expected output value of the collected PLC control data, comparing the output data of the PLC control data with the expected output range, and then determining the control state of the PLC control data to obtain a state determination result; S2: Calculate the output adjustment rate of the PLC control data corresponding to the unqualified control state in the state judgment result, adjust the output data, compare the adjusted output data obtained with the expected output range, and then determine whether to re-adjust the output data.
[0019] The working principle of the above technical solution is: the system collects the input and output data of the PLC controller in real time. These data reflect the current working state of the PLC controller and the control effect on the outside world. The system calculates the expected output value of the collected PLC control data. This expected value represents the output value that the PLC control data should reach under ideal conditions. Compare the actual output data of the PLC control data with the expected output range. If the output data is within the expected range, it is judged as a qualified state; if it exceeds the expected range, it is judged as an unqualified control state. The system records and outputs these state judgment results. For the unqualified control state in the state judgment result, the system calculates the output regulation rate of the corresponding PLC control data. According to the calculated output regulation rate, the system adjusts the output data of the PLC controller to make it close to or reach the expected output value.
[0020] The adjusted output data obtained after adjustment is compared with the expected output range again. If the adjusted output data is within the expected range, it is determined that the adjustment is successful and no further operation is required; if it is still beyond the expected range, it is determined that the adjustment has failed and the output data needs to be re-adjusted.
[0021] The technical effect of the above technical solution is: by comparing and adjusting the output expected value of the PLC control data with the actual output data, the system can achieve precise control of the output of the PLC controller, thereby improving the accuracy and stability of the entire control system. Through the state judgment and output adjustment mechanism, the system can promptly detect and correct abnormal outputs in the PLC control data to prevent these abnormal outputs from causing further damage or failure to the system. By continuously adjusting and optimizing the output data of the PLC controller, the system can gradually adapt to changes in the working environment, improve the adaptability and robustness of the system, and thus optimize the overall performance of the system. The system adopts real-time data acquisition and state judgment mechanisms, which can monitor the working status of the PLC controller in real time and adjust the output when necessary, thereby enhancing the reliability and reliability of the system. Through the automated control state judgment and output adjustment mechanism, the system can reduce the need for manual intervention and reduce maintenance costs and labor costs.
[0022] In one embodiment of the present invention, the S1 includes: Acquire the input data and output data of the PLC controller according to the preset data acquisition sequence to form PLC control data; Preprocessing the PLC control data to obtain preprocessed PLC control data; Acquire an I / O mapping table of a PLC controller, and establish a mapping relationship between input data and output data of PLC control data through the I / O mapping table; The control state of the PLC control data is determined according to the information of the mapping relationship to obtain a state determination result.
[0023] The working principle of the above technical solution is as follows: the system regularly reads input data and output data from the PLC controller according to the preset data acquisition timing. These input data come from various sensors, switches or operation panels, etc., while the output data is the control instructions issued by the PLC controller to the external device or system. The timing of data acquisition ensures the real-time and accuracy of the data. Since the data directly obtained from the PLC controller may contain noise, abnormal values or inconsistent formats, preprocessing is required. The preprocessing process may include data cleaning (removing invalid or abnormal data), data conversion (converting data into a unified format or unit), data smoothing (reducing noise or fluctuations in the data) and other steps to ensure the accuracy and reliability of subsequent analysis and processing. The I / O mapping table of the PLC controller is a key information source, which lists in detail the correspondence between each input / output (I / O) port of the PLC controller and the actual device or sensor. By reading this mapping table, the system can clarify the specific meaning and source of each input / output data, and provide necessary information for the subsequent control state determination. After establishing the mapping relationship between the input data and the output data, the system will analyze these data according to the preset rules and algorithms to determine the current working state of the PLC controller. Control status determination may involve multiple considerations, such as the rationality of input data, the correctness of output instructions, the stability of system operation, etc. The system will generate status determination results such as normal, warning, error, etc. based on these determination results for subsequent processing or display.
[0024] The technical effect of the above technical solution is: through the preset data acquisition timing and preprocessing steps, the system can obtain high-quality, accurate and reliable PLC control data, providing a solid foundation for the subsequent control state determination. The whole process realizes the automated processing from data acquisition, preprocessing to control state determination, reduces the need for manual intervention, and improves the automation level of the system. The system collects and processes data according to the preset timing, can reflect the operating status of the PLC controller in real time, and promptly discovers and handles potential problems. Through the mapping relationship established by the I / O mapping table, the system can accurately understand the meaning of each input / output data, and improve the accuracy of the control state determination. At the same time, the preprocessing step also further reduces the noise and outliers in the data, and improves the reliability of the determination. The automated processing of the system reduces the workload of maintenance personnel. At the same time, through the generated state determination results, maintenance personnel can clearly understand the operating status of the PLC controller, which is convenient for targeted maintenance and management.
[0025] In one embodiment of the present invention, the step of performing control state determination on the PLC control data according to the information of the mapping relationship to obtain a state determination result includes: Calculate an output expected value based on historical data of PLC control data combined with current data, and determine an output expected range based on the output expected value; Compare the output data of the PLC control data in the current data with the output expected range to obtain a first comparison result; A control state determination is performed on the PLC control data according to the first comparison result to obtain a state determination result.
[0026] The output expected values include: The calculation formula of the output expected value is:
[0027] in, is the expected output value, is the maximum output data of historical data, is the minimum output data of historical data, for The corresponding input data, for The corresponding input data.
[0028] The working principle of the above technical solution is as follows: the system first collects historical data of PLC control data, which contains information such as input, output and possible control parameters of PLC in the past period of time. Combined with the currently collected PLC control data, the expected output value is calculated. This expected value reflects the most likely or expected output value of the PLC controller in the current state. After calculating the expected output value, the system will determine a reasonable expected output range. This range is usually centered on the expected output value, taking into account a certain fluctuation range or error tolerance. The determination of the expected output range needs to take into account factors such as system stability, control accuracy and changes in the external environment. The output data of the PLC control data in the current data is compared with the previously determined expected output range. The purpose of the comparison is to determine whether the current output data is within the expected range, so as to evaluate whether the control effect of the PLC controller meets expectations. According to the comparison results, the system determines the control state of the PLC control data. If the output data is within the expected range, it is determined to be a normal or qualified state; if it exceeds the expected range, it is determined to be an abnormal or unqualified control state. The result of the state determination can be further used for subsequent operations such as triggering alarms, recording logs, and adjusting control parameters.
[0029] The technical effect of the above technical solution is: by combining historical data and current data to calculate the expected output value and determine the expected output range, the system can more accurately evaluate the control effect of the PLC controller, thereby improving the control accuracy of the entire control system. The determination of the expected output range takes into account a certain fluctuation range and error tolerance, which enables the system to maintain a relatively stable output when facing slight changes in the external environment, thereby enhancing the stability of the system. When the system detects that the output data exceeds the expected range for many consecutive times, it can predict that the PLC controller may have a trend of failure or performance degradation, thereby triggering maintenance or replacement measures in advance to achieve predictive maintenance. According to the results of the control state determination, the system can further analyze the effectiveness of the control strategy and adjust or optimize it as needed to improve the performance and efficiency of the control system. Through real-time monitoring and state determination of the output data, the system can detect abnormal conditions in a timely manner and take corresponding measures, thereby reducing the failure rate caused by control failure.
[0030] In one embodiment of the present invention, determining the expected output range according to the expected output value includes: Set 1.5 times the calculated output expected value as the output upper limit value; Set 0.5 times the calculated output expected value as the output lower limit; The interval value between the output upper limit value and the output lower limit value is the output expected range.
[0031] The working principle of the above technical solution is: the system calculates an output expected value based on the historical data and current data of the PLC control data. This output expected value represents the most likely or expected output value under the current system state. After calculating the output expected value, the system multiplies the output expected value by 1.5 to obtain a new value, namely the output upper limit value. This output upper limit value is used to define a safe upper limit boundary to ensure that the output of the PLC controller does not exceed this range, thereby avoiding possible equipment damage or system out of control. Similarly, the system will multiply the output expected value by 0.5 to obtain the output lower limit value. The output lower limit value defines a safe lower limit boundary to ensure that the output of the PLC controller is not too low, thereby maintaining the stability and performance of the system. The interval value between the output upper limit value and the output lower limit value is the output expected range. This range provides a reasonable fluctuation range, allowing the output of the PLC controller to vary within a certain range to cope with changes in internal or external conditions of the system. The technical effect of the above technical solution is: by setting the output upper limit value and the output lower limit value, the system defines a clear control boundary for the output of the PLC controller. This helps prevent the output value from exceeding the safe range, thereby protecting the safety of the equipment and system. The output expected range allows the output of the PLC controller to fluctuate within a certain range, which helps the system adapt to changes in internal and external conditions and improves the stability and robustness of the system. The setting of the output expected range can be used as an important reference indicator for optimizing the control strategy. The system can adjust the control parameters or control logic according to the output expected range to improve the control accuracy and efficiency. By monitoring the output value in real time and taking corresponding measures when it exceeds the expected range, the system can reduce the failure rate caused by abnormal output and improve the reliability and availability of the system. The setting of the output expected range makes system maintenance and management more convenient. Maintenance personnel can quickly judge the working status of the system according to the output expected range and take corresponding maintenance measures.
[0032] In one embodiment of the present invention, the step of performing control state determination on the PLC control data according to the first comparison result to obtain a state determination result includes: When the output data of the PLC control data in the current data is within the output expected range (including the output upper limit value and the output lower limit value), the corresponding PLC control data is determined to be in a qualified control state; When the output data of the PLC control data in the current data is outside the output expected range (excluding the output upper limit value and the output lower limit value), the corresponding PLC control data is determined to be in an unqualified control state; The qualified control state and the unqualified control state are the state determination results.
[0033] The working principle of the above technical solution is: if the output data of the current PLC control data is within the expected output range (including the output upper limit value and the output lower limit value), that is, the value is greater than or equal to the output lower limit value and less than or equal to the output upper limit value, the system will determine the corresponding PLC control data as a qualified control state. If the output data of the current PLC control data is outside the expected output range (excluding the output upper limit value and the output lower limit value), that is, the value is less than the output lower limit value or greater than the output upper limit value, the system will determine the corresponding PLC control data as an unqualified control state.
[0034] The technical effect of the above technical solution is: by comparing with the expected range of output, the system can clearly determine whether the control state of the PLC control data is qualified or unqualified. This provides important reference information for system monitoring, troubleshooting and performance evaluation. The determination of qualified control state ensures that the output of the PLC controller is within the expected range, thereby improving the reliability and stability of the entire system. The timely discovery of unqualified control state can prompt the system to take necessary corrective measures to avoid potential problems or failures. Based on the statistical information of qualified and unqualified control states, the system can analyze the performance trend of the PLC controller and optimize the maintenance strategy. For example, for PLC controllers that frequently have unqualified control states, maintenance or replacement can be prioritized. Through the automated state determination process, the system reduces the need for manual monitoring and intervention, thereby improving operational efficiency. The state determination results can provide support for the management decisions of the system.
[0035] In one embodiment of the present invention, the output adjustment rate of the PLC control data corresponding to the unqualified control state in the state determination result is calculated, the output data is adjusted, and the adjusted output data obtained by the adjustment is compared with the expected output range, and then it is determined whether to re-adjust the output data, including: Obtain output data of PLC control data corresponding to the unqualified control state of the state determination result; Acquire real-time input data, calculate an output regulation rate according to the real-time input data, output data and an expected output range, and adjust the output data according to the output regulation rate to obtain adjusted output data; The adjusted output data is compared with the expected output range to obtain a second comparison result, and it is determined whether to re-adjust the output data according to the second comparison result.
[0036] The calculation formula of the output regulation rate is:
[0037] in, is the output regulation rate, To output data in real time, is the upper limit of the expected output range, is the lower limit of the expected output range. When is a positive number, set is 0, when When is a positive number, set is 0.
[0038] The working principle of the above technical solution is: the system selects the output data of the PLC control data corresponding to the unqualified control state from the state judgment result. These output data indicate that the output state of the current system does not meet the preset expected range. The system also obtains real-time input data. The real-time input data reflects the state and external conditions of the current system and is an important basis for output adjustment. Based on the real-time input data, the current output data and the output expected range, the system calculates the output adjustment rate. The output adjustment rate is a factor used to guide the adjustment of output data. According to the calculated output adjustment rate, the system adjusts the current output data to obtain the adjusted output data (i.e., the adjusted output data). The purpose of the adjustment is to make the output data closer to the expected range, thereby improving the control effect of the system. The adjusted output data is compared with the output expected range to obtain a second comparison result. This comparison is used to determine whether the adjustment is effective, that is, whether the adjusted output data is within the expected range. According to the second comparison result, the system determines whether the output data needs to be re-adjusted. If the adjusted output data is still outside the expected range, the system may re-adjust, that is, recalculate the output adjustment rate and adjust it until the output data meets the expected range.
[0039] The technical effect of the above technical solution is: by adjusting the output data in real time, the system can more accurately control the output of the PLC to make it closer to the expected range. This helps to improve the control accuracy and performance of the system. The system can dynamically adjust the output data according to the changes in real-time input data and the deviation of the current output data, so as to adapt to different working environments and conditions. This enhances the adaptability and robustness of the system. By timely adjusting the output data and keeping it within the expected range, the system can reduce the failure rate caused by abnormal output and improve the reliability and stability of the system. Through precise output data adjustment, the system can use resources more efficiently and reduce unnecessary energy waste and loss.
[0040] In one embodiment of the present invention, the step of comparing the adjusted output data with the expected output range to obtain a second comparison result, and determining whether to re-adjust the output data according to the second comparison result, includes: When the adjusted output data is within the output expected range (including the output upper limit value and the output lower limit value), the re-adjustment of the output data is stopped; When the adjusted output data is outside the output expected range (excluding the output upper limit value and the output lower limit value), the output data is re-adjusted.
[0041] The working principle of the above technical solution is: the system compares the adjusted output data with the preset output expected range. This range is determined by 1.5 times (output upper limit value) and 0.5 times (output lower limit value) of the output expected value. If the adjusted output data (adjusted output data) is within the output expected range (including the output upper limit value and the output lower limit value), it means that the adjustment is effective and the system has successfully adjusted the output data to the expected range. If the adjusted output data is outside the output expected range (excluding the output upper limit value and the output lower limit value), it means that the current adjustment is not accurate enough or the external conditions have changed, resulting in the output data still not meeting expectations. If the adjusted output data is within the expected range, the system will stop re-adjusting the output data because the current output has met the expected conditions. If the adjusted output data is outside the expected range, the system will re-adjust the output data. This usually includes recalculating the output adjustment rate and further adjusting the output data according to the new adjustment rate to try to make the output data closer to the expected range. The technical effect of the above technical solution is: by continuously adjusting and re-adjusting the output data, the system can gradually reduce the deviation between the output data and the expected range, thereby improving the control accuracy. This helps to achieve more precise and stable control effects. The system can dynamically adjust the output regulation rate and perform re-regulation according to the changes in real-time input data and the deviation of the current output data. This enables the system to adapt to different working environments and conditions, and improves the adaptability and robustness of the system. Through timely adjustment and re-regulation, the system can avoid the output data being in an abnormal state for a long time, thereby reducing the failure rate caused by output abnormalities. This helps to improve the reliability and stability of the system. Through precise output data adjustment and re-regulation, the system can use resources more efficiently and reduce unnecessary energy waste and losses. This helps to reduce operating costs and improve economic benefits. For application scenarios that require precise control, such as automated production lines, precision instruments, etc., the system's precise output adjustment and re-regulation can improve user experience and product quality. Users will enjoy more stable and reliable services and products.
[0042] In one embodiment of the present invention, the system comprises: The control output state determination module is used to collect the input and output data of the PLC controller, calculate the output expected value of the collected PLC control data, compare the output data of the PLC control data with the output expected range, and then perform control state determination on the PLC control data to obtain a state determination result; The output judgment and adjustment module is used to calculate the output adjustment rate of the PLC control data corresponding to the unqualified control state in the state judgment result, adjust the output data, compare the adjusted output data obtained by adjustment with the expected output range, and then determine whether to re-adjust the output data.
[0043] The working principle of the above technical solution is: the system collects the input and output data of the PLC controller in real time. These data reflect the current working state of the PLC controller and the control effect on the outside world. The system calculates the expected output value of the collected PLC control data. This expected value represents the output value that the PLC control data should reach under ideal conditions. Compare the actual output data of the PLC control data with the expected output range. If the output data is within the expected range, it is judged as a qualified state; if it exceeds the expected range, it is judged as an unqualified control state. The system records and outputs these state judgment results. For the unqualified control state in the state judgment result, the system calculates the output regulation rate of the corresponding PLC control data. According to the calculated output regulation rate, the system adjusts the output data of the PLC controller to make it close to or reach the expected output value.
[0044] The adjusted output data obtained after adjustment is compared with the expected output range again. If the adjusted output data is within the expected range, it is determined that the adjustment is successful and no further operation is required; if it is still beyond the expected range, it is determined that the adjustment has failed and the output data needs to be re-adjusted.
[0045] The technical effect of the above technical solution is: by comparing and adjusting the output expected value of the PLC control data with the actual output data, the system can achieve precise control of the output of the PLC controller, thereby improving the accuracy and stability of the entire control system. Through the state judgment and output adjustment mechanism, the system can promptly detect and correct abnormal outputs in the PLC control data to prevent these abnormal outputs from causing further damage or failure to the system. By continuously adjusting and optimizing the output data of the PLC controller, the system can gradually adapt to changes in the working environment, improve the adaptability and robustness of the system, and thus optimize the overall performance of the system. The system adopts real-time data acquisition and state judgment mechanisms, which can monitor the working status of the PLC controller in real time and adjust the output when necessary, thereby enhancing the reliability and reliability of the system. Through the automated control state judgment and output adjustment mechanism, the system can reduce the need for manual intervention and reduce maintenance costs and labor costs.
[0046] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for regulating data transmission and reception of a PLC controller, characterized in that: The method comprises: S1: Collecting input and output data of the PLC controller, calculating the expected output value of the collected PLC control data, comparing the output data of the PLC control data with the expected output range, and then determining the control state of the PLC control data to obtain a state determination result; S2: Calculate the output adjustment rate of the PLC control data corresponding to the unqualified control state in the state judgment result, adjust the output data, compare the adjusted output data obtained with the expected output range, and then determine whether to re-adjust the output data.
2. According to claim 1, a PLC controller data transmission and reception adjustment method is characterized in that: The S1 includes: Acquire the input data and output data of the PLC controller according to the preset data acquisition sequence to form PLC control data; Preprocessing the PLC control data to obtain preprocessed PLC control data; Acquire an I / O mapping table of a PLC controller, and establish a mapping relationship between input data and output data of PLC control data through the I / O mapping table; The control state of the PLC control data is determined according to the information of the mapping relationship to obtain a state determination result.
3. A method for adjusting data transmission and reception of a PLC controller according to claim 2, characterized in that: The step of performing control state determination on the PLC control data according to the information of the mapping relationship to obtain a state determination result includes: Calculate an output expected value based on historical data of PLC control data combined with current data, and determine an output expected range based on the output expected value; Compare the output data of the PLC control data in the current data with the output expected range to obtain a first comparison result; A control state determination is performed on the PLC control data according to the first comparison result to obtain a state determination result.
4. A method for adjusting data transmission and reception of a PLC controller according to claim 3, characterized in that: The output expected values include: The calculation formula of the output expected value is: in, is the expected output value, is the maximum output data of historical data, is the minimum output data of historical data, for The corresponding input data, for The corresponding input data.
5. A method for adjusting data transmission and reception of a PLC controller according to claim 3, characterized in that: The step of determining the expected output range according to the expected output value comprises: Set 1.5 times the calculated output expected value as the output upper limit value; Set 0.5 times the calculated output expected value as the output lower limit value; The interval value between the output upper limit value and the output lower limit value is the output expected range.
6. A method for adjusting data transmission and reception of a PLC controller according to claim 3, characterized in that: The step of performing control state determination on the PLC control data according to the first comparison result to obtain a state determination result includes: When the output data of the PLC control data in the current data is within the output expected range, the corresponding PLC control data is determined to be in a qualified control state; When the output data of the PLC control data in the current data is outside the output expected range, the corresponding PLC control data is determined to be in an unqualified control state; The qualified control state and the unqualified control state are the state determination results.
7. A method for adjusting data transmission and reception of a PLC controller according to claim 1, characterized in that: The output adjustment rate of the PLC control data corresponding to the unqualified control state in the calculation state determination result, adjusting the output data, comparing the adjusted output data obtained by the adjustment with the output expected range, and then determining whether to re-adjust the output data, includes: Obtain output data of PLC control data corresponding to the unqualified control state of the state determination result; Acquire real-time input data, calculate an output regulation rate according to the real-time input data, output data and an expected output range, and adjust the output data according to the output regulation rate to obtain adjusted output data; The adjusted output data is compared with the expected output range to obtain a second comparison result, and it is determined whether to re-adjust the output data according to the second comparison result.
8. A method for adjusting data transmission and reception of a PLC controller according to claim 7, characterized in that: The output regulation rate includes: The calculation formula of the output regulation rate is: in, is the output regulation rate, To output data in real time, is the upper limit of the expected output range, is the lower limit of the expected output range. When is a positive number, set is 0, when When is a positive number, set is 0.
9. A method for adjusting data transmission and reception of a PLC controller according to claim 7, characterized in that: The step of comparing the adjusted output data with the expected output range to obtain a second comparison result, and determining whether to re-adjust the output data according to the second comparison result, includes: When the adjusted output data is within the expected output range, stopping the re-adjustment of the output data; When the adjusted output data is outside the output expected range, the output data is re-adjusted.
10. A PLC controller data receiving and sending adjustment system, characterized in that: The system comprises: The control output state determination module is used to collect the input and output data of the PLC controller, calculate the output expected value of the collected PLC control data, compare the output data of the PLC control data with the output expected range, and then perform control state determination on the PLC control data to obtain a state determination result; The output judgment and adjustment module is used to calculate the output adjustment rate of the PLC control data corresponding to the unqualified control state in the state judgment result, adjust the output data, compare the adjusted output data obtained by adjustment with the expected output range, and then determine whether to re-adjust the output data.
Citation Information
Patent Citations
Method for automatically testing programmable logic controller program
CN102541045A
Display panel detection method based on PLC
CN113219322A
Data verification device, data verification system, and data verification method
CN116710858A
Remote control system of PLC control cabinet
CN117193243A
Plant control device
JP2020030538A
