WO2023243012A1 - 制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラム - Google Patents

制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラム Download PDF

Info

Publication number
WO2023243012A1
WO2023243012A1 PCT/JP2022/024002 JP2022024002W WO2023243012A1 WO 2023243012 A1 WO2023243012 A1 WO 2023243012A1 JP 2022024002 W JP2022024002 W JP 2022024002W WO 2023243012 A1 WO2023243012 A1 WO 2023243012A1
Authority
WO
WIPO (PCT)
Prior art keywords
monitor information
execution time
program
information
size
Prior art date
Application number
PCT/JP2022/024002
Other languages
English (en)
French (fr)
Inventor
啓太 山崎
栄太郎 日置
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to JP2022565638A priority Critical patent/JP7221465B1/ja
Priority to PCT/JP2022/024002 priority patent/WO2023243012A1/ja
Publication of WO2023243012A1 publication Critical patent/WO2023243012A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts

Definitions

  • the present disclosure relates to a control system, a programmable logic controller, a visualization method, and a program.
  • Patent Document 1 discloses a technique for monitoring and outputting the execution time of a subroutine executed in a PLC to a programming console.
  • each time a PLC finishes executing a program it executes an end process that includes processes such as checking the operation of the PLC and logging process to collect device data. Then, the PLC repeatedly executes the scan, with the process including the program execution process and the end process as one scan.
  • the execution time of the end process is not measured and the execution time of the end process cannot be confirmed, making it difficult to investigate the cause if there is a problem with the end process. There's a problem.
  • the present disclosure has been made in view of the above circumstances, and provides a control system, a programmable logic controller, a visualization method, and a program that can check the execution time of an end process executed every time the execution of a program ends.
  • the purpose is to provide.
  • control system includes: A control system including a programmable logic controller that executes at least one program, and a programming support device for creating the program, end processing execution time measuring means for measuring the execution time of an end processing executed each time execution of the program ends; Display means for displaying the execution time of the end process on the screen of the programming support device.
  • control system a programmable logic controller, a visualization method, and a program that can confirm the execution time of an end process executed every time execution of a program ends.
  • a diagram showing a functional configuration of a control system according to an embodiment Block diagram showing the hardware configuration of PLC according to the embodiment
  • a block diagram showing a hardware configuration of a programming support device according to an embodiment Diagram for explaining areas of a storage unit in which monitor information according to an embodiment is stored
  • a diagram showing an example of monitor information displayed on a screen according to an embodiment A diagram showing an example of monitor information displayed on a screen according to an embodiment
  • the control system 1 is a system for controlling an FA (Factory Automation) device (not shown) connected to a PLC.
  • the control system 1 includes a PLC 100 and a programming support device 200, as shown in FIG.
  • the PLC 100 is communicably connected to the programming support device 200 via a network cable or wirelessly (not shown).
  • the PLC 100 is a device for controlling FA equipment, and executes a program created by a user.
  • the PLC 100 of this embodiment has a multi-core processor including a plurality of processor cores, and executes programs by the multi-core processor.
  • a processor core included in a multi-core processor will be simply referred to as a "core.”
  • the programming support device 200 is a device for creating a program to be executed by the PLC 100.
  • a programming tool is installed in the programming support device 200.
  • the programming tool is an application for creating a program to be executed on the PLC 100.
  • a user creates a program to be executed by the PLC 100 using a programming tool.
  • the programming tool has a function of visualizing the performance of the PLC 100 when the program is executed, and the user uses the programming tool to check the performance of the PLC 100. Indices indicating the performance of the PLC 100 include scan time, which will be described later.
  • the PLC 100 executes end processing after the user executes the creation program.
  • End processing is processing that is executed every time execution of a program ends, and includes various processing.
  • the content of the end process may be automatically set when the program is created, or may be set in the programming support device 200 by the user who created the program.
  • the end processing includes, for example, a process of checking the operation of the PLC 100, a logging process of collecting device data of the PLC, a process of reading and writing data from an external device, a process of resetting a watchdog timer, and the like.
  • the processor core of the PLC 100 repeatedly executes scans, including program processing, standby processing, and end processing as one scan.
  • the time required to execute one scan is called “scan time.”
  • the scan time is determined by the sum of the program execution time, the standby processing execution time, and the end processing execution time.
  • the execution time of this standby process will be referred to as "wait time”.
  • the control system 1 of this embodiment makes it possible to visualize the scan time and the details of the scan time.
  • FIG. 2 shows the hardware configuration of the PLC 100.
  • the PLC 100 includes a multi-core processor 11 that executes various processes, a main memory section 12 used as a work area of the multi-core processor 11, an auxiliary memory section 13 that stores various data used for processing of the multi-core processor 11, and a programming memory section 12. It has a first communication unit 14 for communicating with external devices including the support device 200, and a second communication unit 15 for communicating with FA equipment.
  • the main storage section 12 , the auxiliary storage section 13 , the first communication section 14 , and the second communication section 15 are all connected to the multi-core processor 11 via a bus 16 .
  • the multi-core processor 11 is a CPU (Central Processing Unit) that has multiple cores.
  • the multi-core processor 11 implements various functions of the PLC 100 by executing programs stored in the auxiliary storage unit 13.
  • the main storage unit 12 includes a RAM (Random Access Memory). A program is loaded into the main storage section 12 from the auxiliary storage section 13 .
  • the main storage unit 12 is used as a work area for the multi-core processor 11.
  • the auxiliary storage unit 13 includes a nonvolatile memory represented by EEPROM (Electrically Erasable Programmable Read-Only Memory).
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • the auxiliary storage unit 13 stores various data used in processing by the multi-core processor 11 in addition to programs.
  • the auxiliary storage unit 13 supplies data used by the multi-core processor 11 to the multi-core processor 11 according to instructions from the multi-core processor 11, and stores data supplied from the multi-core processor 11.
  • 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 a signal from an external device and outputs data indicated by this signal to the multi-core processor 11. Further, the first communication unit 14 transmits a signal indicating data output from the multi-core processor 11 to an external device.
  • 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 a signal from the FA device and outputs data indicated by this signal to the multi-core processor 11. Further, the second communication unit 15 transmits a signal indicating data output from the multi-core processor 11 to the FA equipment.
  • FIG. 3 shows the hardware configuration of the programming support device 200.
  • the programming support device 200 includes a processor 21 that executes various processes, a main storage section 22 used as a work area of the processor 21, an auxiliary storage section 23 that stores various data used for processing of the processor 21, and a PLC 100. It has a communication section 24 for communicating with external devices including, an input section 25 for acquiring input information, and an output section 26 for presenting various information.
  • the main storage section 22 , the auxiliary storage section 23 , the communication section 24 , the input section 25 , and the output section 26 are all connected to the processor 21 via a bus 27 .
  • the processor 21 includes a CPU.
  • the processor 21 implements various functions of the programming support device 200 by executing programs stored in the auxiliary storage unit 23.
  • the main storage unit 22 includes a RAM. A program is loaded into the main storage section 22 from the auxiliary storage section 23 .
  • the main storage unit 22 is used as a work area for the processor 21.
  • the auxiliary storage unit 23 includes a nonvolatile memory typified by EEPROM.
  • the auxiliary storage unit 23 stores various data used in processing by the processor 21 in addition to programs.
  • the auxiliary storage unit 23 supplies data used by the processor 21 to the processor 21 according to instructions from the processor 21, and stores data supplied from the processor 21.
  • the communication unit 24 includes a network interface circuit for communicating with external devices including the PLC 100.
  • the communication unit 24 receives a signal from an external device and outputs data indicated by this signal to the processor 21. Furthermore, the communication unit 24 transmits a signal indicating data output from the processor 21 to an external device.
  • the input unit 25 includes input devices such as input keys and pointing devices.
  • the input unit 25 acquires information input by the user of the programming support device 200 and notifies the processor 21 of the acquired information.
  • the output unit 26 includes output devices such as an LCD (Liquid Crystal Display) and a speaker.
  • the output unit 26 may constitute a touch screen that is integrally formed with a pointing device that constitutes the input unit 25.
  • the output unit 26 presents various information to the user according to instructions from the processor 21.
  • the multi-core processor 11 has four cores "Core1”, “Core2”, “Core3” and “Core4", and the programs created by the user are referred to as “PRG1", “PRG2” and “PRG3". It is assumed that “PRG1” and “PRG2” are executed by “Core1”, and “PRG3” is executed by "Core2”. In addition, “Core1” executes the end processing of “FUNC1” and “FUNC2” after executing “PRG1” and “PRG2”, and “Core2” executes the end processing of “FUNC3” after executing “PRG3”. shall be carried out.
  • the PLC 100 includes a program execution time measurement unit 101 that measures program execution time, an end processing execution time measurement unit 102 that measures end processing execution time, and a calculation unit 103 that calculates waiting time.
  • a storage unit 104 that stores monitor information, which will be described later, a size information response unit 105 that transmits a size information response including size information of monitor information to the programming support device 200, and a programming support device that sends a monitor information response including monitor information to the programming support device. 200.
  • the program execution time measuring unit 101 measures the execution time of a program executed in each of a plurality of cores.
  • the program execution time measuring unit 101 is realized by the multi-core processor 11. Note that the program execution time measuring section 101 is an example of a program execution time measuring means.
  • the program execution time measuring unit 101 measures the execution times of “PRG1” and “PRG2” executed by “Core1” as “3.000 [ms]” and “7.000 [ms]”, respectively.
  • the execution time of "PRG3" executed by "Core2” is measured as "4.600 [ms]”.
  • the end processing execution time measurement unit 102 measures the execution time of the end processing executed in each of the plurality of cores.
  • the end processing execution time measuring unit 102 is realized by the multi-core processor 11. Note that the end processing execution time measuring unit 102 is an example of an end processing execution time measuring means.
  • the end processing execution time measuring unit 102 measures the execution times of "FUNC1" and "FUNC2" executed by “Core1” as "5.000 [ms]” and "3.000 [ms]", respectively. However, the execution time of "FUNC3" executed by "Core2” is measured as "8.000 [ms]”.
  • the calculation unit 103 calculates the waiting time that occurs in order to match the start timing of the end processing executed in each of the plurality of cores. Furthermore, the calculation unit 103 stores information on program execution time, end processing execution time, and waiting time in the storage unit 104. Arithmetic unit 103 is realized by multi-core processor 11. Note that the calculation unit 103 is an example of calculation means.
  • the calculation unit 103 subtracts "4.600 [ms]” from the sum of the execution times of the programs of "Core 1", "10.000 [ms]", and calculates "5.400 [ms]” for "Core 2". Calculated as waiting time.
  • the calculation unit 103 calculates, for "Core1", the execution times of "PRG1” and “PRG2” of "3.000 [ms]” and “7.000 [ms]”, and the execution times of "FUNC1" and “FUNC2". "5.000 [ms]” and "3.000 [ms]", for "Core2", the execution time of "PRG3” is "4.600 [ms]", the execution time of "FUNC3” is "8.000 [ms]” ]” and a waiting time “5.400 [ms]” are stored in the storage unit 104.
  • the calculation unit 103 calculates statistical information on the program execution time, end processing execution time, and waiting time of each core, and stores the statistical information in the storage unit 104.
  • the statistical information is, for example, maximum value, minimum value, moving average, etc.
  • the calculation unit 103 measures the total number of times the program has been executed in each core, and stores information on the total number of times the program has been executed in the storage unit 104 .
  • the storage unit 104 stores monitor information that includes information on program execution time, end processing execution time information, waiting time information, and information on the cumulative number of program executions.
  • the monitor information is information displayed on the screen of the programming support device 200.
  • the storage unit 104 is realized by the auxiliary storage unit 13. Note that the storage unit 104 is an example of storage means.
  • FIG. 4 shows a schematic diagram of the area of the storage unit 104 in which monitor information is stored.
  • the storage unit 104 has an area for storing information on a plurality of items including monitor information, and the calculation unit 103 stores information on items such as measured execution time, calculated waiting time, etc.
  • the monitor information is updated by comparing it with the information stored in the area corresponding to the item.
  • the monitor information in FIG. 4 includes information on the program execution time, the cumulative number of program executions, the waiting time, and the end processing execution time for each of the plurality of cores. Further, the program execution time, the total number of program executions, and the end processing execution time each include a current value indicating the latest value and statistical information.
  • the size information response unit 105 determines the size of the monitor information stored in the storage unit 104 in response to a size information request transmitted from the programming support device 200, and generates a size information response that includes size information indicating the determined size. , to the programming support device 200.
  • the size information response unit 105 is realized by the multi-core processor 11 and the first communication unit 14. Note that the size information response unit 105 is an example of size information response means.
  • the size information request is a request sent from the programming support device 200, and is a request to obtain size information of monitor information.
  • the size information of the monitor information is information indicating the size of the monitor information excluding free space in the area of the storage unit 104 shown in FIG. 4.
  • the size information response unit 105 when the size information response unit 105 receives a size information request, the size information response unit 105 selects lines 1 to 10, lines 14 to 20, lines 24 to 33 in the area of the storage unit 104 shown in FIG. The size of the monitor information is calculated, and a size information response including size information indicating the calculated size is transmitted to the programming support device 200.
  • the obtained size will be referred to as "X [byte]".
  • the monitor information response unit 106 transmits a monitor information response that includes the monitor information stored in the storage unit 104 to the programming support device 200 in response to the monitor information request transmitted from the programming support device 200.
  • the monitor information response unit 106 divides the monitor information and sends it to the programming support device 200 by including the monitor information of the size specified in the monitor information request in the monitor information response.
  • the monitor information response unit 106 is realized by the multi-core processor 11 and the first communication unit 14. Note that the monitor information response unit 106 is an example of monitor information response means.
  • the monitor information request is a request sent from the programming support device 200, and is a request to obtain monitor information.
  • the monitor information request specifies the size of monitor information to be included in the monitor information response.
  • the monitor information response unit 106 when the monitor information response unit 106 receives a monitor information request specifying a size of “0.6X [byte]”, the monitor information response unit 106 receives “0.6 .6X [byte]” worth of monitor information is specified. For example, the monitor information response unit 106 sends monitor information whose size is “0.6 information and identification. Then, the monitor information response unit 106 transmits a monitor information response including the specified information to the programming support device 200. Further, when the monitor information response unit 106 receives the next monitor information request specifying the size of “0.4 Include the transmission information in the monitor information response and send it. That is, the monitor information response unit 106 transmits to the programming support device 200 a monitor information response that includes information on the 24th to 33rd lines in the area of the storage unit 104 shown in FIG.
  • the programming support device 200 includes a size information acquisition unit 201 that acquires size information of monitor information, a monitor information acquisition unit 202 that acquires monitor information, and a display unit 203 that displays monitor information on a screen. Equipped with
  • FIG. 5 shows how the programming support device 200 displays the monitor information on the screen after acquiring the monitor information.
  • the window 300 is displayed on the screen by the function of the programming tool installed in the programming support device 200.
  • the window 300 in FIG. 5 includes a button 301 to start displaying monitor information, a button 302 to end displaying monitor information, a bar graph 303 to show the breakdown of scan time in each core, and a button 302 to start displaying monitor information.
  • a table 304 showing scan time values in the core a radio button 305 for displaying the current value in the table 309 or table 310, a radio button 306 for displaying the maximum value in the table 309 or table 310, and a program.
  • This includes a button 307 for displaying a table 309 of execution times of programs, a button 308 for displaying a table 310 of execution times of end processing, and a table 309 of program execution times.
  • a table 310 of end processing execution times is displayed instead of a table 309 of program execution times, as shown in FIG.
  • a bar graph 303 shows the ratio of program execution time, waiting time, and end processing execution time to the entire scan time.
  • Table 304 shows program execution time, waiting time, end processing execution time, and scan time in each core.
  • the program execution time table 309 in FIG. 5 shows the execution time and cumulative number of executions for each program executed by each core.
  • the end processing execution time table 310 in FIG. 6 shows the execution time for each end processing executed by each core and the total execution time of the end processing in each core.
  • the size information acquisition unit 201 transmits a size information request to the PLC 100 to acquire size information of monitor information to be displayed on the screen.
  • the size information acquisition section 201 is realized by the processor 21, the communication section 24, and the input section 25. Note that the size information acquisition unit 201 is an example of size information acquisition means.
  • the size information acquisition unit 201 transmits a size information request to the PLC 100 to acquire size information of monitor information to be displayed on the window 300. Then, the size information acquisition unit 201 receives the size information response including the size information transmitted from the size information response unit 105.
  • the monitor information acquisition unit 202 compares the size indicated by the size information included in the size information response transmitted from the size information response unit 105 with the size of information that can be included in one monitor information response, and Find the number of times monitor information requests are sent to. Then, the monitor information acquisition unit 202 transmits a monitor information request for acquiring monitor information to be displayed on the screen, which specifies the size of the monitor information to be included in the monitor information response, the number of times the monitor information request is sent.
  • the monitor information acquisition unit 202 is realized by the processor 21 and the communication unit 24. Note that the monitor information acquisition unit 202 is an example of monitor information acquisition means.
  • the size of information that can be included in one monitor information response is, for example, the size of information that can be included in one packet in communication between programming support device 200 and PLC 100.
  • the size of information that can be included in one monitor information response is assumed to be "0.6X [byte]”. If the size indicated by the size information included in the size information response is “X [bytes]”, the monitor information acquisition unit 202 determines that two packets are required to acquire the monitor information to be displayed on the screen, and The number of times information requests are sent is determined to be two. The monitor information acquisition unit 202 transmits two monitor information requests to the PLC 100 to acquire monitor information.
  • the monitor information acquisition unit 202 first transmits a first monitor information request specifying a size of "0.6X [byte]" to the PLC 100.
  • the monitor information acquisition unit 202 receives a monitor information response that includes “0.6X [byte]” worth of monitor information from the monitor information response unit 106.
  • the monitor information response to the first monitor information request includes information on the 1st to 10th lines and the 14th to 20th lines in the area of the storage unit 104 shown in FIG.
  • the monitor information acquisition unit 202 Upon receiving the monitor information response to the first monitor information request, transmits a second monitor information request specifying a size of "0.4X [byte]" to the PLC 100. Then, the monitor information acquisition unit 202 receives the monitor information response containing the remaining monitor information from the monitor information response unit 106.
  • the monitor information response to the second monitor information request includes information on the 24th to 33rd lines in the area of the storage unit 104 shown in FIG.
  • the monitor information acquisition unit 202 acquires the monitor information on the 1st to 10th lines, the 14th to 20th lines, and the 24th to 33rd lines of the area of the storage unit 104 shown in FIG. do.
  • 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 section 203 is realized by the processor 21 and the output section 26. Note that the display unit 203 is an example of a display means.
  • the display unit 203 displays the program execution time, waiting time, end processing execution time, etc., as shown in a window 300 in FIG. 5, based on the monitor information acquired by the monitor information acquisition unit 202.
  • FIG. 7 is a flowchart showing the measurement process executed by the PLC 100 according to the present embodiment.
  • the measurement process in FIG. 7 is, for example, a process that is executed when an operation to execute a program is received from a user.
  • the program execution time measuring unit 101 measures the execution time of a program executed in each of a plurality of cores (step S101).
  • the program execution time measuring unit 101 measures the execution time of “PRG1” and “PRG2” executed by “Core1” and the execution time of “PRG3” executed by “Core2”.
  • the program execution time measuring unit 101 determines whether the execution of the program of each core has ended (step S102). When the program execution time measurement unit 101 determines that the execution of the program on each core has ended (step S102; YES), the end processing execution time measurement unit 102 measures the execution time of the end processing executed on each of the plurality of cores. is measured (step S103). On the other hand, if the program execution time measurement unit 101 determines that the execution of the program of each core has not finished (step S102; NO), it remains on standby.
  • the end processing execution time measuring unit 102 determines whether execution of the end processing of each core has ended (step S104). When the end processing execution time measurement unit 102 determines that the execution of the end processing of each core has ended (step S104; YES), the calculation unit 103 calculates the waiting time for each core (step S105). On the other hand, if the end processing execution time measurement unit 102 determines that the execution of the end processing of each core has not been completed (step S104; NO), it remains on standby.
  • the calculation unit 103 stores information on the execution time of the program, information on the execution time of the end process, and information on the waiting time in the storage unit 104 (step S106).
  • FIG. 8 is a sequence diagram showing the processing executed between the PLC 100 and the programming support device 200 according to the present embodiment.
  • the size information acquisition unit 201 of the programming support device 200 transmits a size information request to the PLC 100 for acquiring size information of monitor information to be displayed on the screen (step S201).
  • the size information acquisition unit 201 transmits a size information request to the PLC 100 to acquire size information of monitor information to be displayed on the window 300.
  • the size information response unit 105 of the PLC 100 receives the size information request from the size information acquisition unit 201, it calculates the size of the monitor information stored in the storage unit 104 (step S202). Then, the size information response unit 105 transmits a size information response including size information indicating the calculated size to the programming support device 200 (step S203).
  • the size information response unit 105 when the size information response unit 105 receives a size information request, the size information response unit 105 selects lines 1 to 10, lines 14 to 20, lines 24 to 33 in the area of the storage unit 104 shown in FIG. The size of the monitor information is calculated as "X [byte]". Then, the size information response unit 105 transmits a size information response including size information indicating the calculated size to the programming support device 200.
  • the monitor information acquisition unit 202 of the programming support device 200 determines the size indicated by the size information included in the size information response and the information that can be included in one monitor information response.
  • the number of times n (n is a natural number greater than or equal to 1) of monitor information requests to be sent to the PLC 100 is determined by comparing the size and size (step S204). Then, the monitor information acquisition unit 202 transmits to the PLC 100 a monitor information request for acquiring monitor information to be displayed on the screen, which specifies the size of the monitor information to be included in the monitor information response (step S205).
  • monitor information response unit 106 of the PLC 100 When the monitor information response unit 106 of the PLC 100 receives the monitor information request from the monitor information acquisition unit 202, it transmits a monitor information response that includes monitor information of the specified size to the programming support device 200 (step S206).
  • step S205 and step S206 are repeated the number of times of transmission n.
  • the monitor information acquisition unit 202 in order to obtain the monitor information to be displayed on the screen, the number of times the monitor information request is sent is determined to be two. Then, the monitor information acquisition unit 202 transmits a first monitor information request specifying a size of "0.6X [byte]" to the PLC 100.
  • the monitor information response unit 106 receives the first monitor information request, it transmits the first monitor information response including the monitor information of the size specified in the first monitor information request to the programming support device 200. .
  • the monitor information acquisition unit 202 Upon receiving the first monitor information response, the monitor information acquisition unit 202 then transmits a second monitor information request specifying a size of "0.4X [byte]" to the PLC 100. Then, upon receiving the second monitor information request, the monitor information response unit 106 sends a second monitor information response including the monitor information of the size specified in the second monitor information request to the programming support device 200. Send. Then, the monitor information acquisition unit 202 receives the second monitor information response.
  • the display unit 203 of the programming support device 200 displays the monitor information included in the received monitor information responses on the screen (step S207).
  • the display unit 203 displays the program execution time, waiting time, end processing execution time, etc., as shown in a window 300 in FIG. 5, based on the monitor information acquired by the monitor information acquisition unit 202.
  • the present embodiment it is possible to measure the program execution time, waiting time, and end processing execution time for each core, and to visualize these times. This allows the user to optimize the allocation of programs and end processing to each core and easily distribute the load. Further, the user can easily consider shortening the scan time and investigate the cause of trouble when executing a program created by the user.
  • the programming support device specifies the size of monitor information to be displayed on the screen, and monitor information of the specified size is transmitted from the PLC. Therefore, in communication between the programming support device and the PLC, unnecessary information other than the monitor information displayed on the screen is not transmitted or received, so that the communication load can be minimized.
  • the programming support device grasps the size information of the monitor information before acquiring the monitor information, and if the monitor information cannot fit into one packet, acquires the monitor information using a plurality of packets. Thereby, when the number of programs to be executed changes, monitor information can be acquired flexibly.
  • the program execution time measurement unit 101 may further measure the execution time of an interrupt program included in the program.
  • the display unit 203 may display the execution time of the interrupt program on the screen.
  • the storage unit 104 further stores information on the execution time of the interrupt program and information on the number of times the interrupt program is executed, and the monitor information includes information on the execution time of the interrupt program and information on the number of times the interrupt program is executed. Contains information.
  • the user when designing an interrupt program, the user can check how much the interrupt program will affect the scan time, so the user can easily design the interrupt program. Furthermore, if the scan time increases due to the design of the interrupt program, the user can easily identify the cause.
  • the monitor information is displayed on the screen of the programming support device 200, but the present invention is not limited to this.
  • the monitor information may be displayed on the screen of another device connected to the PLC 100, or may be displayed on the screen of the PLC 100.
  • the PLC 100 and programming support device 200 according to the embodiment can be used to control the personal computer or information terminal device. It is also possible to function as a support device 200.
  • the distribution method of such a program is arbitrary; for example, it may be stored and distributed on 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 distributed via a communication network such as the Internet.
  • a computer-readable recording medium such as a CD-ROM (Compact Disk Read-Only Memory), a DVD (Digital Versatile Disk), or a memory card.
  • a communication network such as the Internet.
  • control system a programmable logic controller, a visualization method, and a program that can confirm the execution time of an end process executed every time execution of a program ends.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

