Log data file backup system and method of PLC

By setting backup notification parameters in the PLC and using a personal computer to perform automatic backup, the problem of log data loss caused by insufficient external memory capacity is solved, timely notification and automatic backup are achieved, and the integrity of the log data is ensured.

CN118749098APending Publication Date: 2024-10-08LS ELECTRIC CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202380023525.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-05-24
Filing Date
2023-01-12
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

The existing PLC log data backup system cannot effectively prevent data loss when the external memory capacity is insufficient, and cannot notify users of backup opportunities in a timely manner.

Method used

By setting the backup notification parameters in the PLC, the personal computer is used to generate and execute the backup notification, automatically back up the log data to the external device, and notify the user of the backup opportunity when the available space of the external memory is insufficient, ensuring that the log data remains up-to-date.

Benefits of technology

It effectively prevents the loss of log data, ensures that users back up in time before the external storage reaches the file storage limit state, and keeps the log data in the external storage up to date.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118749098A_ABST
    Figure CN118749098A_ABST
Patent Text Reader

Abstract

The present invention relates to a PLC log data backup system and method, in which the PLC log data backup system may include: a PC operating a development tool and generating parameters for execution and backup notification of a data log; a log data storage unit that converts the raw data of the PLC on the basis of the parameters generated by the PC, stores the converted raw data in an external memory, and notifies the point in time of backing up to the PC on the basis of the setting of the parameters for backing up the notification; and a backup device unit that backs up and stores the log data of the external memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a log data file backup system and method of a PLC (Programmable Logic Controller), and more particularly to a log data file backup system and method of a PLC capable of notifying a user of a backup opportunity before data loss occurs. Background Art

[0002] Usually, the signal from the PLC device is received and processed according to the content of the PLC internal programming, and then the processed signal is output to the device. In other words, the smooth operation of the PLC means that the automation equipment inside the factory operates efficiently. Therefore, it is necessary to continuously monitor the operation of the PLC.

[0003] Since PLC is mainly unmanned, when an abnormal action is found, in order to take follow-up measures for the abnormal action, a series of actions are monitored or log data such as past history is stored, so that it can be confirmed how the abnormal action occurred.

[0004] The data log module of the PLC has a configuration that, when a condition set by a user is satisfied, the value of a relevant device is stored together with time as log data, and the stored log data is stored in an external memory.

[0005] In the Korean patent authorization No. 10-1593829 (authorized on February 3, 2016, a PLC data log module with backup function) of the applicant of the present invention, a technical means is provided for preventing the loss of log data caused by power failure of the PLC, etc.

[0006] However, there is a need in the market for improved technical means capable of preventing data loss caused by insufficient capacity of an external memory for storing log data.

[0007] A further detailed description of the existing PLC log data backup technology is as follows.

[0008] Figure 1 This is a block diagram of a device for storing log data in an external memory in the prior art.

[0009] Reference Figure 1 , which is composed of: a parameter storage unit 200 for storing user parameter settings; a control unit 100 for acquiring original data based on the parameters stored in the parameter storage unit 200, and converting and storing the original data in an internal memory 300; and an external memory 400 for backing up the log data stored in the internal memory 300 under the control of the control unit 100.

[0010] The specific description of the existing log data backup system constructed as above is as follows.

[0011] First, the parameter storage unit 200 stores parameters such as the time of raw data of a detection device (not shown in the drawings), conversion of raw data, and the data file structure stored in the external memory 400 .

[0012] The parameters at this time can be set using a programming tool.

[0013] The parameter storage unit 200 can use a flash memory or the like.

[0014] The control unit 100 , which is an MPU (Microprocessor Unit), collects raw data and performs conversion processing by using parameters stored in the parameter storage unit 200 .

[0015] At this time, after adding index values ​​and time data to the collected original data, the control unit 100 converts the original data into the type set in the parameters and generates log data. The generated log data is stored in the internal memory 300 in the form of data columns by using time data and index values.

[0016] Furthermore, when the external memory 400 is recognized, the control unit 100 stores the data in the internal memory 300 in the external memory 400 according to the parameter setting.

[0017] At this time, the external memory 400 may be a CF (Compact Flash) or SD (Secure Digital) memory.

[0018] Figure 2 FIG. 4 is a diagram showing an example of the file structure of log data stored in the external memory 400 .

[0019] like Figure 2 As shown, the control unit 100 classifies the log data into groups and stores the grouped log data into files by using the parameters stored in the parameter storage unit 200. Each group of log data may be distinguished by a folder.

