Variable reference method and device, electronic equipment and storage medium

By obtaining and extracting variable cross-reference information in the configuration logic from the variable reference method and adding it to the cross-reference table shared by all tasks, the problem of cumbersome maintenance of variable reference relationships in the existing technology is solved, and efficient variable reference maintenance is achieved.

CN120066620APending Publication Date: 2025-05-30HANGZHOU HOLLYSYS AUTOMATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411954230.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When maintaining the variable reference relationship between different tasks, the existing technology needs to define the cross-referenced cross-variables one by one and maintain the reference information for each task, resulting in cumbersome maintenance process and inefficient efficiency.

Method used

Provides a variable reference method, which simplifies the maintenance process of cross-references between different tasks by obtaining the user's configuration logic, extracting variable cross-reference information, and adding it to a pre-created cross-reference table, which is shared by all tasks.

Benefits of technology

By automatically extracting cross-reference information and using shared cross-reference tables, the maintenance process of variable reference relationships is simplified, which significantly improves maintenance efficiency and reduces workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066620A_ABST
    Figure CN120066620A_ABST
Patent Text Reader

Abstract

The invention provides a variable reference method and device, electronic equipment and a storage medium, and is applied to the technical field of automation control. According to the method, after configuration logic of a user is obtained, at least one piece of variable cross reference information in the configuration logic is extracted; the variable cross reference information comprises a first task, a second task and a cross variable referenced by the first task and the second task at the same time, the variable cross reference information is added to a pre-created cross reference table, and the cross reference table is configured to be shared by all tasks, so that the method can automatically extract the cross reference information, and the cross reference information can be automatically extracted. According to the method, the cross reference information is obtained, the obtained cross reference information is recorded through the preset cross reference table, the maintenance process of cross variable reference between different tasks is simplified, the cross reference table is shared by all the tasks, the variable reference information of each task does not need to be maintained, the workload of variable reference information maintenance is greatly reduced, and the maintenance efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automation control technology, and particularly relates to a variable reference method, apparatus, electronic device, and storage medium. Background Art

[0002] Currently, some SIS (Safety interlocking System) software has achieved support for different types of tasks, that is, it supports safety tasks and non-safety tasks during multi-task execution. Among them, safety tasks can be used for safety response actions in industrial sites, while non-safety tasks can be used for production control in industrial sites.

[0003] In practical applications, it is possible that the variables of a certain task change, resulting in the need to synchronously adjust the execution process of other tasks. This leads to the need to reference variables between different tasks to ensure the normal execution of each relevant task. When maintaining the reference relationship of variables in the prior art, it is necessary to define each cross variable of each cross-reference one by one and maintain reference information for each task. The maintenance process of variable reference is extremely cumbersome and inefficient. Summary of the Invention

[0004] In view of this, this application is committed to providing a variable reference method, apparatus, electronic device, and storage medium to simplify the maintenance process of cross-variable reference between different tasks and improve the maintenance efficiency.

[0005] In a first aspect, this application provides a variable reference method, including:

[0006] Obtain the configuration logic of the user;

[0007] Extract at least one variable cross-reference information from the configuration logic, where the variable cross-reference information includes a first task, a second task, and a cross variable simultaneously referenced by the first task and the second task;

[0008] Add each of the variable cross-reference information to a pre-created cross-reference table respectively, where the cross-reference table is configured to be shared by all tasks.

[0009] In an optional implementation manner, the variable reference method provided in the first aspect of this application further includes: allocating target storage spaces for storing the cross variables for the first task and the second task respectively.

[0010] In an optional implementation manner, allocating target storage spaces for storing the cross variables for the first task and the second task respectively includes:

[0011] If the first task is a security task and the second task is a non-security task, an alarm message is sent, and the alarm message is used to characterize the existence of a cross variable in which a security task references a non-security task;

[0012] If the task types of the first task and the second task are the same, target storage spaces for storing the cross variable are respectively allocated for the first task and the second task.

[0013] In an alternative embodiment, the variable reference method provided in the first aspect of the present application further includes: in response to a user's confirmation operation on the alarm message, target storage spaces for storing the cross variable are respectively allocated for the first task and the second task.

[0014] In an alternative embodiment, the sending of the alarm message includes:

[0015] Displaying a security statement list, where the security statement list records the variable name of the cross variable, the first task, the second task, and a confirmation item for whether to maintain the variable reference relationship.

