CONTROL SYSTEM, SYSTEM PROGRAM, AND DEBUG METHOD

The control system efficiently debugs user programs by changing input/output variables based on past execution states, addressing inefficiencies in existing debugging methods for PLCs.

JP7589645B2Active Publication Date: 2024-11-26OMRON CORP
4 Cites 0 Cited by

Patent Information

Application Number
JP2021089544
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-05-27
Publication Date
2024-11-26
Estimated Expiration
2041-05-27

AI Technical Summary

Technical Problem

Existing methods for debugging user programs including function blocks in PLCs are inefficient.

Method used

A control system and method that includes an arithmetic processing unit, data holding unit, and an address identification unit to change the value of input/output variables by referring to the past execution state of function blocks, allowing efficient debugging of user programs.

Benefits of technology

Enables efficient debugging of user programs by changing input/output variables without storing actual values, thereby improving the debugging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007589645000001
    Figure 0007589645000001
  • Figure 0007589645000002
    Figure 0007589645000002
  • Figure 0007589645000003
    Figure 0007589645000003
Patent Text Reader

Abstract

To provide means for more efficiently debugging a user program including a function block.SOLUTION: A control system comprises: an arithmetic processing unit that executes a user program including a function block; a data holding unit that holds data which is referred to by the user program; an instruction issuing unit that issues an instruction for changing a value of data which is referred to by the user program executed by the arithmetic processing unit according to a user operation; an address identifying unit that identifies an address of the data holding unit associated with an input / output variable by referring to a past execution state of the function block when an instruction is given to change a value of the input / output variable associated with the function block; and a changing unit that changes a value held at the identified address in the data holding unit to an indicated value.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a control system, a system program, and a debugging method. [Background technology]

[0002] In the field of FA (Factory Automation), PLCs (Programmable Logic Controllers) are widely used as control devices for controlling various types of equipment and machines.

[0003] Usually, user programs (programs that describe control logic) executed by PLCs are developed on a development support device. The development support device then transmits the user programs to the PLC. Furthermore, the development support device can be used to debug the user programs executed by the PLC.

[0004] Furthermore, user programs executed by PLCs are generally written in one of the languages ​​specified in IEC61131-3 established by the International Electrotechnical Commission (IEC). IEC61131-3 specifies main programs, function blocks, and functions as POUs (program organization units). IEC61131-3 also specifies variables that can be used in POUs.

[0005] Regarding function blocks, Japanese Patent Application Laid-Open Publication No. 2009-104227 (Patent Document 1) discloses a method for extracting only the program parts at the top of the calling hierarchy, or only the intermediate function blocks, and modularizing them in any unit, thereby improving the convenience of reuse. [Prior art documents] [Patent documents]

[0006] [Patent Document 1] JP 2009-104227 A Summary of the Invention [Problem to be solved by the invention]

[0007] There is a need for a method for more efficiently debugging a user program that includes function blocks such as those described above.

[0008] An object of the present invention is to provide a means for more efficiently debugging a user program including function blocks. [Means for solving the problem]

[0009] A control system according to one embodiment includes a computational processing unit that executes a user program including a function block, a data retention unit that retains data referenced by the user program, an instruction issuing unit that issues an instruction to change the value of the data referenced by the user program executed by the computational processing unit in response to a user operation, an address identification unit that, when instructed to change the value of an input / output variable associated with a function block, identifies the address of the data retention unit associated with the input / output variable by referring to a past execution state of the function block, and a modification unit that changes the value retained at the identified address of the data retention unit to the instructed value.

[0010] According to this configuration, by referring to the past execution state of the function block, the address of the data storage unit corresponding to the input / output variable is identified, so that the value indicated by the input / output variable can be changed even if the actual value is not stored in the input / output variable. By providing a means for changing the input / output variable to an arbitrary value, user programs including function blocks can be debugged more efficiently.

[0011] The address specification unit may specify the address by collecting information on the previous execution of the function block. With this configuration, the address actually used in the execution of the function block can be specified.

