Debugging device, PLC device, and recording medium

The debugging device and PLC system address the challenge of monitoring variable values of POUs across different calling orders by using a calling order reception unit and variable value saving unit to capture and store snapshot data, ensuring comprehensive and real-time monitoring of PLC operations.

WO2024201994A1PCT designated stage expired Publication Date: 2024-10-03FANUC LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2023/013516
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

Existing PLC debugging methods, particularly the monitoring function, cannot effectively monitor variable values of Program Organization Units (POUs) across different calling orders, leading to incomplete real-time monitoring of variable states.

Method used

A debugging device and PLC system that include a calling order reception unit, a POU invocation management unit, a variable value saving unit, and a monitoring memory, which allow for the acquisition and storage of snapshot variable values of POUs in any specified calling order, enabling comprehensive monitoring of variable values across various call locations.

Benefits of technology

Enables real-time monitoring of variable values of POUs in any calling order specified by the user, overcoming the limitations of previous methods by providing accurate and complete data without stopping the sequence program, thus ensuring operational safety and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023013516_03102024_PF_FP_ABST
    Figure JP2023013516_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention monitors the variable value of a POU in any calling order designated by a user. This debugging device comprises: a calling order receiving unit that receives the calling order of a POU to be monitored from a sequence program; a POU calling managing unit that monitors the calling order of the POU during the execution of the sequence program and instructs the acquisition of the snapshot of the variable value of the POU to be monitored, when the monitored calling order agrees with the received calling order of the POU to be monitored, the received calling order being received by the calling order receiving unit; a variable value saving unit that acquires, on the basis of the instruction, the snapshot of the variable value of the POU to be monitored and saves the variable value of the POU to be monitored; and a monitor memory that stores the saved variable value of the POU to be monitored.
Need to check novelty before this filing date? Find Prior Art

Description

Debugging device, PLC device and recording medium

[0001] The present disclosure relates to a debugging device, a PLC device, and a recording medium that display variable values ​​of POUs in a sequence program.

[0002] Sequence programs for PLC (Programmable Logic Controller) devices are standardized in IEC 61131-3. Sequence programs are composed of POUs (Program Organization Units), such as function blocks and functions. Generally, there are two methods for checking the operation of sequence programs for PLC devices: (1) Debugging by step execution; and (2) Monitor function (without stopping the program). The latter monitor function can monitor variable values ​​in real time by communicating with an operating PLC device. For example, a known technique is to specify a monitor range in a sequence program and select an appropriate monitor method depending on the execution status (running / after execution / not running) of the monitor range. See, for example, Patent Document 1.

[0003] Japanese Patent Application Laid-Open No. 2003-228417

[0004] Unlike the debug function (step execution) that stops a sequence program, the monitor function has the following advantages and is therefore widely used in PLC monitor devices: (a) It allows you to check the operation without stopping the program (it is dangerous to stop only the sequence program while other machine functions are running); and (b) It allows you to check the real operation (stopping the sequence program may cause a timing discrepancy with peripheral operations). Conventionally, because the program is not stopped, there was a problem in that it was not possible to monitor variable values ​​in specific program sections. The technology described in Patent Document 1 solves this problem. However, as shown in FIG. 10 , the technology described in Patent Document 1 specifies the monitor target by specifying the monitor start address and monitor end address. Therefore, in the case of a program section in a POU where the monitor target is called from multiple locations, there is a problem in that it is not possible to monitor variable values ​​that differ depending on the call order. For example, when the main sequence program shown in the upper part of Fig. 10 calls the variable "Var1" of the function Func1, which is the POU shown in the middle part, the state of the variable "Var1" differs between the calling order A of Func1 (IN:=3) and the calling order B of Func1 (IN:=5). For this reason, as shown in the lower part of Fig. 10, the technology described in Patent Document 1 cannot monitor the state of the variable "Var1" at each calling point.

[0005] Therefore, it is desirable to monitor the variable values ​​of POUs in any calling order specified by the user.

[0006] (1) One aspect of the debugging device disclosed herein includes a call order acceptance unit that accepts the call order of POUs (Program Organization Units) to be monitored in a sequence program; a POU call management unit that monitors the POU call order when the sequence program is executed and, if the POU call order matches the call order of the POUs to be monitored accepted by the call order acceptance unit, issues a command to acquire a snapshot of the variable values ​​of the POUs to be monitored; a variable value saving unit that acquires the snapshot of the variable values ​​of the POUs to be monitored based on the command and saves the variable values ​​of the POUs to be monitored; and a monitor memory that stores the saved variable values ​​of the POUs to be monitored.

