Pursuant to 35 U.S.C. §119(a), this application claims the benefit of earlier filing date and right of priority to Korean Patent Application No. 10-2012-0074702, filed on Jul. 9, 2012, the contents of which is incorporated by reference herein in its entirety.
The embodiment relates to an apparatus and a method for searching for a programmable logic controller (PLC) data log.
A data log may be collected according to the input condition of device values of a PLC CPU and may be stored in a storage device such as a memory card as data. The stored data may be searched in match with the requirements of a user.
A data log module must store values processed by the PLC CPU at a high rate without loss. In this manner, when searching for the stored data while storing data at the high rate, many times are required and wrong values may be searched.
Referring to
Based on the data stored in a memory area, the apparatus for searching for a PLC data log determines whether the input parameter is in a parameter range of the data stored in the memory area (S108).
When the search target data are not included in the parameter range of the stored data (S110), the apparatus for searching for a PLC data log may continuously perform the search operation or arbitrarily terminate the search operation (S112).
In contrast, when the data parameter for the search target is within the parameter range of the stored data, the search target data are searched within the parameter range (S114). When the search data exist, the search data are output (S116).
In contrast, when there are no search data, the existence of the search data is searched again by reducing the parameter range to a half (S118).
As described above, according to the related art, when a time required to perform a search function becomes longer, the whole performance of the apparatus for searching for a data log may be degraded. That is, the method for searching for data according to the related art must search for data several times by applying a character string scheme when large amounts of data are stored in a memory. When searching for data using a character string comparison scheme, a search completion time is not clear and the search operation must be repeated to precisely search for the desired data. Accordingly, a search time may be delayed and a function of the apparatus may be degraded.
The embodiment provides an apparatus and a method for searching for a PLC data log, capable of rapidly and exactly searching and outputting data required by a user when searching for a large amount of PLC data logs.
In addition, the embodiment provides an apparatus and a method for searching for a PLC data log, capable of minimizing a load to a data search device by allowing a user to rapidly search for data required by the user using a linear characteristic when searching for the PLC data log.
According to the embodiment, there is provided an apparatus for searching for a PLC data log, the apparatus including: a data log module operating a linear characteristic for data search based on at least one data search parameter, calculating an index value or a time data value using the operated linear characteristic, and searching for data using at least one of the calculated index value or the calculated time data value; an interface unit receiving a search request signal and at least one parameter for data search and outputting the data searched from the data log module; and a memory unit storing the data and the parameter input or output through the interface unit.
According to the embodiment, there is provided a method for searching for a PLC data log, including receiving a search parameter; calculating a linear coefficient for search target data; calculating a time data value or an index value from the linear coefficient; and searching for data corresponding to the calculated time data value or the calculated index value.
Terms and words used in the specification and the claims shall not be interpreted as commonly-used dictionary meanings, but shall be interpreted as to be relevant to the technical scope of the invention based on the fact that the inventor may property define the concept of the terms to explain the invention in best ways.
Therefore, the embodiments and the configurations depicted in the drawings are illustrative purposes only and do not represent all technical scopes of the embodiments, so it should be understood that various equivalents and modifications may exist at the time of filing this application.
Referring to
The data log module 200 may detect and search for a data search request signal input from a user. The data log module 200 may include a controller 201 and a RAM (random access memory) 202.
The controller 201 may detect the data search request signal input from the interface unit 210, and may operate a parameter range and a linear characteristic according to search target data corresponding to the detected data search request signal. The controller 201 calculates an index value or a time data value using the operated linear characteristic. The data to be searched may be extracted based on the calculated index value and time data value. The controller 201 may search for data corresponding to the calculated parameter and output the searched data as user request search data.
The RAM 202 may store data searched and calculated by the controller 201. The RAM 202 may temporarily store information on the linear characteristic and the data operated and searched by the controller 201 according to the embodiment. If the data request signal is detected from a PLC control unit 10, the RAM 202 may output corresponding data.
The interface unit 210 may receive a data search request signal from a user or output a result of the searched data. The interface unit 210 according to the embodiment may include an input unit 211 and an output unit 212.
The input unit 211 may receive a search request signal of the PLC data log. The input unit 211 may receive a parameter according to the search request signal. Further, the input unit 211 may receive the PLC data log from the outside and output the PLC data log to the memory unit 220. The input unit 211 may receive the parameter of the search data as a hexa value in a unit of a word.
The output unit 212 may output a searched result for the data search request input from the input unit 211. In addition, the output unit 212 may output the progress status or error information according to the data search request.
The memory unit 220 may store data and parameter values for the data input through the input unit 211. Data stored in the memory unit 220 may include a plurality of data each including a time data value, an index value, and a character string. That is, for example, the data stored in the memory unit 220 may include time data (date, time), index values, data, and data types (volume).
Referring to
The controller 201 may detect a search request signal for searching for data corresponding to the received parameter and generate a control signal according to the search request signal (S304).
The controller 201 may confirm a parameter range corresponding to data stored in the memory unit 220 according to the data search request signal (S306).
When the received parameter is not included in the stored parameter range (S308), the controller 201 may output search error information (S310).
In contrast, when the received parameter is within the stored parameter range, the controller 201 may operate a linear coefficient according to a following Equation 1 (S312).
The controller 201 may calculate a linear coefficient m by the Equation 1. In the Equation, First(Index) and Final(Index) represent a first index value and a final index value corresponding to the data stored in the memory unit 220, respectively. In addition, First(RTC) and Final(RTC) represent a first time data value and a final time data value corresponding to the data stored in the memory unit 220.
That is, as shown in
The linear coefficient m calculated from the Equation 1 by the controller 201 may be a gradient (coefficient) of a linear equation for searching for an index value corresponding to time data of search target data or time data corresponding to the index value.
The controller 201 may calculate an index value corresponding to time data or time data corresponding to the index value by Equations 2 or 3.
The Equation 2 may calculate a time data value corresponding to an index value of search target data by applying the calculated linear coefficient m. Further, the Equation 3 may calculate an index value corresponding to a time data value of search target data by applying the calculated linear coefficient m. In this case, an offset α may be added according to the first time data value or the first index value.
The controller 201 applies an input parameter according to a time data value or an index value of the search target data based on the calculated linear characteristic (S314), and may search for the search target data from the memory unit 220 (S316).
The controller 201 may output a result of the searched data through the output unit 212 (S318). In addition, the controller 201 temporarily stores the searched data in the RAM 202. If a data request signal is input from the PLC control unit 10, the controller 201 may read and output the data stored in the RAM 202.
Although embodiments have been described with reference to a number of illustrative embodiments thereof, it should be understood that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the spirit and scope of the principles of this disclosure. More particularly, various variations and modifications are possible in the component parts and/or arrangements of the subject combination arrangement within the scope of the disclosure, the drawings and the appended claims. In addition to variations and modifications in the component parts and/or arrangements, alternative uses will also be apparent to those skilled in the art.
| Number | Date | Country | Kind |
|---|---|---|---|
| 10-2012-0074702 | Jul 2012 | KR | national |