少なくとも1つのプログラムを実行するPLC(100)と、プログラムを作成するためのプログラミング支援装置(200)と、を含む制御システム(1)において、エンド処理実行時間計測部(102)は、一つのスキャンの中でプログラムが実行された後に実行されるエンド処理の実行時間を計測する。また、表示部(203)は、エンド処理の実行時間をプログラミング支援装置(200)の画面に表示する。

Description

制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラム
 本開示は、制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラムに関する。
 プログラマブルロジックコントローラ(Programmable Logic Controller:PLC)においてプログラムが実行された際のパフォーマンスの可視化を目的として、プログラムの実行時間を表示する技術が知られている。例えば、特許文献1には、PLCにおいて実行されるサブルーチンの実行時間を、プログラミングコンソールにモニタ出力する技術が開示されている。
特開平7-121212号公報
 一般的に、PLCは、プログラムの実行が終了する度に、PLCの動作をチェックする処理、デバイスデータを収集するロギング処理等の処理が含まれるエンド処理を実行する。そして、PLCは、プログラム実行処理及びエンド処理を含む処理を一つのスキャンとして、スキャンを繰り返し実行する。上記の特許文献1のような技術では、エンド処理の実行時間は計測されておらず、エンド処理の実行時間が確認できないため、エンド処理にトラブルがあった場合に原因の調査が困難になるという問題がある。
 本開示は、上記事情に鑑みてなされたものであり、プログラムの実行が終了する度に実行されるエンド処理の実行時間を確認することが可能な制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラムを提供することを目的とする。
 上記目的を達成するために、本開示に係る制御システムは、
 少なくとも1つのプログラムを実行するプログラマブルロジックコントローラと、前記プログラムを作成するためのプログラミング支援装置と、を含む制御システムにおいて、
 前記プログラムの実行が終了する度に実行されるエンド処理の実行時間を計測するエンド処理実行時間計測手段と、
 前記エンド処理の実行時間を前記プログラミング支援装置の画面に表示する表示手段と、を備える。
 本開示によれば、プログラムの実行が終了する度に実行されるエンド処理の実行時間を確認することが可能な制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラムを提供することができる。