[0016] In an alternative embodiment, the variable reference method provided in the first aspect of the present application further includes: respectively updating the variable values stored in the target storage spaces of the first task and the second task.

[0017] In an alternative embodiment, the respectively updating the variable values stored in the target storage spaces of the first task and the second task includes:

[0018] Updating the variable values stored in the target storage spaces of the first task and the second task according to the execution period of the target task;

[0019] where the target task is the task to which the cross variable in the first task and the second task belongs.

[0020] In a second aspect, the present application provides a variable reference device, including:

[0021] An acquisition unit, configured to acquire a user's configuration logic;

[0022] An extraction unit, configured to extract at least one variable cross-reference information from the configuration logic, where the variable cross-reference information includes a first task, a second task, and a cross variable simultaneously referenced by the first task and the second task;

[0023] A maintenance unit, configured to respectively add each piece of the variable cross-reference information to a pre-created cross-reference table, where the cross-reference table is configured to be shared by all tasks.

[0024] In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executed by the processor. When the processor executes the computer program, the steps of the variable reference method according to any one of the first aspects of the present application are implemented.

[0025] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the variable reference method according to any one of the first aspects of the present application are implemented.

[0026] Based on the above, for the variable reference method provided by the present application, after obtaining the configuration logic of the user, at least one variable cross-reference information in the configuration logic is extracted. The variable cross-reference information includes a first task, a second task, and a cross variable simultaneously referenced by the first task and the second task. Each variable cross-reference information is respectively added to a pre-created cross-reference table, and the cross-reference table is configured to be shared by all tasks. It can be seen that this method can automatically extract cross-reference information and record the obtained cross-reference information through the preset cross-reference table, simplifying the maintenance process of cross-variable references between different tasks. Moreover, the cross-reference table is shared by all tasks, and there is no need to separately maintain the variable reference information of each task, greatly reducing the workload of maintaining variable reference information and significantly improving the maintenance efficiency. Description of the Drawings

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0028] Figure 1 It is a flowchart of a variable reference method provided by an embodiment of the present invention.

[0029] Figure 2 It is a schematic diagram of the configuration logic in the prior art.

[0030] Figure 3 It is a schematic diagram of the structure of the cross-reference table provided by an embodiment of the present invention.

[0031] Figure 4 It is a flowchart of another variable reference method provided by an embodiment of the present invention.

[0032] Figure 5 It is a flowchart of still another variable reference method provided by an embodiment of the present invention.

[0033] Figure 6It is a flowchart of another variable reference method provided by an embodiment of the present invention.

[0034] Figure 7 It is a structural block diagram of a variable reference device provided by an embodiment of the present invention.

[0035] Figure 8 It is a structural block diagram of another variable reference device provided by an embodiment of the present invention.

[0036] Figure 9 It is a structural block diagram of yet another variable reference device provided by an embodiment of the present invention.

[0037] Figure 10 It is a structural block diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners

[0038] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0039] As described above, in existing applications, the SIS software has already achieved multi-task simultaneous operation, and some SIS software further supports different types of tasks, that is, it supports safety tasks and non-safety tasks during multi-task execution. Among them, safety tasks can be used for safety response actions in industrial sites, while non-safety tasks can be used for production control in industrial sites.

[0040] In actual applications, it is possible that the variables of a certain task change, resulting in the need to synchronously adjust the execution process of other tasks. This leads to the need to reference variables between different tasks to ensure the normal execution of each relevant task. When maintaining the reference relationship of variables in the prior art, it is necessary to define each cross variable of each cross-reference one by one and maintain reference information for each task.

[0041] Taking the example that the safety task task1 references the variables of the non-safety task task2, it is necessary to maintain a communication variable list as shown in Table 1 for the safety task task1 and the non-safety task task2 respectively.

[0042] Table 1

[0043] Variable name Type Reference variable name Reference a1 Integer b1 task2 a2 Logical value b2 task2

[0044] As can be seen from Table 1, when maintaining variable application information, it is necessary to record in detail which variable of which task needs to be referenced by which variable of which task. Thus, it can be seen that the maintenance process of variable reference in the prior art is extremely cumbersome and inefficient.

[0045] To solve this technical problem, the present application provides a variable reference method, which can automatically extract cross-reference information and record the obtained cross-reference information through a preset cross-reference table, simplifying the maintenance process of cross-variable reference between different tasks. Moreover, the cross-reference table is shared by all tasks, and there is no need to separately maintain the variable reference information of each task, greatly reducing the workload of maintaining variable reference information and significantly improving the maintenance efficiency.

