WO2022239171A1 - プログラマブルコントローラ、プログラマブルコントローラシステム、データ保存方法及びプログラム - Google Patents

プログラマブルコントローラ、プログラマブルコントローラシステム、データ保存方法及びプログラム Download PDF

Info

Publication number
WO2022239171A1
WO2022239171A1 PCT/JP2021/018148 JP2021018148W WO2022239171A1 WO 2022239171 A1 WO2022239171 A1 WO 2022239171A1 JP 2021018148 W JP2021018148 W JP 2021018148W WO 2022239171 A1 WO2022239171 A1 WO 2022239171A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
additional information
trigger condition
storage means
unit
Prior art date
Application number
PCT/JP2021/018148
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 CN202180088801.6A priority Critical patent/CN117203588A/zh
Priority to US18/266,287 priority patent/US20240045614A1/en
Priority to JP2021575080A priority patent/JP7275328B2/ja
Priority to PCT/JP2021/018148 priority patent/WO2022239171A1/ja
Publication of WO2022239171A1 publication Critical patent/WO2022239171A1/ja
Priority to JP2023073468A priority patent/JP2023086911A/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • 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
    • G05B19/058Safety, monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Definitions

  • the present disclosure relates to programmable controllers, programmable controller systems, data storage methods, and programs.
  • control devices control various devices to realize production lines, processing lines, and inspection lines.
  • data indicating the control history is analyzed in order to investigate the cause of the trouble. Therefore, techniques for saving data used for control have been proposed (see Patent Document 1, for example).
  • Patent Document 1 when a first condition for a recording trigger is met, time-series device values are recorded as log data in a temporary recording unit, and when a second condition for a save trigger is met, a temporary recording unit is stored. describes a technique for saving log data held in a ring buffer in a storage memory. According to this technology, by inputting a save trigger when a trouble occurs, log data can be used to investigate the cause of the trouble.
  • a programmable controller of the present disclosure is a programmable controller for controlling equipment, comprising: data collection means for repeatedly collecting data that changes when controlling the equipment from a memory; When the trigger condition is satisfied, a storing means for storing data collected by the data collecting means at a timing corresponding to the satisfaction of the first trigger condition in the storage means, and a second trigger condition different from the first trigger condition is satisfied.
  • the storage means stores the data collected by the data collection means in the storage means when the first trigger condition is satisfied. This makes it possible to avoid the occurrence of a limitation due to the capacity of the temporary recording section other than the storage means in which the data is finally saved.
  • the adding means adds additional information to at least one of the first data and the second data when the second trigger condition is satisfied, and the erasing means stores the first data in the storage means based on the additional information. Erasing the second data from the storage means while preserving it. Therefore, by saving necessary data in the storage means and securing an area for storing new data in the storage means, it is possible to leave a large number of histories of data related to control. Therefore, it is possible to make it easier to investigate the cause of the trouble.
  • FIG. 1 is a diagram showing the configuration of a PLC system according to Embodiment 1
  • FIG. 1 shows a hardware configuration of a PLC according to Embodiment 1
  • FIG. 2 shows a functional configuration of the PLC according to Embodiment 1
  • FIG. 4 is a diagram for explaining file erasure by an erasing unit according to the first embodiment
  • Flowchart showing collection processing according to the first embodiment 4 is a flowchart showing storage processing according to the first embodiment
  • FIG. 4 is a diagram for explaining saving and erasing of files according to Embodiment 1
  • Flowchart showing additional processing according to the first embodiment A diagram for explaining the timing at which the first trigger condition and the second trigger condition are satisfied according to the first embodiment.
  • FIG. 4 shows a functional configuration of a PLC according to Embodiment 2; Diagram for explaining addition of additional information according to Embodiment 3
  • FIG. 11 shows a functional configuration of a display data generation device according to a fifth embodiment;
  • FIG. 10 is a diagram for explaining the relationship between the timing at which data is collected and the data to which the trigger ID is assigned according to the modified example;
  • FIG. 1 shows the configuration of a PLC (Programmable Logic Controller) system 1000 having a programmable controller according to this embodiment.
  • the PLC system 1000 is a control system corresponding to a part of a manufacturing system, an inspection system, and other processing systems constructed in facilities represented by factories.
  • a PLC 100 as a programmable controller operates a line by controlling a mechanical device 200 as controlled equipment connected via a communication line.
  • the PLC 100 has a device memory 110 for controlling the mechanical device 200 and a buffer 120 and a storage unit 130 for recording logs of the device data 111 stored in the device memory 110 .
  • the device data 111 stored in the device memory 110 includes data that is synchronized with data stored in the mechanical device 200 .
  • the PLC 100 determines the state of the mechanical device 200 by reading the device data 111 and changes the operating mode of the mechanical device 200 by rewriting the device data 111 .
  • the device data 111 includes intermediate data used in the calculation process for the PLC 100 to control the mechanical device 200 or statistical data for managing the mechanical device 200 . It may contain other internal data.
  • the mechanical device 200 is, for example, a sensor device, an actuator, a robot, or other FA equipment installed in a line.
  • the PLC 100 saves the log of the device data 111 in the storage unit 130 after passing through the buffer 120 .
  • the buffer 120 is provided to absorb the difference in read/write speed between the device memory 110 and the storage unit 130 .
  • the log stored in storage unit 130 is read by display data generation device 300 connected to PLC 100 via a communication line, and display data for investigating the cause of the trouble is generated from the log.
  • a display screen is displayed to the user by the display device 301 according to the generated display data. On this display screen, images showing a plurality of data are displayed in a format that allows the user to compare the data.
  • the display data generation device 300 and the display device 301 may be an industrial PC (Personal Computer) and attached LCD (Liquid Crystal Display) connected to the PLC 100, or may be an integrally formed tablet terminal. good too. Moreover, although the display data generating device 300 is arranged outside the PLC 100 in FIG.
  • FIG. 2 schematically shows the hardware configuration of the PLC 100.
  • PLC 100 has processor 101 , main memory section 102 , auxiliary memory section 103 , input section 104 , output section 105 and communication section 106 .
  • Main storage unit 102 , auxiliary storage unit 103 , input unit 104 , output unit 105 and communication unit 106 are all connected to processor 101 via internal bus 107 .
  • the processor 101 includes a CPU (Central Processing Unit) or MPU (Micro Processing Unit). By executing the program P1 stored in the auxiliary storage unit 103, the processor 101 realizes various functions and executes the processes described later.
  • the processor 101 also controls the mechanical device 200 by executing the control program P2 stored in the auxiliary storage unit 103 .
  • the control program P2 may be, for example, a ladder program or an executable binary file generated from source code written in a high-level language such as C language.
  • the main storage unit 102 includes a RAM (Random Access Memory).
  • the program P1 and the control program P2 are loaded from the auxiliary storage unit 103 into the main storage unit 102 .
  • the main storage unit 102 is used as a work area for the processor 101 .
  • the auxiliary storage unit 103 includes non-volatile memory represented by EEPROM (Electrically Erasable Programmable Read-Only Memory) and HDD (Hard Disk Drive).
  • the auxiliary storage unit 103 stores various data used for the processing of the processor 101 in addition to the program P1 and the control program P2.
  • Auxiliary storage unit 103 supplies data used by processor 101 to processor 101 in accordance with instructions from processor 101 .
  • the auxiliary storage unit 103 stores data supplied from the processor 101 .
  • the input unit 104 includes input devices typified by hardware switches, input keys, and pointing devices.
  • the input unit 104 acquires information input by the user and notifies the processor 101 of the acquired information.
  • the output unit 105 includes output devices typified by LEDs (Light Emitting Diodes), LCDs (Liquid Crystal Displays), and speakers.
  • the output unit 105 presents various information to the user according to instructions from the processor 101 .
  • the communication unit 106 includes a network interface circuit for communicating with external devices. Communication unit 106 receives a signal from the outside and outputs data indicated by this signal to processor 101 . Communication unit 106 also transmits a signal indicating data output from processor 101 to an external device.
  • each unit constituting the PLC 100 has a part or all of the hardware configuration shown in FIG. 2 and is connected to each other via a system bus. good too.
  • the PLC 100 exhibits the function of logging device data.
  • the PLC 100 has, as its functions, a program execution unit 141 that executes the control program P2, a device memory 110 that stores data that changes under the control of the mechanical device 200, a device memory 110, a trigger determination unit 143 that determines whether there is a trigger for saving data, a buffering unit 144 that stores the collected data in the buffer 120, a data a buffer 120 that temporarily stores the data, a storage unit 145 that reads data from the buffer and stores it in the storage unit 130, a storage unit 130 that stores the data, and additional information described later in the data stored in the storage unit 130.
  • It has an adding unit 146 for adding, an erasing unit 147 for erasing data to which additional information is not added after a certain storage period has passed, and a setting unit 148 for setting various parameters.
  • the program execution unit 141 is mainly realized by the processor 101.
  • the program execution unit 141 controls the mechanical device 200 using the data in the device memory 110 by repeatedly executing the procedure defined in the control program P2.
  • the device memory 110 is mainly realized by the main storage unit 102.
  • the data in the device memory 110 changes as the program execution unit 141 executes the control program P2.
  • the control program P2 data indicating values as sensing results of the mechanical device 200, which is a sensor device, is periodically acquired and updated.
  • the data indicating the rotation angle of the stepping motor that constitutes the mechanical device 200, which is an actuator, is updated at the timing at which the mechanical device 200 should be instructed to operate.
  • FIG. 3 shows that data D[T100] is stored in the device memory 110.
  • T100 corresponds to time
  • D[T100] means the value of data at time T100.
  • the data collection unit 142 is mainly realized by the processor 101.
  • the data collection unit 142 repeatedly reads data stored in a preset address area of the device memory 110 at a preset cycle, and outputs the read data to the trigger determination unit 143 .
  • the preset cycle is, for example, a scan time corresponding to one execution of the control program P2 by the program execution unit 141 .
  • the data collection unit 142 corresponds to an example of data collection means for repeatedly collecting data that changes when controlling the device from the device memory 110 as a memory.
  • the trigger determination unit 143 is mainly implemented by the processor 101 . Trigger determination unit 143 determines whether or not a first trigger condition for storing data in storage unit 130 is satisfied, and determines a second trigger condition for extending the storage period of data stored in storage unit 130. is established.
  • the first trigger condition and the second trigger condition are preset by the setting unit 148 .
  • the first trigger condition and the second trigger condition are different conditions. Detecting that a threshold value has been exceeded, detecting that a plurality of bit values have turned ON in a specified order, judging whether a condition related to a numerical value indicated by device data is satisfied from non-satisfaction, or being satisfied by a combination of these do.
  • the first trigger condition and the second trigger condition are not limited to this, and may be other conditions.
  • the first trigger condition and the second trigger condition may each be a condition whose success or failure is determined by determination regarding data to be collected or data not to be collected among device data, or may be satisfied regardless of device data. It may be a condition to For example, the first trigger condition and the second trigger condition may be conditions met by receiving a trigger signal from the outside of the PLC 100 .
  • the trigger determination section 143 outputs the data collected by the data collection section 142 to the buffering section 144 .
  • the trigger determination unit 143 determines that the first trigger condition is satisfied, the trigger determination unit 143 outputs data to the buffering unit 144 together with a trigger ID indicating that the first trigger condition is satisfied.
  • the trigger determination unit 143 determines that the second trigger condition is satisfied, it notifies the addition unit 146 of the trigger ID.
  • the second trigger condition is the length of the storage period for the data determined to be stored in the storage unit 130 when the first trigger condition is satisfied, and the length when the second trigger condition is not satisfied. is a condition for extending from When the second trigger condition is met, the trigger ID is used as information for identifying data whose storage period is to be extended.
  • the buffering unit 144 is mainly realized by the processor 101.
  • the buffering unit 144 sequentially stores the data output from the trigger determination unit 143 in the buffer 120, and when a trigger ID is output due to the establishment of the first trigger condition, the trigger ID is stored in the buffer 120 together with the corresponding data. store in
  • the buffer 120 is a ring buffer realized mainly by the main storage unit 102.
  • the buffer 120 stores D[T89], D[T90], D[T91], . [T90] is given.
  • This trigger ID of TR[T90] indicates that the first trigger condition for storing data D[T90] in storage unit 130 has been met.
  • the buffer 120 corresponds to an example of a buffer that sequentially stores data collected by the data collection means in the PLC 100 .
  • the storage unit 145 is mainly implemented by the processor 101 .
  • the storage unit 145 checks the presence or absence of data to which a trigger ID is assigned in the buffer 120 at predetermined time intervals. When new data with a trigger ID is found, the storage unit 145 reads a series of data including the new data from the buffer 120 together with the trigger ID.
  • the series of data ranges from data collected by a preset number before the data to which the trigger ID is assigned to data collected by a preset number after the data to which the trigger ID is assigned. , are data collected continuously. Then, the storage unit 145 stores the file containing the read series of data in the storage unit 130 in association with the read trigger ID. In the example of FIG.
  • the storage unit 145 confirms the data D[T90] to which the trigger ID TR[T90] is assigned, and stores data D[T86] to D[T95] in a file D[T86- T95] is stored in the storage unit 130.
  • FIG. The storage unit 145 is an example of a storage unit that stores data collected by the data collection unit at a timing corresponding to the establishment of the first trigger condition in the PLC 100 when a predetermined first trigger condition is established. corresponds to
  • the storage unit 130 is mainly implemented by the auxiliary storage unit 103 or a removable memory card.
  • the adding unit 146 is mainly realized by the processor 101.
  • the addition unit 146 searches the storage unit 130 for a file to which the trigger ID is assigned. Then, the adding unit 146 adds additional information to the file found as a result of the search.
  • the additional information corresponds to a mark for making the storage period of a file to which the additional information is added longer than the storage period of the file to which the additional information is not added.
  • the addition of additional information may be, for example, the insertion of a mark at the end of the file, the addition of a specific character string to the file name, or the addition of a folder attribute indicating the folder in which the file is stored. may be given. In the example of FIG.
  • the addition unit 146 corresponds to an example of addition means for adding additional information to the data stored in the storage means by the storage means when the second trigger condition is satisfied.
  • the erasing unit 147 is mainly implemented by the processor 101 .
  • the erasing unit 147 scans the files stored in the storage unit 130 by the storage unit 145 at predetermined time intervals, and removes files whose retention period has passed among files to which additional information is not added. is erased from the storage unit 130 together with the trigger ID associated with the file. Erasure of a file by the storage unit 130 may be creation of a free area by deleting or moving data, or may be overwriting of another file.
  • the length of the retention period of files to which additional information is not added is, for example, one day or one week.
  • FIG. 4 shows that a free area is generated by erasing a file to which additional information is not added by the erasing section 147 .
  • the deletion unit 147 may delete from the storage unit 130 a file whose retention period has elapsed among the files to which additional information is added, along with the trigger ID and additional information associated with the file.
  • the retention period of files with additional information is longer than the retention period of files without additional information, for example, one month or one year.
  • the erasing unit 147 corresponds to an example of erasing means for erasing data from the storage means in the PLC 100 .
  • the setting unit 148 is realized mainly by the cooperation of the processor 101 and the input unit 104.
  • the setting unit 148 acquires parameters input by the user and sets the acquired parameters in the data collection unit 142 , the trigger determination unit 143 , the storage unit 145 and the deletion unit 147 .
  • the parameters set by the setting unit 148 include the address of the data to be collected in the device memory 110, the cycle of collecting data, the contents of the first trigger condition and the second trigger condition, information for generating the trigger ID, the storage unit 145 confirms the buffer 120, the number of data from the file start point data to the data to which the trigger ID is assigned, the number of data from the file end point data to the data to which the trigger ID is assigned, the deletion unit 147 scans the files in the storage unit 130, the length of storage periods for files with and without additional information added, and file operation details when deleting files.
  • Information for generating a trigger ID may be, for example, an address of device data in which a value to be treated as a trigger ID is stored, or an instruction to treat time as a trigger ID.
  • the file operation content is, for example, information indicating the selection of deletion or movement of the file and the location of the destination of the file movement.
  • FIG. 5 shows the procedure of collection processing in which the PLC 100 collects data in the device memory 110.
  • This collection process may be started simultaneously with execution of a specific application by the user's operation, or may be started simultaneously with execution of the control program P2.
  • the data collection unit 142 determines whether or not the current time is the data collection timing (step S11). Specifically, the data collection unit 142 determines whether or not the time corresponding to the collection cycle set by the setting unit 148 has elapsed since the previous timing of data collection.
  • the collection period is, for example, 1 millisecond or 1 second.
  • the determination in step S11 may be affirmative regardless of the presence or absence of previous collection, or the determination in step S11 may be omitted. good too.
  • step S11 If it is determined that the current time is not yet the data collection timing (step S11; No), the determination in step S11 is repeated, and the PLC 100 waits until the data collection timing. On the other hand, if it is determined that the current time is the data collection timing (step S11; Yes), the data collection unit 142 reads the data stored at the address set by the setting unit 148 from the device memory 110. Collect (step S12).
  • the trigger determination unit 143 determines whether or not the first trigger condition is satisfied (step S13). For example, when the first trigger condition is satisfied by acquisition of a sensing result indicating that a single product has passed through the belt conveyor in the final stage of the manufacturing process, the trigger determination unit 143 determines that one product in the manufacturing process It is determined whether or not the manufacturing of the has been completed.
  • step S13 If it is determined that the first trigger condition is satisfied (step S13; Yes), the trigger determination unit 143 assigns a trigger ID to the data collected in step S12 and outputs the data to the buffering unit 144 (step S14).
  • the trigger ID is, for example, a value in one-to-one correspondence with the serial number of the manufactured product.
  • step S13; No when it is determined that the first trigger condition is not satisfied (step S13; No), the trigger determination unit 143 directly transfers the collected data to the buffering unit 144 without adding a trigger ID to the collected data. After outputting, the process proceeds to step S15.
  • the buffering unit 144 buffers the data (step S15). Specifically, the buffering unit 144 stores the data output from the trigger determination unit 143 in the buffer 120 together with the trigger ID if the trigger ID is assigned.
  • step S11 the processes after step S11 are repeatedly executed.
  • each time data to be collected is read from the device memory 110, the data is stored in the buffer 120.
  • FIG. Also, when the first trigger condition is satisfied, a trigger ID is assigned to the data.
  • the storage unit 145 determines whether the current time is the file storage timing (step S21). Specifically, the storage unit 145 determines whether or not the time interval set by the setting unit 148 has elapsed since the last time the file was stored in the storage unit 130 . This time interval is, for example, 10 milliseconds or 10 seconds. However, when the storage process is started and the determination of step S21 is executed for the first time, the determination of step S21 may be affirmative regardless of whether or not the previous storage was performed, or the determination of step S21 may be omitted. good too.
  • step S21 If it is determined that the current time is not yet the file storage timing (step S21; No), the determination in step S21 is repeated, and the PLC 100 waits until the file storage timing. On the other hand, if it is determined that the current time is the file storage timing (step S21; Yes), the storage unit 145 determines whether or not new data satisfying the first trigger condition is stored in the buffer 120. (step S22). Specifically, the storage unit 145 scans the buffer 120 to search for unconfirmed data to which a trigger ID has been assigned.
  • step S22 When it is determined that new data is not stored in the buffer 120 (step S22; No), the storage unit 145 repeats the processing from step S21 onwards. On the other hand, if it is determined that new data is stored in the buffer 120 (step S22; Yes), the storage unit 145 reads out from the buffer 120 a series of data groups including the data satisfying the first trigger condition, It is stored in the storage unit 130 as a file (step S23). Specifically, the storage unit 145 stores the new data to which the trigger ID found in step S22 is assigned, and one or a plurality of consecutive data of the number set by the setting unit 148 before and after the new data. , and the file is stored in the storage unit 130 in association with the trigger ID.
  • the storage unit 145 repeats the processes after step S21.
  • the time-series data before and after the data stored together with the trigger ID in the buffer 120 are repeatedly read, and a file showing the time-series data is stored in the storage unit 130 .
  • FIG. 7 schematically shows storage of files in the storage unit 130 by execution of collection processing and storage processing.
  • the "first trigger” arrows shown on the left side of FIG. 7 respectively indicate data for which the first trigger condition is satisfied. It also shows that files F1 to F5 are generated from a plurality of data including data satisfying the first trigger condition and stored in storage unit 130.
  • the trigger determination unit 143 determines whether or not the second trigger condition is satisfied (step S31). For example, when the second trigger condition is established by detecting a nonconforming product in the inspection process after the manufacturing process, the trigger determination unit 143 determines whether there is an abnormality in the product manufactured in the manufacturing process. .
  • step S31; No When it is determined that the second trigger condition is not satisfied (step S31; No), the trigger determination unit 143 repeats the determination of step S31. On the other hand, if it is determined that the second trigger condition is met (step S31; Yes), the adding unit 146 adds additional information to the file corresponding to the second trigger condition being met in step S31 (step S32). Specifically, the adding unit 146 adds additional information to the file having the trigger ID notified from the trigger determining unit 143 .
  • step S31 onward After that, the processes from step S31 onward are repeated. As a result, the additional information is added to each file that satisfies the second trigger condition.
  • the arrows of "second trigger" each indicate the establishment of the second trigger condition, and additional information is added to files F2 and F3.
  • the file to which the additional information is added when the second trigger condition is satisfied is not limited to the file stored in the storage unit 130 immediately before the second trigger condition is satisfied. Additional information may be added to a plurality of files after the condition is met. For example, as shown in FIG. 9, in the manufacturing process, products are manufactured one by one, and whether or not the first trigger condition is met is determined based on the output of the manufacturing completion sensor 201. In the subsequent inspection process, three products are manufactured. are collectively inspected by the inspection sensor 202 to determine whether the second trigger condition is met. In this case, the cycle in which the success or failure of the first trigger condition is determined is different from the cycle in which the success or failure of the second trigger condition is determined.
  • the product for which the second trigger condition is satisfied among the three products is the product for which the first trigger condition is satisfied immediately before, and when the product for which the first trigger condition is satisfied two times before, It is possible that the product is the product for which the first trigger condition was satisfied three times before.
  • the deletion unit 147 determines whether or not the current time is the file deletion timing (step S41). Specifically, the erasing unit 147 determines whether or not the time interval set by the setting unit 148 has elapsed since the previous erasing timing. This time interval is, for example, one minute or one hour. However, when the erasing process is started and the determination of step S41 is executed for the first time, the determination of step S41 may be affirmative regardless of the presence or absence of the previous erasing timing, or the determination of step S41 may be omitted. may
  • step S41 If it is determined that the current time is not yet the file erasing timing (step S41; No), the determination in step S41 is repeated, and the erasing unit 147 waits until the file erasing timing. On the other hand, when it is determined that the current time is the file erasing timing (step S41; Yes), the erasing unit 147 erases the file from the storage unit 130 based on the additional information (step S42). Specifically, the erasing unit 147 scans the files stored in the storage unit 130, and the corresponding retention periods for files with additional information added and files without additional information added are: Delete the file if it has passed.
  • step S41 onward the processes from step S41 onward are repeated.
  • This specific timing may be, for example, when a predetermined length of time or more has elapsed since the file was stored in the storage unit 130, or when the first trigger condition or the second trigger condition for the file has passed. It may be the point in time at which a predetermined length of time or more has elapsed from the time when is established.
  • a file to which additional information is added is stored in the storage unit 130 for a long period of at least one year after the file is stored in the storage unit 130, while a free area is secured for a file to which additional information is not added.
  • it may be deleted when one day or more has elapsed since the first trigger condition was satisfied.
  • the above specific timing may be a point in time when the number of data or the amount of data stored in the storage unit 130 exceeds a threshold.
  • files to which additional information is added are deleted from the oldest file when the usage of the storage unit 130 exceeds 90%, while files to which additional information is not added are deleted from the last 10 files.
  • the file may be sufficient, and when the number of files stored in the storage unit 130 exceeds 10, the oldest files may be deleted.
  • the storage unit 145 stores the data collected by the data collection unit 142 in the storage unit 130 when the first trigger condition is satisfied. As a result, it is possible to avoid the occurrence of a limitation due to the capacity of the buffer 120 other than the storage unit 130 in which data is finally stored. Further, when the second trigger condition is satisfied, the addition unit 146 adds additional information to the file specified by the trigger ID, and the deletion unit 147 saves the file to which the additional information is added in the storage unit 130. The file excluded from the target of addition of additional information by the addition unit 146 is erased from the storage unit 130 .
  • the specific timing at which the file to which additional information is not added is deleted by the deletion unit 147 is the time when a predetermined length of time or more has elapsed since the file was stored in the storage unit 130, A point in time when a predetermined length of time or more has elapsed since the first trigger condition was satisfied for the file, or a point in time when the number of data or the amount of data stored in the storage unit 130 exceeds a threshold. . Therefore, the file to which the additional information is not added can be deleted after being stored in the storage unit 130 for the period requested by the user of the PLC 100 .
  • Embodiment 2 Next, the second embodiment will be described, focusing on differences from the first embodiment described above. Equivalent reference numerals are used for configurations that are the same as or equivalent to those in the first embodiment.
  • the present embodiment differs from the first embodiment in that the adding unit 146 adds additional information to the data in the buffer.
  • the addition unit 146 searches the storage unit 130 for a file having the trigger ID notified from the trigger determination unit 143 .
  • the file having the trigger ID notified by the adding unit 146 is not yet stored in the storage unit 130 because the data writing speed to the storage unit 130 is low.
  • the addition unit 146 also searches for the trigger ID in the data stored in the buffer 120, as indicated by the thick arrow in FIG. Add additional information to data.
  • the storage unit 145 stores the file containing the data assigned the trigger ID in the storage unit 130 with additional information added.
  • a file to which additional information is added is more important than a file to which additional information is not added, and can be saved in storage unit 130 before being lost due to updating of data in buffer 120, which is a ring buffer. desirable. Therefore, the storage unit 145 stores the file containing the data to which the additional information is added in the buffer 120 in the storage unit 130 with priority over the file containing the data to which the additional information is not added.
  • the storage unit 145 stores data D[T70] to which a trigger ID is assigned but not to which a trigger ID is assigned, and data to which both a trigger ID and additional information are assigned, as shown in FIG. Data D[T90] of D[T90] is read out before data D[T70]. Then, storage unit 145 stores the file including data D[T90] in storage unit 130 before storing the file including data D[T70].
  • the storage unit 145 sequentially reads the data to which the trigger ID is assigned from the buffer 120 and stores the file in the storage unit 130
  • the data to which the additional information is added is read ahead of the data. is read out from the buffer 120 with priority over other data collected in the above but to which additional information is not added, and the file containing the data is stored in the storage unit 130 .
  • Adding unit 146 according to the present embodiment when the second trigger condition is satisfied, selects the third data collected before the first data and the first data stored in the buffer as It corresponds to an example of adding means for adding additional information to the first data.
  • Embodiment 3 Next, the third embodiment will be described, focusing on differences from the first embodiment described above. Equivalent reference numerals are used for configurations that are the same as or equivalent to those in the first embodiment.
  • the present embodiment is different from the first embodiment in that adding section 146 adds additional information to files stored in storage section 130 before and after the file in addition to the file that satisfies the second trigger condition. different from
  • a file with additional information indicates the transition of device data. If the satisfaction of the first trigger condition corresponds to the completion of manufacturing of one product, and the satisfaction of the second trigger condition corresponds to the detection of an abnormality in the product, the products manufactured before and after the product in which the abnormality was detected There is also a desire to check the transition of device data.
  • the addition unit 146 adds the file F3 having the trigger ID notified by the trigger determination unit 143 when the second trigger condition is satisfied. Then, the additional information is also added to the file F2 stored in the storage unit 130 immediately before the file F3 and the file F4 stored in the storage unit 130 immediately after the file F3.
  • the addition unit 146 stores in the storage unit 130 the first data and the first trigger condition corresponding to the first data, and at least one of the previous and next satisfaction of the first trigger condition. It corresponds to an example of adding means for adding additional information to the fourth data.
  • the file to which the addition unit 146 adds additional information is not limited to the example shown in FIG.
  • the adding unit 146 may add additional information to the file F1, or may add additional information to the file F5.
  • the addition unit 146 does not add additional information to the files F4 and F5, and stores one or more files set by the setting unit 148 in the storage unit 130 before the file F3 having the notified trigger ID. Additional information may be added to a plurality of consecutive files.
  • the adding unit 146 does not add additional information to the files F1 and F2, and stores one or more information set by the setting unit 148 in the storage unit 130 after the file F3 having the notified trigger ID. Additional information may be added to consecutive files.
  • the addition unit 146 adds the file to which the trigger ID has been notified and the data stored in the storage unit 130 when the first trigger condition corresponding to the file is satisfied at least one of the previous time and the next time the first trigger condition is satisfied. Additional information may be added. Further, although the description has focused on the differences from the first embodiment, in the configuration of the second embodiment, additional information may be added to files before and after the file specified by the trigger ID.
  • Embodiment 4 Next, the fourth embodiment will be described, focusing on differences from the first embodiment described above. Equivalent reference numerals are used for configurations that are the same as or equivalent to those in the first embodiment.
  • the present embodiment differs from Embodiment 1 in that adding section 146 adds one type of additional information among a plurality of types of additional information.
  • FIG. 13 shows a functional configuration of PLC 100 according to this embodiment.
  • the setting unit 148 presets a plurality of types of second trigger conditions in the trigger determination unit 143 .
  • the plurality of types of second trigger conditions are, for example, a first type of second trigger condition for determining that the product is normal and a second type of second trigger condition for determining that the product is abnormal.
  • the second trigger condition of the second type may be a condition that is satisfied when the second trigger condition of the first type is not satisfied, or a condition that is satisfied regardless of whether the second trigger condition of the first type is satisfied. It may be a condition to be established. For example, if the dimensional error of the product exceeds the allowable value, an abnormality may be detected, and if the dimensional error is within a range smaller than the allowable value, the product may be determined to be normal.
  • the setting unit 148 sets all products as targets for determining whether or not the second trigger condition of the second type is met in order to detect the presence or absence of an abnormality, while setting unit 148 to determine whether or not the second trigger condition is normal.
  • the trigger determination unit 143 may be set to periodically determine one of the plurality of products.
  • the trigger determination unit 143 determines whether or not a plurality of types of second trigger conditions are met according to the settings of the setting unit 148 . Then, when it is determined that the second trigger condition is satisfied, the addition unit 146 is notified of the type of the second trigger condition and the trigger ID. In the example of FIG. 13, the trigger determination unit 143 notifies the trigger ID TR[T30] together with information indicating normality, and notifies the trigger ID TR[T50] together with information indicating abnormality.
  • the addition unit 146 Based on the notification from the trigger determination unit 143, the addition unit 146 adds additional information corresponding to the notified type to the file having the notified trigger ID. For example, in the example of FIG. 13, the addition unit 146 adds additional information of OK[T30] indicating normality to file D[T26-T35] having a trigger ID of TR[T30]. Additional information of NG [T50] indicating an abnormality is added to the file D [T46-T55] having the trigger ID of T50]. The additional information may be added by inserting a character string "OK" indicating normality or a character string "NG” indicating abnormality at the end of the file or in the file name. It is also possible to assign a folder attribute.
  • the deletion unit 147 deletes files from the storage unit 130 for which a period of time corresponding to the type of additional information has elapsed. For example, when the remaining capacity of the storage unit 130 falls below 10%, the deletion unit 147 deletes the files in order of oldest to which additional information is not added so that the remaining capacity becomes 10% or more. good too. In addition, the deletion unit 147 may delete files to which additional information indicating that there is an abnormality are added, in order from the files whose retention period is one year. Also, files to which additional information indicating that they are normal may be deleted in order from the oldest when the number of files stored in the storage unit 130 exceeds 100.
  • the erasing unit 147 saves the data to which the additional information corresponding to the type of the second trigger condition is added in the storage means for a period of time corresponding to the one type, and then removes the data from the storage means. It corresponds to an example of erasing means for erasing.
  • the adding unit 146 adds additional information corresponding to the one type to the file, and the erasing unit 147 deletes the file to which the additional information is added from the storage unit 130 after storing it in the storage unit 130 for a period of time corresponding to the one type.
  • different storage periods can be set according to the types of files to be stored.
  • the number of types of second trigger conditions is not limited to two, and may be three or more.
  • different types of additional information may be added to the file for dimensional error anomalies, weight error anomalies, and impurity contamination anomalies.
  • the additional information in the second and third embodiments may be provided with a plurality of types. If a plurality of types of additional information are provided in the third embodiment, the additional information of the same type as that of the file specified by the trigger ID may be added to the files before and after the file.
  • Embodiment 5 Next, the fifth embodiment will be described, focusing on differences from the above-described fourth embodiment. Equivalent reference numerals are used for configurations that are the same as or equivalent to those in the fourth embodiment.
  • the present embodiment differs from the fourth embodiment in that display data generation device 300 generates display data for generating a screen based on a plurality of types of additional information.
  • FIG. 14 shows the functional configuration of the display data generating device 300 according to this embodiment.
  • the display data generation device 300 has a hardware configuration similar to that of the PLC 100 shown in FIG. 2, and exhibits various functions through the cooperation of the hardware components.
  • the display data generation device 300 includes a UI (User Interface) unit 310 that receives parameters set by the setting unit 148 of the PLC 100 from the user and outputs them to the setting unit 148, and a file from the storage unit 130.
  • a waveform display data generation unit 330 for displaying waveforms showing changes in values of device data contained in the file; and a program display data generation unit 340 of.
  • the acquisition unit 320 is mainly realized by the communication unit 106 of the display data generation device 300. Acquisition unit 320 acquires a list of files from storage unit 130 . Then, the acquiring unit 320 causes the display device 301 to display a screen as shown in FIG. 15 to prompt the user to select one of the files. The screen of FIG. 15 displays a list of file names including a character string "OK" indicating normality and file names including a character string "NG” indicating abnormality.
  • acquisition unit 320 selects a file to which additional information indicating abnormality is added and a file to which additional information indicating normality is added for comparison with the selected file. Identify and display on this screen. Specifically, the acquisition unit 320 identifies the file stored in the storage unit 130 immediately before the file selected by the user, among the files to which the additional information indicating normality and abnormality is added, and obtains the file shown in FIG. Highlight as if hatched. Note that the acquisition unit 320 may specify a file stored in the storage unit 130 next to the file selected by the user, among the files to which additional information indicating normality and abnormality is added. Also, the file to be compared may be selected again by the user.
  • Acquisition unit 320 corresponds to an example of a reception unit in display data generation device 300 that receives a user's selection of one of a plurality of first data stored in the programmable controller. Acquisition unit 320 outputs the determined three files to waveform display data generation unit 330 .
  • the waveform display data generation unit 330 causes the display device 301 to display the changes in the values of the device data contained in the three files as waveforms in a comparable format. More specifically, as shown in FIG. 16, the waveform display data generating section 330 aligns the data to which the trigger ID corresponding to when the first trigger condition is satisfied is aligned with the position of the guide G1, and the data selected by the user. A waveform W1 corresponding to the file and waveforms W2 and W3 to be compared are displayed. As a result, the three waveforms are displayed side by side in the vertical direction, and the user can easily compare the three waveforms.
  • the waveform display data generation unit 330 may display the sampling values of each waveform overlapping the guide G1, or the user may move the guide G1 in the horizontal direction.
  • the waveform display data generation unit 330 generates, in the display data generation device 300, the one first data selected by the user and immediately before or after the one first data, the same as or different from the one first data.
  • the waveform display data generation unit 330 outputs information about the file selected by the user to the program display data generation unit 340.
  • the program display data generator 340 causes the display device 301 to display a sub-window A1 displaying information about the control program P2.
  • a control program P2 which is a ladder program, is displayed in this subwindow A1, and when the user moves the guide G1, the image in the subwindow A1 is updated to display the state of the ladder program at that time.
  • device data values corresponding to sampled values of the waveform overlapping the guide G1 are displayed in the ladder program.
  • the display data generation device 300 generates display data for displaying information about data corresponding to the establishment of the second trigger condition of a single type. You may For example, the display data generation device 300 may cause the display device 301 to display waveforms indicated by a plurality of files selected by the user.
  • Embodiment 6 Next, the sixth embodiment will be described, focusing on differences from the first embodiment described above. Equivalent reference numerals are used for configurations that are the same as or equivalent to those in the first embodiment. This embodiment differs from the first embodiment in that the PLC 100 includes a transfer unit 149 that transfers data to the outside, as shown in FIG.
  • the transfer unit 149 monitors the information stored in the storage unit 130, and when the information is updated, transfers the information before or after the update to the external server 40 for backup. Specifically, the transfer unit 149 transfers the file to the external server 40 when the storage unit 145 stores the file. Further, the transfer unit 149 transfers the additional information and the file to which the additional information is added to the external server 40 when the additional information is added to the file by the adding unit 146 . Further, the transfer unit 149 transfers to the external server 40 files that are to be deleted when the files are deleted by the deletion unit 147 . Note that the transfer unit 149 may omit part of the transfer without executing all of these transfers.
  • the transfer unit 149 corresponds to an example of transfer means for transferring information to the server in the PLC 100 . It should be noted that the description has focused on the differences from the first embodiment, but the transfer unit 149 according to the present embodiment may be added to the configurations of the second to fifth embodiments.
  • the storage unit 145 stores a series of data including data assigned with a trigger ID as a file in the storage unit 130, but the present invention is not limited to this.
  • the storage unit 145 may store the data read from the buffer 120 in the storage unit 130 as it is without converting it into a file format.
  • storage unit 145 may store single data to which a trigger ID is assigned as is, or a file containing this single data in storage unit 130. good.
  • adding additional information to a file is not limited to creating a single data set that includes both additional information and a file.
  • the additional information may be added by associating it with the file using management information that associates the additional information and the file stored in different areas.
  • management information it is preferable to secure a reserved area in preparation for updating the management information.
  • Additional information may be added to files excluded from extension of the storage period, and the files with the additional information may be deleted in a shorter period of time than the files without the additional information.
  • adding unit 146 adds the Additional information may be added.
  • the erasing unit 147 saves the first data in the storage unit 130 and removes the second data from the storage unit 130 based on the additional information. It should be deleted.
  • the trigger determination unit 143 determines whether the first trigger condition for the data is met. That is, an example has been described in which the timing at which data is collected and the timing at which it is determined whether the first trigger condition is met are substantially the same. However, these timings are not limited to matching examples.
  • FIG. 18 shows an example in which the data collection unit 142 collects data D[T1], D[T2], D[T3], D[T4], and D[T5] in order.
  • the data D[T3] is output to the trigger determination unit 143, it is determined that the first trigger condition is satisfied. It may be D[T1]. That is, where n is an integer, a trigger ID is assigned to data D[T(n ⁇ 2)] when it is determined that the first trigger condition is met at the time when data D[Tn] is output to trigger determination unit 143. may be Furthermore, in contrast to the example of FIG.
  • the data D[T(n+2)] contains the trigger ID may be given.
  • the data stored in the storage unit 130 may be data collected by the data collecting unit 142 at the timing corresponding to the establishment of the first trigger condition each time the first trigger condition is established.
  • the functions of the PLC 100 according to the above embodiment can be realized by dedicated hardware or by a normal computer system.
  • the program P1 is stored and distributed on a computer-readable recording medium represented by a flexible disk, CD-ROM (Compact Disk Read-Only Memory), DVD (Digital Versatile Disk), MO (Magneto-Optical disk).
  • a computer-readable recording medium represented by a flexible disk, CD-ROM (Compact Disk Read-Only Memory), DVD (Digital Versatile Disk), MO (Magneto-Optical disk).
  • the program P1 may be stored in a disk device of a server device on a communication network typified by the Internet, superimposed on a carrier wave, and downloaded to a computer.
  • the above processing can also be achieved by starting and executing the program P1 while transferring it via a network represented by the Internet.
  • processing can also be achieved by causing all or part of the program P1 to be executed on a server device, and executing the program P1 while the computer transmits and receives information regarding the processing via a communication network. .
  • the functions described above are to be shared by the OS (Operating System) or by cooperation between the OS and the application, only the parts other than the OS may be stored in a medium and distributed. , or you may download it to your computer.
  • the means for realizing the functions of the PLC 100 is not limited to software, and part or all of it may be realized by dedicated hardware or circuits.
  • the present disclosure is suitable for logging data used for control by PLC.
  • 1000 PLC system 100 PLC, 101 processor, 102 main storage unit, 103 auxiliary storage unit, 104 input unit, 105 output unit, 106 communication unit, 107 internal bus, 110 device memory, 111 device data, 120 buffer, 130 storage unit , 141 program execution unit, 142 data collection unit, 143 trigger determination unit, 144 buffering unit, 145 storage unit, 146 addition unit, 147 deletion unit, 148 setting unit, 149 transfer unit, 200 mechanical device, 201 manufacturing completion sensor, 202 inspection sensor, 300 display data generation device, 301 display device, 310 UI unit, 320 acquisition unit, 330 waveform display data generation unit, 340 program display data generation unit, 40 external server, A1 sub-window, F1 to F5 files, G1 guide , P1 program, P2 control program, W1 to W3 waveforms.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

