Control system, programmable logic controller, visualization method and recording medium
By introducing a unit to measure the execution time of end processing in the PLC and displaying it on a programming auxiliary device, the problem of difficulty in measuring the execution time of end processing in the PLC is solved, and the convenience of fault investigation and system optimization are achieved.
Patent Information
- Application Number
- CN202280086369.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-06-15
AI Technical Summary
The existing technology cannot effectively measure and confirm the execution time of the PLC's end processing, which makes fault investigation difficult.
The end processing execution time measurement unit is introduced into the PLC, and the execution time of the end processing is displayed through the programming auxiliary device to achieve visualization.
By confirming the execution time of the end processing at the end of each program execution, it is possible to simplify troubleshooting, optimize the distribution of programs to each core, reduce communication load, and improve system efficiency.
Smart Images

Figure CN118475887B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a control system, a programmable logic controller, a visualization method and a program. Background Art
[0002] Technologies for displaying program execution time are known for the purpose of visualizing the performance of programs executed in programmable logic controllers (PLCs). For example, Patent Document 1 discloses a technology for monitoring and outputting the execution time of subroutines executed in a PLC on a programming console.
[0003] Patent Document 1: Japanese Patent Application Laid-Open No. 7-121212 Summary of the Invention
[0004] Typically, a PLC performs termination processing at the end of each program execution. This termination processing includes processes such as verifying the PLC's actions and logging device data. Furthermore, the PLC repeatedly performs the entire process, including program execution and termination processing, as a single scan. The technique described in Patent Document 1 suffers from a problem: the execution time of the termination processing is not measured, making it impossible to confirm the execution time. Therefore, if a termination processing failure occurs, it is difficult to investigate the cause.
[0005] The present invention has been made in view of the above circumstances, and its object is to provide a control system, a programmable logic controller, a visualization method, and a program that can confirm the execution time of the end processing performed each time the execution of a program ends.
[0006] In order to achieve the above object, the control system according to the present invention comprises a programmable logic controller for executing at least one program and a programming auxiliary device for creating the program.
[0007] In this control system, there are:
[0008] an end processing execution time measuring unit that measures an execution time of an end processing executed each time execution of the program ends; and
[0009] A display unit displays the execution time of the end process on a screen of the programming support device.
[0010] Effects of the Invention
[0011] According to the present invention, it is possible to provide a control system, a programmable logic controller, a visualization method, and a program capable of confirming the execution time of an end process executed each time execution of a program ends. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a diagram showing the functional configuration of a control system according to the embodiment.
[0013] Figure 2 This is a block diagram showing the hardware configuration of the PLC according to the embodiment.
[0014] Figure 3 This is a block diagram showing the hardware configuration of the programming support device according to the embodiment.
[0015] Figure 4 It is a diagram for explaining an area of a storage unit storing monitoring information according to the embodiment.
[0016] Figure 5 It is a diagram showing an example of monitoring information displayed on a screen according to the embodiment.
[0017] Figure 6 It is a diagram showing an example of monitoring information displayed on a screen according to the embodiment.
[0018] Figure 7 This is a flowchart showing the measurement process according to the embodiment.
[0019] Figure 8 This is a sequence diagram showing the processing executed between the PLC and the programming support device according to the embodiment.
[0020] Figure 9 This is a diagram showing an example of monitoring information displayed on a screen according to a modification. DETAILED DESCRIPTION
[0021] (Implementation Method)
[0022] The control system 1 according to the embodiment is a system for controlling FA (Factory Automation) equipment (not shown) connected to a PLC. Figure 1 As shown, the control system 1 includes a PLC 100 and a programming support device 200. The PLC 100 is communicably connected to the programming support device 200 via a network cable (not shown) or wirelessly.
[0023] PLC 100 is a device used to control FA equipment and executes user-created programs. PLC 100 in this embodiment includes a multi-core processor containing multiple processor cores, and programs are executed by the multi-core processor. Hereinafter, the processor cores included in the multi-core processor are simply referred to as "cores."
[0024] The programming assistance device 200 is a device for creating programs executed by the PLC 100. A programming tool is installed in the programming assistance device 200. The programming tool is an application for creating programs executed by the PLC 100. A user uses the programming tool to create programs executed by the PLC 100. Furthermore, the programming tool has a function for visualizing the performance of the PLC 100 during program execution, allowing the user to confirm the performance of the PLC 100 using the programming tool. Indicators indicating the performance of the PLC 100 include the scan time described below.
[0025] After the user creates a program, the PLC 100 executes termination processing. Termination processing is performed at the end of each program execution and encompasses various processes. The termination processing may be automatically set when the program is created or set by the user who created the program in the programming support device 200. Examples of termination processing include verifying the PLC 100's operations, logging data collected from PLC 100 devices, reading and writing data from external devices, and resetting the watchdog timer.
[0026] When executing a program on each of multiple cores, it is necessary to synchronize the start timing of the termination process executed by each core. Therefore, to synchronize the start timing of the termination process with the core with the longest program execution time, the other cores execute a wait process to wait until the core with the longest program execution time completes the program. Furthermore, the core with the longest program execution time does not execute the wait process.
[0027] The processor core of the PLC 100 repeatedly executes scans, treating program processing, wait processing, and end processing as one scan. The time required to execute one scan is called "scan time." Scan time is calculated by adding the program execution time, wait processing time, and end processing time. Hereinafter, this wait processing time is referred to as "wait time." The control system 1 of this embodiment can visualize scan time and scan time details.
[0028] exist Figure 2 The hardware structure of PLC 100 is shown in FIG.
[0029] The PLC 100 includes a multi-core processor 11 that executes various processes; a main memory unit 12 that serves as a work area for the multi-core processor 11; an auxiliary memory unit 13 that stores various data used by the multi-core processor 11; a first communication unit 14 for communicating with external devices, including the programming support device 200; and a second communication unit 15 for communicating with FA equipment. The main memory unit 12, auxiliary memory unit 13, first communication unit 14, and second communication unit 15 are all connected to the multi-core processor 11 via a bus 16.
[0030] The multi-core processor 11 is a CPU (Central Processing Unit) having multiple cores and realizes various functions of the PLC 100 by executing programs stored in the auxiliary storage unit 13 .
[0031] The main storage unit 12 includes a RAM (Random Access Memory). Programs are loaded from the auxiliary storage unit 13 into the main storage unit 12. The main storage unit 12 is used as a work area for the multi-core processor 11.
[0032] The auxiliary storage unit 13 includes nonvolatile memory, typically EEPROM (Electrically Erasable Programmable Read-Only Memory). In addition to programs, the auxiliary storage unit 13 also stores various data used by the multi-core processor 11. Following instructions from the multi-core processor 11, the auxiliary storage unit 13 supplies data used by the multi-core processor 11 to the multi-core processor 11 and stores data supplied from the multi-core processor 11.
[0033] The first communication unit 14 includes a network interface circuit for communicating with external devices including the programming support device 200. The first communication unit 14 receives signals from the external devices and outputs the data indicated by the signals to the multi-core processor 11. Furthermore, the first communication unit 14 transmits signals indicating data output from the multi-core processor 11 to the external devices.
[0034] The second communication unit 15 includes a network interface circuit for communicating with the FA equipment controlled by the PLC 100. The second communication unit 15 receives signals from the FA equipment and outputs the data indicated by the signals to the multi-core processor 11. Furthermore, the second communication unit 15 transmits signals indicating data output from the multi-core processor 11 to the FA equipment.
[0035] exist Figure 3 2 shows the hardware structure of the programming assistance device 200.
[0036] Programming support device 200 includes a processor 21 that executes various processes; a main storage unit 22 that serves as a work area for processor 21; an auxiliary storage unit 23 that stores various data used by processor 21; a communication unit 24 for communicating with external devices including PLC 100; an input unit 25 that receives input information; and an output unit 26 that displays various information. Main storage unit 22, auxiliary storage unit 23, communication unit 24, input unit 25, and output unit 26 are all connected to processor 21 via a bus 27.
[0037] The processor 21 includes a CPU and realizes various functions of the programming support device 200 by executing programs stored in the auxiliary storage unit 23 .
[0038] The main storage unit 22 includes a RAM. Programs are loaded from the auxiliary storage unit 23 into the main storage unit 22. The main storage unit 22 is used as a work area for the processor 21.
[0039] The auxiliary storage unit 23 includes a nonvolatile memory, typically an EEPROM. In addition to programs, the auxiliary storage unit 23 also stores various data used by the processor 21. Following instructions from the processor 21, the auxiliary storage unit 23 supplies data used by the processor 21 to the processor 21 and stores data supplied from the processor 21.
[0040] Communication unit 24 includes a network interface circuit for communicating with external devices including PLC 100. Communication unit 24 receives signals from external devices and outputs data indicated by the signals to processor 21. Communication unit 24 also transmits signals indicating data output from processor 21 to external devices.
[0041] The input unit 25 includes input devices such as input keys and a pointing device. The input unit 25 acquires information input by a user of the programming support apparatus 200 and notifies the processor 21 of the acquired information.
[0042] The output unit 26 includes output devices such as an LCD (Liquid Crystal Display) and a speaker. The output unit 26 may also be a touch screen integrated with the pointing device constituting the input unit 25. The output unit 26 presents various information to the user according to instructions from the processor 21.
[0043] Next, the functions of PLC 100 and programming support device 200 will be described. The multi-core processor 11 includes four cores: "Core1," "Core2," "Core3," and "Core4." A user-created program is designated "PRG1," "PRG2," and "PRG3." "PRG1" and "PRG2" are executed by "Core1," while "PRG3" is executed by "Core2." Furthermore, after executing "PRG1" and "PRG2," "Core1" terminates "FUNC1" and "FUNC2." After executing "PRG3," "Core2" terminates "FUNC3."
[0044] First, yes Figure 1 The functions of the PLC 100 are described below. The PLC 100 functionally includes: a program execution time measurement unit 101 that measures the program execution time; an end processing execution time measurement unit 102 that measures the end processing execution time; a calculation unit 103 that calculates the waiting time; a storage unit 104 that stores monitoring information described later; a size information response unit 105 that sends a size information response including information on the size of the monitoring information to the programming support device 200; and a monitoring information response unit 106 that sends a monitoring information response including monitoring information to the programming support device 200.
[0045] The program execution time measurement unit 101 measures the execution time of a program executed on each of the plurality of cores. The program execution time measurement unit 101 is implemented by the multi-core processor 11. The program execution time measurement unit 101 is an example of a program execution time measurement unit.
[0046] For example, the program execution time measurement unit 101 measures the execution times of "PRG1" and "PRG2" executed by "Core1" as "3.000 [ms]" and "7.000 [ms]", respectively, and measures the execution time of "PRG3" executed by "Core2" as "4.600 [ms]".
[0047] The termination process execution time measurement unit 102 measures the execution time of the termination process executed in each of the plurality of cores. The termination process execution time measurement unit 102 is implemented by the multi-core processor 11. The termination process execution time measurement unit 102 is an example of a termination process execution time measurement unit.
[0048] For example, the end processing execution time measurement unit 102 measures the execution times of “FUNC1” and “FUNC2” executed by “Core1” as “5.000 [ms]” and “3.000 [ms]”, respectively, and measures the execution time of “FUNC3” executed by “Core2” as “8.000 [ms]”.
[0049] The computing unit 103 calculates the waiting time required to synchronize the start timing of the termination process executed by each of the multiple cores. Furthermore, the computing unit 103 stores information on the program execution time, the termination process execution time, and the waiting time in the storage unit 104. The computing unit 103 is implemented by the multi-core processor 11. The computing unit 103 is an example of a computing unit.
[0050] For example, the calculation unit 103 calculates the waiting time by comparing the program execution times of each core and subtracting the execution times of the programs of the other cores from the execution time of the program of the core with the longest measured execution time. In this case, if the execution times of multiple programs are measured on a single core, the program execution times of each core are compared using the sum of these execution times. For "Core 1," since the execution times of multiple programs are measured, the calculation unit 103 calculates the sum of the program execution times, "10.000 [ms] (= 3.000 [ms] + 7.000 [ms])," and compares it with the program execution time of "4.600 [ms]" for "Core 2." The calculation unit 103 then calculates the waiting time for "Core 2" as "5.400 [ms]," by subtracting "4.600 [ms]" from the sum of the program execution times of "10.000 [ms]" for "Core 1."
[0051] Then, the operation unit 103 stores the execution times "3.000[ms]" and "7.000[ms]" of "PRG1" and "PRG2", and the execution times "5.000[ms]" and "3.000[ms]" of "FUNC1" and "FUNC2" in the storage unit 104 for "Core1", and stores the execution time "4.600[ms]" of "PRG3", the execution time "8.000[ms]" of "FUNC3", and the waiting time "5.400[ms]" in the storage unit 104 for "Core2".
[0052] The calculation unit 103 also calculates statistical information about the program execution time, end processing execution time, and wait time for each core, and stores the statistical information in the storage unit 104. Statistical information includes, for example, maximum values, minimum values, and moving averages. Furthermore, the calculation unit 103 measures the cumulative number of program executions in each core, and stores this information in the storage unit 104.
[0053] Storage unit 104 stores monitoring information, including information on program execution time, information on execution time of end processing, information on waiting time, and information on the cumulative number of program executions. This monitoring information is displayed on the screen of programming support device 200. Storage unit 104 is implemented by auxiliary storage unit 13. Storage unit 104 is an example of a storage unit.
[0054] exist Figure 4 Schematic diagram of the area of the storage unit 104 storing monitoring information is shown in FIG. The storage unit 104 has an area for storing information of multiple items included in the monitoring information. The calculation unit 103 compares the information of items such as the measured execution time and the calculated waiting time with the information stored in the area corresponding to each item to update the monitoring information. Figure 4 The monitoring information for each of the multiple cores includes information on program execution time, cumulative program execution counts, wait time, and termination processing execution time. Furthermore, each of these information includes the current value and statistical information indicating the most recent value.
[0055] In response to a size information request sent from the programming support device 200, the size information response unit 105 determines the size of the monitoring information stored in the storage unit 104 and transmits a size information response including size information indicating the determined size to the programming support device 200. The size information response unit 105 is implemented by the multi-core processor 11 and the first communication unit 14. The size information response unit 105 is an example of a size information response unit.
[0056] The size information request is a request sent from the programming support device 200 to obtain the size information of the monitoring information. The size information of the monitoring information is represented by Figure 4 The area of the storage unit 104 shown contains information on the size of the monitoring information excluding the free area.
[0057] For example, if the size information response unit 105 receives a size information request, Figure 4In the area of storage unit 104 shown, the sizes of the monitoring information for lines 1 to 10, lines 14 to 20, and lines 24 to 33 are calculated, and a size information response including size information indicating the calculated sizes is sent to programming support device 200. Hereinafter, the calculated sizes are referred to as "X [byte]."
[0058] In response to a monitoring information request sent from the programming support device 200, the monitoring information response unit 106 transmits a monitoring information response, including the monitoring information stored in the storage unit 104, to the programming support device 200. The monitoring information response unit 106 includes the monitoring information in the monitoring information response in the amount specified in the monitoring information request, thereby dividing the monitoring information and transmitting it to the programming support device 200. The monitoring information response unit 106 is implemented by the multi-core processor 11 and the first communication unit 14. The monitoring information response unit 106 is an example of a monitoring information response unit.
[0059] The monitoring information request is a request for acquiring monitoring information, which is sent from the programming support device 200. The monitoring information request specifies the size of the monitoring information included in the monitoring information response.
[0060] For example, if the monitoring information response unit 106 receives a monitoring information request that specifies a size of "0.6X [byte]", it determines that the monitoring information of "0.6X [byte]" is the monitoring information of "X [byte]" stored in the storage unit 104. Figure 4 The monitoring information response unit 106 then sends the monitoring information response including the determined information to the programming assistance device 200. In addition, if the monitoring information response unit 106 subsequently receives a monitoring information request specifying a size of "0.4X [byte]", the monitoring information response unit 106 includes the information stored in the storage unit 104 that has not been sent to the programming assistance device 200 in the monitoring information response and sends it. That is, the monitoring information response unit 106 includes the information included in the monitoring information request. Figure 4 The monitoring information response including the information on the 24th to 33rd lines in the area of the storage unit 104 is sent to the programming support device 200 .
[0061] Then, Figure 1 The functions of the programming support device 200 will be described. The programming support device 200 functionally includes a size information acquisition unit 201 that acquires size information of monitoring information; a monitoring information acquisition unit 202 that acquires monitoring information; and a display unit 203 that displays the monitoring information on a screen.
[0062] exist Figure 5 3 shows a state where the monitoring information is displayed on the screen after the programming support device 200 acquires the monitoring information. The window 300 is displayed on the screen by a function of a programming tool installed in the programming support device 200.
[0063] exist Figure 5 The window 300 includes: a button 301 for starting the display of monitoring information; a button 302 for ending the display of monitoring information; a bar graph 303 for showing the details of the scan time in each core; a table 304 for showing the value of the scan time in each core; a radio button 305 for displaying the current value in the table 309 or the table 310; a radio button 306 for displaying the maximum value in the table 309 or the table 310; a button 307 for displaying the table 309 of the execution time of the program; a button 308 for displaying the table 310 of the execution time of the end process; and a table 309 of the execution time of the program. Figure 5 In the window 300, if the button 308 is selected, Figure 6 As shown, a table 310 of the execution time of the end processing is displayed instead of the table 309 of the execution time of the program.
[0064] The bar graph 303 shows the ratio of program execution time, waiting time, and execution time of the end process to the total scan time. The table 304 shows the program execution time, waiting time, execution time of the end process, and scan time in each core. Figure 5 Table 309 of the execution time of the program shows the execution time and the cumulative number of executions of each program executed in each core. Figure 6 The table 310 of the execution time of the termination process shows the execution time of each termination process executed in each core and the total execution time of the termination processes in each core.
[0065] The size information acquisition unit 201 transmits a size information request for acquiring size information of monitoring information displayed on the screen to the PLC 100. The size information acquisition unit 201 is implemented by the processor 21, the communication unit 24, and the input unit 25. The size information acquisition unit 201 is an example of size information acquisition means.
[0066] For example, when the user selects button 301, size information acquisition unit 201 transmits a size information request for acquiring size information of monitoring information to be displayed in window 300 to PLC 100. Furthermore, size information acquisition unit 201 receives a size information response including size information transmitted from size information response unit 105.
[0067] The monitoring information acquisition unit 202 compares the size indicated by the size information included in the size information response sent from the size information response unit 105 with the size of the information that can be included in one monitoring information response, and calculates the number of times the monitoring information request is sent to the PLC 100. The monitoring information acquisition unit 202 then transmits the monitoring information request, which specifies the size of the monitoring information included in the monitoring information response, according to the number of times it is sent. The monitoring information request is used to obtain the monitoring information displayed on the screen. The monitoring information acquisition unit 202 is implemented by the processor 21 and the communication unit 24. The monitoring information acquisition unit 202 is an example of a monitoring information acquisition unit.
[0068] The size of information that can be included in one monitoring information response is, for example, the size of information that can be included in one data packet in the communication between the programming support device 200 and the PLC 100. Below, the size of information that can be included in one monitoring information response is set to "0.6X [byte]." The monitoring information acquisition unit 202 determines that, when the size information included in the size information response indicates the size of "X [byte]," two data packets are required to obtain the monitoring information displayed on the screen, and calculates that the number of times the monitoring information request is sent is two. The monitoring information acquisition unit 202 sends two monitoring information requests to the PLC 100 to obtain the monitoring information.
[0069] The monitoring information acquisition unit 202 first sends the first monitoring information request specifying the size of "0.6X [byte]" to the PLC 100. The monitoring information acquisition unit 202 receives the monitoring information response containing the monitoring information of "0.6X [byte]" through the monitoring information response unit 106. The monitoring information response to the first monitoring information request contains Figure 4 The information in the 1st to 10th and 14th to 20th rows of the area of the storage unit 104 shown in FIG. 1 is stored in the storage unit 104. When the monitoring information acquisition unit 202 receives the monitoring information response to the first monitoring information request, it sends a second monitoring information request specifying the size of "0.4X [byte]" to the PLC 100. Then, the monitoring information acquisition unit 202 receives the monitoring information response containing the remaining monitoring information through the monitoring information response unit 106. The monitoring information response to the second monitoring information request contains Figure 4 The information of the 24th to 33rd rows in the area of the storage unit 104 shown in FIG. Figure 4 The monitoring information in the 1st to 10th rows, the 14th to 20th rows, and the 24th to 33rd rows of the area of the storage unit 104 is shown.
[0070] The display unit 203 displays the program execution time, waiting time, and end processing execution time for each of the plurality of cores on the screen of the programming support device 200. The display unit 203 is implemented by the processor 21 and the output unit 26. The display unit 203 is an example of a display unit.
[0071] For example, the display unit 203 displays the monitoring information obtained by the monitoring information obtaining unit 202, such as Figure 5 As shown in the window 300, the program execution time, waiting time, execution time of the end processing, etc. are displayed.
[0072] Next, use Figure 7 and Figure 8 A method of visualizing scan time according to this embodiment will be described.
[0073] Figure 7 This is a flowchart showing the measurement process executed by the PLC 100 according to the present embodiment. Figure 7 The measurement process is, for example, a process that is executed when an operation to execute a program is received from a user.
[0074] The program execution time measurement unit 101 measures the execution time of a program executed in each of the plurality of cores (step S101 ).
[0075] For example, the program execution time measurement unit 101 measures the execution time of “PRG1” and “PRG2” executed by “Core1” and the execution time of “PRG3” executed by “Core2”.
[0076] The program execution time measurement unit 101 determines whether the execution of the program on each core has ended (step S102). If the program execution time measurement unit 101 determines that the execution of the program on each core has ended (step S102; YES), the termination processing execution time measurement unit 102 measures the execution time of the termination processing executed on each of the multiple cores (step S103). On the other hand, if the program execution time measurement unit 101 determines that the execution of the program on each core has not ended (step S102; NO), it waits.
[0077] For example, if "Core 1" completes the execution of "PRG1" and "PRG2," and "Core 2" completes the execution of "PRG3," the end-process execution time measurement unit 102 measures the execution time of "FUNC1" and "FUNC2" executed by "Core 1," and the execution time of "FUNC3" executed by "Core 2." On the other hand, if the execution of the program implemented by "Core 1" or "Core 2" has not yet completed, the program waits.
[0078] The termination process execution time measurement unit 102 determines whether the execution of the termination process for each core has been completed (step S104). If the termination process execution time measurement unit 102 determines that the execution of the termination process for each core has been completed (step S104: YES), the calculation unit 103 calculates the waiting time for each core (step S105). On the other hand, if the termination process execution time measurement unit 102 determines that the execution of the termination process for each core has not been completed (step S104: NO), the calculation unit 103 waits.
[0079] For example, if "FUNC1" and "FUNC2" are completed by "Core1," and "FUNC3" is completed by "Core2," the calculation unit 103 calculates the waiting time for "Core2" as "5.400 [ms]." On the other hand, if the termination process executed by "Core1" or "Core2" has not yet been completed, the processor continues to wait.
[0080] The calculation unit 103 stores the information on the execution time of the program, the information on the execution time of the end process, and the information on the waiting time in the storage unit 104 (step S106 ).
[0081] For example, the operation unit 103 stores the execution times "3.000[ms]" and "7.000[ms]" of "PRG1" and "PRG2", and the execution times "5.000[ms]" and "3.000[ms]" of "FUNC1" and "FUNC2" in the storage unit 104 for "Core1", and stores the execution time "4.600[ms]" of "PRG3", the execution time "8.000[ms]" of "FUNC3", and the waiting time "5.400[ms]" in the storage unit 104 for "Core2".
[0082] Figure 8 This is a sequence diagram showing the processing executed between the PLC 100 and the programming support device 200 according to the present embodiment.
[0083] The size information acquisition unit 201 of the programming support device 200 transmits a size information request for acquiring size information of monitoring information displayed on the screen to the PLC 100 (step S201 ).
[0084] For example, when the user selects the button 301 , the size information acquisition unit 201 transmits a size information request for acquiring size information of the monitoring information displayed in the window 300 to the PLC 100 .
[0085] Upon receiving the size information request from the size information acquisition unit 201, the size information response unit 105 of the PLC 100 calculates the size of the monitoring information stored in the storage unit 104 (step S202). The size information response unit 105 then transmits a size information response including size information indicating the calculated size to the programming support device 200 (step S203).
[0086] For example, if the size information response unit 105 receives a size information request, it will Figure 4 In the area of storage unit 104 shown, the size of the monitoring information for lines 1 to 10, lines 14 to 20, and lines 24 to 33 is calculated as "X [byte]." The size information response unit 105 then transmits a size information response including size information indicating the calculated size to programming support device 200.
[0087] Upon receiving the size information response from the size information response unit 105, the monitoring information acquisition unit 202 of the programming support device 200 compares the size information indicated by the size information included in the size information response with the size of the information that can be included in one monitoring information response, and calculates the number of times n (n is a natural number greater than or equal to 1) the monitoring information request is sent to the PLC 100 (step S204). The monitoring information acquisition unit 202 then transmits a monitoring information request specifying the size of the monitoring information included in the monitoring information response to the PLC 100 (step S205). The monitoring information request is used to obtain the monitoring information displayed on the screen.
[0088] Upon receiving the monitoring information request from the monitoring information acquisition unit 202, the monitoring information response unit 106 of the PLC 100 transmits a monitoring information response including the specified amount of monitoring information to the programming support device 200 (step S206). Steps S205 and S206 are repeated for a transmission count n.
[0089] For example, if the size of information that can be included in one data packet is set to "0.6X [byte]" and the size information included in the size information response indicates a size of "X [byte]," the monitoring information acquisition unit 202 determines that the number of times the monitoring information request must be sent is two in order to obtain the monitoring information displayed on the screen. The monitoring information acquisition unit 202 then sends the first monitoring information request specifying the size of "0.6X [byte]" to the PLC 100. Upon receiving the first monitoring information request, the monitoring information response unit 106 sends the first monitoring information response containing the monitoring information of the size specified in the first monitoring information request to the programming assistance device 200. Upon receiving the first monitoring information response, the monitoring information acquisition unit 202 then sends the second monitoring information request specifying the size of "0.4X [byte]" to the PLC 100. Then, upon receiving the second monitoring information request, the monitoring information response unit 106 transmits a second monitoring information response including the amount of monitoring information specified in the second monitoring information request to the programming support device 200. Then, the monitoring information acquisition unit 202 receives the second monitoring information response.
[0090] When the monitoring information acquisition unit 202 receives n monitoring information responses, the display unit 203 of the programming support device 200 displays the monitoring information included in the received monitoring information responses on the screen (step S207 ).
[0091] For example, the display unit 203 displays the monitoring information obtained by the monitoring information obtaining unit 202, such as Figure 5 As shown in the window 300, the program execution time, waiting time, execution time of the end processing, etc. are displayed.
[0092] According to this embodiment, the execution time of the termination process executed each time the program is finished can be visualized. This makes it easy to investigate the cause when there is a problem with the termination process.
[0093] Furthermore, according to this embodiment, the execution time, wait time, and end-of-process execution time of programs on each core can be measured and visualized. This allows users to optimize the distribution of programs and end-of-processes to each core, easily distributing the load. Furthermore, users can easily investigate how to reduce scan times and investigate the causes of failures during the execution of user-created programs.
[0094] Furthermore, according to this embodiment, the programming support device specifies the size of the monitoring information displayed on the screen, and the PLC transmits the specified amount of monitoring information. This prevents unnecessary information other than the monitoring information displayed on the screen from being sent or received during communication between the programming support device and the PLC, minimizing the communication load.
[0095] Furthermore, if the number of programs executed in the PLC changes due to program writing during control system operation, the size of the monitoring information obtained from the PLC may sometimes exceed the maximum size of a single data packet. According to this embodiment, the programming assistance device obtains the size of the monitoring information before obtaining it. If the monitoring information cannot fit in a single data packet, the device obtains the monitoring information using multiple data packets. This allows for flexible acquisition of monitoring information even when the number of programs executed changes.
[0096] (Variation)
[0097] While the embodiments of the present invention have been described above, the present invention can be modified and applied in various forms when it is implemented.
[0098] In the above embodiment, the program execution time measurement unit 101 may further measure the execution time of the interrupt program included in the program. Furthermore, the display unit 203 may also display the execution time of the interrupt program on a screen. In this case, the storage unit 104 further stores information on the execution time of the interrupt program and the number of times the interrupt program has been executed, and the monitoring information includes the execution time and number of times the interrupt program has been executed.
[0099] For example, "Interrupt Program A" is included in "PRG3" executed by "Core2" and is executed twice in "PRG3". In this case, the program execution time measurement unit 101 measures the execution time of "Interrupt Program A". Then, as shown in FIG. Figure 9 As shown in the table 309 , the display unit 203 displays information on the execution time “1.000 [ms]” and the cumulative number of executions “2 [times]” of the “interrupt program A”.
[0100] With this structure, when designing an interrupt program, the user can confirm the extent to which the interrupt program affects the scan time, thereby facilitating the design of the interrupt program. In addition, if the scan time increases due to the design of the interrupt program, the user can easily determine the cause.
[0101] In the above embodiment, the monitoring information is displayed on the screen of the programming support device 200 , but the present invention is not limited thereto. The monitoring information may be displayed on the screen of another device connected to the PLC 100 or on the screen of the PLC 100 .
[0102] In addition, by applying the action program that specifies the actions of the PLC 100 and programming assistance device 200 involved in the above-mentioned embodiment to an existing personal computer or information terminal device, the personal computer or information terminal device can also function as the PLC 100 and programming assistance device 200 involved in the embodiment.
[0103] Such a program may be distributed in any manner, for example, by being stored in a computer-readable recording medium such as a CD-ROM (Compact Disk Read-Only Memory), a DVD (Digital Versatile Disk), or a memory card, or by being distributed via a communication network such as the Internet.
[0104] The present invention can be implemented in various embodiments and variations without departing from the broad spirit and scope of the present invention. Furthermore, the above-described embodiments are provided to illustrate the present invention and are not intended to limit the scope of the present invention. That is, the scope of the present invention is not defined by the embodiments but by the claims. Furthermore, variations implemented within the scope of the claims and their equivalents are considered to fall within the scope of the present invention.
[0105] Industrial Applicability
[0106] According to the present invention, it is possible to provide a control system, a programmable logic controller, a visualization method, and a program capable of confirming the execution time of an end process executed each time execution of a program ends.
[0107] Description of the label
[0108] 1 Control system, 11 Multi-core processor, 12, 22 Main storage unit, 13, 23 Auxiliary storage unit, 14 First communication unit, 15 Second communication unit, 16, 27 Bus, 21 Processor, 24 Communication unit, 25 Input unit, 26 Output unit, 100 PLC, 101 Program execution time measurement unit, 102 End processing execution time measurement unit, 103 Calculation unit, 104 Storage unit, 105 Size information response unit, 106 Monitoring information response unit, 200 Programming support device, 201 Size information acquisition unit, 202 Monitoring information acquisition unit, 203 Display unit, 300 Window, 301, 302, 307, 308 Buttons, 303 Bar graph, 304, 309, 310 Table, 305, 306 Radio buttons.
Claims
1. A control system comprising a programmable logic controller for executing at least one program and a programming assistance device for creating said program, In this control system, there are: an end processing execution time measuring unit that measures an execution time of an end processing executed each time execution of the program ends; and a display unit that displays the execution time of the end processing on a screen of the programming support device, The programmable logic controller executes multiple programs through a multi-core processor including multiple cores. The programmable logic controller has: a program execution time measurement unit that measures an execution time of a program executed in each of the plurality of cores; and a calculation unit that calculates a waiting time generated to make the start timing of the execution of the end processing executed in each of the plurality of cores consistent, The end process execution time measurement unit measures the execution time of the end process executed in each of the plurality of cores. The display unit displays the execution time of the program, the waiting time, and the execution time of the end processing on the screen for each of the plurality of cores.
2. The control system according to claim 1, wherein: The content of the end processing is set in the programming support device by the user who created the program.
3. The control system according to claim 1, wherein: The program execution time measuring unit also measures the execution time of the interrupt program included in the program. The display unit displays the execution time of the interrupt program on the screen.
4. The control system according to any one of claims 1 to 3, wherein: The programmable logic controller stores monitoring information including information on the execution time of the program, information on the execution time of the end process, and information on the waiting time in a storage unit. The programming aid device comprises: a size information acquiring unit that transmits a size information request for acquiring size information indicating the size of the monitoring information displayed on the screen to the programmable logic controller; and a monitoring information acquisition unit that sends a monitoring information request for acquiring monitoring information displayed on the screen to the programmable logic controller, The programmable logic controller has: a size information response unit that determines the size of the monitoring information stored in the storage unit in response to the size information request and transmits a size information response including size information indicating the determined size to the programming support device; as well as a monitoring information response unit that sends a monitoring information response including the monitoring information stored in the storage unit to the programming assistance device in response to the monitoring information request; The monitoring information acquisition unit compares the size indicated by the size information included in the size information response sent from the size information response unit with the size of information that can be included in one monitoring information response, calculates the number of times a monitoring information request is sent to the programmable logic controller, and sends the monitoring information request specifying the size of the monitoring information included in the monitoring information response with the number of times. The monitoring information response unit includes the monitoring information of a size specified in the monitoring information request in the monitoring information response, thereby dividing the monitoring information and sending the divided monitoring information to the programming support device. The display unit displays the monitoring information included in the monitoring information response on the screen.
5. A programmable logic controller that executes multiple programs using a multi-core processor comprising multiple cores, The programmable logic controller has: a program execution time measurement unit that measures an execution time of a program executed in each of the plurality of cores; and a termination process execution time measurement unit that measures the execution time of the termination process executed in each of the plurality of cores, wherein The end processing is executed each time the execution of the program ends; a calculation unit that calculates a waiting time generated to make the start timing of execution of the end processing executed in each of the plurality of cores consistent; a storage unit that stores monitoring information including information on the execution time of the program, information on the execution time of the end process, and information on the waiting time; as well as The monitoring information response unit transmits a monitoring information response including the monitoring information stored in the storage unit in response to a monitoring information request for acquiring monitoring information displayed on the screen.
6. A visualization method, which is performed in a control system comprising a programmable logic controller, wherein the programmable logic controller executes at least one program, and a programming assistance device for creating the program. In this visualization method, The programmable logic controller executes multiple programs through a multi-core processor including multiple cores. The program execution time measuring unit measures the execution time of the program executed in each of the plurality of cores. The arithmetic unit calculates a waiting time generated in order to make the start timing of execution of the termination processing executed in each of the plurality of cores consistent, the termination processing being executed each time the execution of the program ends. a termination process execution time measurement unit that measures the execution time of the termination process executed in each of the plurality of cores, The display unit displays the execution time of the program, the waiting time, and the execution time of the end process for each of the plurality of cores on a screen of the programming support device.
7. A non-transitory computer-readable recording medium having a program recorded thereon, the program causing a computer that executes a plurality of programs using a multi-core processor including a plurality of cores to function as the following means: a program execution time measurement unit that measures an execution time of a program executed in each of the plurality of cores; an end processing execution time measuring unit that measures an execution time of an end processing executed in each of the plurality of cores, the end processing being executed each time execution of the program ends; a calculation unit that calculates a waiting time generated to make the start timing of execution of the end processing executed in each of the plurality of cores consistent; a storage unit that stores monitoring information including information on the execution time of the program, information on the execution time of the end process, and information on the waiting time; as well as The monitoring information response unit transmits a monitoring information response including the monitoring information stored in the storage unit in response to a monitoring information request for acquiring monitoring information displayed on the screen.
Citation Information
Patent Citations
Programmable controller
JP1995121212A
Numerical Controller With Auxiliary Command Execution Function
CN103207588A
Controller, information processing apparatus, and program
CN103995500A