[0007] (2) One aspect of the PLC device of the present disclosure includes the debugging device of (1).

[0008] (3) One aspect of the recording medium of the present disclosure is a computer-readable recording medium having recorded thereon a debug program that causes a computer to function as a debugging device, the computer having: a call order acceptance unit that accepts the call order of POUs to be monitored in a sequence program; a POU call management unit that monitors the POU call order when the sequence program is executed and, if the POU call order matches the call order of the POUs to be monitored accepted by the call order acceptance unit, issues a command to acquire a snapshot of the variable values ​​of the POUs to be monitored; a variable value saving unit that acquires a snapshot of the variable values ​​of the POUs to be monitored based on the command and saves the variable values ​​of the POUs to be monitored; and a monitor memory that stores the saved variable values ​​of the POUs to be monitored.

[0009] FIG. 1 is a diagram showing an example of a functional block configuration of a PLC system according to a first embodiment; FIG. 2 is a diagram showing an example of a sequence program; FIG. 3 is a diagram showing an example of a list of the call order of POUs to be monitored; FIG. 4 is a diagram showing an example of a screen displaying variable values ​​of POUs to be monitored; and FIG. 5 is a flowchart illustrating debugging processing of a PLC device. FIG. 6 is a functional block diagram showing an example of a functional configuration of a PLC system according to a second embodiment; FIG. 7 is a diagram showing an example of a sequence program; FIG. 8 is a diagram showing an example of a screen displaying variable values ​​of two POUs to be monitored; and FIG.

[0010] First Embodiment A PLC system according to a first embodiment will be described in detail below with reference to the drawings. FIG. 1 is a diagram showing an example of a functional block configuration of a PLC system according to the first embodiment. As shown in FIG. 1, the PLC system 1 includes a PLC device 10 and a display device 20. Here, the PLC device 10 includes the functionality of a debugging device. Note that the present invention can also be applied when the PLC device 10 and the debugging device are different devices.

[0011] The PLC device 10 and the display device 20 are directly connected to each other via a connection interface (not shown). The PLC device 10 and the display device 20 may be connected to each other via a network (not shown), such as a local area network (LAN) or the Internet, to communicate with each other. In this case, the PLC device 10 and the display device 20 are provided with a communication unit (not shown) for communicating with each other via such a connection. Although the PLC device 10 and the display device 20 are described as being separate devices, the display device 20 may be included in the PLC device 10, as will be described later.

[0012] <Display Device 20> The display device 20 is, for example, a computer or tablet terminal known to those skilled in the art, and has a display unit 21 and an input unit 22. The display unit 21 is, for example, a liquid crystal display or the like. The display unit 21 displays, for example, variable values ​​of POUs to be monitored in the call order received from the user via the input unit 22 described below. The input unit 22 is, for example, a keyboard or a touch panel arranged on the display unit 21, and receives input, for example, of the call order of POUs to be monitored, from the user.

[0013] <PLC Device 10> As shown in FIG. 1 , the PLC device 10 according to this embodiment includes a call order acceptance unit 101, a POU call management unit 102, a sequence program execution unit 103, an I / O memory 104, a variable value saving unit 105, a monitor memory 106, a variable value output unit 107, and a call order storage unit 108. The sequence program execution unit 103 also includes an analysis unit 1031. The PLC device 10 stores a sequence program SP in a read-only memory (ROM) or a hard disk drive (HDD), both not shown. The PLC device 10 also includes a central processing unit (CPU), both not shown, to implement the operation of the functional blocks in FIG. 1 . The PLC device 10 also includes a main storage unit (not shown), such as a ROM or HDD, which stores various control programs, and a random access memory (RAM), which stores data temporarily required for the processor to execute the programs.

[0014] In the PLC device 10, the arithmetic processing unit loads application software such as an OS and a debug program from the auxiliary storage device, and executes arithmetic processing based on the OS and application software while loading the loaded OS and application software into the main storage device. Based on the results of this calculation, the PLC device 10 controls each piece of hardware. This allows the processing by the functional blocks in Figure 1 to be realized. In other words, the PLC device 10 can be realized by the cooperation of hardware and software.