[0020] In the prior art, regarding log data storage, it is configured that when a user stores a log data file and when the number of files to be processed exceeds a maximum number of files, one of two conditions can be selected.

[0021] One is to overwrite the existing data stored in the external memory 400 with the latest log data, which stores the most recent history log data and deletes the previous log data.

[0022] The other is that the data stored in the external memory 400 cannot be deleted, which leaves the previous log data, thereby losing the recent history log data.

[0023] Thus, in the prior art, when the method of deleting the previous log data or retaining the previous log data is used, the log data loss phenomenon will occur in both cases.

[0024] Specifically, when the maximum number of files is exceeded while the log data files are stored in the external memory 400, if the most recent history is used to overwrite the existing log data, the existing log data will be deleted.

[0025] In addition, if the initial history is retained, there is a problem that data cannot be stored after the number of files is exceeded.

[0026] In the event of such data loss, there is a problem in that it is difficult to maintain and repair the PLC because the log data required for subsequent analysis cannot be ensured. Summary of the invention

[0027] Problems to be solved by the invention

[0028] In view of the problems of the prior art as described above, the problem to be solved by the present invention is to provide a system and method that can notify the user of the need for backup when the available space of the external memory is insufficient during the action of storing log files in the external memory.

[0029] In addition, the present invention provides a system and method that can automatically back up a log data file stored in an external memory to an external device when necessary, and keep the log data stored in the external memory in the latest state, thereby preventing the log data from being damaged.

[0030] Technical solutions to the problem

[0031] A system according to one aspect of the present invention for solving the technical problems described above may include: a PC (Personal Computer), which runs a development tool and generates parameters for the execution and backup notification of data logs; a log data storage unit, which converts the original data of the PLC according to the parameters generated by the PC and stores it in an external memory, and executes a notification of the time point of backup to the PC according to the setting of the backup notification parameters; and a backup device unit, which backs up and stores the log data of the external memory.

[0032] In an embodiment of the present invention, the log data storage unit may include: a parameter storage unit for storing the parameters; a data input / output unit for receiving raw data from the PLC; and a control unit for converting the received raw data into log data according to the parameters of the parameter storage unit and storing it in an installed external memory. When a log data file matching the setting of the backup notification parameters is stored, the control unit can execute the backup notification by generating a flag.

[0033] In an embodiment of the present invention, the parameters stored in the parameter storage unit may include: parameters including the number and capacity information of log data files stored in the external memory; and the backup notification parameter, which is set as a ratio relative to the number of log data files.

[0034] In an embodiment of the present invention, the control unit can store the log data files in the external memory only when the available space of the external memory is larger by comparing the available space of the external memory and the number and capacity information of the log data files of the parameter, and can calculate the file number corresponding to the ratio of the backup notification parameter.

[0035] In addition, the method of another aspect of the present invention may include: a) step of generating and storing a first parameter for converting raw data into log data, a second parameter for the number and capacity of files stored in an external memory, and a backup notification parameter for defining the time point at which the backup notification is to be performed; b) step of comparing the capacity of the external memory installed in the control unit and the second parameter, and if the capacity of the external memory is smaller, displaying an action error; c) step of confirming the backup notification parameter and defining the file for displaying the backup notification time point if the judgment result of step b) is that the capacity of the external memory is larger; and d) step of executing the storage of the log data file in the external memory, and executing the backup notification notification to the user by generating a backup notification flag in the storage order of the files defined to display the backup notification time point.

[0036] In an embodiment of the present invention, the backup notification parameter may be set as a ratio of the number of files relative to the second parameter.

[0037] In an embodiment of the present invention, after executing the step d), backing up the data of the external memory in the backup device unit may be performed, and the remaining log data files may be stored in the external memory and the past log data files may be overwritten.

[0038] Effects of the Invention

[0039] The present invention has the effect of preventing the loss of log data stored in the external memory by enabling the user to set a backup notification so as to provide a notification to the user and perform a backup before the external memory reaches a file storage limit state. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is a diagram of the configuration of a log data backup device for a conventional PLC.

[0041] Figure 2 This is a diagram of the structure of log data stored in external storage.

[0042] Figure 3 It is a structural diagram of the log data backup system of the PLC according to the preferred embodiment of the present invention.

[0043] Figure 4 yes Figure 3 Block diagram of the log data storage unit in .