[0012] The address specification unit may specify the address when the execution of the user program is completed. According to this configuration, since there is a possibility that the input / output variables are changed while the user program is being executed, the input / output variables can be reliably changed by maintaining the user program in the state where the execution of the user program is completed.

[0013] The control system may include a programmable logic controller and a development support device, and the address specification unit may be implemented in the programmable logic controller. With this configuration, the execution state of the user program can be easily acquired, and therefore the address of the data storage unit associated with the input / output variable can be easily specified.

[0014] The control system may include a programmable logic controller and a development support device, and the address specification unit may be implemented in the development support device. With this configuration, the development support device specifies the address of the data storage unit associated with the input / output variable, thereby suppressing an increase in the load on the programmable logic controller.

[0015] According to another embodiment, there is provided a system program for providing an execution environment for executing a user program including a function block. The system program causes a computer to execute the steps of: receiving an instruction to change a value of data referenced by the user program; when an instruction to change the value of an input / output variable associated with a function block is received, identifying an address associated with the input / output variable by referring to a past execution state of the function block; and changing the value held at the identified address to the instructed value.

[0016] According to yet another embodiment, there is provided a debugging method for debugging a user program including a function block, the debugging method including the steps of: receiving an instruction to change a value of data referenced by the user program; when an instruction to change the value of an input / output variable associated with the function block is received, identifying an address associated with the input / output variable by referring to a past execution state of the function block; and changing the value held at the identified address to the instructed value. Effect of the Invention

[0017] According to the present invention, a user program including function blocks can be debugged more efficiently. [Brief description of the drawings]

[0018] [Figure 1] FIG. 2 is a schematic diagram showing main functions of the development support device according to the present embodiment; [Diagram 2] 1 is a schematic diagram illustrating an outline of a system configuration of a control system according to an embodiment of the present invention. [Diagram 3] 2 is a schematic diagram illustrating an example of a hardware configuration of a PLC that constitutes the control system according to the present embodiment. FIG. [Figure 4] 1 is a schematic diagram illustrating an example of a hardware configuration of a development support device that constitutes a control system according to an embodiment of the present invention. [Diagram 5] 1 is a diagram for explaining an example of online debugging provided by the development support device according to the present embodiment; [Figure 6] 1 is a diagram for explaining an example of debugging of a function block provided by the development support device according to the present embodiment; [Figure 7] 7 is a flowchart showing a processing procedure relating to the online debugging shown in FIG. 6. [Figure 8] 11 is a diagram for explaining another example of debugging of a function block provided by the development support device according to the present embodiment; FIG. [Figure 9]It is a flowchart showing a processing procedure related to online debugging shown in FIG. 8. [Figure 10] It is a schematic diagram showing an example of a user interface screen related to online debugging provided by the development support device according to the present embodiment.

Embodiments for Carrying Out the Invention

[0019] Embodiments of the present technology will be described in detail with reference to the drawings. Note that the same or corresponding parts in the drawings are denoted by the same reference numerals and their descriptions will not be repeated.

[0020] <A. Application Example> First, an example of a scene to which the present invention is applied will be described. FIG. 1 is a schematic diagram showing an overview of a control system 1 according to the present embodiment. Referring to FIG. 1, the control system 1 has an arithmetic processing unit 50 that executes a user program 114 including a function block 150. The arithmetic processing unit 50 may typically be realized by a processor 102 of a PLC. The control system 1 has a data holding unit 140 that holds data referred to by the user program 114 in association with the arithmetic processing unit 50. The data holding unit 140 may typically be realized by a main memory 104 of a PLC.

[0021] The instruction issuing unit 260 issues an instruction for changing the value of data referred to by the user program 114 executed by the arithmetic processing unit 50 in response to a user operation. Typically, the instruction issuing unit 260 may be mounted on a development support device connected to a PLC.

[0022] When an instruction to change the value of the input / output variable 156 associated with the function block 150 is given, the address specifying module 170 specifies the address of the data holding unit 140 associated with the input / output variable 156 by referring to the past execution state of the function block 150. The change module 180 changes the value held at the specified address of the data holding unit 140 to the instructed value.