[0015] The call order receiving unit 101 receives, via the input unit 22 of the display device 20, a call order of POUs to be monitored, specified by a user in a sequence program SP (described later). FIG. 2 is a diagram showing an example of a sequence program SP. The upper section of FIG. 2 shows the main sequence program SP, and the middle and lower sections show functions Func1 and Func2, which are POUs. Specifically, the call order receiving unit 101 displays, for example, the sequence program SP on the display unit 21 of the display device 20. For example, in a case where function Func2, which is called from function Func1 on the third line of the sequence program SP, is set as a POU to be monitored and the variable value of Func2 is to be monitored, the call order receiving unit 101 receives a path to the call order of function Func2 from the user via the input unit 22 as text (e.g., "Main#L3\Func1\Func2"). Alternatively, the call order receiving unit 101 may receive the call order of the POUs to be monitored by zooming (jumping to the definition) the cursor or mouse pointer of the input unit 22 to the position of function Func1 on the third line on the screen of the sequence program SP on the display unit 21 based on an input operation by the user. Also, as shown in Fig. 3, the call order receiving unit 101 displays on the display unit 21 a list of previously received POU call orders stored in a call order storage unit 108 (described later) and call locations of POUs to be monitored detected by an analysis of the sequence program SP by an analysis unit 1031 (described later). The call order receiving unit 101 may receive, via the input unit 22, the call order of Func2, which is a POU to be monitored, selected by the user from the list.

[0016] The POU call management unit 102 monitors the call order of POUs, for example, when the sequence program execution unit 103 (described later) executes the sequence program SP. If the call order matches the call order of the POUs to be monitored received by the call order reception unit 101, the POU call management unit 102 instructs the variable value saving unit 105 (described later) to acquire a snapshot of the variable values ​​of the POUs to be monitored. Specifically, for example, when the sequence program execution unit 103 executes Func1 (IN1:=3) on the second line of the sequence program SP, the POU call management unit 102 determines that the call order of the POUs is different from the call order of the POUs to be monitored received by the call order reception unit 101 because the call order is "Main (L2) -> Func1 -> Func2." On the other hand, when the sequence program execution unit 103 executes Func1 (IN1:=5) on the third line of the sequence program SP, the POU call management unit 102 determines that the call order of the POUs is "Main (L3) -> Func1 -> Func2," which matches the call order of the POUs to be monitored accepted by the call order acceptance unit 101. In this case, the POU call management unit 102 instructs the variable value saving unit 105, which will be described later, to acquire a snapshot of the variable values ​​of the POUs to be monitored. The variable value saving unit 105, which will be described later, reads the variable values ​​of the instructed POUs to be monitored from the I / O memory 104, which will be described later, and stores and saves the read variable values ​​of the POUs to be monitored in the monitor memory 106, which will be described later.

[0017] The sequence program execution unit 103 reads and executes the sequence program SP from an auxiliary storage device (not shown). The sequence program execution unit 103 reads and writes the values ​​of the variables of the sequence program SP to an I / O memory 104 (described later).

[0018] The analysis unit 1031 detects the call locations of the POUs to be monitored that have been accepted by the call order acceptance unit 101, from the sequence program SP executed by the sequence program execution unit 103. The analysis unit 1031 stores the detected call locations of the POUs to be monitored in the call order storage unit 108, which will be described later.

[0019] The I / O memory 104 is an I / O memory known to those skilled in the art, and stores variable values ​​and the like at addresses designated in response to commands from the sequence program SP executed by the sequence program execution unit 103 .

[0020] For example, when the variable value saving unit 105 receives from the POU call management unit 102 a command to acquire a snapshot of the variable values ​​of the POUs to be monitored that have been accepted by the call order acceptance unit 101, the variable value saving unit 105 reads the variable values ​​of the POUs to be monitored that have been instructed from the I / O memory 104. The variable value saving unit 105 stores and saves the read variable values ​​of the POUs to be monitored in the monitor memory 106, which will be described later.

[0021] The monitor memory 106 is, for example, a memory such as a RAM, and stores the variable values ​​of the POU to be monitored that are read out from the I / O memory 104 by the variable value saving unit 105 .

[0022] The variable value output unit 107 outputs the variable values ​​of the POUs to be monitored, which are stored in the monitor memory 106, to the display unit 21 of the display device 20. The display unit 21 of the display device 20 displays the variable values ​​of the POUs to be monitored, which are stored (saved) in the monitor memory 106. FIG. 4 is a diagram showing an example of a screen 200 that displays the variable values ​​of the POUs to be monitored. As shown in FIG. 4, the screen 200 has a display area 201 that displays the variable value "5" of the variable "Var1" of the function Func2, which is called from the function Func1 of Main (line 3) of the sequence program SP stored (saved) in the monitor memory 106, and a display area 202 that displays the POUs to be monitored. This allows the PLC device 10 (debug device) to monitor the variable values ​​of the POUs in any calling order specified by the user.