[0044] Figure 5 This is a sample diagram of the interface of the development tool for setting backup notification parameters.

[0045] Figure 6 This is a diagram illustrating the control process of the control unit.

[0046] Figure 7 It is a sequence diagram of the PLC log data backup method of the present invention.

[0047] Description of Reference Numerals

[0048] 10: Log data storage unit 11: Control unit

[0049] 12: Parameter storage unit 13: Internal memory

[0050] 14: Memory identification unit 15: External memory

[0051] 16: Data input / output unit 20: PC

[0052] 30: PLC 40: Controlled device

[0053] 50: Backup device DETAILED DESCRIPTION

[0054] In order to fully understand the composition and effect of the present invention, the preferred embodiments of the present invention are described with reference to the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, and can be embodied in various forms and various changes. The description of this embodiment is only for the purpose of fully disclosing the present invention and providing for the purpose of fully disclosing the scope of the present invention to those of ordinary skill in the art to which the present invention belongs. In the accompanying drawings, for ease of description, the size of the constituent elements is enlarged compared to the actual size, and the proportion of each constituent element may be exaggerated or reduced.

[0055] The terms "first", "second", etc. may be used to describe various constituent elements, but these constituent elements are not limited to the above terms. The above terms may only be used to distinguish one constituent element from another constituent element. For example, without departing from the scope of the present invention, a "first constituent element" may be named as a "second constituent element", and similarly, a "second constituent element" may be named as a "first constituent element". In addition, unless the context clearly indicates otherwise, a singular expression includes a plural expression.

[0056] In the embodiments of the present invention, unless otherwise defined, the used terms may be construed as generally known meanings by those of ordinary skill in the art.

[0057] Hereinafter, a PLC log data backup system and method according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

[0058] Figure 3 It is a block diagram of a log data backup system of a PLC according to a preferred embodiment of the present invention.

[0059] Reference Figure 3 The present invention may include: a PLC 30, which controls a control object device 40 according to a program; a log data storage unit 10, which receives the original data of the PLC 30 according to a setting, converts it and stores it in an external memory; a PC 20, which includes a development tool, which sets parameters related to log data storage including backup notification parameters while creating or modifying the program of the PLC 30; and a backup device unit 50, which backs up and stores the data of the external memory of the log data storage unit 10 through the PC 20.

[0060] Hereinafter, the configuration and operation of the present invention configured as described above will be described in more detail.

[0061] First, the user creates a program by using a PLC program development tool provided in the PC 20. The program at this time defines what all the control target devices 40 connected to the PLC 30 are, and defines the timing of data transmission / reception between the PLC 30 and the control target devices 40.

[0062] In addition, data processing can be defined when errors occur.

[0063] That is, parameters related to the generation and storage of log data may be generated.

[0064] Figure 4 FIG. 1 is a block diagram of an implementation of the log data storage unit 10 .

[0065] Reference Figure 4 The log data storage unit 10 includes: a parameter storage unit 12 for storing parameters related to log data processing including backup notification parameters; a data input / output unit 16 for exchanging data with the PLC 30; a control unit 11 for receiving the original data of the PLC through the data input / output unit 16 according to the parameters of the parameter storage unit 12, converting and storing it in the internal memory 13; and a memory identification unit 14 for identifying whether the external memory 15 is connected.

[0066] The control unit 11 is configured to store the log data in the external memory 15 according to the parameter setting related to the log data storage, and to confirm whether a state in which storage cannot be performed occurs by using the backup notification parameter.

[0067] The user sets the parameters stored in the parameter storage unit 12 by using the PC 20 and a development tool. The present invention is not limited to a specific development tool, and any tool can be used as long as it can create and modify the PLC 30 program and can create parameters related to log data storage.

[0068] Figure 5 This is a diagram showing an example of an interface of a development tool for setting parameters in the PC 20, in particular, backup notification parameters.

[0069] Reference Figure 5 , the number and size of log data files stored in the external memory 15 can be defined. Figure 2 As explained above, log data files can be divided into folders and stored according to group types.

[0070] At this point, the user can specify the maximum number of files to be converted per group, and can also specify the file size.

[0071] In addition, the backup notification parameter may be set as a ratio relative to the maximum number of files to be converted as set above.

[0072] exist Figure 5 In the example of FIG. 1 , when the maximum number of files to be converted per group is set to 100 and the backup notification is set to 80%, the backup notification is executed when the number of files in the specific group of the external storage is 80.