PLC(100)は、機器を制御するときに変化するデータをデバイスメモリ(110)から繰り返し収集するデータ収集部(142)と、予め定められた第1トリガ条件が成立すると、該第1トリガ条件の成立に対応するタイミングにおいてデータ収集部(142)によって収集されたデータを記憶部(130)に格納する格納部(145)と、第1トリガ条件とは異なる第2トリガ条件が成立する場合に、格納部(145)によって記憶部(130)に格納されたデータである、第1データと、該第1データより後にデータ収集部(142)によって収集された第2データと、の少なくとも一方に付加情報を付加する付加部(146)と、第1データ及び第2データが記憶部(130)に格納された後に、付加情報に基づいて、第1データを記憶部(130)に保存しつつ、第2データを記憶部(130)から消去する消去部(147)と、を備える。

Description

プログラマブルコントローラ、プログラマブルコントローラシステム、データ保存方法及びプログラム
 本開示は、プログラマブルコントローラ、プログラマブルコントローラシステム、データ保存方法及びプログラムに関する。
 FA(Factory Automation)の現場では、制御装置が種々の機器を制御することで、製造ライン、加工ライン及び検査ラインに代表されるラインが実現される。ラインの運用時に何らかのトラブルが発生したときには、そのトラブルの原因を究明するために、制御の履歴を示すデータが分析される。そこで、制御の際に用いられるデータを保存するための技術が提案されている(例えば、特許文献1を参照)。
 特許文献1には、記録トリガについての第1の条件が成立すると、時系列のデバイス値をログデータとして一時記録部に記録し、保存トリガについての第2の条件が成立すると、一時記録部としてのリングバッファに保持されたログデータを保存メモリに保存する技術について記載されている。この技術によれば、トラブルが発生したときに保存トリガを入力することで、トラブル発生時の原因究明にログデータを役立てることができる。