[0046] The variable reference method provided by the present application can be applied to an electronic device, which can be an industrial control device supporting the operation of SIS software, a movable control terminal, and in some cases, can also be applied to a server on the network side. See Figure 1 As shown, the variable reference method provided by the present application includes the following steps.

[0047] S100. Obtain the configuration logic of the user.

[0048] Based on the application of configuration software in an industrial control system in the related art, the configuration software provides a user interface for the user to edit. Through the user interface, the user can create a control system software that meets the application requirements according to their actual application needs and the actual situation of the industrial control system, so as to realize the control of the industrial control system. Correspondingly, when the user configures system parameters, the configuration logic can also be configured through the user interface provided by the configuration software. In actual application, through the configuration of the configuration logic, the user can specify the variable reference relationship between different tasks, specifically between the POU (Program Organization Unit) of different tasks.

[0049] Combined with Figure 2 As shown, taking the aforementioned task1 and task2 as an example, the variable b1 is a variable of POU2 of task2, and the variable a1 of task1 needs to reference the variable b1, and all these information can be configured through the configuration logic. Of course, the configuration logic will also include other information configured by the user, which will not be elaborated here one by one, and specific reference can be made to the related art.

[0050] S110. Extract at least one variable cross-reference information from the configuration logic.

[0051] As described above, the configured configuration logic of the user records variable reference information between different tasks and other information necessary for building a control system. Based on this, after obtaining the configuration logic, it is first necessary to extract at least one variable cross-reference information from the configuration logic. In practical applications, the specific number of variable cross-reference information is related to the user's configuration and the specific implementation of the system software. This application does not limit the specific number of variable cross-reference information.

[0052] For each variable cross-reference information, it includes a first task, a second task, and a cross variable simultaneously referenced by the first task and the second task. It should be noted that the first task and the second task mentioned in this application are only distinctions made for the convenience of describing the variable reference relationship between different tasks, and are not limitations on the task type, task content, and specific execution process of the task. Moreover, in this application, the first task and the second task can be tasks of the same type, such as both being safety tasks or non-safety tasks, or they can be tasks of different types, such as the first task being a safety task and the second task being a non-safety task, etc. Among them, the application scenario where the first task and the second task are tasks of different types preferably adopts the variable reference method provided by this application.

[0053] The cross variable, in essence, is still a variable that needs to be called during the task execution process. Different from other variables in the system, the cross variable can be used simultaneously by the first task and the second task. The variable type of the cross variable can be any variable type in the related art, and this application does not make specific limitations on this.

[0054] S120. Add each variable cross-reference information to a pre-created cross-reference table respectively.

[0055] To facilitate the recording of variable cross-reference information, this application pre-creates a cross-reference table. As shown in Figure 3 After extracting the variable cross-reference information, the obtained variable cross-reference information can be added to the cross-reference table.

[0056] More importantly, the cross-reference table provided by this application is configured to be shared by all tasks, that is, all tasks in the system can use this cross-reference table. As shown in Figure 3 Through the cross-reference table provided by this application, the reference relationship between any variable and a task (specific to the POU of the task) can be clearly determined, and which tasks specifically cross-reference each variable can be clearly determined. Compared with maintaining a communication variable list for each task separately in the related art, this application maintains a cross-reference list for all tasks in a shared manner, which can obviously effectively simplify the maintenance process and improve the efficiency of maintaining the variable reference relationship.

[0057] In summary, the variable reference method provided by the present application can automatically extract cross-reference information and record the obtained cross-reference information through a preset cross-reference table, simplifying the maintenance process of cross-variable references between different tasks. Moreover, the cross-reference table is shared by all tasks, and there is no need to separately maintain the variable reference information of each task, greatly reducing the workload of maintaining variable reference information and significantly improving the maintenance efficiency.

[0058] Furthermore, this method does not require defining specific reference variables. One cross-variable can be used in two tasks, greatly increasing the number of cross-variables that can be referenced between tasks. At the same time, users can define global variables for use in multiple tasks just like in multithreaded programming, providing great convenience for users.

[0059] The present application also provides another variable reference method. Refer to Figure 4 as shown. Based on the embodiment shown in Figure 3 the variable reference method provided in this embodiment further includes the following steps.

[0060] S130. Allocate target storage spaces for storing cross-variables for the first task and the second task respectively.