[0023] By adopting such a configuration, by arbitrarily changing the values of the input / output variables associated with the function block 150, the behavior of the function block 150 and the user program 114 including the function block 150 can be made different, and necessary debugging can be easily performed.

[0024] <B. Control System Configuration> Next, the configuration of the control system 1 including the development support device according to the present embodiment will be described.

[0025] (b1: Overall Configuration) FIG. 2 is a schematic diagram outlining the system configuration of the control system 1 according to the present embodiment. Referring to FIG. 2, the control system 1 includes a PLC 100 and a development support device 200 connected to the PLC 100.

[0026] The PLC 100 executes a user program to collect data from devices connected to the field network 10, execute control calculations using the collected data, and output some or all of the execution results of the control calculations to devices connected to the field network 10, etc., and execute control calculations.

[0027] In the example shown in FIG. 2, the PLC 100 is connected to the remote I / O device 12, the robot controller 20, and the motor driver 30 via the field network 10.

[0028] For the field network 10, protocols for industrial networks such as EtherCAT (registered trademark) and EtherNet / IP can be used.

[0029] The remote I / O device 12 is connected to field devices 14 such as sensors and actuators, and transmits data measured by the sensors etc. to the PLC 100, and outputs data received from the PLC 100 via the actuators etc. The robot controller 20 controls the robot 22. The motor driver 30 controls the motor 32.

[0030] The PLC 100 may be connected to the HMI 300 and the server device 400 via a higher-level network 16. For the higher-level network 16, a protocol for industrial networks such as EtherNet / IP can be used.

[0031] (b2:PLC100) Fig. 3 is a schematic diagram showing an example of a hardware configuration of a PLC 100 constituting a control system 1 according to the present embodiment. Referring to Fig. 3, the PLC 100 includes a processor 102, a main memory 104, a storage 110, a memory card interface 120, a host network controller 106, a field network controller 108, a local bus controller 116, and a USB controller 124 providing a USB (Universal Serial Bus) interface. These components are connected via a processor bus 118.

[0032] The processor 102 corresponds to an arithmetic processing unit that executes a user program, and is composed of a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), etc. Specifically, the processor 102 reads out a system program 112 and a user program 114 stored in the storage 110, expands them in the main memory 104, and executes them to realize control calculations for a control target.

[0033] The main memory 104 corresponds to a data storage unit 140 referenced by the user program 114, and is configured with a volatile storage device such as a dynamic random access memory (DRAM) or a static random access memory (SRAM).

[0034] The storage 110 is composed of, for example, a non-volatile storage device such as an SSD (Solid State Drive) or an HDD (Hard Disk Drive), etc. The storage 110 stores a system program 112 for implementing basic functions, a user program 114 created according to a control target, and the like.

[0035] System programs 112 include instructions for providing an execution environment in which user programs 114 execute.

[0036] The user program 114 is a program in which instructions for implementing control calculations are written, and typically includes sequence instructions and motion instructions. The user program 114 may be written in any language defined in IEC 61131-3. However, the user program 114 may include a program written in a manufacturer-specific language other than the language defined in IEC 61131-3.

[0037] The memory card interface 120 accepts a memory card 122, which is an example of a removable storage medium. The memory card interface 120 is capable of reading and writing any data from and to the memory card 122.

[0038] The upper network controller 106 exchanges data with any information processing device (such as the HMI 300 and the server device 400 shown in FIG. 2) via the upper network 16.

[0039] The field network controller 108 exchanges data with each device via the field network 10 .

[0040] The local bus controller 116 exchanges data with any functional unit 130 included in the PLC 100 via the local bus 126. The functional unit 130 may be, for example, an analog I / O unit responsible for input and / or output of analog signals, a digital I / O unit responsible for input and / or output of digital signals, a counter unit that receives pulses from an encoder or the like, and the like.

[0041] The USB controller 124 exchanges data with any information processing device (such as the development support device 200) via a USB connection.