[0023] The call order storage unit 108 is, for example, a ROM or an EPROM (Erasable Programmable Read Only Memory), and stores the call order. Specifically, the call order storage unit 108 stores, for example, the call order received by the call order receiving unit 101 as a past call order, and also stores the call locations of the POUs to be monitored that are detected from the sequence program SP by the analysis unit 1031.

[0024] <Debugging Process of PLC Device 10> Next, the flow of debugging process of the PLC device 10 will be described with reference to Fig. 5. Fig. 5 is a flowchart illustrating the debugging process of the PLC device 10. The flow shown here is executed every time the call order of the POUs to be monitored is received from the user via the input unit 22 of the display device 20.

[0025] In step S11, the call order receiving unit 101 receives the call order of the POUs to be monitored, which is specified by the user in the sequence program SP, via the input unit 22 of the display device 20. The call order receiving unit 101 stores the received call order of the POUs to be monitored in the call order storage unit 108.

[0026] In step S12, the sequence program execution unit 103 executes the sequence program SP. The sequence program execution unit 103 reads and writes the values ​​of the variables of the sequence program SP to and from the I / O memory 104.

[0027] In step S13, the analysis unit 1031 detects the call locations of the POUs to be monitored that were accepted in step S11 from the sequence program SP executed in step S12. The analysis unit 1031 stores the detected call locations of the POUs to be monitored in the call order storage unit 108.

[0028] In step S14, the POU call management unit 102 monitors the call order of the POUs of the sequence program SP executed in step S12 and determines whether the call order of the executed sequence program SP matches the call order of the POUs to be monitored that was received in step S11. If the call order of the executed sequence program SP matches the call order of the POUs to be monitored that was received in step S11, the process proceeds to step S15. On the other hand, if the call order of the executed sequence program does not match the call order of the POUs to be monitored that was received in step S11, the process waits in step S14 until they match.

[0029] In step S15, the POU call management unit 102 instructs the variable value saving unit 105 to acquire a snapshot of the variable values ​​in the POU to be monitored.

[0030] In step S16, the variable value saving unit 105 reads the variable values ​​of the POU to be monitored from the I / O memory 104 based on the command in step S15, and stores and saves the read variable values ​​of the POU to be monitored in the monitor memory 106.

[0031] In step S17, the variable value output unit 107 outputs the variable values ​​of the POU to be monitored that were saved in the monitor memory 106 in step S16 to the display unit 21 of the display device 20. The display unit 21 of the display device 20 displays the variable values ​​of the POU to be monitored that were stored (saved) in the monitor memory 106.

[0032] As described above, the PLC device 10 according to the first embodiment can monitor the variable values ​​of the POUs in any calling order designated by the user. The first embodiment has been described above.

[0033] Second Embodiment Next, a second embodiment will be described. In the first embodiment, the PLC device 10 accepts the call order of a single POU to be monitored and displays the variable values ​​of the accepted POU on the display unit 21 of the display device 20. In contrast, in the second embodiment, the PLC device 10A accepts the call order of two or more POUs to be monitored and simultaneously displays the variable values ​​of the accepted POUs to be monitored on the display unit 21 of the display device 20, which is different from the first embodiment. As a result, the PLC device 10A according to the second embodiment can monitor the variable values ​​of POUs in any call order specified by the user. The second embodiment will be described below.

[0034] Fig. 6 is a functional block diagram showing an example of the functional configuration of a PLC system according to the second embodiment. Elements having the same functions as those of the PLC system 1 in Fig. 1 are denoted by the same reference numerals, and detailed description thereof will be omitted. As shown in Fig. 6, the PLC system 1 according to the second embodiment includes a PLC device 10A and a display device 20. The display device 20 has the same functions as the display device 20 in the first embodiment. The display unit 21 and the input unit 22 have the same functions as the display unit 21 and the input unit 22 in the first embodiment.

[0035] The PLC device 10A includes a calling order receiving unit 101a, a POU calling management unit 102a, a sequence program executing unit 103, an I / O memory 104, a variable value saving unit 105a, monitor memories 106a(1) to 106a(n), a variable value output unit 107a, and a calling order storage unit 108. The sequence program executing unit 103 also includes an analyzing unit 1031, where n is an integer equal to or greater than 2. The sequence program executing unit 103, the I / O memory 104, and the calling order storage unit 108 have the same functions as the sequence program executing unit 103, the I / O memory 104, and the calling order storage unit 108 in the first embodiment. The analyzing unit 1031 has the same functions as the analyzing unit 1031 in the first embodiment.