[0061] In practical applications, the variable values of variables are stored in pre-allocated storage spaces. Based on this, after completing the maintenance of the cross-reference list, it is necessary to further allocate target storage spaces for storing cross-variables for the first task and the second task. It can be understood that although the first task and the second task jointly reference cross-variables, since they are tasks for implementing different functions and their respective execution processes are different, it is necessary to allocate storage spaces separately. When the first task needs to use cross-variables, it accesses its corresponding target storage space. Correspondingly, when the second task needs to use cross-variables, it also accesses its own corresponding target storage space. It can be understood that the target storage space is usually represented by a storage address. Therefore, the process of allocating the target storage space is specifically to allocate corresponding storage addresses for the first task and the second task. The specific allocation process can refer to related technologies and will not be elaborated here.

[0062] In an alternative embodiment, the method shown in Figure 5 can be used to allocate target storage spaces for the first task and the second task.

[0063] S1301. Determine whether the task types of the first task and the second task are the same. If not, execute S1302; if so, execute S1304.

[0064] If the task types of the first task and the second task are the same, such as both being safety tasks or both being non-safety tasks, then jump to S1304. On the contrary, if the task types of the first task and the second task are different, such as the first task being a safety task and the second task being a non-safety task, then execute S1302. As for the specific identification method of the task type, it can be implemented with reference to the related technology and will not be elaborated here.

[0065] S1302. Send an alarm message.

[0066] When the task types of the first task and the second task are different, that is, there is a situation where a non-safety variable is referenced by a safety task, and the non-safety variable may threaten the security of the safety task operation. Therefore, in this case, it is necessary to send an alarm message to the user to remind the user that the currently created variable reference relationship has a situation where a safety task references a cross variable of a non-safety task, and ask the user to confirm whether modification is required.

[0067] In an optional implementation manner, the alarm message can be sent by showing a safety statement list to the user, and the variable name of the cross variable, the first task, the second task, and a confirmation item for whether to maintain the variable reference relationship are shown to the user through the safety statement list. The specific form of the safety statement list can be seen in Table 2.

[0068] Table 2

[0069] Variable name Reference task Reference POU Whether it can be used safely b1 task1 POU1 √ b2 task2 POU2

[0070] Referring to Table 2, on the basis of the foregoing information, the safety statement list further includes which specific POU in the first task references the non-safety variable. Of course, in actual reference, the safety statement list can also include other information that needs to warn the user, which will not be elaborated one by one here. Without exceeding the core idea of this application, it also belongs to the scope protected by this application.

[0071] It should be noted that "Whether to use safely" in Table 2 is for the user to select. When the user checks, it means that the user is aware of and agrees that the safety task references the non-safety variable. On the contrary, if the user does not check, it means that the user does not agree that the safety task references the non-safety variable. In this case, the user needs to modify the reference relationship between the variables.

[0072] S1303. In response to the user's confirmation operation on the alarm message, allocate target storage spaces for storing the cross variable for the first task and the second task respectively.

[0073] When the user is aware of and agrees that the security task references non-security variables, a corresponding confirmation operation will be triggered. For example, the confirmation item of checking the "Whether to use safely" item mentioned in the previous steps. In response to the user's confirmation operation on the warning information, target storage spaces for storing cross variables are allocated for the first task and the second task respectively. It can be understood that the user's confirmation operation can have various implementation manners in practical applications. In another optional implementation manner, a pop-up window can be used to remind the user, and the user can trigger the confirmation operation by clicking "agree" or "confirm". Of course, other implementation manners for the user to choose can also be provided in combination with the actual situation of the user interface, which will not be elaborated one by one here.

[0074] S1304. Allocate target storage spaces for storing cross variables for the first task and the second task respectively.

[0075] When the task types of the first task and the second task are the same, it is possible to execute a jump to S1304 to allocate target storage spaces for storing cross variables for the first task and the second task respectively. The specific allocation process of the target storage space can refer to the foregoing content and related technologies and will not be elaborated here either.

[0076] In summary, based on the technical advantages of the foregoing embodiments, for the reference of non-security variables of non-security tasks in security tasks, the user is clearly required to confirm, avoiding the risks brought by the random use of conventional variables in other SIS software for security tasks and ensuring the security of the system.

[0077] Furthermore, the present application also provides another variable reference method. Refer to Figure 6 as shown. Based on the embodiment shown in Figure 4 , the variable reference method provided in this embodiment further includes the following steps.