特開2020-134984号公報
 特許文献1の技術では、ログデータが最終的に保存される保存メモリの容量による制限に加えて、一時記録部の容量による制限が生じる。詳細には、記録トリガの発生からトラブルの発生までの期間が長い場合、及び、トラブルの発生までに記録トリガが複数回発生するような場合においては、一時記録部に記録されるログデータの量が多くなる。したがって、潤沢な容量の一時記録部を準備することができなければ、実際にトラブルが発生するまでに、一時記録部に記録されているログデータが上書きされることで消失してしまうおそれがある。ひいては、トラブルの原因究明が困難になるおそれがある。
 本開示は、上述の事情の下になされたもので、トラブルの原因究明をより容易なものとすることを目的とする。
 上記目的を達成するため、本開示のプログラマブルコントローラは、機器を制御するプログラマブルコントローラであって、機器を制御するときに変化するデータをメモリから繰り返し収集するデータ収集手段と、予め定められた第1トリガ条件が成立すると、該第1トリガ条件の成立に対応するタイミングにおいてデータ収集手段によって収集されたデータを記憶手段に格納する格納手段と、第1トリガ条件とは異なる第2トリガ条件が成立する場合に、格納手段によって記憶手段に格納されたデータである、第1データと、該第1データより後にデータ収集手段によって収集された第2データと、の少なくとも一方に付加情報を付加する付加手段と、第1データ及び第2データが記憶手段に格納された後に、付加情報に基づいて、第1データを記憶手段に保存しつつ、第2データを記憶手段から消去する消去手段と、を備える。
 本開示によれば、格納手段は、第1トリガ条件が成立すると、データ収集手段によって収集されたデータを記憶手段に格納する。これにより、データが最終的に保存される記憶手段以外の一時記録部の容量による制限の発生を回避することができる。また、付加手段は、第2トリガ条件が成立する場合に、第1データと第2データとの少なくとも一方に付加情報を付加し、消去手段は、付加情報に基づいて第1データを記憶手段に保存しつつ第2データを記憶手段から消去する。このため、必要なデータを記憶手段に保存する一方で、新たなデータを格納するための領域を記憶手段に確保することにより、制御に関するデータの多数の履歴を残すことができる。したがって、トラブルの原因究明をより容易なものとすることができる。