[0073] As described above, the parameters set according to the user's operation on the PC 20 are stored in the parameter storage unit 12. In the above example, referring to Figure 5 , the setting of the backup notification parameters has been described, and the parameters stored in the parameter storage unit 12 include parameters of the time point of acquiring the original data and parameters of the method of converting the original data into log data.

[0074] The control unit 11 receives raw data from the PLC 30 through the data input / output unit 16 according to the parameters stored in the parameter storage unit 12 , converts the acquired raw data into log data using the conversion parameters, and stores the log data in the internal memory 13 .

[0075] In the above state, when the control unit 11 recognizes the external memory 15 through the memory recognition unit 14 , the control unit 11 stores the log data stored in the internal memory 13 in the external memory 15 .

[0076] At this time, the specific role of the control unit 11 is Figure 6 Shown.

[0077] When the memory recognition section 14 recognizes that the external memory 15 is installed, the control section 11 calculates the number and capacity of log data files for storage by analyzing the parameters.

[0078] After that, the number of log files stored in the internal memory 13 is confirmed, and after determining whether data logging for the analyzed parameters can be executed, the file number for the backup notification time point is calculated based on the number of available files and the backup notification parameters.

[0079] As described above, when the number of files of the data log to be executed is 100 and the backup notification parameter is set to perform backup notification when 80% of the time points are reached, the backup time point in the 80th file is calculated and notified to the user.

[0080] Thereafter, the control unit 11 executes a data logging operation of copying the log data in the internal memory 13 to the external memory 15 , and sequentially copies the log data to the external memory 15 in the order in which the log data is generated.

[0081] When executing the above process, before copying the 80th log data file specified by the backup notification parameter, the user is notified that a backup is required.

[0082] The notification at this time may be sent to the PC 20 through the data input / output unit 16 and displayed on the interface of the PC 20 , or the user may be notified through the PLC 30 mark.

[0083] The PLC30 flag mentioned above can be set in a variety of ways to notify the user that the backup time point has arrived by means of an alarm notification, display on the PC20 interface, and other methods.

[0084] The user backs up the log data of the external memory 15 to the backup device unit 50. At this time, the log data can be backed up directly by connecting the external memory 15 to the memory reading device of the PC 20, or the log data can be backed up by accessing the external memory 15 through the data input / output unit 16.

[0085] The backup device unit 50 may use a large-capacity data storage device, and may be a network server such as an FTP (File Transfer Protocol) server or a cloud data server.

[0086] In the above description, the case where the user manually executes the backup by operating the PC 20 after confirming the backup notification is described. However, when the backup notification is issued, the PC 20 can automatically back up the data of the external memory 15 to the backup device unit 50 according to the batch setting.

[0087] When the backup is completed, the control unit 11 stores the remaining log data in the internal memory 13 in the external memory 15, and at this time, the storage method is to use the method of overwriting the past log data with the current log data, that is, the log data in the external memory 15 that has completed the backup is kept in the latest state.

[0088] As described above, the present invention can notify the user of the time point when the external memory needs to be backed up according to the backup notification parameters set by the user, thereby backing up the data of the external memory, and then maintaining the external memory in the latest log data state, thereby preventing the loss of log data.

[0089] Figure 7 It is a sequence diagram of the log data file backup method of the PLC of the present invention.

[0090] Reference Figure 7The log data file backup method of the PLC of the present invention may include: when the external memory 15 is installed, the control unit 11 analyzes the parameters of the parameter storage unit 12 in step S71; calculates the capacity of the external memory 15 in step S72; determines whether the capacity of the external memory 15 can store the file set in the parameter, if it is determined that the available capacity of the external memory 15 is insufficient, then displays a data log action error in step S73; if it is determined in step S73 that the available capacity of the external memory 15 is sufficient, then calculates the file number of the backup notification to be executed by confirming the backup notification parameters of the parameter storage unit 12 in step S74; executes the data log in step S75; and confirms whether the file number of the execution data log is the calculated file number, if it is confirmed to be the same, then notifies the user of the backup time point through a mark in step S76.

[0091] A further detailed description of the backup method of the present invention as described above is as follows.

[0092] First, as shown in step S71 , when the memory recognition unit 14 recognizes that the external memory 15 is installed, the control unit 11 checks the parameters of the parameter storage unit 12 .

[0093] At this time, the parameters to be confirmed are the parameters for the number and capacity of files to be stored in the external memory 15 and the backup notification parameter set as a ratio to the total number of files to be stored.

[0094] Then, as shown in step S72, the control unit 11 calculates the capacity of the installed external memory 15. The capacity at this time is not the total capacity but the available capacity that can be used.

[0095] Thereafter, in step S73 , it is determined whether the log data file set in the parameter can be stored in the calculated capacity of the external memory 15 .

[0096] That is, it is confirmed whether the available capacity of the external memory 15 is larger than the number of files and the capacity information confirmed in step S71.

[0097] If the available capacity of the external memory 15 is insufficient, the control unit 11 displays a data logging operation error. The display at this time may be displayed on the PC 20.

[0098] Then, in step S73, if the available capacity of the external memory 15 is sufficient, the control unit 11 calculates the file number for which backup notification is to be executed by confirming the backup notification parameter of the parameter storage unit 12, as shown in step S74.

[0099] In the above example, if a parameter is set to store 100 log data files in the external memory 15 and a backup notification parameter is set to perform backup notification when 80% of the total log data files are reached, the 80th log data file is set as the log data file for which backup notification is performed.

[0100] When the above-described setting is completed, as shown in step S75 , the log data file is stored in the available space of the external memory 15 .

[0101] At this time, the stored log data files are stored in chronological order starting from the most past data.

[0102] Afterwards, as shown in step S76, the control unit 11 confirms whether the number of the next log data to be executed is the file number calculated previously. If it is confirmed to be the same, the backup time point is notified to the user through a flag. If it is confirmed to be not the calculated file number, the data log continues to be executed.

[0103] As described above, in the present invention, the user can freely set the backup notification time point, and automatically or manually perform backup according to the backup notification, thereby preventing damage to important log data.

[0104] Although the embodiments of the present invention are described above, they are only exemplary, and those skilled in the art can implement various modifications and embodiments within the scope of equivalence. Therefore, the true technical protection scope of the present invention should be determined by the attached claims.

[0105] Industrial Applicability

[0106] The present invention relates to a system and method for backing up PLC log data files by utilizing natural laws, thus having industrial applicability.

Claims

1. A PLC log data backup system, wherein: include: PC, running the development tool, and generating data logs of execution and backup notification parameters; a log data storage unit, which converts the original data of the PLC according to the parameters generated by the PC and stores it in an external memory, and executes a notification of a time point of backup to the PC according to the setting of the backup notification parameter; as well as The backup device unit backs up and stores the log data in the external memory.

2. The PLC log data backup system according to claim 1, characterized in that: The log data storage unit includes: A parameter storage unit for storing the parameters; a data input / output unit that receives raw data from the PLC; and a control unit, which converts the received raw data into log data according to the parameters of the parameter storage unit and stores the log data in the installed external memory, When a log data file matching the setting of the backup notification parameter is stored, the control section performs the backup notification by generating a flag.

3. The PLC log data backup system according to claim 2, wherein: The parameters stored in the parameter storage unit include: parameters including information on the number and capacity of log data files to be stored in the external storage; and The backup notification parameter is set as a ratio relative to the number of the log data files.

4. The PLC log data backup system according to claim 3, characterized in that: The control unit compares the available space of the external memory with the number and capacity information of the log data files of the parameter to store the log data files in the external memory only when the available space of the external memory is larger, and calculates a file number corresponding to the ratio of the backup notification parameter.

5. A PLC log data backup method, wherein: include: a) step, generating and storing a first parameter for converting raw data into log data, a second parameter for the number and capacity of files to be stored in the external memory, and a backup notification parameter defining a time point at which the backup notification is to be performed; b) step of comparing the capacity of the external memory installed in the control unit with the second parameter, and displaying an action error if the capacity of the external memory is smaller; Step c), if the judgment result of step b) is that the capacity of the external memory is larger, confirming the backup notification parameters and defining a file that displays the backup notification time point; as well as d) Step of storing the log data file in an external storage device and notifying the user of the backup by generating a backup notification mark in the storage order of the files at the defined backup notification time point.

6. The PLC log data backup method according to claim 5, characterized in that: The backup notification parameter is set as a ratio of the number of files relative to the second parameter.

7. The PLC log data backup method according to claim 5, characterized in that: After executing the step d), backing up the data of the external memory in the backup device unit is performed, and storing the remaining log data files in the external memory and overwriting the past log data files is performed.

Citation Information

Patent Citations

  • PLC data log module with backup function

    KR101593829B1