Development support device, development support method, and development support program

The development support device identifies and preserves variables used by the controlled object, addressing inefficient memory usage and potential impacts on the controlled object by ensuring essential variables are not deleted from the control program list.

JP7600787B2Active Publication Date: 2024-12-17OMRON CORP
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
JP2021039323
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-03-11
Publication Date
2024-12-17
Estimated Expiration
2041-03-11

AI Technical Summary

Technical Problem

Existing control programs for control devices like PLCs face issues with unused variables remaining in the definition list, leading to inefficient memory usage and potential impact on controlled objects due to their deletion.

Method used

A development support device that includes a storage unit, extraction unit, acquisition unit, and determination unit to identify and preserve variables that may be used by the controlled object during execution, preventing their deletion from the list.

Benefits of technology

This approach ensures that variables essential for the controlled object are not deleted, thereby maintaining efficient memory usage and minimizing the impact on the controlled object due to unused variable deletion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007600787000001
    Figure 0007600787000001
  • Figure 0007600787000002
    Figure 0007600787000002
  • Figure 0007600787000003
    Figure 0007600787000003
Patent Text Reader

Abstract

To suppress an influence on a controlled object due to removal of an unused variable from a control program for a controller controlling the controlled object.SOLUTION: A development support device 100 extracts, from variables in a variable definition list declaring variables used in a source code of a control program 210 for controlling a controlled object 300, first variables not used in the source code, and acquires information for specifying second variables that are likely to be delivered and received between the controlled object 300 and a controller 200 in an execution state of the control program 210. The development support device 100 determines that, of the first variables, variables corresponding to the second variables cannot be removed from the variable declaration list.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a technique for supporting the development of a control program for a control device that controls a controlled object. [Background technology]

[0002] Control devices such as PLCs (Programmable Logic Controllers) are being introduced in various manufacturing sites, such as FA (Factory Automation) systems. Such control devices are a type of computer, and can control controlled objects, such as manufacturing devices and manufacturing equipment, by executing control programs designed according to the controlled objects. In general, control programs are created using a development support device that is prepared separately from the controller.

[0003] Such control programs are generally written using variables that are declared in advance. For example, Japanese Patent Laid-Open Publication No. 2005-352612 (Patent Document 1) discloses a program development support device that can improve the efficiency of developing control programs by improving the searchability of variables. In the program development support device of Patent Document 1, when an operand for a predetermined instruction is input, in response to a keyword (character string) specification, the searchability of variables is improved by narrowing down the list to display only variables whose variable names include the specified character string. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2005-352612 A Summary of the Invention [Problem to be solved by the invention]

[0005] In the source program of the above control program, a definition list for declaring variables is provided, and variables declared in the definition list are available for use in the source code.

[0006] On the other hand, when a variable is deleted from the source code when the control program is changed or edited, if the variable remains in the definition list, a memory area corresponding to the variable is reserved when the control program is executed. Therefore, from the viewpoint of efficient use of the memory area of ​​the control device, it is preferable to delete unnecessary variables from the definition list.

[0007] On the other hand, when a control program is executed, a network is constructed between the control device and the controlled object to control the controlled object, so there is a concern that deleting a necessary variable may affect the controlled object.

[0008] The present disclosure has been made to solve the problems described above, and an object in one aspect is to provide a development support device capable of suppressing the impact on the controlled object caused by the deletion of unused variables in a control program for a control device that controls a controlled object.An object in another aspect is to provide a development support method capable of suppressing the impact on the controlled object caused by the deletion of unused variables in a control program.An object in yet another aspect is to provide a development support program capable of suppressing the impact on the controlled object caused by the deletion of unused variables in a control program. [Means for solving the problem]

[0009] According to an example of the present disclosure, a development support device for supporting development of a control program for a control device that controls a control target is provided. The development support device includes a storage unit, an extraction unit, an acquisition unit, and a determination unit. The storage unit stores a source code of the control program and a first list that declares a plurality of variables to be used in the source code. The extraction unit extracts a first variable that is unused in the source code from the plurality of variables in the first list. The acquisition unit acquires information for identifying a second variable that may be exchanged between the control target and the control device among the plurality of variables in a state before the control program is executed. The determination unit determines that a variable that corresponds to the second variable among the first variables cannot be deleted from the first list based on the extraction result by the extraction unit and the information acquired by the acquisition unit in a state before the control program is executed.

[0010] According to this disclosure, the development support device can prevent a second variable that may be used in the control target when the control program is executed from being deleted from the first list even if the second variable is an unused variable in the source code of the control program. As a result, it is possible to suppress the influence on the control target caused by deleting an unused variable in the control program.

[0011] In the above disclosure, each of the multiple variables may have attribute information defining whether or not the variable is to be made public to a network including the control target and the control device. The acquisition unit may be configured to acquire the attribute information as information for identifying the second variable. The determination unit may be configured to determine that a variable designated to be made public to the network by the attribute information among the multiple variables cannot be deleted from the first list as the second variable.

[0012] According to this disclosure, it is possible to easily obtain information that identifies a second variable that may be used by a control target when a control program is executed, based on attribute information defined for each variable.

[0013] In the above disclosure, the acquisition unit acquires, in a state before the control program is executed, a control target and and O Device The method may be configured to obtain a second list indicating variables designated as targets for transfer between the first and second variables as information for identifying the second variables.