実施の形態1に係るPLCシステムの構成を示す図 実施の形態1に係るPLCのハードウェア構成を示す図 実施の形態1に係るPLCの機能的な構成を示す図 実施の形態1に係る消去部によるファイルの消去について説明するための図 実施の形態1に係る収集処理を示すフローチャート 実施の形態1に係る格納処理を示すフローチャート 実施の形態1に係るファイルの保存と消去について説明するための図 実施の形態1に係る付加処理を示すフローチャート 実施の形態1に係る第1トリガ条件及び第2トリガ条件が成立するタイミングについて説明するための図 実施の形態1に係る消去処理を示すフローチャート 実施の形態2に係るPLCの機能的な構成を示す図 実施の形態3に係る付加情報の付加について説明するための図 実施の形態4に係るPLCの機能的な構成を示す図 実施の形態5に係る表示データ生成装置の機能的な構成を示す図 実施の形態5に係る表示画面の第1の例を示す図 実施の形態5に係る表示画面の第2の例を示す図 実施の形態6に係るPLCの機能的な構成を示す図 変形例に係るデータの収集されるタイミングとトリガIDが付与されるデータとの関係を説明するための図
 以下、本開示の実施の形態に係るプログラマブルコントローラについて、図面を参照しつつ詳細に説明する。
 実施の形態1.
 図1には、本実施の形態に係るプログラマブルコントローラを有するPLC(Programmable Logic Controller)システム1000の構成が示されている。PLCシステム1000は、工場に代表される施設に構築される製造システム、検査システム、その他の処理システムの一部に相当する制御システムである。PLCシステム1000では、プログラマブルコントローラとしてのPLC100が、通信線で接続された被制御機器としての機械装置200を制御することでラインを稼働させる。PLC100は、機械装置200を制御するためのデバイスメモリ110と、デバイスメモリ110に記憶されるデバイスデータ111のログを記録するためのバッファ120及び記憶部130と、を有する。
 デバイスメモリ110に記憶されるデバイスデータ111は、機械装置200に記憶されるデータと同期されるデータを含む。PLC100は、例えば、デバイスデータ111を読み出すことで機械装置200の状態を判断し、デバイスデータ111を書き換えることで機械装置200の運転モードを変更する。また、デバイスデータ111は、機械装置200と同期されるデータの他に、PLC100が機械装置200を制御するための演算過程で用いられる中間データ、又は、機械装置200を管理するための統計データを含んでもよいし、その他の内部データを含んでもよい。機械装置200は、例えば、ラインに設置されるセンサ装置、アクチュエータ、ロボット、その他のFA機器である。
 また、PLC100は、デバイスデータ111のログを、バッファ120を経由してから記憶部130に保存する。バッファ120は、デバイスメモリ110と記憶部130との読み書きの速度差を吸収させるために設けられる。記憶部130に保存されたログは、通信線でPLC100に接続された表示データ生成装置300によって読み出され、トラブルの原因を究明するための表示データが当該ログから生成される。そして、生成された表示データに従って、表示装置301によって表示画面がユーザに対して表示される。この表示画面においては、複数のデータを示す画像が、ユーザによるデータの比較が可能な形式で表示される。
 表示データ生成装置300及び表示装置301は、PLC100に接続される産業用PC(Personal Computer)及び付属のLCD(Liquid Crystal Display)であってもよいし、一体的に形成されたタブレット端末であってもよい。また、図1においては表示データ生成装置300がPLC100の外部に配置されているが、表示データ生成装置300は、ビルディングブロック型のPLC100を構成する1つのユニットであってもよい。
 図2には、PLC100のハードウェア構成が模式的に示されている。図2に示されるように、PLC100は、プロセッサ101と、主記憶部102と、補助記憶部103と、入力部104と、出力部105と、通信部106と、を有する。主記憶部102、補助記憶部103、入力部104、出力部105及び通信部106はいずれも、内部バス107を介してプロセッサ101に接続される。
 プロセッサ101は、CPU(Central Processing Unit)又はMPU(Micro Processing Unit)を含む。プロセッサ101は、補助記憶部103に記憶されるプログラムP1を実行することにより、種々の機能を実現して、後述の処理を実行する。また、プロセッサ101は、補助記憶部103に記憶される制御プログラムP2を実行することにより、機械装置200を制御する。制御プログラムP2は、例えば、ラダープログラムであってもよいし、C言語に代表される高級言語に記述されたソースコードから生成された実行形式のバイナリファイルであってもよい。
 主記憶部102は、RAM(Random Access Memory)を含む。主記憶部102には、補助記憶部103からプログラムP1及び制御プログラムP2がロードされる。そして、主記憶部102は、プロセッサ101の作業領域として用いられる。
 補助記憶部103は、EEPROM(Electrically Erasable Programmable Read-Only Memory)及びHDD(Hard Disk Drive)に代表される不揮発性メモリを含む。補助記憶部103は、プログラムP1及び制御プログラムP2の他に、プロセッサ101の処理に用いられる種々のデータを記憶する。補助記憶部103は、プロセッサ101の指示に従って、プロセッサ101によって利用されるデータをプロセッサ101に供給する。また、補助記憶部103は、プロセッサ101から供給されたデータを記憶する。
 入力部104は、ハードウェアスイッチ、入力キー及びポインティングデバイスに代表される入力デバイスを含む。入力部104は、ユーザによって入力された情報を取得して、取得した情報をプロセッサ101に通知する。
 出力部105は、LED(Light Emitting Diode)、LCD(Liquid Crystal Display)及びスピーカに代表される出力デバイスを含む。出力部105は、プロセッサ101の指示に従って種々の情報をユーザに提示する。
 通信部106は、外部の装置と通信するためのネットワークインタフェース回路を含む。通信部106は、外部から信号を受信して、この信号により示されるデータをプロセッサ101へ出力する。また、通信部106は、プロセッサ101から出力されたデータを示す信号を外部の装置へ送信する。
 なお、PLC100がビルディングブロック型のプログラマブルコントローラである場合には、PLC100を構成する各ユニットが、図2に示されるハードウェア構成の一部又は全部を備えて、システムバスを介して互いに接続されてもよい。
 上述のハードウェア構成が協働することにより、PLC100は、デバイスデータをロギングする機能を発揮する。詳細には、PLC100は、図3に示されるように、その機能として、制御プログラムP2を実行するプログラム実行部141と、機械装置200の制御により変化するデータを記憶するデバイスメモリ110と、デバイスメモリ110に格納されているデータを繰り返し収集するデータ収集部142と、データの保存に関するトリガの有無を判定するトリガ判定部143と、収集されたデータをバッファ120に格納するバッファリング部144と、データを一時的に記憶するバッファ120と、バッファからデータを読み出して記憶部130に格納する格納部145と、データを保存する記憶部130と、記憶部130に格納されたデータに後述の付加情報を付加する付加部146と、付加情報が付加されていないデータをある程度の保存期間が経過した後に消去する消去部147と、種々のパラメータを設定する設定部148と、を有する。
 プログラム実行部141は、主としてプロセッサ101によって実現される。プログラム実行部141は、制御プログラムP2に規定された手順を繰り返し実行することにより、デバイスメモリ110のデータを利用して機械装置200を制御する。
 デバイスメモリ110は、主として主記憶部102によって実現される。デバイスメモリ110のデータは、プログラム実行部141による制御プログラムP2の実行により変化する。例えば、制御プログラムP2の実行により、センサ装置である機械装置200のセンシング結果としての値を示すデータが定期的に取得されて更新される。また、制御プログラムP2の実行により、アクチュエータである機械装置200を構成するステッピングモータの回転角度を示すデータが、機械装置200に動作を指示すべきタイミングで更新される。図3の例では、データD[T100]がデバイスメモリ110に格納されていることが示されている。ここで、「T100」は時刻に対応し、「D[T100]」は時刻T100におけるデータの値を意味する。
 データ収集部142は、主としてプロセッサ101によって実現される。データ収集部142は、デバイスメモリ110の予め設定されたアドレスの領域に格納されているデータを予め設定された周期で繰り返し読み出して、読み出したデータをトリガ判定部143に出力する。予め設定された周期は、例えば、プログラム実行部141による制御プログラムP2の1回の実行に相当するスキャンタイムである。データ収集部142は、PLC100において、機器を制御するときに変化するデータをメモリとしてのデバイスメモリ110から繰り返し収集するデータ収集手段の一例に相当する。
 トリガ判定部143は、主としてプロセッサ101によって実現される。トリガ判定部143は、データを記憶部130に格納するための第1トリガ条件が成立するか否かを判定し、記憶部130に格納されたデータの保存期間を延長するための第2トリガ条件が成立するか否かを判定する。
 第1トリガ条件及び第2トリガ条件は、設定部148によって予め設定される。第1トリガ条件及び第2トリガ条件はそれぞれ、異なる条件であって、例えば、デバイスデータのうちの指定されたビット値のOFF状態からON状態への変更、ビット値がON状態を継続する時間が閾値を超えたことの検知、複数のビット値が指定された順序でON状態になったことの検知、デバイスデータにより示される数値に関する条件の不成立から成立への判定、又は、これらの組み合わせにより成立する。第1トリガ条件及び第2トリガ条件は、これに限定されず、他の条件であってもよい。また、第1トリガ条件及び第2トリガ条件はそれぞれ、デバイスデータのうちの収集されるデータ又は収集対象でないデータに関する判定により成否が判断される条件であってもよいし、デバイスデータに関わらず成立する条件であってもよい。例えば、第1トリガ条件及び第2トリガ条件は、PLC100の外部からのトリガ信号の受信により成立する条件であってもよい。
 トリガ判定部143は、データ収集部142によって収集されたデータをバッファリング部144に出力する。トリガ判定部143は、第1トリガ条件が成立すると判定した場合には、第1トリガ条件の成立を示すトリガIDとともに、データをバッファリング部144に出力する。
 また、トリガ判定部143は、第2トリガ条件が成立すると判定した場合には、付加部146にトリガIDを通知する。ここで、第2トリガ条件は、第1トリガ条件が成立して記憶部130に格納されることが決定されたデータについての保存期間の長さを、第2トリガ条件が成立しない場合の長さから延長するための条件である。第2トリガ条件が成立した場合には、保存期間が延長されるデータを識別するための情報としてトリガIDが用いられる。
 バッファリング部144は、主としてプロセッサ101によって実現される。バッファリング部144は、トリガ判定部143から出力されたデータを順次バッファ120に格納し、第1トリガ条件の成立によりトリガIDが出力された場合には、当該トリガIDを対応するデータとともにバッファ120に格納する。
 バッファ120は、主として主記憶部102によって実現されるリングバッファである。図3の例では、バッファ120には、データとしてD[T89]、D[T90]、D[T91]...D[T100]が順に格納され、データD[T90]にはトリガIDとしてTR[T90]が付与されている。このTR[T90]というトリガIDは、データD[T90]を記憶部130に格納する第1トリガ条件が成立したことを示す。バッファ120は、PLC100において、データ収集手段によって収集されたデータを順次記憶するバッファの一例に相当する。
 格納部145は、主としてプロセッサ101によって実現される。格納部145は、予め設定された一定の時間間隔で、バッファ120においてトリガIDが付与されたデータの有無を確認する。トリガIDが付与された新たなデータを発見した場合には、格納部145は、当該新たなデータを含む一連のデータをバッファ120からトリガIDとともに読み出す。一連のデータは、トリガIDが付与されたデータよりも予め設定された個数だけ前に収集されたデータから、トリガIDが付与されたデータよりも予め設定された個数だけ後に収集されたデータまでの、連続して収集されたデータである。そして、格納部145は、読み出した一連のデータを含むファイルを、読み出したトリガIDに関連付けて記憶部130に格納する。図3の例では、格納部145が、TR[T90]というトリガIDが付与されたデータD[T90]を確認して、D[T86]からD[T95]までをまとめたファイルD[T86-T95]を記憶部130に格納することが示されている。格納部145は、PLC100において、予め定められた第1トリガ条件が成立すると、該第1トリガ条件の成立に対応するタイミングにおいてデータ収集手段によって収集されたデータを記憶手段に格納する格納手段の一例に相当する。
 記憶部130は、主として補助記憶部103又は脱着可能なメモリーカードによって実現される。
 付加部146は、主としてプロセッサ101によって実現される。付加部146は、トリガ判定部143から第2トリガ条件の成立によりトリガIDが通知されると、当該トリガIDが付与されたファイルを記憶部130から検索する。そして、付加部146は、検索の結果、発見したファイルに付加情報を付加する。付加情報は、当該付加情報が付加されたファイルの保存期間を、付加情報が付加されていないファイルの保存期間より長くするためのマークに相当する。付加情報の付加は、例えば、ファイルの終端へのマークの挿入であってもよいし、ファイル名への特定の文字列の追加であってもよいし、ファイルが格納されるフォルダを示すフォルダ属性の付与であってもよい。図3の例では、TR[T30]というトリガIDが付与されたファイルD[T26-T35]に付加情報AD[T30]が付加され、TR[T50]というトリガIDが付与されたファイルD[T46-T55]に付加情報AD[T50]が付加されることが示されている。付加部146は、PLC100において、第2トリガ条件が成立する場合に、格納手段によって記憶手段に格納されたデータに付加情報を付加する付加手段の一例に相当する。
 消去部147は、主としてプロセッサ101によって実現される。消去部147は、予め設定された一定の時間間隔で、格納部145によって記憶部130に格納されたファイルを走査して、付加情報が付加されていないファイルのうちの、保存期間が経過したファイルを、当該ファイルに関連付けられたトリガIDとともに記憶部130から消去する。記憶部130によるファイルの消去は、データの削除又は移動による空き領域の作成であってもよいし、他のファイルの上書きであってもよい。付加情報が付加されていないファイルの保存期間の長さは、例えば、1日間又は1週間である。図4には、付加情報が付加されていないファイルが消去部147によって消去されることにより空き領域が生成されることが示されている。
 また、消去部147は、付加情報が付加されているファイルのうちの、保存期間が経過したファイルについても、当該ファイルに関連付けられたトリガID及び付加情報とともに記憶部130から消去してもよい。付加情報が付加されているファイルの保存期間の長さは、付加情報が付加されていないファイルの保存期間より長く、例えば、1月間又は1年間である。消去部147は、PLC100において、記憶手段からデータを消去する消去手段の一例に相当する。
 設定部148は、主としてプロセッサ101及び入力部104の協働により実現される。設定部148は、ユーザにより入力されたパラメータを取得して、取得したパラメータを、データ収集部142、トリガ判定部143、格納部145、及び消去部147に設定する。設定部148によって設定されるパラメータは、デバイスメモリ110における収集対象のデータのアドレス、データを収集する周期、第1トリガ条件及び第2トリガ条件の内容、トリガIDを生成するための情報、格納部145がバッファ120を確認する時間間隔、ファイルの起点となるデータからトリガIDが付与されるデータまでのデータ数、ファイルの終点となるデータからトリガIDが付与されるデータまでのデータ数、消去部147が記憶部130内のファイルを走査する時間間隔、付加情報が付加されたファイル及び付加されていないファイルそれぞれの保存期間の長さ、及び、ファイルを消去するときのファイル操作内容を含む。トリガIDを生成するための情報は、例えば、トリガIDとして扱われる値が格納されるデバイスデータのアドレスであってもよいし、時刻をトリガIDとして扱うことの指示であってもよい。ファイル操作内容は、例えば、ファイルの削除又は移動の選択、ファイルの移動先のロケーションを示す情報である。
 続いて、PLC100によって実行される処理について、図5~9を参照して詳細に説明する。
 図5には、PLC100がデバイスメモリ110のデータを収集する収集処理の手順が示されている。この収集処理は、ユーザの操作による特定のアプリケーションの実行と同時に開始されてもよいし、制御プログラムP2の実行と同時に開始されてもよい。
 収集処理では、データ収集部142が、現在時刻がデータの収集タイミングであるか否かを判定する(ステップS11)。具体的には、データ収集部142が、データを収集した前回のタイミングから設定部148によって設定された収集周期に相当する時間が経過したか否かを判定する。収集周期は、例えば、1ミリ秒間又は1秒間である。ただし、収集処理が開始されてステップS11の判定が最初に実行される際には、前回の収集の有無に関わらずステップS11の判定が肯定されてもよいし、ステップS11の判定が省略されてもよい。
 現在時刻が未だデータの収集タイミングではないと判定された場合(ステップS11;No)、ステップS11の判定が繰り返されて、PLC100は、データの収集タイミングまで待機することとなる。一方、現在時刻がデータの収集タイミングであると判定された場合(ステップS11;Yes)、データ収集部142は、設定部148によって設定されたアドレスに格納されているデータをデバイスメモリ110から読み出して収集する(ステップS12)。
 次に、トリガ判定部143が、第1トリガ条件が成立するか否かを判定する(ステップS13)。例えば、第1トリガ条件が、製造工程の最終段階において単一の製品がベルトコンベアを通過したことを示すセンシング結果の取得により成立する場合には、トリガ判定部143は、製造工程における1つの製品の製造が完了したか否かを判定することとなる。
 第1トリガ条件が成立すると判定した場合(ステップS13;Yes)、トリガ判定部143は、ステップS12で収集されたデータにトリガIDを付与してバッファリング部144に出力する(ステップS14)。トリガIDは、例えば、製造された製品のシリアル番号と一対一に対応する値である。一方、第1トリガ条件が成立しないと判定した場合(ステップS13;No)、トリガ判定部143は、収集されたデータにトリガIDを付与することなく、収集されたデータをそのままバッファリング部144に出力して、ステップS15に処理を移行する。
 ステップS14に続いて、バッファリング部144は、データをバッファリングする(ステップS15)。具体的には、バッファリング部144が、トリガ判定部143から出力されたデータを、トリガIDが付与されている場合には当該トリガIDとともに、バッファ120に格納する。
 その後、ステップS11以降の処理が繰り返し実行される。これにより、デバイスメモリ110から収集対象のデータが読み出される度に、データがバッファ120に格納される。また、第1トリガ条件が成立する場合には、当該データにトリガIDが付与される。
 続いて、PLC100がバッファ120のデータから、第1トリガ条件の成立に対応するファイルを生成して記憶部130に格納する格納処理について、図6を用いて説明する。この格納処理は、図5の収集処理と同時に開始される。
 格納処理では、格納部145が、現在時刻がファイルの格納タイミングであるか否かを判定する(ステップS21)。具体的には、格納部145が、ファイルを記憶部130に格納した前回のタイミングから設定部148によって設定された時間間隔が経過したか否かを判定する。この時間間隔は、例えば、10ミリ秒間又は10秒間である。ただし、格納処理が開始されてステップS21の判定が最初に実行される際には、前回の格納の有無にかかわらずステップS21の判定が肯定されてもよいし、ステップS21の判定が省略されてもよい。
 現在時刻が未だファイルの格納タイミングではないと判定された場合(ステップS21;No)、ステップS21の判定が繰り返されて、PLC100は、ファイルの格納タイミングまで待機することとなる。一方、現在時刻がファイルの格納タイミングであると判定された場合(ステップS21;Yes)、格納部145は、第1トリガ条件が成立した新たなデータがバッファ120に格納されているか否かを判定する(ステップS22)。具体的には、格納部145は、バッファ120を走査して、トリガIDが付与された未確認のデータを検索する。
 新たなデータがバッファ120に格納されていないと判定した場合(ステップS22;No)、格納部145は、ステップS21以降の処理を繰り返す。一方、新たなデータがバッファ120に格納されていると判定した場合(ステップS22;Yes)、格納部145は、第1トリガ条件が成立したデータを含む一連のデータ群をバッファ120から読み出して、ファイルとして記憶部130に格納する(ステップS23)。具体的には、格納部145は、ステップS22において発見したトリガIDが付与された新たなデータと、当該新たなデータの前後の、設定部148により設定された個数の連続する一又は複数のデータと、を含むファイルを生成して、当該ファイルにトリガIDを関連付けて記憶部130に格納する。
 その後、格納部145は、ステップS21以降の処理を繰り返す。これにより、バッファ120にトリガIDとともに格納されたデータの前後の時系列データが繰り返し読み出されて、当該時系列データを示すファイルが記憶部130に格納される。
 図7には、収集処理及び格納処理の実行による記憶部130へのファイルの格納について模式的に示されている。図7の左側に示される「第1トリガ」の矢印はそれぞれ、第1トリガ条件の成立したデータを示す。また、第1トリガ条件が成立したデータを含む複数のデータから、ファイルF1~F5それぞれが生成されて記憶部130に格納されることが示されている。
 続いて、PLC100が記憶部130に格納されたファイルに付加情報を付加する付加処理について、図8を用いて説明する。この付加処理は、図5の収集処理と同時に開始される。
 付加処理では、トリガ判定部143が、第2トリガ条件が成立するか否かを判定する(ステップS31)。例えば、第2トリガ条件が、製造工程の後の検査工程における不適合品の検知により成立する場合には、トリガ判定部143は、製造工程において製造された製品の異常の有無を判定することとなる。
 第2トリガ条件が成立しないと判定した場合(ステップS31;No)、トリガ判定部143は、ステップS31の判定を繰り返す。一方、第2トリガ条件が成立すると判定された場合(ステップS31;Yes)、付加部146は、ステップS31における第2トリガ条件の成立に対応するファイルに付加情報を付加する(ステップS32)。具体的には、付加部146は、トリガ判定部143から通知されるトリガIDを有するファイルに、付加情報を付加する。
 その後、ステップS31以降の処理が繰り返される。これにより、第2トリガ条件が成立するファイルそれぞれに付加情報が付加される。図7の例においては、「第2トリガ」の矢印はそれぞれ、第2トリガ条件の成立を示し、ファイルF2,F3に付加情報が付加されている。
 なお、図7に示されるように、第2トリガ条件の成立によって付加情報が付加されるファイルは、第2トリガ条件の成立の直前に記憶部130に格納されたファイルに限られず、第2トリガ条件の成立時点よりも複数のファイルを遡って付加情報が付加されることがある。例えば、図9に示されるように、製造工程では製品が1つずつ製造されて製造完了センサ201の出力に基づいて第1トリガ条件の成否が判定されるが、その後の検査工程では3つの製品をまとめて検査センサ202により検査して、第2トリガ条件の成否を判定するケースを想定する。この場合には、第1トリガ条件の成否が判定される周期は、第2トリガ条件の成否が判定される周期とは異なる。また、3つの製品のうちの第2トリガ条件が成立した製品が、直前に第1トリガ条件が成立した製品である場合と、2つ前に第1トリガ条件が成立した製品である場合と、3つ前に第1トリガ条件が成立した製品である場合と、が有り得ることとなる。
 続いて、PLC100が記憶部130内のファイルを消去する消去処理について、図10を用いて説明する。この消去処理は、図5の収集処理と同時に開始される。
 消去処理では、消去部147が、現在時刻がファイルの消去タイミングであるか否かを判定する(ステップS41)。具体的には、消去部147が、前回の消去タイミングから設定部148によって設定された時間間隔が経過したか否かを判定する。この時間間隔は、例えば、1分間又は1時間である。ただし、消去処理が開始されてステップS41の判定が最初に実行される際には、前回の消去タイミングの有無にかかわらずステップS41の判定が肯定されてもよいし、ステップS41の判定が省略されてもよい。
 現在時刻が未だファイルの消去タイミングではないと判定された場合(ステップS41;No)、ステップS41の判定が繰り返されて、消去部147は、ファイルの消去タイミングまで待機することとなる。一方、現在時刻がファイルの消去タイミングであると判定した場合(ステップS41;Yes)、消去部147は、付加情報に基づいて記憶部130からファイルを消去する(ステップS42)。具体的には、消去部147は、記憶部130に格納されているファイルを走査して、付加情報が付加されたファイル、及び、付加情報が付加されていないファイルそれぞれについて、対応する保存期間が経過している場合に当該ファイルを消去する。
 その後、ステップS41以降の処理が繰り返される。これにより、付加情報が付加されたファイル、及び、付加情報が付加されていないファイルそれぞれが、保存期間が経過した特定のタイミングで記憶部130から消去される。この特定のタイミングは、例えば、ファイルが記憶部130に格納されたときから予め定められた長さ以上の時間が経過した時点であってもよいし、ファイルについて第1トリガ条件又は第2トリガ条件が成立したときから予め定められた長さ以上の時間が経過した時点であってもよい。例えば、付加情報が付加されたファイルについては当該ファイルが記憶部130に格納されてから少なくとも1年間の長期にわたって記憶部130に保存する一方、付加情報が付加されていないファイルは、空き領域を確保するために第1トリガ条件の成立から1日以上経過すれば削除することとしてもよい。また、上記の特定のタイミングは、記憶部130に保存されているデータのデータ数若しくはデータ量が閾値を超えた時点であってもよい。例えば、付加情報が付加されているファイルについては、記憶部130の使用量が90%を超えた時点で古いファイルから削除する一方、付加情報が付加されていないファイルについては、直近の10個のファイルがあれば十分として、記憶部130に記憶されているファイル数が10個を超えた時点で古いものから削除することとしてもよい。
 以上、説明したように、格納部145は、第1トリガ条件が成立すると、データ収集部142によって収集されたデータを記憶部130に格納する。これにより、データが最終的に保存される記憶部130以外のバッファ120の容量による制限の発生を回避することができる。また、付加部146は、第2トリガ条件が成立する場合に、トリガIDによって指定されるファイルに付加情報を付加し、消去部147は、付加情報が付加されたファイルを記憶部130に保存しつつ付加部146による付加情報の付加の対象から除外されたファイルを記憶部130から消去する。このため、必要なデータを記憶部130に保存する一方で、新たなファイルを格納するための領域を記憶部130に確保することにより、制御に関するデータの多数の履歴を残すことができる。したがって、トラブルの原因究明をより容易なものとすることができる。
 また、付加情報が付加されていないファイルが消去部147によって消去される特定のタイミングは、当該ファイルが記憶部130に格納されたときから予め定められた長さ以上の時間が経過した時点、当該ファイルについて第1トリガ条件が成立したときから予め定められた長さ以上の時間が経過した時点、又は、記憶部130に保存されているデータのデータ数若しくはデータ量が閾値を超えた時点である。このため、付加情報が付加されていないファイルをPLC100のユーザが要望する期間だけ記憶部130に保存した後に削除することができる。
 実施の形態2.
 続いて、実施の形態2について、上述の実施の形態1との相違点を中心に説明する。なお、上記実施の形態1と同一又は同等の構成については、同等の符号を用いる。本実施の形態は、付加部146が、バッファ内のデータにも付加情報を付加する点で、実施の形態1とは異なる。
 上記実施の形態1では、付加部146が、トリガ判定部143から通知されたトリガIDを有するファイルを記憶部130から検索する例について説明した。しかしながら、付加部146によって通知されるトリガIDを有するファイルが、記憶部130へのデータの書き込み速度が低いことにより、未だ記憶部130に格納されないケースが考えられる。
 本実施の形態に係る付加部146は、このようなケースにおいて、図11に太線の矢印で示されるように、バッファ120に格納されているデータについてもトリガIDを検索して、トリガIDを有するデータに付加情報を付加する。
 格納部145は、トリガIDが付与されたデータを含むファイルを、付加情報が付加された状態で記憶部130に格納する。ここで、付加情報が付加されているファイルは、付加情報が付加されていないファイルより重要性が高く、リングバッファであるバッファ120のデータの更新により消失する前に記憶部130に保存することが望ましい。そこで、格納部145は、バッファ120において付加情報が付加されたデータを含むファイルを、付加情報が付加されていないデータを含むファイルより優先して記憶部130に格納する。例えば、格納部145は、図11に示されるような、トリガIDが付与されているがトリガIDは付与されていないデータD[T70]と、トリガID及び付加情報の双方が付与されているデータD[T90]と、のうちの、データD[T90]をデータD[T70]より先に読み出す。そして、格納部145は、データD[T90]を含むファイルを、データD[T70]を含むファイルよりも先に記憶部130に格納する。
 以上、説明したように、格納部145は、バッファ120からトリガIDが付与されたデータを順次読み出して記憶部130にファイルを格納する際に、付加情報が付加されたデータを、当該データより先に収集されたが付加情報が付加されていない他のデータよりも優先してバッファ120から読み出して、当該データを含むファイルを記憶部130に格納する。これにより、記憶部130において付加情報を付加して長期にわたって保存すべきデータがバッファ120の更新により消失することを回避することができる。本実施の形態に係る付加部146は、第2トリガ条件が成立する場合において、バッファに格納されている、第1データより前に収集された第3データと、第1データと、のうちの第1データに付加情報を付加する付加手段の一例に相当する。
 実施の形態3.
 続いて、実施の形態3について、上述の実施の形態1との相違点を中心に説明する。なお、上記実施の形態1と同一又は同等の構成については、同等の符号を用いる。本実施の形態は、付加部146が、第2トリガ条件が成立するファイルに加えて、当該ファイルの前後に記憶部130に格納されたファイルにも付加情報を付加する点で、実施の形態1とは異なる。
 付加情報が付加されたファイルは、デバイスデータの推移を示す。第1トリガ条件の成立が1つの製品の製造完了に相当し、第2トリガ条件の成立が当該製品の異常検出に相当する場合には、異常が検出された製品の前後に製造された製品についてもデバイスデータの推移を確認したいという要望がある。
 このような要望に応えるために本実施の形態に係る付加部146は、図12に示されるように、第2トリガ条件の成立によってトリガ判定部143から通知されたトリガIDを有するファイルF3に加えて、ファイルF3の直前に記憶部130に格納されたファイルF2、及び、ファイルF3の直後に記憶部130に格納されたファイルF4にも付加情報を付加する。
 これにより、ファイルF2,F4についても保存期間が延長されて、トラブルの原因究明が容易になることが期待される。本実施の形態に係る付加部146は、第1データと、該第1データに対応する第1トリガ条件の成立の前回及び次回の少なくとも一方の第1トリガ条件の成立により記憶部130に格納された第4データと、に付加情報を付加する付加手段の一例に相当する。
 なお、付加部146が付加情報を付加するファイルは、図12に示される例に限定されない。付加部146は、ファイルF1にも付加情報を付加してもよいし、ファイルF5にも付加情報を付加してもよい。また、付加部146は、ファイルF4,F5に付加情報を付加することなく、通知されたトリガIDを有するファイルF3よりも前に記憶部130に格納された、設定部148により設定された一又は複数の連続するファイルに付加情報を付加してもよい。さらに、付加部146は、ファイルF1,F2に付加情報を付加することなく、通知されたトリガIDを有するファイルF3よりも後に記憶部130に格納された、設定部148により設定された一又は複数の連続するファイルに付加情報を付加してもよい。付加部146は、トリガIDが通知されたファイルと、当該ファイルに対応する第1トリガ条件の成立の前回及び次回の少なくとも一方の第1トリガ条件の成立により記憶部130に格納されたデータにも付加情報を付加すればよい。また、実施の形態1との相違点を中心に説明したが、実施の形態2の構成において、トリガIDにより指定されるファイルの前後のファイルにも付加情報を付加してもよい。
 実施の形態4.
 続いて、実施の形態4について、上述の実施の形態1との相違点を中心に説明する。なお、上記実施の形態1と同一又は同等の構成については、同等の符号を用いる。本実施の形態は、付加部146が、複数の種別の付加情報のうちのいずれか1つの種別の付加情報を付加する点で、実施の形態1とは異なる。図13には、本実施の形態に係るPLC100の機能的な構成が示されている。
 上記実施の形態1では、異常が検出された製品に関するファイルの保存期間を延長する例について説明した。しかしながら、異常が検出されず正常と判断された製品に関するファイルについてもある程度の期間だけ保存しておいて、異常が検出されたファイルと正常と判断されたファイルを比較したいという要望が想定される。
 そこで、本実施の形態に係る設定部148は、複数の種別の第2トリガ条件をトリガ判定部143に予め設定する。複数の種別の第2トリガ条件は、例えば、製品が正常であると判断するための第1種の第2トリガ条件と、製品が異常であると判断するための第2種の第2トリガ条件である。ここで、第2種の第2トリガ条件は、第1種の第2トリガ条件が不成立であるときに成立する条件であってもよいし、第1種の第2トリガ条件の成否に関わらず成立する条件であってもよい。例えば、製品の寸法誤差が許容値を超える場合には異常が検出され、この寸法誤差が許容値よりもさらに小さい範囲に収まっている場合には正常と判断されてもよい。
 また、設定部148は、異常の有無を検出するために第2種の第2トリガ条件の成否を判定する対象をすべての製品とする一方で、正常であると判断するための第1種の第2トリガ条件については、複数の製品のうちの1つについて定期的に判断することをトリガ判定部143に設定してもよい。
 トリガ判定部143は、設定部148の設定に従って、複数の種別の第2トリガ条件の成否を判定する。そして、第2トリガ条件が成立すると判定した場合には、当該第2トリガ条件の種別とともにトリガIDを付加部146に通知する。図13の例では、トリガ判定部143は、正常であることを示す情報とともにTR[T30]というトリガIDを通知し、異常であることを示す情報とともにTR[T50]というトリガIDを通知する。
 付加部146は、トリガ判定部143からの通知に基づいて、通知された種別に対応する付加情報を、通知されたトリガIDを有するファイルに付加する。例えば、図13の例では、付加部146は、TR[T30]というトリガIDを有するファイルD[T26-T35]に、正常であることを示すOK[T30]という付加情報を付加し、TR[T50]というトリガIDを有するファイルD[T46-T55]に、異常であることを示すNG[T50]という付加情報を付加する。付加情報の付加は、正常であることを示す「OK」という文字列又は異常であることを示す「NG」という文字列のファイル終端又はファイル名への挿入であってもよいし、種別に応じたフォルダ属性の付与であってもよい。
 消去部147は、付加情報の種別に対応する長さの期間が経過したファイルを、記憶部130から消去する。例えば、付加情報が付加されていないファイルについては、消去部147は、記憶部130の残容量が10%を下回ったタイミングで、残容量が10%以上となるように古い順にファイルを削除してもよい。また、異常であることを示す付加情報が付加されたファイルについては、消去部147は、保存期間が1年間を経過したものから古い順に消去してもよい。また、正常であることを示す付加情報が付加されたファイルについては、記憶部130に記憶されているファイル数が100を超えたタイミングで古いものから順に削除してもよい。一般的に、異常が発生する頻度は低いため、異常と判断されたファイルは、正常と判断されたファイルより長期間にわたって記憶部130に保持し、正常と判断されたファイルは、異常と判断されたファイルとの比較のために最小限の個数だけ保持することが考えられる。本実施の形態に係る消去部147は、第2トリガ条件の種別に対応する付加情報が付加されたデータを、当該一の種別に対応する長さの期間だけ記憶手段に保存した後に記憶手段から消去する消去手段の一例に相当する。
 以上、説明したように、付加部146は、複数の種別のうちの一の種別の第1トリガ条件が成立する場合に、当該一の種別に対応する付加情報をファイルに付加し、消去部147は、付加情報が付加されたファイルを、当該一の種別に対応する長さの期間だけ記憶部130に保存した後に記憶部130から消去する。これにより、保存されるファイルの種別に応じて異なる保存期間を設定することができる。
 なお、第2トリガ条件の複数の種別は、2つに限定されず、3つ以上であってもよい。例えば、寸法誤差の異常と、重量誤差の異常と、不純物の混入による異常と、で異なる種別の付加情報がファイルに付加されてもよい。また、実施の形態1との相違点を中心に説明したが、実施の形態2,3における付加情報について、複数の種別を設けてもよい。実施の形態3における付加情報について複数の種別を設ける場合には、トリガIDにより指定されるファイルと同じ種別の付加情報を、当該ファイルの前後のファイルに付加すればよい。
 実施の形態5.
 続いて、実施の形態5について、上述の実施の形態4との相違点を中心に説明する。なお、上記実施の形態4と同一又は同等の構成については、同等の符号を用いる。本実施の形態は、表示データ生成装置300が、複数の種別の付加情報に基づく画面を生成するための表示データを生成する点で、実施の形態4とは異なる。
 図14には、本実施の形態に係る表示データ生成装置300の機能的な構成が示されている。なお、表示データ生成装置300は、図2に示されたPLC100と同様のハードウェア構成を備え、ハードウェア構成要素が協働することで種々の機能を発揮する。表示データ生成装置300は、図14に示されるように、PLC100の設定部148によって設定されるパラメータをユーザから受け付けて設定部148に出力するUI(User Interface)部310と、記憶部130からファイルを読み出して取得する取得部320と、ファイルに含まれるデバイスデータの値の推移を示す波形を表示するための波形表示データ生成部330と、波形と連動して制御プログラムP2に関する情報を表示するためのプログラム表示データ生成部340と、を有する。
 取得部320は、主として表示データ生成装置300の通信部106によって実現される。取得部320は、記憶部130からファイルの一覧を取得する。そして、取得部320は、図15に示されるような画面を表示装置301に表示させて、いずれか一のファイルの選択をユーザに促す。図15の画面では、正常を示す「OK」という文字列を含むファイル名と、異常を示す「NG」という文字列を含むファイル名と、の一覧が表示されている。
 ユーザがいずれかのファイルを選択すると、取得部320は、選択されたファイルと比較するために、異常を示す付加情報が付加されたファイルと、正常を示す付加情報が付加されたファイルと、を特定してこの画面に表示する。詳細には、取得部320は、正常及び異常を示す付加情報が付加されたファイルのうちの、ユーザによって選択されたファイルの直前に記憶部130に格納されたファイルを特定して、図15においてハッチングが付されているように強調表示する。なお、取得部320は、正常及び異常を示す付加情報が付加されたファイルのうちの、ユーザによって選択されたファイルの次に記憶部130に格納されたファイルを特定してもよい。また、比較対象のファイルは、ユーザによって改めて選択されてもよい。
 ユーザが「決定」ボタンを押下又はクリックすることで、表示装置301に表示させる3つのファイルが決定される。取得部320は、表示データ生成装置300において、プログラマブルコントローラに記憶される複数の第1データからいずれか一の第1データのユーザによる選択を受け付ける受付手段の一例に相当する。取得部320は、決定された3つのファイルを波形表示データ生成部330に出力する。
 波形表示データ生成部330は、3つのファイルに含まれるデバイスデータの値の推移を波形として、比較可能な形式で表示装置301に表示させる。詳細には、図16に示されるように、波形表示データ生成部330は、第1トリガ条件の成立時に対応するトリガIDが付与されたデータをガイドG1の位置に揃えて、ユーザにより選択されたファイルに対応する波形W1と、比較対象とされる波形W2,W3と、を表示する。これにより、3つの波形が鉛直方向に並んで表示され、ユーザは3つの波形を容易に比較することができる。なお、波形表示データ生成部330は、ガイドG1に重なる波形それぞれのサンプリング値を表示してもよいし、ユーザがガイドG1を水平方向に移動してもよい。波形表示データ生成部330は、表示データ生成装置300において、ユーザにより選択された一の第1データと、該一の第1データの直前又は次に、該一の第1データと同一の又は異なる種別の付加情報が付加された他の第1データと、をプログラマブルコントローラから読み出して、読み出した一の第1データ及び他の第1データに関する情報を表示するための表示データを生成する生成手段の一例に相当する。
 また、波形表示データ生成部330は、ユーザによって選択されたファイルに関する情報をプログラム表示データ生成部340に出力する。プログラム表示データ生成部340は、図16に示されるように、制御プログラムP2に関する情報を表示するサブウィンドウA1を表示装置301に表示させる。このサブウィンドウA1では、ラダープログラムである制御プログラムP2が表示され、ユーザがガイドG1を移動させると、その時点におけるラダープログラムの状態を表示するようにサブウィンドウA1の画像が更新される。具体的には、ガイドG1に重なる波形のサンプリング値に相当するデバイスデータの値が、ラダープログラム内に表示される。
 以上、説明したように、デバイスデータの推移が比較可能な形式で表示される。これにより、トラブルの発生原因の追及を容易なものとすることができる。なお、ユーザにより選択されたファイル、選択されたファイルの直近の正常を示す付加情報が付加されたファイル、及び、選択されたファイルの直近の異常を示す付加情報が付加されたファイルから、3つの波形を表示する例について説明したが、これには限定されない。ユーザにより選択されたファイルと、選択されたファイルの直近の正常又は異常を示す付加情報が付加されたファイルから、2つの波形を表示してもよい。また、実施の形態4との相違点を中心に説明したが、表示データ生成装置300は、単一の種別の第2トリガ条件の成立に対応するデータに関する情報を表示するための表示データを生成してもよい。例えば、表示データ生成装置300は、ユーザから選択された複数のファイルにより示される波形それぞれを、表示装置301に表示させてもよい。
 実施の形態6.
 続いて、実施の形態6について、上述の実施の形態1との相違点を中心に説明する。なお、上記実施の形態1と同一又は同等の構成については、同等の符号を用いる。本実施の形態は、図17に示されるように、PLC100が、データを外部に転送する転送部149を備える点で、実施の形態1とは異なる。
 転送部149は、記憶部130に格納されている情報を監視して、情報が更新された際に更新前又は更新後の情報を外部サーバ40に転送してバックアップする。詳細には、転送部149は、格納部145によるファイルの格納の際に当該ファイルを外部サーバ40に転送する。また、転送部149は、付加部146によるファイルへの付加情報の付加の際に、付加情報及び当該付加情報が付加されるファイルを外部サーバ40に転送する。さらに、転送部149は、消去部147によるファイルの消去の際に消去対象とされたファイルを外部サーバ40に転送する。なお、転送部149は、これらすべての転送を実行することなく、一部の転送を省略してもよい。
 これにより、消去部147によって記憶部130から消去されるファイルについても、外部サーバ40に保存されるため、ファイルが必要となった場合に参照することができる。転送部149は、PLC100において、情報をサーバに転送する転送手段の一例に相当する。なお、実施の形態1との相違点を中心に説明したが、本実施の形態に係る転送部149を、実施の形態2~5の構成に追加してもよい。
 以上、本開示の実施の形態について説明したが、本開示は上記実施の形態によって限定されるものではない。
 例えば、上記実施の形態では、格納部145が、トリガIDが付与されたデータを含む一連のデータをファイルとして記憶部130に格納する例について説明したが、これには限定されない。例えば、格納部145は、バッファ120から読み出したデータをファイル形式に変換することなく、そのまま記憶部130に格納してもよい。
 また、デバイスデータの短時間における推移の重要性が低く、第1トリガ条件が成立した時点の瞬時値を知ることができれば十分であるケースも考えられる。このケースでは、格納部145は、一連のデータを含むファイルに代えて、トリガIDが付与された単一のデータをそのまま、あるいはこの単一のデータを含むファイルを記憶部130に格納してもよい。
 また、付加情報のファイルへの付加は、付加情報とファイルとの双方を含む単一のデータセットの作成に限定されない。異なる領域に保存された付加情報とファイルとを関連付ける管理情報を用いて、付加情報をファイルに関連付けることにより付加してもよい。管理情報を用いる場合には、管理情報の更新に備えて予約領域を確保することが好ましい。
 また、保存期間を延長すべきファイルに付加情報を付加する例について説明したが、これには限定されない。保存期間の延長対象から除外されたファイルに付加情報を付加して、当該付加情報を有するファイルを、当該付加情報を有しないファイルより短期間で消去してもよい。また、2以上の種別の付加情報のいずれかをすべてのファイルに付加してもよい。すなわち、付加部146は、格納部145によって記憶部130に格納されたファイルとしての、第1データと、該第1データより後にデータ収集部142によって収集された第2データと、の少なくとも一方に付加情報を付加すればよい。また、消去部147は、第1データ及び第2データが記憶部130に格納された後に、付加情報に基づいて、第1データを記憶部130に保存しつつ、第2データを記憶部130から消去すればよい。
 また、データ収集部142によってデバイスメモリ110からデータが読み出された直後に、当該データについての第1トリガ条件の成否がトリガ判定部143によって判定される例について説明した。すなわち、データが収集されるタイミングと、第1トリガ条件の成否が判定されるタイミングと、がほぼ同時である例を説明した。しかしながら、これらのタイミングは一致している例に限定されない。
 例えば、図18には、データ収集部142によってデータD[T1],D[T2],D[T3],D[T4],D[T5]が順に収集される例が示されている。この例において、データD[T3]がトリガ判定部143に出力された時点で第1トリガ条件が成立したと判断されるが、この判断によりトリガIDが付与されるデータは、2つ前のデータD[T1]であってもよい。すなわち、nを整数として、データD[Tn]がトリガ判定部143に出力された時点で第1トリガ条件が成立すると判断されたときにデータD[T(n-2)]にトリガIDが付与されてもよい。さらに、図18の例とは反対に、データD[Tn]がトリガ判定部143に出力された時点で第1トリガ条件が成立すると判断されたときにデータD[T(n+2)]にトリガIDが付与されてもよい。記憶部130に格納されるデータは、第1トリガ条件が成立する毎に、該第1トリガ条件の成立に対応するタイミングにおいてデータ収集部142によって収集されたデータであればよい。
 上述の実施形態に係るPLC100の機能は、専用のハードウェアによっても、また、通常のコンピュータシステムによっても実現することができる。
 例えば、プログラムP1を、フレキシブルディスク、CD-ROM(Compact Disk Read-Only Memory)、DVD(Digital Versatile Disk)、MO(Magneto-Optical disk)に代表されるコンピュータ読み取り可能な記録媒体に格納して配布し、そのプログラムP1をコンピュータにインストールすることにより、上述の処理を実行する装置を構成することができる。
 また、プログラムP1をインターネットに代表される通信ネットワーク上のサーバ装置が有するディスク装置に格納しておき、例えば、搬送波に重畳させて、コンピュータにダウンロードするようにしてもよい。
 また、インターネットに代表されるネットワークを介してプログラムP1を転送しながら起動実行することによっても、上述の処理を達成することができる。
 さらに、プログラムP1の全部又は一部をサーバ装置上で実行させ、その処理に関する情報をコンピュータが通信ネットワークを介して送受信しながらプログラムP1を実行することによっても、上述の処理を達成することができる。
 なお、上述の機能を、OS(Operating System)が分担して実現する場合又はOSとアプリケーションとの協働により実現する場合には、OS以外の部分のみを媒体に格納して配布してもよく、また、コンピュータにダウンロードしてもよい。
 また、PLC100の機能を実現する手段は、ソフトウェアに限られず、その一部又は全部を専用のハードウェア又は回路によって実現してもよい。
 本開示は、本開示の広義の精神と範囲を逸脱することなく、様々な実施の形態及び変形が可能とされるものである。また、上述した実施の形態は、本開示を説明するためのものであり、本開示の範囲を限定するものではない。つまり、本開示の範囲は、実施の形態ではなく、請求の範囲によって示される。そして、請求の範囲内及びそれと同等の開示の意義の範囲内で施される様々な変形が、本開示の範囲内とみなされる。
 本開示は、PLCによる制御に用いられるデータのロギングに適している。
 1000 PLCシステム、 100 PLC、 101 プロセッサ、 102 主記憶部、 103 補助記憶部、 104 入力部、 105 出力部、 106 通信部、 107 内部バス、 110 デバイスメモリ、 111 デバイスデータ、 120 バッファ、 130 記憶部、 141 プログラム実行部、 142 データ収集部、 143 トリガ判定部、 144 バッファリング部、 145 格納部、 146 付加部、 147 消去部、 148 設定部、 149 転送部、 200 機械装置、 201 製造完了センサ、 202 検査センサ、 300 表示データ生成装置、 301 表示装置、 310 UI部、 320 取得部、 330 波形表示データ生成部、 340 プログラム表示データ生成部、 40 外部サーバ、 A1 サブウィンドウ、 F1~F5 ファイル、 G1 ガイド、 P1 プログラム、 P2 制御プログラム、 W1~W3 波形。