実施形態に係る制御システムの機能構成を示す図 実施形態に係るPLCのハードウェア構成を示すブロック図 実施形態に係るプログラミング支援装置のハードウェア構成を示すブロック図 実施形態に係るモニタ情報が格納された記憶部の領域を説明するための図 実施形態に係る画面に表示されるモニタ情報の例を示す図 実施形態に係る画面に表示されるモニタ情報の例を示す図 実施形態に係る計測処理を示すフローチャート 実施形態に係るPLCとプログラミング支援装置との間で実行される処理を示すシーケンス図 変形例に係る画面に表示されるモニタ情報の例を示す図
(実施形態)
 実施形態に係る制御システム1は、PLCに接続された、図示しないFA(Factory Automation)機器を制御するためのシステムである。制御システム1は、図1に示すように、PLC100と、プログラミング支援装置200と、を含む。PLC100は、図示しないネットワークケーブル又は無線によりプログラミング支援装置200と通信可能に接続される。
 PLC100は、FA機器を制御するための装置であり、ユーザが作成したプログラムを実行する。本実施形態のPLC100は、複数のプロセッサコアを含むマルチコアプロセッサを有し、プログラムをマルチコアプロセッサにより実行する。以下、マルチコアプロセッサに含まれるプロセッサコアを、単に「コア」という。
 プログラミング支援装置200は、PLC100で実行されるプログラムを作成するための装置である。プログラミング支援装置200には、プログラミングツールがインストールされている。プログラミングツールは、PLC100で実行するプログラムを作成するためのアプリケーションである。ユーザは、プログラミングツールを用いて、PLC100で実行されるプログラムを作成する。また、プログラミングツールは、プログラムが実行された際のPLC100のパフォーマンスを可視化する機能を有し、ユーザは、プログラミングツールを用いて、PLC100のパフォーマンスを確認する。PLC100のパフォーマンスを示す指標には、後述するスキャンタイムが含まれる。
 PLC100は、ユーザが作成プログラムを実行した後に、エンド処理を実行する。エンド処理とは、プログラムの実行が終了する度に実行される処理であり、様々な処理が含まれる。エンド処理の内容は、プログラムの作成に伴い自動的に設定されるもの、プログラムを作成したユーザによりプログラミング支援装置200において設定されるもの等がある。エンド処理は、例えば、PLC100の動作をチェックする処理、PLCのデバイスデータを収集するロギング処理、外部機器からのデータの読み出し及び書き込み処理、ウォッチドックタイマのリセット処理等である。
 複数のコアのそれぞれにおいてプログラムが実行される場合、それぞれのコアにおいて実行されるエンド処理の実行の開始タイミングを一致させる必要がある。したがって、プログラムの実行時間が一番長いコアとエンド処理の開始タイミングを合わせるため、その他のコアは、プログラムの実行時間が一番長いコアのプログラムの実行が終了するまで待機するための待機処理を実行する。なお、プログラムの実行時間が一番長いコアは、待機処理は行われない。
 PLC100のプロセッサコアは、プログラムの処理と、待機処理と、エンド処理を一つのスキャンとして、スキャンを繰り返し実行する。一つのスキャンの実行に要する時間を「スキャンタイム」という。スキャンタイムは、プログラムの実行時間と、待機処理の実行時間と、エンド処理の実行時間との和により求められる。以下、この待機処理の実行時間を、「待ち時間」という。本実施形態の制御システム1は、スキャンタイム及びスキャンタイムの内訳を可視化することを可能にする。
 図2に、PLC100のハードウェア構成を示す。
 PLC100は、種々の処理を実行するマルチコアプロセッサ11と、マルチコアプロセッサ11の作業領域として用いられる主記憶部12と、マルチコアプロセッサ11の処理に用いられる種々のデータを記憶する補助記憶部13と、プログラミング支援装置200を含む外部の装置と通信するための第1通信部14と、FA機器と通信するための第2通信部15と、を有する。主記憶部12、補助記憶部13、第1通信部14、及び第2通信部15はいずれも、バス16を介してマルチコアプロセッサ11に接続される。
 マルチコアプロセッサ11は、複数のコアを有するCPU(Central Processing Unit)である。マルチコアプロセッサ11は、補助記憶部13に記憶されるプログラムを実行することにより、PLC100の種々の機能を実現する。
 主記憶部12は、RAM(Random Access Memory)を含む。主記憶部12には、補助記憶部13からプログラムがロードされる。そして、主記憶部12は、マルチコアプロセッサ11の作業領域として用いられる。
 補助記憶部13は、EEPROM(Electrically Erasable Programmable Read-Only Memory)に代表される不揮発性メモリを含む。補助記憶部13は、プログラムの他に、マルチコアプロセッサ11の処理に用いられる種々のデータを記憶する。補助記憶部13は、マルチコアプロセッサ11の指示に従って、マルチコアプロセッサ11によって利用されるデータをマルチコアプロセッサ11に供給し、マルチコアプロセッサ11から供給されたデータを記憶する。
 第1通信部14は、プログラミング支援装置200を含む外部の装置と通信するためのネットワークインタフェース回路を含む。第1通信部14は、外部の装置から信号を受信して、この信号により示されるデータをマルチコアプロセッサ11へ出力する。また、第1通信部14は、マルチコアプロセッサ11から出力されたデータを示す信号を外部の装置へ送信する。
 第2通信部15は、PLC100が制御するFA機器と通信するためのネットワークインタフェース回路を含む。第2通信部15は、FA機器から信号を受信して、この信号により示されるデータをマルチコアプロセッサ11へ出力する。また、第2通信部15は、マルチコアプロセッサ11から出力されたデータを示す信号をFA機器へ送信する。
 図3に、プログラミング支援装置200のハードウェア構成を示す。
 プログラミング支援装置200は、種々の処理を実行するプロセッサ21と、プロセッサ21の作業領域として用いられる主記憶部22と、プロセッサ21の処理に用いられる種々のデータを記憶する補助記憶部23と、PLC100を含む外部の装置と通信するための通信部24と、入力された情報を取得する入力部25と、種々の情報を提示する出力部26と、を有する。主記憶部22、補助記憶部23、通信部24、入力部25及び出力部26はいずれも、バス27を介してプロセッサ21に接続される。
 プロセッサ21は、CPUを含む。プロセッサ21は、補助記憶部23に記憶されるプログラムを実行することにより、プログラミング支援装置200の種々の機能を実現する。
 主記憶部22は、RAMを含む。主記憶部22には、補助記憶部23からプログラムがロードされる。そして、主記憶部22は、プロセッサ21の作業領域として用いられる。
 補助記憶部23は、EEPROMに代表される不揮発性メモリを含む。補助記憶部23は、プログラムの他に、プロセッサ21の処理に用いられる種々のデータを記憶する。補助記憶部23は、プロセッサ21の指示に従って、プロセッサ21によって利用されるデータをプロセッサ21に供給し、プロセッサ21から供給されたデータを記憶する。
 通信部24は、PLC100を含む外部の装置と通信するためのネットワークインタフェース回路を含む。通信部24は、外部の装置から信号を受信して、この信号により示されるデータをプロセッサ21へ出力する。また、通信部24は、プロセッサ21から出力されたデータを示す信号を外部の装置へ送信する。
 入力部25は、入力キー、ポインティングデバイス等の入力デバイスを含む。入力部25は、プログラミング支援装置200のユーザによって入力された情報を取得して、取得した情報をプロセッサ21に通知する。
 出力部26は、LCD(Liquid Crystal Display)、スピーカ等の出力デバイスを含む。出力部26は、入力部25を構成するポインティングデバイスと一体的に形成されたタッチスクリーンを構成してもよい。出力部26は、プロセッサ21の指示に従って、種々の情報をユーザに提示する。
 次に、PLC100及びプログラミング支援装置200の機能について説明する。以下では、マルチコアプロセッサ11は、“Core1”、“Core2”、“Core3”及び“Core4”の4つのコアを有し、ユーザにより作成されたプログラムを、“PRG1”、“PRG2”及び“PRG3”とし、“PRG1”及び“PRG2”は“Core1”により実行され、“PRG3”は“Core2”により実行されるものとする。また、“Core1”は、“PRG1”及び“PRG2”の実行の後に、“FUNC1”及び“FUNC2”のエンド処理を実行し、“Core2”は“PRG3”の実行の後に“FUNC3”のエンド処理を実行するものとする。
 まず、図1のPLC100の機能について説明する。PLC100は、機能的には、プログラムの実行時間を計測するプログラム実行時間計測部101と、エンド処理の実行時間を計測するエンド処理実行時間計測部102と、待ち時間を算出する演算部103と、後述するモニタ情報が格納される記憶部104と、モニタ情報のサイズの情報を含むサイズ情報応答をプログラミング支援装置200に送信するサイズ情報応答部105と、モニタ情報を含むモニタ情報応答をプログラミング支援装置200に送信するモニタ情報応答部106と、を備える。
 プログラム実行時間計測部101は、複数のコアのそれぞれにおいて実行されるプログラムの実行時間を計測する。プログラム実行時間計測部101は、マルチコアプロセッサ11により実現される。なお、プログラム実行時間計測部101は、プログラム実行時間計測手段の一例である。
 例えば、プログラム実行時間計測部101は、“Core1”により実行される“PRG1”及び“PRG2”の実行時間を、それぞれ“3.000[ms]”及び“7.000[ms]”と計測し、“Core2”により実行される“PRG3”の実行時間を、“4.600[ms]”と計測する。
 エンド処理実行時間計測部102は、複数のコアのそれぞれにおいて実行されるエンド処理の実行時間を計測する。エンド処理実行時間計測部102は、マルチコアプロセッサ11により実現される。なお、エンド処理実行時間計測部102は、エンド処理実行時間計測手段の一例である。
 例えば、エンド処理実行時間計測部102は、“Core1”により実行される“FUNC1”及び“FUNC2”の実行時間を、それぞれ“5.000[ms]”及び“3.000[ms]”と計測し、“Core2”により実行される“FUNC3”の実行時間を、“8.000[ms]”と計測する。
 演算部103は、複数のコアのそれぞれにおいて実行されるエンド処理の実行の開始タイミングを一致させるために生じる待ち時間を算出する。また、演算部103は、プログラムの実行時間の情報、エンド処理の実行時間の情報、及び、待ち時間の情報を、記憶部104に格納する。演算部103は、マルチコアプロセッサ11により実現される。なお、演算部103は、演算手段の一例である。
 例えば、演算部103は、各コアのプログラムの実行時間を比較し、最も長いプログラムの実行時間が計測されたコアのプログラムの実行時間からその他のコアのプログラムの実行時間を減算することにより、待ち時間を算出する。この際、一つのコアにおいて複数のプログラムの実行時間が計測された場合には、それらのプログラムの実行時間の和を用いて、各コアのプログラム実行時間の比較を行う。“Core1”については、複数のプログラムの実行時間が計測されているので、演算部103は、プログラムの実行時間の和“10.000[ms](=3.000[ms]+7.000[ms])”を求め、“Core2”のプログラムの実行時間“4.600[ms]”と比較する。そして、演算部103は、“Core1”のプログラムの実行時間の和“10.000[ms]”から“4.600[ms]”を減算した“5.400[ms]”を“Core2”の待ち時間として算出する。
 そして、演算部103は、“Core1”について、“PRG1”及び“PRG2”の実行時間“3.000[ms]”及び“7.000[ms]”、“FUNC1”及び“FUNC2”の実行時間“5.000[ms]”及び“3.000[ms]”、“Core2”について、“PRG3”の実行時間“4.600[ms]”、“FUNC3”の実行時間“8.000[ms]”、待ち時間“5.400[ms]”を、記憶部104に格納する。
 また、演算部103は、各コアのプログラム実行時間、エンド処理実行時間及び待ち時間の統計情報を算出し、統計情報を記憶部104に格納する。統計情報とは、例えば、最大値、最小値、移動平均等である。また、演算部103は、各コアにおけるプログラムの累計実行回数を計測し、プログラムの累計実行回数の情報を記憶部104に格納する。
 記憶部104には、プログラムの実行時間の情報と、エンド処理の実行時間の情報と、待ち時間の情報と、プログラムの累計実行回数の情報と、が含まれるモニタ情報が格納される。モニタ情報は、プログラミング支援装置200の画面に表示させる情報である。記憶部104は、補助記憶部13により実現される。なお、記憶部104は、記憶手段の一例である。
 図4に、モニタ情報が格納された記憶部104の領域の模式図を示す。記憶部104は、モニタ情報の含まれる複数の項目の情報を格納するための領域を持っており、演算部103は、計測された実行時間、算出された待ち時間等の項目の情報と、それぞれの項目に対応する、領域に格納された情報とを比較して、モニタ情報の更新を行う。図4のモニタ情報には、複数のコアのそれぞれについて、プログラムの実行時間、プログラムの累計実行回数、待ち時間、及び、エンド処理の実行時間の情報が含まれる。また、プログラムの実行時間、プログラムの累計実行回数、及び、エンド処理の実行時間については、それぞれ、直近の値を示す現在値と、統計情報とが含まれる。
 サイズ情報応答部105は、プログラミング支援装置200から送信されるサイズ情報要求に応じて、記憶部104に格納されたモニタ情報のサイズを求め、求めたサイズを示すサイズ情報が含まれるサイズ情報応答を、プログラミング支援装置200に送信する。サイズ情報応答部105は、マルチコアプロセッサ11及び第1通信部14により実現される。なお、サイズ情報応答部105は、サイズ情報応答手段の一例である。
 サイズ情報要求とは、プログラミング支援装置200から送信される要求であって、モニタ情報のサイズ情報を取得するための要求である。モニタ情報のサイズ情報とは、図4に示す記憶部104の領域において、空き領域を除くモニタ情報のサイズを示す情報である。
 例えば、サイズ情報応答部105は、サイズ情報要求を受信すると、図4に示す記憶部104の領域において、1行目~10行目、14行目~20行目、24行目~33行目のモニタ情報のサイズを算出し、算出したサイズを示すサイズ情報を含むサイズ情報応答を、プログラミング支援装置200に送信する。以下、求められたサイズを、“X[byte]”とする。
 モニタ情報応答部106は、プログラミング支援装置200から送信されるモニタ情報要求に応じて、記憶部104に格納されたモニタ情報が含まれるモニタ情報応答を、プログラミング支援装置200に送信する。ここで、モニタ情報応答部106は、モニタ情報要求において指定されたサイズ分のモニタ情報を、モニタ情報応答に含めることにより、モニタ情報を分割してプログラミング支援装置200に送信する。モニタ情報応答部106は、マルチコアプロセッサ11及び第1通信部14により実現される。なお、モニタ情報応答部106は、モニタ情報応答手段の一例である。
 モニタ情報要求とは、プログラミング支援装置200から送信される要求であって、モニタ情報を取得するための要求である。モニタ情報要求には、モニタ情報応答に含めるモニタ情報のサイズが指定されている。
 例えば、モニタ情報応答部106は、“0.6X[byte]”のサイズが指定されたモニタ情報要求を受信すると、記憶部104に格納された“X[byte]”のモニタ情報のうち“0.6X[byte]”分のモニタ情報を特定する。例えば、モニタ情報応答部106は、サイズが“0.6X[byte]”分のモニタ情報を、図4に示す記憶部104の領域において1行目~10行目、14行目~20行目の情報と特定する。そして、モニタ情報応答部106は、特定した情報を含むモニタ情報応答を、プログラミング支援装置200に送信する。また、モニタ情報応答部106は、次に“0.4X[byte]”のサイズが指定されたモニタ情報要求を受信すると、記憶部104に格納されたモニタ情報のうち、プログラミング支援装置200に未送信の情報をモニタ情報応答に含めて送信する。すなわち、モニタ情報応答部106は、図4に示す記憶部104の領域において24行目~33行目の情報が含まれるモニタ情報応答をプログラミング支援装置200に送信する。
 次に、図1のプログラミング支援装置200の機能について説明する。プログラミング支援装置200は、機能的には、モニタ情報のサイズ情報を取得するサイズ情報取得部201と、モニタ情報を取得するモニタ情報取得部202と、モニタ情報を画面に表示する表示部203と、を備える。
 図5に、プログラミング支援装置200がモニタ情報を取得した後に、画面にモニタ情報を表示した様子を示す。ウィンドウ300は、プログラミング支援装置200にインストールされたプログラミングツールの機能により画面に表示される。
 図5のウィンドウ300には、モニタ情報の表示を開始するためのボタン301と、モニタ情報の表示を終了するためのボタン302と、各コアにおけるスキャンタイムの内訳を示すための棒グラフ303と、各コアにおけるスキャンタイムの値を示したテーブル304と、テーブル309又はテーブル310において現在値を表示させるためのラジオボタン305と、テーブル309又はテーブル310において最大値を表示させるためのラジオボタン306と、プログラムの実行時間のテーブル309を表示させるためのボタン307と、エンド処理の実行時間のテーブル310を表示させるためのボタン308と、プログラムの実行時間のテーブル309と、が含まれる。図5のウィンドウ300において、ボタン308が選択されると、図6に示すように、プログラムの実行時間のテーブル309に代わり、エンド処理の実行時間のテーブル310が表示される。
 棒グラフ303は、全体のスキャンタイムに対する、プログラム実行時間、待ち時間、エンド処理の実行時間の割合を示している。テーブル304は、各コアにおける、プログラム実行時間、待ち時間、エンド処理の実行時間及びスキャンタイムを示している。図5のプログラムの実行時間のテーブル309は、各コアで実行されたプログラム毎の実行時間及び累計実行回数を示している。また、図6のエンド処理の実行時間のテーブル310は、各コアで実行されたエンド処理毎の実行時間、及び、各コアにおけるエンド処理の合計実行時間を示している。
 サイズ情報取得部201は、画面に表示するモニタ情報のサイズ情報を取得するためのサイズ情報要求を、PLC100に送信する。サイズ情報取得部201は、プロセッサ21、通信部24及び入力部25により実現される。なお、サイズ情報取得部201は、サイズ情報取得手段の一例である。
 例えば、ユーザが、ボタン301を選択すると、サイズ情報取得部201は、ウィンドウ300に表示すべきモニタ情報のサイズ情報を取得するためのサイズ情報要求を、PLC100に送信する。そして、サイズ情報取得部201は、サイズ情報応答部105から送信されたサイズ情報を含むサイズ情報応答を受信する。
 モニタ情報取得部202は、サイズ情報応答部105から送信されたサイズ情報応答に含まれるサイズ情報が示すサイズと、一つのモニタ情報応答に含めることができる情報のサイズと、を比較して、PLC100に送信するモニタ情報要求の送信回数を求める。そして、モニタ情報取得部202は、画面に表示するモニタ情報を取得するためのモニタ情報要求であって、モニタ情報応答に含めるモニタ情報のサイズを指定したモニタ情報要求を、送信回数だけ送信する。モニタ情報取得部202は、プロセッサ21及び通信部24により実現される。なお、モニタ情報取得部202は、モニタ情報取得手段の一例である。
 一つのモニタ情報応答に含めることができる情報のサイズとは、例えば、プログラミング支援装置200とPLC100との通信において、一つのパケットに含めることができる情報のサイズである。以下、一つのモニタ情報応答に含めることができる情報のサイズを“0.6X[byte]”とする。モニタ情報取得部202は、サイズ情報応答に含まれるサイズ情報が示すサイズが“X[byte]”の場合、画面に表示するモニタ情報を取得するためには、2パケットが必要と判断し、モニタ情報要求の送信回数を2回と求める。モニタ情報取得部202は、2回のモニタ情報要求をPLC100に送信して、モニタ情報を取得する。
 モニタ情報取得部202は、まず1回目の“0.6X[byte]”のサイズを指定したモニタ情報要求を、PLC100に送信する。モニタ情報取得部202は、“0.6X[byte]”分のモニタ情報が含まれたモニタ情報応答を、モニタ情報応答部106より受信する。1回目のモニタ情報要求に対するモニタ情報応答には、図4に示す記憶部104の領域において1行目~10行目、14行目~20行目の情報が含まれる。モニタ情報取得部202は、1回目のモニタ情報要求に対するモニタ情報応答を受信すると、“0.4X[byte]”のサイズを指定した2回目のモニタ情報要求を、PLC100に送信する。そして、モニタ情報取得部202は、残りのモニタ情報が含まれたモニタ情報応答を、モニタ情報応答部106より受信する。2回目のモニタ情報要求に対するモニタ情報応答には、図4に示す記憶部104の領域において24行目~33行目の情報が含まれる。このようにして、モニタ情報取得部202は、図4に示す記憶部104の領域の1行目~10行目、14行目~20行目、24行目~33行目のモニタ情報を取得する。
 表示部203は、複数のコアのそれぞれについて、プログラムの実行時間と、待ち時間と、エンド処理の実行時間と、をプログラミング支援装置200の画面に表示する。表示部203は、プロセッサ21及び出力部26により実現される。なお、表示部203は、表示手段の一例である。
 例えば、表示部203は、モニタ情報取得部202により取得されたモニタ情報に基づいて、図5のウィンドウ300に示すように、プログラムの実行時間、待ち時間、エンド処理の実行時間等を表示する。
 次に、本実施形態に係るスキャンタイムの可視化方法について、図7及び図8を用いて説明する。
 図7は、本実施形態に係るPLC100が実行する計測処理を示すフローチャートである。図7の計測処理は、例えば、ユーザからプログラムの実行の操作を受け付けると実行される処理である。
 プログラム実行時間計測部101は、複数のコアのそれぞれにおいて実行されるプログラムの実行時間を計測する(ステップS101)。
 例えば、プログラム実行時間計測部101は、“Core1”により実行される“PRG1”及び“PRG2”の実行時間と、“Core2”により実行される“PRG3”の実行時間を計測する。
 プログラム実行時間計測部101は、各コアのプログラムの実行が終了したか否かを判断する(ステップS102)。プログラム実行時間計測部101が、各コアのプログラムの実行が終了したと判断すると(ステップS102;YES)、エンド処理実行時間計測部102は、複数のコアのそれぞれにおいて実行されるエンド処理の実行時間を計測する(ステップS103)。一方、プログラム実行時間計測部101は、各コアのプログラムの実行が終了していないと判断すると(ステップS102;NO)、そのまま待機する。
 例えば、“Core1”により“PRG1”及び“PRG2”の実行が終了し、“Core2”により“PRG3”の実行が終了したとすると、エンド処理実行時間計測部102は、“Core1”により実行される“FUNC1”及び“FUNC2”の実行時間、“Core2”により実行される“FUNC3”の実行時間を計測する。一方、“Core1”又は“Core2”によるプログラムの実行が終了していない場合は、そのまま待機する。
 エンド処理実行時間計測部102は、各コアのエンド処理の実行が終了したか否かを判断する(ステップS104)。エンド処理実行時間計測部102は、各コアのエンド処理の実行が終了したと判断すると(ステップS104;YES)、演算部103は、各コアについて待ち時間を算出する(ステップS105)。一方、エンド処理実行時間計測部102は、各コアのエンド処理の実行が終了していないと判断すると(ステップS104;NO)、そのまま待機する。
 例えば、“Core1”により“FUNC1”及び“FUNC2”の実行が終了し、“Core2”により“FUNC3”の実行が終了したとすると、演算部103は、“Core2”の待ち時間を“5.400[ms]”と算出する。一方、“Core1”又は“Core2”によるエンド処理の実行が終了していない場合は、そのまま待機する。
 演算部103は、プログラムの実行時間の情報、エンド処理の実行時間の情報、及び、待ち時間の情報を、記憶部104に格納する(ステップS106)。
 例えば、演算部103は、 “Core1”について、“PRG1”及び“PRG2”の実行時間“3.000[ms]”及び“7.000[ms]”、“FUNC1”及び“FUNC2”の実行時間“5.000[ms]”及び“3.000[ms]”、“Core2”について、“PRG3”の実行時間“4.600[ms]”、“FUNC3”の実行時間“8.000[ms]”、待ち時間“5.400[ms]”を、記憶部104に格納する。
 図8は、本実施形態に係るPLC100とプログラミング支援装置200との間で実行される処理を示すシーケンス図である。
 プログラミング支援装置200のサイズ情報取得部201は、画面に表示するモニタ情報のサイズ情報を取得するためのサイズ情報要求を、PLC100に送信する(ステップS201)。
 例えば、ユーザが、ボタン301を選択すると、サイズ情報取得部201は、ウィンドウ300に表示するモニタ情報のサイズ情報を取得するためのサイズ情報要求を、PLC100に送信する。
 PLC100のサイズ情報応答部105は、サイズ情報取得部201からサイズ情報要求を受信すると、記憶部104に格納されたモニタ情報のサイズを算出する(ステップS202)。そして、サイズ情報応答部105は、算出されたサイズを示すサイズ情報が含まれるサイズ情報応答を、プログラミング支援装置200に送信する(ステップS203)。
 例えば、サイズ情報応答部105は、サイズ情報要求を受信すると、図4に示す記憶部104の領域において、1行目~10行目、14行目~20行目、24行目~33行目のモニタ情報のサイズを“X[byte]”と算出する。そして、サイズ情報応答部105は、算出したサイズを示すサイズ情報を含むサイズ情報応答を、プログラミング支援装置200に送信する。
 プログラミング支援装置200のモニタ情報取得部202は、サイズ情報応答部105からサイズ情報応答を受信すると、サイズ情報応答に含まれるサイズ情報が示すサイズと、一つのモニタ情報応答に含めることができる情報のサイズと、を比較して、PLC100に送信するモニタ情報要求の送信回数n(nは1以上の自然数)を求める(ステップS204)。そして、モニタ情報取得部202は、画面に表示するモニタ情報を取得するためのモニタ情報要求であって、モニタ情報応答に含めるモニタ情報のサイズを指定したモニタ情報要求を、PLC100に送信する(ステップS205)。
 PLC100のモニタ情報応答部106は、モニタ情報取得部202からモニタ情報要求を受信すると、指定されたサイズ分のモニタ情報が含まれるモニタ情報応答を、プログラミング支援装置200に送信する(ステップS206)。ここで、ステップS205及びステップS206は、送信回数nだけ繰り返す。
 例えば、一つのパケットに含めることができる情報のサイズを“0.6X[byte]”、サイズ情報応答に含まれるサイズ情報が示すサイズが“X[byte]”の場合、モニタ情報取得部202は、画面に表示するモニタ情報を取得するために、モニタ情報要求の送信回数を2回と求める。そして、モニタ情報取得部202は、“0.6X[byte]”のサイズを指定した1回目のモニタ情報要求をPLC100に送信する。モニタ情報応答部106は、1回目のモニタ情報要求を受信すると、1回目のモニタ情報要求において指定されたサイズ分のモニタ情報を含めた1回目のモニタ情報応答を、プログラミング支援装置200に送信する。モニタ情報取得部202は、1回目のモニタ情報応答を受信すると、次に、“0.4X[byte]”のサイズを指定した2回目のモニタ情報要求をPLC100に送信する。そして、モニタ情報応答部106は、2回目のモニタ情報要求を受信すると、2回目のモニタ情報要求において指定されたサイズ分のモニタ情報を含めた2回目のモニタ情報応答を、プログラミング支援装置200に送信する。そして、モニタ情報取得部202は、2回目のモニタ情報応答を受信する。
 プログラミング支援装置200の表示部203は、モニタ情報取得部202がn回のモニタ情報応答を受信すると、受信したモニタ情報応答に含まれるモニタ情報を画面に表示する(ステップS207)。
 例えば、表示部203は、モニタ情報取得部202により取得されたモニタ情報に基づいて、図5のウィンドウ300に示すように、プログラムの実行時間、待ち時間、エンド処理の実行時間等を表示する。
 本実施形態によれば、プログラムの実行が終了する度に実行されるエンド処理の実行時間を可視化することができる。これにより、エンド処理にトラブルがあった場合に原因の調査を容易に行うことができる。
 また、本実施形態によれば、コア毎のプログラムの実行時間、待ち時間、エンド処理の実行時間を計測し、それらの時間を可視化することができる。これにより、ユーザは、プログラム及びエンド処理の各コアへの割り当てを最適化し、容易に負荷分散することができる。また、ユーザは、スキャンタイムの短縮の検討、及び、ユーザが作成したプログラム実行時のトラブルの原因の調査を容易に行うことができる。
 また、本実施形態によれば、プログラミング支援装置は、画面に表示するモニタ情報のサイズを指定し、指定されたサイズ分のモニタ情報が、PLCから送信される。これにより、プログラミング支援装置とPLCとの通信において、画面に表示するモニタ情報以外の不要な情報の送受信が行われないので、通信負荷を最小限に抑えることができる。
 また、制御システムの稼働中にプログラムを書き込むことにより、PLCで実行するプログラムの数が変化すると、PLCから取得するモニタ情報のサイズが1パケットの最大サイズに収まらない事態が発生することがある。本実施形態によれば、プログラミング支援装置は、モニタ情報の取得前に、モニタ情報のサイズ情報を把握し、1パケットにモニタ情報が収まらない場合は、複数のパケットによりモニタ情報を取得する。これにより、実行するプログラム数が変化する場合に、モニタ情報の取得を柔軟に行うことができる。