[0014] According to this disclosure, by using a list (second list) created in a state before execution of a control program, information for identifying a second variable used by a control target can be easily acquired.

[0015] In the above disclosure, the acquisition unit may be configured to acquire, as information, a second list of one or more projects designated by a user, and the determination unit may be configured to perform determination using, as a second variable, a variable included in the second list in at least one of the projects among the multiple variables.

[0016] According to this disclosure, when a plurality of projects are applied to a network including a control device and a controlled object, the user can select the range of projects to which the unnecessary variable deletion process is applied.

[0017] In the above disclosure, the determination unit may be configured to determine, in a state before execution of the control program, based on the extraction result by the extraction unit and the information acquired by the acquisition unit, that a third variable among the first variables that does not correspond to the second variable can be deleted from the first list.

[0018] According to this disclosure, it is possible to determine variables that can be deleted from the first list by excluding a second variable that has the potential to be used by the controlled object when the control program is executed from unused variables in the source code of the control program.

[0019] In the above disclosure, the development support device may be configured to further include a variable deletion unit that deletes the third variable from the first list.

[0020] According to this disclosure, the first list can be automatically updated to include the third variable determined by the determination unit to be deletable, deleted.

[0021] In the above disclosure, the development support device may be configured to further include an interface unit for inputting a user's operation. The extraction unit, the acquisition unit, and the determination unit may be configured to operate in response to a first operation input to the interface unit that starts a process of deleting unnecessary variables. The interface unit may be configured to output a message that prompts the user to decide whether or not to delete the third variable extracted by the determination unit from the first list. The variable deletion unit may be configured to operate in response to a second operation input to the interface unit that instructs the deletion of the third variable in response to the message.

[0022] According to this disclosure, in the unnecessary variable deletion process started in response to a user operation, the third variable determined by the determination unit to be deletable can be deleted from the first list after confirmation by the user.

[0023] In another example of the present disclosure, a development support method for a control program for a control device that controls a control target, executed by a computer, is provided. The development support method includes the steps of: extracting a first variable that is unused in the source code from a list that declares a plurality of variables used in the source code of the control program; acquiring information for identifying a second variable that may be exchanged between the control target and the control device among the plurality of variables in a state before the control program is executed; and determining that a variable that corresponds to the second variable among the first variables cannot be deleted from the list based on the extraction result in the extracting step and the information acquired in the acquiring step in a state before the control program is executed.

[0024] In yet another example of the present disclosure, a development support program for a control program for a control device that controls a control target is provided. The development support program causes a computer to execute the steps of: extracting a first variable that is unused in the source code from a list that declares a plurality of variables used in the source code of the control program; acquiring information for identifying a second variable that may be exchanged between the control target and the control device among the plurality of variables in a state before the control program is executed; and determining, in a state before the control program is executed, based on the extraction result in the extracting step and the information acquired in the acquiring step, that a variable corresponding to the second variable among the first variables cannot be deleted from the list.

[0025] According to this disclosure, the development support method and development support program can prevent a second variable that may be used by the control target when the control program is executed from being deleted from the list even if the second variable is an unused variable in the source code of the control program. As a result, it is possible to suppress the influence on the control target side caused by deleting an unused variable in the control program. Effect of the Invention

[0026] According to the present disclosure, it is possible to suppress the influence on the controlled object caused by deleting unused variables in a control program for a control device that controls the controlled object. [Brief description of the drawings]

[0027] [Figure 1] 1 is a schematic diagram showing a configuration example of an FA system to which a development support device according to an embodiment of the present invention is applied; [Diagram 2] FIG. 2 is a schematic diagram illustrating an example of a hardware configuration of a development support device. [Diagram 3] FIG. 2 is a conceptual diagram illustrating the operation of a control program. [Figure 4] FIG. 4 is a conceptual diagram illustrating an example of a control program. [Diagram 5]1 is a block diagram illustrating a configuration of a first example of unnecessary variable deletion processing by a development support device according to an embodiment of the present invention. FIG. [Figure 6] 11 is a flowchart illustrating a first example of an unnecessary variable deletion process performed by the development support device according to the present embodiment. [Figure 7] 7 is a flowchart illustrating a modified example of the unnecessary variable deletion process of FIG. 6. [Figure 8] FIG. 2 is a schematic diagram illustrating a manner of access from an external device to a control device. [Figure 9] FIG. 13 is a conceptual diagram illustrating the operation of a control program to which a second example of an unnecessary variable deletion process is applied. [Figure 10] FIG. 13 is a block diagram illustrating a configuration of a second example of unnecessary variable deletion processing by the development support device according to the present embodiment. [Figure 11] 13 is a flowchart illustrating a second example of an unnecessary variable deletion process performed by the development support device according to the present embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0028] Hereinafter, each embodiment according to the present invention will be described with reference to the drawings. In the following description, the same parts and components are denoted by the same reference numerals. Their names and functions are also the same. Therefore, in principle, detailed descriptions thereof will not be repeated.

[0029] <Application Examples> 1 is a schematic diagram showing an example of the configuration of an FA system 10 to which a development support device according to the present embodiment is applied. First, the system configuration of the FA system 10 will be described with reference to FIG.

[0030] The FA system 10 includes one or more development support devices 100, one or more control devices (controllers) 200, and an external device 300 controlled by the control devices 200.

[0031] The development support device 100 is, for example, a notebook or desktop PC (Personal Computer), a tablet terminal, a smartphone, or any other information processing device.

[0032] A development support program 50 is installed in the development support device 100. The development support program 50 is an application for supporting the development of a control program 210 for the control device 200. The development support program 50 is, for example, "Sysmac Studio" manufactured by Omron Corporation. A user can design a control program for the control device 200 on the development support program 50 and download the designed control program 210 to the controller. Alternatively, the development support device 100 can upload data and the like from the control device 200.

[0033] The control device 200 and the external device 300 are connected to a network NW1 to which the development support device 100 can be connected. Ethernet (registered trademark) or the like is adopted for the network NW1. The control device 200 is configured by, for example, a PLC.

[0034] The control device 200 and the external device 300 are connected to a network NW2. It is preferable to use a field network that performs periodic communication and guarantees the arrival time of data for the network NW2. As a field network that performs such periodic communication, OPC UA (registered trademark) and the like are known.

[0035] The external equipment 300 is composed of various industrial equipment for automating production processes, various sensors, HMI (Human Machine Interface) equipment, etc. The external equipment 300 includes devices 300A-300C and equipment 301A-301C connected to the network NW1 or NW2. The equipment 301A-301C are communicatively connected to the control device 200 via the networks NW1, NW2 by the devices 300A-300C. This allows the equipment 301A-301C to be controlled by a control program executed by the control device 200. In other words, the external equipment 300 corresponds to a "control target" controlled by a control program.

[0036] In the example of FIG. 1, the device 300A connected to the equipment 301A is connected to a network NW2 to which OPC UA is applied. The device 300B connected to the equipment 301B and the device 300C connected to the equipment 301C are connected to the network NW2 to which OPC UA is applied. t is It is assumed that it is connected to the applied network NW1.

[0037] <Configuration of development support device> FIG. 2 is a schematic diagram showing an example of a hardware configuration of the development support device 100. As shown in FIG.

[0038] The development support device 100 is, for example, a computer configured according to a general-purpose computer architecture. The development support device 100 includes a processor 102 such as a CPU (Central Processing Unit) or an MPU (Micro-Processing Unit), a main memory 104, a communication interface 111, an I / O (Input / Output) interface 114, a display interface 117, and a non-volatile storage device 120. These components are connected to each other via an internal bus 125 so as to be able to communicate with each other.

[0039] The processor 102 launches a development tool for a control program 210 (see FIG. 1) by expanding the development support program 50 stored in the storage device 120 into the main memory 104 and executing it. In addition to the development support program 50, the storage device 120 stores various data and programs 60. The source program of the control program 210 is stored in the main memory 104 or the storage device 120. In other words, the main memory 104 and the storage device 120 correspond to an embodiment of a "storage unit."

[0040] The communication interface 111 exchanges data with other communication devices via a network. The other communication devices include, for example, the control device 200 and the external device 300 shown in Fig. 1, and a server (not shown). The development support device 100 may be configured to be able to download various programs, such as the development support program 50, from the other communication devices via the communication interface 111.

[0041] The I / O interface 114 is connected to an operation unit 115, and receives a signal indicating a user operation from the operation unit 115. The operation unit 115 typically includes a keyboard, a mouse, a touch panel, a touch pad, etc., and accepts operations from a user. The operation unit 115 may be configured integrally with the development support device 100, or may be configured separately from the development support device 100.

[0042] The display interface 117 is connected to the display unit 118, and sends an image signal for displaying an image to the display unit 118 in accordance with a command from the processor 102 or the like. The display unit 118 is configured with an LCD (Liquid Crystal Display), an organic EL (Electro Luminescence) display, or the like, and presents various information to the user. The display unit 118 may be configured integrally with the development support device 100, or may be configured separately from the development support device 100.

[0043] In addition, FIG. 2 shows a configuration example in which the necessary functions are provided by the processor 102 such as a CPU executing a program, but some or all of these provided functions may be implemented using a dedicated hardware circuit (for example, an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array)). In this case, virtualization technology may be used to run multiple OSs with different uses in parallel, and required applications may be executed on each OS. In the above explanation, an example is given in which the development support device 100 executes all the processes, but this is not limiting, and multiple devices may work together to provide the functions described above. Furthermore, some or all of the functions may be realized by using computational resources on a server, known as a cloud.

[0044] <Control program> Next, the control program will be described.

[0045] FIG. 3 shows a conceptual diagram for explaining the operation of the control program. In the development support device 100, the operation unit 115 and Display sectionA source program 210s including a source code 51 and a variable definition list 52 is created by a user's operation using the development support device 100. The source program 210s including the source code 51 and the variable definition list 52 is appropriately edited by a user's operation on the development support device 100. Although the source code 51 and the variable definition list 52 are separately shown in FIG. 3, the source code 51 and the variable definition list 52 can be integrated into a file in the source program 210s. The source program 210s can typically be written in any language such as LD (ladder diagram), IL (instruction list), ST (structured text), FBD (function block diagram), and SFC (sequential function chart) as specified in IEC61131-3. In the following description, a case where the source program is written by a ladder program (LD) will be described as a typical example.

[0046] In the development support device 100, the source program 210s is built, whereby the execution code 211 of the control program 210 is created and downloaded to the control device 200. At this time, in the control device 200, a memory area 212 for storing the variables declared in the variable definition list 52 for the control program 210 is secured.