Claims (11)

  1.  機器を制御するプログラマブルコントローラであって、
     前記機器を制御するときに変化するデータをメモリから繰り返し収集するデータ収集手段と、
     予め定められた第1トリガ条件が成立すると、該第1トリガ条件の成立に対応するタイミングにおいて前記データ収集手段によって収集されたデータを記憶手段に格納する格納手段と、
     前記第1トリガ条件とは異なる第2トリガ条件が成立する場合に、前記格納手段によって前記記憶手段に格納されたデータである、第1データと、該第1データより後に前記データ収集手段によって収集された第2データと、の少なくとも一方に付加情報を付加する付加手段と、
     前記第1データ及び前記第2データが前記記憶手段に格納された後に、前記付加情報に基づいて、前記第1データを前記記憶手段に保存しつつ、前記第2データを前記記憶手段から消去する消去手段と、
     を備えるプログラマブルコントローラ。
  2.  前記第2トリガ条件は、前記第1データが前記記憶手段に保存される期間の長さを、該第2トリガ条件が成立しない場合の長さから延長するための条件であって、
     前記付加手段は、前記第1データに前記付加情報を付加し、
     前記消去手段は、前記付加情報が付加された前記第1データを前記記憶手段に保存しつつ、前記付加手段による前記付加情報の付加の対象から除外された前記第2データを前記記憶手段から消去する、
     請求項1に記載のプログラマブルコントローラ。
  3.  前記データ収集手段によって収集されたデータを順次記憶するバッファ、をさらに有し、
     前記付加手段は、前記第2トリガ条件が成立する場合において、前記バッファに格納されている、前記第1データより前に収集された第3データと、前記第1データと、のうちの前記第1データに前記付加情報を付加し、
     前記格納手段は、前記バッファのデータを順次読み出して前記記憶手段に格納する際に、前記付加情報が付加された前記第1データを前記第3データより優先して前記バッファから読み出して前記記憶手段に格納する、
     請求項2に記載のプログラマブルコントローラ。
  4.  前記付加手段は、複数の種別のうちの一の種別の前記第2トリガ条件が成立する場合に、前記一の種別に対応する前記付加情報を前記第1データに付加し、
     前記消去手段は、前記付加情報が付加された前記第1データを、前記一の種別に対応する長さの期間だけ前記記憶手段に保存した後に前記記憶手段から消去する、
     請求項2又は3に記載のプログラマブルコントローラ。
  5.  前記付加手段は、前記第1データと、該第1データに対応する前記第1トリガ条件の成立の前回及び次回の少なくとも一方の前記第1トリガ条件の成立により前記記憶手段に格納された第4データと、に前記付加情報を付加する、
     請求項2から4のいずれか一項に記載のプログラマブルコントローラ。
  6.  前記消去手段は、特定のタイミングで、前記第1データを前記記憶手段に保存しつつ前記第2データを前記記憶手段から消去し、
     前記特定のタイミングは、前記第2データが前記記憶手段に格納されたときから予め定められた長さ以上の時間が経過した時点、前記第1トリガ条件が成立したときから予め定められた長さ以上の時間が経過した時点、又は、前記記憶手段に保存されているデータのデータ数若しくはデータ量が閾値を超えた時点である、
     請求項1から5のいずれか一項に記載のプログラマブルコントローラ。
  7.  前記格納手段による前記第1データ及び前記第2データの格納の際における前記第1データ及び前記第2データの外部のサーバへの転送、前記付加手段による前記第1データ及び前記第2データの少なくとも一方への前記付加情報の付加の際における前記付加情報及び該付加情報が付加されるデータの前記サーバへの転送、及び、前記消去手段による前記第2データの消去の際における前記第2データの前記サーバへの転送、の少なくとも1つを実行する転送手段、をさらに備える、
     請求項1から6のいずれか一項に記載のプログラマブルコントローラ。
  8.  請求項2から5のいずれか一項に記載のプログラマブルコントローラと、
     前記プログラマブルコントローラに接続される表示データ生成装置と、
     を備えるプログラマブルコントローラシステムであって、
     前記表示データ生成装置は、前記付加情報が付加された複数の前記第1データを前記プログラマブルコントローラから読み出して、複数の前記第1データに関する情報を表示するための表示データを生成する、
     プログラマブルコントローラシステム。
  9.  請求項4に記載のプログラマブルコントローラと、
     前記プログラマブルコントローラに接続される表示データ生成装置と、
     を備えるプログラマブルコントローラシステムであって、
     前記表示データ生成装置は、
     前記プログラマブルコントローラに記憶される複数の前記第1データからいずれか一の前記第1データのユーザによる選択を受け付ける受付手段と、
     ユーザにより選択された一の前記第1データと、該一の前記第1データの直前又は次に、該一の前記第1データと同一の又は異なる種別の前記付加情報が付加された他の前記第1データと、を前記プログラマブルコントローラから読み出して、読み出した一の前記第1データ及び他の前記第1データに関する情報を表示するための表示データを生成する生成手段と、を有する、
     プログラマブルコントローラシステム。
  10.  プログラマブルコントローラによって実行されるデータ保存方法であって、
     変化するデータをメモリから繰り返し収集し、
     予め定められた第1トリガ条件が成立すると、該第1トリガ条件の成立に対応するタイミングにおいて収集したデータを記憶手段に格納し、
     前記第1トリガ条件とは異なる第2トリガ条件が成立する場合に、前記記憶手段に格納されたデータである、第1データと、該第1データより後に収集した第2データと、の少なくとも一方に付加情報を付加し、
     前記第1データ及び前記第2データが前記記憶手段に格納された後に、前記付加情報に基づいて、前記第1データを前記記憶手段に保存しつつ、前記第2データを前記記憶手段から消去する、
     ことを含むデータ保存方法。
  11.  プログラマブルコントローラに、
     変化するデータをメモリから繰り返し収集し、
     予め定められた第1トリガ条件が成立すると、該第1トリガ条件の成立に対応するタイミングにおいて収集したデータを記憶手段に格納し、
     前記第1トリガ条件とは異なる第2トリガ条件が成立する場合に、前記記憶手段に格納されたデータである、第1データと、該第1データより後に収集した第2データと、の少なくとも一方に付加情報を付加し、
     前記第1データ及び前記第2データが前記記憶手段に格納された後に、前記付加情報に基づいて、前記第1データを前記記憶手段に保存しつつ、前記第2データを前記記憶手段から消去する、
     ことを実行させるためのプログラム。