[0042] (b2: development support device 200) Fig. 4 is a schematic diagram showing an example of a hardware configuration of development support device 200 constituting control system 1 according to this embodiment. With reference to Fig. 4, development support device 200 includes a processor 202 such as a CPU or MPU, a main memory 204, a storage 210, a network controller 220, a USB controller 224, an input unit 226, and a display unit 228. These components are connected via a bus 208.

[0043] The processor 202 reads out various programs stored in the storage 210, expands them in the main memory 204, and executes them to realize the processes required by the development support device 200.

[0044] The storage 210 is configured with, for example, an HDD or SSD. The storage 210 typically stores an OS 212 and a development program 214. The development program 214 realizes processes such as creating and editing the user program 114, generating an executable user program 114 from the source code of the user program 114, and debugging as described below. Note that the storage 210 may store necessary programs other than the programs shown in FIG. 4.

[0045] The network controller 220 exchanges data with any information processing device via any network.

[0046] The USB controller 224 exchanges data with any information processing device via a USB connection.

[0047] The input unit 226 is configured with a mouse, a keyboard, a touch panel, etc., and receives instructions from a user. The display unit 228 is configured with a display, various indicators, etc., and outputs the processing results from the processor 202, etc.

[0048] The development support device 200 may have an optical drive 206. The optical drive 206 reads a computer-readable program from a recording medium 207 (for example, an optical recording medium such as a DVD (Digital Versatile Disc)) that non-transiently stores the program, and stores the program in the storage 210 or the like.

[0049] The various programs executed by the development support device 200 may be installed via a computer-readable recording medium 207, or may be installed by downloading from an arbitrary server on the network.

[0050] Although Figures 3 and 4 show configuration examples in which the required functions are provided by one or more processors executing programs, some or all of these provided functions may be implemented using dedicated hardware circuits (e.g., an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array)).

[0051] The development support device 200 may be realized as a single information processing device, or some or all of the required functions may be realized using multiple processor resources.

[0052] <C.オンラインデバッグ> Next, online debugging provided by the development support device 200 according to this embodiment will be described.

[0053] Fig. 5 is a diagram for explaining an example of online debugging provided by development support device 200 according to the present embodiment. With reference to Fig. 5, user program 114 is executed in PLC 100. User program 114 may include, as POUs, main program 1142, function block 1146, and function 1148.

[0054] The execution environment of the PLC 100 includes a data storage unit 140. The data storage unit 140 is typically provided by the main memory 104. The user program 114 references the data (values) stored in the data storage unit 140, executes written instructions, and stores in the data storage unit 140 data (values) calculated by executing the instructions.

[0055] In the source code of the user program 114, instructions are written using variables, and when an executable (or object) program is generated from the source code, addresses where each variable is stored are appropriately assigned.

[0056] Online debugging from the development support device 200 includes an operation of changing the description of any of the main program 1142, the function block 1146, and the function 1148. By changing the description, it is possible to change the behavior and execution results of the user program 114 during execution.

[0057] Furthermore, online debugging from the development support device 200 includes an operation for changing the value of data stored in the data storage unit 140. By changing the value of data stored in the data storage unit 140, it is possible to change the execution and execution results of the user program 114.

[0058] In this way, the user can debug the user program 114 executed by the PLC 100 by operating the development support device 200.

[0059] <Debugging for D. Function Blocks> Next, debugging for the function blocks included in the user program 114 will be described.

[0060] A function block is a block having input / output variables, and is executed by being read from the main program 1142 and instantiated. The input / output variables include input variables, output variables, input / output variables, external variables, global variables, and the like.

[0061] An input variable is a value passed to the function block. The function block cannot change the value of the input variable. An output variable is a value output from the function block. The function block can change the value of the output variable. An input / output variable is a variable that combines an input variable and an output variable. The function block can change the value of the input / output variable.

[0062] The development support device 200 according to the present embodiment can change the values of the input / output variables of the function blocks included in the user program 114 executed by the PLC 100 in response to a user operation. Unlike the input variable, the function block itself can change the value of the input / output variable. Therefore, the following processing is adopted so that the values of the input / output variables of the function block can be changed by a command from the development support device 200.