[0047] The devices 300A to 300C can access variables in the memory area 212 by data communication over the network NW1 or NW2 via the network interface 250. For example, in the example of Fig. 3, variables stored in the shaded areas are accessed from the external equipment 300 (the devices 300A to 300C). Alternatively, data can be input from the devices 300A to 300C to the control device 200 (the memory area 212).

[0048] Fig. 4 shows a conceptual diagram for explaining an example of a control program. Fig. 4(a) shows an example of a ladder circuit described by a ladder program, which is an example of a control program. Fig. 4(b) shows an example of the variable definition list explained in Fig. 3.

[0049] As shown in FIG. 4( a ), a ladder program is expressed by a ladder circuit 220 in which a logic circuit using circuit elements and connection lines is drawn in a ladder shape between an input bus 221 and an output bus 222 .

[0050] In the example of FIG. 4(a), the ladder circuit 220 includes a contact 224 that is turned on / off according to the value of the variable aa, and a coil 226 that outputs the on / off result as a variable bb. The ladder circuit is drawn by connecting circuit elements such as the contact 224 and the coil 226 with a connection line 227. For example, the variable bb is further used as a variable for opening and closing a contact of another ladder circuit (not shown). Alternatively, the variable aa is an output value of a coil of another ladder circuit (not shown). By a hierarchical combination of such ladder circuits, it is possible to describe a control operation for the control device 200 to control the external device 300.

[0051] As shown in Fig. 4(b), the variable definition list 52 is created by declaring at least the variable name and the data type of each variable. The data type is selectively set from predefined data such as "BOOL", "REAL", and "LREAL". As described in Fig. 3, when the source program is built, a data area having a capacity according to the selected data type is allocated for each variable declared in the variable definition list 52.

[0052] Furthermore, in the development support device according to the present embodiment, each variable has network attribute information 53. The network attribute information 53 is information that defines the presence or absence of input / output of the variable value from the control device 200 to the networks NW1 and NW2. The network attribute information 53 is declared as "output" for variables that the devices 300A-300B read from the control device 200 via the networks NW1 and NW2. Conversely, the network attribute information 53 is declared as "input" for variables that are input from the devices 300A-300B to the control device 200 via the networks NW1 and NW2. On the other hand, the network attribute information 53 is declared as "private" for variables that are neither "input" nor "output" from the control device 200 to the networks NW1 and NW2. In this way, in the variable definition list 52, the network attribute information 53 of each variable is declared as "output", "input", or "private".

[0053] Here, assuming that a source program is configured using the ladder circuit 220 in Fig. 4(a) and the variable definition list 52 in Fig. 4(b), the variables aa and bb are used in the ladder circuit (source code), while the variable cc is declared but unused within the ladder circuit. Even in this case, when the source program is built, an area for storing the variable cc is secured in the memory area 212 of the control device 200. Therefore, by deleting the unused variable cc from the variable definition list 52, the memory area of ​​the control device 200 can be released. This eliminates the need to secure unnecessary memory areas, improving the memory usage efficiency of the control device 200.

[0054] On the other hand, even if a variable is not used in the ladder circuit, i.e., the source program, there is a possibility that the variable may be accessed from the external device 300 to the control device 200. Therefore, if variables not used in the source program are extracted and automatically deleted from the variable definition list 52, there is a risk that the deletion of such variables as described above may affect the external device 300.

[0055] <First Example of Unnecessary Variable Deletion Process According to the Present Embodiment> FIG. 5 is a block diagram illustrating the configuration of a first example of unnecessary variable deletion processing by the development support device according to this embodiment.

[0056] Development support device 100 includes extraction unit 55, acquisition unit 56, judgment unit 57, user interface unit 58, and variable deletion unit 59. For example, each of acquisition unit 56, judgment unit 57, user interface unit 58, and variable deletion unit 59 is realized as part of the function of development support program 50 by processor 102 of development support device 100 executing the program. User interface unit 58 includes I / O interface 114 and display interface 117 shown in FIG. 2.

[0057] The user interface unit 58 starts the unnecessary variable deletion process when an instruction to start the unnecessary variable deletion process is input to the operation unit 115. For example, the user can input an instruction to start the unnecessary variable deletion process by selecting an option on a menu screen displayed on the display unit 118. The operation for issuing the instruction to start the unnecessary variable deletion process corresponds to a "first operation".

[0058] When the unnecessary variable deletion process is started, the extraction unit 55 compares the source code 51 with the variable definition list 52, and extracts unused variables V1 that are not used in the source code 51. For example, in the example of Fig. 4, the variable cc is extracted as the unused variable V1. The unused variable V1 corresponds to a "first variable", and the variable definition list 52 corresponds to an example of a "first list" or a "list".

[0059] 4 from the variable definition list 52. Based on the network attribute information 53, a variable whose attribute is not "private", i.e., a variable whose attribute is declared to be "input" or "output" to the network, can be determined to be a variable that may be used in the external device 300. That is, the network attribute information 53 corresponds to an example of information for identifying a variable (hereinafter also referred to as "device-used variable V2") that may be exchanged between the control device 200 and the external device 300 when the control program 210 is executed.

[0060] Based on the unused variables V1 extracted by the extraction unit 55 and the device usage variables V2 identified from the information acquired by the acquisition unit 56, the determination unit 57 determines that, among the unused variables V1, a variable corresponding to the device usage variable V2 cannot be deleted from the variable definition list 52. Then, the determination unit 57 determines, among the unused variables V1, a variable not corresponding to the device usage variable V2 as a variable V3 that can be deleted from the control program 210.