(変形例)
 以上、本開示の実施形態を説明したが、本開示を実施するにあたっては、種々の形態による変形及び応用が可能である。
 上記実施形態において、プログラム実行時間計測部101は、プログラムに含まれる割込みプログラムの実行時間をさらに計測してもよい。そして、表示部203は、割込みプログラムの実行時間を画面に表示してもよい。この場合、記憶部104には、割込みプログラムの実行時間の情報、及び、割込みプログラム実行回数の情報がさらに記憶され、モニタ情報には、割込みプログラムの実行時間の情報、及び、割込みプログラム実行回数の情報が含まれる。
 例えば、“Core2”により実行される“PRG3”には、“割込みプログラムA”が含まれ、“PRG3”において2回実行されるものとする。この場合、プログラム実行時間計測部101は、“割込みプログラムA”の実行時間を計測する。そして、表示部203は、図9のテーブル309に示すように、“割込みプログラムA”の実行時間“1.000[ms]”及び累計実行回数“2[回]”の情報を表示する。
 このような構成により、ユーザが割込みプログラムを設計する際に、割込みプログラムがどの程度スキャンタイムに影響を与えるかを確認することができるため、割込みプログラムの設計を容易に行うことができる。また、割込みプログラムの設計が原因でスキャンタイムが増大した場合に、ユーザは、原因の特定を容易に行うことができる。
 また、上記実施形態において、モニタ情報は、プログラミング支援装置200の画面に表示されるものとしたが、これに限らない。モニタ情報は、PLC100に接続された他の装置の画面に表示されてもよいし、PLC100の画面に表示してもよい。
 また、上記実施形態に係るPLC100及びプログラミング支援装置200の動作を規定する動作プログラムを既存のパーソナルコンピュータ又は情報端末装置に適用することで、当該パーソナルコンピュータ又は情報端末装置を実施形態に係るPLC100及びプログラミング支援装置200として機能させることも可能である。
 また、このようなプログラムの配布方法は任意であり、例えば、CD-ROM(Compact Disk Read-Only Memory)、DVD(Digital Versatile Disk)、メモリカード等のコンピュータ読み取り可能な記録媒体に格納して配布してもよいし、インターネットのような通信ネットワークを介して配布してもよい。
 本開示は、本開示の広義の精神と範囲を逸脱することなく、様々な実施形態及び変形が可能とされるものである。また、上述した実施形態は、本開示を説明するためのものであり、本開示の範囲を限定するものではない。つまり、本開示の範囲は、実施形態ではなく、請求の範囲によって示される。そして、請求の範囲内及びそれと同等の開示の意義の範囲内で施される様々な変形が、本開示の範囲内とみなされる。
 本開示によれば、プログラムの実行が終了する度に実行されるエンド処理の実行時間を確認することが可能な制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラムを提供することができる。