[0078] S140. Update the variable values stored in the target storage spaces of the first task and the second task respectively.

[0079] Based on the foregoing content, it can be known that the present application allocates target storage spaces for storing cross variables for the first task and the second task respectively. In practical applications, the first task and the second task respectively obtain the variable values of the cross variables through their respective corresponding target storage spaces. Since the storage spaces are different, when the variable values of the cross variables change, it is necessary to update the variable values stored in the target storage spaces of the first task and the second task respectively.

[0080] It can be understood that cross variables are applied to different tasks, and there are reference and being - referenced relationships between different tasks. In an alternative embodiment, the task to which the cross variable belongs is the being - referenced task, and the other task is the task that references the cross variable. Based on this, when updating the variable value of the cross variable, it is preferable to complete the update of the variable value of the cross variable according to the execution period of the applied task.

[0081] Based on this, the task to which the cross variable belongs in the first task and the second task can be used as the target task, and according to the execution period of the target task, the variable value of the cross variable stored in the target storage space of the first task is updated, and the variable value of the cross variable stored in the target storage space of the second task is updated. Thus, the update of the variable value of the cross variable referenced between two different tasks is completed, ensuring that any task can obtain the latest variable value, thereby guaranteeing the normal operation of each task.

[0082] In summary, based on the foregoing embodiments, the variable reference method provided in this embodiment updates the variable values of each task that references the cross variable according to the execution period of the task to which the cross variable belongs, ensuring that any task can obtain the latest variable value, and ensuring reliable communication and data transmission between tasks.

[0083] Next, the variable reference device provided by the present invention is introduced. The variable reference device provided by the present invention belongs to the same inventive concept as the variable reference method provided in the embodiments of the present application, can execute the variable reference method provided in any embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the variable reference method. Technical details not described in detail in this embodiment can be referred to the variable reference method provided in the embodiments of the present application, and will not be elaborated here.

[0084] See Figure 5 , the variable reference device provided by the present application includes an acquisition unit 10, an extraction unit 20, and a maintenance unit 30. Among them,

[0085] The acquisition unit 10 is used to acquire the configuration logic of the user;

[0086] The extraction unit 20 is used to extract at least one variable cross - reference information from the configuration logic, and the variable cross - reference information includes a first task, a second task, and a cross variable simultaneously referenced by the first task and the second task;

[0087] The maintenance unit 30 is used to add each variable cross - reference information to a pre - created cross - reference table respectively, where the cross - reference table is configured to be shared by all tasks.

[0088] See Figure 6 , the present application provides another variable reference device. In Figure 5Based on the illustrated embodiments, the variable application device provided in this embodiment further includes:

[0089] An allocation unit 40, configured to respectively allocate target storage spaces for storing the cross variables for the first task and the second task.

[0090] Further, referring to Figure 7 , another variable reference device is provided in this application. Based on the Figure 6 illustrated embodiments, the variable reference device provided in this embodiment further includes:

[0091] An update unit 50, configured to respectively update the variable values stored in the target storage spaces of the first task and the second task.

[0092] Next, referring to Figure 8 , the electronic device provided in the embodiments of the present invention will be described. The electronic device provided in this embodiment may include: at least one processor 100, at least one communication interface 200, at least one memory 300, and at least one communication bus 400;

[0093] In the embodiments of the present invention, the number of the processor 100, the communication interface 200, the memory 300, and the communication bus 400 is at least one, and the processor 100, the communication interface 200, and the memory 300 communicate with each other through the communication bus 400; obviously, Figure 8 the illustrated communication connection schematic of the processor 100, the communication interface 200, the memory 300, and the communication bus 400 is only optional;

[0094] Optionally, the communication interface 200 may be an interface of a communication module, such as an interface of a GSM module; the processor 100 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention.

[0095] The memory 300 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least one disk memory.

[0096] Wherein, the processor 100 is specifically configured to execute the application program in the memory to implement the steps of the variable reference method described above.

[0097] In some embodiments, the present embodiment further provides a computer-readable storage medium, such as a floppy disk, an optical disc, a hard disk, a flash memory, a USB flash drive, an SD (Secure Digital Memory Card) card, an MMC (Multimedia Card) card, etc. One or more instructions for implementing the above-described various steps are stored in the computer-readable storage medium. When the one or more instructions are executed by one or more processors, the processors are caused to execute the variable reference method described above. For the relevant specific implementation, please refer to the foregoing description and will not be elaborated herein.