[0063] (d1: Pass-by-reference) First, a configuration example in the case of passing the input / output variable to the function block by reference will be described.

[0064] 6 is a diagram for explaining an example of debugging a function block provided by development support device 200 according to the present embodiment. Referring to Fig. 6, user program 114 is executed in PLC 100, whereby instantiated function block 150 is generated.

[0065] An input variable 152 and an input / output variable 156 are provided as input values ​​to the function block 150. In addition, the input / output variable 156 and the output variable 160 are output from the function block 150 as execution results.

[0066] The input variable 152 is passed by value, and the value (actual argument) set in the input variable 152 is copied to the input internal parameter 154 of the function block 150. The output variable 160 is also passed by value, and the value of the output internal parameter 162 calculated by execution of the function block 150 is copied to the output variable 160.

[0067] On the other hand, the input / output variable 156 is passed by reference, and the address (dummy argument) set in the input / output variable 156 is copied to the input / output internal parameter 158. A value in the data storage unit 140 specified by a specified address (address A in the example shown in FIG. 6) is referenced for the input / output internal parameter 158. Furthermore, when the value of the input / output internal parameter 158 is changed by execution of the function block 150, the changed value of the input / output internal parameter 158 is written to the specified address in the data storage unit 140 (address A in the example shown in FIG. 6).

[0068] That is, when a value is input by value, such as input variable 152, the value of input variable 152 can be changed directly from development support device 200. On the other hand, when a value is input by reference, such as input / output variable 156, it is necessary to change not the value (i.e., address) of input / output variable 156 but the value specified by the value (address) of input / output variable 156.

[0069] Therefore, the control system 1 of this embodiment has an address identification module 170 that obtains the value (address) set in the input / output variable 156 of the function block 150 by referring to the past execution state of the function block 150.

[0070] When an instruction to change the value of the input / output variable 156 associated with the function block 150 is received, the address specifying module 170 specifies the address of the data storage unit 140 associated with the input / output variable 156 by referring to the past execution state of the function block 150. More specifically, the address specifying module 170 includes an address specifying module 170 that specifies the address (dummy argument) set in the input / output variable 156 by collecting information on the previous execution of the function block 150.

[0071] Then, when an instruction to change the value of input / output variable 156 is received from development support device 200, PLC 100 changes the value in data storage unit 140 specified by the address identified by address identification module 170. In other words, PLC 100 changes the value stored in the identified address in data storage unit 140 to the specified value.

[0072] Fig. 7 is a flowchart showing a processing procedure relating to the online debugging shown in Fig. 6. Typically, each step shown in Fig. 7 is realized by the processor 102 of the PLC 100 executing the system program 112.

[0073] 7, PLC 100 receives an instruction to change the value of data referenced by user program 114. More specifically, PLC 100 determines whether or not an instruction to change the value of input / output variable 156 included in function block 150 has been received from development support device 200 (step S100). If an instruction to change the value of input / output variable 156 of function block 150 has not been received (NO in step S100), the process of step S100 is repeated.

[0074] When an instruction to change the value of the input / output variable 156 of the function block 150 is received (YES in step S100), the PLC 100 waits for the currently executing user program 114 to finish executing (step S102). Then, the PLC 100 refers to the execution state of the user program 114 that has finished executing, thereby identifying the address that has been set in the input / output variable 156 of the target function block 150 (step S104). That is, the PLC 100 identifies the address when the execution of the user program 114 has finished.

[0075] In this way, when the PLC 100 is instructed to change the value of the input / output variable 156 associated with a function block, the PLC 100 identifies the address associated with the input / output variable 156 by referring to the past execution state of the function block.

[0076] Furthermore, PLC 100 changes the value in data storage unit 140 specified by the identified address to the specified value (step S106). In this way, PLC 100 changes the value stored in the identified address to the specified value. Then, when the next execution cycle arrives, user program 114 is executed again.