[0061] Therefore, among the unused variables V1, only those variables whose network attribute information 53 is defined as “private” are determined to be deletable variables V3, while those variables whose network attribute information 53 is defined as “input” or “output” are determined to be non-deletable from the variable definition list 52.

[0062] The user interface unit 58 uses the display unit 118 to notify the user of the deletable variables V3 and to ask for confirmation as to whether to delete the deletable variables V3. For example, in response to a message asking "Do you want to delete these variables?", characters and figures for clicking "YES" or "NO" can be output to the display unit 118.

[0063] When the user inputs a deletion instruction by clicking "YES" on the above display, the user interface unit 58 generates an automatic deletion instruction for the variable deletion unit 59. The operation for issuing the deletion instruction corresponds to the "second operation".

[0064] When the automatic deletion instruction is input, the variable deletion unit 59 deletes the deletable variable V3 from the variables included in the variable definition list 52. As a result, the variable definition list 52 is updated to include the deleted variable V3.

[0065] As a result, the development support device 100 according to this embodiment can automatically determine a deletable variable V3 from the variable definition list 52 at a stage prior to execution of the control program 210, excluding variables that may be used by the external device 300 (control target) when the control program 210 is executed. Furthermore, the variable definition list 52 can be updated to include the automatically determined deletable variable V3 deleted.

[0066] When the update of the variable definition list 52 is completed, the user interface unit 58 can output a message to the user indicating that the unnecessary variable deletion process is completed, using the display unit 118 etc. Furthermore, a message urging the user to rebuild the source program (source code) may also be output to the user.

[0067] A flowchart of a first example of unnecessary variable deletion processing by the development support device according to this embodiment is shown in Fig. 6. The processing of each step shown in Fig. 6 can be typically realized by software processing in which the processor 102 of the development support device 100 executes the development support program 50.

[0068] In step S110, the development support device 100 determines whether or not a command to start the unnecessary variable deletion process has been input by the user. If no command has been input by the user (NO in S110), the processes in and after step S120 are put on hold.

[0069] When the user issues an instruction to start the unnecessary variable deletion process (YES in S110), the process proceeds to step S120. In step S120, the development support device 100 extracts unused variables V1 that are not used in the source code 51 by the same process as the extraction unit 55 in FIG. 5. Furthermore, in step S130, the development support device 100 extracts unused variables V1 that are not used in the source code 51 by the same process as the extraction unit 55 in FIG. 5 The network attribute information 53 of the unused variable V1 is obtained by the same process as that of the obtaining unit 56 in the previous section.

[0070] Alternatively, in S130, it is also possible to obtain network attribute information 53 of all variables included in variable definition list 52. In this case, steps S120 and S130 may be processed in parallel, or step S130 may be executed prior to step S120, contrary to FIG.

[0071] Following steps S120 and S130, in step S140, the development support device 100 determines whether or not the network attribute information 53 is "private" for each of the unused variables V1 (S120). As a result, among the unused variables V1, variables whose network attribute information 53 is "private" are determined to be deletable in step S150, while variables whose network attribute information 53 is not "private" are determined to be undeletable in step S160.

[0072] Based on the determination in steps S140 to S160, in step S170, the development support device 100 sets the variables determined to be deletable in step S150 as deletable variables V3 from the variable definition list 52. By the processes in steps S140 to S170, it is possible to extract the deletable variables V3 in the same way as the determination unit 57 in FIG.

[0073] In step S180, development support device 100 deletes deletable variable V3 from the variables included in variable definition list 52, similar to variable deletion unit 59 shown in FIG.

[0074] According to the control process shown in FIG. 6, the variable definition list 52 can be updated to include the automatically determined deletable variable V3 deleted by starting the unnecessary variable deletion process in response to a user instruction.

[0075] 7, the development support device 100 can also execute steps S172, S175, and S185 for the user interface processing described in FIG. 5 in addition to the control processing in FIG.

[0076] When the extraction of the deletable variables V3 in step S170 is completed, the development support device 100 notifies the user of the deletable variables V3 using the display unit 118 in S172, and asks for confirmation as to whether or not to delete the deletable variables V3.

[0077] Furthermore, in step S175, the development support device 100 judges a user instruction in response to the confirmation in step S172. When a deletion instruction is input by the user, for example, when "YES" is clicked in response to the display of "Do you want to delete these variables?" in step S170, a YES judgment is made in step S175, and the process proceeds to step S180 for deleting the deletable variable V3.

[0078] On the other hand, if "NO" is clicked on the above display, a NO judgment is made in step S175, so step S180 is skipped and the unnecessary variable deletion process is terminated. In this case, the deletable variable V3 is not deleted, and the variable definition list 52 is maintained in the content before the unnecessary variable deletion process was started.

[0079] When the variable definition list 52 is updated in step S180, the development support device 100 outputs a message to the user in step S185 notifying the user that the unnecessary variable deletion process has ended. Note that, when the variable deletion has been executed in step S180, a message may be further output in step S185 to prompt the user to rebuild the source program in order to reflect the updated variable definition list 52.

[0080] <Second Example of Unnecessary Variable Deletion Process According to the Present Embodiment> Next, as a second example, a description will be given of unnecessary variable deletion processing that determines whether unused variables can be deleted or not based on information on link settings between the control device 200 and the external device 300 defined in the source program.

