Programmable logic controller, support device, and display device, as well as logging method, support method, and display method
By dividing control program variables into multiple cycles and extending collection periods, the PLC system effectively collects data without impacting control cycles, addressing the challenge of data logging in programmable logic controllers.
Patent Information
- Application Number
- JP2023076791
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2024-11-20
- Estimated Expiration
- 2043-05-08
AI Technical Summary
Existing programmable logic controllers (PLCs) face challenges in collecting large amounts of data indicating the operating status of devices while minimizing the impact on device control, leading to potential delays in control cycles and limited data logging capabilities.
The PLC system divides variables used in control programs into multiple control cycles and collects their values during extended collection periods, allowing asynchronous data logging without affecting the control cycle duration, utilizing a support device to analyze and set conditions for data collection.
This approach enables the appropriate collection of variable values without interfering with device control, facilitating comprehensive data logging and analysis of equipment status.
Smart Images

Figure 2024161772000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the technology of a programmable logic controller (PLC). [Background technology]
[0002] Regarding PLCs, there is known a technology that makes it easier to identify the temporal relationship between various data input from monitoring devices and device values (see, for example, Patent Document 1). There is also known a technology that can perform logging without affecting the execution of user applications or the control of devices (see, for example, Patent Document 2). There is also known a PLC that implements a scheduler (see, for example, Patent Document 3). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2020-13526 A [Patent Document 2] Patent No. 7188631 [Patent Document 3] JP 2008-146357 A Summary of the Invention [Problem to be solved by the invention]
[0004] With the PLCs of Patent Documents 1 and 2, it is difficult to collect a large amount of data indicating the operating states of the devices and the PLC while suppressing the effect on the control of the devices.
[0005] In one aspect, the present invention aims to appropriately collect values of variables used in controlling a device by a PLC. [Means for solving the problem]
[0006] According to one embodiment, a programmable logic controller includes a control unit that repeats a control process for each control period. The control process includes a program execution process that executes a control program for controlling an external device, and a logging process that collects values of variables used in the control program.
[0007] The control unit divides multiple variables used in the control program into multiple control cycles and collects values of some of the multiple variables in each of the multiple control cycles, thereby collecting values of each of the multiple variables within a collection period longer than the control cycle.
[0008] According to another embodiment, the programmable logic controller repeats a control process for each control period, the control process including a program execution process for executing a control program for controlling an external device, and a logging process for collecting values of variables used in the control program.
[0009] The programmable logic controller divides a plurality of variables used in the control program into a plurality of control periods based on the setting information output from the support device, and collects values of some of the plurality of variables in each of the plurality of control periods, thereby allowing the programmable logic controller to collect the values of each of the plurality of variables within a collection period longer than the control period.
[0010] The support device includes a program analysis unit, a selection unit, a reception unit, and a setting information output unit. The program analysis unit analyzes the control program and extracts variables used in the control program. The selection unit selects a plurality of variables used in the control program from the extracted variables. The reception unit receives a designation of a collection period. The setting information output unit outputs information indicating the plurality of variables used in the control program and information indicating the collection period as setting information.
[0011] According to yet another embodiment, the programmable logic controller repeats a control process for each control period, the control process including a program execution process for executing a control program for controlling an external device, and a logging process for collecting values of variables used in the control program.
[0012] The programmable logic controller divides a plurality of variables used in a control program into a plurality of control periods and collects values of some of the plurality of variables in each of the plurality of control periods, thereby allowing the programmable logic controller to collect the values of each of the plurality of variables within a collection period that is longer than the control period.
[0013] A display device for displaying information collected by a programmable logic controller includes a display unit that displays the values of each of a plurality of variables in association with the collection time of each of the values of the plurality of variables during a collection period. Effect of the Invention
[0014] According to one aspect, it is possible to appropriately collect values of variables used in controlling a device by a PLC. [Brief description of the drawings]
[0015] [Figure 1] FIG. 1 is a diagram illustrating an example of the configuration of a PLC system. [Diagram 2] FIG. 2 is a diagram illustrating an example of an execution period of each process executed by a PLC. [Diagram 3] FIG. 13 is a diagram illustrating an example of a collection period. [Figure 4] FIG. 2 is a diagram illustrating an example of a hardware configuration of a PLC. [Diagram 5] FIG. 2 is a diagram illustrating an example of a hardware configuration of a PC. [Figure 6] FIG. 2 is a diagram illustrating an example of a functional configuration of the support device. [Figure 7] 11A and 11B are diagrams illustrating an example of a method for setting conditions for executing a logging process. [Figure 8]This is an example of a UI screen. [Figure 9] FIG. 13 illustrates an example of a data structure of logging setting data. [Figure 10] 13 is a diagram illustrating an example of a data structure of collection target setting information. [Figure 11] FIG. 2 is a diagram illustrating an example of a functional configuration of a PLC. [Figure 12] FIG. 10 is a diagram for explaining an example of a logging execution method by a PLC. [Figure 13] 13 is a flowchart showing an example of processing contents of a logging process and a storage process. [Figure 14] FIG. 4 is a diagram illustrating an example of a data structure of logging collection data. [Figure 15] FIG. 4 is a diagram illustrating an example of a data structure of collected data. [Figure 16] 13 is a flowchart illustrating an example of a synchronous collection process. [Figure 17] 13 is a flowchart illustrating an example of an asynchronous collection process. [Figure 18] FIG. 2 is a diagram illustrating an example of a hardware configuration of a collected data display device. [Figure 19] FIG. 2 is a diagram illustrating an example of a functional configuration of a collected data display device. [Figure 20] FIG. 13 is a diagram illustrating an example of a method for displaying collected data. [Figure 21] FIG. 11 is a diagram illustrating an example of a program display process. [Figure 22] 13 is an example of a display screen of collected data. [Figure 23] 13 is an example of a warning screen. [Figure 24] 11A to 11C are diagrams illustrating an example of a waveform display process. [Diagram 25] 13 is an example of a waveform display screen of collected data. [Figure 26] FIG. 13 is a diagram illustrating an example of a logging file analysis and conversion process. [Figure 27] 11A to 11C are diagrams illustrating an example of a display control process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] Hereinafter, the embodiments will be described in detail with reference to the drawings.
[0017] A PLC is a control device that controls manufacturing equipment, transport equipment, inspection equipment, etc. in factory automation. A PLC controls various control devices by executing user application programs created by the user, such as ladder programs.
[0018] When an abnormality occurs in the control of a device by a control device such as a PLC, it is desirable to identify the cause of the abnormality. In addition, there is a demand not only for the occurrence of such an abnormality but also for recording information related to the control of the device and verifying the information later. Therefore, a user may set conditions for recording data history in the control device in advance, and the control device may log data indicating the operating status of the device and the control device itself based on the conditions.
[0019] In the PLC of Patent Document 1, input processing, program execution processing for executing a user application program, output processing, and logging processing are executed in that order in each control cycle. However, when logging processing is added following input processing, program execution processing, and output processing, the control cycle becomes longer, and the start of the next control cycle is delayed. This may cause the user application to not operate as intended by the user.
[0020] In the PLC of Patent Document 2, the control period does not become longer due to the addition of logging processing, but the amount of data to be logged may be limited in order to prevent the control period from becoming longer.
[0021] Fig. 1 shows an example of the configuration of a PLC system. The PLC system in Fig. 1 includes a PLC 1, a personal computer (PC) 2, an input / output module 3, and a communication module 4. The PLC 1 and the PC 2 are connected via a communication cable 6. The PLC 1 comprehensively controls various control devices installed in a factory or the like.
[0022] The PC2 provides a function as a support device that supports the PLC1. The PC2 is used, for example, to edit a user application program. The user application program corresponds to a control program for controlling an external device. In the following description, the user application program may be referred to as a "user program."
[0023] The user program may be created using, for example, a ladder language conforming to IEC (International Electrotechnical Commission) 61131-3. The user program may be created using a graphical programming language such as a motion program in a flow chart format such as a Sequential Function Chart (SFC). The user program may be created using a high-level programming language such as the C language.
[0024] As will be described later, the PC 2 also provides a function for setting conditions for executing logging processing.
[0025] The PLC 1 is connected to the input / output module 3 and the communication module 4 via a communication bus 7. A plurality of input / output modules 3 and a plurality of communication modules 4 may be connected to the communication bus 7. The input / output module 3 and the communication module 4 are detachable. The input / output module 3 and the communication module 4 correspond to external devices.
[0026] The input / output module 3 converts signals from a servo amplifier, an encoder, or a sensor into electrical signals, and may input and output digital or analog signals.
[0027] The communication module 4 provides a communication interface with other devices.
[0028] FIG. 2 shows an example of an execution period of each process executed by the PLC 1 in the PLC system of FIG.
[0029] The PLC 1 repeats control processes including input processing, program execution processing, output processing, logging processing, and system processing for each control period. Input processing is a process of taking in input data received from the input / output module 3. Program execution processing is a process of executing a user program created by a user. The input data taken in by the input processing is used in the execution of this user program. Output processing is a process of controlling the input / output module 3 by outputting the execution result of the user program, and reflecting the execution result in the output of the input / output module 3.
[0030] Logging processing is processing that collects the values of variables used in user programs and generates collected data. Logging processing is also processing that records data showing the operating status of each component device of the PLC system, including PLC1, and saves it as history. System processing is processing that manages the operation of PLC1 itself and maintains proper operation.
[0031] The PLC 1 executes logging processing after output processing in each control cycle so as not to interfere with the execution of the user program. The control cycle is the sum of the execution periods of input processing, program execution processing, output processing, logging processing, and system processing. Therefore, the execution period of the logging processing is limited by the bandwidth of the control cycle. The control cycle is specified by the user, for example.
[0032] Fig. 3 shows an example of a collection period used in the PLC system of Fig. 1. The collection period in Fig. 3 is a period longer than the control period and includes the execution periods of multiple logging processes. The execution period of each logging process is included in each of the multiple control periods. Therefore, within the collection period, multiple variables to be collected are divided into logging processes for each of the multiple control periods, and the values of the variables are collected asynchronously with the control period.
[0033] This makes it possible to collect a desired amount of variable values without affecting the execution periods of input processing, program execution processing, and output processing related to the user program and device control, and therefore makes it possible to appropriately collect variable values used in device control.
[0034] The execution period of the logging process may be adjusted by changing the ratio of the execution periods of the program execution process, the system process, and the logging process.
[0035] Next, the PLC1 and the PC2 in the PLC system will be described in more detail.
[0036] First, the hardware configuration of PLC1 will be described with reference to the hardware configuration example shown in Fig. 4. PLC1 in Fig. 4 includes a communication I / F 11, a CPU (Central Processing Unit) 12, a bus controller 13, a memory 14, and a storage device I / F 15. All of these components are hardware, connected to an internal bus 16, and capable of sending and receiving data between them. "I / F" is an abbreviation for interface. The CPU is also called a processor.
[0037] The communication I / F 11 is connected to the communication cable 6 and manages the transmission and reception of various data between the PC 2 and the communication I / F 11 .
[0038] The CPU 12 executes various programs such as a user program, a system program for managing the operation of the PLC 1 itself, and a logging execution program.
[0039] The bus controller 13 is connected to the communication bus 7 and manages the transmission and reception of various data between the input / output module 3 and the communication module 4 .
[0040] The memory 14 is, for example, a semiconductor memory, and includes a RAM (Random Access Memory) area and a ROM (Read Only Memory) area. The RAM area is used as a storage area for temporarily storing various data when the CPU 12 executes various programs. The ROM area is an area in which various programs and data are saved, and for example, a non-volatile memory is used.
[0041] The storage device I / F 15 manages various data write and read processes for an external storage device 17 such as a memory card.
[0042] Next, the hardware configuration of PC2 will be described with reference to the hardware configuration example shown in Fig. 5. PC2 in Fig. 5 includes a CPU 21, a memory 22, an input device 23, a display device 24, an auxiliary storage device 25, and a communication I / F 26. All of these components are hardware, connected to an internal bus 27, and capable of transmitting and receiving data between them.
[0043] The CPU 21 executes a predetermined program using the memory 22, for example, to provide a function for editing a user program and a function for setting conditions for executing a logging process.
[0044] The input device 23 is, for example, a keyboard, a pointing device, etc., and is used for inputting instructions or information from the user.
[0045] The display device 24 is used, for example, to display inquiries or instructions to a user, and to display processing results.
[0046] The auxiliary storage device 25 is a magnetic disk device, an optical disk device, a magneto-optical disk device, etc., and may be, for example, a hard disk drive or a flash memory. The PC 2 can store programs and data in the auxiliary storage device 25 and load them into the memory 22 for use.
[0047] The communication I / F 26 is connected to the communication cable 6 and manages the transmission and reception of various data between the PLC 1 and the communication I / F 26 .
[0048] <Logging settings>
[0049] Next, a method for setting the conditions for executing the logging process in the PLC 1 in the PLC system of FIG. 1 will be described.
[0050] First, Fig. 6 will be described. Fig. 6 is a diagram showing an example of the functional configuration of the support device 30. This configuration example is an example in which the support device 30 provides a function for setting conditions for execution of logging processing by the PLC 1. In the PLC system, the PC 2 provides the functions of the support device 30 by having the PC 2 execute a predetermined setting tool program.
[0051] 6, the support device 30 includes a program analysis unit 31, a selection unit 32, a reception unit 33, a setting information output unit 34, a calculation unit 35, and a data amount output unit 36. It is assumed that a control period for causing the PLC 1 to perform control processing is preset by a user in the support device 30.
[0052] The program analysis unit 31 analyzes a user program to be executed by the PLC 1, and extracts a plurality of variables used in the user program.
[0053] The selection unit 32 selects, from the extracted variables, a plurality of variables used in the user program as variables to be collected.
[0054] The receiving unit 33 receives a designation of a collection period longer than the control cycle. The setting information output unit 34 outputs information indicating a plurality of variables to be collected and information indicating the collection period as setting information.
[0055] The PLC 1 divides the multiple variables to be collected into multiple control periods based on the setting information output from the support device 30, and collects values of some of the multiple variables to be collected in each of the multiple control periods. In this way, the PLC 1 collects the values of each of the multiple variables to be collected within the collection period.
[0056] The calculation unit 35 determines the number of control periods into which the values of the multiple variables to be collected are divided, based on the collection period and the control period. Then, the calculation unit 35 calculates the amount of data of the values of some of the variables to be collected in each of the multiple control periods, based on the total amount of data of the values of the multiple variables and the number of multiple control periods.
[0057] The data amount output unit 36 outputs the amount of data of the values of some variables collected in each of a plurality of control periods.
[0058] According to such a support device 30, it is possible to cause the PLC 1 to execute a process for collecting a desired amount of variable values without affecting the control of the device. Therefore, it is possible to appropriately collect the values of variables used in the control of the device.
[0059] A method for setting conditions for executing a logging process, which is one example of a support method performed by the support device 30 including the configuration as shown in FIG. 6, will be described in further detail with reference to FIG.
[0060] The support device 30 is provided with a setting tool 40. In the PC 2, the function of the setting tool 40 is provided by causing the CPU 21 to execute a predetermined setting tool program.
[0061] Project data 41 is input to the setting tool 40. The project data 41 is information including information on the system configuration of the PLC system, a user program to be executed by the PLC 1, and function setting information for the input / output module 3, the communication module 4, and the like included in the PLC system. Here, it is assumed that the project data 41 has already been created by a user by executing a predetermined project data editing program on the PC 2, for example, and has already been stored in the auxiliary storage device 25, for example.
[0062] First, the setting tool 40 performs a collection target setting process of S110 on this project data 41. This process sets variables to be logged from among variables used in the user program, and provides the functions of the program analysis unit 31 and the selection unit 32 in the support device 30 in FIG.
[0063] The process of S110 includes a program analysis process of S111. The program analysis process is a process of analyzing a user program included in the project data 41 and extracting a plurality of variables used in the user program. The collection target setting process of S110 further includes a process of having the user select variables to be collected by the logging process performed by the PLC 1 from the variables extracted by the execution of the program analysis process.
[0064] Here, a description will be given of Fig. 8. Fig. 8 shows an example of a UI (User Interface) screen 100 used in the collection target setting process in S110.
[0065] 8, the UI screen 100 includes a program selection section 101, an extracted variable display section 102, and a target variable display section 103. When the function of the support device 30 is provided by the PC 2 in FIG.
[0066] The program selection section 101 displays information indicating the user programs included in the project data 41. In this embodiment, it is assumed that a task is configured as a collection of multiple programs, and a user program is configured as a collection of multiple tasks. In the example screen of FIG. 8, "Application Name" is the name of the user program, "Task 1", "Task 2", and "Task 3" are the names of each task, and "Program" and "Program N" are the names of each program belonging to each task. In this example screen, it is shown that the relationship between the user program, each task, and each program is expressed in a tree format.
[0067] When the user performs an operation to select one of the program names displayed in the program selection section 101, a program analysis process in S111 is performed on the program corresponding to the selected name, and variables used in the program are extracted. If an operation to select a task name instead of a program name is performed, variables are extracted from each of the programs belonging to the task corresponding to the selected name. At this time, the names of the extracted variables are displayed in a list in the extracted variable display section 102.
[0068] When the user selects one or more of the variable names displayed in the extracted variable display section 102 and presses the register button 104, the variables corresponding to the selected names are specified as variables to be collected. At this time, the names of the specified variables to be collected are displayed in a list in the target variable display section 103.
[0069] In addition, when the user selects one or more of the names of the variables to be collected displayed in the target variable display section 103 and presses the release button 105, the variables corresponding to the selected names are excluded from the variables to be collected.
[0070] Furthermore, when the user presses the Bulk Registration button 106, all of the variables whose names are displayed in the Extracted Variable Display section 102 are selected as variables to be collected, and the names are displayed in a list in the Target Variable Display section 103. On the other hand, when the user presses the Bulk Cancel button 107, all of the variables whose names are displayed in the Target Variable Display section 103 are excluded from the variables to be collected.
[0071] Furthermore, in the collection target setting process of S110, the total amount of data to be collected when logging processes are executed for all of the collection target variables selected as described above is calculated based on the project data 41. The obtained total amount of data is displayed in the collected data size display section 108 on the UI screen 100.
[0072] The control cycle that is preset by the user is displayed in a control cycle display section 109 on the UI screen 100.
[0073] Returning to the explanation of Fig. 7, a collection operation setting process is performed in S120. This process is a process for creating information for operation setting of the logging process, and is a process for providing the function of the reception unit 33 in the support device 30 of Fig. 6. With this information, for example, settings are made for the PLC 1 regarding the timing of collection of variable values, which are data to be collected, the collection period for collecting data, the timing of saving the collected data in the external storage device 17, and the like.
[0074] When an operation to specify a collection period is performed by the user, the specified collection period is accepted and displayed in collection period display section 110 on UI screen 100.
[0075] Following the above-mentioned processes of S110 and S120, a setting content confirmation process of S130 is performed. This process is a process for determining whether the execution time of the control process when the PLC 1 executes the logging process for all the variables to be collected selected by the process of S110 falls within a preset control period. This process also provides the functions of the calculation unit 35 and the data amount output unit 36 in the support device 30 of FIG. 6.
[0076] In this process, for example, the execution times of input processing, program execution processing, output processing, and system processing in the control processing executed by the PLC 1 are calculated from the project data 41. Then, the sum of these execution times is subtracted from the control cycle. The time obtained by this subtraction is the time during which the logging process can be executed, and this time will be referred to as the "maximum processing time."
[0077] Next, based on this maximum processing time, the amount of data that can be collected within this time is calculated as the maximum size that can be collected in the control cycle. Then, this maximum size is compared with the total data amount calculated by the processing in S110 (the value displayed in the collected data size display section 108 on the UI screen 100), and it is determined whether the total data amount is equal to or smaller than the maximum size.
[0078] If the total data amount exceeds the maximum size, a setting box 112 for enabling logging asynchronous to the control cycle becomes selectable.
[0079] When the user selects the setting box 112, the CPU 21 in Fig. 5 operates as the calculation unit 35 and determines the number of divisions of the collection period based on the collection period and the control period. The number of divisions represents the number of control periods into which the values of each of the multiple variables to be collected are divided and collected. The CPU 21 can calculate the number of divisions, for example, by dividing the collection period by the control period.
[0080] Next, the CPU 21 calculates the data size that can be collected in a control cycle based on the total data amount and the division number displayed on the collected data size display unit 108. The data size that can be collected in a control cycle represents the data amount of values of some variables collected in each of a plurality of control cycles. The CPU 21 can calculate the data size that can be collected in a control cycle, for example, by dividing the total data amount by the division number.
[0081] In the example of Figure 8, the control cycle is 1 ms and the collection period is 200 ms, so the number of divisions is 200 ms / 1 ms = 200. The total amount of data is 400 kW. W represents the number of words. In this case, the data size that can be collected in the control cycle is 400 kW / 200 = 2 kW.
[0082] The data size that can be collected in a control cycle is displayed in a data size display section 111 on the UI screen 100. Of 2kW / 30kW displayed in the data size display section 111, 2kW is the data size that can be collected in a control cycle, and 30kW is the maximum size that can be collected in a control cycle. In this case, the display device 24 in Fig. 5 operates as the data amount output section 36, and displays the data size that can be collected in a control cycle on the UI screen 100.
[0083] By displaying the control cycle, collection period, collected data size, and data size that can be collected in the control cycle on the UI screen 100, it becomes possible to remind the user to consider variables to be collected, for example.
[0084] Next, a setting file creation process of S140 is performed. This setting file creation process is a process that provides the function of the setting information output unit in the support device 30 of Fig. 6. The communication I / F 26 in Fig. 5 operates as the setting information output unit .
[0085] The setting file creation process is a process of outputting information for identifying the variables to be collected selected by the process of S110 and the operation setting information for the logging process set by the process of S120 as logging setting data 42. The logging setting data 42 corresponds to the setting information output by the setting information output unit 34. The logging setting data 42 is transferred to the PLC 1, and the operation setting for the logging process is performed in the PLC 1 based on the contents of the logging setting data 42.
[0086] The logging setting data 42 will be further described below.
[0087] The logging setting data 42 includes project data information 51 , collection operation setting information 52 , and collection target setting information 53 .
[0088] The project data information 51 is information for identifying a user program to be executed by the PLC 1, and includes, for example, information such as a name (project name) given to an object code obtained by compiling the user program, and the date and time of compilation. The project data information 51 is included as a part of the project data 41.
[0089] The collection operation setting information 52 is information created by the collection operation setting process of S120. The collection operation setting information 52 includes, for example, collection timing, a collection period designated by the user, and a collection method. The collection timing indicates the timing at which the collection period starts.
[0090] The collection method is information indicating synchronous or asynchronous. Synchronous is a collection method in which logging is performed in synchronization with the control period, and asynchronous is a collection method in which logging is performed asynchronously with the control period. When the setting box 112 in FIG. 8 is selected, asynchronous is set as the collection method, and otherwise synchronous is set as the collection method.
[0091] The collection operation setting information 52 also includes information specifying the timing at which the PLC 1 stores the collected data in the external storage device 17, and the external storage device 17 as the destination at which the collected data is to be stored.
[0092] The collection target setting information 53 is information on variables to be collected that are selected by the collection target setting process of S110. An example of the data structure of the collection target setting information 53 is shown in FIG.
[0093] 10, the collection target setting information 53 includes information on the total size of collected data at the timing of data collection. The collection target setting information 53 also includes information on the number of variables to be collected. Furthermore, the collection target setting information 53 includes information on each of the variables to be collected, such as memory type, data type, memory address, and data size. This information identifies the location in memory 14 of the storage area used to hold the values of the variables to be collected when a user program is executed in PLC 1.
[0094] The conditions for the execution of the logging process by the PLC 1 are set by the support device 30 using the setting tool 40 described above.
[0095] <Logging execution>
[0096] Next, a logging process performed by the PLC 1 in accordance with conditions set by the PC 2 serving as the support device 30 in the PLC system of FIG. 1 will be described.
[0097] First, a description will be given of Fig. 11. Fig. 11 is a diagram showing an example of the functional configuration of a PLC1 that performs logging processing. In the example configuration shown in Fig. 11, the PLC1 includes a control unit 61.
[0098] The control unit 61 repeats control processes including input processing, program execution processing, output processing, logging processing, and system processing for each control period. Based on the logging setting data 42 output from the support device 30, the control unit 61 divides the multiple variables to be collected into multiple control periods, and collects values of some of the multiple variables to be collected in each of the multiple control periods. In this way, the control unit 61 collects the values of each of the multiple variables to be collected within the collection period. In the hardware configuration example shown in FIG. 4, the CPU 12 operates as the control unit 61.
[0099] According to such a PLC 1, it is possible to collect a desired amount of variable values without affecting the control of the device, and therefore it is possible to appropriately collect the values of variables used in the control of the device.
[0100] The logging execution method performed by the PLC 1 including the components as shown in Fig. 11 will be described in further detail with reference to Fig. 12. The control unit 61 performs the processes of S220, S250, S260, S270, and S280.
[0101] The program execution process of S220 is a process for executing a user program using input data received in the input process and sent from the input / output module 3 and the communication module 4. The execution result is output by the output process for controlling the input / output module 3 and the communication module 4. In the hardware configuration example of Fig. 5, the CPU 12 that executes this program execution process uses a storage area of the memory 14 to execute the user program. The storage area used at this time is referred to as the program use area 14a.
[0102] The logging process of S250 is a process for collecting values of variables to be collected among variables used in the user program executed by the program execution process of S220. The logging setting data 42 including information on the variables to be collected and operation setting information for the logging process is assumed to have been created in the support device 30 (PC2) as described above and provided to the PLC1 in advance.
[0103] The time management process of S260 and the collection timing detection process of S270 are performed in parallel with control processes including input processes, program execution processes, output processes, logging processes, and system processes. The time management process is a process for measuring the current time. The collection timing detection process is a process for detecting the arrival of the collection timing of data indicated by the collection operation setting information 52 included in the logging setting data 42.
[0104] In the logging process of S250, a process of collecting the values of variables to be collected is performed in response to the detection of the arrival of collection timing by the collection timing detection process. Also, in the logging process, a process of acquiring the collection time of the variable value from the time measurement result by the time management process, and storing the collected data in which the variable value and its collection time are associated with each other in the ring buffer 62 is performed.
[0105] The ring buffer 62 is a storage area for storing collected data in which the collection time of the variable value by the logging process is associated with the variable value collected at that collection time every time the variable value is collected. In the hardware configuration example shown in FIG. 4, the ring buffer 62 is configured by a part of the storage area of the memory 14.
[0106] Furthermore, the CPU 12 of the PLC 1 executes a save process of S280. This save process includes a process of detecting the arrival of a save timing indicated by the collection operation setting information 52 included in the logging setting data 42. This save process also includes a process of controlling the storage device I / F 15 to read out the collected data stored in the ring buffer 62 in response to detection of the arrival of the save timing, and to save the collected data in the external storage device 17, which is the save destination indicated by the collection operation setting information 52.
[0107] The logging process of S250 and the saving process of S280 will now be described in further detail with reference to the flowchart shown in FIG.
[0108] In FIG. 13, the processes of S258 and S259 represent details of the saving process, and the remaining processes of S251 to S257 represent details of the logging process.
[0109] The process shown in FIG. 13 is started when the process start timing of the logging process arrives in the control process of each control cycle.
[0110] First, in S251, a process is performed to determine whether the arrival of collection timing has been detected by the collection timing detection process of S270 described above. If it is determined in this determination process that the arrival of collection timing has been detected (the determination result is YES), then in S252, a process is performed to determine whether the collection method included in the collection operation setting information 52 of the logging setting data 42 is asynchronous.
[0111] If the collection method is asynchronous (if the determination result is YES), an asynchronous collection process in S253 is performed, and if the collection method is synchronous (if the determination result is NO), a synchronous collection process in S254 is performed.
[0112] In the judgment process of S251, when it is determined that the arrival of the collection timing has not been detected (when the judgment result is NO), in S255, a process is performed to determine whether the collection method included in the collection operation setting information 52 of the logging setting data 42 is asynchronous or not.
[0113] When the collection method is asynchronous (when the judgment result is YES), a process is performed in S256 to judge whether or not collection of values has been completed for all collection target variables whose information is included in the collection target setting information 53 of the logging setting data 42. In this judgment process, when it is judged that there are still collection target variables whose values have not been collected (when the judgment result is NO), an asynchronous collection process is performed in S257.
[0114] In the determination process of S255, when the collection method is synchronous (when the determination result is NO), the process shown in Fig. 13 ends. In the determination process of S256, when it is determined that values have been collected for all variables to be collected (when the determination result is YES), the process shown in Fig. 13 ends.
[0115] In the asynchronous collection process of S253, the synchronous collection process of S254, and the asynchronous collection process of S257, the values of the variables to be collected are collected, and the collected values are stored in the ring buffer 62 as collected data 73, which will be described later.
[0116] Following the asynchronous collection process of S253, the synchronous collection process of S254, or the asynchronous collection process of S257, in S258, a process is performed to determine whether or not the save timing indicated by the collection operation setting information 52 included in the logging setting data 42 has arrived. In this determination process, when it is determined that the save timing has arrived (when the determination result is YES), the process proceeds to S259. On the other hand, in this determination process, when it is determined that the save timing has not arrived (when the determination result is NO), the process shown in FIG. 13 ends without performing the process of S259.
[0117] In S259, a process is performed to read out the collected data 73 stored in the ring buffer 62 by the asynchronous collection process of S253, the synchronous collection process of S254, or the asynchronous collection process of S257 in the currently executed logging process. In S259, a process is also performed to store the read collected data 73 as logging collected data 70 in the external storage device 17, which is the storage destination indicated by the collection operation setting information 52.
[0118] The logging collection data 70 will be further described below.
[0119] The logging collected data 70 includes project data information 51 , the number of collected data 71 , a collected data size 72 , and one or more collected data 73 .
[0120] The project data information 51 is information for identifying a user program executed in the PLC 1, and includes, for example, a name given to an object code obtained by compiling the user program and information on the date and time of compilation. In other words, the project data information 51 included in the logging collection data 70 is the same as the project data information 51 included in the logging setting data 42. The CPU 12 reads out the project data information 51 from the logging setting data 42 and imports it into the logging collection data 70 in the asynchronous collection process of S253, the synchronous collection process of S254, and the asynchronous collection process of S257.
[0121] The number of collected data items 71 is information indicating the number of collected data items 73 included in the logging collected data 70. The collected data size 72 is information indicating the total amount of collected data items 73 included in the logging collected data 70.
[0122] The logging collected data 70 includes data on the collected variable values in the order in which they were collected as collected data 73. An example of the data structure of this collected data 73 is shown in FIG.
[0123] 15, timestamp information is included in the collected data 73. This timestamp indicates the time when the variable value was collected.
[0124] The collected data 73 also includes variable data representing the values of one or more variables collected at the time stamp as “variable data 1”, “variable data 2”, . . . “variable data N”.
[0125] In the process of S259, the logging collection data 70 having such a data structure is created using the logging setting data 42 and the collection data 73 stored in the ring buffer 62, and is stored in the external storage device 17.
[0126] When the process of S259 ends, the process shown in Fig. 13 ends. According to the process of Fig. 13, if the collection method is asynchronous, even if the arrival of collection timing is not detected in S251, the asynchronous collection process of S257 is performed. Therefore, following the asynchronous collection process of S253, the asynchronous collection process of S257 is repeated every control period. This makes it possible to collect the values of variables asynchronously with the control period.
[0127] 13 is completed, the CPU 12 also performs a process of storing the logging setting data 42 in the external storage device 17. This logging setting data 42 is used when displaying collected data 73, which will be described later.
[0128] Next, the synchronous collection process in S254 in FIG. 13 will be described in further detail with reference to the flowchart shown in FIG.
[0129] First, in S261, the process starts measuring the execution time of the logging process for the control process in the current control cycle.
[0130] Next, in S262, the current time kept by the time management process in S260 described above is obtained as a timestamp, and the obtained timestamp is written in the ring buffer 62 as the timestamp of the collected data 73.
[0131] Next, in S263, the current value of each variable to be collected is obtained, and the obtained value is written as variable data in the ring buffer 62 in a predetermined order associated with the variables to be collected, following the write position of the timestamp of the collected data 73.
[0132] The values of the variables to be collected are held at positions in the program usage area 14a that are specified based on the information on the memory type, data type, memory address, and data size for the variables to be collected that are included in the collection target setting information 53 of the logging setting data 42. Therefore, in the process of S263, the values of the variables to be collected are obtained by reading the data held at these positions, and are written into the ring buffer 62.
[0133] Next, in S264, a process is performed to determine whether the execution time of the current logging process, the measurement of which was started in the process of S261, is within the maximum processing time described above. In this determination process, when it is determined that the execution time of the current logging process is within the maximum processing time (when the determination result is YES), the process proceeds to S265. On the other hand, when it is determined that the execution time of the current logging process is not within the maximum processing time (when the determination result is NO), the current collection process is terminated. Note that, in order to speed up the process, the process of S264 may be performed after it is determined that the values of all the variables to be collected have been collected (when the determination result is YES) in the determination process of S265 described next.
[0134] In S265, a process is performed to determine whether or not values have been collected for all of the collection target variables whose information was included in the collection target setting information 53 of the logging setting data 42. In this determination process, when it is determined that values have been collected for all of the collection target variables (when the determination result is YES), the current collection process ends. On the other hand, in this determination process, when it is determined that there are still collection target variables whose values have not been collected (when the determination result is NO), the process returns to S263, and a process is performed to collect values for the collection target variables whose values have not been collected.
[0135] When the above collection process is completed, the storage of the collected data 73 in the ring buffer 62 is completed, and then the process of S258 in FIG. 13 is performed.
[0136] Next, the asynchronous collection processes in S253 and S257 in FIG. 13 will be described in further detail with reference to the flowchart shown in FIG.
[0137] First, in S271, the process starts measuring the execution time of the logging process for the control process in the current control cycle.
[0138] Next, in S272, a process is performed to determine whether or not the asynchronous collection process of S253 has started with the arrival of the collection timing in S251 of Fig. 13. In this determination process, if it is determined that the asynchronous collection process of S253 has started (if the determination result is YES), the process proceeds to S273. On the other hand, in this determination process, if it is determined that the asynchronous collection process of S257 has started (if the determination result is NO), the process proceeds to S278.
[0139] In S273, the current time is obtained as a timestamp, and the obtained timestamp is written in the ring buffer 62 as the timestamp of the collected data 73.
[0140] Next, in S274, the current value of each variable to be collected is obtained, and the obtained value is written as variable data in the ring buffer 62 in a predetermined order associated with the variables to be collected, following the write position of the timestamp of the collected data 73.
[0141] Next, in S275, a process is performed to determine whether or not collection of values has been completed for all collection target variables whose information was included in the collection target setting information 53 of the logging setting data 42. In this determination process, if it is determined that there are still collection target variables whose values have not been collected (if the determination result is NO), the process proceeds to S276.
[0142] In S276, a process is performed to determine whether the execution time of the current logging process, which was started by the process of S271, has reached a predetermined time. The predetermined time may be, for example, a time specified by the user or the maximum processing time described above. In this determination process, if it is determined that the execution time of the current logging process has not reached the predetermined time (if the determination result is NO), the process returns to S274, and the values of the variables to be collected that have not yet been collected are collected.
[0143] On the other hand, when it is determined in this determination process that the execution time of the current logging process has reached the predetermined time (when the determination result is YES), a process of recording variable information indicating the last collected variables is performed in S277. This variable information indicates the variables collected in the immediately preceding process of S274 among the collection target variables whose information was included in the collection target setting information 53 of the logging setting data 42.
[0144] In the determination process of S275, when it is determined that values have been collected for all of the variables to be collected (when the determination result is YES), the process proceeds to S277.
[0145] In S278, a process of identifying a variable to be collected next is performed. In the process of S278, for example, based on the variable information recorded in the previous asynchronous collection process, the next variable after the last collected variable is identified as the variable to be collected next. If the last collected variable is the last variable to be collected, it is determined that there is no variable to be collected next.
[0146] Next, in S279, a process is performed to determine whether or not values have been collected for all of the variables to be collected, whose information was included in the collection target setting information 53 of the logging setting data 42. If it is determined in the process of S278 that there is no variable to be collected next, it is determined that values have been collected for all of the variables to be collected.
[0147] In the judgment process of S279, when it is judged that there are still variables to be collected for which values have not been collected (when the judgment result is NO), the processes from S274 onwards are performed for the next variables to be collected. If it is desired to record the collection time of the values of the variables to be collected in this asynchronous collection process, the processes from S273 onwards are performed for the next variables to be collected. When it is judged that values have been collected for all variables to be collected (when the judgment result is YES), the current asynchronous collection process ends.
[0148] By repeating the process from S273 or S274 onwards, the variable information indicating the last collected variable is updated in S277. Therefore, the variable information is information indicating the variables collected during the period from the first control cycle to the current control cycle among multiple control cycles in which the values of the multiple variables to be collected are divided and collected. The current control cycle is an example of any one of the control cycles.
[0149] When the above collection process is completed, the storage of the collected data 73 in the ring buffer 62 is completed, and then the process of S258 in FIG. 13 is performed.
[0150] <Displaying collected data by logging>
[0151] Next, a method for displaying collected data 73 obtained by the logging process performed by PLC 1 in the PLC system of FIG. 1 will be described.
[0152] First, there will be described the hardware configuration of a device that displays the collected data 73. Fig. 18 shows an example of the hardware configuration of a collected data display device 80.
[0153] 18, a collected data display device 80 includes a CPU 81, a memory 82, an input device 83, an auxiliary storage device 84, a display device 85, and a storage device I / F 86. All of these components are hardware, connected to an internal bus 87, and capable of transmitting and receiving data between them.
[0154] The CPU 81 executes a predetermined program using the memory 82, for example, to provide a function for controlling various displays such as display of collected data and display of waveforms of collected data.
[0155] The input device 83 is, for example, a keyboard, a pointing device, etc., and is used for inputting instructions or information from the user.
[0156] The auxiliary storage device 84 is a magnetic disk device, an optical disk device, a magneto-optical disk device, etc., and may be, for example, a hard disk drive or a flash memory. The collected data display device 80 can store programs and data in the auxiliary storage device 84 and load them into the memory 82 for use.
[0157] The display device 85 is used, for example, to display inquiries or instructions to a user, and to display processing results.
[0158] The storage device I / F 86 manages the process of reading various data from an external storage device 17 such as a memory card.
[0159] The collected data display device 80 has the above hardware configuration. Since such a hardware configuration is a standard configuration that a general computer has, the collected data display device 80 may be configured using such a computer. Also, the collected data display device 80 may be configured by further using the PC2 functioning as the support device 30 in the PLC system of FIG.
[0160] Next, a description will be given of Fig. 19. Fig. 19 is a diagram showing an example of the functional configuration of a collected data display device 80.
[0161] 19, the collected data display device 80 includes a display unit 91, and displays information collected by the PLC 1. The display device 85 in FIG.
[0162] The display unit 91 displays the values of each of the multiple variables to be collected during a collection period in association with the collection time of each of the multiple variables.
[0163] According to the collected data display device 80, the values of variables of a desired amount of collected data can be displayed in association with the time within the collection period without affecting the control of the device.
[0164] An example of a method for displaying collected data, which is performed by the collected data display device 80 including the configuration shown in FIG. 19, will be described in further detail with reference to FIG.
[0165] The collected data display device 80 performs a program display process in S310, a waveform display process in S320, a logging file analysis and conversion process in S330, and a display control process in S340. Each of these processes is performed by a CPU 81 in Fig. 18. The program that causes the CPU 81 to perform each of these processes is sometimes called engineering software.
[0166] The program display process of S310 is a process for displaying the user program included in the above-mentioned project data 41, and displaying the values of variables to be collected for the user program, using display data created from the logging collection data 70. The display data includes the collection time and the variable values. It is assumed here that the project data 41 has already been created by the user, for example, by executing a predetermined project data editing program on the PC 2, and has already been stored in, for example, the auxiliary storage device 84.
[0167] The waveform display process in S320 is a process for displaying the relationship between the collection time and the value of the variable to be collected as a waveform, using display data created from the logging collection data 70.
[0168] The logging file analysis / conversion process of S330 is a process that analyzes the logging setting data 42 and the logging collected data 70 and converts the collected data 73 into display data that is input to the program display process of S310 and the waveform display process of S320. Note that the logging setting data 42 and the logging collected data 70 are provided by the external storage device 17. In the logging file analysis / conversion process, these data are read out from the external storage device 17 and used.
[0169] The display control process of S340 includes a process of providing the display data created by the logging file analysis / conversion process of S330 to the program display process of S310 and the waveform display process of S320. This display control process also includes a process of linking the displays of the program display process and the waveform display process.
[0170] Each process shown in FIG. 20 and performed by the collected data display device 80 will be described in further detail below.
[0171] First, the program display process in S310 will be described in detail with reference to FIG.
[0172] As shown in FIG. 21, the program display process of S310 includes an operation UI process of S311, a variable value display control process of S312, and a user program display process of S313.
[0173] The operation UI process of S311 is a process of accepting an input corresponding to an operation on the input device 83 by the user of the collected data display device 80.
[0174] The variable value display control process of S312 is a process that receives input information received in the operation UI process of S311 and linkage information from the display control process of S340, and controls the display of variable values included in the display data.
[0175] The user program display process of S313 is a process for displaying a user program included in the project data 41, and displaying the values of the variables to be collected on the display of the user program under the control of the variable value display control process of S312.
[0176] Here, Fig. 22 will be described. Fig. 22 shows an example of a display screen for collected data. This display screen is displayed on the display device 85 by the CPU 81 executing the program display process of S310.
[0177] The screen example in FIG. 22 shows a state in which a UI screen 120 obtained by the operation UI process in S311 is displayed superimposed on a user program display screen 113 obtained by the user program display process in S313.
[0178] By the user program display process of S313, a diagram (for example, a ladder program) showing the contents of the user program included in the project data 41 is created and displayed as a user program display screen 113.
[0179] The UI screen 120 has a frame back button 121-1 and a frame forward button 121-2, which give instructions to sequentially update the display of the variable values collected at each collection time, a seek bar 122, a time input field 123 for directly inputting the collection time of the variable value to be displayed, etc. The time input field 123 also functions as a display field for displaying the collection time specified by operating the frame back button 121-1 and the frame forward button 121-2 and the seek bar 122.
[0180] By the operation UI processing of S311, a collection time designated in response to an operation on the frame previous button 121-1, the frame next button 121-2, or the seek bar 122 is acquired, and this time is displayed in the time input field 123. Also, when a time input operation is performed on the time input field 123, the input time is acquired as the designated collection time by this operation UI processing.
[0181] The variable value display control process of S312 acquires the value of a variable associated with a collection time in the logging collected data 70 and the designation of the collection time acquired by the operation UI process of S311. Note that the logging collected data 70 is acquired by the logging file analysis / conversion process of S330 and sent to the display control process of S340, and the variable value display control process is provided with the logging collected data 70 from the display control process. Furthermore, the variable value display control process sends the value of the variable at the designated collection time to the user program display process of S313, and the user program display process displays the value of the variable on the user program display screen 113.
[0182] In the example screen of FIG. 22, an ON / OFF display 114 and a variable display 115 display the values of variables.
[0183] When a program component having either an ON or OFF state is selected as a variable to be collected, the ON / OFF display 114 displays the variable value by filling the element with a different color according to the state indicated by the variable value. In the example screen of Fig. 22, the element to be collected in the user program is displayed in black as the ON / OFF display 114, but in reality, for example, the element is displayed in red when it is "ON" and in blue when it is "OFF".
[0184] The variable display 115 directly displays a numerical value related to a program component as a variable value when the numerical value is selected as a variable to be collected.
[0185] As described above, by the processes of S311, S312, and S313, the collection times and the values of the variables collected at those collection times are associated with each other and displayed on the display device 85, as shown in the example screen of FIG.
[0186] The program display process in S310 further includes a verification process in S314 and a warning process in S315.
[0187] The collation process of S314 is a process for collating the project data 41, the logging setting data 42, and the project data information 51 of the logging collection data 70.
[0188] The warning process in S315 is a process for issuing a predetermined warning when the project data information 51 of each data does not match as a result of the collation process in S314.
[0189] 23 shows an example of a warning screen displayed on the display device 85. The predetermined warning by the warning process of S315 is performed, for example, by displaying such a warning screen on the display device 85. This example screen includes a warning dialog 130 that warns the user that the project data information 51 does not match. Note that, since this is useful, for example, when debugging a user program, the collected data display device 80 allows the function of displaying the variable values to be used even if the project data information 51 does not match.
[0190] Next, the waveform display process in S320 will be described in detail with reference to FIG.
[0191] As shown in FIG. 24, the waveform display process in S320 includes an operation UI process in S321, a variable value display control process in S322, and a waveform creation process in S323.
[0192] The operation UI process of S321 is similar to the process of S311, and is a process of accepting an input corresponding to an operation on the input device 83 by the user of the collected data display device 80.
[0193] The variable value display control process of S322 is similar to the process of S312, and is a process that accepts input information accepted by the operation UI process of S321 and the above-mentioned linkage information from the display control process of S340, and controls the display of variable values included in the display data.
[0194] The waveform creation process in S323 is a process for creating and displaying a waveform that represents the relationship between the collection time and the variable, based on the display data provided by the display control process in S340.
[0195] Here, a description will be given of Fig. 25. Fig. 25 is an example of a waveform display screen 140 of collected data. This waveform display screen 140 is displayed on the display device 85 by the CPU 81 executing the waveform display process of S320.
[0196] The waveforms 141 included in the waveform display screen 140 have been created by the waveform creation process of S323. In the example screen of Fig. 27, the waveforms 141 for "variable 1", "variable 2", and "variable 3" are displayed using a solid line, a dashed line, and a dashed dotted line, respectively. Also, the time display 142 included in the waveform display screen 140 indicates the collection time at which the relationship with the variable value is expressed by the waveform 141, and is displayed on the waveform display screen 140 by the waveform creation process of S323.
[0197] Furthermore, when an instruction to move the collection time range is accepted by the operation UI process of S321, a waveform 141 for the collection time range after the movement is displayed on the waveform display screen 140 by the waveform creation process of S323. Also, the collection time indicated by a thick line 143 displayed on the waveform display screen 140 is displayed in a time display field 144 by the waveform creation process of S323.
[0198] The variable value display control process of S322 acquires the value of the variable associated with the collection time in the display data provided by the display control process of S340. The variable value display control process of S322 also acquires the collection time displayed in the time display field 144. Furthermore, the variable value display control process displays the value of the variable at the acquired collection time in the variable value display field 145 as the value of the variable represented by the position of the intersection of the waveform 141 and the thick line 143.
[0199] As described above, by the processes of S321, S322, and S323, the collection times and the values of the variables collected at those collection times are associated with each other and displayed on the display device 85, as shown in the example screen of FIG.
[0200] Next, the logging file analysis and conversion process of S330 will be described in detail with reference to FIG.
[0201] As shown in FIG. 26, the logging file analysis and conversion process in S330 includes a logging setting data acquisition process in S331, a logging collected data acquisition process in S332, and a display data creation process in S333.
[0202] The logging setting data acquisition process of S331 is a process for acquiring the logging setting data 42 from the external storage device 17.
[0203] The logging collection data acquisition process in S332 is a process of reading out the logging collection data 70 from the external storage device 17 and importing it.
[0204] The display data creation process of S333 is a process for creating display data including collection time and variable values from the logging setting data 42 and the logging collection data 70.
[0205] Next, the display control process of S340 will be described in detail with reference to FIG.
[0206] As shown in FIG. 27, the display control process at S340 includes a variable value providing process at S341, a playback control process at S342, and a collected data acquisition process at S343.
[0207] The variable value provision process of S341 is a process that provides the display data created by the logging file analysis and conversion process of S330 as the value of a variable associated with the collection time to the program display process of S310 and the waveform display process of S320.
[0208] The playback control process of S342, upon receiving a predetermined linkage instruction, controls the program display process of S310 and the waveform display process of S320 to link the contents of the screens displayed by each process. This playback control process, for example, performs a process of making the collection time designated by an operation on the UI screen 120 in the screen example of Fig. 22 the same as the collection time indicated by the thick line 143 in the screen example of Fig. 25.
[0209] The collected data acquisition process in S343 is a process for acquiring the display data created by the logging file analysis and conversion process in S330 and providing it to the variable value provision process in S341.
[0210] As described above, the display data created by the logging file analysis and conversion process of S330 is provided to the program display process of S310 and the waveform display process of S320 by the display control process of S340.
[0211] Although the disclosed embodiments and their advantages have been described in detail above, it will be appreciated that those skilled in the art may make various modifications, additions, and omissions therein without departing from the scope of the present invention as clearly set forth in the claims. [Explanation of symbols]
[0212] 1 PLC 2 PC 3 Input / Output Module 4. Communication Module 6 Communication Cable 7 Communication Bus 11, 26 Communication I / F 12, 21, 81 CPU 13 Bus Controller 14, 22, 82 Memory 14a Program Use Area 15, 86 Storage device I / F 16, 27, 87 Internal Bus 17 External storage device 23, 83 Input device 24, 85 Display device 25, 84 Auxiliary storage device 30 Support equipment 31 Program Analysis Section 32 Selection section 33 Reception 34 Setting information output section 35 Calculation section 36 Data volume output section 40 Configuration Tool 41 Project Data 42 Logging configuration data 51 Project Data Information 52 Collection operation setting information 53 Collection target setting information 61 Control section 62 Ring Buffer 70 Logging collected data 71 Data collected 72 Collected data size 73 Collected Data 80 Collected data display device 91 Display section 100, 120 UI screens 101 Program Selection Section 102 Extracted variable display section 103 Target variable display section 104 Registration button 105 Release button 106 Bulk registration button 107 All release button 110 Collection period display section 111 Data size display section 112 Settings Box 113 User program display screen 114 ON / OFF display 115 Variable Display 120 UI screens 121-1 Back button 121-2 Frame forward button 122 Seek Bar 123 Time input field 130 Warning Dialog 140 Waveform display screen 141 Waveform 142 Time display 143 Thick Line 144 Time display field 145 Variable value display field
Claims
1. a control unit that repeats control processing including a program execution processing for executing a control program for controlling an external device and a logging processing for collecting values of variables used in the control program for each control period; The control unit divides a plurality of variables used in the control program into a plurality of control cycles, and collects values of some of the plurality of variables in each of the plurality of control cycles, thereby collecting values of each of the plurality of variables within a collection period that is longer than the control cycle.
2. 2. The programmable logic controller according to claim 1, wherein the control unit records variable information indicating variables collected during a period from a first control cycle among the plurality of control cycles to any one of the plurality of control cycles, and in a control cycle next to any one of the control cycles, collects values of variables among the plurality of variables that have not yet been collected based on the variable information.
3. 3. The programmable logic controller according to claim 2, wherein the control unit measures an execution time of the logging process in any one of the control cycles, and when the execution time of the logging process reaches a predetermined time, terminates the logging process in any one of the control cycles.
4. 1. A support device for a programmable logic controller, comprising: the programmable logic controller repeats a control process for each control period, the control process including a program execution process for executing a control program for controlling an external device and a logging process for collecting values of variables used in the control program, divides a plurality of variables used in the control program into a plurality of control periods based on setting information output from the support device, and collects values of some of the plurality of variables in each of the plurality of control periods, thereby collecting values of each of the plurality of variables within a collection period longer than the control period; The support device includes: a program analysis unit that analyzes the control program and extracts variables used in the control program; a selection unit that selects a plurality of variables used in the control program from among the extracted variables; A reception unit that receives a designation of the collection period; a setting information output unit that outputs information indicating a plurality of variables used in the control program and information indicating the collection period as the setting information; An assistance device comprising:
5. a calculation unit that determines the number of the plurality of control periods based on the collection period and the control period, and calculates the amount of data of the values of the part of the variables collected in each of the plurality of control periods based on a total amount of data of the values of the plurality of variables and the number of the plurality of control periods; a data amount output unit that outputs a data amount of the values of the part of variables collected in each of the plurality of control periods; The support device according to claim 4, further comprising:
6. A display device for displaying information collected by a programmable logic controller, comprising: the programmable logic controller repeats a control process, including a program execution process for executing a control program for controlling an external device and a logging process for collecting values of variables used in the control program, for each control period; divides a plurality of variables used in the control program into a plurality of control periods; and collects values of some of the plurality of variables in each of the plurality of control periods, thereby collecting values of each of the plurality of variables within a collection period longer than the control period; The display device comprises a display unit that displays the values of the plurality of variables in association with collection times of the values of the plurality of variables during the collection period.
7. a programmable logic controller repeats a control process, including a program execution process for executing a control program for controlling an external device and a logging process for collecting values of variables used in the control program, for each control period; The logging method is characterized in that the programmable logic controller divides a plurality of variables used in the control program into a plurality of control cycles, and collects values of some of the plurality of variables in each of the plurality of control cycles, thereby collecting values of each of the plurality of variables within a collection period longer than the control cycle.
8. a programmable logic controller repeats a control process for each control period, the control process including a program execution process for executing a control program for controlling an external device and a logging process for collecting values of variables used in the control program, and divides a plurality of variables used in the control program into a plurality of control periods based on setting information output from a support device of the programmable logic controller, and collects values of some of the plurality of variables in each of the plurality of control periods, thereby collecting values of each of the plurality of variables within a collection period longer than the control period; The support device includes: Analyzing the control program to extract variables used in the control program; View the extracted variables, Identifying a plurality of variables selected from the displayed variables as a plurality of variables used in the control program; Accepting the designation of the collection period; outputting, as the setting information, information indicating a plurality of variables used in the control program and information indicating the collection period; A support method comprising:
9. a programmable logic controller repeats a control process for each control period, the control process including a program execution process for executing a control program for controlling an external device and a logging process for collecting values of variables used in the control program, divides a plurality of variables used in the control program into a plurality of control periods, and collects values of some of the plurality of variables in each of the plurality of control periods, thereby collecting values of each of the plurality of variables within a collection period longer than the control period; A display method, comprising: a display device displaying the values of each of the plurality of variables in association with the collection time of each of the values of the plurality of variables during the collection period.
Citation Information
Patent Citations
Sequence controller
JP1991223905A
Method and apparatus for monitoring motion
JP2001273013A
Device monitoring apparatus and device monitoring method
JP2016143169A
Programmable logic controller
JP2021189482A
Programmable controller and support device thereof
JP2008146357A