1 制御システム、11 マルチコアプロセッサ、12,22 主記憶部、13,23 補助記憶部、14 第1通信部、15 第2通信部、16,27 バス、21 プロセッサ、24 通信部、25 入力部、26 出力部、100 PLC、101 プログラム実行時間計測部、102 エンド処理実行時間計測部、103 演算部、104 記憶部、105 サイズ情報応答部、106 モニタ情報応答部、200 プログラミング支援装置、201 サイズ情報取得部、202 モニタ情報取得部、203 表示部、300 ウィンドウ、301,302,307,308 ボタン、303 棒グラフ、304,309,310 テーブル、305,306 ラジオボタン。

Claims (8)

  1.  少なくとも1つのプログラムを実行するプログラマブルロジックコントローラと、前記プログラムを作成するためのプログラミング支援装置と、を含む制御システムにおいて、
     前記プログラムの実行が終了する度に実行されるエンド処理の実行時間を計測するエンド処理実行時間計測手段と、
     前記エンド処理の実行時間を前記プログラミング支援装置の画面に表示する表示手段と、を備える
     制御システム。
  2.  前記エンド処理の内容は、前記プログラムを作成したユーザにより、前記プログラミング支援装置において設定される、
     請求項1に記載の制御システム。
  3.  前記プログラマブルロジックコントローラは、
     複数のプログラムを、複数のコアを含むマルチコアプロセッサにより実行し、
     前記複数のコアのそれぞれにおいて実行されるプログラムの実行時間を計測するプログラム実行時間計測手段と、
     前記複数のコアのそれぞれにおいて実行される前記エンド処理の実行の開始タイミングを一致させるために生じる待ち時間を算出する演算手段と、を備え、
     前記エンド処理実行時間計測手段は、前記複数のコアのそれぞれにおいて実行される前記エンド処理の実行時間を計測し、
     前記表示手段は、前記複数のコアのそれぞれについて、前記プログラムの実行時間と、前記待ち時間と、前記エンド処理の実行時間と、を前記画面に表示する、
     請求項1又は2に記載の制御システム。
  4.  前記プログラム実行時間計測手段は、前記プログラムに含まれる割込みプログラムの実行時間をさらに計測し、
     前記表示手段は、前記割込みプログラムの実行時間を前記画面に表示する、
     請求項3に記載の制御システム。
  5.  前記プログラマブルロジックコントローラは、
     前記プログラムの実行時間の情報と、前記エンド処理の実行時間の情報と、前記待ち時間の情報と、が含まれるモニタ情報を、記憶手段に格納し、
     前記プログラミング支援装置は、
     前記画面に表示するモニタ情報のサイズを示すサイズ情報を取得するためのサイズ情報要求を、前記プログラマブルロジックコントローラに送信するサイズ情報取得手段と、
     前記画面に表示するモニタ情報を取得するためのモニタ情報要求を、前記プログラマブルロジックコントローラに送信するモニタ情報取得手段と、を備え、
     前記プログラマブルロジックコントローラは、
     前記サイズ情報要求に応じて、前記記憶手段に格納されたモニタ情報のサイズを求め、求めたサイズを示すサイズ情報が含まれるサイズ情報応答を、前記プログラミング支援装置に送信するサイズ情報応答手段と、
     前記モニタ情報要求に応じて、前記記憶手段に格納されたモニタ情報が含まれるモニタ情報応答を、前記プログラミング支援装置に送信するモニタ情報応答手段と、を備え、
     前記モニタ情報取得手段は、前記サイズ情報応答手段から送信されたサイズ情報応答に含まれるサイズ情報が示すサイズと、一つのモニタ情報応答に含めることができる情報のサイズと、を比較して、前記プログラマブルロジックコントローラに送信するモニタ情報要求の送信回数を求め、前記モニタ情報応答に含めるモニタ情報のサイズを指定した前記モニタ情報要求を、前記送信回数だけ送信し、
     前記モニタ情報応答手段は、前記モニタ情報要求において指定されたサイズ分のモニタ情報を前記モニタ情報応答に含めることにより、前記モニタ情報を分割して前記プログラミング支援装置に送信し、
     前記表示手段は、前記モニタ情報応答に含まれるモニタ情報を前記画面に表示する、
     請求項3又は4に記載の制御システム。
  6.  複数のプログラムを、複数のコアを含むマルチコアプロセッサにより実行するプログラマブルロジックコントローラであって、
     前記複数のコアのそれぞれにおいて実行されるプログラムの実行時間を計測するプログラム実行時間計測手段と、
     前記複数のコアのそれぞれにおいて実行される、前記プログラムの実行が終了する度に実行されるエンド処理の実行時間を計測するエンド処理実行時間計測手段と、
     前記複数のコアのそれぞれにおいて実行される前記エンド処理の実行の開始タイミングを一致させるために生じる待ち時間を算出する演算手段と、
     前記プログラムの実行時間の情報と、前記エンド処理の実行時間の情報と、前記待ち時間の情報と、が含まれるモニタ情報を格納する記憶手段と、
     画面に表示するモニタ情報を取得するためのモニタ情報要求に応じて、前記記憶手段に格納されたモニタ情報が含まれるモニタ情報応答を送信するモニタ情報応答手段と、を備える、
     プログラマブルロジックコントローラ。
  7.  少なくとも1つのプログラムを実行するプログラマブルロジックコントローラと、前記プログラムを作成するためのプログラミング支援装置と、を含む制御システムにおいて実行される可視化方法であって、
     エンド処理実行時間計測手段が、前記プログラムの実行が終了する度に実行されるエンド処理の実行時間を計測し、
     表示手段が、前記エンド処理の実行時間を前記プログラミング支援装置の画面に表示する、
     可視化方法。
  8.  複数のプログラムを、複数のコアを含むマルチコアプロセッサにより実行するコンピュータを、
     前記複数のコアのそれぞれにおいて実行されるプログラムの実行時間を計測するプログラム実行時間計測手段、
     前記複数のコアのそれぞれにおいて実行される、前記プログラムの実行が終了する度に実行されるエンド処理の実行時間を計測するエンド処理実行時間計測手段、
     前記複数のコアのそれぞれにおいて実行される前記エンド処理の実行の開始タイミングを一致させるために生じる待ち時間を算出する演算手段、
     前記プログラムの実行時間の情報と、前記エンド処理の実行時間の情報と、前記待ち時間の情報と、が含まれるモニタ情報を格納する記憶手段、
     画面に表示するモニタ情報を取得するためのモニタ情報要求に応じて、前記記憶手段に格納されたモニタ情報が含まれるモニタ情報応答を送信するモニタ情報応答手段、
     として機能させるプログラム。
