System, method and program for supporting development of user programs

The system facilitates easy setup of exclusive control between tasks accessing global variables by providing a display and search functionality, addressing the challenge of task assignment identification in control devices.

JP7725988B2Active Publication Date: 2025-08-20OMRON CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2021162923
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-10-01
Publication Date
2025-08-20
Estimated Expiration
2041-10-01

AI Technical Summary

Technical Problem

Existing control devices face challenges in setting up exclusive control between tasks that access the same global variable, particularly during debugging, due to the difficulty in identifying which task each program is assigned to.

Method used

A system and method for developing user programs that includes a display unit, operation receiving unit, and search unit to facilitate the identification and setting of exclusive control between tasks accessing the same global variable, allowing users to easily check and set priority and type assignments.

Benefits of technology

Enables easy setup of exclusive control between tasks accessing global variables, ensuring consistent program execution by identifying and managing task assignments during debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007725988000001
    Figure 0007725988000001
  • Figure 0007725988000002
    Figure 0007725988000002
  • Figure 0007725988000003
    Figure 0007725988000003
Patent Text Reader

Abstract

To provide a technique for easily setting exclusive control among tasks accessing an identical global variable.SOLUTION: Provided is a system 100 for supporting a development of a user program 10, wherein the user program 10 includes one or more subprograms (POU1, POU2, POU3). Each of the one or more subprograms (POU1, POU2, POU3) is assigned to tasks (task 1, task 2, task 3) which are a program execution unit at a control device. The system 100 comprises: a display section which displays a screen for the development of the user program 10; an operation reception section which receives an operation to select a variable on the screen; and a search section which searches for the tasks (task 1, task 2, task 3) assigned with the subprograms (POU1, POU2, POU3) that are for updating a value of the variable selected on the screen.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to a technique for developing a user program for a control device, and more particularly to searching for a task that updates the value of a variable. [Background technology]

[0002] Conventionally, a control device called a PLC (Programmable Logic Controller) has been known for controlling industrial machines and the like installed on factory production lines. In recent years, more advanced control devices called PACs (Programmable Automation Controllers) have come into use that not only control industrial machines but also have information processing functions.

[0003] Some control devices, such as PACs, can execute multiple tasks in parallel using time sharing. In such multitasking programs, multiple programs may access (e.g., read or write) the same global variable (global variable). When the same global variable is accessed by multiple programs, the entire program may behave unexpectedly depending on the timing of the access. For this reason, in multitasking programs, exclusive control is sometimes used for access to global variables to ensure that the entire program executes consistent processing.