[0081] First, a mode of access from the external device 300 to the control device 200 will be described with reference to FIG.

[0082] By building a source program created or edited by the development support device 100, a variable list 203 corresponding to the variable definition list 52 is also created in the control device 200. That is, the variable list 203 includes the variables declared in the variable definition list 52. In the example of Fig. 8, it is assumed that the variables defined in the variable definition list 52 and the variable list 203 include variables OPT1 to OPT4.

[0083] In the device 300A connected to the control device 200 via the network NW2, variables to be periodically read out by periodic communication of the network during execution of a control program are determined by the subscription setting 305A. In the example of Fig. 8, the device 300A accesses the variables OPT1 and OPT2 by periodic communication in accordance with the subscription setting 305A, and acquires the values ​​of the variables from the control device 200. The values ​​of the variables OPT1 and OPT2 are used in the appliance 301A for monitoring state quantities, etc.

[0084] In the device 300B connected to the control device 200 via the network NW1, a tag data link setting 305B is created that defines a correspondence (link) between the variables read from the control device 200 and the variables in the device 300B.

[0085] 8, in accordance with the tag data link setting 305B, the device 300B accesses the variables OPT2 and OPT3 of the control device 200 and acquires the values ​​of the variables. The values ​​of the variables OPT2 and OPT3 can be used in the appliance 301B in the same manner as described above.

[0086] It is assumed that the device 300C and the development support device 100 share a common protocol. Therefore, the device 300C can exchange data with the development support device 100 via the control device 200 or directly through the network NW1. For example, the device 300C accesses variables OPT1 and OPT3 that are predefined in the variable mapping 305C and acquires the values ​​of the variables from the control device 200. For example, the device 300C is an HMI device such as a display. The values ​​of the variables OPT1 and OPT3 are used for display on the display.

[0087] 8, the development support device 100 can determine that, among the variables OPT1 to OPT4 included in the variable definition list 52 (i.e., the variable list 203), the variables OPT1 to OPT3 are used in the external device 300, while the variable OPT4 is unused in the external device 300. In other words, if the variable OPT4 is unused in the source program, it can be determined that deleting it will not affect the external device 300.

[0088] FIG. 9 shows a conceptual diagram for explaining the operation of a control program to which the second example of the unnecessary variable deletion process is applied.

[0089] 9, the source program 210s further includes a link setting list 54 in addition to the source code 51 and the variable definition list 52 shown in FIG 3. The variable definition list 52 can eliminate the need for the network attribute information 53 described in FIG 4.

[0090] The link setting list 54 describes the exchange of variables between the control device 200 and the external device 300 (devices 300A to 300C), which are the basis of the subscription setting 305A, the tag data link setting 305B, and the variable mapping 305C described in FIG.

[0091] When the source program 210s is built, the device side link setting code 214 is generated in the control program 210 according to the link setting list 54. The subscription setting 305A, the tag data link setting 305B, and the variables defined in the variable mapping 305 are set by the device side link setting code 214. As a result, when the control program 210 is executed, the subscription setting 305A, the tag data link setting 305B, and the variables defined in the variable mapping 305 are set according to the contents described in the link setting list 54. C The variables defined in are accessed from the external device 300.

[0092] Therefore, at the source program stage, the link setting list 54 can be used as an example of information for identifying a variable (device usage variable V2) that may be exchanged between the control device 200 and the external device 300 when the control program 210 is executed. In other words, the link setting list 54 corresponds to an example of the "second list."

[0093] FIG. 10 is a block diagram illustrating the configuration of a second example of unnecessary variable deletion processing by the development support device according to this embodiment.

[0094] The configuration of Fig. 10 is 5 8 in that the acquisition unit 56 acquires a link setting list 54 instead of the network attribute information 53. When multiple projects are applied to a common network (FIG. 8), one or multiple projects to which the unnecessary variable deletion process is applied can be selected based on a user selection input to the user interface unit 58. In this case, the acquisition unit 56 acquires the link setting list 54 related to the project selected by the user.

[0095] In the second example of the unnecessary variable deletion process shown in FIG. 10, the configuration is the same as that shown in FIG. 10 except that the information for identifying the device use variable V2 is the link setting list 54. 5 That is, the processes performed by the extraction unit 55, the determination unit 57, the user interface unit 58, and the variable deletion unit 59 regarding the unused variables V1, the device-used variables V2, and the deletable variables V3 are the same as the first example of the unnecessary variable deletion process shown in FIG.

[0096] Here, an example is assumed in which the variables OPT1 to OPT4 shown in Fig. 8 are extracted as unused variables V1 by the extraction unit 55. It is understood that the determination unit 57 can specify the variables OPT1 to OPT3 as device-used variables V2 in the example of Fig. 8 by using the link setting list 54. Therefore, for the variables OPT1 to OPT4 extracted as unused variables V1, the determination unit 57 can determine that the variables OPT1 to OPT3 cannot be deleted, while determining that the variable OPT4 can be deleted. That is, the variable OPT4 can be extracted as a deletable variable V3.

[0097] A flowchart of a second example of unnecessary variable deletion processing by the development support device according to this embodiment is shown in Fig. 11. The processing of each step shown in Fig. 11 can also be typically realized by software processing in which the processor 102 of the development support device 100 executes the development support program 50.