[0098] In addition to the above methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions. When the computer program instructions are run by a processor, the processor is caused to execute the steps in the variable reference method according to various embodiments of the present application described in the foregoing content of this specification.

[0099] The computer program product may be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present application. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0100] Those skilled in the art can understand that the content disclosed in the present disclosure may have various variations and improvements. For example, the various devices or components described above may be implemented by hardware, or may be implemented by software, firmware, or some or all of the combination of the three.

[0101] In addition, although the present disclosure makes various references to certain units in the system according to the embodiments of the present disclosure, however, any number of different units may be used and run on the client and / or the server. The units are only illustrative, and different aspects of the system and method may use different units.

[0102] Flowcharts are used in the present disclosure to illustrate the steps of the methods according to the embodiments of the present disclosure. It should be understood that the steps before or after do not necessarily proceed precisely in order. On the contrary, they may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes.

[0103] Those of ordinary skill in the art can understand that all or part of the steps in the above methods can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, etc. Optionally, all or part of the steps of the above embodiments can also be implemented using one or more integrated circuits. Correspondingly, each module / unit in the above embodiments can be implemented in the form of hardware or in the form of a software function module. The present disclosure is not limited to any specific combination of hardware and software.

[0104] Unless otherwise defined, all terms used herein have the same meaning as commonly understood by those of ordinary skill in the art to which this disclosure belongs. It should also be understood that terms such as those defined in a common dictionary should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and should not be interpreted in an idealized or overly formal sense unless explicitly defined as such herein.

[0105] The above is an illustration of the present disclosure and should not be construed as a limitation thereof. Although several exemplary embodiments of the present disclosure have been described, those skilled in the art will readily understand that many modifications can be made to the exemplary embodiments without departing from the novel teachings and advantages of the present disclosure. Accordingly, all such modifications are intended to be included within the scope of the present disclosure as defined by the claims. It should be understood that the above is an illustration of the present disclosure and should not be considered limited to the specific embodiments disclosed, and modifications to the disclosed embodiments as well as other embodiments are intended to be included within the scope of the appended claims. The present disclosure is defined by the claims and their equivalents.

Claims

1. A variable reference method, characterized in that: include: Get the user's configuration logic; Extracting at least one variable cross-reference information in the configuration logic, wherein the variable cross-reference information includes a first task, a second task, and a cross-variable referenced by the first task and the second task at the same time; The variable cross-reference information is added to a pre-created cross-reference table, respectively, wherein the cross-reference table is configured to be shared by all tasks.

2. The method according to claim 1, characterized in that Also includes: A target storage space for storing the cross variable is allocated to the first task and the second task respectively.

3. The method according to claim 2, characterized in that Allocating target storage spaces for storing the cross variables to the first task and the second task respectively includes: If the first task is a safety task and the second task is a non-safety task, sending an alarm message, wherein the alarm message is used to indicate that there is a cross variable in which the safety task references the non-safety task; If the first task and the second task have the same task type, target storage spaces for storing the cross variables are allocated to the first task and the second task respectively.

4. The method according to claim 3, characterized in that Also includes: In response to a user's confirmation operation on the warning information, target storage spaces for storing the cross variables are allocated to the first task and the second task respectively.

5. The method according to claim 3, characterized in that: The sending of warning information includes: A security statement list is displayed, where the security statement list records the variable name of the cross variable, the first task, the second task, and a confirmation item of whether to maintain the variable reference relationship.

6. The method according to any one of claims 1 to 5, characterized in that: Also includes: The variable values ​​stored in the target storage space of the first task and the second task are updated respectively.

7. The method according to claim 6, characterized in that The updating of the variable values ​​stored in the target storage space of the first task and the second task respectively includes: According to the execution cycle of the target task, updating the variable values ​​stored in the target storage space of the first task and the second task; The target task is the task to which the cross variables in the first task and the second task belong.

8. A variable reference device, characterized in that: include: An acquisition unit, used for acquiring the user's configuration logic; An extraction unit, configured to extract at least one variable cross-reference information in the configuration logic, wherein the variable cross-reference information includes a first task, a second task, and a cross-variable referenced by the first task and the second task at the same time; A maintenance unit is used to add each of the variable cross-reference information to a pre-created cross-reference table, wherein the cross-reference table is configured to be shared by all tasks.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executed by the processor, characterized in that: When the processor executes the computer program, the steps of the variable reference method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the variable reference method according to any one of claims 1 to 7 are implemented.