[0036] The call order receiving unit 101a receives the call order of two or more POUs to be monitored, specified by the user in the sequence program SP2 shown in Figure 7, via the input unit 22 of the display device 20. Figure 7 is a diagram showing an example of the sequence program SP2. The upper part of Figure 7 shows the main sequence program SP2, and the middle and lower parts show functions Func1 and Func2, which are POUs. Note that the following description will be given using as an example a case where the second and third lines of the sequence program SP2 in Figure 7 are received as the call order of the POUs to be monitored, but the same applies when receiving a call order of three or more POUs to be monitored.

[0037] Specifically, the call order acceptance unit 101a displays the sequence program SP2 on the display unit 21 of the display device 20. In order to monitor the variable values ​​of the function Func2 called from the function Func1 on the second and third lines of the sequence program SP, the call order acceptance unit 101a accepts the path of the call order of the function Func2 as text (e.g., "Main#L2\Func1\Func2" and "Main#L3\Func1\Func2") from the user via the input unit 22. Note that the call order acceptance unit 101a may accept the call order of the two POUs to be monitored by zooming (jumping to the definition) the cursor or mouse pointer of the input unit 22 to the positions of the function Func1 on the second and third lines on the screen of the sequence program SP2 on the display unit 21 based on the user's input operation. Furthermore, as in the first embodiment, the call order receiving unit 101a displays on the display unit 21 a list of previously received call orders of POUs stored in the call order storage unit 108 and call locations of POUs to be monitored that are detected by the analysis unit 1031 through analysis of the sequence program SP. The call order receiving unit 101a may receive the call order of Func2 of two POUs to be monitored that are selected by the user from the list via the input unit 22. The call order receiving unit 101a may also receive the call order for different POUs, for example, Func1 and Func2, as POUs to be monitored.

[0038] Like the POU call management unit 102 in the first embodiment, the POU call management unit 102a monitors the POU call order when the sequence program SP2 is executed by the sequence program execution unit 103. That is, the POU call management unit 102a determines whether the POU call order in the sequence program SP2 executed by the sequence program execution unit 103 matches each of the call orders of the two monitored POUs accepted by the call order acceptance unit 101a. Every time the POU call order in the executed sequence program SP2 matches each of the accepted call orders of the two monitored POUs, the POU call management unit 102a instructs the variable value saving unit 105a, described later, to acquire a snapshot of the variable values ​​of the matching monitored POUs.

[0039] Like the variable value saving unit 105 in the first embodiment, every time the variable value saving unit 105a receives from the POU call management unit 102a a command to acquire a snapshot of the variable values ​​of each of the two monitored POUs accepted by the call order acceptance unit 101, the variable value saving unit 105a reads out the variable values ​​of the monitored POUs from the I / O memory 104. The variable value saving unit 105a stores and saves the read variable values ​​of the monitored POUs in the monitor memories 106a(1) to 106a(n) described below in order, starting from the monitor memory 106a(1).

[0040] Like the monitor memory 106 of the first embodiment, each of the monitor memories 106a(1) to 106a(n) is a memory such as a RAM, and the variable values ​​of the two POUs to be monitored that are read from the I / O memory 104 by the variable value saving unit 105a are stored in, for example, the monitor memories 106a(1) and 106a(2). Note that the monitor memories 106a(1) to 106a(n) are different monitor memories, but this is not limiting. For example, the monitor memories 106a(1) to 106a(n) may be different storage areas on a single monitor memory.

[0041] The variable value output unit 107a outputs the variable values ​​of the multiple POUs to be monitored, which are stored in the monitor memories 106a(1) to 106a(n), to the display unit 21 of the display device 20. The display unit 21 of the display device 20 displays the variable values ​​of the POUs to be monitored that are stored (saved) in the monitor memories 106a(1) to 106a(n). FIG. 8 is a diagram showing an example of a screen 300 that displays the variable values ​​of two POUs to be monitored. As shown in FIG. 8, the screen 300 has a display area 301 that displays, for example, the variable values ​​"3" and "5" of the variables "Var1" and "Var2" of the function Func2 called from the function Func1 of Main (line 2) of the sequence program SP2 stored (saved) in the monitor memory 106a(1), as well as the POUs to be monitored. The screen 300 also has a display area 302 that displays the variable values ​​"10" and "5" of the variables "Var1" and "Var2" of the function Func2 called from the function Func1 of Main (line 3) of the sequence program SP2 stored (saved) in the monitor memory 106a(2), as well as the POUs to be monitored. That is, the screen 300 simultaneously displays the variable values ​​of the two POUs to be monitored. This allows the PLC device 10A (debug device) to monitor the variable values ​​of the POUs in any calling order specified by the user.