[0004] Regarding technology for maintaining the consistency of programs that use global variables, for example, Japanese Patent Application Laid-Open No. 2012-194683 (Patent Document 1) discloses a "control device capable of performing consistent calculations even when multiple tasks access a variable." The device is described as having a "CPU unit that executes multiple tasks in parallel and executes each of the multiple tasks at a cycle corresponding to each task, a RAM that stores global variables that are updated and referenced by update tasks and reference data that corresponds to the global variables and is referenced by reference tasks, and a collection unit that collects the global variables and reference data when multiple tasks are being executed by the task execution unit" (see [Abstract]). [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Japanese Patent Application Laid-Open No. 2012-194683 Summary of the Invention [Problem to be solved by the invention]

[0006] According to the technology disclosed in Patent Document 1, it is not easy to set up exclusive control between tasks that access the same global variable during debugging. For example, in a multitasking program, when multiple programs reference the same global variable, it may not be easy to identify which task each program is assigned to. Therefore, there is a need for a technology that makes it easy to set up exclusive control between tasks that access the same global variable.

[0007] The present disclosure has been made in consideration of the above-described background, and an object of one aspect is to provide a technology for easily setting exclusive control between tasks that access the same global variable. [Means for solving the problem]

[0008] According to one embodiment, there is provided a system for supporting the development of a user program to be executed by a control device. The user program has one or more subprograms. Each of the one or more subprograms is assigned to a task, which is a unit of program execution on the control device. The system includes a display unit for displaying a screen for developing the user program, an operation receiving unit for receiving a variable selection operation on the screen, and a search unit for searching for a task assigned with a subprogram for updating the value of the variable selected on the screen.

[0009] According to this disclosure, the system can search for tasks that have a subprogram assigned to them that updates the value of a variable.

[0010] In the above disclosure, the screen includes an editor for editing a subprogram. The operation accepting unit accepts an operation to select a variable displayed in the editor as a target for exclusive control setting. The search unit searches for a task that updates the value of the selected variable based on the selection of the variable displayed in the editor as a target for exclusive control setting.

[0011] According to this disclosure, the system can search for a task to which a subprogram displayed in the editor is assigned based on the selection of a variable displayed in the editor, thereby allowing the user to easily check the task to which the subprogram written in the editor is assigned during debugging.

[0012] In the above disclosure, the display unit displays the exclusive control setting of the variable selected as the target of the exclusive control setting. The exclusive control setting includes at least one of the priority and the type of a task to which a subprogram that updates the value of the variable selected as the target of the exclusive control setting is assigned. The operation receiving unit receives an operation input to enable the exclusive control setting.

[0013] According to this disclosure, a user can check the priority and type of the task to which the subprogram that updates the value of the variable selected as the target of the exclusive control setting is assigned, and then decide whether to enable the exclusive control setting.

[0014] In the above disclosure, the display unit displays a list of one or more variables included in a user program, the operation accepting unit accepts an operation for setting exclusive control for each variable included in the list, and the search unit searches for a task assigned with a subprogram that updates the value of each variable included in the list.

[0015] According to this disclosure, the system can search for tasks that have subprograms assigned to them that update each of one or more variables contained in a user program.

[0016] In the above disclosure, the search unit determines whether or not there is one task assigned to a subprogram that updates the value of each variable included in the list.

[0017] According to this disclosure, the system generates an exclusive control setting when there is one task assigned with a subprogram that updates the values of each variable included in the list, and when there is two or more tasks assigned with a subprogram that updates the values of each variable included in the list, the system allows the user to select a task.

[0018] In the above disclosure, the display unit displays the exclusive control setting of a certain variable based on the fact that the number of tasks assigned to a subprogram that updates the value of the certain variable included in the list is one. The operation receiving unit receives an operation input to enable the exclusive control setting.

[0019] According to this disclosure, the system can automatically generate an exclusive control setting when there is one task assigned to a subprogram that updates the values of each variable included in the list.

[0020] In the above disclosure, the system further includes an exclusive control setting unit for setting exclusive control for each variable, and the exclusive control setting unit automatically sets exclusive control for a certain variable based on the fact that a subprogram that updates the value of a certain variable included in the list is assigned to one task.

[0021] According to this disclosure, the system can automatically enable the generated exclusive control settings if there is one task assigned to a subprogram that updates the values of each variable included in the list.

[0022] In the above disclosure, the display unit displays a selection screen for a task to update the value of a certain variable based on the fact that there are two or more tasks assigned to a subprogram that updates the value of a certain variable included in the list.

[0023] According to this disclosure, the system allows the user to select a task for updating the value of a certain variable via a task selection screen for updating the value of a certain variable.

[0024] According to another embodiment, there is provided a method for supporting the development of a user program to be executed in a control device. The user program has one or more subprograms. Each of the one or more subprograms is assigned to one of a plurality of tasks, which are units of program execution in the control device. The method includes the steps of displaying a screen for developing the user program, accepting a variable selection operation on the screen, and searching for a task to which a subprogram for updating the value of the variable selected on the screen is assigned.

[0025] According to this disclosure, it is possible to search for a task to which a subprogram that updates the value of a certain variable is assigned.

[0026] According to another embodiment, there is provided a program for supporting the development of a user program to be executed by a control device. The user program has one or more subprograms. Each of the one or more subprograms is assigned to one of a plurality of tasks, which are units of program execution in the control device. The program causes a computer to execute the steps of displaying a screen for developing the user program, accepting a variable selection operation on the screen, and searching for a task to which a subprogram for updating the value of the variable selected on the screen is assigned.

[0027] According to this disclosure, a system for executing instructions can search for a task that has been assigned a subprogram that updates the value of a variable. [Effects of the Invention]

[0028] According to one embodiment, it is possible to easily set exclusive control between tasks that access the same global variable.

[0029] The above and other objects, features, aspects and advantages of the present disclosure will become apparent from the following detailed description of the disclosure taken in conjunction with the accompanying drawings. [Brief explanation of the drawings]

[0030] [Figure 1] 1 is a diagram illustrating an example of a user program 10 to which a disclosed technique is applied. [Figure 2] 1 is a diagram illustrating an example of a configuration of a system 100 according to an embodiment. [Figure 3] FIG. 1 is a diagram illustrating an example of main functions of a system 100. [Figure 4] FIG. 4 is a diagram illustrating an example of a device 400 that constitutes the system 100. [Figure 5] FIG. 1 illustrates an example of a UI 140 provided by the system 100. [Figure 6] FIG. 6 is a diagram showing an example of a menu 600. [Figure 7] It is a diagram showing an example of the dialog 700 for exclusive control setting. [Figure 8] It is a diagram showing another example of the UI 140 provided by the system 100. [Figure 9] It is a diagram showing an example of the menu 900 for exclusive control setting. [Figure 10] It is a diagram showing an example of the dialog 1000 for exclusive control setting. [Figure 11] It is a flowchart showing an example of the procedure when the system 100 executes the processes shown in FIGS. 5 to 7. [Figure 12] It is a flowchart showing an example of the procedure when the system 100 executes the processes shown in FIGS. 8 to 10.

Mode for Carrying Out the Invention

[0031] Hereinafter, embodiments of the technical idea according to the present disclosure will be described with reference to the drawings. In the following description, the same parts are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed descriptions thereof will not be repeated.

[0032] <A. Application Example> First, referring to FIGS. 1 and 2, an example of a scenario to which the present invention is applied will be described.

[0033] FIG. 1 is a diagram showing an example of a user program 10 to which the technology of the present disclosure is applied. In a certain scenario, the user program 10 is a program installed in a control device such as a PLC and is created by a user.

[0034] (a. Configuration of User Program) The user program 10 includes one or more sub-programs and variables as components. Also, each sub-program is assigned to a task that is a program execution unit.

[0035] Subprograms may be created in units called POUs (Program Organization Units). In the example shown in FIG. 1, the user program 10 includes POU1, POU2, and POU3 as subprograms. In the following explanation, subprograms will be described as POUs, but subprograms may include other things besides POUs. Furthermore, POU1, POU2, and POU3 may be referred to collectively as POUs. The same applies to multiple global variables, tasks, etc.

[0036] Among the variables included in the user program 10, there are variables that are referenced from multiple subprograms (POUs). Such variables are also called global variables (global variables). In the example shown in FIG. 1, the user program 10 includes global variable 1 and global variable 2 as variables. It can also be seen that global variable 1 is accessed (written or read) from task 1 (POU1) and task 2 (POU2), and global variable 2 is accessed from task 3 (POU3).

[0037] A task is a unit of program execution, and the control device executes the program in task units. In the example shown in Figure 1, user program 10 includes task 1, task 2, and task 3. Furthermore, POU1 is assigned to task 1. POU2 is assigned to task 2. POU3 is assigned to task 3.

[0038] Furthermore, an execution period is set for each task. The control device can execute each task for each execution period assigned to that task. For example, the control device can execute task 1 in a first execution period, task 2 in a second execution period, and task 3 in a third execution period. Furthermore, a priority is set for each task. The control device can allocate its resources to each task based on the priority assigned to each task.

[0039] In one aspect, a task may be assigned multiple POUs, and in another aspect, a POU may include one or more POUs as subprograms.

[0040] (b. Conflict in writing values to global variables by user programs) Next, problems that may occur when a global variable is accessed by multiple tasks will be described using the user program 10 shown in FIG. 1 as an example.

[0041] Assume that task 1 is a high-cycle, high-priority task, and that task 1 is assigned POU1, which controls a motor or the like. Furthermore, task 2 is a high-cycle, medium-priority task, and that task 2 is assigned POU2, which controls a sensor or the like. Furthermore, task 3 is a low-cycle, low-priority task, and that task 3 is assigned POU3, which sends and receives data. Furthermore, POU1 and POU2 perform write processing to global variable 1.

[0042] In this case, depending on the contents of the user program 10 (POU1, POU2), global variable 1 may be updated at an unexpected time, causing the entire user program 10 to malfunction. For example, after POU1 writes the value "A" to global variable 1, POU2 may overwrite global variable 1 with the value "B" at an unexpected time. One technique to prevent the above problem from occurring is, for example, to have only one task write a value to one global variable (exclusive control).

[0043] A system 100 (see FIG. 2) according to this embodiment includes an integrated development environment (IDE) 130 (see FIG. 2) for the user program 10.

[0044] In this specification, the term "system" encompasses a configuration consisting of one or more devices that provide functions for supporting the development of user programs. In the following description, an example of system 100 that is mainly configured by a device (device 400 described below) that provides integrated development environment 130 is shown, but this is not limiting. Functions for supporting the development of user programs may be provided by linking multiple devices. System 100 may also be realized in a cloud environment or as a service on a cloud environment. A user may use the functions of system 100 via a browser function or an installed application on the user's terminal, or may directly use a device operating as system 100.

[0045] Furthermore, the system 100 may include one or more control devices such as PLCs, etc. In this case, the control devices may be provided with a function for supporting the development of user programs.

[0046] The integrated development environment 130 provides an exclusive control setting function as a support function for developing a user program 10 in which one task performs a write process to one global variable. The exclusive control setting is, for example, a setting for determining a task that performs a write process to a certain global variable. The exclusive control setting can be input by a user. When building the user program 10, the integrated development environment 130 refers to the exclusive control setting, and can output an error or warning if there is a write process that violates the exclusive control setting.

[0047] For example, suppose that the integrated development environment 130 receives a first exclusive control setting indicating that task 1 will write a value to global variable 1. Then, suppose that the integrated development environment 130 detects a write operation from task 2 to global variable 1 during the build of user program 10. Because the writing of a value from task 2 to global variable 1 violates the first exclusive control setting, the integrated development environment 130 may output an error or a warning.

[0048] However, when developing the user program 10, the user opens an editor (for example, screen 500 (see FIG. 5)) and develops the program in units of subprograms (POUs). From the description of the subprograms (POUs) on the editor, the user can determine which subprograms (POUs) are accessing global variables, but cannot determine which tasks the subprograms (POUs) are assigned to.

[0049] Therefore, during debugging, a user must sequentially search for tasks assigned to subprograms (POUs) that are writing values to global variables suspected to be the cause of the abnormal behavior, and set exclusive control for those tasks, taking into account the priority and type of those tasks. Therefore, the system 100 or the integrated development environment 130 provides a function for searching for tasks assigned to those subprograms (POUs) and presenting information about those tasks to the user. The system 100 or the integrated development environment 130 can also generate exclusive control settings indicating that the searched tasks write values to global variables. By providing these functions to the user, the system 100 or the integrated development environment 130 makes it easy to set exclusive control for global variables between tasks.

[0050] (c. Search for tasks that have POUs that access global variables assigned to them) FIG. 2 is a diagram showing an example of the configuration of a system 100 according to the present embodiment. With reference to FIG. 2, the functions of the system 100 will be described using a user program 10 as an example. The system 100 provides a user with a development environment for the user program 10 of the control device. The system 100 also has a function of searching for tasks assigned to each subprogram (POU1, POU2, POU3) included in the user program 10.

[0051] The system 100 includes an integrated development environment 130. The integrated development environment 130 includes a UI (User Interface) 140 that provides various functions. A user can operate the UI 140 via an input device 150 and an output device 160 to use various functions of the integrated development environment 130.

[0052] In one aspect, input device 150 may be any input device, such as a keyboard, a mouse, or a touch panel, provided in system 100. Also, output device 160 may be any output device, such as a display, provided in system 100. In another aspect, input device 150 may be any input device, such as a keyboard, a mouse, or a touch panel, provided in a terminal that communicates with system 100. Also, output device 160 may be any output device, such as a display, provided in a terminal that communicates with system 100.

[0053] System 100 searches for a task to which a POU that performs a write process on a specific global variable is assigned mainly in two ways. Note that a task to which a POU that performs a write process on a specific global variable is assigned may simply be called a task that updates the value of the specific global variable, or a task that performs a write process on the specific global variable.

[0054] First, a first method for searching for a task to which a POU that performs a write process on a specific global variable is assigned will be described. The first method is a method for searching for a task to which a POU that updates the value of a variable is assigned, based on the selection of the variable on a program editor. This first method corresponds to the processing described below with reference to FIGS. 5 to 7.

[0055] A user writes a subprogram using a ladder program or the like on a program editor of the integrated development environment 130 (for example, editors 510, 520 in FIG. 5). At this time, for example, while debugging the user program 10, the user notices that both POU1 and POU2 are writing to global variable 1.

[0056] In this case, it is desirable for the user to set exclusive control that allows writing of a value to global variable 1 from only one of the tasks, based on the priority or type of the task to which each POU is assigned.

[0057] Therefore, when a global variable is selected as a target for exclusive control setting in an editor in which each POU is written, the system 100 searches for a task to which the POU written in the editor is assigned. For example, when a user selects global variable 1 as a target for exclusive control setting in the editor in which POU 1 is written, the system 100 searches for task 1 to which POU 1 is assigned.

[0058] In one aspect, the system 100 may generate exclusive control settings including information such as the priority or type of task 1 based on the search results, and display a screen for the exclusive control settings (e.g., dialog 700 in Figure 7) on the output device 160.

[0059] In another aspect, if there is one task assigned to a POU that performs a write process on the selected global variable 1, the system 100 may automatically set exclusive control to allow only that task to write a value to the global variable 1.

[0060] The function of the first method of the system 100 allows a user to easily identify a task to which a POU that performs a write process on a global variable is assigned during program debugging. As a result, the user can appropriately set exclusive control for the global variable based on the priority or type of the task.

[0061] Next, a second method for searching for a task to which a POU that performs a write process on a specific global variable is assigned will be described. The second method is a method for searching for a task to which a POU that updates the value of each global variable included in a list of global variables is assigned. The second method corresponds to the processing described below with reference to FIGS. 8 to 10.

[0062] The system 100 has a function for displaying a list of global variables referenced by the user program 10 (for example, a list screen 800 (see FIG. 8)). The system 100 can use a cross-reference function or the like to identify each POU that performs a write process on each global variable included in the list of global variables. The system 100 can also search for each task to which each identified POU is assigned.

[0063] In one aspect, the system 100 may search for each task assigned to each POU that performs a write operation on a global variable selected by a user from a list of global variables.

[0064] In another aspect, the system 100 may generate, based on the task search results, exclusive control settings including information such as the priority or type of each task to which a POU that performs write processing on each variable is assigned, and display a screen for the exclusive control settings (e.g., dialog 1000 in Figure 10) on the output device 160.

[0065] In another aspect, when a single task is assigned to a POU that performs a write process on each global variable, system 100 may automatically set exclusive control to permit each task to write a value to each global variable. For example, when writing to global variable 1 is performed only from task 1 and writing to global variable 2 is performed only from task 2, system 100 may automatically set exclusive control to permit only task 1 to write to global variable 1, and to permit only task 2 to write to global variable 2.

[0066] Furthermore, in other aspects, when there are two or more tasks to which POU for writing to a certain global variable is assigned in the system 100, the system 100 may display a screen for allowing the user to select which task is permitted to write to a certain global variable. For example, when tasks 1 and 2 perform write processing to global variable 1, the system 100 may display a screen for allowing the user to select either task 1 or 2 as the task for performing write processing to global variable 1.

[0067] The user can perform batch exclusive control settings for each global variable included in the user program 10 by means of the functions related to the second method of the system 100 described above.

[0068] <B. System Configuration> Next, referring to FIGS. 3 and 4, the functions and hardware configuration of the system 100 will be described.

[0069] FIG. 3 is a diagram showing an example of the main functions of the system 100. In one aspect, each function shown in FIG. 3 may be realized as a program executed on the hardware shown in FIG. 4. In other aspects, some of the functions shown in FIG. 3 may be realized as hardware. In this case, some of the functions shown in FIG. 3 may be configured by an FPGA (Field Programmable Gate Array), an ASIC (Application Specific Integrated Circuit), or a combination thereof, etc.

[0070] The system 100 mainly includes an operation reception unit 301, a POU search unit 302, a task search unit 303, a UI display unit 304, and an exclusive setting unit 305.

[0071] The operation receiving unit 301 receives operation input from the user via the input device 150. As an example, the operation receiving unit 301 can receive any operation input, such as an operation to edit the user program 10, an operation to search for a POU that accesses a certain variable, an operation to display a POU that accesses a certain variable in an editor, an operation to select a global variable from the editor as a target for exclusive control setting, an operation to display a list of global variables included in the user program 10, an operation on an exclusive control setting screen, and the like.

[0072] The POU search unit 302 searches for POUs that access (read or write) a certain global variable. In one aspect, the POU search unit 302 may have a function for searching for POUs that perform a write process on a certain global variable, a function for searching for POUs that perform a read process on a certain global variable, and a function for searching for POUs that perform a read process or a write process on a certain global variable. As an example, when a certain global variable is selected by a user from a list of global variables included in the user program 10, the POU search unit 302 may search for POUs that access the selected certain global variable. In addition, the UI display unit 304 may display the search results of the POU search unit 302 on the output device 160. In one aspect, the list of global variables included in the user program 10 may be a list of all variables, or may be a search result obtained by filtering the variables included in the user program 10.

[0073] The task search unit 303 searches for tasks to which a certain POU is assigned. As an example, when a global variable is selected as a target for exclusive control setting in an editor in which each POU is written, the task search unit 303 may search for tasks to which the POU written in the editor is assigned. For example, when a user selects global variable 1 as a target for exclusive control setting in an editor in which POU 1 is written, the task search unit 303 searches for task 1 to which POU 1 is assigned. The task search unit 303 searches for assignment settings of each POU to each task stored in the system 100. As another example, the task search unit 303 may search for each task to which a POU that references each global variable included in the list of global variables is assigned. As another example, the task search unit 303 may search for a task to which a POU that references one or more global variables selected by the user is assigned from the list of global variables.

[0074] The UI display unit 304 may output various screens provided as the UI 140 to the output device 160. For example, the UI display unit 304 may include a screen for an editor in which a POU is written, a screen for exclusive control settings, a screen for listing global variables, a screen for searching global variables, a menu for the integrated development environment 130, a toolbar, an error or warning display screen, and the like. The error or warning display screen may include an error or warning for a statement that violates the exclusive control setting described with reference to FIG. 2. For example, in a case where exclusive control settings permit only task 1 (POU1) to perform a write operation on global variable 1, if a statement of a write operation from task 2 (POU2) to global variable 1 is found during a build, the UI display unit 304 may output an error or warning for the statement of a write operation from task 2 (POU2) to global variable 1 to the output device 160. Examples of screens displayed by the UI display unit 304 will be described later with reference to FIGS. 5 to 10.

[0075] The exclusive setting unit 305 generates an exclusive control setting. The exclusive setting unit 305 generates an exclusive control setting for a certain global variable based on the search results of the POU search unit 302. The exclusive control setting can be displayed in an exclusive control setting dialog (dialogs 700, 1000, etc.). As an example, assume that the POU search unit 302 finds task 1 as a task to which POU 1 that performs a write process on global variable 1 is assigned. In this case, the exclusive setting unit 305 generates an exclusive control setting that permits only task 1 to perform a write process on global variable 1. The UI display unit 304 displays a dialog (dialogs 700, 1000, etc.) based on the exclusive control setting. The user can confirm the contents of the dialog (task priority, type, etc.) and then decide whether to enable the exclusive control setting.

[0076] 4 is a diagram illustrating an example of a device 400 constituting the system 100. The device 400 is an information processing device such as a computer, and can operate as the system 100. In one aspect, the system 100 may be realized by one or more devices 400, a system including at least a part of the hardware configuration of the device 400, a virtual machine on a cloud environment including at least a part of the hardware configuration of the device 400, or the like.

[0077] The device 400 includes, as its main components, a processor 102 that executes an operating system (OS) and programs that run on the OS, a main memory 104 that provides a working area for storing data necessary for the processor 102 to execute the programs, an operation unit 106 (operation reception unit) that receives user operations such as a keyboard and a mouse, an output unit 108 that outputs processing results such as a display 109, various indicators, and a printer, a network interface 110 that connects to various networks, an optical drive 112, a local communication interface 116 that communicates with external devices, and storage 111. These components are connected to each other via an internal bus 118 or the like so as to enable data communication.

[0078] Device 400 has an optical drive 112 and may read various programs from a computer-readable recording medium 114 including an optical recording medium (e.g., DVD (Digital Versatile Disc), etc.) that non-transitorily stores a computer-readable program, and install the various programs in storage 111 or the like.

[0079] The various programs executed on device 400 may be installed in device 400 via computer-readable recording medium 114. In other aspects, the program may be installed in device 400 via network interface 110 from a server device (not shown) on the network or the like.

[0080] Storage 111 is composed of, for example, HDD (Hard Disk Drive) or SSD (Flash Solid State Drive), etc., and stores programs executed by processor 102. More specifically, storage 111 stores OS 120 and integrated development environment 130. Integrated development environment 130 may be realized as an application operating on OS 120.

[0081] Integrated development environment 130 provides the functions of system 100 described with reference to FIGS. 1 to 4. That is, the functions of system 100 may be realized by processor 102 executing integrated development environment 130 deployed in main memory 104.

[0082] <Configuration of UI> Next, referring to FIGS. 5 to 10, UI 140 provided by system 100 and an example of the operation of system 100 based on user operation input will be described. The screen examples shown in FIGS. 5 to 7 are screen examples corresponding to the first method of searching for a task to which a POU accessing a specific global variable described with reference to FIG. 1 is assigned. The screen examples shown in FIGS. 8 to 10 are screen examples corresponding to the second method of searching for a task to which a POU accessing a specific global variable described with reference to FIG. 1 is assigned.

[0083] (a. Exclusive control over global variables selected from the editor) 5 is a diagram showing an example of the UI 140 provided by the system 100. The system 100 can display a screen 500 for editing the user program 10 on the output device 160.

[0084] As an example, the screen 500 includes editors 510 and 520 and a cross-reference window 530. Note that the screen 500 is an example, and the system 100 may include any other configuration as a screen for editing the user program 10. Furthermore, the screen for editing the user program 10 may be capable of displaying any number of editors.

[0085] Editors 510 and 520 are screens for editing POUs, and each POU is described in them. For example, editor 510 includes description 511 of POU1, which indicates that POU1 is executing a write process to global variable 1. Editor 520 includes description 521 of POU2, which indicates that POU2 is executing a write process to global variable 1.

[0086] The cross reference window 530 displays a list of POUs that access a certain variable. The user can open an editor for a specific POU by selecting the specific POU from the list of POUs that access the variable. In the example of Figure 5, the cross reference window 530 displays POUs 1 and 2 (Program 0 and 1) that access global variable 1.

[0087] For example, if a user finds that the value of global variable 1 is being updated at an unexpected time, the user can debug the problem by referring to the description of POU1 and POU2 that perform the write process on global variable 1. The user can also set exclusive control for global variable 1 from screen 500. For example, the user can select global variable 1 displayed in editor 510 to open menu 600, which includes the exclusive control setting shown in FIG. 6.

[0088] FIG. 6 is a diagram illustrating an example of a menu 600. In the example of FIG. 6, the system 100 displays the menu 600 based on a user's operation to select global variable 1 displayed in the editor 510 and display the menu. As shown in FIG. 6, the user can select a specific global variable as a target for exclusive control settings by specifying the shape of a program element, in addition to directly specifying the variable name. The menu 600 includes an exclusive control settings item 610. The system 100 displays the exclusive control settings dialog 700 based on the user's selection of the exclusive control settings item 610. Note that selecting global variable 1 displayed in the editor 510 and selecting the exclusive control settings item 610 can also be rephrased as selecting global variable 1 as a target for exclusive control settings.

[0089] 7 is a diagram showing an example of an exclusive control setting dialog 700. The system 100 displays the exclusive control setting dialog 700 for global variable 1 based on the user selecting global variable 1 displayed in the editor 510 and selecting the exclusive control setting item 610 (based on the user selecting global variable 1 as the target for exclusive control setting).

[0090] The exclusive control setting dialog 700 includes an exclusive control setting that allows POU1 to write to global variable 1. This is because the user selected global variable 1 from the description 511 of POU1. If the user had selected global variable 1 from the description 521 of POU2, the exclusive control setting dialog 700 would include an exclusive control setting that allows POU2 to write to global variable 1.

[0091] The exclusive control setting dialog 700 includes, as display items, a task 701 for updating the value of a variable and a task 702 for referencing a variable. The task 701 for updating the value of a variable includes information about the task to which the POU described in the editor in which the user selected global variable 1 is assigned. In the example of FIG. 7 , the user selects global variable 1 from the description 511 of POU 1 in the editor 510. Therefore, in the system 100, the task 701 for updating the value of a variable includes information about the task (task 1) to which POU 1 described in the editor 510 is assigned (or information about the task that updates global variable 1). The task 701 for updating the value of a variable may include at least one of the task name, priority, and any other information related to the task. The task 702 for referencing a variable includes information about the task to which the POU that references global variable 1 (performs a process of reading the value of global variable 1) is assigned. In some aspects, the task 701 for updating the value of a variable may include information about not only task 1 but also all tasks that update the selected global variable 1. In this case, the user may select a task that performs a write operation to a global variable from among all tasks that update global variable 1 (e.g., in the example of Figure 1, task 701 that updates the value of the variable may include task 1 and task 2).

[0092] When the exclusive control settings displayed in the exclusive control settings dialog 700 are applied to the user program 10, the system 100 may output an error or warning based on the applied exclusive control settings when building the user program 10. For example, when the exclusive control settings that allow only task 1 (POU1) to perform a write process on global variable 1 are applied to the user program 10, the system 100 may output an error or warning based on the detection of a write process on global variable 1 from task 2 (POU2).

[0093] The user can refer to the contents of the exclusive control setting dialog 700 to check whether task 1 is appropriate as a task that performs write processing on global variable 1, whether there is an impact on other tasks, etc. After referring to the contents of the exclusive control setting dialog 700, the user can perform an operation input to apply the exclusive control settings displayed in the exclusive control setting dialog 700 to the user program 10 (for example, by pressing the OK button, etc.).

[0094] (b. Exclusive control over each global variable in the list of global variables) 8 is a diagram showing another example of the UI 140 provided by the system 100. The system 100 may display a list screen 800 of variables included in the user program 10. In one aspect, the list screen 800 may include all global variables included in the user program 10. In another aspect, the list screen 800 may include only variables extracted by an arbitrary filter.

[0095] On list screen 800, the user may perform an operation to collectively set exclusive control settings for all global variables included in list screen 800. In one aspect, system 100 may display a menu including exclusive control settings based on the user performing an operation such as right-clicking the mouse on list screen 800. In another aspect, system 100 may display a menu including exclusive control settings for the selected global variables based on the user performing an operation such as right-clicking the mouse with some or all global variables selected on list screen 800.

[0096] 9 is a diagram showing an example of an exclusive control setting menu 900. In the example of FIG. 9, the system 100 displays the menu 900 based on receiving an operation from the user to display the menu on the list screen 800. The menu 900 includes an exclusive control setting item 910. The system 100 displays an exclusive control setting dialog 1000 based on the user's selection operation of the exclusive control setting item 910. Note that the user's selection operation of the exclusive control setting item 910 can also be rephrased as selecting each global variable displayed on the list screen 800 (or one or more global variables selected by the user from the list screen 800) as a target for exclusive control setting.

[0097] 10 is a diagram showing an example of an exclusive control setting dialog box 1000. The system 100 displays the exclusive control setting dialog box 1000 based on the user's selection of the exclusive control setting item 910. Unlike the exclusive control setting dialog box 700, the exclusive control setting dialog box 1000 may include exclusive control settings for multiple global variables.

[0098] In order to display the exclusive control setting dialog 1000, the system 100 identifies each POU that performs a write process on each global variable displayed on the list screen 800, and searches for each task to which each POU is assigned.

[0099] The exclusive control setting dialog 1000 includes, as display items, a task 1001 for updating the value of a variable and a task 1002 for referencing a variable.

[0100] Task 1001 for updating the value of a variable includes information on each task to which each POU that updates the value of each global variable is assigned. For example, if list screen 800 includes global variables 1 and 2, task 1001 for updating the value of a variable may include information on a task that updates the value of global variable 1 and information on a task that updates the value of global variable 2. In one aspect, if multiple global variables are updated from a single task, task 1001 for updating the value of a variable may include information on the single task that updates the values of the multiple global variables (information may be merged). Task 1001 for updating the value of a variable may include the task name, priority, and any other information related to the task.

[0101] The task 1002 that references a variable includes information on each task to which each POU that references each global variable is assigned. For example, if the list screen 800 includes global variables 1 and 2, the task 1002 that references a variable may include information on a task that references the value of global variable 1 and information on a task that references the value of global variable 2.

[0102] When the exclusive control settings displayed in the exclusive control settings dialog 1000 are applied to the user program 10, the system 100 may output an error or warning based on the applied exclusive control settings when building the user program 10.

[0103] By performing the operations described with reference to FIGS. 8 to 10, the user can collectively set exclusive control for multiple global variables displayed on the variable list screen.

[0104] <D.フローチャート> Next, the internal processing procedure of system 100 will be described with reference to Figures 11 and 12. In one aspect, device 400 (system 100) may load a program for performing the processing of Figures 11 and 12 from storage 111 into main memory 104 and execute the program. In another aspect, some or all of the processing may be realized as a combination of circuit elements configured to perform the processing.

[0105] Fig. 11 is a flowchart showing an example of a procedure when the system 100 executes the processes shown in Fig. 5 to Fig. 7. The procedure when the system 100 executes the processes shown in Fig. 5 to Fig. 7 will be described with reference to Fig. 11.

[0106] In step S1110, system 100 accepts from the user a display operation of a POU that updates the value of a variable. In step S1120, system 100 displays the POU that updates the value of the variable. The processing of steps S1110 and S1120 corresponds to, for example, the processing of system 100 accepting from the user a display operation of a POU that updates global variable 1, and displaying editor 510 including description 511 of POU1 and editor 520 including description 521 of POU2.

[0107] In step S1130, system 100 accepts a menu display operation by selecting a variable. In step S1140, system 100 displays an exclusive control setting menu. The processing in steps S1130 and S1140 corresponds to, for example, processing in which system 100 displays menu 600 based on accepting an operation by the user to select global variable 1 displayed in editor 510 and display a menu.

[0108] In step S1150, the system 100 accepts an operation to select the exclusive control settings. In step S1160, the system 100 searches for allocation information of POUs to tasks. In step S1170, the system 100 displays an exclusive control settings dialog. The processes of steps S1150, S1160, and S1170 correspond to, for example, the process of the system 100 displaying the exclusive control settings dialog 700 for global variable 1 based on the system 100 accepting an operation to select the exclusive control settings item 610 from the user.

[0109] In step S1180, the system 100 accepts an operation for setting exclusive control. In step S1190, the system 100 executes the exclusive control setting for the variable. The processes in steps S1180 and S1190 correspond to, for example, the system 100 accepting an operation input from the user in the dialog 700 for setting exclusive control for global variable 1 to enable the exclusive control setting for global variable 1, and enabling the exclusive control setting for global variable 1 (e.g., enabling write operations to global variable 1 only from task 1). When the exclusive control setting (e.g., enabling write operations to global variable 1 only from task 1) is enabled, the system 100 may output an error or warning when it detects a write operation to global variable 1 from a task other than task 1 during the build of the user program 10.

[0110] Fig. 12 is a flowchart showing an example of a procedure when the system 100 executes the processes shown in Fig. 8 to Fig. 10. The procedure when the system 100 executes the processes shown in Fig. 8 to Fig. 10 will be described with reference to Fig. 12.

[0111] In step S1205, system 100 accepts a global variable list display operation. In step S1210, system 100 displays the global variable list. The processing in steps S1205 and S1210 corresponds to, for example, the processing in which system 100 accepts a display operation for a list of global variables included in user program 10 from the user and displays list screen 800 of variables included in user program 10.

[0112] In step S1215, the system 100 accepts a menu display operation by selecting a global variable. In step S1220, the system 100 displays an exclusive control setting menu. The processing in steps S1215 and S1220 corresponds to, for example, the processing in which the system 100 displays the menu 900 based on accepting an operation to display a menu on the list screen 800 from the user.

[0113] In step S1225, the system 100 accepts a selection operation for exclusive control settings. In step S1230, the system 100 searches for allocation information of POUs to tasks. In step S1235, the system 100 determines whether there is one task that updates the value of the selected global variable. If the system 100 determines that there is one task that updates the value of the selected global variable (YES in step S1235), the system 100 transfers control to step S1240. If not (NO in step S1235), the system 100 transfers control to step S1255. In step S1240, the system 100 displays the exclusive control settings for the global variable selected in step S1225. The processes of steps S1225, S1230, S1235, and S1240 correspond to, for example, the system 100 displaying the exclusive control settings dialog 1000 based on the system 100 accepting a selection operation for the exclusive control settings item 910 from the user. In one aspect, the system 100 may automatically enable the exclusive control setting based on the fact that there is one task that updates the value of the selected global variable.

[0114] In step S1245, system 100 receives an operation for exclusive control setting. In step S1250, system 100 executes the exclusive control setting. The processes of step S1245 and step S1250 are, for example, equivalent to a process in which system 100 receives an operation input to enable the exclusive control setting of each global variable in the exclusive control setting dialog 1000 and enables the exclusive control setting of each global variable (for example, a process of enabling a write process to a certain global variable only from a certain task). When the exclusive control setting becomes effective, if system 100 detects a write process to a certain global variable from a task that is not permitted to write to the certain global variable during the build of user program 10, it may output an error or a warning.

[0115] In step S1255, system 100 displays a task selection screen. In step S1260, system 100 receives a task selection operation. Each of the processes of step S1255 and step S1260 is, for example, equivalent to a process of allowing a user to select from which task to update the value of a certain global variable when there are two or more tasks for updating the value of a certain global variable included in list screen 800.

[0116] As described above, system 100 according to this embodiment can search for a task assigned with a POU that updates the value of a certain global variable (performs a write process to a certain global variable) and present it to the user. Also, system 100 can receive a setting (exclusive control setting) that permits updating the value of the certain global variable only from the searched task. Thereby, the user can easily develop a consistent user program 10.

[0117] <E. Supplementary Note> As described above, this embodiment includes the following disclosure. [Configuration 1] A system (100) for supporting the development of a user program (10) to be executed by a control device, comprising: The user program (10) has one or more subprograms (POU1, POU2, POU3), and each of the one or more subprograms (POU1, POU2, POU3) is assigned to a task (task 1, task 2, task 3) which is a program execution unit in the control device; a display unit (304) for displaying a screen for developing the user program (10); an operation reception unit (301) for receiving a variable selection operation on the screen; A system (100) comprising a search unit (303) that searches for tasks (task 1, task 2, task 3) assigned subprograms (POU1, POU2, POU3) for updating the values of the variables selected on the screen. [Configuration 2] The screen includes editors (510, 520) for editing the subprograms (POU1, POU2, POU3), The operation receiving unit (301) receives an operation to select a variable displayed in the editor (510, 520) as a target for exclusive control setting, The system (100) according to configuration 1, wherein the search unit (303) searches for a task (task 1, task 2, task 3) that updates the value of the selected variable based on the fact that the variable displayed in the editor (510, 520) has been selected as a target for exclusive control setting. [Configuration 3] The display unit (304) displays the exclusive control setting of the variable selected as the target of the exclusive control setting, the exclusive control setting includes at least one of the priority and the type of a task (task 1, task 2, task 3) assigned with a subprogram (POU1, POU2, POU3) that updates the value of a variable selected as a target of the exclusive control setting; 3. The system according to claim 2, wherein the operation receiving unit receives an operation input for enabling the exclusive control setting. [Configuration 4] The display unit (304) displays a list (800) of one or more variables included in the user program (10); The operation receiving unit (301) receives an operation for setting exclusive control for each variable included in the list (800), The system (100) according to any one of configurations 1 to 3, wherein the search unit (303) searches for tasks (task 1, task 2, task 3) assigned with subprograms (POU1, POU2, POU3) that update the values of each variable included in the list (800). [Configuration 5] The system (100) according to configuration 4, wherein the search unit (303) determines whether there is one task (task 1, task 2, task 3) assigned to a subprogram (POU1, POU2, POU3) that updates the value of each variable included in the list (800). [Configuration 6] The display unit (304) displays the exclusive control setting of a certain variable based on the fact that there is one task (task 1, task 2, task 3) assigned to a subprogram (POU1, POU2, POU3) that updates the value of the certain variable included in the list (800); 6. The system according to claim 5, wherein the operation receiving unit receives an operation input for enabling the exclusive control setting. [Configuration 7] Further comprising an exclusive control setting unit (305) for setting exclusive control for each variable; The system (100) according to configuration 5 or 6, wherein the exclusive control setting unit (305) automatically sets exclusive control on the certain variable based on the fact that there is one task (task 1, task 2, task 3) assigned to a subprogram (POU1, POU2, POU3) that updates the value of the certain variable included in the list (800). [Configuration 8] The system (100) according to any one of configurations 5 to 7, wherein the display unit (304) displays a selection screen for a task (task 1, task 2, task 3) that updates the value of a certain variable, based on the fact that there are two or more tasks (task 1, task 2, task 3) assigned to a subprogram (POU1, POU2, POU3) that updates the value of the certain variable included in the list (800). [Configuration 9] A method for assisting in the development of a user program (10) to be executed on a control device, comprising: the user program (10) has one or more subprograms (POU1, POU2, POU3), and each of the one or more subprograms (POU1, POU2, POU3) is assigned to one of a plurality of tasks (task 1, task 2, task 3) that are program execution units in the control device; The above method is a step of displaying a screen for developing the user program (10); A step of accepting a variable selection operation on the above screen; and searching for a task (task 1, task 2, task 3) assigned a subprogram (POU1, POU2, POU3) for updating the value of the variable selected on the screen. [Configuration 10] A program for supporting the development of a user program (10) to be executed by a control device, the user program (10) has one or more subprograms (POU1, POU2, POU3), and each of the one or more subprograms (POU1, POU2, POU3) is assigned to one of a plurality of tasks (task 1, task 2, task 3) that are program execution units in the control device; The above program is installed on the computer. a step of displaying a screen for developing the user program (10); A step of accepting a variable selection operation on the above screen; A program that executes a step of searching for a task (task 1, task 2, task 3) that is assigned a subprogram (POU1, POU2, POU3) for updating the value of the variable selected on the screen.

[0118] The embodiments disclosed herein should be considered to be illustrative in all respects and not restrictive. The scope of the present disclosure is defined by the claims, not by the above description, and is intended to include all modifications within the meaning and scope equivalent to the claims. Furthermore, the disclosures described in the embodiments and each modification are intended to be implemented, as far as possible, either alone or in combination. [Explanation of symbols]

[0119] 10 User program, 100 System, 102 Processor, 104 Main memory, 106 Operation unit, 108 Output unit, 109 Display, 110 Network interface, 111 Storage, 112 Optical drive, 114 Recording medium, 116 Local communication interface, 130 Integrated development environment, 150 Input device, 160 Output device, 301 Operation reception unit, 302 POU search unit, 303 Task search unit, 304 UI display unit, 305 Exclusive setting unit, 400 Device, 500 Screen, 510, 520 Editor, 511, 521 Description, 530 Cross reference window, 600, 900 Menu, 610, 910 Exclusive control setting item, 700, 1000 Dialog, 701, 1001 Task to update variable value, 702, 1002 Task to refer to variable, 800 List screen.

Claims

1. A system for supporting development of a user program to be executed in a control device, the user program has one or more subprograms, each of which is assigned to a task that is a program execution unit in the control device; a display unit for displaying a screen for developing the user program; an operation receiving unit for receiving a variable selection operation on the screen; a search unit that searches for a task to which a subprogram for updating the value of the variable selected on the screen is assigned, the display unit displays a list of one or more variables included in the user program; the operation receiving unit receives an operation for setting exclusive control for each variable included in the list; The search unit searches for a task to which a subprogram that updates the value of each variable included in the list is assigned.

2. the screen includes an editor for editing the subprogram; the operation accepting unit accepts an operation to select a variable displayed in the editor as a target for exclusive control setting; The system according to claim 1 , wherein the search unit searches for a task that updates a value of a selected variable displayed in the editor, based on the selection of the variable as a target for exclusive control setting.

3. the display unit displays an exclusive control setting for a variable selected as a target for exclusive control setting; the exclusive control setting includes at least one of a priority and a type of a task to which a subprogram that updates the value of a variable selected as a target of the exclusive control setting is assigned; The system according to claim 2 , wherein the operation receiving unit receives an operation input for enabling the exclusive control setting.

4. 4. The system according to claim 1, wherein the search unit determines whether or not there is one task assigned to a subprogram that updates the value of each variable included in the list.

5. the display unit displays an exclusive control setting for a certain variable based on the fact that the number of tasks assigned to a subprogram that updates the value of the certain variable included in the list is one; The system according to claim 4 , wherein the operation receiving unit receives an operation input for enabling the exclusive control setting.

6. Further including an exclusive control setting unit for setting exclusive control for each variable; The system according to claim 4 or 5, wherein the exclusive control setting unit automatically sets exclusive control on a certain variable based on the fact that there is one task assigned to a subprogram that updates the value of the certain variable included in the list.

7. The system according to any one of claims 4 to 6, wherein the display unit displays a selection screen for a task to update the value of a certain variable based on the fact that there are two or more tasks assigned to a subprogram that updates the value of the certain variable included in the list.

8. 1. A method for assisting in the development of a user program to be executed on a control device, comprising: the user program has one or more subprograms, and each of the one or more subprograms is assigned to one of a plurality of tasks that are program execution units in the control device; The method comprises: displaying a screen for developing the user program; accepting a variable selection operation on the screen; a step of searching for a task to which a subprogram for updating the value of the variable selected on the screen is assigned; displaying the screen includes displaying a list of one or more variables included in the user program; the step of accepting the selection operation includes a step of accepting an operation for setting exclusive control for each variable included in the list; The method, wherein the step of searching for a task includes the step of searching for a task that has a subprogram assigned to it that updates the value of each variable included in the list.

9. A program for supporting the development of a user program to be executed by a control device, the user program has one or more subprograms, and each of the one or more subprograms is assigned to one of a plurality of tasks that are program execution units in the control device; The program is configured to: displaying a screen for developing the user program; accepting a variable selection operation on the screen; a step of searching for a task to which a subprogram for updating the value of the variable selected on the screen is assigned; displaying the screen includes displaying a list of one or more variables included in the user program; the step of accepting the selection operation includes a step of accepting an operation for setting exclusive control for each variable included in the list; The step of searching for a task includes the step of searching for a task to which a subprogram that updates the value of each variable included in the list is assigned.

Citation Information

Patent Citations

  • Control method of development support device

    JP2006318504A

  • Control device and system program

    JP2012194683A

  • Control system and program component

    JP2015176386A