PCT/JP2021/018148 2021-05-13 2021-05-13 プログラマブルコントローラ、プログラマブルコントローラシステム、データ保存方法及びプログラム WO2022239171A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN202180088801.6A CN117203588A (zh) 2021-05-13 2021-05-13 可编程控制器、可编程控制器系统、数据保存方法以及程序
US18/266,287 US20240045614A1 (en) 2021-05-13 2021-05-13 Programmable controller, programmable controller system, data storage method, and recording medium
JP2021575080A JP7275328B2 (ja) 2021-05-13 2021-05-13 プログラマブルコントローラ、プログラマブルコントローラシステム、データ保存方法及びプログラム
PCT/JP2021/018148 WO2022239171A1 (ja) 2021-05-13 2021-05-13 プログラマブルコントローラ、プログラマブルコントローラシステム、データ保存方法及びプログラム
JP2023073468A JP2023086911A (ja) 2021-05-13 2023-04-27 プログラマブルコントローラ、プログラマブルコントローラシステム、データ保存方法及びプログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/018148 WO2022239171A1 (ja) 2021-05-13 2021-05-13 プログラマブルコントローラ、プログラマブルコントローラシステム、データ保存方法及びプログラム

Publications (1)

Publication Number Publication Date
WO2022239171A1 true WO2022239171A1 (ja) 2022-11-17

