KR101365292B1 - Apparatus and method for managing file - Google Patents

Apparatus and method for managing file Download PDF

Info

Publication number
KR101365292B1
KR101365292B1 KR1020120061127A KR20120061127A KR101365292B1 KR 101365292 B1 KR101365292 B1 KR 101365292B1 KR 1020120061127 A KR1020120061127 A KR 1020120061127A KR 20120061127 A KR20120061127 A KR 20120061127A KR 101365292 B1 KR101365292 B1 KR 101365292B1
Authority
KR
South Korea
Prior art keywords
file
information
storage device
log
plc
Prior art date
Application number
KR1020120061127A
Other languages
Korean (ko)
Other versions
KR20130137477A (en
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 KR1020120061127A priority Critical patent/KR101365292B1/en
Publication of KR20130137477A publication Critical patent/KR20130137477A/en
Application granted granted Critical
Publication of KR101365292B1 publication Critical patent/KR101365292B1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/16Protection against loss of memory contents
    • 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
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/14Plc safety
    • G05B2219/14055Make log, journal, history file of state changes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Automation & Control Theory (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

본 발명은 PLC 로그 파일을 백업하는 파일 관리 장치 및 파일 관리 방법에 관한 것이다.
본 발명은 PLC 로그 파일을 별도의 저장 장치에 백업하여 관리하는 장치로서, 상기 저장 장치의 파일 관리 정보를 저장하는 저장부 및 상기 파일 관리 정보를 이용하여 상기 저장 장치에 상기 로그 파일을 백업하는 제어부를 포함한다.
The present invention relates to a file management apparatus and a file management method for backing up a PLC log file.
The present invention provides a device for backing up and managing a PLC log file in a separate storage device, wherein the storage unit stores file management information of the storage device and a control unit for backing up the log file to the storage device using the file management information. It includes.

Description

파일 관리 장치 및 파일 관리 방법{APPARATUS AND METHOD FOR MANAGING FILE}File management device and file management method {APPARATUS AND METHOD FOR MANAGING FILE}

본 발명은 PLC 로그 파일을 백업하는 파일 관리 장치 및 파일 관리 방법에 관한 것이다.The present invention relates to a file management apparatus and a file management method for backing up a PLC log file.

산업 현장의 자동화 설비는 릴레이 등을 사용한 기계적인 장비로 구성된다. 기계적인 장비로 구성된 자동화 설비를 변경하기 위해서는 설비의 내부 회로 배선을 변경하여야 하는 어려움이 있다. 이와 같은 어려움을 극복하기 위하여 PLC(Programmable Logic Controller)를 이용한다.The automation equipment of the industrial site consists of mechanical equipment using relays and so on. It is difficult to change the internal circuit wiring of the equipment in order to change the automatic equipment constituted by the mechanical equipment. In order to overcome such difficulties, PLC (Programmable Logic Controller) is used.

PLC 이용 중, 예상치 못한 자료 손실에 대비하기 위하여 파일을 임시로 복제하여 저장하는 백업(backup) 과정이 진행될 수 있다. PLC의 데이터 로그(log) 모듈은 CPU 모듈로부터 수신한 PLC 로그 파일을 이동식 저장 장치에 백업할 수 있다.During the PLC, a backup process may be performed to temporarily copy and store a file in order to prepare for unexpected data loss. The data log module of the PLC may back up the PLC log file received from the CPU module to the removable storage device.

이때, 데이터 로그 모듈은 이동식 저장 장치에서 PLC 로그 파일과 동일한 파일이 존재하는지 여부를 검색하고, 해당 파일이 존재하지 않는 경우 PLC 로그 파일을 복제하여 새로운 파일을 생성한 후, 이동식 저장 장치의 데이터 영역인 클러스터(cluster)에 새로이 생성된 파일을 저장한다.At this time, the data log module detects whether the same file as the PLC log file exists in the removable storage device. If the file does not exist, the data log module creates a new file by duplicating the PLC log file. Save the newly created file in the cluster.

다만, 산업용 제어기기인 PLC는 대용량 데이터를 처리하기 때문에, 이와 같은 파일 생성 및 저장 과정에서 긴 시간이 소요된다. 결과적으로, PLC의 대용량 데이터를 백업하는 과정에서 데이터 분실이 발생하는 문제점이 있다.However, since the PLC, which is an industrial controller, processes a large amount of data, it takes a long time in the file creation and storage process. As a result, there is a problem that data loss occurs in the process of backing up a large amount of data of the PLC.

본 발명은 대용량 데이터를 손실 없이 백업할 수 있도록 하는 파일 관리 장치 및 파일 관리 방법을 제공한다.The present invention provides a file management apparatus and a file management method that can back up a large amount of data without loss.

또한 본 발명은 보다 신속한 백업을 지원할 수 있도록 하는 파일 관리 장치 및 파일 관리 방법을 제공한다.The present invention also provides a file management apparatus and a file management method that can support faster backup.

본 발명의 일 실시 예에 따른 파일 관리 장치는 PLC 로그 파일을 별도의 저장 장치에 백업하여 관리하는 장치로서, 상기 저장 장치의 파일 관리 정보를 저장하는 저장부 및 상기 파일 관리 정보를 이용하여 상기 저장 장치에 상기 로그 파일을 백업하는 제어부를 포함한다.File management apparatus according to an embodiment of the present invention is a device for backing up and managing the PLC log file to a separate storage device, the storage unit for storing the file management information of the storage device and the storage using the file management information It includes a control unit for backing up the log file to the device.

본 발명의 일 실시 예에 따른 파일 관리 방법은 상기 저장 장치의 파일 식별 정보 및 파일 위치 정보를 저장하는 단계, 상기 파일 식별 정보 및 상기 파일 위치 정보를 이용하여 상기 로그 파일의 저장 위치를 검색하는 단계 및 상기 저장 장치의 상기 검색된 저장 위치에, 상기 로그 파일을 전송하는 단계를 포함한다.According to an embodiment of the present disclosure, a file management method includes storing file identification information and file location information of the storage device, and retrieving a storage location of the log file using the file identification information and the file location information. And transmitting the log file to the retrieved storage location of the storage device.

본 발명에 따르면, 대용량 데이터를 손실 없이 백업할 수 있다.According to the present invention, a large amount of data can be backed up without loss.

또한 본 발명에 따르면, 보다 신속한 백업을 지원할 수 있다.In addition, according to the present invention, it is possible to support faster backup.

도 1은 본 발명의 실시 예에 따른 파일 관리 장치의 블록 구성도이다.
도 2는 본 발명의 실시 예에 따른 PLC의 데이터 로그 모듈을 설명하기 위한 블록 구성도이다.
도 3은 본 발명의 실시 예에 따른 PLC 로그 파일 백업을 위한 준비 과정을 설명하기 위한 흐름도이다.
도 4는 본 발명의 실시 예에 따른 PLC 로그 파일 백업을 설명하기 위한 흐름도이다.
1 is a block diagram illustrating a file management apparatus according to an exemplary embodiment of the present invention.
2 is a block diagram illustrating a data log module of a PLC according to an embodiment of the present invention.
3 is a flowchart illustrating a preparation process for PLC log file backup according to an embodiment of the present invention.
4 is a flowchart illustrating a backup of a PLC log file according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시 예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. In order to clearly illustrate the present invention, parts not related to the description are omitted, and similar parts are denoted by like reference characters throughout the specification.

명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다.Throughout the specification, when a part is referred to as being "connected" to another part, it includes not only "directly connected" but also "electrically connected" with another part in between .

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is said to "include" a certain component, it means that it can further include other components, without excluding other components unless specifically stated otherwise.

이하 도면을 참조하여 본 발명의 실시 예를 상세히 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

도 1은 본 발명의 실시 예에 따른 파일 관리 장치의 블록 구성도이다.1 is a block diagram illustrating a file management apparatus according to an exemplary embodiment of the present invention.

도 1을 참조하면, 본 발명의 실시 예에 따른 파일 관리 장치(100)는 저장부(101), 제어부(103)를 포함한다. 파일 관리 장치(100)는 파일 손실에 대비하여 별도의 저장 장치 예컨대, 이동식 저장 장치에 로그 파일을 정기적으로 또는 비정기적으로 백업함으로써, 로그 파일을 영구 저장할 수 있다.Referring to FIG. 1, the file management apparatus 100 according to an exemplary embodiment of the present disclosure includes a storage 101 and a controller 103. The file management apparatus 100 may permanently store the log file by regularly or irregularly backing up the log file to a separate storage device, for example, a removable storage device, in preparation for file loss.

저장부(101)는 이동식 저장 장치의 파일 관리 정보를 저장한다.The storage unit 101 stores file management information of the removable storage device.

파일 관리 정보는 파일 식별 정보 및 파일 위치 정보를 포함한다. 이때, 파일 식별 정보 및 파일 위치 정보는 이동식 저장 장치에 저장된 정보를 가져온 것이다. 파일 식별 정보는 PLC로부터 이동식 저장 장치에 백업 되어 저장된 로그 파일의 식별 정보로서 예컨대, 파일 이름, 파일 크기, 파일 생성 날짜, 파일 수정 날짜 등을 포함할 수 있으며, 이에 한정되는 것은 아니다. 파일 위치 정보는 클러스터 정보, 파일이 현재 작성되고 있는 포인터를 포함할 수 있다. 클러스터 정보는 이동식 저장 장치 내에서 파일이 저장되는 위치인 클러스터 주소 정보, 파일에 연결되어 있는 모든 클러스터 정보 등을 포함할 수 있으며, 이에 한정되는 것은 아니다. 이때, 클러스터 주소 정보는 파일 순서대로 작성될 수 있다. 파일이 현재 작성되고 있는 포인터는 향후 백업 될 데이터가 저장될 주소를 의미한다. 파일 관리 정보는 예컨대, FAT32 파일 시스템 정보를 포함할 수 있다.The file management information includes file identification information and file location information. In this case, the file identification information and the file location information are obtained from information stored in the removable storage device. The file identification information may include, for example, a file name, a file size, a file creation date, a file modification date, and the like, as identification information of a log file which is backed up from the PLC to a removable storage device and is not limited thereto. The file location information may include cluster information and a pointer at which the file is currently created. The cluster information may include cluster address information, which is a location where a file is stored in the removable storage device, all cluster information connected to the file, and the like, but is not limited thereto. In this case, the cluster address information may be created in file order. The pointer where the file is currently created means the address where the data to be backed up will be stored. The file management information may include, for example, FAT32 file system information.

제어부(103)는 검색부(105), 전송부(107)를 포함한다.The controller 103 includes a searcher 105 and a transmitter 107.

검색부(105)는 파일 관리 정보를 이용하여 저장부(101)에서 로그 파일의 저장 위치를 검색한다. 검색부(105)가 이동식 저장 장치(220)에 해당 로그 파일이 존재하는지 검사하고, 해당 로그 파일이 없는 경우 파일을 새로이 생성하는 대신, 저장부(101)에서 로그 파일의 저장 위치를 검색함으로써 로그 파일 백업 속도가 향상된다. The search unit 105 searches the storage location of the log file in the storage unit 101 using the file management information. The search unit 105 checks whether a corresponding log file exists in the removable storage device 220, and if the log file does not exist, instead of creating a new file, the search unit 105 searches the storage location of the log file in the storage unit 101 to log it. File backup speed is improved.

전송부(107)는 이동식 저장 장치에 로그 파일을 백업한다. 이때, 로그 파일이 백업되는 위치는 이동식 저장 장치의 데이터 영역 중 검색부(105)가 검색한 클러스터 위치이다. 본 발명의 일 실시 예에 따른 파일 관리 장치(100)를 이용하여 이동식 저장 장치에 로그 데이터 백업을 실행함에 있어서, 실제로 파일 관리 장치(100)와 이동식 저장 장치 사이에 인터페이스를 수행하는 유일한 시점은 전송부(107)가 이동식 저장 장치에 로그 데이터를 저장하는 시점이다.The transmitter 107 backs up the log file to the removable storage device. In this case, the location where the log file is backed up is the cluster location searched by the search unit 105 in the data area of the removable storage device. In executing log data backup to the removable storage device using the file management device 100 according to an embodiment of the present invention, the only time point at which the interface between the file management device 100 and the removable storage device is actually performed is transmission. At this time, the unit 107 stores log data in the removable storage device.

도 2는 본 발명의 실시 예에 따른 PLC의 데이터 로그 모듈을 설명하기 위한 블록 구성도이다.2 is a block diagram illustrating a data log module of a PLC according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 실시 예에 따른 PLC의 데이터 로그 모듈(200)는 인터페이스부(201), 로그 데이터 저장부(203), 제어부(205), 위치 데이터 저장부(207), 버퍼(209), 표시부(211)를 포함한다. 데이터 로그 모듈(200)은 전원 모듈(230)로부터 동작에 필요한 전원을 공급받을 수 있다. 데이터 로그 모듈(200)은 CPU 모듈(240)로부터 전송된 데이터를 수신할 수 있다.2, a data log module 200 of a PLC according to an embodiment of the present invention may include an interface unit 201, a log data storage unit 203, a control unit 205, a position data storage unit 207, and a buffer. 209 and a display portion 211. The data log module 200 may receive power required for operation from the power module 230. The data log module 200 may receive data transmitted from the CPU module 240.

CPU 모듈(240)은 데이터 로그 모듈(200)에 설정된 파라미터를 인식하여, CPU 모듈(240)에 저장된 해당 디바이스 관련 데이터를 데이터 로그 모듈(200)로 전송한다.The CPU module 240 recognizes a parameter set in the data log module 200 and transmits the device-related data stored in the CPU module 240 to the data log module 200.

인터페이스부(201)는 데이터 로그 모듈(200)과 CPU 모듈(240)을 연결하며, CPU 모듈(240)과 읽기 및 쓰기 기능을 공유한다. 인터페이스부(201)는 예컨대, 듀얼 포트 RAM(dual port RAM)을 포함할 수 있다.The interface unit 201 connects the data log module 200 and the CPU module 240 and shares the read and write functions with the CPU module 240. The interface unit 201 may include, for example, a dual port RAM.

로그 데이터 저장부(203)는 인터페이스부(201)의 RAM이 읽은 CPU 데이터를 임시로 저장한다. RAM이 읽은 CPU 데이터는 로그 데이터로서, 백업의 대상이 되는 데이터이다.The log data storage unit 203 temporarily stores CPU data read by the RAM of the interface unit 201. The CPU data read by the RAM is log data, which is the data to be backed up.

이동식 저장 장치(220)는 보존이 필요한 데이터를 영구 저장하기 위한 장치로서 예컨대, CF(Compact Flash) 메모리 또는 USB(Universal Serial Bus) 메모리를 포함할 수 있다. 데이터 로그 모듈(200)에 저장되는 데이터는 개인용 컴퓨터(PC)에서 쉽게 이용될 수 있도록, CSV(Comma Separated Value) 파일 포맷으로 변환되어 저장될 수 있고, CSV 파일 포맷의 로그 데이터가 이동식 저장 장치(220)에 저장될 수 있다. 이동식 저장 장치(220)는 CSV 형식의 로그 데이터를 저장하기 위하여 FAT32(File Allocation Table 32) 파일 시스템 구조를 이용할 수 있다.The removable storage device 220 may include a Compact Flash (CF) memory or a Universal Serial Bus (USB) memory as a device for permanently storing data that needs to be preserved. Data stored in the data log module 200 may be converted and stored in a comma separated value (CSV) file format so that it can be easily used in a personal computer (PC), and the log data of the CSV file format may be stored in a removable storage device ( 220 may be stored. The removable storage device 220 may use a FAT32 (File Allocation Table 32) file system structure to store log data in CSV format.

위치 데이터 저장부(207)는 이동식 저장 장치(220)에 저장된 파일 관리 정보를 저장한다. 이동식 저장 장치(220)의 데이터 영역은 복수의 클러스터를 포함하고, 파일의 크기는 가변적이므로 하나의 파일이 복수의 클러스터로 구성될 수 있다. 모든 파일은 파일을 구성하는 전체 클러스터 정보를 포함한다.The location data storage unit 207 stores file management information stored in the removable storage device 220. Since the data area of the removable storage device 220 includes a plurality of clusters, and the file size is variable, one file may be composed of a plurality of clusters. Every file contains the complete cluster information that makes up the file.

위치 데이터 저장부(207)는 고속으로 동작하고, 대용량 데이터를 저장할 수 있는 SDRAM(Synchronous Dynamic RAM)을 포함할 수 있다. 예를 들어, 이동식 저장 장치(220)의 용량이 16GB인 경우에 필요한 SDRAM의 용량은 16MB이다.The location data storage unit 207 may operate at high speed and include a synchronous dynamic RAM (SDRAM) capable of storing a large amount of data. For example, when the capacity of the removable storage device 220 is 16 GB, the capacity of the SDRAM required is 16 MB.

버퍼(209)는 데이터 로그 모듈(200) 내에서 데이터의 이동 통로가 되는 데이터 버스와 이동식 저장 장치(220)를 구분한다. 버퍼(209)는 이동식 저장 장치(220)가 데이터 로그 모듈(200)과 연결되었는지 여부를 제어부(205)에 알리기 위한 신호(CD)와 이동식 저장 장치(220)가 동작 가능한 상태인지 여부를 알리기 위한 신호(OE)를 송수신할 수 있다.The buffer 209 distinguishes between the data bus, which is a moving path of data in the data log module 200, and the removable storage device 220. The buffer 209 is used to inform the controller 205 of whether the removable storage device 220 is connected to the data log module 200 and whether the removable storage device 220 is in an operable state. The signal OE can be transmitted and received.

제어부(205)는 데이터 로그 모듈(200)과 이동식 저장 장치(220)가 데이터를 상호 전송할 수 있도록 제어한다. 제어부(205)는 이동식 저장 장치(220)에 저장된 파일 관리 정보가 위치 데이터 저장부(207)에 저장되도록 제어할 수 있다. 또한, 제어부(205)는 백업이 필요한 로그 데이터가 로그 데이터 저장부(203)로부터 이동식 저장 장치(220)로 백업 되도록 제어할 수 있다. 제어부(205)는 예컨대, 범용 MPU(Micro Processor Unit)을 포함할 수 있다.The controller 205 controls the data log module 200 and the removable storage device 220 to transmit data to each other. The controller 205 may control the file management information stored in the removable storage device 220 to be stored in the location data storage 207. In addition, the controller 205 may control the log data to be backed up from the log data storage unit 203 to the removable storage device 220. The controller 205 may include, for example, a general purpose microprocessor unit (MPU).

표시부(211)는 데이터 로그 모듈(200)의 동작 상태를 표시할 수 있고 예컨대, LED(Light-Emitting Diode)를 포함한다.The display unit 211 may display an operation state of the data log module 200 and includes, for example, a light-emitting diode (LED).

도 3은 본 발명의 실시 예에 따른 PLC 로그 파일 백업을 위한 준비 과정을 설명하기 위한 흐름도이다.3 is a flowchart illustrating a preparation process for PLC log file backup according to an embodiment of the present invention.

도 3을 참조하면, 제어부(205)는 PLC 로그 데이터를 백업하기에 앞서, 데이터 로그 모듈(200)의 위치 데이터 저장부(207)에 이동식 저장 장치(220)의 파일 관리 정보를 저장할 수 있다.Referring to FIG. 3, the controller 205 may store file management information of the mobile storage device 220 in the location data storage 207 of the data log module 200 before backing up the PLC log data.

우선, 데이터 로그 모듈(200)의 전원이 켜져 있는지 판단한다(S301). 제어부(205)는 전원 모듈(230)이 데이터 로그 모듈(200)에 전원을 공급하고 있는지 여부를 판단할 수 있다.First, it is determined whether the power of the data log module 200 is turned on (S301). The controller 205 may determine whether the power module 230 is supplying power to the data log module 200.

데이터 로그 모듈(200)의 전원이 켜져 있는 경우, 제어부(205)는 데이터 로그 모듈(200)에 이동식 저장 장치(220)가 장착되어 있는지 판단한다(S303). 이동식 저장 장치(220)가 데이터 로그 모듈(200)에 장착되어 있지 않은 상태에서는 데이터를 백업할 수 없으므로, 제어부(205)는 이동식 저장 장치(220)가 데이터 로그 모듈(200)에 장착될 때까지 장착 여부만 판단한다.When the power of the data log module 200 is turned on, the controller 205 determines whether the removable storage device 220 is mounted in the data log module 200 (S303). Since the data cannot be backed up when the removable storage device 220 is not mounted in the data log module 200, the controller 205 may not be able to back up the data until the removable storage device 220 is mounted in the data log module 200. Only determine whether it is installed.

데이터 로그 모듈(200)에 이동식 저장 장치(220)가 장착되어 있는 경우, 제어부(205)는 이동식 저장 장치(220)에 포맷(format)이 실행된 상태인지 판단한다(S305). 이동식 저장 장치(220)에 포맷이 실행된 후, 이동식 저장 장치(220)의 파일 관리 시스템 영역에 로그 파일의 파일 식별 정보 및 파일 위치 정보 등과 같은 파일 관리 정보가 생성된다.When the removable storage device 220 is mounted on the data log module 200, the controller 205 determines whether a format has been executed on the removable storage device 220 (S305). After the format is executed in the removable storage device 220, file management information such as file identification information and file location information of a log file is generated in a file management system area of the removable storage device 220.

이동식 저장 장치(220)의 상태가 포맷(format)이 실행되지 않은 상태라면, 제어부(205)는 이동식 저장 장치(220)에 저장된 파일 정보를 데이터 로그 모듈(200)에 저장된 파라미터의 파일 정보와 비교한다(S307). 데이터 로그 모듈(200)에 저장된 파라미터의 파일 정보는 로깅이 수행되어야 하는 파일의 이름 정보와 개수 정보를 포함하며, 이에 한정되는 것은 아니다. 이동식 저장 장치(220)의 파일 정보가 데이터 로그 모듈(200)에 저장된 파라미터의 파일 정보와 일치하는 경우는 예컨대, 제어부(205)가 데이터 로그 모듈(200)에 장착된 이동식 저장 장치(220)에 로그 데이터를 백업하는 도중, 잠시 이동식 저장 장치(200)를 데이터 로그 모듈(200)과 분리하였다가 그대로 다시 장착한 경우이다. 이러한 경우는 PLC 로그 파일 백업을 위한 준비 과정이 완료된 경우이므로 제어부(205)는 초기화를 종료하고, 바로 PLC 로그 파일의 백업을 진행할 수 있다.If the state of the removable storage device 220 is not formatted, the controller 205 compares file information stored in the removable storage device 220 with file information of parameters stored in the data log module 200. (S307). The file information of the parameter stored in the data log module 200 includes name information and number information of a file to be logged, but is not limited thereto. When the file information of the removable storage device 220 matches the file information of a parameter stored in the data log module 200, for example, the controller 205 may be connected to the removable storage device 220 mounted to the data log module 200. In the case of backing up the log data, the removable storage device 200 is temporarily removed from the data log module 200 and then remounted as it is. In this case, since the preparation process for the PLC log file backup is completed, the controller 205 may terminate the initialization and immediately proceed with the backup of the PLC log file.

반면에, 이동식 저장 장치(220)에 저장된 파일 정보가 데이터 로그 모듈(200)에 저장된 파라미터의 파일 정보와 일치하지 않는 경우, 제어부(205)는 이동식 저장 장치(220)의 파일 정보를 데이터 로그 모듈(200)에 저장된 파라미터의 파일 정보와 일치시킬 필요가 있다.On the other hand, if the file information stored in the removable storage device 220 does not match the file information of the parameter stored in the data log module 200, the control unit 205 stores the file information of the removable storage device 220 in the data log module. It is necessary to match the file information of the parameter stored at 200.

따라서, 제어부(205)는 이동식 저장 장치(220)를 포맷한 후(S309), 이동식 저장 장치(220)에 데이터 로그 모듈(200)에 저장된 파라미터의 파일 정보를 저장할 수 있다(S311). 이동식 저장 장치(220)는 크기가 제한되어 있기 때문에, 제어부(205)는 파라미터의 파일 정보를 이동식 저장 장치(220)의 크기만큼 작성하여 저장할 수 있다. 예컨대, 이동식 저장 장치(220)의 용량이 16GB인 경우, 제어부(205)는 이동식 저장 장치(220)에 10MB 용량의 파일 1024개를 작성하여 저장할 수 있다. 파일 위치 정보는 파일이 저장되는 클러스터 주소를 포함하고, 클러스터 정보는 파일 순서대로 미리 작성될 수 있다. 예컨대, 제어부(205)는 파일 이름을 파일 1 내지 파일 n으로 작성하고, 파일 1에 대응되는 클러스터 정보를 0 내지 m으로 저장하며, 파일 2에 대응되는 클러스터 정보를 m+1 내지 m+m으로 저장하는 등의 순서대로 작성할 수 있다. 이와 같이, 이동식 저장 장치(220)는 예컨대, FAT32 파일 시스템 영역에 사용자 작성 파라미터의 파일 정보와 동일한 파일 관리 정보를 생성할 수 있다.Therefore, the controller 205 may format the removable storage device 220 (S309), and store file information of parameters stored in the data log module 200 in the removable storage device 220 (S311). Since the removable storage device 220 is limited in size, the controller 205 may create and store file information of a parameter as large as the size of the removable storage device 220. For example, when the capacity of the removable storage device 220 is 16 GB, the controller 205 may create and store 1024 files having a capacity of 10 MB in the removable storage device 220. The file location information includes a cluster address where the file is stored, and the cluster information may be previously created in file order. For example, the control unit 205 creates a file name as a file 1 to file n, stores cluster information corresponding to file 1 as 0 to m, and stores cluster information corresponding to file 2 as m + 1 to m + m. Can be created in order such as saving. As such, the removable storage device 220 may generate file management information that is the same as file information of a user-created parameter in the FAT32 file system area, for example.

이어서, 제어부(205)는 이동식 저장 장치(220)의 파일 관리 정보를 데이터 로그 모듈(200)의 위치 데이터 저장부(207)에 저장한다(S313). 다시 말하면, 위치 데이터 저장부(207)는 이동식 저장 장치(220)에 어떤 파일이 저장되어 있고, 어디에 저장되어 있는지에 대한 정보를 저장한다. 일반적으로, 백업 장치가 이동식 저장 장치(220)에 로그 데이터를 백업할 때마다, 이동식 저장 장치(220)에서 해당 로그 파일의 존재 여부를 검사하고, 로그 파일 부존재 시 파일을 새로이 생성하며, 해당 클러스터를 검색해야 하는 일련의 과정이 필요하다. 반면에, 본 발명에 의하면, 앞서 설명한 PLC 로그 파일 백업을 위한 준비 과정이 실행됨으로써, 이동식 저장 장치(220)의 FAT32 파일 시스템 정보가 데이터 로그 모듈(200)의 위치 데이터 저장부(207)에 미리 저장되어 있으므로, 이동식 저장 장치(220)를 검색할 필요 없이, 위치 데이터 저장부(207)를 통해 로그 데이터를 백업할 위치를 간단히 알 수 있다. 결과적으로, 데이터 로그 모듈(200)은 로그 데이터를 직접 이동식 저장 장치(220)에 저장하는 시점에만 이동식 저장 장치와 인터페이스를 수행하기 때문에, 대용량의 데이터를 고속으로 백업할 수 있다.Subsequently, the controller 205 stores the file management information of the removable storage device 220 in the position data storage 207 of the data log module 200 (S313). In other words, the location data storage unit 207 stores information about which files are stored in the removable storage device 220 and where they are stored. In general, whenever a backup device backs up log data to the removable storage device 220, the removable storage device 220 checks the existence of the corresponding log file, creates a new file in the absence of the log file, and creates a corresponding cluster. We need a series of steps to retrieve. On the other hand, according to the present invention, the above-described preparation process for the PLC log file backup is executed, so that the FAT32 file system information of the removable storage device 220 is stored in advance in the position data storage unit 207 of the data log module 200. Since the data is stored, the location data storage unit 207 can simply know the location to back up the log data without having to search the removable storage device 220. As a result, since the data log module 200 interfaces with the removable storage device only at the time when the log data is directly stored in the removable storage device 220, the data log module 200 can back up a large amount of data at high speed.

도 4는 본 발명의 실시 예에 따른 PLC 로그 파일 백업을 설명하기 위한 흐름도이다.4 is a flowchart illustrating a backup of a PLC log file according to an embodiment of the present invention.

도 4를 참고하면, CPU 모듈(240)에서 이벤트가 발생하면, 인터페이스부(201)가 CPU 데이터를 수신하여 저장할 수 있다(S401).Referring to FIG. 4, when an event occurs in the CPU module 240, the interface unit 201 may receive and store CPU data in operation S401.

인터페이스부(201) 예컨대, RAM에 CPU 데이터가 저장되면, 인터럽트(interrupt)가 발생하여 RAM에 저장된 CPU 데이터가 즉시 로그 데이터 저장부(203)로 전송된다(S403).When CPU data is stored in the interface unit 201, for example, RAM, an interrupt is generated and CPU data stored in the RAM is immediately transmitted to the log data storage unit 203 (S403).

제어부(205)는 로그 데이터 저장부(203)에 저장된 로그 데이터를 앞서 설명한 바와 같이 PC에서 쉽게 사용될 수 있도록, CSV 파일로 변환한다(S405).The control unit 205 converts the log data stored in the log data storage unit 203 into a CSV file so that it can be easily used in a PC as described above (S405).

이어서, 제어부(205)는 위치 데이터 저장부(207)에서 해당 로그 데이터의 클러스터를 검색한다(S407).Subsequently, the control unit 205 searches for the cluster of log data in the position data storage unit 207 (S407).

제어부(205)는 검색된 클러스터에 해당 로그 데이터를 저장할 수 있는 저장 영역이 남아 있는지 판단한다(S409).The controller 205 determines whether a storage area for storing corresponding log data remains in the searched cluster (S409).

검색된 클러스터에 저장 영역이 남아 있는 경우, 해당 로그 데이터의 CSV 파일을 이동식 저장 장치(220)의 해당 클러스터에 저장한다(S411).If the storage area remains in the found cluster, the CSV file of the log data is stored in the cluster of the removable storage device 220 (S411).

반면에, 검색된 클러스터에 저장 영역이 남아 있지 않은 경우 예컨대, 파일의 크기가 검색된 클러스터의 남은 저장 영역보다 클 경우, 저장 영역이 남아있는 다음 클러스터를 검색할 수 있다. 이어서, 이동식 저장 장치(220)의 다음 클러스터에 해당 로그 데이터의 CSV 파일을 저장한다(S413).On the other hand, when no storage area remains in the found cluster, for example, when the file size is larger than the remaining storage area of the found cluster, the next cluster in which the storage area remains may be searched. Subsequently, the CSV file of the log data is stored in the next cluster of the mobile storage device 220 (S413).

이상에서 설명한 본 발명의 실시 예는 장치 및 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시 예의 구성에 대응하는 기능을 실현하는 프로그램 또는 그 프로그램이 기록된 기록 매체를 통해 구현될 수도 있으며, 이러한 구현은 앞서 설명한 실시 예의 기재로부터 본 발명이 속하는 기술분야의 전문가라면 쉽게 구현할 수 있는 것이다. The embodiments of the present invention described above are not only implemented by the apparatus and method but may be implemented through a program for realizing the function corresponding to the configuration of the embodiment of the present invention or a recording medium on which the program is recorded, The embodiments can be easily implemented by those skilled in the art from the description of the embodiments described above.

이상에서 본 발명의 실시 예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, It belongs to the scope of right.

200: 데이터 로그 모듈 201: 인터페이스부
203: 로그 데이터 저장부 205: 제어부
207: 위치 데이터 저장부 209: 버퍼
211: 표시부 220: 이동식 저장 장치
230: 전원 모듈 240: CPU 모듈
200: data log module 201: interface unit
203: log data storage unit 205: control unit
207: position data storage unit 209: buffer
211: display unit 220: removable storage device
230: power module 240: CPU module

Claims (8)

PLC 로그 파일을 별도의 저장 장치에 백업하여 관리하는 장치에 있어서,
PLC 로그 파일의 파일 정보를 저장하는 데이터 로그 모듈;
파일 관리 정보를 저장하는 위치 데이터 저장부; 및
상기 저장 장치가 포맷된 상태인지 판단하고, 상기 저장 장치가 포맷되지 않은 상태이면 상기 저장 장치의 파일 정보를 상기 데이터 로그 모듈에 저장된 상기 PLC 로그 파일의 파일 정보와 비교하고, 상기 비교 결과, 상기 저장 장치의 파일 정보와 상기 미리 저장된 PLC 로그 파일의 파일 정보가 일치하지 않는 경우에는 상기 저장 장치를 포맷한 후, 상기 PLC 로그 파일의 파일 정보를 포맷이 실행된 저장 장치에 전송하고, 상기 저장 장치의 파일 관리 정보를 상기 위치 데이터 저장부에 저장하는 제어부를 포함하고,
상기 PLC 로그 파일의 파일 정보는 로깅이 수행되어야 하는 파일의 이름 정보와 개수 정보를 포함하는
파일 관리 장치.
In the device that backs up and manages the PLC log files to a separate storage device,
A data log module for storing file information of a PLC log file;
A location data storage unit for storing file management information; And
It is determined whether the storage device is in a formatted state, and if the storage device is in an unformatted state, file information of the storage device is compared with file information of the PLC log file stored in the data log module. If the file information of the device and the file information of the pre-stored PLC log file do not match, after formatting the storage device, the file information of the PLC log file is transmitted to the storage device on which the format is executed, and A control unit for storing file management information in the location data storage unit;
The file information of the PLC log file includes name information and number information of a file to be logged.
File management device.
제1 항에 있어서,
상기 파일 관리 정보를 이용하여 상기 PLC 로그 파일의 저장 위치를 검색하는 검색부; 및
상기 저장 장치의 상기 검색된 저장 위치에, 상기 PLC 로그 파일을 전송하는 전송부를 포함하고
상기 제어부는 상기 검색부 또는 상기 전송부의 동작을 제어하는
파일 관리 장치.
The method according to claim 1,
A search unit for searching a storage location of the PLC log file by using the file management information; And
A transmission unit for transmitting the PLC log file to the retrieved storage location of the storage device;
The controller controls the operation of the searcher or the transmitter.
File management device.
제1 항에 있어서,
상기 위치 데이터 저장부에 저장된 상기 파일 관리 정보는
파일 식별 정보 및 파일 위치 정보를 포함하는
파일 관리 장치.
The method according to claim 1,
The file management information stored in the location data storage unit is
Including file identification information and file location information
File management device.
제3 항에 있어서,
상기 저장 장치의 상기 파일 식별 정보는
상기 저장 장치에 저장된 PLC 로그 파일의 파일 이름, 파일 크기, 파일 생성 날짜, 파일 수정 날짜 중 적어도 하나를 포함하는
파일 관리 장치.
The method of claim 3,
The file identification information of the storage device
At least one of a file name, a file size, a file creation date, and a file modification date of the PLC log file stored in the storage device.
File management device.
제1 항에 있어서,
상기 저장부에 저장된 상기 파일 관리 정보는
FAT32 파일 시스템 정보를 포함하는
파일 관리 장치.
The method according to claim 1,
The file management information stored in the storage unit
FAT32 file system information
File management device.
제 1항에 있어서,
상기 저장 장치의 상기 파일 관리 정보는
파일의 클러스터 주소 정보를 포함하고,
상기 클러스터 주소 정보는 상기 파일 순서대로 작성된
파일 관리 장치.
The method of claim 1,
The file management information of the storage device
Include cluster address information in the file,
The cluster address information is written in the file order
File management device.
PLC 로그 파일을 별도의 저장 장치에 백업하여 관리하는 방법에 있어서,
상기 저장 장치가 포맷된 상태인지 판단하는 단계;
상기 저장 장치가 포맷되지 않은 상태인 경우, 상기 저장 장치의 파일 정보를 상기 PLC 로그 파일의 파일 정보와 비교하는 단계;
상기 비교 결과, 상기 저장 장치의 파일 정보와 상기 PLC 로그 파일의 파일 정보가 일치하지 않는 경우, 상기 저장 장치를 포맷하는 단계;
상기 PLC 로그 파일의 파일 정보를 포맷이 실행된 저장 장치에 전송하는 단계; 및
상기 저장 장치의 파일 관리 정보를 저장하는 단계를 포함하고,
상기 파일 관리 정보는 파일 식별 정보 및 파일 위치 정보를 포함하며,
상기 PLC 로그 파일의 파일 정보는 로깅이 수행되어야 하는 파일의 이름 정보와 개수 정보를 포함하는
파일 관리 방법.
In the method of backing up and managing the PLC log files to a separate storage device,
Determining whether the storage device is in a formatted state;
Comparing file information of the storage device with file information of the PLC log file when the storage device is in an unformatted state;
If the file information of the storage device and the file information of the PLC log file do not match, as a result of the comparison, formatting the storage device;
Transmitting file information of the PLC log file to a storage device on which a format is executed; And
Storing file management information of the storage device;
The file management information includes file identification information and file location information.
The file information of the PLC log file includes name information and number information of a file to be logged.
How to manage your files.
제7 항에 있어서,
상기 파일 관리 정보를 이용하여 상기 PLC 로그 파일의 저장 위치를 검색하는 단계; 및
상기 저장 장치의 상기 검색된 저장 위치에, 상기 PLC 로그 파일을 전송하는 단계를 포함하고,
상기 파일 식별 정보 및 상기 파일 위치 정보는 FAT32 파일 시스템 정보를 포함하는
파일 관리 방법.
The method of claim 7, wherein
Retrieving a storage location of the PLC log file using the file management information; And
Sending the PLC log file to the retrieved storage location of the storage device,
The file identification information and the file location information include FAT32 file system information.
How to manage your files.
KR1020120061127A 2012-06-07 2012-06-07 Apparatus and method for managing file KR101365292B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020120061127A KR101365292B1 (en) 2012-06-07 2012-06-07 Apparatus and method for managing file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020120061127A KR101365292B1 (en) 2012-06-07 2012-06-07 Apparatus and method for managing file

Publications (2)

Publication Number Publication Date
KR20130137477A KR20130137477A (en) 2013-12-17
KR101365292B1 true KR101365292B1 (en) 2014-02-20

Family

ID=49983701

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020120061127A KR101365292B1 (en) 2012-06-07 2012-06-07 Apparatus and method for managing file

Country Status (1)

Country Link
KR (1) KR101365292B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101593829B1 (en) * 2014-10-06 2016-02-12 엘에스산전 주식회사 PLC data log module with backup function

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060115235A (en) * 2005-05-04 2006-11-08 삼성전자주식회사 Apparatus and method for saving and managing additional data of file system
KR20090018438A (en) * 2007-08-17 2009-02-20 주식회사 마이다스엔지니어링 Data managing system and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060115235A (en) * 2005-05-04 2006-11-08 삼성전자주식회사 Apparatus and method for saving and managing additional data of file system
KR20090018438A (en) * 2007-08-17 2009-02-20 주식회사 마이다스엔지니어링 Data managing system and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101593829B1 (en) * 2014-10-06 2016-02-12 엘에스산전 주식회사 PLC data log module with backup function

Also Published As

Publication number Publication date
KR20130137477A (en) 2013-12-17

Similar Documents

Publication Publication Date Title
US7587427B2 (en) Hierarchical storage system, and control method and program therefor
TWI610187B (en) Methods and systems for autonomous memory searching
CN102411549B (en) Memory system, host controller and dma control method
CN106649048A (en) Indicator light control system and light-emitting diode control method
CN104951395A (en) Debugging information processing method and device for embedded system
CN103917960A (en) Storage apparatus and duplicate data detection method
CN104216796A (en) Data backup and recovery method and electronic device
CN104021058A (en) Method for quickly starting test board card
CN202584143U (en) A read-only card reader with multiple interfaces
KR101365292B1 (en) Apparatus and method for managing file
JP2007034467A (en) Device controller
US20120005441A1 (en) Copying apparatus, copying method, memory medium, and program
CN107430546A (en) A kind of file updating method and storage device
CN102135896B (en) A kind of method and system based on Implementation of Embedded System software upgrading
CN103177019A (en) Universal serial bus (USB) storage device and driving method thereof
CN110018987B (en) Snapshot creating method, device and system
CN107643900B (en) Display and upgrading method
US20170286458A1 (en) Computer and Database Management Method
CN109117304B (en) File backup method, system and device
CN110018985B (en) Snapshot deleting method, device and system
RU146025U1 (en) DISC-TERMINAL EMULATOR
CN101236481A (en) Apparatus, system, and method for uninterrupted storage configuration
JP6360933B1 (en) Data processing method
CN109254953A (en) A kind of data-erasure method based on FAT file, data storage device and system
CN202145310U (en) Data storing device for safety production center managing server

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20170213

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20180201

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20190121

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20200102

Year of fee payment: 7