PCT/JP2022/024002 2022-06-15 2022-06-15 制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラム WO2023243012A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2022565638A JP7221465B1 (ja) 2022-06-15 2022-06-15 制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラム
PCT/JP2022/024002 WO2023243012A1 (ja) 2022-06-15 2022-06-15 制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/024002 WO2023243012A1 (ja) 2022-06-15 2022-06-15 制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラム

Publications (1)

Publication Number Publication Date
WO2023243012A1 true WO2023243012A1 (ja) 2023-12-21

Family

ID=85197950

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/024002 WO2023243012A1 (ja) 2022-06-15 2022-06-15 制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラム

Country Status (2)

Country Link
JP (1) JP7221465B1 (ja)
WO (1) WO2023243012A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08123514A (ja) * 1994-10-24 1996-05-17 Mitsubishi Electric Corp プログラマブルコントローラ
JP2016110458A (ja) * 2014-12-08 2016-06-20 株式会社キーエンス プログラマブル・ロジック・コントローラ、基本ユニット、制御方法およびプログラム
US20190033814A1 (en) * 2016-04-22 2019-01-31 Beckhoff Automation Gmbh Real-time environment and programmable logic controller

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08123514A (ja) * 1994-10-24 1996-05-17 Mitsubishi Electric Corp プログラマブルコントローラ
JP2016110458A (ja) * 2014-12-08 2016-06-20 株式会社キーエンス プログラマブル・ロジック・コントローラ、基本ユニット、制御方法およびプログラム
US20190033814A1 (en) * 2016-04-22 2019-01-31 Beckhoff Automation Gmbh Real-time environment and programmable logic controller