[0077] Through the above-described processing procedure, the execution of the process for debugging the user program 114 including the function block 150 is completed.

[0078] In this way, when writing an arbitrary value to the input / output variable 156 of the function block 150, the control system 1 according to the present embodiment identifies the address (dummy argument) specified when the function block 150 was last executed, and writes the arbitrary value to the area corresponding to the identified address. This makes it possible to arbitrarily change the value of the input / output variable of the function block implemented in the pass-by-reference format.

[0079] In the above description, the address specifying module 170 is implemented in the PLC 100. However, the development support device 200 may have a function equivalent to the address specifying module 170. That is, the address specifying module 170 may be implemented in the development support device 200. In this case, the development support device 200 collects information from the PLC 100 about the previous execution of the function block 150, thereby specifying the address (dummy argument) set in the input / output variable 156.

[0080] Furthermore, the execution subject of the change to the value in the data storage unit 140 specified by the identified address may be either the PLC 100 or the development support device 200 .

[0081] (d2: pass by value) First, a configuration example in which input / output variables are passed to a function block by value will be described.

[0082] 8 is a diagram for explaining another example of debugging of a function block provided by development support device 200 according to the present embodiment. Referring to Fig. 8, user program 114 is executed in PLC 100, whereby instantiated function block 150 is generated.

[0083] An input variable 152 and an input / output variable 156 are provided as input values ​​to the function block 150. In addition, the input / output variable 156 and the output variable 160 are output from the function block 150 as execution results.

[0084] The input variable 152 is passed by value, and the value (actual argument) set in the input variable 152 is copied to the input internal parameter 154 of the function block 150. The output variable 160 is also passed by value, and the value of the output internal parameter 162 calculated by execution of the function block 150 is copied to the output variable 160.

[0085] The input / output variable 156 is also passed by reference. The value of the input / output variable 156 is changed from outside the function block 150, and is also changed by the function block 150 itself. Therefore, the function block 150 has an input / output internal parameter 158A for receiving the input / output variable 156 as an input variable, and an input / output internal parameter 158B for outputting the input / output variable 156 as an output variable.

[0086] The value (actual value) set in the input / output variable 156 is copied to the input / output internal parameter 158A of the function block 150. The function block 150 executes an operation by referring to the value of the input / output internal parameter 158A, and reflects the execution result in the input / output internal parameter 158B. Furthermore, the value of the input / output internal parameter 158B is copied to the input / output variable 156.

[0087] Since the function block 150 changes the value of the input / output variable 156, there may be an environment in which the value of the input / output variable 156 is not set as a change target. In such a case, the value of the input / output internal parameter 158A of the function block 150 is changed from the development support device 200. However, every time the function block 150 is executed, the value set in the input / output variable 156 is copied to the input / output internal parameter 158A. Therefore, the input / output internal parameter 158A is not actually changed.

[0088] Therefore, the control system 1 according to this embodiment executes a process of changing the value of the input / output variable 156 passed to the function block 150 in response to an instruction to change the value of the input / output internal parameter 158A.

[0089] More specifically, when a user gives an instruction to change the value of the input / output internal parameter 158A (step S2), the control system 1 identifies the corresponding input / output variable 156 by referring to the call tree for calling the function block 150 described in the main program 1142 (step S4).Then, the control system 1 changes the value of the identified input / output variable 156 to the instructed value (step S6).

[0090] In this way, the control system 1 redirects the process of writing a value to the input / output internal parameter 158A of the function block 150 to the input / output internal parameter 158A of the function block 150.

[0091] The process of step S4 may be executed by either the PLC 100 or the development support device 200.

[0092] Fig. 9 is a flowchart showing a processing procedure relating to the online debugging shown in Fig. 8. Each step shown in Fig. 9 is typically realized by the processor 102 of the PLC 100 executing the system program 112.

[0093] 9, PLC 100 determines whether or not an instruction to change the value of input / output internal parameter 158A of function block 150 has been received from development support device 200 (step S200). If an instruction to change the value of input / output internal parameter 158A of function block 150 has not been received (NO in step S200), the process of step S200 is repeated.