Family

ID=84028067

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/018148 WO2022239171A1 (ja) 2021-05-13 2021-05-13 プログラマブルコントローラ、プログラマブルコントローラシステム、データ保存方法及びプログラム

Country Status (4)

Country Link
US (1) US20240045614A1 (ja)
JP (2) JP7275328B2 (ja)
CN (1) CN117203588A (ja)
WO (1) WO2022239171A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013186623A (ja) * 2012-03-07 2013-09-19 Toshiba Corp 伝送システム及びログデータ収集装置
JP2020016938A (ja) * 2018-07-23 2020-01-30 ファナック株式会社 データ管理装置、データ管理プログラム及びデータ管理方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7320953B2 (ja) * 2019-02-12 2023-08-04 株式会社キーエンス プログラマブルロジックコントローラ及びそのログデータ保存方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013186623A (ja) * 2012-03-07 2013-09-19 Toshiba Corp 伝送システム及びログデータ収集装置
JP2020016938A (ja) * 2018-07-23 2020-01-30 ファナック株式会社 データ管理装置、データ管理プログラム及びデータ管理方法

Also Published As

Publication number Publication date
CN117203588A (zh) 2023-12-08
JP2023086911A (ja) 2023-06-22
JP7275328B2 (ja) 2023-05-17
US20240045614A1 (en) 2024-02-08
JPWO2022239171A1 (ja) 2022-11-17