Also Published As

Publication number Publication date
JP7221465B1 (ja) 2023-02-13
JPWO2023243012A1 (ja) 2023-12-21

Similar Documents

Publication Publication Date Title
US8789024B2 (en) Integration of visualization with source code in the Eclipse development environment
US6606658B1 (en) Apparatus and method for server resource usage display by comparison of resource benchmarks to determine available performance
EP2787442B1 (en) Controller, information processing apparatus, and program
EP2470995B1 (en) A method of determining the state of a tile based deferred rendering processor and apparatus thereof
CN112131071B (zh) 一种内存评估的方法及装置
CN109144697B (zh) 一种任务调度方法、装置、电子设备及存储介质
US11487258B2 (en) Controller and control management system
CN110955438A (zh) 一种小程序的性能监控方法、装置、设备及存储介质
US8544009B2 (en) Method, apparatus, and product for scheduling of distributed processing based on average execution time and communication time
WO2023243012A1 (ja) 制御システム、プログラマブルロジックコントローラ、可視化方法及びプログラム
WO2013111334A1 (ja) 管理計算機、自動化作業手順出力方法、及び計算機読み取り可能な記憶媒体
CN111703590A (zh) 复杂系统可靠性试验方法、装置、计算机设备和存储介质
US10819798B2 (en) On-site system
CN115185456A (zh) 集群缩容风险提示方法、装置、设备及介质
US10331818B2 (en) Simulation system and simulation method
TWI573018B (zh) Information processing device and information processing method
CN114968751A (zh) 一种无代码开发平台的程序调试方法和程序调试装置
WO2019176286A1 (ja) 制御装置、制御方法、および、制御プログラム
US10303832B2 (en) Architecture generating device
JP6750299B2 (ja) 情報処理システム
JP7004476B2 (ja) 校正支援装置、校正支援方法、および、校正支援プログラム
JP6951637B2 (ja) 調査資料採取プログラム、調査資料採取装置及び調査資料採取方法
WO2020065863A1 (ja) プログラマブルロジックコントローラ、方法、及びプログラム
US9594658B2 (en) Method for displaying operation states of modules included in computer system
CN114860455A (zh) 一种请求处理方法、装置、设备及存储介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022565638

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22946830

Country of ref document: EP

Kind code of ref document: A1