[0042] As shown in FIG. 8 , the screen 300 may highlight, in a color such as red, any variable values ​​that are different from each other among the variable values ​​of the POUs to be monitored on the second and third lines of the sequence program SP2. The screen 300 may also highlight different lines of the POUs to be monitored by using a bold line or other color. This allows the user to easily understand the differences in the variable values ​​of the POUs in the specified call order. Furthermore, when the call order receiving unit 101a receives a call order in which different POUs, for example, Func1 and Func2, are the POUs to be monitored, the display unit 21 of the display device 20 may simultaneously display the different POUs.

[0043] <Debugging Process of PLC Device 10A> Next, the flow of debugging process of PLC device 10A will be described with reference to Fig. 9. Fig. 9 is a flowchart illustrating the debugging process of PLC device 10A. The flow shown here is executed each time the call order of multiple POUs to be monitored is received from the user via input unit 22 of display device 20.

[0044] In step S21, the call order receiving unit 101a receives the call order of the multiple POUs to be monitored that is specified by the user in the sequence program SP2 via the input unit 22 of the display device 20. The call order receiving unit 101 stores the received call order of the multiple POUs to be monitored in the call order storage unit 108.

[0045] In step S22, the sequence program execution unit 103 executes the sequence program SP2. The sequence program execution unit 103 reads and writes the values ​​of the variables of the sequence program SP2 from and to the I / O memory 104.

[0046] In step S23, the analysis unit 1031 detects the call locations of each of the multiple POUs to be monitored that were accepted in step S21 from the sequence program SP2 executed in step S22. The analysis unit 1031 stores the detected call locations of the multiple POUs to be monitored in the call order storage unit 108.

[0047] In step S24, the POU call management unit 102 monitors the call order of the POUs of the sequence program SP2 executed in step S22 and determines whether the call order of the executed sequence program SP2 matches the call order of one of the multiple monitored POUs received in step S21. If the call order of the executed sequence program matches the call order of the monitored POUs received in step S21, the process proceeds to step S25. On the other hand, if the call order of the executed sequence program SP2 does not match the call order of the one monitored POU received in step S21, the process waits in step S24 until they match.

[0048] In step S25, the POU call management unit 102a instructs the variable value saving unit 105a to acquire a snapshot of the variable values ​​in one POU to be monitored.

[0049] In step S26, the variable value saving unit 105a reads the variable value of one monitored POU from the I / O memory 104 based on the command in step S25, and stores and saves the read variable value of one monitored POU in the monitor memory 106a(i) (i is an integer from 1 to n).

[0050] In step S27, the POU call management unit 102a determines whether snapshots of variables of all monitored POUs received in step S21 have been acquired. If snapshots of variables of all monitored POUs have been acquired, the process proceeds to step S28. On the other hand, if snapshots of variables of all monitored POUs have not been acquired, the process returns to step S24.

[0051] In step S28, the variable value output unit 107a outputs the variable values ​​of the multiple POUs to be monitored that have been saved in the monitor memories 106a(1) to 106a(n) to the display unit 21 of the display device 20. The display unit 21 of the display device 20 displays the variable values ​​of the multiple POUs to be monitored that have been stored (saved) in the monitor memories 106a(1) to 106a(n).

[0052] As described above, the PLC device 10A according to the second embodiment can monitor the variable values ​​of POUs in any calling order designated by the user. The second embodiment has been described above.

[0053] As described above, the PLC devices 10 and 10A according to the first and second embodiments can monitor the variable values ​​of POUs in any calling order designated by the user.

[0054] <Modification 1> In the first and second embodiments, the PLC devices 10, 10A include the functionality of a debugging device, but this is not limited to this. For example, the PLC devices 10, 10A and the debugging device may be different devices. Furthermore, although the PLC devices 10, 10A and the display device 20 are different devices, the display device 20 may be included in the PLC devices 10, 10A.

[0055] <Modification 2> In the above-described embodiment, the PLC devices 10 and 10A include the functionality of a debugging device, but this is not limiting. For example, the PLC devices 10 and 10A and the debugging device may be configured as different devices. In this case, the debugging device may instruct the PLC devices 10 and 10A to execute the sequence programs SP and SP2.