[0094] When an instruction to change the value of the input / output internal parameter 158A of the function block 150 is received (YES in step S200), the PLC 100 waits for the completion of execution of the currently executing user program 114 (step S202).

[0095] The PLC 100 identifies the input / output variable 156 corresponding to the target input / output internal parameter 158A by referring to the call tree for calling the function block 150 described in the main program 1142 (step S204). Furthermore, the PLC 100 changes the value of the identified input / output variable 156 to the specified value (step S206). Then, when the next execution cycle arrives, the user program 114 is executed again.

[0096] In this way, when writing an arbitrary value to the input / output internal parameter 158A of the function block 150, the control system 1 according to the present embodiment refers to the call tree for calling the function block 150, identifies the input / output variable 156 corresponding to the target input / output internal parameter 158A, and writes the arbitrary value to the identified input / output variable 156. This makes it possible to arbitrarily change the value of the input / output variable of the function block implemented in the pass-by-value format.

[0097] As described above, the process of identifying the input / output variable 156 corresponding to the input / output internal parameter 158A may be implemented in either the PLC 100 or the development support device 200.

[0098] Furthermore, the execution subject of the change to the value in the data storage unit 140 specified by the identified address may be either the PLC 100 or the development support device 200 .

[0099] <E.ユーザインターフェイス> Next, an example of a user interface screen related to online debugging provided by the development support device 200 will be described.

[0100] FIG. 10 is a schematic diagram showing an example of a user interface screen related to online debugging provided by the development support device 200 according to the present embodiment. Referring to FIG. 10, a user interface screen 250 provided by the development support device 200 includes a target variable column 252 indicating a variable to be changed, a current value column 254 indicating the current value of the target variable, and a change instruction value column 256 indicating a value for which the target variable is desired to be changed.

[0101] The user selects or registers an arbitrary variable in the target variable column 252, refers to the current value displayed in the current value column 254, and enters a new desired value in the change instruction value column 256. Then, an instruction to change the value of the variable selected in the target variable column 252 to the value entered in the change instruction value column 256 is given from the development support device 200 to the PLC 100.

[0102] As described above, the development support device 200 has an instruction issuing unit that issues an instruction for changing the value of data referred to by the user program 114 executed by the PLC 100 in response to a user operation.

[0103] The user can perform online debugging on the user program 114 executed by the PLC 100 using the user interface screen as shown in FIG. 10.

[0104] <F. Supplementary Note> The present embodiment as described above includes the following technical ideas. [Configuration 1] An arithmetic processing unit (50:102) that executes a user program (114) including a function block (150), A data holding unit (140:104) that holds data referred to by the user program, An instruction issuing unit (260:200) that issues an instruction for changing the value of data referred to by the user program executed by the arithmetic processing unit in response to a user operation, an address specification unit (170) that specifies an address of the data storage unit associated with the input / output variable by referring to a past execution state of the function block when a change in the value of the input / output variable associated with the function block is instructed; and a change unit (180) that changes the value stored in the specified address of the data storage unit to a specified value. [Configuration 2] The control system according to configuration 1, wherein the address identification unit identifies the address by collecting information from the previous execution of the function block. [Configuration 3] 3. The control system according to claim 1, wherein the address specification unit specifies the address when the execution of the user program has been completed. [Configuration 4] The control system includes a programmable logic controller (100) and a development support device (200); 4. The control system according to any one of configurations 1 to 3, wherein the address specification unit is implemented in the programmable logic controller. [Configuration 5] The control system includes a programmable logic controller (100) and a development support device (200); 4. The control system according to any one of configurations 1 to 3, wherein the address specification unit is implemented in the development support device. [Configuration 6] A system program (112) for providing an execution environment for executing a user program (114) including a function block (150), the system program (112) being provided to a computer (100): A step (S100) of receiving an instruction to change a value of data referenced by the user program; When a change in value of an input / output variable associated with the function block is instructed, a step of identifying an address associated with the input / output variable by referring to a past execution state of the function block (S102, S104); A system program that causes the value held at the specified address to be changed to the specified value (step S106). [Configuration 7] A debugging method for debugging a user program (114) including a function block (150), comprising: Receiving an instruction for changing the value of data referred to by the user program (step S100); When an instruction to change the value of an input / output variable associated with the function block is given, identifying the address associated with the input / output variable by referring to the past execution state of the function block (steps S102, S104); Changing the value held at the identified address to the specified value (step S106).

[0105] <G. Advantages> The control system according to the present embodiment identifies the address of the data holding unit associated with the input / output variable by referring to the past execution state of the function block. Therefore, even if an actual value is not stored in the input / output variable, the value indicated by the input / output variable can be changed. By providing means for changing the input / output variable to an arbitrary value, the user program including the function block can be debugged more efficiently.

[0106] The embodiments disclosed this time should be considered as illustrative in all respects and not restrictive. The scope of the present invention is shown not by the above description but by the claims, and it is intended that all modifications within the meaning and scope equivalent to the claims are included.

Description of Reference Numerals

[0107] 1 control system, 10 field network, 12 device, 14 field device, 16 upper network, 20 robot controller, 22 robot, 30 motor driver, 32 motor, 50 calculation processing unit, 100 PLC, 102, 202 processor, 104, 204 main memory, 106 upper network controller, 108 field network controller, 110, 210 storage, 112 system program, 114 user program, 116 local bus controller, 118 processor bus, 120 memory card interface, 122 memory card, 124, 224 USB controller, 126 local bus, 130 function unit, 140 data storage unit, 150, 1146 function block, 152 input variable, 154 input internal parameter, 156 input / output variable, 158, 158A, 158B input / output internal parameter, 160 output variable, 162 Output internal parameters, 170 address identification module, 180 change module, 200 development support device, 206 optical drive, 207 recording medium, 208 bus, 212 OS, 214 development program, 220 network controller, 226 input section, 228 display section, 250 user interface screen, 252 target variable column, 254 current value column, 256 change instruction value column, 260 instruction issuing section, 300 HMI, 400 server device, 1142 main program, 1148 function.

Claims

1. a processing unit that executes a user program including a function block; a data storage unit for storing data referenced by the user program; an instruction issuing unit that issues an instruction to change a value of data referenced by a user program executed by the arithmetic processing unit in response to a user operation; an address specification unit that specifies an address of the data storage unit associated with the input / output variable by referring to a past execution state of the function block when a change in a value of the input / output variable associated with the function block is instructed; a change unit that changes the value held in the specified address of the data holding unit to a specified value.

2. The control system according to claim 1 , wherein the address specification unit specifies the address by collecting information on a previous execution time of the function block.

3. The control system according to claim 1 , wherein the address specification unit specifies the address when the execution of the user program has been completed.

4. The control system includes a programmable logic controller and a development support device.

4. The control system according to claim 1, wherein the address specification unit is implemented in the programmable logic controller.

5. The control system includes a programmable logic controller and a development support device.

4. The control system according to claim 1, wherein the address specification unit is implemented in the development support device.

6. A system program for providing an execution environment for executing a user program including a function block, the system program comprising: receiving an instruction to change a value of data referenced by the user program; when a change in a value of an input / output variable associated with the function block is instructed, identifying an address associated with the input / output variable by referring to a past execution state of the function block; and changing the value held at the specified address to a specified value.

7. A debugging method for debugging a user program including a function block, comprising the steps of: receiving an instruction to change a value of data referenced by the user program; when a change in a value of an input / output variable associated with the function block is instructed, identifying an address associated with the input / output variable by referring to a past execution state of the function block; and changing the value held at the specified address to a designated value.

Citation Information

Patent Citations

  • Simulator for sequence program

    JP2001209412A

  • PLC control program development device and program

    JP2009104227A

  • Distributed monitoring and fluid processing control system

    JP2010529561A

  • Programmable logic controller

    JP2016045712A