[0098] The flowchart shown in FIG. 11 differs from the flowchart in FIG. 6 in that development support device 100 executes steps S131 and S141 instead of steps S130 and S140 in FIG.

[0099] In step S131, the development support device 100 acquires the link setting list 54 by the same process as that of the acquisition unit 56 in Fig. 10. As described above, in step S131, the link setting list 54 related to one or more projects selected by the user can be acquired. This allows the user to select the range of projects to which the unnecessary variable deletion process is applied when multiple projects are applied to a common network (Fig. 8).

[0100] In step S141, the development support device 100 , non For each of the used variables V1 (S120), it is determined whether or not the variable is not included in the link setting list 54 acquired in step S131. For variables that are not included in the link setting list 54 (YES in S141), it is determined in step S150 that they can be deleted. On the other hand, for variables that are included in the link setting list 54 (NO in S141), it is determined in step S160 similar to FIG. 6 that they can be deleted. inability It is determined that:

[0101] The other processes of steps S110, S120, S170, and S180 are similar to those of Fig. 6, and therefore detailed description thereof will not be repeated. In addition, steps S172, S175, and S185 similar to those of Fig. 7 can be added to the flowchart of Fig. 11.

[0102] As a result, in the second example of the unnecessary variable deletion process by the development support device according to this embodiment, similarly to the above-mentioned first example, it is possible to automatically determine a deletable variable V3 from the variable definition list 52 by excluding variables that may be used by the external device 300 (control target) when the control program 210 is executed. Furthermore, it is possible to update the variable definition list 52 so that the automatically determined deletable variable V3 has been deleted.

[0103] As described above, according to the present disclosure, by extracting unused variables (V1) in a source program and identifying variables (V2) accessed from an external device 300 (control target) when the control program is executed, it is possible to suppress the impact on the control target caused by deleting unused variables (V1) in a control program.

[0104] <Additional Notes> The above-described embodiment and modified examples include the following technical ideas.

[0105] [Configuration 1] A development support device (100) for supporting development of a control program (210) for a control device (200) that controls a control target (300), comprising: a storage unit (104, 120) for storing a source code (51) of the control program and a first list (52) that declares a plurality of variables used in the source code; an extraction unit (55) that extracts a first variable (V1) that is unused in the source code from the plurality of variables in the first list; an acquisition unit (56) that acquires information (53, 54) for identifying a second variable (V2) that may be exchanged between the control target and the control device, among the plurality of variables, in a state before execution of the control program; a determination unit (57) that determines, in a state before execution of the control program, that a variable among the first variables that corresponds to the second variable cannot be deleted from the first list based on the extraction result by the extraction unit and the information acquired by the acquisition unit.

[0106] [Configuration 2] Each of the plurality of variables has attribute information (53) that defines whether or not the variable is to be made public to a network (NW1, NW2) including the control target (300) and the control device (200), The acquisition unit (56) acquires the attribute information as information for identifying the second variable, The development support device according to configuration 1, wherein the determination unit (57) determines that a variable among the plurality of variables that is designated to be made public on the network by the attribute information is the second variable (V2) and cannot be deleted from the first list.

[0107] [Configuration 3] The acquisition unit (56) acquires, in a state before the control program (210) is executed, the control target (300) and the control Device The development support device according to configuration 1, further comprising: a second list (54) indicating variables designated as targets for transfer between the first and second variables (200) is acquired as information for identifying the second variable (V2).

[0108] [Configuration 4] The acquisition unit (56) acquires, as the information, the second list (54) of one or more projects designated by a user; The development support device according to configuration 3, wherein the judgment unit (57) executes the judgment using a variable included in the second list (54) in at least one of the projects among the plurality of variables as the second variable (V2).

[0109] [Configuration 5] The determination unit (57) determines, before the execution of the control program (210), a third variable (V1) that does not correspond to the second variable (V2) based on the extraction result by the extraction unit (55) and the information acquired by the acquisition unit (56). variable 5. The development support device according to any one of configurations 1 to 4, further comprising: determining that (V3) can be deleted from the first list (52).

[0110] [Configuration 6] 6. The development support device according to configuration 5, further comprising a variable deletion unit (59) that deletes the third variable (V3) from the first list (52).

[0111] [Configuration 7] further comprising an interface unit (58) for inputting user operations; the extraction unit (55), the acquisition unit (56), and the determination unit (57) operate in response to input of a first operation for starting a process of deleting unnecessary variables to an interface unit; The interface unit determines whether or not to delete the third variable (V3) extracted by the determination unit from the first list (52). Confirmation outputting a message to the user requesting the 7. The development support device according to configuration 6, wherein the variable deletion unit (59) operates in response to input of a second operation to the interface unit to instruct deletion of the third variable in response to the message.

[0112] [Configuration 8] A development support method executed by a computer for a control program (210) for a control device (200) that controls a control target (300), comprising: A step (S120) of extracting a first variable (V1) that is unused in a source code (51) of the control program from a list (52) that declares a plurality of variables used in the source code; a step (S130) of acquiring information (53, 54) for identifying a second variable (V2) among the plurality of variables that may be exchanged between the control target and the control device in a state before execution of the control program; a step (S140, S141, S160) of determining, in a state before execution of the control program, that a variable among the first variables which corresponds to the second variable cannot be deleted from the list based on the extraction result in the extracting step and the information acquired in the acquiring step.

[0113] [Configuration 9] A development support program for a control program (210) for a control device (200) that controls a controlled object (300), comprising: The development support program is installed on a computer. A step (S120) of extracting a first variable (V1) that is unused in a source code (51) of the control program from a list (52) that declares a plurality of variables used in the source code; a step (S130) of acquiring information (53, 54) for identifying a second variable (V2) among the plurality of variables that may be exchanged between the control target and the control device in a state before execution of the control program; A development support program that executes, in a state before the control program is executed, a step (S140, S141, S160) of determining that a variable among the first variables that corresponds to the second variable cannot be deleted from the list based on the extraction result in the extracting step and the information acquired in the acquiring step.

[0114] The embodiments disclosed herein should be considered to be illustrative and not restrictive in all respects. The scope of the present invention is defined by the claims, not the above description, and is intended to include all modifications within the meaning and scope of the claims. [Explanation of symbols]

[0115] 10 FA system, 50 development support program, 51 source code, 52 variable definition list, 53 network attribute information, 54 link setting list, 55 extraction section, 56 acquisition section, 57 judgment section, 58 user interface section, 59 variable deletion section, 60 program, 100 development support device, 102 processor, 104 main memory, 111 communication interface, 114 I / O interface, 115 operation section, 117 display interface, 118 display section, 120 storage device, 125 internal bus, 200 control device, 203 variable list, 210 control program, 210s source program, 211 execution code, 212 memory area, 214 device side link setting code, 220 ladder circuit, 221 input side busbar, 222 output side busbar, 224 contact, 226 coil, 227 connection line, 250 network interface, 300 External devices, 300A, 300B, 300C devices, 301A, 301B, 301C equipment, 305, 305C variable mapping, 305A subscription settings, 305B tag data link settings, NW1, NW2 networks, OPT1~OPT4, aa~cc variables.

Claims

1. A development support device for supporting development of a control program for a control device that controls a control target, a storage unit that stores a source code of the control program and a first list that declares a plurality of variables used in the source code; an extracting unit that extracts a first variable that is unused in the source code from the plurality of variables in the first list; an acquisition unit that acquires information for identifying a second variable that may be exchanged between the control target and the control device, among the plurality of variables, in a state before the control program is executed; a determination unit that determines, in a state before the control program is executed, that a variable among the first variables that corresponds to the second variable is undeletable from the first list, based on a result of extraction by the extraction unit and the information acquired by the acquisition unit; Each of the plurality of variables has attribute information that defines whether or not the variable is to be made public to a network including the control target and the control device; The acquisition unit acquires the attribute information as information for identifying the second variable, The determination unit determines that a variable among the plurality of variables that is designated to be made public on the network by the attribute information is the second variable and cannot be deleted from the first list.

2. 2. The development support device according to claim 1, wherein the determination unit determines, in a state before execution of the control program, based on the extraction result by the extraction unit and the information acquired by the acquisition unit, that a third variable among the first variables that does not correspond to the second variable can be deleted from the first list.

3. 3. The development support device according to claim 2, further comprising a variable deletion unit that deletes said third variable from said first list.

4. further comprising an interface unit for inputting user operations; the extraction unit, the acquisition unit, and the determination unit operate in response to a first operation input to the interface unit for starting a process of deleting unnecessary variables; the interface unit outputs a message to the user requesting confirmation as to whether or not to delete the third variable extracted by the determination unit from the first list; 4. The development support device according to claim 3, wherein said variable deletion unit operates in response to input of a second operation to said interface unit instructing deletion of said third variable in response to said message.

5. A development support method executed by a computer for a control program for a control device that controls a control target, comprising: extracting a first variable that is unused in the source code from a list that declares a plurality of variables used in the source code of the control program; acquiring information for identifying a second variable, which may be exchanged between the control target and the control device, among the plurality of variables in a state before execution of the control program; determining, in a state before execution of the control program, based on a result of the extraction in the extracting step and the information acquired in the acquiring step, that a variable among the first variables that corresponds to the second variable cannot be deleted from the list; Each of the plurality of variables has attribute information that defines whether or not the variable is to be made public to a network including the control target and the control device; The acquiring step acquires the attribute information as information for identifying the second variable, A development support method, in which the determining step determines that a variable among the plurality of variables that is designated to be made public on the network by the attribute information is the second variable and cannot be deleted from the list.

6. A development support program for a control program for a control device that controls a control target, The development support program is installed on a computer. extracting a first variable that is unused in the source code from a list that declares a plurality of variables used in the source code of the control program; acquiring information for identifying a second variable, which may be exchanged between the control target and the control device, among the plurality of variables in a state before execution of the control program; executing a step of determining, in a state before the execution of the control program, that a variable among the first variables corresponding to the second variable cannot be deleted from the list based on an extraction result in the extracting step and the information acquired in the acquiring step; Each of the plurality of variables has attribute information that defines whether or not the variable is to be made public to a network including the control target and the control device; The acquiring step acquires the attribute information as information for identifying the second variable, The development support program, in which the determining step determines that a variable among the plurality of variables that is designated to be made public on the network by the attribute information is the second variable and cannot be deleted from the list.

Citation Information

Patent Citations

  • Terminal test apparatus, terminal test device and variable maintenance method

    CN106407111A

  • Support device for production of software

    JP1991223927A

  • Editor device and storage medium recording editor program

    JP2002062910A

  • Device for supporting program development, and method for displaying variable name list

    JP2005352612A

  • Network system

    JP2009009607A