CN116917818A - Development support device, development support method, and development support program - Google Patents

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

Info

Publication number
CN116917818A
CN116917818A CN202180094743.8A CN202180094743A CN116917818A CN 116917818 A CN116917818 A CN 116917818A CN 202180094743 A CN202180094743 A CN 202180094743A CN 116917818 A CN116917818 A CN 116917818A
Authority
CN
China
Prior art keywords
variable
control
variables
list
development
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202180094743.8A
Other languages
Chinese (zh)
Inventor
比嘉良典
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp filed Critical Omron Corp
Publication of CN116917818A publication Critical patent/CN116917818A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Stored Programmes (AREA)

Abstract

The development support device (100) extracts, from variables in a variable definition list of variables used in source code of a control program (210) for a control device (200) that controls a control object (300), a 1 st variable that is not used in the source code, and acquires information for specifying a 2 nd variable used by the control object (300) in an execution state of the control program (210). The development support device (100) determines that the 3 rd variable, which is not equivalent to the 2 nd variable, of the 1 st variable can be deleted from the variable definition list.

Description

Development support device, development support method, and development support program
Technical Field
The present disclosure relates to a technique for assisting development of a control program for a control device that controls a control object.
Background
Control devices such as a PLC (Programmable Logic Controller: programmable logic controller) are introduced at various manufacturing sites represented by FA (Factory Automation: factory automation) systems. Such a control device is a computer that can control a control object such as a manufacturing apparatus or a manufacturing facility by executing a control program designed according to the control object. In general, a control program is created using a development assistance device prepared separately from a controller.
Such control programs are typically described using pre-declared variables. For example, japanese patent application laid-open No. 2005-352612 (patent document 1) discloses a program development support device capable of improving the development efficiency of a control program by improving the retrievability of variables. In the program development supporting device of patent document 1, when an operand for a predetermined command is input, a variable including only a variable name of a keyword (character string) is screened based on the specification of the keyword, thereby improving the retrievability of the variable.
Prior art literature
Patent literature
Patent document 1: japanese patent laid-open No. 2005-352612
Disclosure of Invention
Problems to be solved by the invention
In the source program of the control program described above, a definition list for declaring variables is provided, and the variables declared in the definition list can be used in the source code.
On the other hand, when the variable deleted in the source code remains in the definition list at the time of changing or editing the control program, a storage area corresponding to the variable is secured at the time of executing the control program. Therefore, from the viewpoint of efficiently using the storage area of the control device, it is preferable to delete unnecessary variables from the definition list.
On the other hand, when the control program is executed, a network is constructed between the control device and the control object to control the control object, and therefore, when a necessary variable is to be deleted, there is a possibility that the control object side is affected.
The present disclosure has been made to solve the above-described problems, and an object of one aspect is to provide a development support apparatus capable of appropriately extracting an deletable unnecessary variable in a control program for a control apparatus that controls a control object. Another object of the present invention is to provide a development assistance method capable of appropriately extracting an unnecessary variable that can be deleted in a control program. It is another object of the present invention to provide a development assistance program capable of appropriately extracting an unnecessary variable that can be deleted in a control program.
Means for solving the problems
According to an example of the present disclosure, a development supporting apparatus for supporting development of a control program for a control apparatus that controls a control object is provided. The development support device includes a storage unit, an extraction unit, an acquisition unit, and a determination unit. The storage unit stores source code of the control program and a 1 st list of a plurality of variables declared to be used in the source code. The extraction unit extracts, from among the plurality of variables in the 1 st list, the 1 st variable that is not used in the source code. The acquisition unit acquires information for specifying a 2 nd variable used by the control object among the plurality of variables in the execution state of the control program. The determination unit determines that the 3 rd variable, which is not equivalent to the 2 nd variable, of the 1 st variables can be deleted from the 1 st list based on the extraction result of the extraction unit and the information acquired by the acquisition unit.
According to the present disclosure, the development assistance device can determine a variable that can be deleted from the 1 st list by excluding the 2 nd variable used in the control object from the unused variables in the source code of the control program. As a result, the variable that affects the external device side when deleted can be excluded, and the deletable variable can be appropriately extracted from the control program.
In the above disclosure, the control object may be configured to be connected to the control apparatus via a network, and in execution of the control program, the variables shown in the pre-created 2 nd list are read out from the control apparatus. The acquisition unit acquires information specifying the variable shown in the 2 nd list directly from the control target, or acquires information specifying the variable shown in the 2 nd list from the control target via the control device.
According to this disclosure, information specifying the 2 nd variable used for the control object can be easily acquired using a list (2 nd list) created at the time of execution of the control program.
In the above disclosure, the control object may be connected to the control device via a network, and a part of the plurality of variables may be read by accessing the control object via the network during execution of the control program. The control device holds, as access information, a variable name read from a control object during execution of the control program. The acquisition unit may acquire the access information as information from the control device at the time of execution of the control program.
According to the present disclosure, the 2 nd variable used for the control object can also be determined using the access information held by the control device, if it cannot be determined using the list.
In the above disclosure, the development assistance device may further include a variable deleting unit that deletes the 3 rd variable from the 1 st list.
According to this disclosure, the 1 st list can be automatically updated to the content for which the 3 rd variable determined to be deletable by the determination unit has been deleted.
In the above disclosure, the development assistance device may further have an interface section for inputting an operation of the user. The extraction unit, the acquisition unit, and the determination unit may operate based on an input of the 1 st operation for the interface unit, which starts the deletion process of the unnecessary variables. The interface section may output a message requesting whether the user deletes the 3 rd variable extracted by the determination section from the 1 st list. The variable deletion unit may operate according to an input of a 2 nd operation for the interface unit, the 2 nd operation instructing deletion of the 3 rd variable corresponding to the message.
According to this disclosure, in the deletion processing of unnecessary variables that is started in response to a user operation, the 3 rd variable that is determined to be deletable by the determination unit can be deleted from the 1 st list after confirmation by the user.
In the above disclosure, when the 1 st operation is input, the extraction unit, the acquisition unit, and the determination unit are operated after version synchronization of the control program is ensured between the control device and the development support device.
According to the present disclosure, it is possible to confirm that the variable in the source program coincides with the variable in the control program executed by the control device, and extract the deletable variable from the 1 st list.
According to another example of the present disclosure, there is provided a development supporting method of a control program for a control device that controls a control object, which is executed by a computer. The development assistance method has the following steps: extracting a 1 st variable not used in the source code from a list of a plurality of variables declared to be used in the source code of the control program; acquiring information for specifying a 2 nd variable used by a control object among a plurality of variables in an execution state of a control program; and determining that the 3 rd variable, which is not equivalent to the 2 nd variable, of the 1 st variable can be deleted from the list based on the extraction result in the step of extracting and the information acquired in the step of acquiring.
According to still another example of the present disclosure, a development support program for a control device that controls a control object is provided. Developing an auxiliary program to cause a computer to execute the steps of: extracting a 1 st variable not used in the source code from a list of a plurality of variables declared to be used in the source code of the control program; acquiring information for specifying a 2 nd variable used by a control object among a plurality of variables in an execution state of a control program; and determining that the 3 rd variable, which is not equivalent to the 2 nd variable, of the 1 st variable can be deleted from the list based on the extraction result in the step of extracting and the information acquired in the step of acquiring.
According to the present disclosure, the development assistance method and the development assistance program can determine a variable that can be deleted from the list, excluding the 2 nd variable used in the control object, from the unused variables in the source code of the control program. As a result, the variable that affects the external device side when deleted can be excluded, and the deletable variable can be appropriately extracted from the control program.
ADVANTAGEOUS EFFECTS OF INVENTION
According to the present disclosure, it is possible to appropriately extract an deletable unnecessary variable in a control program for a control device that controls a control object.
Drawings
Fig. 1 is a schematic diagram showing an example of the configuration of an FA system to which the development supporting apparatus of the present embodiment is applied.
Fig. 2 is a schematic diagram showing an example of a hardware configuration of the development support apparatus.
Fig. 3 is a conceptual diagram illustrating the operation of the control program.
Fig. 4 is a conceptual diagram illustrating an example of a control program.
Fig. 5 is a schematic diagram illustrating an access method from an external device to a control device.
Fig. 6 is a block diagram illustrating a configuration for performing unnecessary variable deletion processing by the development supporting apparatus according to the present embodiment.
Fig. 7 is a flowchart of the unnecessary variable deletion process performed by the development supporting apparatus of the present embodiment.
Fig. 8 is a flowchart illustrating a modification of the development supporting method according to the present embodiment in which the variable deletion process is not required.
Detailed Description
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description, the same components and constituent elements are denoted by the same reference numerals. Their names and functions are also identical. Therefore, detailed descriptions thereof are not repeated in principle.
< application example >
Fig. 1 is a schematic diagram showing an example of the configuration of an FA system 10 to which the development supporting apparatus of the present embodiment is applied. First, a system configuration of the FA system 10 will be described with reference to fig. 1.
The FA system 10 has one or more development support apparatuses 100, one or more control apparatuses (controllers) 200, and an external device 300 controlled by the control apparatuses 200.
The development assistance device 100 is, for example, a notebook or desktop PC (Personal Computer: personal computer), a tablet terminal, a smart phone, or other information processing device.
The development assistance program 50 is installed in the development assistance apparatus 100. The development support program 50 is an application for supporting development of the control program 210 for the control device 200. Development assistance program 50 is, for example, "Sysmac Studio" created by Otton. The user can design a control program for the control device 200 on the development assistance program 50 and download the designed control program 210 to the controller. Alternatively, the development assistance device 100 can upload data and the like from the control device 200.
The control device 200 and the external device 300 are connected to a network NW1 to which the development assistance device 100 can be connected. The network NW1 employs Ethernet (registered trademark) or the like. The control device 200 is constituted by a PLC, for example.
The control device 200 and the external device 300 are connected to the network NW 2. The network NW2 preferably employs a field network for constant period communication that guarantees the arrival time of data. As such a field network for performing constant period communication, OPC UA (registered trademark) and the like are known.
The external device 300 is composed of various industrial devices for automating the production process, various sensors, HMI (Human Machine Interface: human-machine interface) devices, and the like. The external device 300 includes devices 300A to 300C and devices 301A to 301C connected to the network NW1 or MMW 2. The devices 301A to 301C are connected to the control apparatus 200 by the devices 300A to 300C via the networks NW1 and NW 2. Thereby, the devices 301A to 301C can be controlled by the control program executed by the control apparatus 200. That is, the external device 300 corresponds to a "control object" controlled by a control program.
In the example of fig. 1, the device 300A connected to the apparatus 301A is connected to the network NW2 to which OPC UA is applied. The device 300B connected to the device 301B and the device 300C connected to the device 301C are connected to the network NW1 to which Ethernet is applied. In the configuration in which the FA system 10 includes a plurality of control devices (controllers) 200, an inter-controller network (not shown) can be configured by using OPC UA, for example, between controllers, for example, between the control device 200 in fig. 1 and another control device not shown.
< Structure of development aid >
Fig. 2 is a schematic diagram showing an example of a hardware configuration of the development support apparatus 100.
As an example, the development support apparatus 100 is configured by a computer configured based on a general-purpose computer architecture. The development support apparatus 100 includes a processor 102 such as a CPU (Central Processing Unit: 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 nonvolatile storage device 120. These components are connected via an internal bus 125 in a manner capable of communicating with each other.
The processor 102 starts a development tool of the control program 210 (see fig. 1) by expanding and executing the development assistance program 50 stored in the storage device 120 in the main memory 104. The storage device 120 stores various data and programs 60 in addition to the development assistance program 50. The source program of the control program 210 is stored in the main memory 104 or the storage device 120. That is, the main memory 104 and the storage device 120 correspond to one embodiment of a "storage section".
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 apparatus 100 may be configured to be capable of downloading various programs such as the development support program 50 from the other communication device via the communication interface 111.
The I/O interface 114 is connected to the operation unit 115, and acquires a signal indicating a user operation from the operation unit 115. The operation unit 115 is typically configured by a keyboard, a mouse, a touch panel, a touch pad, and the like, and receives an operation from a user. The operation unit 115 may be integrally formed with the development supporting apparatus 100 or may be formed separately from the development supporting apparatus 100.
The display interface 117 is connected to the display unit 118, and transmits an image signal for displaying an image to the display unit 118 in accordance with an instruction from the processor 102 or the like. The display unit 118 is configured by an LCD (Liquid Crystal Display: liquid crystal display), an organic EL (Electro Luminescence: electroluminescence) display, or the like, and presents various information to the user. The display unit 118 may be configured integrally with the development supporting apparatus 100 or may be configured separately from the development supporting apparatus 100.
In fig. 2, a configuration example is shown in which a processor 102 such as a CPU executes a program to provide a desired function, but a dedicated hardware circuit (for example, ASIC (Application Specific Integrated Circuit: application specific integrated circuit) or FPGA (Field-Programmable Gate Array: field programmable gate array) may be used to install a part or all of the provided functions. In this case, a plurality of OS having different uses may be executed in parallel using a virtualization technique, and a desired application may be executed on each OS. In the above description, the development support apparatus 100 has been described as an example of a system that performs all the processes, but the present invention is not limited to this, and a plurality of apparatuses may cooperatively provide the functions described above. Further, some or all of the functions may be implemented using a computing resource called a cloud on a server.
< control procedure >
Next, a control program will be described.
Fig. 3 is a conceptual diagram illustrating the operation of the control program.
In the development assistance apparatus 100, a source program 210s including the source code 51 and the variable definition list 52 is generated by the user's operation using the operation sections 115 and 118. In addition, by the user's operation of the development assistance apparatus 100, the source program 210s including the source code 51 and the variable definition list 52 is appropriately edited. Although the source code 51 and the variable definition list 52 are shown in fig. 3, the source program 210s may be a file in which the source code 51 and the variable definition list 52 are integrated. The source program 210s can be typically described in any language such as LD (ladder diagram), IL (instruction list), ST (structured text), FBD (functional block diagram), and SFC (sequence function diagram) specified in IEC 61131-3. In the following description, a case where a source program is described by a ladder program (LD) will be described as a typical example.
In the development assistance apparatus 100, by constructing the source program 210s, the execution code 211 of the control program 210 is created and downloaded to the control apparatus 200. At this time, in the control device 200, for use in the control program 210, a storage area 212 for storing the variables declared in the variable definition list 52 is ensured.
The devices 300A to 300C can access the variable of the storage area 212 by data communication via the network NW1 or NW2 of the network interface 250. For example, in the example of fig. 3, the variables stored in the area marked with diagonal lines are accessed from the external device 300 (devices 300A to 300C). Conversely, data can be input to the control device 200 (memory area 212) from the devices 300A to 300C.
Fig. 4 is a conceptual diagram illustrating an example of the control program. Fig. 4 (a) shows an example of a ladder circuit described by a ladder program as an example of a control program. Fig. 4 (b) shows an example of the variable definition list described with reference to fig. 3.
As shown in fig. 4 (a), the ladder program is represented by a ladder circuit 220 in which a logic circuit using circuit elements and connection lines is depicted as a ladder between an input-side bus 221 and an output-side bus 222.
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 the variable bb. The ladder circuit is depicted by interconnecting circuit elements such as the contacts 224 and the coils 226 with connection lines 227. For example, the variable bb is also used as a variable for opening and closing contacts of other ladder circuits (not shown). Alternatively, the variable aa is the output value of the coil of the other ladder circuit (not shown). By the layered combination of the ladder circuits, it is possible to describe the control operation of the control device 200 for controlling the external device 300.
As shown in fig. 4 (b), the variable definition list 52 is created by declaring, for each variable, at least a variable name and a data type of the variable. The data type is selectively set from a predefined "BOOL", "REAL", and "LREAL", etc. As explained with fig. 3, when creating the source program, a data area having a capacity in accordance with the selected data type is ensured for each variable declared in the variable definition list 52.
Here, assuming that the source program is configured by the ladder 220 of fig. 4 (a) and the variable definition list 52 of fig. 4 (b), the variables aa and bb are used in the ladder (source code), while the variable cc is declared but is not used in the ladder. In this case, when the source program is created, an area for storing the variable cc is ensured in the storage area 212 of the control apparatus 200. Therefore, by deleting the unused variable cc from the variable definition list 52, the storage area of the control apparatus 200 can be released. This eliminates the need to secure an unnecessary memory area, and thus improves the memory use efficiency of the control device 200.
On the other hand, even if the ladder circuit, that is, the source program is not used, there is a possibility that a variable is accessed from the external device 300 via the networks NW1 and NW 2. Therefore, when the variables that are not used are extracted within the source program and automatically deleted from the variable definition list 52, the variables as described above are deleted, thereby possibly affecting the external device 300 side.
< Access from external device >
Next, an access method from the external device 300 to the control device 200 will be described with reference to fig. 5.
As shown in fig. 5, by constructing a source program created or edited by the development assistance apparatus 100, a variable list 203 corresponding to the variable definition list 52 is also created in the control apparatus 200. That is, the variable list 203 contains the variables declared in the variable definition list 52. In the example of fig. 5, it is assumed that variables OPT1 to OPT4 are included in the variables defined by the variable definition list 52 and the variable list 203.
In the device 300A connected to the control apparatus 200 through the network NW2, when the control program is executed, a variable periodically read out through constant period communication of the network is determined by the subscription setting 305A. In the example of fig. 5, the device 300A accesses the variables OPT1 and OPT2 according to the subscription settings 305A by constant period communication, and obtains the values of the variables from the control apparatus 200. The values of the variables OPT1 and OPT2 are used for monitoring the state quantity in the device 301A.
The control apparatus 200 stores access histories from the devices 300A to 300C as the access information 201 at the time of execution of the control program. Accordingly, based on the access information 201, the variables (OPT 1, OPT2 in this case) of the access control apparatus 200 from the device 300A can be determined.
In the device 300B connected to the control apparatus 200 via the network NW1, a data link setting 305B is created that specifies the correspondence (link) between the variable read from the control apparatus 200 and the variable in the device 300B.
In the example of fig. 5, the device 300B accesses the variables OPT2 and OPT3 of the control apparatus 200 according to the data link setting 305B, and obtains the values of the variables. The values of the variables OPT2 and OPT3 can be used in the device 301B in the same manner as described above.
In the control device 200, connection setting information 202 indicating that the variables OPT2 and OPT3 are access targets is created in correspondence with the data link setting 305B.
The same protocol is assumed between the device 300C and the development assistance apparatus 100. Therefore, the device 300C can transmit and receive data to and from the development assistance apparatus 100 via the control apparatus 200 or directly through the network NW 1. For example, the device 300C accesses the variables OPT1 and OPT3 predetermined in the variable map 305C, and obtains the values of the variables from the control apparatus 200. For example, device 300C is an HMI device such as a display. The values of the variables OPT1, OPT3 are used for display on the display.
The development assistance apparatus 100 can determine variables accessed from the devices 300B and 300C connected to the network NW1 according to the connection setting information 202 and the variable map 305C, respectively.
Accordingly, the development assistance device 100 can determine that the variables OPT1 to OPT3 among the variables OPT1 to OPT4 included in the variable definition list 52 and the variable list 203 are used in the external device 300, and that the variables OPT4 are not used in the external device 300. That is, if the variable OPT4 is not used in the source program, it can be determined that even deletion does not affect the external device 300 side.
The variables to be accessed from the devices 300B and 300C can be determined based on the access information 201 in the control device 200, but the information for determining the variables can be easily acquired according to the connection setting information 202 and the variable map 305C.
< unnecessary variable deletion Process pertaining to the present embodiment >
Fig. 6 is a block diagram illustrating a configuration for performing unnecessary variable deletion processing by the development supporting apparatus according to the present embodiment.
The development support device 100 includes an extraction unit 55, an acquisition unit 56, a determination unit 57, a user interface unit 58, and a variable deletion unit 59. For example, the processor 102 of the development support apparatus 100 executes the development support program 50, and the acquisition unit 56, the determination unit 57, the user interface unit 58, and the variable deletion unit 59 are each implemented as a part of the functions of the program. The user interface section 58 includes the I/O interface 114 and the display interface 117 shown in FIG. 2.
When a start instruction for the unnecessary variable deletion process is input to the operation unit 115, the user interface unit 58 starts the unnecessary variable deletion process. For example, the user can input a start instruction for eliminating the need for the variable deletion process by selecting and inputting a menu screen displayed on the display unit 118. The operation for this start instruction corresponds to "operation 1".
When the variable deletion process is not required to start, the extraction unit 55 extracts the unused variable V1 that is unused by the source code 51 against the source code 51 and the variable definition list 52. For example, in the example of fig. 4, the variable cc is extracted as the unused variable V1. Instead of using the variable V1 to correspond to the "1 st variable", the variable definition list 52 corresponds to one embodiment of the "1 st list" or "list".
In fig. 6, in consideration of the correlation with fig. 5, it is assumed that the variables OPT1 to OPT4 shown in fig. 5 are extracted as examples in which the variable V1 is not used.
As described with reference to fig. 5, the acquisition unit 56 acquires the access information 201 and the connection setting information 202 from the control device 200. Further, the acquisition unit 56 acquires the variable map 305C of the device 300C directly from the device 300C or via the control device 200. The access information 201, the connection setting information 202, and the variable map 305C correspond to one embodiment of information for determining the device usage variable V2 used in the external apparatus 300 (control object). In the example of fig. 5, it can be understood that, based on this information, the variables OPT1 to OPT3 can be determined as the device usage variable V2. That is, the device usage variable V2 corresponds to "2 nd variable", and the connection setting information 202 and the variable map 305C correspond to one embodiment of "2 nd list".
The determination unit 57 determines a variable that is not equivalent to the device use variable V2 among the unused variable V1 as a deletable variable V3 from the control program 210, based on the unused variable V1 extracted by the extraction unit 55 and the device use variable V2 determined based on the information acquired by the acquisition unit 56. In the example of fig. 5, the variable OPT4 can be extracted as the deletable variable V3.
The user interface section 58 notifies the user of the deletable variable V3 using the display section 118, and requests confirmation whether deletion of the deletable variable V3 can be performed. For "delete these variables? "display, the character and the graphic for clicking" yes "or" no "can be output to the display unit 118.
When the user interface section 58 inputs a deletion instruction from the user by clicking "yes" on the display, it generates an automatic deletion instruction to the variable deletion section 59. The operation for this deletion instruction corresponds to "operation 2".
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. Thereby, the variable definition list 52 is updated to the content in which the deletable variable V3 is deleted.
As a result, according to the development supporting apparatus 100 of the present embodiment, the deletable variable V3 from the variable definition list 52 can be automatically determined by excluding the device use variable V2. Further, the variable definition list 52 may be updated to the content in which the automatically determined deletable variable V3 is deleted.
When the update of the variable definition list 52 is completed, the user interface section 58 can output a message indicating that the variable deletion process is not required to be completed to the user using the display section 118 or the like. The message for causing the reconstruction of the source program (source code) may be output to the user.
Fig. 7 is a flowchart showing the unnecessary variable deletion process performed by the development supporting apparatus of the present embodiment. The processing of the steps shown in fig. 7 can be typically realized by executing the software processing of the development assistance program 50 by the processor 102 of the development assistance apparatus 100.
The development assistance device 100 determines in step S110 whether or not a start instruction for the unnecessary variable deletion process is input from the user. When the user instruction is not input (no determination in S110), the processing in step S120 and thereafter is waited.
When the start of the variable deletion process is instructed by the user (yes judgment at S110), the process proceeds to step S120. In step S120, the development assistance device 100 determines whether or not the control program is synchronized between the development assistance device 100 and the control device 200. When the synchronization is acquired (yes in S120), it is possible to confirm that the variable included in the variable definition list 52 of the source program matches the variable included in the variable list 203 of the control apparatus 200.
On the other hand, when synchronization is not acquired (no determination in S120), the development support apparatus 100 executes the synchronization processing in step S130, and then executes the determination in step S120 again. In this way, after confirming the state where the variables are identical between the variable definition list 52 and the variable list 203, the processing of step S140 and the following is performed.
In step S140, the development supporting apparatus 100 extracts the unused variable V1 that is not used by the source code 51 by the same processing as the extraction unit 55 in fig. 6. Further, in step S150, the development supporting apparatus 100 obtains information for specifying the device usage variable V2 used in the external device 300 (control object), specifically, the access information 201, the connection setting information 202, and the variable map 305C in fig. 5, by the same processing as the obtaining unit 56 in fig. 6. Steps S140 and S150 may be processed in parallel, or step S150 may be performed before step S140, contrary to fig. 7.
The development assistance device 100 proceeds to step S140 and step S150, and in step S160, determines which of the deletable variables V1 is not used by the comparison between the non-use variable V1 (S140) and the device use variable V2 (S150) through the same processing as that of the determination unit 57 in fig. 6. In this way, in step S170, the deletable variable V3 can be extracted in the same manner as in the determination unit 57 of fig. 6.
In step S180, the development assistance device 100 deletes the deletable variable V3 from the variables included in the variable definition list 52, as in the variable deletion unit 59 shown in fig. 6.
According to the control processing shown in fig. 7, by starting the unnecessary variable deletion processing in response to the user start instruction, the variable definition list 52 can be updated to the content in which the automatically determined deletable variable V3 is deleted.
Alternatively, as shown in fig. 8, the development support apparatus 100 may execute steps S172, S175, S185 for the user interface processing described in fig. 6 in addition to the control processing of fig. 7.
When the extraction of the deletable variable V3 in step S170 is completed, the development assistance device 100 notifies the user of the deletable variable V3 using the display unit 118, and requests confirmation whether or not the deletion of the deletable variable V3 can be performed, through S172.
Further, the development assistance device 100 determines the user instruction for the confirmation in step S172 in step S175. In the case where the deletion instruction is input from the user, for example, in "do these variables deleted" to step S170? When "yes" is clicked on the display of "yes", step S175 is determined as "yes", and the process proceeds to step S180 for deleting the deletable variable V3.
On the other hand, when no is clicked on the display, since step S175 is determined as no, 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 so that the content before the start of the variable deletion process is not required.
When the variable definition list 52 is updated in step S180, the development assistance apparatus 100 outputs a message indicating that the variable deletion process is not required to have ended to the user in step S185. In addition, when the variable deletion of step S180 is performed, a message prompting the reconstruction of the source program reflecting the updated variable definition list 52 may be further output in step S185.
As described above, according to the present disclosure, by extracting the unused variable (V1) in the source program and determining the variable (V2) accessed from the external device 300 (control object) at the time of execution of the control program, unnecessary variables that can be deleted in the control program can be appropriately extracted.
< additional notes >
The present embodiment and the modification described above include the following technical ideas.
Structure 1
A development support device (100) for supporting development of a control program (210) for a control device (200) that controls a control object (300), wherein the development support device (100) comprises:
a storage unit (104, 120) that stores a source code (51) of the control program and a 1 st list (52) that declares a plurality of variables used in the source code;
an extraction unit (55) that extracts a 1 st variable (V1) that is not used in the source code from the plurality of variables in the 1 st list;
an acquisition unit (56) that acquires information (201, 202, 305C) for specifying a 2 nd variable (V2) used by the control object among the plurality of variables in the execution state of the control program; and
and a determination unit (57) that determines that a 3 rd variable (V3) that is not equivalent to the 2 nd variable among the 1 st variable can be deleted from the 1 st list, based on the extraction result of the extraction unit and the information acquired by the information acquisition unit.
[ Structure 2]
In the development supporting apparatus described in the structure 1,
the control object (300) is configured to be connected to the control device (200) via a network, and in execution of the control program, variables shown in a pre-created 2 nd list (202, 305C) are read out from the control device,
the acquisition unit (56) acquires information specifying the variable shown in the 2 nd list directly from the control target or acquires information specifying the variable shown in the 2 nd list from the control target via the control device.
[ Structure 3]
In the development supporting apparatus described in the structure 1,
the control object (300) is connected to the control device (200) through a network (NW 1), and a part of the plurality of variables is read by accessing the control object through the network during execution of the control program,
the control device holds as access information (201) a variable name read from the control object during execution of the control program,
the acquisition unit (56) acquires the access information as the information from the control device when the control program is executed.
[ Structure 4]
In the development support device according to any one of the structures 1 to 3,
the development support device further comprises a variable deletion unit (59) for deleting the 3 rd variable (V3) from the 1 st list (52).
[ Structure 5]
In the development supporting apparatus described in the structure 4,
the development assistance device further has an interface section (58) for inputting a user operation,
the extraction unit (55), the acquisition unit (56), and the determination unit (57) operate in response to an input of the 1 st operation for the interface unit that starts the deletion process of the unnecessary variables,
the interface section outputs a message requesting whether the user deletes the 3 rd variable (V3) extracted by the determination section from the 1 st list (52),
the variable deletion unit (59) operates according to an input of a 2 nd operation for the interface unit, which instructs deletion of the 3 rd variable in response to the message.
[ Structure 6]
In the development supporting apparatus described in the structure 5,
when the 1 st operation is input, the extraction unit (55), the acquisition unit (56), and the determination unit (57) are operated after synchronization of the control program (210) is ensured between the control device (200) and the development support device (100).
[ Structure 7]
A development assistance method executed by a computer in a control program (210) for a control device (200) that controls a control object (300), the development assistance method comprising:
a step (S140) of extracting, from a list (52) of a plurality of variables declared to be used in the source code (51) of the control program, a 1 st variable (V1) not used in the source code;
a step (S150) of acquiring information (201, 202, 305C) for specifying a 2 nd variable (V2) used by the control object among the plurality of variables in the execution state of the control program; and
and a step (S160, S170) of determining that a 3 rd variable (V3) which is not equivalent to the 2 nd variable in the 1 st variable can be deleted from the list based on the extraction result in the step of extracting and the information acquired in the step of acquiring.
[ Structure 8]
A development support program (50) for a control program (210) for a control device (200) that controls a control object (300), wherein,
the development assistance program causes a computer to execute the steps of:
a step (S140) of extracting, from a list (52) of a plurality of variables declared to be used in the source code (51) of the control program, a 1 st variable (V1) not used in the source code;
step of acquiring information (201, 202, 305C) for specifying a 2 nd variable (V2) used by the control object among the plurality of variables in an execution state of the control program; and
and a step (S160, S170) of determining that a 3 rd variable (V3) which is not equivalent to the 2 nd variable in the 1 st variable can be deleted from the list based on the extraction result in the step of extracting and the information acquired in the step of acquiring.
The presently disclosed embodiments are considered in all respects to be illustrative and not restrictive. The scope of the present invention is defined by the appended claims, rather than by the description above, and is intended to include all modifications within the meaning and scope equivalent to the claims.
Description of the reference numerals
10: an FA system; 50: developing an auxiliary program; 51: source code; 52: a variable definition list; 55: an extraction unit; 56: an acquisition unit; 57: a determination unit; 58: a user interface section; 59: a variable deletion unit; 100: developing an auxiliary device; 102: a processor; 104: a main memory; 111: a communication interface; 114: an I/O interface; 115: an operation unit; 117: a display interface; 118: a display unit; 120: a storage device; 125: an internal bus; 200: a control device; 201: accessing information; 202: connection setting information; 233: a variable list; 210: a control program; 210s: a source program; 211: executing code; 212: a storage area; 220: a ladder circuit; 221: an input-side bus; 222: an output-side bus; 224: a contact; 226: a coil; 227: a connecting wire; 250: a network interface; 300: an external device; 300A-300C: a device; 301A to 301C: an apparatus; 305A: subscription setting; 305B: setting a data link; 305C: variable mapping; NW1, NW2: a network; OPT1 to OPT4, aa, bb, cc: a variable.

Claims (8)

1. A development support device for supporting development of a control program for a control device that controls a control object, the development support device comprising:
a storage unit that stores a source code of the control program and a 1 st list that declares a plurality of variables used in the source code;
an extraction unit that extracts, from the plurality of variables in the 1 st list, a 1 st variable that is not used in the source code;
an acquisition unit that acquires information for specifying a 2 nd variable used by the control object among the plurality of variables in an execution state of the control program; and
and a determination unit configured to determine that a 3 rd variable, which is not equivalent to the 2 nd variable, of the 1 st variables can be deleted from the 1 st list based on an extraction result of the extraction unit and the information acquired by the acquisition unit.
2. The development assistance device according to claim 1, wherein,
the control object is configured to be connected to the control apparatus via a network, and in execution of the control program, a variable indicated in a pre-created list 2 is read out from the control apparatus,
the acquisition unit acquires information for specifying the variable shown in the 2 nd list directly from the control target or acquires information for specifying the variable shown in the 2 nd list from the control target via the control device.
3. The development assistance device according to claim 1, wherein,
the control object is connected to the control device through a network, and a part of the plurality of variables is read out by accessing the control object through the network during execution of the control program,
the control device holds as access information a variable name read out from the control object during execution of the control program,
the acquisition unit acquires the access information as the information from the control device at the time of execution of the control program.
4. A development assistance device according to any one of claims 1 to 3, wherein,
the development supporting apparatus further includes a variable deleting unit configured to delete the 3 rd variable from the 1 st list.
5. The development assistance device according to claim 4, wherein,
the development assistance device further has an interface section for inputting an operation of a user,
the extraction unit, the acquisition unit, and the determination unit operate in response to an input of a 1 st operation for the interface unit to start deletion processing of unnecessary variables,
the interface section outputs a message requesting whether the user deletes the 3 rd variable extracted by the determination section from the 1 st list,
the variable deletion unit operates according to an input of a 2 nd operation for the interface unit, the 2 nd operation instructing deletion of the 3 rd variable corresponding to the message.
6. The development assistance device according to claim 5, wherein,
when the 1 st operation is input, the extraction unit, the acquisition unit, and the determination unit are operated after synchronization of the control program is ensured between the control device and the development support device.
7. A development assistance method executed by a computer, the development assistance method being a control program for a control device that controls a control object, the development assistance method comprising:
extracting a 1 st variable not used in a source code of a control program from a list of a plurality of variables declared to be used in the source code;
acquiring information for specifying a 2 nd variable used by the control object among the plurality of variables in an execution state of the control program; and
based on the extraction result in the step of performing the extraction and the information acquired in the step of performing the acquisition, it is determined that the 3 rd variable, which is not equivalent to the 2 nd variable, of the 1 st variables can be deleted from the list.
8. A development support program for a control device that controls a control object, wherein,
the development assistance program causes a computer to execute the steps of:
extracting a 1 st variable not used in a source code of a control program from a list of a plurality of variables declared to be used in the source code;
acquiring information for specifying a 2 nd variable used by the control object among the plurality of variables in an execution state of the control program; and
based on the extraction result in the step of performing the extraction and the information acquired in the step of performing the acquisition, it is determined that the 3 rd variable, which is not equivalent to the 2 nd variable, of the 1 st variables can be deleted from the list.
CN202180094743.8A 2021-03-11 2021-09-21 Development support device, development support method, and development support program Pending CN116917818A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2021039322A JP2022139087A (en) 2021-03-11 2021-03-11 Development support device, development support method, and development support program
JP2021-039322 2021-03-11
PCT/JP2021/034614 WO2022190428A1 (en) 2021-03-11 2021-09-21 Development assistance device, development assistance method, and development assistance program

Publications (1)

Publication Number Publication Date
CN116917818A true CN116917818A (en) 2023-10-20

Family

ID=83227814

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202180094743.8A Pending CN116917818A (en) 2021-03-11 2021-09-21 Development support device, development support method, and development support program

Country Status (5)

Country Link
US (1) US20240143287A1 (en)
EP (1) EP4307060A1 (en)
JP (1) JP2022139087A (en)
CN (1) CN116917818A (en)
WO (1) WO2022190428A1 (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07239788A (en) * 1994-02-28 1995-09-12 Hokuriku Nippon Denki Software Kk Compiler with unnecessary variable type declaration check function
US7024463B1 (en) * 1999-10-15 2006-04-04 Omron Corporation Network system, control method, control apparatus, and multiprocessor
JP2002062910A (en) * 2000-08-22 2002-02-28 Digital Electronics Corp Editor device and storage medium recording editor program
JP4379687B2 (en) * 2003-07-25 2009-12-09 オムロン株式会社 Simulation support tool and ladder program verification system and program product
JP4420210B2 (en) 2004-06-08 2010-02-24 オムロン株式会社 Program development support apparatus and processing method
JP2012118715A (en) * 2010-11-30 2012-06-21 Fuji Electric Co Ltd Plc system, development support device for the same, and program
JP6551565B2 (en) * 2017-06-02 2019-07-31 オムロン株式会社 Process analysis apparatus, process analysis method, and process analysis program
JP7047700B2 (en) * 2018-10-16 2022-04-05 オムロン株式会社 Control systems, controls, terminals, and programs

Also Published As

Publication number Publication date
JP2022139087A (en) 2022-09-26
EP4307060A1 (en) 2024-01-17
WO2022190428A1 (en) 2022-09-15
US20240143287A1 (en) 2024-05-02

Similar Documents

Publication Publication Date Title
EP2889707B1 (en) Control device and communication control method
CN108563579B (en) White box testing method, device and system and storage medium
CN112602025A (en) Automatic setting of digital twinning of industrial controllers
US10705500B2 (en) Support device, method, and recording medium for simplifying control program changing operation
JP2006268836A (en) Parameter setting device
CN111417907A (en) Method and apparatus for creating and managing intelligent programmable logic controller solutions
JP2018129020A (en) Method and apparatus for controlling and managing industrial processes using industrial internet operating system
JPWO2015136970A1 (en) Control device and control system
JP2007095107A (en) Parameter setting device
CN115129574A (en) Code testing method and device
CN112639636B (en) Development support device, development support method, and storage medium
CN111052010B (en) Control system, development assistance device, and storage medium
CN116917818A (en) Development support device, development support method, and development support program
CN110989986A (en) Software template-based software generation method and device and computer equipment
CN116888544A (en) Development support device, development support method, and development support program
CN112685051A (en) Method, device, platform and storage medium for automatically executing shell script
KR20220108967A (en) Method for generating application for controlling external electronic device and electronic apparatus for supporting the same
WO2022190417A1 (en) Development support device, development support method, and development support program
CN113254018B (en) Automatic operation method and device for webpage view
WO2020026738A1 (en) Support device and support program
US10782982B2 (en) Information processing apparatus and system, and method and recording medium for generating user interface
JP2007172128A (en) I/o simulator device
CN115952376A (en) Webpage access method and device, electronic equipment and storage medium
JP2018088277A (en) Control device and communication control method
JP6357769B2 (en) Control device and communication control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination