Method and system for dynamically adjusting variable range, and interaction method
By binding variables to multiple numerical elements in the configuration software, the variable range can be dynamically adjusted, solving the inconvenience of manually inputting the upper and lower limits of variables. This allows for variable range adjustment without code modification after software development, ensuring the rationality of user input.
Patent Information
- Application Number
- CN202210074655.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-01-21
AI Technical Summary
In configuration software, the upper and/or lower limits of variables need to be manually entered during the development phase, which makes modification inconvenient, and the range of values entered by users may not match the preset range, which may cause adverse consequences.
By binding variables to at least two numerical elements, configuring a third numerical element to determine whether the value input by the user meets the range of the variable, and adjusting the value input by the user as the upper or lower limit of the third numerical element through other numerical elements, the range of the variable can be dynamically adjusted.
The maximum and/or minimum values of variables can be dynamically adjusted without modifying the code, ensuring the rationality of user-input values and avoiding adverse consequences.
Smart Images

Figure CN114489600B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of configuration software, and particularly relates to an implementation method and system for dynamically adjusting a variable range. BACKGROUND
[0002] In recent years, human-computer interaction technology has developed rapidly, and HMI (Human Machine Interface) configuration software is a very important human-computer interaction design software. As a secondary development platform, the HMI configuration software greatly improves the speed of users to realize a human-computer interaction page. Through the HMI configuration software, users can build a picture, configure functions according to needs, and can compile and download to an HMI device to realize various interactive scenes.
[0003] In the process of using the HMI configuration software to build a project, a developer sets an upper limit and a lower limit of a variable. The upper and lower limits are the range of values that can be input by a user. In an actual application scenario, the developer may not be sure of the upper and lower limits of the variable during the development stage, and when the upper limit and / or the lower limit need to be modified after the software development is completed, the developer needs to modify the code again to realize it, which is troublesome, and the range of the variable when the user inputs a value may be different from the range set in the project, and when the value input is not appropriate, it may cause bad consequences. SUMMARY
[0004] In order to solve the technical problem that the upper limit and / or the lower limit of the variable needs to be manually input in the prior art, the present application provides an implementation method and system for adjusting a variable range, an interaction method, and a storage medium.
[0005] The implementation method for dynamically adjusting the variable range provided by the present application comprises:
[0006] binding the variable with at least two numerical elements, one of which is a third numerical element;
[0007] configuring the third numerical element to judge whether the value input by the user meets the variable range based on the upper limit and / or the lower limit corresponding to the third numerical element when the third numerical element receives the value input by the user;
[0008] configuring other numerical elements to take the value input by the user as the upper limit and / or the lower limit corresponding to the third numerical element when the other numerical elements receive the value input by the user.
[0009] In one embodiment, the variable is bound with two numerical elements.
[0010] The third numerical element is configured to determine whether the input value of the user satisfies the variable range based on the upper limit or the lower limit of the range of values that the third numerical element can receive when receiving the input value of the user.
[0011] Another numerical element is configured to take the input value of the user as the upper limit or the lower limit of the range of values that the third numerical element can receive when receiving the input value of the user.
[0012] In another embodiment, the variable is bound to three numerical elements, which are the first numerical element, the second numerical element and the third numerical element respectively.
[0013] The first numerical element is configured to take the input value of the user as the lower limit of the range of values that the third numerical element can receive when receiving the input value of the user.
[0014] The second numerical element is configured to take the input value of the user as the upper limit of the range of values that the third numerical element can receive when receiving the input value of the user.
[0015] The third numerical element is configured to determine whether the input value of the user satisfies the variable range based on the upper limit and the lower limit when receiving the input value of the user.
[0016] The software provided by the application interacts with the user by using the implementation method of dynamically adjusting the variable range.
[0017] The implementation system of dynamically adjusting the variable range provided by the application comprises a manual variable range adjustment module, the manual variable range adjustment module provides at least two numerical elements bound to the variable, one of which is a third numerical element, the third numerical element receives the input value of the user and determines whether the input value of the user satisfies the variable range based on the upper limit and / or the lower limit of the range of values that the third numerical element can receive, and the other numerical elements take the input value of the user as the upper limit and / or the lower limit of the range of values that the third numerical element can receive.
[0018] The computer readable storage medium provided by the application is used for storing a computer program, the computer program executes the implementation method of dynamically adjusting the variable range.
[0019] The application further provides a method for manually setting the maximum value and / or the minimum value through at least two numerical elements after the development of the configuration software, so that the maximum value and / or the minimum value of the variable can be directly modified without modifying the code and recompiling after the development of the software. BRIEF DESCRIPTION OF DRAWINGS
[0020] The application will be described in further detail below with reference to the embodiments and drawings, in which:
[0021] Figure 1 is the implementation schematic diagram of an embodiment of the application. DETAILED DESCRIPTION
[0022] In order to make the technical problems, technical solutions and beneficial effects of the application more clear, the application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and do not limit the application.
[0023] Therefore, one feature described in the specification will be used to explain one feature of one embodiment of the application, and it is not implied that each embodiment of the application must have the explained feature. In addition, it should be noted that the specification describes many features. Although some features can be combined together to show possible system designs, these features can also be used in other combinations that are not explicitly described. Therefore, unless otherwise stated, the described combinations are not intended to be limiting.
[0024] The implementation method of the dynamic adjustment of the variable range of the application includes the step of manually adjusting the variable range. The manual adjustment of the variable range of the application can only adjust the upper limit, can only adjust the lower limit, or can adjust both the upper limit and the lower limit.
[0025] The application binds the variable with at least two numerical elements, one of which is a third numerical element. The third numerical element is configured to determine whether the user input value meets the variable range based on the upper limit and / or the lower limit corresponding to the third numerical element when the third numerical element receives the user input value. Other numerical elements are also configured to take the user input value as the upper limit and / or the lower limit corresponding to the third numerical element when the other numerical elements receive the user input value.
[0026] In one embodiment, if only the upper or lower limit of a variable needs adjustment, the variable is bound to two numeric elements. A third numeric element is configured such that, when receiving a user input value, it determines whether the user input value meets the variable's range based on the upper or lower limit of the range of values that the third numeric element can receive. Simultaneously, another numeric element needs to be configured such that, when receiving user input value, it uses the user input value as the upper or lower limit of the range of values that the third numeric element can receive.
[0027] like Figure 1 As shown, in another embodiment, if both the upper and lower limits of a variable need to be adjusted, the variable can be bound to three numerical elements, which are referred to as the first numerical element, the second numerical element, and the third numerical element, respectively.
[0028] Configure the first numerical element such that when it receives a numerical value from the user, it uses the user-inputted value as the lower limit of the range of numerical values that the third numerical element can receive.
[0029] Configure the second numerical element such that when it receives a numerical value from the user, it uses the user-inputted value as the upper limit of the range of numerical values that the third numerical element can receive.
[0030] Configure a third numerical element so that, when receiving a numerical value input by the user, it determines whether the numerical value input by the user meets the variable range based on the lower limit and upper limit determined by the first and second numerical elements, respectively.
[0031] In application, during the project setup process in the PC-based configuration software, three numerical elements are added, and their specific functions are selected. One element modifies the minimum value of a variable (the first numerical element). Another modifies the maximum value of a variable (the second numerical element). The third element displays / distributes values. All three numerical elements must be bound to the same variable in the configuration software's variable table. After compilation by the configuration software, the generated output code will differentiate between the three numerical elements, assigning different processing logic to elements with different selected functions.
[0032] On the touchscreen, clicking a numeric element whose function is to modify the minimum (or maximum) value of a variable and entering a value will not change the current value of the bound variable, nor will it participate in communication. Instead, it modifies the minimum (or maximum) value of the variable and the minimum (or maximum) value that can be entered by the numeric element that displays / sends the value. If, after modification, the input value through the numeric element that displays / sends the value is less than the modified minimum value or greater than the modified maximum value, the modified minimum or maximum value will be displayed and sent by default.
[0033] The numerical elements of the modified variable minimum value and the modified variable maximum value also limit the input range mutually. The modified minimum value cannot be greater than the upper limit of the current variable, and the modified maximum value cannot be less than the lower limit of the current variable.
[0034] The application also proposes a corresponding software and a user interaction method, wherein the software uses the above-mentioned technical solution of the dynamic adjustment of the variable range and interacts with the user.
[0035] The application also proposes a computer readable storage medium for storing a computer program, and the computer program runs the above-mentioned technical solution of the dynamic adjustment of the variable range when executed.
[0036] The application also proposes an implementation system of the dynamic adjustment of the variable range, which includes a manual adjustment of the variable range module.
[0037] The manual adjustment of the variable range module provides at least two numerical elements to be bound with the variable, one of which is a third numerical element. The third numerical element receives the numerical value input by the user and judges whether the numerical value input by the user meets the variable range based on the upper limit and / or the lower limit of the numerical value range that the third numerical element can receive. The other numerical elements take the numerical value input by the user as the upper limit and / or the lower limit of the numerical value range that the third numerical element can receive.
[0038] In one embodiment, the manual adjustment of the variable range module provides three numerical elements to be bound with the variable, which are a first numerical element, a second numerical element and a third numerical element. The first numerical element takes the numerical value input by the user as the lower limit of the numerical value range that the third numerical element can receive. The second numerical element takes the numerical value input by the user as the upper limit of the numerical value range that the third numerical element can receive. The third numerical element receives the numerical value input by the user and judges whether the numerical value input by the user meets the variable range based on the upper limit and the lower limit.
[0039] The above only describes the preferred embodiments of the application and is not used to limit the application. Any modification, equivalent replacement and improvement within the spirit and principle of the application shall be included in the protection scope of the application.
Claims
1. A method for dynamically adjusting the range of variables, characterized in that, include: Bind a variable to at least two numeric elements, one of which is a third numeric element; Configure the third numerical element so that when it receives a numerical value input by the user, it determines whether the numerical value input by the user meets the variable range based on the upper limit and / or lower limit corresponding to the third numerical element. Configure other numerical elements so that when they receive numerical values from the user, they use the user-inputted values as the upper and / or lower limits corresponding to the third numerical element.
2. The method for dynamically adjusting the range of variables as described in claim 1, characterized in that, Bind the variable to two numerical elements; Configure a third numerical element so that when it receives a numerical value from the user, it determines whether the numerical value input by the user meets the variable range based on the upper or lower limit of the range of numerical values that the third numerical element can receive. Configure another numerical element such that, when receiving a numerical value from the user, it uses the user-inputted value as the upper or lower limit of the range of numerical values that the third numerical element can receive.
3. The method for dynamically adjusting the range of variables as described in claim 1, characterized in that, The variable is bound to three numerical elements, namely the first numerical element, the second numerical element, and the third numerical element; Configure the first numerical element such that when it receives a numerical value input by the user, it uses the user-inputted value as the lower limit of the range of numerical values that the third numerical element can receive. Configure the second numerical element such that when it receives a numerical value input by the user, it uses the user-inputted value as the upper limit of the range of numerical values that the third numerical element can receive; The third numerical element is configured to determine whether the value input by the user meets the variable range based on the upper and lower limits when receiving the value input by the user.
4. A method for software to interact with a user, characterized in that, The software uses the dynamic adjustment of variable range implementation method as described in any one of claims 1 to 3 to interact with the user.
5. A system for dynamically adjusting the range of variables, characterized in that, Includes a module for manually adjusting variable ranges; The manual variable range adjustment module provides at least two numerical elements to bind to the variable, one of which is a third numerical element; The third numerical element receives the numerical value input by the user and determines whether the numerical value input by the user meets the variable range based on the upper and / or lower limits of the range of numerical values that the third numerical element can receive. Other numerical elements use the user-inputted values as the upper and / or lower limits of the range of values that the third numerical element can receive.
6. A computer-readable storage medium for storing a computer program, characterized in that, When the computer program is executed, it runs the method for dynamically adjusting the range of variables as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Interface modification method and apparatus
CN108304181A