Information processing device, storage medium and support system
By replacing the dummy variables in the user program with actual variables in the information processing device and explicitly displaying the calling relationship of the program, the problem of complex user program analysis is solved and clear analysis and debugging of the program is achieved.
Patent Information
- Application Number
- CN202080049552.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-08
- Filing Date
- 2020-02-20
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-02-20
AI Technical Summary
In the prior art, it is difficult to analyze user programs because programs defined using dummy variables need to specify actual variables when called, resulting in componentization and reuse of the program, which complicates the analysis.
An information processing device is provided, which includes acceptance, retention and display components. By replacing dummy variables in the user program with actual variables specified in the calling command, the calling relationship and flow of the program are explicitly displayed to support analysis of the user program.
It makes it easy to analyze user programs. Users do not need to pay attention to dummy variables, and can clearly understand the call hierarchy and content of the program, simplifying program debugging and troubleshooting.
Smart Images

Figure CN114072740B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an information processing device that supports development of a user program executed by a control device that controls a control object, a storage medium that supports development of the user program, and a support system including the information processing device. Background Art
[0002] In various manufacturing sites, control devices such as programmable logic controllers (PLCs) are introduced. Such control devices are computers that execute user programs designed for manufacturing devices or manufacturing equipment. Such user programs are created in a development environment prepared independently of the control devices.
[0003] In the user program, one or more programs are prepared to define the frequently used operation processing, and the calling command for calling the program is recorded in the user program, thereby making the program componentized and reusable. Although the componentization and reusability of the program make it easier to create the user program, it makes it difficult to analyze the user program created by hierarchicalizing the program.
[0004] Japanese Patent Laying-Open No. 2014-071862 (Patent Document 1) discloses a peripheral device of a programmable controller, which includes a sequence program display processing unit, which displays a subroutine call command and expands the display of the subroutine between the subroutine call command and its next step through a subroutine display expansion processing unit.
[0005] Prior art literature
[0006] Patent Literature
[0007] Patent Document 1: Japanese Patent Application Publication No. 2014-071862 Summary of the invention
[0008] Problems to be solved by the invention
[0009] By displaying the program called by the call command as disclosed in Patent Document 1, the user can confirm the program called by the call command. However, since the program can be called by specifying any actual variable for each call command of the call source, if the program is still displayed in a state defined by dummy variables, the user has to replace it with the actual variable specified at the time of calling to confirm the program. Therefore, it is difficult to analyze the user program that is componentized and reused by using the call command.
[0010] An object of the present invention is to provide a technique for facilitating analysis of a user program including a call command.
[0011] Technical means of solving problems
[0012] According to an example of the present disclosure, there is provided an information processing device that supports the development of a user program executed by a control device that controls a control object. The information processing device includes: an accepting component that accepts user operations; a holding component that holds a user program created or updated by a user; and a display component that displays the user program held by the holding component. The user program includes: a first program that is defined using dummy variables; and a second program that has a call command for specifying actual variables to call the first program. When the display component displays the content of the first program in association with the call command in the second program according to the user operation, the actual variables specified in the call command are reflected to the dummy variables in the first program and displayed.
[0013] According to the present disclosure, it is possible to visually display what specific arguments are used to execute a first program in a second program, and as a result, the analysis of the second program becomes easy.
[0014] In the disclosure, the user program may also be defined using a procedural programming language comprising one or more commands. The display component may also replace dummy variables in the first program with actual variables specified in the call command as a reflection of the actual variables specified in the call command.
[0015] According to the above configuration, dummy variables are replaced with real variables, so the user can perform analysis of the second program without being concerned about the dummy variables.
[0016] In the disclosure described, the display component may also display the content of the first program immediately after the calling command in the second program as a part of the second program.
[0017] According to the above configuration, the flow of the second program can be displayed in an easily understandable manner, and as a result, analysis of the user program becomes easy.
[0018] In the disclosure, the display component may also display the content of the first program in a column different from the display column of the second program, side by side with the call command in the second program.
[0019] According to the above configuration, the hierarchical structure of the call can be expressed in an easily understandable manner, and as a result, the analysis of the user program becomes easy.
[0020] In the disclosure, the first program may have a call command for recursively calling the first program. The display unit may display the content of the first program called by the call command in the first program up to a predetermined number of times when displaying the content of the first program in association with the call command in the second program.
[0021] According to the above configuration, the content of the first program is repeatedly displayed, thereby preventing the content of the user program from being difficult to understand. As a result, the user program can be displayed in a form that makes it easy to understand the content.
[0022] In the disclosure, the first program may also have one or more calling commands. For a predetermined specific command among the one or more calling commands, the display component may not display the content of the program called by the calling command as an object associated with the calling command.
[0023] According to the above configuration, since the content of a predetermined specific command can be omitted, only the content of a necessary program can be displayed, and as a result, analysis of the user program becomes easy.
[0024] In the disclosure, the first program and the second program may also be defined using a block expression, wherein the block expression includes at least one input variable and at least one output variable representing a function block or function. The display unit may also incorporate the first block expression representing the first program into the second block expression representing the call command contained in the second program, and display the terminals corresponding to the actual variables of the second block expression and the terminals corresponding to the dummy variables of the first block expression in a form of combining them, as a reflection of the actual variables specified in the call command.
[0025] According to the above configuration, the relationship between the first program and the second program defined by using block expression can be displayed in a visually easy-to-understand form, and as a result, the user program can be easily analyzed.
[0026] In the above disclosure, the user program may include a branch program for executing different processes according to the establishment condition. The display means may display the contents of different processes in parallel with respect to the branch program according to the user operation.
[0027] According to the above configuration, it is possible to easily understand how processing branches, and as a result, analysis of the user program becomes easier.
[0028] In the disclosure, the control device may also have one or more input ports. The display unit may also display the contents of the user program by replacing the actual variables with addresses based on a variable mapping that associates the actual variables with addresses that represent the one or more input ports.
[0029] According to the above configuration, it is possible to display at a glance which address input value is used by the user program, and as a result, the program can be easily analyzed.
[0030] In the disclosure, the user program may also include a third program for exchanging data with other programs. The display component may also display the third program in association with the other programs.
[0031] According to the above configuration, even when different programs exchange data, the corresponding relationship between the programs can be shown by displaying the programs in association with each other, thereby facilitating analysis of the programs.
[0032] According to another example of the present disclosure, a storage medium is provided, which stores a support program to support the development of a user program executed by a control device that controls a control object. The user program includes: a first program, which is defined using dummy variables; and a second program, which has a call command for specifying actual variables to call the first program. The support program causes the computer to execute: a retention step, which retains the user program created or updated by the user; an acceptance step, which accepts user operations; and a display step, which associates the content of the first program with the call command in the second program for the retained user program and displays it according to the accepted operation, and reflects the actual variables specified in the call command to the dummy variables in the first program and displays it.
[0033] According to the present disclosure, by displaying what specific arguments are used when a first program is executed in the second program, analysis of the second program is facilitated.
[0034] According to another example of the present disclosure, a support system is provided, which includes: an information processing device that supports the development of a user program executed by a control device that controls a control object; and a display device. The support system includes: an acceptance component that accepts user operations; a holding component that holds a user program created or updated by a user; and a display component that displays the user program held by the holding component. The user program includes: a first program that is defined using dummy variables; and a second program that has a call command for specifying actual variables to call the first program. When the display component displays the content of the first program in association with the call command in the second program according to the user operation, the actual variables specified in the call command are reflected to the dummy variables in the first program and displayed.
[0035] According to the present disclosure, by displaying what specific arguments are used when a first program is executed in the second program, analysis of the second program is facilitated.
[0036] Effects of the Invention
[0037] According to the present invention, analysis of a user program including a call command is facilitated. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1It is a diagram schematically showing an application scenario of the information processing device 200X according to the present embodiment.
[0039] Figure 2 It is a schematic diagram showing a configuration example of the control system 1 .
[0040] Figure 3 It is a schematic diagram showing a hardware configuration example of PLC100.
[0041] Figure 4 It is a schematic diagram showing a hardware configuration example of the support device 200.
[0042] Figure 5 It is a schematic diagram showing a hardware configuration example of HMI 300 .
[0043] Figure 6 It is a schematic diagram showing an example of the software configuration of the PLC 100 .
[0044] Figure 7 It is a schematic diagram showing an example of the software configuration of the support device 200.
[0045] Figure 8 It is a schematic diagram showing an example of the software configuration of HMI 300 .
[0046] Fig. 9 It is a diagram showing a first example of reflection display.
[0047] Fig.10 This is a diagram showing still another display example of the first example of reflection display.
[0048] Fig.11 It is a diagram showing a second example of reflection display.
[0049] Fig.12 This figure shows a display example of a user program including recursive calls.
[0050] Fig.13 4 is a diagram showing a display example of user programs including programs registered in display omission list 470 .
[0051] Fig.14 This is a diagram showing a display example of a branch program.
[0052] Fig.15 This is a diagram showing a display example of a program in which actual variables are replaced with addresses.
[0053] Fig.16 This is a diagram showing a display example of a program configured to transmit and receive data between programs being executed separately.
[0054] Explanation of symbols
[0055] 1: Control system
[0056] 10: CPU unit
[0057] 11: System bus
[0058] 12: Power supply unit
[0059] 14, 16: I / O unit
[0060] 100, 100X: PLC
[0061] 102: Processor
[0062] 104: Chipset
[0063] 106: Main memory
[0064] 108: Flash memory
[0065] 110: System Programs
[0066] 112, 400, 400X, 500: User program
[0067] 116, 218, 318: USB interface
[0068] 118: Memory card interface
[0069] 120: Memory card
[0070] 122: Internal bus controller
[0071] 124: Fieldbus controller
[0072] 126, 316: External network controller
[0073] 130: Intermediate code
[0074] 140: Library
[0075] 142: General Parts
[0076] 150: Global variable table
[0077] 160: I / O module
[0078] 200: Support device
[0079] 200X: Information processing device
[0080] 201, 301: Storage
[0081] 201X: Maintaining Department
[0082] 202, 302: CPU
[0083] 203: Operation Department
[0084] 204, 304: ROM
[0085] 206, 306: RAM
[0086] 208, 308: HDD
[0087] 210: Keyboard
[0088] 211: Mouse
[0089] 214, 314: Display
[0090] 216: Optical recording medium reading device
[0091] 220, 320: bus
[0092] 221, 221X, 321: Operation reception department
[0093] 222: Editor
[0094] 223: Connector
[0095] 224: Registration Department
[0096] 225: Call command list generation unit
[0097] 226, 226X, 326: Display unit
[0098] 250: Recording medium
[0099] 273: Call command list
[0100] 274: Object information
[0101] 275: Support Program
[0102] 303: Input
[0103] 305: Touch panel
[0104] 375: Display Program
[0105] 410, 510: Procedure
[0106] 420, 420X: Main program
[0107] 440, 440X: Subroutine
[0108] 442: Dummy variable
[0109] 444, 482: Terminal
[0110] 460, 460X: Call command
[0111] 450: Text Image
[0112] 462: Send command
[0113] 464: Receive command
[0114] 470: Display omitted list
[0115] 480: Actual variables
[0116] 490: Corresponding list DETAILED DESCRIPTION
[0117] Hereinafter, various embodiments of the present invention will be described with reference to the accompanying drawings. In the following description, the same symbols are used for the same parts and components. Their names and functions are also the same. Therefore, their detailed description will not be repeated. In addition, the various embodiments and modifications described below may also be appropriately and selectively combined.
[0118] §1. Application examples
[0119] Reference Figure 1 An example of a scenario to which the present invention is applicable will be described. Figure 1 It is a diagram schematically showing an application scenario of the information processing device 200X according to the present embodiment.
[0120] The information processing device 200X is a device for supporting the development of the user program 400X. The information processing device 200X has, for example, an editor function for editing or updating the user program 400X as a function for supporting the development of the user program 400X. In addition, the editing function may include an online editing function and an offline editing function.
[0121] Furthermore, the information processing device 200X may not have the editor function, but may have only the function of displaying the user program 400X being executed in the PLC 100X as a function for supporting the development of the user program 400X, for example.
[0122] Reference Figure 1 The information processing device 200X includes a holding unit 201X, an operation receiving unit 221X, and a display unit 226X. The information processing device 200X is typically implemented using a personal computer.
[0123] The storage unit 201X stores the user program 400X created or edited by the user. Typically, the storage unit 201X is a function realized by a hard disk that stores various programs executed in the information processing device 200X in a nonvolatile manner.
[0124] The user program 400X is executed in a PLC 100X, which is an example of a control device for controlling a control object. The user program 400X is a structure formed by combining a plurality of programs, and includes a main program 420X having a call command 460X and a subprogram 440X called by the call command 460X. The subprogram 440X is defined using dummy variables, and is executed by replacing the dummy variables with actual variables specified by the call command 460X.
[0125] Figure 1 In the example shown, the user program 400X includes a main program 420X-A and a subprogram 440X. The call command 460X-A included in the main program 420X-A is a command for calling the subprogram 440X for execution by specifying "A" as an actual variable.
[0126] In addition, the user program 400X may also have the following structure: the subprogram 440X further has a calling command 460X, and the called subprogram further calls other subprograms.
[0127] The operation accepting unit 221X accepts user operations. For example, the operation accepting unit 221X is an input interface that accepts input signals from a mouse or a keyboard.
[0128] The display unit 226X visually displays the user program 400X on a display or the like. Figure 1 The display unit 226X displays the content of the subroutine 440X called by the calling command 460X in association with the calling command 460X included in the main program 420X-A according to the user operation accepted by the operation accepting unit 221X.
[0129] At this time, the display unit 226X will reflect the actual variables specified in the call command 460X to the dummy variables of the subroutine 440X and display them. Figure 1 In the example shown, "A+A" is displayed.
[0130] The function of displaying the content of the subprogram 440X is used, for example, in debugging work after the user program 400X is created. Furthermore, the function of displaying the content of the subprogram 440X can also be used when a failure occurs during the execution of the user program 400X installed in the PLC 100X.
[0131] During the creation of the user program 400X, it is convenient to describe it in the format of the call command 460X so that the subroutine 440X can be used without having to pay attention to the content of the subroutine 440X.
[0132] However, when a user program 400X fails or when the user program 400X is being tested, or even when the user program 400X is being created, the user may want to confirm the contents of the subprogram 440X. In this case, if the subprogram 440X is still displayed as defined using dummy variables, the user must confirm the contents of the subprogram 440X while recalling the actual variables specified when calling the subprogram 440X.
[0133] In particular, when the structure of the user program 400X is complicated, such as when the subroutine 440X also has a call instruction 460X, if the dummy variables are still displayed, the analysis of the user program 400X will become more difficult.
[0134] The display unit 226X reflects actual variables on dummy variables to display the content of the subroutine 440X, thereby facilitating analysis of the user program 400X.
[0135] §2. Specific examples
[0136] <A. System structure>
[0137] Reference Figure 2 A control system 1 including the support device 200 according to the present embodiment will be described. Figure 2 It is a schematic diagram showing a configuration example of the control system 1 .
[0138] Reference Figure 2 The control system 1 includes multiple PLC100-1, PLC100-2, PLC100-3, PLC100-4, ... (hereinafter also collectively referred to as "PLC100"), a human machine interface (Human Machine Interface, HMI) 300 and a support device 200.
[0139] The PLC 100 is an example of a control device that controls relays, sensors, etc. as control objects of field equipment. In addition, the control system 1 may also be a structure including one PLC 100. Regarding the control system 1, the following will describe a development environment and an execution environment with one PLC 100 as the object for the sake of simplicity.
[0140] Typically, the PLC 100 includes a central processing unit (CPU) unit 10 that is the main body for executing various programs including user programs, a power supply unit 12 that supplies power to the CPU unit 10, etc., and an input / output (I / O) unit 14 that exchanges signals from the field. The I / O unit 14 is connected to the CPU unit 10 via a system bus 11. The PLC 100 can be connected to a support device 200.
[0141] HMI300 is an example of an information processing device that provides a development environment for user programs. In addition, HMI300 is also an example of a display device that can visually display a user program executed in PLC100. HMI300 may also have the following functions, namely: various information obtained by control calculations in PLC100 are prompted to the operator, and internal commands are generated for PLC100 based on the operation from the operator. The communication protocol between HMI300 and PLC100 typically utilizes EtherNet / IP (registered trademark). Moreover, HMI300 can be connected to the support device 200.
[0142] The support device 200 is an example of an information processing device that provides a development environment for a user program executed by the PLC 100. The support device 200 generates various information for displaying the user program on the HMI 300. Such a development environment is provided by installing a support program in the support device 200.
[0143] The support program is, for example, “Sysmac Studio” manufactured by OMRON Corporation. A user (designer) can design a user program for the PLC 100 using the support program, and install the designed user program in the PLC 100 .
[0144] The support program is stored in, for example, a recording medium 250 and circulated, and installed in the support device 200. The support program may be installed from an external server device or the like via a network instead of the recording medium 250. As an example, the support device 200 is connected to the CPU unit 10 of the PLC 100 or the HMI 300 via a connection cable. The support device 200 is typically implemented using a personal computer.
[0145] The development support environment provided by the support device 200 may include a program editor (editing), a debugger, a simulator, and a monitor function for outputting these output information to a monitor such as a display. The support device 200 may also have a monitor function for further acquiring the state value of the operating PLC 100 and outputting it to a display such as a display.
[0146] The user program to be developed may include, for example, a program that complies with the international standard IEC61131-3. In the international standard IEC61131-3, five programming languages are specified as programming languages for PLC applications that include user programs: ladder diagram (LD), function block diagram (FBD), sequential function chart (SFC), instruction list (IL), and structured text (ST). The user program of this embodiment may be described in any programming language that complies with the international standard IEC61131-3, or in a language unique to each manufacturer or a procedural programming language such as C language.
[0147] The support device 200 and the HMI 300 can display the content of the user program. Specifically, the support device 200 and the HMI 300 can display the source code of the user program. The support device 200 can display the content of the user program during the editing and updating operation of the user program. Moreover, the HMI 300 can accept the user's operation, and display the content of the user program based on the operation. For example, when a fault occurs in the control system 1, the user operates the HMI 300 to display the content of the user program.
[0148] Despite Figure 2 Although not shown in the figure, the HMI 300 may execute a display program for visually displaying the contents of the user program.
[0149] <B. Hardware structure of PLC100>
[0150] Figure 3 This is a schematic diagram showing an example of the hardware configuration of PLC100. Figure 3 , PLC100 executes pre-installed programs through a processor to control the control object. More specifically, PLC100 includes a processor 102 such as a CPU or a microprocessor (Micro-Processing Unit, MPU), a chipset 104, a main memory 106, a flash memory 108, a Universal Serial Bus (USB) interface 116, a memory card interface 118, an internal bus controller 122, a field bus controller 124, and an external network controller 126. The flash memory 108 stores a system program 110 and a user program 112.
[0151] The processor 102 reads out the system program 110 and the user program 112 stored in the flash memory 108 , and expands them into the main memory 106 for execution, thereby realizing control of the controlled object.
[0152] The system program 110 includes command codes for providing basic functions of the PLC 100, such as data input / output processing and execution timing control. The user program 112 is created according to the user's control purpose (for example, a target line or process).
[0153] The user program 112 is, for example, a sequence program for executing sequence control and a motion program for executing motion control. In addition, the user program 112 is not limited to these programs, as long as it can be installed in the PLC 100 and is created or edited by the user. For example, it includes a program that becomes a general-purpose component 142 stored in the library 140 described later. In addition, the so-called user, in addition to the user who directly uses the PLC 100, may also include a user who receives a commission from the user who directly uses the PLC 100 to develop software.
[0154] The chipset 104 controls each component to realize the processing of the PLC 100 as a whole.
[0155] The internal bus controller 122 is an interface for exchanging data between the PLC 100 and the I / O unit 14 connected via the internal bus. The field bus controller 124 is an interface for exchanging data between the PLC 100 and the I / O unit 16 connected via a field bus (not shown). The internal bus controller 122 and the field bus controller 124 obtain state values input to the corresponding I / O units 14 and 16, respectively, and output the calculation results in the processor 102 as command values to the corresponding I / O units 14 and 16, respectively.
[0156] The USB interface 116 controls data exchange via USB. The support device 200 communicates with the PLC 100 via the USB interface 116. The memory card interface 118 is configured to allow the memory card 120 to be removable, and data can be written to and read from the memory card 120.
[0157] The external network controller 126 controls data exchange through various wired / wireless networks. The PLC 100 exchanges data with the HMI 300 , a gateway, a database server, a distribution server, or other PLCs 100 via the external network controller 126 .
[0158] The user program 112 created or edited by the user can be installed from the support device 200, the memory card 120, a distribution server, or the like.
[0159] Figure 3 , shows a structural example of providing the required functions by executing a program by the processor 102, but part or all of these provided functions can also be implemented using a dedicated hardware circuit (such as an application-specific integrated circuit (ASIC) or a field-programmable gate array (FPGA), etc.). Alternatively, the main part of PLC100 can also be implemented using hardware that follows a general architecture (such as an industrial personal computer based on a general-purpose personal computer). In this case, virtual technology can also be used to execute multiple operating systems (OS) with different purposes side by side, and execute the required applications on each OS.
[0160] <C. Hardware Configuration of Support Device 200>
[0161] Figure 4 2 is a schematic diagram showing an example of the hardware configuration of the support device 200. Figure 4 The support device 200 typically includes a general-purpose computer. In addition, from the perspective of maintainability at a manufacturing site where the PLC 100 is installed, a notebook personal computer with excellent portability is preferred.
[0162] The support device 200 includes a storage unit 201 and a CPU 202 that executes various programs including an OS. The storage unit 201 includes a read-only memory (ROM) 204 that stores a basic input output system (BIOS) or various data; a random access memory (RAM) 206 that provides a work area for storing data required for program execution in the CPU 202; and a hard disk drive (HDD) 208 that stores programs executed by the CPU 202 in a non-volatile manner. These components are connected via a bus 220.
[0163] The support device 200 further includes an operation unit 203 including a keyboard 210 and a mouse 211 operated by a user to input instructions to the support device 200 , and a display 214 for presenting information to the user.
[0164] The support device 200 includes an optical recording medium reading device 216 for reading a support program for providing a development support environment stored in the recording medium 250. Alternatively, the support program may be installed from a memory card, a distribution server, or the like.
[0165] The USB interface 218 controls data exchange via USB. The support device 200 communicates with the PLC 100 or the HMI 300 via the USB interface 218. The communication between the support device 200 and the PLC 100 and the communication between the support device 200 and the HMI 300 is not limited to USB, and may be Ethernet (registered trademark) or the like.
[0166] Figure 4 2 shows a configuration example in which a processor such as CPU 202 executes a program to provide the required functions, but part or all of the provided functions may be implemented using a dedicated hardware circuit (such as ASIC or FPGA, etc.). In this case, virtualization technology may be used to execute multiple OSs with different purposes in parallel, and the required applications may be executed on each OS.
[0167] <D.Hardware structure of HMI300>
[0168] Figure 5 This is a schematic diagram showing an example of the hardware configuration of HMI300. Figure 5 , HMI300 typically includes a general-purpose computer. HMI300 may be, for example, a fixed type, or may be provided in the form of a portable notebook personal computer at a manufacturing site where PLC100 is configured, or may be provided in the form of a tablet terminal. In addition, HMI300 may include dedicated hardware instead of a general-purpose computer.
[0169] HMI 300 includes a storage unit 301 and a CPU 302 that executes various programs including an OS. The storage unit 301 includes a ROM 304 that stores BIOS and various data, a RAM 306 that provides a work area for storing data required for program execution in the CPU 302, and a HDD 308 that stores programs executed by the CPU 302 in a non-volatile manner. These components are connected via a bus 320.
[0170] The HMI 300 further includes a touch panel 305 , an external network controller 316 , and a USB interface 318 .
[0171] The touch panel 305 includes a display 314 and an input unit 303 for accepting user operations. In addition, the display 314 and the input unit 303 may also be independently configured. In this case, the input unit 303 may also include a mouse and a keyboard. Moreover, in addition to the input unit 303 provided as a part of the touch panel 305, a mouse and a keyboard may also be included.
[0172] The external network controller 316 controls data exchange with the PLC 100 .
[0173] The USB interface 318 controls data exchange via USB. The HMI 300 communicates with the support device 200 via the USB interface 318 .
[0174] Figure 5 , a configuration example is shown in which a processor such as CPU 302 executes a program to provide the required functions, but part or all of the provided functions may be implemented using a dedicated hardware circuit (such as ASIC or FPGA, etc.). In this case, virtualization technology may be used to execute multiple OSs with different purposes in parallel, and the required applications may be executed on each OS.
[0175] <E.PLC100 software configuration example>
[0176] Next, a software configuration example of the PLC 100 will be described. Figure 6 This is a schematic diagram showing an example of the software configuration of PLC100. Figure 6 In PLC100, as control programs, a system program 110 and a user program 112 are executed. The system program 110 has an I / O module 160 as part of its function, and associates the data exchanged between the I / O units 14 and 16 and the field side (data acquired from the field and data output to the field) with the global variable table 150.
[0177] In the PLC 100, variable programming can be performed, and the user program 112 uses the variables associated with the field data defined in the global variable table 150 to perform various processes. In addition, the variables are defined as actual variables of the user program 112. Moreover, the variables defined as actual variables are not limited to the variables defined in the global variable table 150 (global variables), and may also be local variables referenced internally.
[0178] The global variable table 150 is a table that associates variables available in the user program 112 with port numbers (addresses) of actual functional units (e.g., I / O units 14 and 16), and defines the allocation of arbitrary variable names for values collected at a certain port of a certain functional unit. Also, the allocation of arbitrary variable names for values output from a certain port of a certain functional unit is defined.
[0179] The user program 112 included in the PLC 100 is a native code in a format that can be executed by the processor 102. The user program 112 includes an intermediate code 130 and a library 140. In the library 140, a general component 142 is stored for making the description of the user program 112 more efficient. The intermediate code 130 is obtained by building a user program described in a high-level language. The native code (user program 112) can be generated by the processor 102, and can also be generated in a development environment prepared independently of the PLC 100 (for example, the support device 200). The processor 102 generates the user program 112 based on the intermediate code 130 while referring to the general components 142 stored in the library 140. In addition, Figure 6 In the example shown, for convenience, the user program 112 includes the intermediate code 130 and the library 140, and the processor 102 generates the user program 112 based on the intermediate code 130 while referring to the common components 142 stored in the library 140. In addition, part or all of the library 140 may be converted into the intermediate code 130 or the native code.
[0180] <F. Software Structure of Support Device 200>
[0181] Figure 7 It is a schematic diagram showing an example of the software configuration of the support device 200. Figure 7 , an example of information stored in the storage unit 201 is shown in association with the software configuration of the support device 200.
[0182] (f1. Information stored in the support device 200)
[0183] The information stored in the storage unit 201 includes a user program 400 as program source code, an intermediate code 130 , a library 140 , a global variable table 150 , a call instruction list 273 , object information 274 , a display omission list 470 , a corresponding list 490 , and a support program 275 .
[0184] The user program 400 includes a plurality of programs 410. Among the programs 410, there is a program having a call instruction 460 for calling another program. In addition, the program called by the call instruction 460 may further have a call instruction.
[0185] The user can arbitrarily design the program to call another program 410 by the call command 460. When the call command 460 is incorporated into the program 410, the user can designate an actual variable to call the program as the call target.
[0186] The intermediate code 130 and the library 140 are generated by the linker 223 linking the user program 400. The intermediate code 130 and the library 140 are installed in the PLC 100 as the user program 112.
[0187] The object information 274 is used to display the content of the user program 400 on the display 214. Specifically, the object information 274 includes various components for visually displaying the content of the user program 400.
[0188] The call command list 273 is a list created based on the created user program 400. For details of the call command list 273, refer to Figure 8 And then described.
[0189] The call command list 273 is sent to HMI 300. Figure 7 Although not shown, the support device 200 generates a program 510 as image information for visualizing the content of the program 410 for each program 410 based on the user program 400 and the object information 274, and transmits the program 510 to the HMI 300 as the user program 500. The HMI 300 displays the content of the user program 400 on the display 314 based on the transmitted user program 500 and the call command list 273.
[0190] The display omission list 470 is information indicating the programs 410 whose contents are omitted and not displayed among the programs 410. The display omission list 470 will be described in detail later.
[0191] The correspondence list 490 is information that defines the relationship between the programs 410 to be executed. The correspondence list 490 will be described in detail later.
[0192] (f2. Module used to provide development support environment)
[0193] Reference Figure 7 In the storage unit 201, a support program 275 is stored. The CPU 202 executes the support program 275 to achieve Figure 7 Specifically, the support program 275 provides the functions of the operation accepting unit 221 , the editor 222 , the binder 223 , the registering unit 224 , the call command list generating unit 225 , and the display unit 226 .
[0194] The operation accepting unit 221 accepts an operation input from the operation unit 203. The operation accepting unit 221 is typically an input interface.
[0195] The editor 222 edits and creates the user program 400 according to the user operation. The editor 222 may further provide an online editing function for rewriting (editing) a part of the control program being executed during the operation of the PLC 100.
[0196] The linker 223 performs linking processing (including analysis, optimization, compilation, etc.) on the user program 400 to generate a user program 112 in a format executable by the PLC 100 .
[0197] The registration unit 224 generates the corresponding list 490 that defines the relationship of the program 410 based on the user program 400 created by the editor 222. Furthermore, the registration unit 224 may generate the display omission list 470 based on the user operation accepted by the operation accepting unit 221.
[0198] The call command list generation unit 225 generates the call command list 273 from the user program 400 based on the user operation accepted by the operation acceptance unit 221 .
[0199] The display unit 226 displays the content of the user program 400 on the display 214. In addition, the display unit 226 displays the content of the program 410 called by the call command 460 according to the user operation accepted by the operation accepting unit 221. For the display method, refer to Figures 9 to 11 The user operation may be, for example, a specific operation on an object represented by the call command 460 or an operation on a displayed menu.
[0200] Moreover, although reference will be made to Figure 12 to Figure 16 As will be described later, when a user operates a predetermined specific command, the display unit 226 can change the form in which the content of the command is displayed.
[0201] <G. Example of HMI300 software configuration>
[0202] Figure 8 It is a schematic diagram showing an example of the software configuration of HMI 300 . Figure 8 , an example of information stored in the storage unit 301 is shown in association with the software configuration of the HMI 300 .
[0203] The information stored in the storage unit 301 includes the user program 500 , the call command list 273 , and the display program 375 .
[0204] The user program 500 and the call command list 273 are information transmitted from the support device 200. The user program 500 includes a plurality of programs 510. Each program 510 is stored in the storage unit 301 as image information (including text information) visualized in order to display the contents of the program on the display 314. The user program 500 is generated, for example, by the support device 200 based on the user program 400 stored in the support device 200. In addition, the user program 500 may be generated by the HMI 300 when the HMI 300 installs the user program 400 from the support device 200.
[0205] The call command list 273 includes information indicating the file name storing the program as the call source having the call command 460, the location where the call command 460 appears (call command location information), the file name storing the program called by the call command 460, the dummy variables used to define the program called by the call command 460, and the actual variables designated by the call command 460. Furthermore, the call command list 273 includes information indicating the file name to be called and the program stored in the file.
[0206] The display program 375 is a program for displaying the user program 500 on the display 314. The CPU 302 executes the display program 375 to realize Figure 8 Specifically, the display program 375 provides the functions of the operation receiving unit 321 and the display unit 326 .
[0207] The display unit 326 displays each program 510 included in the user program 500 on the display 314. In addition, the display unit 326 determines the program 510 called by the call command 460 based on the call command list 273 according to the user operation accepted by the operation accepting unit 321, and displays the program 510. The user operation may be, for example, a specific operation on an object representing the call command 460 or an operation on a displayed menu.
[0208] <H. Display of actual variables>
[0209] In this embodiment, the support device 200 can display the content of the program called by the call command 460 in association with the call command 460 of the program that is the call source according to the user operation. Figures 9 to 16 In the description, it is assumed that the support device 200 displays the contents of the program 410.
[0210] Hereinafter, the program called by the call command 460 is also referred to as a subprogram 440, and the program having the call command 460 is referred to as a main program 420. In addition, the subprogram 440 may also have a call command 460. In this case, the subprogram 440 becomes the main program from the perspective of the program called by the call command 460 of the subprogram 440. That is, the subprogram 440 and the main program 420 are defined in a relative relationship.
[0211] When the CPU 202 of the support device 200 displays the content of the subroutine 440 in association with the calling command 460 of the main program 420 according to the user operation, the actual variable 480 specified in the calling command 460 is reflected to the dummy variable 442 in the subroutine 440, and the content (source code) of the subroutine 440 is displayed on the display 214.
[0212] By reflecting the actual variable 480 specified in the call command 460 to the dummy variable 442 in the subroutine 440 and displaying the content of the subroutine 440 in this way, the analysis of the main program 420 becomes easy. Specifically, if the content of the subroutine 440 is still displayed in the state of the dummy variable 442, the user must analyze while recalling the actual variable 480 specified when calling the subroutine 440. If the content of the subroutine 440 is still displayed in the dummy variable 442, especially when the subroutine 440 is described in a structure that further includes the call command 460 for calling other subroutine 440, the call hierarchy becomes deeper, and the analysis becomes more difficult.
[0213] The content of the subroutine 440 is displayed by reflecting the actual variable 480 specified in the calling command 460 to the dummy variable 442 in the subroutine 440, thereby showing what actual variables are specifically used to execute the subroutine 440 called by the calling command 460. As a result, the analysis of the user program including the main program 420 becomes easy.
[0214] Reference Figures 9 to 11 To illustrate the reflection display of the actual variable 480. Fig. 9 It is a diagram showing a first example of reflection display. Fig.10 This is a diagram showing still another display example of the first example of reflection display. Fig.11 4 is a diagram showing a second example of reflection display. The reflection display means that the actual variable 480 specified in the call command 460 is reflected in the dummy variable 442 in the subroutine 440 and displayed.
[0215] (h1. reflects the first example shown)
[0216] Reference Fig. 9 , screen SC1 shows the program before reflection display, and screen SC2 shows the program after reflection display.
[0217] Fig. 9 The program 410 - 1 shown is defined using a procedural programming language including a plurality of commands, including a call command 460 - 2 for calling the program 410 - 2 and a call command 460 - 3 for calling the program 410 - 3 .
[0218] The call command 460-2 calls the program 410-2 by specifying "x" as the actual variable 480-2. The call command 460-3 calls the program 410-3 by specifying "x" as the actual variable 480-3.
[0219] Program 410-2 is defined using "a" as a dummy variable 442-2, and includes a source code of "a+a". In addition, program 410-2 includes a call instruction 460-4 for calling program 410-4 by specifying "y" as an actual variable 480-4. Program 410-3 is defined using "b" as a dummy variable 442-3, and includes a source code of "b*b". Program 410-4 is defined using "c" as a dummy variable 442-4, and includes a source code of "c*c".
[0220] That is, between the program 410-1 and the program 410-2, the program 410-1 is equivalent to the main program 420, and the program 410-2 is equivalent to the subprogram 440. Between the program 410-1 and the program 410-3, the program 410-1 is equivalent to the main program 420, and the program 410-3 is equivalent to the subprogram 440. Between the program 410-2 and the program 410-4, the program 410-2 is equivalent to the main program 420, and the program 410-4 is equivalent to the subprogram 440.
[0221] Regarding each of the calling commands 460-2 and 460-3 contained in the program 410-1, if the contents of the respectively called programs 410-2 and 410-3 are displayed, the contents of the subroutine 440 are associated with the calling command 460 in the main program 420 and displayed in the form of reflecting the actual variables 480 specified in the calling command 460 to the dummy variables 442 in the subroutine 440. Fig. 9 In the illustrated example, when the content of the program 410 - 2 is displayed, the content of the program 410 - 4 called by the call command 460 - 4 included in the program 410 - 2 is also displayed.
[0222] Specifically, the dummy variable 442 in the subroutine 440 is replaced with the actual variable 480 specified in the call command 460, and the subroutine 440 is displayed. Fig. 9, "a+a" in program 410-2 is converted to "x+x" and displayed. "b*b" in program 410-3 is converted to "x*x" and displayed. Furthermore, "c*c" in program 410-4 is converted to "y*y" and displayed.
[0223] By replacing the dummy variable 442 in the subroutine 440 with the actual variable 480 specified in the call command 460 in this way, the user can analyze the user program including the main program 420 without paying attention to the dummy variable 442.
[0224] Furthermore, the contents of program 410-2, program 410-3, and program 410-4 are displayed immediately after call command 460, and are displayed as a part of the program including call command 460. For example, program 410-2 is displayed immediately after call command 460-2, and is displayed as a part of program 410-1. Program 410-3 is displayed immediately after call command 460-3, and is displayed as a part of program 410-1. Program 410-4 is displayed immediately after call command 460-4, and is displayed as a part of program 410-2. In addition, Fig. 9 In the example shown, program 410 - 2 is displayed as part of program 410 - 1 , and thus program 410 - 4 is displayed as part of program 410 - 1 .
[0225] By displaying the contents of the subroutine 440 immediately after the call command 460 as a part of the program including the call command 460, the program flow can be displayed in an easily understandable manner, and as a result, analysis of the user program including the main program 420 becomes easy.
[0226] In addition, the location where the content of the subroutine 440 is displayed is not limited to Fig. 9 As shown, it follows the call command 460. Fig.10 , a variation example of the position of the display subroutine 440 is described. Fig.10 The screen SC2' shows that the Fig. 9 The program after screen SC1.
[0227] Reference Fig.10, the position where the content of subroutine 440 is displayed may also be displayed side by side with call command 460 in a column different from the display column of the program having call command 460. Specifically, the content of program 410-1 is displayed in the first column L1, and the content of program 410-2 is displayed side by side with call command 460-2 in the second column L2. Similarly, the content of program 410-3 is displayed side by side with call command 460-3 in the second column L2. Furthermore, the content of program 410-4 is displayed side by side with call command 460-4 in program 410-2 in the third column L3.
[0228] By displaying the contents of the subprogram 440 and the call command 460 side by side in a column different from the display column of the program having the call command 460, the hierarchical structure of the call can be easily understood. As a result, the analysis of the user program including the main program 420 becomes easy.
[0229] In addition, the timing of displaying the contents of each program 410-2, 410-3, and 410-4 may be the timing of executing an operation. Furthermore, only the program called by the call command 460 may be displayed with respect to the selected call command 460. For example, when the call command 460-2 is selected and a prescribed operation is accepted, only the contents of the program 410-2 may be displayed, and the contents of the programs 410-3 and 410-4 may not be displayed.
[0230] Furthermore, only the programs called by the call command of the currently displayed program may be displayed by one operation. For example, when one operation is accepted in the situation shown in screen SC1, the contents of program 410-2 and program 410-3 may be displayed, while the contents of program 410-4 may not be displayed.
[0231] Moreover, it is also possible to Fig. 9 as well as Fig.10 As shown, all programs called by calling command 460 are displayed through one operation.
[0232] (h2. reflects the second example displayed)
[0233] In the first example of the reflection display, a display example is shown when the user program 400 is defined using a procedural programming language including a plurality of commands. The user program 400 may also be described using a function block diagram, for example, which defines a program constituting the user program 400 using a block representation representing a function block or a function.
[0234] Fig.11The second example of the reflected display is a display example when one or more programs constituting the user program 400 are defined using block expressions (function blocks FB). Each function block FB is a module of one program and can be regarded as one program. Fig.11 The screen SC3 in the figure shows the function block (program) before being reflected and displayed, and the screen SC4 shows the function block (program) after being reflected and displayed.
[0235] When defining a function block FB, other function blocks FB can also be called for execution. Fig.11 In the example shown, function block FB1 includes a call command 460-a for calling function block FB3. Function block FB1 is defined by two dummy variables 442 (input variable "input 1" and input variable "input 2"). With respect to the dummy variable 442 of input variable "input 1", an actual variable 480 "x1" is assigned, and with respect to the dummy variable 442 of input variable "input 2", an actual variable 480 "x2" is assigned.
[0236] Furthermore, in the call command 460 - a , the input variable “input 1” of the function block FB1 is associated with the dummy variable 442 which is the input variable “input 1” of the function block FB3 .
[0237] The actual variable 480 "x1" is assigned to the input variable "input 1" of the function block FB1, so Fig.11 In the example shown, it can also be said that the function block FB1 has a call command 460 - a that specifies “ x1 ” as an actual variable 480 to call the function block FB3 .
[0238] Likewise, it can be said that the function block FB2 has a call instruction 460 - b that specifies “y2” as an actual variable 480 to call the function block FB3 .
[0239] Function blocks FB generally have the advantage that program design can be performed without having to worry about the details of the program that defines the function blocks FB. However, when analyzing the program, if the inside of the function block FB is still maintained as a black box, analysis becomes difficult.
[0240] In this embodiment, the support device 200 displays the function block FB called by the call instruction 460 included in the black-boxed function block FB in association with the function block FB according to the user operation. This allows displaying part of the content of the black-boxed function block, thus facilitating analysis.
[0241] Specifically, a function block as a call target is incorporated and displayed inside a function block as a call source. Fig.11In the example shown, as shown in screen SC4, function block FB3 is integrated and displayed inside function block FB1. Also, function block FB3 is integrated and displayed inside function block FB2.
[0242] like Fig.11 As shown, when displaying the function block FB called by the call command 460, the called function block FB (function block FB3) can also be kept as a black box. Thus, the following advantages of the function block FB can be effectively utilized, that is, the structure of the function block FB including the call command 460 can be made clear, and program design can be promoted without paying attention to the details of the program.
[0243] Furthermore, when the function block as the calling source is displayed with the function block as the calling target incorporated therein, the designated actual variable 480 is reflected in the dummy variable 442 of the function block as the calling target. Specifically, the function block as the calling target is displayed in a form in which the terminal 482 corresponding to the actual variable 480 of the function block as the calling source and the terminal 444 corresponding to the dummy variable 442 of the function block as the calling target are combined.
[0244] Fig.11 In the example shown, as shown in screen SC4, the terminal 482 corresponding to the actual variable 480 "x1" of the function block FB1 and the terminal 444 corresponding to the dummy variable 442 "input 1" of the function block FB3 are displayed in a form of being combined. In addition, the terminal 482 corresponding to the actual variable 480 "y2" of the function block FB2 and the terminal 444 corresponding to the dummy variable 442 "input 1" of the function block FB3 are displayed in a form of being combined.
[0245] By displaying the terminal corresponding to the specified actual variable and the terminal 444 corresponding to the dummy variable 442 in a combined form as a reflection of the actual variable specified in the calling command, it is easy to visually understand the actual variable input to the called function block FB3, making the analysis of the function block easy.
[0246] <I. Other display examples>
[0247] Reference Figure 12 to Figure 16 To illustrate how to display the programs that contain a specific command. Figure 12 to Figure 16 The display method of each program shown can be the same as Figures 9 to 11 The respective reflections shown show any combination.
[0248] (i1. Display example of a user program including recursive calls)
[0249] When displaying the user program 400 including recursive calls, the support device 200 may display the contents of the recursively called subroutine up to a predetermined number of times. That is, when the support device 200 recursively calls a subroutine, the contents of the subroutine may not be displayed more than a predetermined number of times.
[0250] Fig.12 FIG. 1 is a diagram showing an example of a user program including a recursive call. Fig.12 , the display of dummy variable 442 and actual variable 480 is omitted. Fig.12 The program 410-5 shown includes a call instruction 460-6 for calling the program 410-6. The program 410-6 includes a call instruction 460-7 for calling the program 410-7. The program 410-7 includes a call instruction 460-5 for calling the program 410-5. The call instruction 460-5 is a recursive call.
[0251] That is, program 410-5 is a program including a command for recursively calling program 410-6 and program 410-7. At this time, if it is desired to display the content of subroutine 440 called by calling command 460, if the restriction of "displaying the content of the recursively called subroutine until a predetermined number of times" is not set, then Fig.12 As shown in the display example of screen SC6 in FIG. 4 , the contents of the recursively called subroutines (program 410-6, program 410-7) will be repeatedly displayed. As a result, it will be difficult for the user to understand the contents of program 410-5.
[0252] By setting the restriction of "displaying the contents of the recursively called subroutine until the specified number of times", Fig.12 As shown in the display example of screen SC6 in FIG. 4 , the contents of the subroutine are prevented from being repeatedly displayed, and as a result, the contents of program 410-5 can be displayed in an easy-to-understand form. Fig.12 In the example shown, once is set as the prescribed number of times. The number of times the content of the subroutine is displayed can be predetermined and is not limited to once. For example, it can be twice or more. In addition, in order to display the content of the subroutine and easily understand the content of the program, the number of times the content of the subroutine is displayed is preferably once.
[0253] Moreover, refer to Fig.12 In the screen SC6 in FIG. 1 , the support device 200 may also display a text image 450 indicating that the command is recursively called immediately after the call command 460-5. By displaying the text image 450 indicating that the command is recursively called immediately after the call command 460-5, it is easy to understand that the call command 460-5 is a recursively called command. In addition, the image indicating that the command is recursively called is not limited to Fig.12Text image 450 is illustrated.
[0254] (i2. Example of not displaying the contents of a specified subroutine)
[0255] The support device 200 may not display the content of the pre-specified program. The support device 200 may not display the content of the program registered as the display omission list 470 .
[0256] The display omission list 470 is stored in, for example, the storage unit 201 of the support device 200. The display omission list 470 may be created by the user or may be created in advance by a vendor providing a support program. Furthermore, the user may further add a program to the display omission list 470 created in advance by the vendor.
[0257] Fig.13 4 is a diagram showing a display example of a user program including a program registered in the display omission list 470. Fig.13 , the display of dummy variable 442 and actual variable 480 is omitted.
[0258] Fig.13 The program 410-8 shown includes a call instruction 460-9 for calling the program 410-9. The program 410-9 includes a call instruction 460-10 for calling the program 410-10. In the display omission list 470, the program 410-10 is registered.
[0259] like Fig.13 As shown in the display example of screen SC8, the support device 200 displays the program 410-8 in a form reflecting the content of the subroutine 440 called by the included call command 460, and omits the content of the program 410-10 registered in the display omission list 470 without displaying it.
[0260] If the contents of all subroutines 440 called by the included call command 460 are displayed for program 410-8, the number of columns will become huge, which may cause the structure to become complicated and make analysis difficult.
[0261] like Fig.13 As shown, by omitting the contents of the programs registered in the display omission list 470 , only the contents of the necessary programs can be displayed, making analysis easier.
[0262] (i3. Display example of branch program)
[0263] The support device 200 may have a function of switching from a serial display of each different process to a parallel display in response to a user operation when displaying the contents of a branch program that executes different processes according to a satisfied condition.
[0264] Fig.14 This is a diagram showing a display example of a branch program. Fig.14 Screen SC9 in FIG. 1 is a display example showing various processing steps in series. Fig.14 The screen SC10 in FIG. 1 is a display example in which different processes are displayed in parallel. Fig.14 , the display of dummy variable 442 and actual variable 480 is omitted.
[0265] Fig.14 The program 410-11 shown includes a process of step 1, a process of step 2, and a process of step 3. Different execution conditions are respectively specified for each of the processes of step 1 to step 3. Specifically, step 1 is a process executed when condition 1 is satisfied. Step 2 is a process executed when condition 1 is not satisfied but condition 2 is satisfied. Step 3 is a process executed when both condition 1 and condition 2 are not satisfied.
[0266] When receiving a predetermined operation by the user while the screen SC9 is displayed, the support device 200 displays the screen SC10. The screen SC10 may be displayed superimposed on the screen SC9, or the screen SC9 may be switched to the screen SC10.
[0267] Referring to screen SC9, program 410-11 displays a plurality of processing steps 1 to 3 having mutually different establishment conditions in series. Referring to screen SC10, program 410-11 displays a plurality of processing steps 1 to 3 having mutually different establishment conditions in parallel.
[0268] In this way, when displaying a program with a logical structure in which the processing branches due to different conditions for being satisfied, if each of the processing steps 1 to 3 is displayed side by side, it is easy to understand how the processing branches, thereby facilitating analysis of the program.
[0269] Fig.14 In the example shown, a program including an if statement is shown, but as long as it is a program that generates branches, it is not limited to a program including an if statement. For example, a program including "switch-case" and a program including "try-catch" can be listed as a program that generates branches.
[0270] (i4. Display example of a program that replaces actual variables with addresses)
[0271] The support device 200 may replace the variables designated as the actual variables 480 with the port numbers (addresses) of the functional units (eg, I / O units 14 and 16 ) corresponding to the variables and display them based on the global variable table 150 .
[0272] Fig.15The screen SC11 shows a display example of a program in which actual variables are replaced with addresses. The screen SC12 shows a program in which actual variables are replaced with addresses.
[0273] Fig.15 The program 410-12 shown includes a source code "y=x1;" defined with an actual variable 480 and a call command 460-13 for calling the program 410-13. The call command 460-13 specifies "x1" and "x2" as actual variables to call the program 410-13.
[0274] Program 410 - 13 is defined using “a” and “b” as dummy variables 442 , and includes source code “a&b”.
[0275] In the global variable table 150, the address of bit 0 of device 1 is associated with the variable "x1", the address of bit 1 of device 1 is associated with the variable "x2", and the address of bit 1 of device 2 is associated with the variable "y".
[0276] When the content of the called program 410 - 13 is displayed in response to the call instruction 460 - 13 included in the program 410 - 12 , it may be replaced with the designated actual variable 480 and further replaced with the address corresponding to the actual variable 480 and displayed.
[0277] Specifically, refer to Fig.15 , "a&b" in program 410-13 is displayed by replacing "x1&x2" with "device 1: bit 0&device 1: bit 1". Furthermore, "y=x1;" in program 410-12 is replaced with "device 2: bit 1=device 0: bit 0;".
[0278] By replacing the actual variable 480 with the address of the actual device (I / O unit 14, 16, etc.) and displaying it in this way, it is possible to easily understand which address each actual variable 480 is associated with. For example, in PLC100, it is also possible to use a program that directly specifies the address as the actual variable 480, but if the address is specified, the reusability of the program created by specifying the address will be lost, so variable programming is often used. However, when analyzing the program, if it is determined which input / output value each variable specifically corresponds to which address, the analysis will become easier. Fig.15 As shown, by replacing the actual variable 480 with an address and displaying it, it is possible to understand at a glance which device's input / output value is used by the program to be analyzed, thereby facilitating the analysis of the program.
[0279] (i5. Display example of a program that exchanges data with other programs)
[0280] The PLC 100 can exchange data with other devices such as other PLCs 100 and HMI 300 via the external network controller 126. Furthermore, the PLC 100 can also send and receive data between programs associated with different tasks.
[0281] That is, the user can create a program for transmitting and receiving data between the programs to be executed. In addition, the programs to be executed separately may be programs executed by one PLC 100 or programs executed by different devices.
[0282] The support device 200 may display programs configured to transmit and receive data between programs being executed separately, in association with programs that are targets of data transmission and reception.
[0283] Fig.16 This is a diagram showing a display example of a program configured to send and receive data between the programs being executed. For example, program 410-14 and program 410-15 are executed separately from each other. In addition, program 410-14 has a send command 462 for sending data to program 410-15. Program 410-15 has a receive command 464 for receiving data from program 410-14.
[0284] The support device 200 stores a correspondence list 490 in which the transmission command 462 and the reception command 464 are associated with each other in the storage unit 201 .
[0285] When displaying the program 410 - 14 , the support device 200 may display the program 410 - 14 and the program 410 - 15 correspondingly based on the corresponding list 490 .
[0286] Specifically, as shown in screen SC13, a receive command 464 is displayed in association with the send command 462, and a variable received according to the receive command 464 is reflected in the receive command 464. At this time, the content of the program 410-15 including the receive command 464 is displayed in a column different from the column in which the content of the program 410-14 including the send command 462 is displayed.
[0287] In this way, for programs configured to send and receive data between separately executed programs, the program containing commands for sending data and the program containing commands for receiving data are displayed in association with each other. Thus, even if they are different programs, their respective correspondences can be represented, making it easier to analyze the programs.
[0288] <Display by J.HMI300>
[0289] In the above-described embodiment, it is shown that Figures 9 to 16The program display shown is an example of display on the display 214 of the support device 200. In addition, the CPU 302 of the HMI 300 executes the display program 375 while referring to the user program 500 and the call command list 273, thereby executing Figures 9 to 12 as well as Fig.14 Display shown.
[0290] In addition, when HMI 300 can refer to global variable table 150, it is also possible to perform Fig.15 Furthermore, when HMI 300 can refer to display omission list 470, it is also possible to display on display 314 Fig.13 Furthermore, when HMI 300 can refer to corresponding list 490, it can also be displayed on display 314. Fig.16 Display shown.
[0291] In the present embodiment, HMI 300 has call command list 273, so when displaying the content of subroutine 440, it is easy to identify the subroutine 440 to be called. As a result, it is not necessary to perform a process of searching the storage location of subroutine 440 called by call command 460 after interpreting the content of call command 460, so the process of displaying the content of subroutine 440 can be simplified. Moreover, even if actual variables are reflected in dummy variables, it is sufficient to follow call command list 273, so it is not necessary to perform a process of identifying actual variables corresponding to dummy variables after interpreting the content of call command 460, so the process can be simplified.
[0292] Furthermore, although an example is shown in which the HMI 300 displays the program using the user program 500 and the call command list 273 , the program may be displayed using the user program 400 similarly to the support device 200 .
[0293] §3. Notes
[0294] As described above, the described embodiments include the disclosure described below.
[0295] <Structure 1>
[0296] An information processing device 200X, 200, 300 supports the development of a user program 400 executed by a control device for controlling a control object, the information processing device comprising:
[0297] Accepting components 221X, 221, 321, accepting user operations;
[0298] The holding components 201X, 201, 301 hold the user program created or updated by the user; and
[0299] Display components 226X, 226, 326 display the user program held by the holding component,
[0300] The user program includes:
[0301] A first program 440, defined using dummy variables 442; and
[0302] A second program 460 having a call command 460 for specifying actual variables 480 to call the first program,
[0303] When the display unit displays the content of the first program in association with the call command in the second program according to a user operation, the actual variables specified in the call command are reflected in the dummy variables in the first program to display SC2, SC2', SC4.
[0304] <Structure 2>
[0305] The information processing device according to Structure 1, wherein
[0306] The user program is defined using a procedural programming language comprising one or more commands,
[0307] The display means replaces dummy variables in the first program with actual variables specified in the call command as a reflection SC2, SC2' of the actual variables specified in the call command.
[0308] <Structure 3>
[0309] The information processing device according to Structure 2, wherein
[0310] The display component displays the content of the first program immediately after the calling command in the second program as a part SC2 of the second program.
[0311] <Structure 4>
[0312] The information processing device according to Structure 2, wherein
[0313] The display means displays the content of the first program in a column SC2' different from the display column of the second program, side by side with the calling command in the second program.
[0314] <Structure 5>
[0315] The information processing device according to any one of Structures 1 to 4, wherein
[0316] The first program has a call command 460-5 for recursively calling the first program,
[0317] When the display means displays the content of the first program in association with the call command in the second program, the display means displays the content of the first program called by the call command in the first program up to a predetermined number of times SC6.
[0318] <Structure 6>
[0319] The information processing device according to any one of Structures 1 to 5, wherein
[0320] The first program has one or more calling commands,
[0321] For a predetermined specific command 410 - 10 among the one or more calling commands, the display component does not display the content of the program called by the calling command as an object SC8 associated with the calling command.
[0322] <Structure 7>
[0323] The information processing device according to Structure 1, wherein
[0324] The first program and the second program are defined using a block expression, the block expression including at least one input variable and at least one output variable representing a function block or function,
[0325] The display component incorporates the first block expression FB3 representing the first program into the second block expression FB1, FB2 representing the calling command contained in the second program, and displays it in the form of combining the terminal 482 corresponding to the actual variable of the second block expression and the terminal 444 corresponding to the dummy variable of the first block expression as a reflection of the actual variable specified in the calling command 460-a.
[0326] <Structure 8>
[0327] The information processing device according to any one of Structures 1 to 7, wherein
[0328] The user program includes a branch program (410-11) for executing different processing according to the establishment conditions.
[0329] The display means displays the contents SC10 of the different processes in parallel with each other for the branch programs according to a user operation.
[0330] <Structure 9>
[0331] The information processing device according to any one of Structures 1 to 8, wherein
[0332] The control device comprises one or more input ports,
[0333] The display unit SC12 replaces the actual variables with the addresses representing the one or more input ports for the user program and displays the actual variables based on the variable map 150 that associates the actual variables with the addresses representing the one or more input ports, respectively.
[0334] <Structure 10>
[0335] The information processing device according to any one of Structures 1 to 9, wherein
[0336] The user program includes a third program 410-15 for performing data exchange with other programs 410-14,
[0337] The display means displays the third program in association with the other programs SC13.
[0338] <Structure 11>
[0339] A support program 275, 375 supports the development of a user program 400 executed by a control device for controlling a control object, wherein
[0340] The user program includes:
[0341] A first program 440, defined using dummy variables 442; and
[0342] A second program 420 having a call command 460 for specifying actual variables 480 to call the first program,
[0343] The support program causes the computer to execute:
[0344] Maintaining steps 201 and 301, maintaining the user program created or updated by the user;
[0345] Accepting steps 221 and 321, accepting user operations; and
[0346] Display steps 226, 326, SC2, SC2', SC4, according to the accepted operation, for the maintained user program, the content of the first program is associated with the calling command in the second program and displayed, and the actual variables specified in the calling command are reflected to the dummy variables in the first program and displayed.
[0347] <Structure 12>
[0348] A support system 1 includes: an information processing device 200 that supports development of a user program executed by a control device that controls a control object; and a display device 300, wherein the support system includes:
[0349] Accepting components 221 and 321, accepting user operations;
[0350] The holding components 201 and 301 hold the user program created or updated by the user; and
[0351] Display components 226, 326 display the user program held by the holding component,
[0352] The user program includes:
[0353] A first program 440, defined using dummy variables 442; and
[0354] A second program 420 having a call command 460 for specifying actual variables 480 to call the first program,
[0355] When the display unit displays the content of the first program in association with the call command in the second program according to a user operation, the actual variables specified in the call command are reflected in the dummy variables in the first program to display SC2, SC2', SC4.
[0356] It should be understood that the embodiments disclosed this time are merely illustrative in all aspects and are not restrictive. The scope of the present invention is indicated by the claims rather than the description, and is intended to include all changes within the meaning and scope equivalent to the claims. Moreover, the inventions described in the embodiments and various modifications may be implemented individually or in combination as long as possible.
Claims
1. An information processing device that supports development of a user program executed by a control device that controls a control object, the information processing device comprising: Accept components and accept user operations; A holding component that holds a user program created or updated by a user; as well as A display component displays the user program held by the holding component on a display screen, The user program includes: The first procedure is defined using dummy variables; as well as A second program having a call command for specifying actual variables to call the first program, When the display component associates the content of the first program with the calling command in the second program and displays it on the display screen based on a user operation corresponding to the calling command, the display component reflects the actual variables specified in the calling command to the dummy variables in the first program and displays the content associated with the calling command in the second program on the display screen.
2. The information processing device according to claim 1, wherein The user program is defined using a procedural programming language comprising one or more commands, The display component replaces dummy variables in the first program with actual variables specified in the call command as a reflection of the actual variables specified in the call command.
3. The information processing device according to claim 2, wherein The display component displays the content of the first program immediately after the calling command in the second program as a part of the second program.
4. The information processing device according to claim 2, wherein The display means displays the content of the first program in a column different from the display column of the second program, in parallel with the calling command in the second program.
5. The information processing device according to any one of claims 1 to 4, wherein The first program has a call command for recursively calling the first program, When displaying the content of the first program in association with the call command in the second program, the display means displays the content of the first program called by the call command in the first program up to a predetermined number of times.
6. The information processing device according to any one of claims 1 to 4, wherein The first program has one or more calling commands, For a predetermined specific command among the one or more calling commands, the display component does not display the content of the program called by the calling command as an object associated with the calling command.
7. The information processing device according to claim 1, wherein The first program and the second program are defined using a block expression, the block expression including at least one input variable and at least one output variable representing a function block or function, The display component incorporates the first block expression representing the first program into the second block expression representing the calling command contained in the second program, and displays it in a form in which the terminals corresponding to the actual variables of the second block expression and the terminals corresponding to the dummy variables of the first block expression are combined as a reflection of the actual variables specified in the calling command.
8. The information processing device according to any one of claims 1 to 4, wherein The user program includes a branch program for executing different processing according to the establishment conditions. The display means displays the contents of the different processes in parallel with each other for the branch programs according to a user operation.
9. The information processing device according to any one of claims 1 to 4, wherein The control device comprises one or more input ports, The display unit displays the user program by replacing the actual variables with the addresses respectively indicating the one or more input ports based on a variable map that associates the actual variables with the addresses respectively indicating the one or more input ports.
10. The information processing device according to any one of claims 1 to 4, wherein The user program includes a third program for performing data exchange with other programs, The display unit displays the third program in association with the other programs.
11. A storage medium storing a support program for supporting the development of a user program executed by a control device for controlling a control object, wherein The user program includes: The first procedure is defined using dummy variables; and A second program having a call command for specifying actual variables to call the first program, The support program causes the computer to execute: A maintenance step for maintaining a user program created or updated by a user; Acceptance steps, accepting user actions; and A display step, according to the user operation corresponding to the calling command, for the maintained user program, associates the content of the first program with the calling command in the second program and displays it on a display screen, and reflects the actual variables specified in the calling command to the dummy variables in the first program and displays the content associated with the calling command in the second program on the display screen.
12. A support system comprising: an information processing device that supports development of a user program executed by a control device that controls a control object; and a display device, the support system comprising: Accept components and accept user operations; a holding component that holds a user program created or updated by a user; and A display unit displays the user program held by the holding unit on a display screen of the display device, The user program includes: The first procedure is defined using dummy variables; and A second program having a call command for specifying actual variables to call the first program, When the display component associates the content of the first program with the calling command in the second program and displays it on the display screen based on a user operation corresponding to the calling command, the display component reflects the actual variables specified in the calling command to the dummy variables in the first program and displays the content associated with the calling command in the second program on the display screen.
Citation Information
Patent Citations
Peripheral device for programmable controller
JP2014071862A
Program converting device, secure processing device, computer program, and recording medium
CN101147155A
Application development support device, program, and recording medium
CN101932998A
Controller, information processing apparatus, and program
CN103995500A
Development aid device
CN1677290A