Similar Documents

Publication Publication Date Title
US11188048B2 (en) Programmable logic controller and main unit
JP2020013527A (ja) プログラマブルロジックコントローラおよびプログラム作成支援装置
JPWO2008111428A1 (ja) 運用管理装置、運用管理方法および運用管理プログラム
WO2009104268A1 (ja) パッチ候補選択装置、パッチ候補選択プログラムおよびパッチ候補選択方法
JP2020013400A (ja) 装置およびコンピュータプログラム
JP7320953B2 (ja) プログラマブルロジックコントローラ及びそのログデータ保存方法
JPWO2017046939A1 (ja) ジョブ管理装置及びジョブ管理方法及びジョブ管理プログラム
US7680980B2 (en) Image forming apparatus
WO2022239171A1 (ja) プログラマブルコントローラ、プログラマブルコントローラシステム、データ保存方法及びプログラム
JP2020134986A (ja) プログラマブルロジックコントローラ用プログラム作成支援装置
JP4894567B2 (ja) トレース情報出力装置、および、トレース情報出力方法
JP2011119870A (ja) システム、情報処理装置、画像形成装置及びそれらの方法
JP2022188197A (ja) プログラマブルロジックコントローラ、端末装置、プログラム管理システム、プログラム管理方法及びプログラム
US11340590B2 (en) Data collection system, data collection method, and information storage medium
KR101981910B1 (ko) 프로그래머블 표시기
CN113874802B (zh) 控制系统、可编程逻辑控制器以及信息处理方法
JP7224570B1 (ja) ログデータ分析支援システム、ログデータ分析支援方法、プログラム及び支援装置
JP7267519B1 (ja) ロギング装置、ログデータ分析支援システム、情報提供方法及びプログラム
JP7331507B2 (ja) コントローラ、制御システム、および制御方法
WO2024013914A1 (ja) ロギングシステム、ロギング方法及びプログラム
JP5585565B2 (ja) ファイル管理装置、ファイル管理装置の制御方法、およびそのプログラム
US20230171571A1 (en) Computer-readable recording medium, method, and system
JP6783034B1 (ja) プログラマブルロジックコントローラ、コンピュータ、方法、及びプログラム
JP4576138B2 (ja) 表示器
JP5219565B2 (ja) 履歴管理システム及びコンピュータプログラム及び履歴管理方法

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021575080

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: 21941905

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18266287

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 202180088801.6

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21941905

Country of ref document: EP

Kind code of ref document: A1