[0056] <Modification 3> In the above-described embodiment, the PLC devices 10 and 10A output the variable values ​​of the POUs to be monitored. However, this is not limited to this. For example, the PLC devices 10 and 10A may output the variable values ​​in a time-series file format (e.g., csv, txt, etc.) or simply as single data (packets) on a network, so that they can be used with any tool, not just for monitoring functions. This allows the data to be aggregated by a host PC that monitors multiple PLC devices 10 and 10A, or used for a tracing function.

[0057] The functions of the PLC devices 10 and 10A in the first and second embodiments can be realized by hardware, software, or a combination of these. Here, "realized by software" means that the functions are realized by a computer reading and executing a program.

[0058] The program can be stored and supplied to a computer using various types of non-transitory computer-readable media. Non-transitory computer-readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic recording media (e.g., flexible disks, magnetic tapes, hard disk drives), magneto-optical recording media (e.g., magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / Ws, and semiconductor memories (e.g., mask ROMs, PROMs (Programmable ROMs), EPROMs (Erasable PROMs), flash ROMs, and RAMs). The program may be provided to the computer by various types of transient computer-readable media. Examples of transient computer-readable media include electrical signals, optical signals, and electromagnetic waves. The transient computer-readable media can provide the program to the computer via a wired communication path such as an electrical wire or optical fiber, or via a wireless communication path.

[0059] The step of writing a program to be recorded on a recording medium includes not only processes that are performed in chronological order, but also processes that are not necessarily performed in chronological order but are executed in parallel or individually. The step of writing the program may also be performed by cloud computing.

[0060] Although the present disclosure has been described in detail, the present disclosure is not limited to the individual embodiments described above. Various additions, substitutions, modifications, partial deletions, etc. are possible in these embodiments without departing from the gist of the present disclosure or the spirit of the present disclosure derived from the content of the claims and their equivalents. These embodiments can also be implemented in combination. For example, in the above-described embodiments, the order of each operation and the order of each process are shown as examples and are not limited to these. The same applies when numerical values ​​or mathematical expressions are used to describe the above-described embodiments.

[0061] The following supplementary note is further disclosed regarding the above embodiment and modified examples. (Supplementary Note 1) The debugging device (10) includes a call order acceptance unit (101) that accepts the call order of POUs to be monitored in a sequence program (SP), a POU call management unit (102) that monitors the POU call order when the sequence program (SP) is executed and issues a command to acquire a snapshot of variable values ​​of the POUs to be monitored if the POU call order matches the call order of the POUs to be monitored accepted by the call order acceptance unit (101), a variable value saving unit (105) that acquires the snapshot of variable values ​​of the POUs to be monitored based on the command and saves the variable values ​​of the POUs to be monitored, and a monitor memory (106) that stores the saved variable values ​​of the POUs to be monitored. (Supplementary Note 2) In the debugging device (10) of Supplementary Note 1, the calling order receiving unit (101) receives the calling order of the POUs to be monitored by at least one of a zoom operation on the sequence program screen or a path specification using text. (Supplementary Note 3) In the debugging device (10) of Supplementary Note 1 or Supplementary Note 2, a calling order storage unit (108) that stores the calling order is provided, and the calling order receiving unit (101) selects and receives the calling order of the POUs to be monitored from the calling orders stored in the calling order storage unit (108). (Supplementary Note 4) In the debugging device (10) of Supplementary Note 3, an analysis unit (1031) that detects the calling locations of the POUs to be monitored from the sequence program (SP), and the calling order storage unit (108) stores the calling order specified by the calling order receiving unit (101) and also stores the calling locations of the POUs to be monitored detected by the analysis unit (1031). (Supplementary Note 5) The debugging device (10A) of Supplementary Note 1 or Supplementary Note 2 includes a plurality of monitor memories (106a(1) to 106a(n)) that store variable values ​​of a plurality of POUs to be monitored, and a variable value output unit (107a) that outputs the variable values ​​of the plurality of POUs to be monitored simultaneously for display. (Supplementary Note 6) In the debugging device (10A) of Supplementary Note 5, the variable value output unit (107a) outputs the variable values ​​of the plurality of POUs to be monitored simultaneously in different display formats.(Supplementary Note 7) The debugging device (10, 10A) of Supplementary Note 1 or Supplementary Note 2 is provided with a display device (20) that displays variable values ​​of the POU to be monitored. (Supplementary Note 8) The debugging device (10, 10A) of Supplementary Note 1 or Supplementary Note 2 is provided with a variable value output unit (107, 107a) that outputs variable values ​​of the POU to be monitored in a file format including a time series or as single data on a network. (Supplementary Note 9) The PLC device (10, 10A) is provided with the debugging device of Supplementary Note 1 or Supplementary Note 2. (Appendix 10) The recording medium is a computer-readable recording medium having recorded thereon a debug program that causes a computer to function as a debug device (10), the recording medium comprising: a call order acceptance unit (101) that accepts the call order of POUs to be monitored in a sequence program (SP); a POU call management unit (102) that monitors the call order of POUs when the sequence program (SP) is executed, and issues a command to acquire a snapshot of the variable values ​​of the POUs to be monitored if the call order matches the call order of the POUs to be monitored accepted by the call order acceptance unit (101); a variable value saving unit (105) that acquires the snapshot of the variable values ​​of the POUs to be monitored based on the command and saves the variable values ​​of the POUs to be monitored; and a monitor memory (106) that stores the saved variable values ​​of the POUs to be monitored.

[0062] 1 PLC system 10, 10A PLC device 101, 101a Call order reception unit 102, 102a POU call management unit 103 Sequence program execution unit 1031 Analysis unit 104 I / O memory 105, 105a Variable value saving unit 106, 106a (1) to 106a (n) Monitor memory 107, 107a Variable value output unit 108 Call order storage unit 20 Display device 21 Display unit 22 Input unit

Claims

1. A debugging device comprising: a call order acceptance unit that accepts the call order of POUs (Program Organization Units) to be monitored in a sequence program; a POU call management unit that monitors the POU call order when the sequence program is executed, and issues a command to obtain a snapshot of the variable values ​​of the monitored POUs when the call order matches the call order of the monitored POUs accepted by the call order acceptance unit; a variable value save unit that acquires a snapshot of the variable values ​​of the monitored POUs based on the command, and saves the variable values ​​of the monitored POUs; and a monitor memory that stores the saved variable values ​​of the monitored POUs.

2. The debugging device according to claim 1, wherein said call order receiving unit receives the call order of the POUs to be monitored by at least one of a zoom operation on a sequence program screen and a path specification by text.

3. A debugging device as described in claim 1 or claim 2, further comprising a call order memory unit that stores a call order, and wherein the call order acceptance unit selects and accepts the call order of the POU to be monitored from the call orders stored in the call order memory unit.

4. A debugging device as described in claim 3, further comprising an analysis unit that detects the call locations of the POUs to be monitored from the sequence program, wherein the call order memory unit stores the call order specified by the call order receiving unit and stores the call locations of the POUs to be monitored detected by the analysis unit.

5. A debugging device as described in claim 1 or claim 2, comprising: a plurality of monitor memories each storing a variable value of a plurality of POUs to be monitored; and a variable value output unit which outputs the variable values ​​of the plurality of POUs to be monitored for simultaneous display.

6. The debugging device according to claim 5, wherein said variable value output section outputs the variable values ​​of the multiple POUs to be monitored that are simultaneously displayed in different display formats.

7. The debugging device according to claim 1 or 2, further comprising a display device for displaying variable values ​​of the POU to be monitored.

8. A debugging device according to claim 1 or 2, further comprising a variable value output unit which outputs the variable values ​​of the POU to be monitored in a file format including a time series or as single data on a network.

9. A PLC device comprising the debugging device according to claim 1 or 2.

10. A computer-readable recording medium having recorded thereon a debug program that causes a computer to function as: a call order acceptance unit that accepts the call order of POUs to be monitored in a sequence program; a POU call management unit that monitors the POU call order when the sequence program is executed and, if the POU call order matches the call order of the POUs to be monitored accepted by the call order acceptance unit, issues a command to obtain a snapshot of the variable values ​​of the POUs to be monitored; a variable value evacuation unit that obtains a snapshot of the variable values ​​of the POUs to be monitored based on the command and saves the variable values ​​of the POUs to be monitored; and a monitor memory that stores the saved variable values ​​of the POUs to be monitored.

Citation Information

Patent Citations

  • Program trace management device, program trace management method and program

    JP2013025559A

  • Software structure visualization program and system

    JP2013156786A

  • Analyzing apparatus, analysis method, and analysis program

    JP2018169998A

  • Information processing device and program

    JP2019113952A

  • Source code displaying device, source code displaying method and source code displaying program

    JP2019139435A