JP2008276647A - Data recording device - Google Patents

Data recording device Download PDF

Info

Publication number
JP2008276647A
JP2008276647A JP2007121698A JP2007121698A JP2008276647A JP 2008276647 A JP2008276647 A JP 2008276647A JP 2007121698 A JP2007121698 A JP 2007121698A JP 2007121698 A JP2007121698 A JP 2007121698A JP 2008276647 A JP2008276647 A JP 2008276647A
Authority
JP
Japan
Prior art keywords
data
block
storage area
measurement data
written
Prior art date
Legal status (The legal status 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 status listed.)
Withdrawn
Application number
JP2007121698A
Other languages
Japanese (ja)
Inventor
Shinichi Fukada
晋一 深田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2007121698A priority Critical patent/JP2008276647A/en
Publication of JP2008276647A publication Critical patent/JP2008276647A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data recording device, capable of automatically recording necessary data and using a small-capacity memory. <P>SOLUTION: The data recording device comprises a nonvolatile memory 10, and a control part 20 which performs writing processing of measurement data and order specification data to the nonvolatile memory 10. When at least one of data D1 of a first block written to a first storage area 11 of the nonvolatile memory 10 and data D2 of a second block written to a second storage area 12 thereof contains data of a value out of a predetermined range, the control part 20 writes new measurement data to the first storage area so that the data D1 and the order specification data assigned to D1 are not overwritten. When the data D1 and D2 do not contain the value out of the predetermined range, the control part 20 writes the new measurement data to the first storage area so that the data D1 and the order specification data assigned to D1 are overwritten. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、データ記録装置に関する。   The present invention relates to a data recording apparatus.

温度や、振動、明るさ、音、画像などのデータを連続的に取得して記録するデータ記録装置(データログ装置)が知られており、例えば食品の温度管理や、ドライブレコーダやフライトレコーダ、ボイスレコーダ、地震計などに利用されている。   Data recording devices (data log devices) that continuously acquire and record data such as temperature, vibration, brightness, sound, and images are known. For example, food temperature management, drive recorders, flight recorders, Used for voice recorders, seismometers, etc.

これらのデータ記録装置では、測定されたデータの値が所定の範囲を超えた場合、測定対象に対して何らかのイベントが発生したと判断することができる。そして、当該データ以降に取得されたデータを解析処理すれば、測定対象の、イベント発生後の様子を知ることができる。また、当該データよりも前の一定期間内に取得されたデータを解析処理すれば、測定対象の、イベント発生前の様子を知ることができる。
特開2005−259041号公報
In these data recording devices, when the value of the measured data exceeds a predetermined range, it can be determined that some event has occurred for the measurement target. And if the data acquired after the said data are analyzed, the state after the event occurrence of the measurement object can be known. In addition, if the data acquired within a certain period before the data is analyzed, the state of the measurement target before the occurrence of the event can be known.
JP 2005-259041 A

これらのデータ記録装置において、データを測定(記憶)する時間間隔を短くすれば、データの変化を正確に記録することができる。しかし、データの測定時間間隔が短くなればデータの数が増えるため、これを記録するためには容量の大きなメモリが必要になる。   In these data recording devices, if the time interval for measuring (storing) data is shortened, changes in data can be recorded accurately. However, since the number of data increases if the data measurement time interval is shortened, a large-capacity memory is required to record the data.

これに対して、データを測定する時間間隔を長くすれば、データの数が減るため、容量の小さいメモリを利用することができる。しかし、データの測定間隔が長くなれば、細かいデータの変化を記録することが難しくなる。   On the other hand, if the time interval for measuring data is lengthened, the number of data decreases, so that a memory with a small capacity can be used. However, if the data measurement interval becomes long, it becomes difficult to record fine data changes.

また、イベント発生の様子を知るためには、イベント発生の前後のデータの変化を解析することが好ましいが、イベント発生の前後の測定データを確実に記憶するためには、常時データを記録しておく必要があり、容量の大きなメモリが必要になる。   In order to know the state of the event occurrence, it is preferable to analyze the change in data before and after the event occurrence, but in order to reliably store the measurement data before and after the event occurrence, always record the data. It is necessary to store a large amount of memory.

本発明の目的は、必要なデータを自動的に記録することができ、かつ、容量の小さいメモリを利用することが可能なデータ記録装置を提供することにある。   An object of the present invention is to provide a data recording apparatus capable of automatically recording necessary data and using a memory having a small capacity.

(1)本発明に係るデータ記録装置は、
時系列に受けとった複数の測定データをメモリに書き込む処理を行うデータ記録装置であって、
前記測定データが書き込まれる複数の記憶領域を含む不揮発性メモリと、
所定の数の測定データを1ブロックとして、前記不揮発性メモリの所与の記憶領域に1ブロック分の各測定データを順次書き込み、その後、他の記憶領域に次の1ブロック分の各測定データを順次書き込む処理を繰り返し行う書き込み制御部と、を含み、
前記書き込み制御部は、
各ブロックの測定データが書き込まれる前記不揮発性メモリの記憶領域に、各ブロックに割り当てられ各ブロックが取得された順序を特定するための順序特定データを、各ブロックと対応づけて書き込み、
前記不揮発性メモリの所与の記憶領域に最後に書き込まれた1ブロック、及び、当該1ブロックの後に取得された次の1ブロックが、所定の範囲外の値の測定データを含んでいるか否かを判断し、少なくとも一方が含んでいる場合には、前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データが上書きされないように、前記所与の記憶領域に新しい1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを書き込み、いずれもが含んでいない場合には、前記測定データ及び前記順序特定データが上書きされるように、前記所与の記憶領域に新しい1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを書き込むことを特徴とする。
(1) A data recording apparatus according to the present invention comprises:
A data recording device that performs processing of writing a plurality of measurement data received in time series into a memory,
A nonvolatile memory including a plurality of storage areas in which the measurement data is written;
A predetermined number of measurement data as one block, each measurement data for one block is sequentially written in a given storage area of the nonvolatile memory, and then each measurement data for the next one block is stored in another storage area. A write control unit that repeatedly performs a sequential writing process,
The write control unit
In the storage area of the nonvolatile memory in which the measurement data of each block is written, the order specifying data for specifying the order in which each block is allocated and acquired is written in association with each block,
Whether one block last written in a given storage area of the non-volatile memory and the next one block acquired after the one block include measurement data having a value outside a predetermined range. If at least one of them contains, the measurement data for one block last written in the given storage area and the order specifying data assigned to the one block are not overwritten. , Writing each measurement data for one new block and the order specifying data assigned to the one block to the given storage area, and if none of them includes the measurement data and the order specifying data, In order to be overwritten, each measurement data for one new block and the sequence specifying data assigned to the one block are written in the given storage area. Characterized in that the writing.

本発明のデータ記録装置によると、所与の記憶領域に書き込まれた1ブロックの所定の数(N個)の測定データと、その後に取得された1ブロックの所定の数(N個)の測定データとのあわせて2N個の測定データが、所定の範囲外の値のデータを含むか否かを判断する。ここで、所定の範囲の値とは、測定対象が正常と判断される測定データの値である。すなわち、測定データが所定の範囲の値であれば、当該測定データは、測定対象は正常な状態であることを示している。逆に、測定データが所定の範囲外の値であれば、当該測定データは測定対象に異常が発生していることを示している。そして、本発明では、2N個の測定データが所定の範囲外の値のデータを含んでいる場合、前記所与の記憶領域に最後に書き込まれた1ブロックのN個の測定データを、保存を要するデータであると判定する。逆に、2N個の測定データが、すべて所定の範囲内の値のデータである場合、前記所与の記憶領域に最後に書き込まれた1ブロックのN個の測定データを、保存を要しないデータであると判定する。   According to the data recording apparatus of the present invention, a predetermined number (N) of measurement data of one block written in a given storage area and a predetermined number (N) of measurement data acquired thereafter are recorded. It is determined whether or not 2N measurement data together with the data includes data having a value outside a predetermined range. Here, the value in the predetermined range is a value of measurement data that determines that the measurement target is normal. That is, if the measurement data is a value within a predetermined range, the measurement data indicates that the measurement target is in a normal state. Conversely, if the measurement data is a value outside the predetermined range, the measurement data indicates that an abnormality has occurred in the measurement target. In the present invention, when 2N measurement data includes data having a value outside the predetermined range, the N measurement data of one block last written in the given storage area is stored. It is determined that the data is necessary. On the other hand, if 2N measurement data are all data within a predetermined range, data that does not require storage of the N measurement data of one block last written in the given storage area. It is determined that

例えば、本発明によると、所与の記憶領域に最後に書き込まれた1ブロックの後に取得された次の1ブロックが異常を示す測定データを含んでいる場合、所与の記憶領域に最後に書き込まれた1ブロック分の測定データが保存される。また、本発明によると、所与の記憶領域に最後に書き込まれた1ブロックが異常を示す測定データを含んでいる場合にも、当該所与の記憶領域に最後に書き込まれた1ブロック分の測定データが保存される。   For example, according to the present invention, if the next block obtained after the last block written to a given storage area contains measurement data indicating an abnormality, the last write to the given storage area is performed. The measured data for one block is stored. In addition, according to the present invention, even when one block last written in a given storage area includes measurement data indicating an abnormality, one block last written in the given storage area. Measurement data is saved.

このことから、本発明によると、異常を示すデータを含む1ブロック分の各測定データと、その前に取得された1ブロック分の各測定データとが保存される。すなわち、本発明によると、異常を示すデータよりも前に取得された少なくとも1ブロック分の各測定データを保存することができる。そのため、これを解析処理することにより、異常発生に至る過程で測定対象に起こった事象を判断することが可能になる。   Therefore, according to the present invention, each measurement data for one block including data indicating abnormality and each measurement data for one block acquired before that are stored. That is, according to the present invention, it is possible to save each measurement data for at least one block acquired before data indicating abnormality. Therefore, by analyzing this, it is possible to determine an event that has occurred in the measurement target in the process leading to the occurrence of an abnormality.

また、このデータ記録装置によると、所与の記憶領域の最後に書き込まれた1ブロック分の各測定データの要否を、異なる記憶領域に書き込まれた1ブロック分の各測定データを利用して判定する。そのため、このデータ記録装置によると、所与の記憶領域の最後に書き込まれた1ブロック分の各測定データの要否が判定されるまで、当該記憶領域に新たなデータを書き込まないように制御することができる。そして、所与の記憶領域の最後に書き込まれた1ブロック分の各測定データの要否を判定した後に当該記憶領域の書き込みアドレス(書き込み開始アドレス)を設定することで、当該1ブロック分の各測定データを上書きするか、あるいは、当該1ブロックのデータを上書きせずに保存するかを決定することができる。そのため、メモリのアドレスを隙間なく利用することができるため、メモリの容量を無駄なく利用することが可能になる。   Further, according to this data recording apparatus, the necessity of each measurement data for one block written at the end of a given storage area is determined using each measurement data for one block written in a different storage area. judge. Therefore, according to this data recording apparatus, control is performed so that new data is not written to the storage area until it is determined whether or not each block of measurement data written at the end of the given storage area is necessary. be able to. Then, after determining the necessity of each measurement data for one block written at the end of a given storage area, by setting the write address (write start address) of the storage area, It is possible to decide whether to overwrite the measurement data or to save the data of one block without overwriting. As a result, the memory addresses can be used without any gaps, so that the memory capacity can be used without waste.

また、本発明によると、保存を要するブロックが取得された順序を特定するために当該ブロックに割り当てられた順序特定データを、当該ブロックに対応づけて保存する。従って、保存された測定データの解析時において、保存された各ブロックの取得順序を容易に判断することができる。また、保存されたブロック間に存在する保存されなかったブロックの数も認識することができるので、より精密な解析を行うことができる。   In addition, according to the present invention, order specifying data assigned to a block in order to specify the order in which the blocks that need to be stored are acquired are stored in association with the block. Therefore, when the stored measurement data is analyzed, the acquisition order of each stored block can be easily determined. In addition, since the number of non-stored blocks existing between stored blocks can be recognized, more accurate analysis can be performed.

なお、順序特定データは、例えば、シリアルナンバーや時刻など、取得した各ブロックの順序を特定することができるデータであればよい。また、例えば、取得したブロック順に1から昇順の番号を割り当て、保存を要するブロックに対応づけて当該番号をそのまま保存してもよいし、当該番号を測定データと明確に区別するために所定の変換を施してから保存するようにしてもよい。例えば、1ブロックあたりの測定データ数及びデータを書き込むアドレスが毎回のデータ記録において同じである場合には、順序特定データが書き込まれるアドレスが毎回同じであり、測定データとの混同を起こさないので、前者のように順序特定データとして昇順の番号を書き込んでもよい。一方、1ブロックあたりの測定データ数又はデータを書き込むアドレスが毎回のデータ記録において異なる場合には、後者のように測定データとの混同を起こさないように順序特定データを書き込むのが望ましい。   Note that the order specifying data may be data that can specify the order of each acquired block, such as a serial number and time. Further, for example, numbers in ascending order from 1 may be assigned in the order of acquired blocks, and the numbers may be stored as they are in association with blocks that need to be stored, or predetermined conversion may be performed to clearly distinguish the numbers from measurement data. You may make it preserve | save after giving. For example, when the number of measurement data per block and the address at which data is written are the same in each data recording, the address at which the order specifying data is written is the same every time, so there is no confusion with the measurement data. As in the former case, an ascending number may be written as the order specifying data. On the other hand, when the number of measurement data per block or the address at which data is written differs in each data recording, it is desirable to write the order specifying data so as not to cause confusion with the measurement data as in the latter case.

また、1ブロック分の各測定データと順序特定データを書き込むアドレスの順番は問わない。例えば、1ブロックの最後の測定データを書き込んだアドレスの次のアドレスに順序特定データを書き込むようにしてもよいし、順序特定データを書き込んだアドレスの次のアドレスを先頭として1ブロックの最初の測定データから順に書き込むようにしてもよい。   Further, the order of the addresses for writing the measurement data for one block and the order specifying data is not limited. For example, the order specifying data may be written to the address next to the address where the last measurement data of one block is written, or the first measurement of one block starting from the address next to the address where the order specifying data is written. You may make it write in order from data.

(2)本発明に係るデータ記録装置は、
前記書き込み制御部は、
前記所与の記憶領域に最後に書き込まれた1ブロックの前に取得された1ブロックが、前記所定の範囲外の値の測定データを含むか否か判断し、含む場合には前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データが上書きされないように、前記所与の記憶領域に新しい1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを書き込むことを特徴とする。
(2) A data recording apparatus according to the present invention comprises:
The write control unit
It is determined whether or not one block acquired before the last block written in the given storage area includes measurement data having a value outside the predetermined range. Each measurement data of one block newly written in the given storage area and each of the measurement data of one block written in the storage area and the order specifying data assigned to the block are not overwritten. The order specifying data allocated to one block is written.

これによると、イベントの発生を示すデータの後に取得されたデータを保存することができる。   According to this, the data acquired after the data indicating the occurrence of the event can be saved.

例えば、本発明によると、所与の記憶領域に最後に書き込まれた1ブロック分の各測定データの前に取得された1ブロックが異常を示す測定データを含んでいる場合、所与の記憶領域に最後に書き込まれた1ブロック分の各測定データが保存される。すなわち、本発明によると、異常を示す測定データの後に取得された少なくとも1ブロック分の各測定データを保存することができる。そのため、これを解析処理することにより、異常発生後の測定対象の状態を解析することが可能になる。   For example, according to the present invention, when one block acquired before each measurement data for one block last written in a given storage area contains measurement data indicating an abnormality, the given storage area Each measurement data for one block written last is stored. That is, according to the present invention, each measurement data for at least one block acquired after the measurement data indicating abnormality can be stored. Therefore, by analyzing this, it becomes possible to analyze the state of the measurement target after the occurrence of an abnormality.

(3)本発明に係るデータ記録装置は、
前記不揮発性メモリは、
3n個(nは1以上の整数)以上の前記記憶領域を含み、
前記書き込み制御部は、
前記不揮発性メモリの第k(kは1以上3n−1以下の整数)の記憶領域に1ブロック分の各測定データを順次書き込み、その後、第k+1の記憶領域に次の1ブロック分の各測定データを順次書き込み、第3nの記憶領域に1ブロック分の各測定データを順次書き込んだ後は、第1の記憶領域に次の1ブロック分の各測定データを順次書き込む処理を繰り返し行うことを特徴とする。
(3) A data recording apparatus according to the present invention comprises:
The nonvolatile memory is
3n (n is an integer of 1 or more) or more of the storage area,
The write control unit
Each block of measurement data is sequentially written in the k-th (k is an integer between 1 and 3n-1) storage area of the non-volatile memory, and then the next block is measured in the k + 1 storage area. After sequentially writing data and sequentially writing each measurement data for one block in the 3n storage area, the process of sequentially writing each measurement data for the next block in the first storage area is repeatedly performed. And

これによると、異常を示す測定データを含むブロック及びその前後のブロックを保存する場合に、各記憶領域を均等に使用する確率を高くすることができる。そのため、メモリの容量を無駄なく利用することが可能になる。   According to this, when the block including the measurement data indicating abnormality and the blocks before and after the data are stored, the probability of using each storage area equally can be increased. As a result, the capacity of the memory can be used without waste.

(4)本発明に係るデータ記録装置は、
前記書き込み制御部は、
前記所定の範囲を予め所定の値に設定することを特徴とする。
(4) A data recording apparatus according to the present invention comprises:
The write control unit
The predetermined range is set to a predetermined value in advance.

(5)本発明に係るデータ記録装置は、
前記書き込み制御部は、
測定データに基づいて、前記所定の範囲を設定することを特徴とする。
(5) A data recording apparatus according to the present invention comprises:
The write control unit
The predetermined range is set based on measurement data.

(6)本発明に係るデータ記録装置は、
前記書き込み制御部は、
前記測定データが所定の書き込み停止条件を満たしているか否かを判断し、前記所定の書き込み停止条件を満たしている場合に、前記不揮発性メモリへのデータの書き込みを停止させる制御を行う書き込み停止処理部を含むことを特徴とする。
(6) A data recording apparatus according to the present invention comprises:
The write control unit
A write stop process for determining whether or not the measurement data satisfies a predetermined write stop condition and performing control to stop writing data to the nonvolatile memory when the predetermined write stop condition is satisfied It is characterized by including a part.

これにより、既に保存されているデータの消失を防止することができる。特に、本発明のデータ記録装置では、記憶部として不揮発性メモリを利用する。そのため、不測の事態が発生して記憶装置への電力の供給が停止した場合でも、既に保存されているデータの消失を防止することができる。   As a result, it is possible to prevent the loss of already stored data. In particular, the data recording apparatus of the present invention uses a non-volatile memory as the storage unit. Therefore, even when an unexpected situation occurs and the supply of power to the storage device is stopped, the loss of already stored data can be prevented.

(7)本発明に係るデータ記録装置は、
前記記憶領域毎の未使用領域の記憶容量が所定の値を下回ったことを検出する検出部をさらに含むことを特徴とする。
(7) A data recording apparatus according to the present invention comprises:
The image processing apparatus further includes a detection unit that detects that the storage capacity of the unused area for each storage area falls below a predetermined value.

(8)本発明に係るデータ記録装置は、
前記書き込み制御部は、
前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データが、所定の取得条件を満たすか否か判断し、満たす場合には前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データが上書きされないように、前記所与の記憶領域に新しい1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを書き込むことを特徴とする。
(8) A data recording apparatus according to the present invention comprises:
The write control unit
It is determined whether or not each measurement data for one block last written in the given storage area satisfies a predetermined acquisition condition, and when it is satisfied, 1 last written in the given storage area Each measurement data for one block and the order specification assigned to the one block are stored in the given storage area so that each measurement data for the block and the order specification data assigned to the one block are not overwritten. It is characterized by writing data.

ここで、所定の取得条件を満たすデータとは、例えば、測定データのうち、L個(Lは1ブロックのデータ数Nより大きい整数)間隔で取得される測定データ(あるいは、測定データの取得間隔よりも広い所定の間隔をあけて取得される測定データ)であってもよい。   Here, the data satisfying the predetermined acquisition condition is, for example, measurement data acquired at L intervals (L is an integer larger than the number N of data of one block) among measurement data (or measurement data acquisition intervals) Measurement data obtained at a wider predetermined interval).

これによると、連続するN個の測定データが定期的に保存されるため、データ記録装置が正常に動作していることを確認することができる。   According to this, since consecutive N pieces of measurement data are periodically stored, it can be confirmed that the data recording apparatus is operating normally.

(9)本発明に係るデータ記録装置は、
前記書き込み制御部は、
書き込み先が他の記憶領域から所与の記憶領域に切り替えられて、前記所与の記憶領域に新しい1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを書き込む場合に、前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データに対応する領域の最上位のアドレスを指定することで、前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを上書きするように制御し、
前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データに対応する領域の最下位のアドレスよりも下位のアドレスを指定することで、前記1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを上書きしないように制御することを特徴とする。
(9) A data recording apparatus according to the present invention comprises:
The write control unit
When the write destination is switched from the other storage area to the given storage area, and each measurement data for one new block and the order specifying data assigned to the one block are written to the given storage area, By designating the highest address of the area corresponding to each measurement data for one block last written in the given storage area and the order specifying data assigned to the one block, the given data Control to overwrite each measurement data for one block last written in the storage area and the order specifying data assigned to the one block,
By designating a lower address than the lowest address of the area corresponding to each measurement data for one block last written in the given storage area and the order specifying data assigned to the one block The measurement data for one block and the order specifying data assigned to the one block are controlled so as not to be overwritten.

例えば、1ブロック分の測定データが書き込まれた後に当該1ブロックに割り当てられた順序特定データが書き込まれる場合、新しいデータの書き込みアドレスとして1ブロックの先頭の測定データが書き込まれたアドレスを指定することで、当該1ブロック分の測定データ及び順序特定データが上書きされて消去される。これにより、記憶容量を無駄なく利用することができる。   For example, when the order specification data assigned to one block is written after the measurement data for one block is written, the address where the first measurement data of one block is written is specified as the write address of the new data. Thus, the measurement data for one block and the order specifying data are overwritten and deleted. Thereby, the storage capacity can be used without waste.

逆に、新しいデータの書き込みアドレスとして1ブロック分の測定データ及び順序特定データが書き込まれたアドレスよりも下位のアドレスを指定することで、当該1ブロック分の測定データ及び順序特定データは上書きされることなく保存されるため、必要なデータを保存することができる。   Conversely, by specifying a lower address than the address where the measurement data and sequence specifying data for one block are written as the new data write address, the measurement data and sequence specifying data for that block are overwritten. Therefore, necessary data can be saved.

(10)本発明に係るデータ記録装置は、
前記不揮発性メモリは、
前記複数の記憶領域に含まれない所定の専用記憶領域をさらに有し、
前記書き込み制御部は、
前記不揮発性メモリの前記専用記憶領域に、前記不揮発性メモリの所与の記憶領域に順次書き込まれた各ブロックの少なくとも1つの各測定データを順次書き込むことを特徴とする。
(10) A data recording apparatus according to the present invention comprises:
The nonvolatile memory is
A predetermined dedicated storage area not included in the plurality of storage areas;
The write control unit
At least one measurement data of each block sequentially written in a given storage area of the nonvolatile memory is sequentially written in the dedicated storage area of the nonvolatile memory.

専用記憶領域は、異常を示す測定データを含むブロック及びその前後のブロックを保存する複数の記憶領域とは別途設けられ、各ブロックの少なくとも1つの各測定データを順次書き込む用途に専用の記憶領域である。これによると、イベントの発生の有無にかかわらず、各ブロックの少なくとも1つの各測定データ(測定データの取得間隔よりも長い所定の間隔で取得されたデータ)が専用記憶領域に保存されるため、長期的なデータの変動を確認することが可能になる。なお、当該専用記憶領域は、定期的に書き込みが行われるため、リングバッファとして構成し、古いデータから順に上書きして消去しながら使用することが望ましい。これによると、長期的なデータ変動の確認に必要な数のデータを比較的少ないメモリ容量で効率的に保存することができる。   The dedicated storage area is provided separately from a block including measurement data indicating abnormality and a plurality of storage areas for storing blocks before and after the block, and is dedicated to the use of sequentially writing at least one measurement data of each block. is there. According to this, because at least one measurement data (data acquired at a predetermined interval longer than the measurement data acquisition interval) of each block is stored in the dedicated storage area regardless of whether or not an event has occurred, Long-term data changes can be confirmed. Since the dedicated storage area is periodically written, it is desirable to configure it as a ring buffer and use it while overwriting and erasing the old data in order. According to this, the number of data necessary for checking long-term data fluctuation can be efficiently stored with a relatively small memory capacity.

(11)本発明に係るデータ記録装置は、
前記不揮発性メモリは、強誘電体メモリであることを特徴とする。
(11) A data recording apparatus according to the present invention comprises:
The nonvolatile memory is a ferroelectric memory.

強誘電体メモリは、一般的に、書き換え可能な回数が多く、かつ、書き換えに要する時間が短いことが知られている。そのため、不揮発性メモリとして強誘電体メモリを利用することで、書き換え回数の制限、及び、データの取得時間間隔の制限が小さいデータ記録装置を提供することができる。   It is known that a ferroelectric memory generally has a large number of rewritable times and a short time required for rewriting. Therefore, by using a ferroelectric memory as the nonvolatile memory, it is possible to provide a data recording device with a small limit on the number of rewrites and a limit on the data acquisition time interval.

以下、本発明を適用した実施の形態について図面を参照して説明する。ただし、本発明は以下の実施の形態に限定されるものではない。また、本発明は、以下の内容を自由に組み合わせたものを含むものとする。   Embodiments to which the present invention is applied will be described below with reference to the drawings. However, the present invention is not limited to the following embodiments. Moreover, this invention shall include what combined the following content freely.

図1(A)〜図8は、本発明を適用した実施の形態に係るデータ記録装置(データログ装置)について説明するための図である。   FIG. 1A to FIG. 8 are diagrams for explaining a data recording apparatus (data log apparatus) according to an embodiment to which the present invention is applied.

(1)データ記録装置の構成
図1(A)は、本実施の形態に係るデータ記録装置1の機能ブロック図である。また、図1(B)は、本実施の形態に適用可能な不揮発性メモリ10の模式図である。以下、図1(A)及び図1(B)を参照して、データ記録装置1の構成について説明する。
(1) Configuration of Data Recording Device FIG. 1A is a functional block diagram of the data recording device 1 according to the present embodiment. FIG. 1B is a schematic diagram of a nonvolatile memory 10 applicable to this embodiment. Hereinafter, the configuration of the data recording apparatus 1 will be described with reference to FIGS. 1 (A) and 1 (B).

本実施の形態に係るデータ記録装置1は、図1(A)及び図1(B)に示すように、不揮発性メモリ10を含む。ここで、不揮発性メモリとは、電源を切っても記憶した情報が消失しない記憶装置、すなわち、情報を保持するためのエネルギーを外部から供給する必要のない記憶装置である。不揮発性メモリを利用すれば、データ記録装置1からの電源の供給がストップした場合でも、取得した情報を保持することができる。不揮発性メモリは、例えば、電気ヒステリシスを応用したキャパシタを利用して実現することができる。   The data recording apparatus 1 according to the present embodiment includes a nonvolatile memory 10 as shown in FIGS. 1 (A) and 1 (B). Here, the non-volatile memory is a storage device in which stored information is not lost even when the power is turned off, that is, a storage device that does not need to supply energy for holding information from the outside. If the nonvolatile memory is used, the acquired information can be held even when the power supply from the data recording apparatus 1 is stopped. The nonvolatile memory can be realized using, for example, a capacitor to which electrical hysteresis is applied.

本実施の形態に係るデータ記録装置1では、不揮発性メモリ10として、強誘電体メモリ(FeRAM)を利用してもよい。すなわち、不揮発性メモリ10は、強誘電体物質を有するキャパシタ(強誘電体キャパシタ)を含む構造をなしていてもよい。なお、当該強誘電体キャパシタに適用可能な強誘電体物質は特に限定されるものではないが、例えばPb、Zr、Tiを構成元素として含む酸化物からなるPZT系強誘電体材料であってもよい。あるいは、強誘電体物質として、SBT系、BST系、BIT系、BLT系などのいずれかの材料を適用してもよい。そして、強誘電体キャパシタは、対向電極と、当該対向電極の間に設けられた強誘電体物質とを含む構造をなしていてもよい。   In the data recording apparatus 1 according to the present embodiment, a ferroelectric memory (FeRAM) may be used as the nonvolatile memory 10. That is, the nonvolatile memory 10 may have a structure including a capacitor having a ferroelectric substance (ferroelectric capacitor). The ferroelectric substance applicable to the ferroelectric capacitor is not particularly limited. For example, a PZT ferroelectric material made of an oxide containing Pb, Zr, and Ti as constituent elements may be used. Good. Alternatively, any material such as SBT, BST, BIT, or BLT may be applied as the ferroelectric substance. The ferroelectric capacitor may have a structure including a counter electrode and a ferroelectric substance provided between the counter electrodes.

不揮発性メモリ10は、図1(B)に示すように、複数の記憶領域に分割されている。なお、図1(B)に示す例では、不揮発性メモリ10は、第1記憶領域11及び第2記憶領域12の二つの記憶領域に分割されている。ただし、本発明では、不揮発性メモリ10は、3個以上の複数の記憶領域に分割されていてもよい。また、本発明では、不揮発性メモリ10は、専用記憶領域13を含んでいてもよい。   As shown in FIG. 1B, the nonvolatile memory 10 is divided into a plurality of storage areas. In the example shown in FIG. 1B, the nonvolatile memory 10 is divided into two storage areas, a first storage area 11 and a second storage area 12. However, in the present invention, the nonvolatile memory 10 may be divided into three or more storage areas. In the present invention, the nonvolatile memory 10 may include a dedicated storage area 13.

本実施の形態に係るデータ記録装置1は、書き込み制御部20を含む。書き込み制御部20は、不揮発性メモリ10への測定データの書き込み動作(処理)を制御する。書き込み制御部20は、不揮発性メモリ10における測定データを書き込むアドレスを指定し、不揮発性メモリ10へのデータの書き込み動作を行う。例えば、書き込み制御部20は、不揮発性メモリ10の書き込みアドレスを指定する書き込みアドレス指定部25を含んでいてもよい。そして、書き込み制御部20は、書き込みアドレス指定部25が指定するアドレスに測定データを書き込む。なお、書き込みアドレス指定部25のアドレス生成手順は特に限定されるものではないが、例えば、現在の書き込みアドレスに、測定データのデータサイズを加えて(インクリメントして)次の書き込みアドレスを生成してもよい。   The data recording apparatus 1 according to the present embodiment includes a write control unit 20. The write control unit 20 controls the writing operation (processing) of measurement data to the nonvolatile memory 10. The write control unit 20 designates an address for writing measurement data in the nonvolatile memory 10 and performs a data write operation to the nonvolatile memory 10. For example, the write control unit 20 may include a write address specifying unit 25 that specifies the write address of the nonvolatile memory 10. Then, the write control unit 20 writes the measurement data at the address specified by the write address specifying unit 25. The address generation procedure of the write address specifying unit 25 is not particularly limited. For example, the next write address is generated by adding (incrementing) the data size of the measurement data to the current write address. Also good.

書き込み制御部20は、不揮発性メモリ10の所与の記憶領域(以下、『第1記憶領域11』とする)に1ブロックの所定の数(N個)の測定データを順次書き込み、その後、他の記憶領域(以下『第2記憶領域12』とする)に1ブロック分の各測定データを順次書き込む制御を行う。かかる制御は、例えば、書き込みアドレス指定部25によって、第1記憶領域11のアドレスを順次指定してN個のデータを書き込む処理を行い、その後、第2記憶領域12のアドレスを順次指定してN個のデータを書き込む処理を行うことで実現することができる。このとき、書き込みアドレス指定部25は、第1及び第2記憶領域11,12のアドレスを、上位アドレスから下位アドレスに向けて順次指定してもよい。なお、不揮発性メモリ10が2つの記憶領域に分割されている場合には、書き込みアドレス指定部25は、第1記憶領域11のアドレスを指定した後に第2記憶領域12のアドレスを指定し、その後、再び第1記憶領域11のアドレスを指定する。不揮発性メモリ10がM個(Mは3以上の整数)の記憶領域を有する場合、書き込みアドレス指定部25は、第1記憶領域のアドレスから第M記憶領域のアドレスまで順次指定し、第M記憶領域にN個のデータを書き込んだ後に、再び第1記憶領域のアドレスを指定する。   The write control unit 20 sequentially writes a predetermined number (N) of measurement data of one block to a given storage area (hereinafter referred to as “first storage area 11”) of the nonvolatile memory 10, and thereafter The control data is sequentially written in the storage area (hereinafter referred to as “second storage area 12”). For example, the write address designating unit 25 sequentially designates the address of the first storage area 11 and writes N data, and then designates the address of the second storage area 12 sequentially. This can be realized by performing a process of writing individual data. At this time, the write address specifying unit 25 may sequentially specify the addresses of the first and second storage areas 11 and 12 from the higher address to the lower address. When the nonvolatile memory 10 is divided into two storage areas, the write address specification unit 25 specifies the address of the second storage area 12 after specifying the address of the first storage area 11, and then Then, the address of the first storage area 11 is designated again. When the nonvolatile memory 10 has M storage areas (M is an integer of 3 or more), the write address designating unit 25 sequentially designates from the address of the first storage area to the address of the Mth storage area, and stores the Mth memory. After writing N data in the area, the address of the first storage area is designated again.

また、書き込み制御部20は、不揮発性メモリ10の専用記憶領域13に、第1記憶領域11又は第2記憶領域12に順次書き込まれた各ブロックの少なくとも1つの測定データを順次書き込むように制御してもよい。書き込み制御部20は、例えば、各ブロックの先頭の測定データのみを専用記憶領域13に順次書き込むように制御してもよい。かかる制御は、例えば、書き込みアドレス指定部25によって、第1記憶領域11又は第2記憶領域12のアドレスを順次指定してN個のデータを書き込む処理を行う際に、先頭のデータを書き込む場合のみ、さらに専用記憶領域13に先頭のデータを書き込む処理を行うことで実現することができる。このとき、書き込みアドレス指定部25は、専用記憶領域13のアドレスを、上位アドレスから下位アドレスに向けて順次指定してもよい。   Further, the write control unit 20 performs control so that at least one measurement data of each block sequentially written in the first storage area 11 or the second storage area 12 is sequentially written in the dedicated storage area 13 of the nonvolatile memory 10. May be. For example, the write control unit 20 may perform control so that only the first measurement data of each block is sequentially written in the dedicated storage area 13. For example, this control is performed only when the top data is written when the write address designating unit 25 sequentially designates the addresses of the first storage area 11 or the second storage area 12 and writes N data. Further, it can be realized by performing a process of writing the leading data in the dedicated storage area 13. At this time, the write address designating unit 25 may sequentially designate the address of the dedicated storage area 13 from the upper address to the lower address.

本実施の形態に係るデータ記録装置1は、順序特定データ生成部30を含んでいてもよい。順序特定データ生成部30は、図1(A)に示すように、書き込み制御部20に含まれていてもよい。順序特定データ生成部30は、不揮発性メモリ10に書き込まれる各ブロックに割り当てられ各ブロックが取得された順序を特定するための順序特定データを生成する。順序特定データ生成部30は、1つの記憶領域に1ブロック分の測定データが書き込まれる度にカウンタをインクリメントして順序特定データを生成してもよい。そして、書き込み制御部20は、1つの記憶領域に1ブロック分の各測定データを書き込んだ後に、当該記憶領域の次のアドレスに順序特定データを書き込む制御を行ってもよいし、1つの記憶領域に順序特定データを書き込んだ後に、当該記憶領域の次のアドレスから1ブロック分の各測定データを書き込む制御を行ってもよい。   The data recording apparatus 1 according to the present embodiment may include an order specifying data generation unit 30. The order specifying data generation unit 30 may be included in the write control unit 20 as shown in FIG. The order specifying data generation unit 30 generates order specifying data for specifying the order in which each block is assigned to each block written in the nonvolatile memory 10. The order specifying data generation unit 30 may generate the order specifying data by incrementing a counter each time measurement data for one block is written in one storage area. Then, the write control unit 20 may perform control to write the order specifying data to the next address of the storage area after writing the measurement data for one block in one storage area. After writing the order specifying data, control for writing each block of measurement data from the next address of the storage area may be performed.

本実施の形態に係るデータ記録装置1は、書き込み停止処理部35を含んでいてもよい。書き込み停止処理部35は、図1(A)に示すように、書き込み制御部20に含まれていてもよい。書き込み停止処理部35は、不揮発性メモリ10への測定データの書き込みを停止させる。書き込み停止処理部35は、測定データが所定の書き込み停止条件を満たしているか否かを判断し、当該書き込み停止条件を満たしている場合に、不揮発性メモリ10へのデータの書き込みを停止させる。書き込み停止処理部35は、書き込み停止条件を満たしているデータの取得後、直ちに書き込み動作を停止してもよい。あるいは、書き込み停止処理部35は、書き込み停止条件を満たしているデータの取得後、所定の時間が経過した後に、データの書き込みを停止してもよい。   The data recording apparatus 1 according to the present embodiment may include a write stop processing unit 35. The write stop processing unit 35 may be included in the write control unit 20 as shown in FIG. The write stop processing unit 35 stops writing measurement data to the nonvolatile memory 10. The write stop processing unit 35 determines whether the measurement data satisfies a predetermined write stop condition, and stops writing data to the nonvolatile memory 10 when the write stop condition is satisfied. The write stop processing unit 35 may stop the write operation immediately after obtaining data that satisfies the write stop condition. Alternatively, the write stop processing unit 35 may stop writing data after a predetermined time has elapsed after acquiring data that satisfies the write stop condition.

なお、データ記録装置1は、記憶領域毎の未使用領域の記憶容量が所定の値を下回ったことを検出する検出部を含んでいてもよい。このとき、書き込みアドレス指定部25は、当該検出部からの検出信号に基づいて、指定するアドレスを制御してもよい。データ記録装置1は、また、アドレス毎のデータの書き込み(書き換え)回数を計測する書き込み回数計測部を含んでいてもよい。また、データ記録装置1は、不揮発性メモリ10(第1及び第2記憶領域11,12)を、リングバッファとして循環使用してもよい。   The data recording apparatus 1 may include a detection unit that detects that the storage capacity of the unused area for each storage area has fallen below a predetermined value. At this time, the write address designating unit 25 may control the designated address based on the detection signal from the detection unit. The data recording apparatus 1 may also include a writing number measuring unit that measures the number of data writing (rewriting) for each address. In addition, the data recording apparatus 1 may use the nonvolatile memory 10 (first and second storage areas 11 and 12) in a circulating manner as a ring buffer.

次に、本実施の形態に係るデータ記録装置1の具体的な装置構成について説明する。図2は、データ記録装置1の具体的な装置構成の一例を示すブロック図である。   Next, a specific apparatus configuration of the data recording apparatus 1 according to the present embodiment will be described. FIG. 2 is a block diagram showing an example of a specific device configuration of the data recording device 1.

データ記録装置1は、CPU100を有する。CPU100は、データ記録装置1の動作を制御する。CPU100は、例えば、FeRAM110(不揮発性メモリ10の一例としての強誘電体メモリ)の書き込みアドレスを決定し、当該書き込みアドレスを順次指定し、指定した書き込みアドレスに測定データを書き込ませる。すなわち、CPU100は、書き込み制御部20として機能してもよい。また、CPU100は、計測機器の動作を制御して、データの測定間隔(測定データの取得間隔)を設定してもよい。そして、FeRAM110は、不揮発性メモリ10として機能する。   The data recording apparatus 1 has a CPU 100. The CPU 100 controls the operation of the data recording device 1. For example, the CPU 100 determines a write address of the FeRAM 110 (a ferroelectric memory as an example of the nonvolatile memory 10), sequentially designates the write address, and causes measurement data to be written to the designated write address. That is, the CPU 100 may function as the write control unit 20. Further, the CPU 100 may control the operation of the measuring device and set the data measurement interval (measurement data acquisition interval). The FeRAM 110 functions as the nonvolatile memory 10.

CPU100は、ROM120から読み込んだ制御プログラムに基づいて、データ記録装置1の動作を制御してもよい。CPU100は、また、RAM130に保存された測定パラメータに基づいて、データ記録装置1の動作を制御してもよい。ここで、測定パラメータは、例えばキー入力されてRAM130に保存されている情報であってもよい。RAM130の機能は、EEPROM等の書き換え可能なROMや、FeRAMによって実現してもよい。   The CPU 100 may control the operation of the data recording device 1 based on a control program read from the ROM 120. The CPU 100 may also control the operation of the data recording device 1 based on the measurement parameters stored in the RAM 130. Here, the measurement parameter may be, for example, information that is keyed and stored in the RAM 130. The function of the RAM 130 may be realized by a rewritable ROM such as an EEPROM or an FeRAM.

データ記録装置1では、CPU100、FeRAM110、ROM120、RAM130及びI/Oは、1つの集積回路装置(例えば半導体チップ)として構成されていてもよい。そして、データ記録装置1は、当該集積回路装置で、計測機器を制御し、ディスプレーに画像を表示させるための表示画像データを生成する制御を行ってもよい。   In the data recording device 1, the CPU 100, the FeRAM 110, the ROM 120, the RAM 130, and the I / O may be configured as one integrated circuit device (for example, a semiconductor chip). Then, the data recording apparatus 1 may perform control for controlling the measuring device and generating display image data for displaying an image on the display by the integrated circuit device.

(2)データ記録装置1の動作
以下、本実施の形態に係るデータ記録装置1の動作について説明する。図3は、データ記録装置1の動作を説明するためのフローチャート図である。
(2) Operation of Data Recording Device 1 Hereinafter, the operation of the data recording device 1 according to the present embodiment will be described. FIG. 3 is a flowchart for explaining the operation of the data recording apparatus 1.

はじめに、初期値を設定する(ステップS10)。ここで、初期値とは、例えば、データを測定する間隔(測定データの取得間隔)や、測定データを正常と判断する範囲(上限及び下限値)や、1ブロックの測定データの数であるNの値、初期アドレス等が挙げられる。これらの初期値は、RAM130に記憶させてもよい。なお、これらの初期値は、測定対象に合わせて設定してもよい。   First, an initial value is set (step S10). Here, the initial value is, for example, an interval for measuring data (measurement data acquisition interval), a range for determining the measurement data to be normal (upper and lower limit values), or the number of measurement data in one block N Value, initial address, and the like. These initial values may be stored in the RAM 130. These initial values may be set according to the measurement object.

そして、書き込みアドレス指定部25で所与の記憶領域のアドレスを指定し、指定されたアドレスに測定データを書き込む処理を繰り返すことによって、所与の記憶領域に1ブロックのN個のデータを書き込む(ステップS12)。   Then, the address of the given storage area is designated by the write address designation unit 25, and the process of writing the measurement data to the designated address is repeated, thereby writing N data of one block in the given storage area ( Step S12).

そして、順序特定データ生成部30で当該1ブロックに割り当てられた順序特定データを生成し、書き込みアドレス指定部25によって指定された当該記憶領域のアドレスに当該順序特定データを書き込む(ステップS14)。   Then, the order specifying data generating unit 30 generates the order specifying data assigned to the one block, and writes the order specifying data to the address of the storage area specified by the write address specifying unit 25 (step S14).

そして、データを書き込む記憶領域を変更(選択)し(ステップS16)、新たな記憶領域の書き込み開始アドレス(先頭アドレス)を設定する(ステップS18)。   Then, the storage area to which data is written is changed (selected) (step S16), and the write start address (start address) of the new storage area is set (step S18).

そして、書き込みアドレス指定部25で、当該書き込み開始アドレスからアドレスの指定を行い、1ブロックのN個の測定データを書き込む手順(ステップS12)を繰り返す。   Then, the write address designating unit 25 designates an address from the write start address, and repeats the procedure of writing N measurement data of one block (step S12).

図4は、データ記録装置1の動作、特に、新たな記憶領域の書き込み開始アドレスを決定する手順(ステップS18)について説明するためのフローチャート図である。ここでは、新たな記憶領域として第1記憶領域11を選択した場合を例にとって説明する。また、図5(A)〜図5(C)は、データ記録装置1における不揮発性メモリ10にデータが書き込まれる様子を表す模式図である。   FIG. 4 is a flowchart for explaining the operation of the data recording apparatus 1, particularly the procedure for determining the write start address of a new storage area (step S18). Here, a case where the first storage area 11 is selected as a new storage area will be described as an example. 5A to 5C are schematic diagrams showing how data is written to the nonvolatile memory 10 in the data recording device 1. FIG.

はじめに、第1記憶領域11に書き込まれたブロックのうち、最後に書き込まれたブロックのN個のデータ(以下、『第1ブロックのデータD1』とする)、及び、第1ブロックのデータD1の次に取得されたブロックのN個の測定データ(以下、『第2ブロックのデータD2』とする)が、すべて、所定の範囲内の値のデータであるか否かについて判断する(ステップS20)。なお、第2ブロックのデータD2は、第2記憶領域12に書き込まれた測定データのうち、最後に書き込まれたブロックのN個のデータであってもよい。ただし、第2ブロックのデータD2は、記憶部10(第2記憶領域12)に書き込まれる前のN個のデータであってもよい。   First, among the blocks written in the first storage area 11, the N pieces of data of the last written block (hereinafter referred to as “first block data D1”) and the data D1 of the first block are stored. Next, it is determined whether or not all the N pieces of measurement data of the acquired block (hereinafter referred to as “second block data D2”) are data within a predetermined range (step S20). . The data D2 of the second block may be N pieces of data of the last written block among the measurement data written in the second storage area 12. However, the data D2 of the second block may be N pieces of data before being written in the storage unit 10 (second storage area 12).

ここで、「所定の範囲の値」とは、測定データがイベントの発生を示すか否かを判定するための上限値及び下限値の少なくとも一方を規定する閾値である。すなわち、測定データの値が所定の範囲内の値である場合には、当該測定データは、測定対象が正常であることを示している。逆に、測定データの値が所定の範囲外の値である場合には、当該測定データは、測定対象に異常が発生していることを示している。この、「所定の範囲の値」は、例えば、測定対象に基づいて予め定められている値であってもよい。あるいは、「所定の範囲の値」は、測定データに基づいて設定される値であってもよい。例えば、直前に測定されたデータとの対比において、所定の範囲の値を設定してもよい。   Here, the “predetermined range of values” is a threshold value that defines at least one of an upper limit value and a lower limit value for determining whether or not the measurement data indicates the occurrence of an event. That is, when the value of the measurement data is a value within a predetermined range, the measurement data indicates that the measurement target is normal. On the contrary, when the value of the measurement data is outside the predetermined range, the measurement data indicates that an abnormality has occurred in the measurement target. This “predetermined range of values” may be a value determined in advance based on the measurement target, for example. Alternatively, the “predetermined range of values” may be a value set based on measurement data. For example, a value in a predetermined range may be set in comparison with the data measured immediately before.

なお、第1及び第2ブロックのデータD1,D2は、第1及び第2記憶領域11,12に書き込まれたデータのうち、最も新しいN個のデータ(最後に書き込まれたN個のデータ)であってもよい。また、第1及び第2ブロックのデータD1,D2は、それぞれ、連続的に取得されたN個の測定データであってもよい。   The data D1 and D2 of the first and second blocks are the newest N pieces of data (N pieces of data written last) among the data written in the first and second storage areas 11 and 12. It may be. Further, the data D1 and D2 of the first and second blocks may be N pieces of measurement data obtained continuously.

例えば、図5(A)のように、第1及び第2ブロックのデータD1,D2は、それぞれ第1及び第2記憶領域11,12のアドレスA11及びA21から順次書き込まれたN個の測定データであってもよい。また、例えば、第1及び第2ブロックのデータD1,D2にそれぞれ割り当てられた順序特定データID1,ID2は、それぞれデータD1,D2が書き込まれている最後のアドレスの次のアドレス(図5(A)では、それぞれアドレスA12,A22)に書き込まれていてもよい。   For example, as shown in FIG. 5A, the data D1 and D2 of the first and second blocks are N pieces of measurement data sequentially written from the addresses A11 and A21 of the first and second storage areas 11 and 12, respectively. It may be. Further, for example, the order specifying data ID1 and ID2 assigned to the data D1 and D2 of the first and second blocks, respectively, are the addresses next to the last address where the data D1 and D2 are written (FIG. 5 (A ) May be written at addresses A12 and A22), respectively.

そして、第1及び第2ブロックのデータD1,D2が、すべて、所定の範囲内の値のデータである場合(ステップS20におけるYesの場合)、書き込み制御部20は、第1ブロックのデータD1及び順序特定データID1が上書きされるように書き込み開始アドレスを設定し(ステップS22)、第1記憶領域11に新しいブロックのデータを書き込む(ステップS12)。例えば、書き込みアドレス指定部25で、第1ブロックのデータD1が書き込まれている先頭のアドレス(図5(B)ではアドレスA11)を書き込み開始アドレスと指定してもよい。この場合、図5(B)に示すように、アドレスA11以下のアドレスに書き込まれていたデータD1は、新たに取得されたデータD3によって上書きされて消去される。また、データD1が書き込まれている最後のアドレスの次のアドレス(図5(B)ではアドレスA12)に書き込まれていた順序特定データID1は、データD3に割り当てられた順序特定データID3によって上書きされて消去される。   When the data D1 and D2 of the first and second blocks are all data within a predetermined range (Yes in step S20), the write control unit 20 determines that the data D1 of the first block and A write start address is set so that the order specifying data ID1 is overwritten (step S22), and new block data is written to the first storage area 11 (step S12). For example, the write address designating unit 25 may designate the head address (address A11 in FIG. 5B) where the data D1 of the first block is written as the write start address. In this case, as shown in FIG. 5B, the data D1 written to the addresses below the address A11 is overwritten and erased by the newly acquired data D3. Further, the order specifying data ID1 written in the address next to the last address in which the data D1 is written (address A12 in FIG. 5B) is overwritten by the order specifying data ID3 assigned to the data D3. Will be erased.

逆に、第1及び第2ブロックのデータD1,D2の少なくとも1つが、所定の範囲外の値のデータを含む場合(ステップS20におけるNoの場合)、書き込み制御部20は、第1ブロックのデータD1及び順序特定データID1が上書きされないように書き込み開始アドレスを設定し(ステップS24)、第1記憶領域11に新しいブロックのデータを書き込む(ステップS12)。例えば、書き込みアドレス指定部で、第1ブロックのデータD1及び順序特定データID1が書き込まれたアドレスよりも後のアドレス(図5(C)ではアドレスA13)を書き込み開始アドレスと指定してもよい。この場合、図5(C)に示すように、新たなデータD3及び順序特定データID3は第1ブロックのデータD1及び順序テク定データID1を避けて書き込まれるため、第1ブロックのデータD1及び順序特定データID1は、消去されずに保存される。   Conversely, when at least one of the data D1 and D2 of the first and second blocks includes data having a value outside the predetermined range (No in step S20), the write control unit 20 determines that the data of the first block A write start address is set so that D1 and the order specifying data ID1 are not overwritten (step S24), and new block data is written to the first storage area 11 (step S12). For example, the write address designation unit may designate an address (address A13 in FIG. 5C) after the address where the data D1 and the order specifying data ID1 of the first block are written as the write start address. In this case, as shown in FIG. 5C, the new data D3 and the order specifying data ID3 are written avoiding the first block data D1 and the order tech data ID1, so the first block data D1 and the order The specific data ID1 is stored without being erased.

なお、本発明では、新たな記憶領域の書き込み開始アドレスを決定する手順(ステップS18)において、第1及び第2ブロックのデータD1,D2のみならず、第1ブロックのデータD1の前に取得された第0ブロックのデータD0に基づいて、書き込み開始アドレスを決定してもよい。この場合の書き込み開始アドレスを決定する手順について、図6を参照して説明する。   In the present invention, in the procedure for determining the write start address of the new storage area (step S18), the data is acquired not only in the first and second block data D1 and D2 but also before the first block data D1. The write start address may be determined based on the data D0 of the 0th block. The procedure for determining the write start address in this case will be described with reference to FIG.

はじめに、第1及び第2ブロックのデータD1,D2が所定の範囲内の値であるか否か、及び、第1ブロックのデータD1の前に取得された第0ブロックのデータD0が所定の範囲内の値であるか否かを判定する(ステップS25)。   First, whether or not the data D1 and D2 of the first and second blocks are values within a predetermined range, and the data D0 of the 0th block acquired before the data D1 of the first block is within a predetermined range. It is determined whether the value is within the range (step S25).

第1及び第2ブロックのデータD1,D2が所定の範囲内の値であり、かつ、第0ブロックのデータD0が所定の範囲内の値である場合(ステップS25におけるYesの場合)、書き込み制御部20は、第1ブロックのデータD1及び順序特定データID1が上書きされるように書き込み開始アドレスを指定し(ステップS22)、第1記憶領域11に新しいブロックの測定データ及び当該新しいブロックに割り当てられた順序特定データを書き込む(ステップS12,S14)。   Write control when the data D1 and D2 of the first and second blocks are values within a predetermined range and the data D0 of the 0th block is a value within the predetermined range (Yes in step S25) The unit 20 designates the write start address so that the data D1 and the order specifying data ID1 of the first block are overwritten (step S22), and the measurement data of the new block and the new block are allocated to the first storage area 11. The sequence specifying data is written (steps S12 and S14).

逆に、第1及び第2ブロックのデータD1,D2の少なくとも1つが所定の範囲外のデータを含む場合、又は、第0ブロックのデータD0が所定の範囲外のデータを含む場合(ステップS25におけるNoの場合)、書き込み制御部20は、第1ブロックのデータD1及び順序特定データID1が上書きされないように書き込み開始アドレスを指定し(ステップS24)、第1記憶領域11に新しいブロックのデータ及び当該新しいブロックに割り当てられた順序特定データを書き込む(ステップS12,S14)。   Conversely, when at least one of the data D1 and D2 of the first and second blocks includes data outside the predetermined range, or when the data D0 of the 0th block includes data outside the predetermined range (in step S25) In the case of No), the write control unit 20 designates a write start address so that the data D1 and the order specifying data ID1 of the first block are not overwritten (step S24), and the new block data and the relevant data are stored in the first storage area 11 The order specifying data assigned to the new block is written (steps S12 and S14).

これによると、第1ブロックのデータD1の直前に取得された第0ブロックのデータD0がイベントの発生を示すデータを含んでいる場合に、第1及び第2ブロックのデータD1,D2の値にかかわらず、第1ブロックのデータD1及び順序特定データID1が保存される。そのため、このデータ記録装置によると、イベント発生後、所定の期間のデータを保存することができる。   According to this, when the data D0 of the 0th block acquired immediately before the data D1 of the first block includes data indicating the occurrence of an event, the values of the data D1 and D2 of the first and second blocks are set. Regardless, the data D1 of the first block and the order specifying data ID1 are stored. Therefore, according to this data recording apparatus, it is possible to store data for a predetermined period after an event occurs.

すなわち、本発明に係るデータ記録装置によると、イベント発生前に取得された少なくともN個のデータと、イベント発生後に取得された少なくともN個のデータとを保存することができるため、イベント発生前後のデータ変化を解析することが可能になる。   That is, according to the data recording device of the present invention, since at least N data acquired before the event occurrence and at least N data obtained after the event occurrence can be stored, before and after the event occurrence Data changes can be analyzed.

詳しくは、本発明では、先に説明したように、データをN個ずつに分け(ブロックとしてとらえ)、それぞれを一つのまとまりとして扱う。そのため、イベント発生時点のデータも、いずれかのブロックに含まれることになる。すなわち、イベント発生時点のデータは、一つのブロックの先頭から末尾までのいずれかの位置に書き込まれる。例えばイベント発生時点のデータが1つのブロックの先頭データとして書き込まれている場合、当該ブロックの前のブロックのデータを保存すれば、イベント発生時点よりも前のN個のデータを保存することができる。逆に、イベント発生時点のデータが1つのブロックの末尾データとして書き込まれている場合、当該ブロックの後のブロックのデータを保存すれば、イベント発生時点の後のN個のデータを保存することができる。すなわち、イベント発生時点のデータを含むN個のデータ(1つのブロックのデータ)と、その前後のブロックのデータとを保存すれば、イベント発生時点のデータが一つのブロックのどこに書き込まれている場合でも、イベント発生時点のデータと、その前の少なくともN個のデータ及びその後の少なくともN個のデータを保存することができるため、イベント発生前後のデータ変化を解析することが可能になる。   Specifically, in the present invention, as described above, data is divided into N pieces (taken as blocks), and each is handled as one unit. Therefore, data at the time of event occurrence is also included in any block. That is, the data at the time of event occurrence is written at any position from the beginning to the end of one block. For example, when the data at the time of event occurrence is written as the head data of one block, if the data of the block before the relevant block is saved, N data before the time of event occurrence can be saved. . Conversely, if the data at the time of event occurrence is written as the end data of one block, if the data of the block after the block is saved, N data after the event occurrence time can be saved. it can. In other words, if N data (data of one block) including data at the time of event occurrence and data of blocks before and after the data are stored, where the data at the time of event occurrence is written in one block However, since data at the time of event occurrence, at least N data before and at least N data after that can be stored, it is possible to analyze data changes before and after the event occurrence.

逆に、イベントが発生しなければ、暫定的に保存されていた1ブロックのN個のデータ及び順序特定データは、新たに取得した1ブロックのN個のデータ及び順序特定データによって順次上書きされて消去されるため、イベント発生前後のデータのみを保存することができる。従って、少ない記憶容量のメモリであっても、効率的にイベント発生前後のデータを残すことができる。すなわち、本発明に係るデータ記録装置は、イベントレコーダとして使用することができる。   On the other hand, if an event does not occur, the N data and order specifying data of one block temporarily stored are sequentially overwritten by the newly acquired N data and order specifying data of one block. Since it is deleted, only the data before and after the event can be saved. Therefore, even before a memory having a small storage capacity, data before and after the occurrence of an event can be efficiently left. That is, the data recording apparatus according to the present invention can be used as an event recorder.

さらに、本発明では、新たな記憶領域の書き込み開始アドレスを決定する手順(ステップS18)において、第1ブロックのデータD1が所定の条件(取得条件)を満たしたデータを含んでいる場合、この第1ブロックのデータD1を保存すべきデータと判定してもよい。例えば、第1ブロックのデータD1が測定データの取得間隔(測定間隔)よりも広い所定の間隔をあけて取得されたデータを含んでいる場合に、この第1ブロックのデータD1を、保存すべきデータと判定してもよい。これによると、イベントが発生しなかった場合でも測定データが定期的に保存されるため、データ記録装置が正常に動作していることを確認することができる。あるいは、第1及び第2記憶領域11,12のアドレスの使用量の偏りが大きくなった時に、第1ブロックのデータD1を保存すべきデータと判定してもよい。これによれば、メモリの使用領域の差を調整することができる。
なお、測定開始後の最初の1ブロック分の測定データが保存すべきデータでなかった時に、次のサイクルで当該データを上書きしようとしても上書きすべきデータが存在しないという事態が発生するので注意が必要である。例えば、とりあえず初回は1ブロック分のデータを残すようにしてもよい。
Further, in the present invention, in the procedure for determining the write start address of a new storage area (step S18), if the data D1 of the first block includes data that satisfies a predetermined condition (acquisition condition), this first One block of data D1 may be determined as data to be stored. For example, when the data D1 of the first block includes data acquired at a predetermined interval wider than the measurement data acquisition interval (measurement interval), the data D1 of the first block should be stored It may be determined as data. According to this, even when an event does not occur, measurement data is periodically saved, so that it can be confirmed that the data recording device is operating normally. Alternatively, the data D1 of the first block may be determined as data to be stored when the usage amount of the addresses in the first and second storage areas 11 and 12 becomes large. According to this, it is possible to adjust the difference in the memory usage area.
Note that when the measurement data for the first block after the start of measurement is not data to be saved, there will be no data to be overwritten even if the data is overwritten in the next cycle. is necessary. For example, data for one block may be left for the first time.

一方、本発明に係るデータ記録装置は、イベント発生の有無にかかわらず、1ブロックのN個のデータのうちの少なくとも1つのデータを不揮発性メモリの専用記憶領域に保存するようにしてもよい。以下では、このように専用記憶領域に保存されるデータを一般データと呼ぶものとする。例えば、図3のステップS12に示した1ブロックのN個のデータの書き込み処理において、N個のデータの少なくとも1つのデータを一般データとして保存する手順について、図7を参照して説明する。   On the other hand, the data recording apparatus according to the present invention may store at least one of the N pieces of data in one block in the dedicated storage area of the nonvolatile memory regardless of whether or not an event has occurred. Hereinafter, data saved in the dedicated storage area in this way is referred to as general data. For example, a procedure for storing at least one of N pieces of data as general data in the writing process of N pieces of data of one block shown in step S12 of FIG. 3 will be described with reference to FIG.

まず、書き込みアドレス指定部25で所与の記憶領域のアドレスを指定し、指定されたアドレスに新たな測定データを書き込む(ステップS30)。   First, the address of a given storage area is designated by the write address designation unit 25, and new measurement data is written to the designated address (step S30).

そして、書き込みアドレス指定部25は、次の測定データを書き込むための書き込みアドレスを更新する(ステップS32)。更新された書き込みアドレスは、次にステップS30において新たな測定データを書き込む際に、書き込みアドレス指定部25で書き込みアドレスとして指定される。   Then, the write address designating unit 25 updates the write address for writing the next measurement data (step S32). The updated write address is designated as a write address by the write address designation unit 25 when new measurement data is written in step S30.

そして、ステップS30で所与の記憶領域に書き込まれた測定データを一般データとして保存するための条件を満たすか否か判断する(ステップS34)。条件を満たさない場合(ステップS34においてNoの場合)は、一般データの書き込み処理(ステップS36、S38)を行わず次の手順(ステップS40)に進む。条件を満たす場合(ステップS34においてYesの場合)は、書き込みアドレス指定部25で指定された専用記憶領域のアドレスに当該測定データを書き込んで一般データとして保存する(ステップS36)。例えば、常に、1ブロックの先頭の測定データを一般データとして保存するようにしてもよい。   Then, it is determined whether or not the condition for saving the measurement data written in the given storage area in step S30 as general data is satisfied (step S34). If the condition is not satisfied (No in step S34), the general data writing process (steps S36 and S38) is not performed and the process proceeds to the next procedure (step S40). If the condition is satisfied (Yes in step S34), the measurement data is written to the address of the dedicated storage area designated by the write address designation unit 25 and stored as general data (step S36). For example, the measurement data at the head of one block may always be stored as general data.

そして、書き込みアドレス指定部25は、次の一般データを書き込むための書き込みアドレスを更新する(ステップS38)。更新された書き込みアドレスは、次にステップS36において新たな一般データを書き込む際に、書き込みアドレス指定部25で書き込みアドレスとして指定される。   Then, the write address designating unit 25 updates the write address for writing the next general data (step S38). The updated write address is designated as a write address by the write address designation unit 25 when new general data is written in step S36.

そして、N個の測定データの書き込みが終了したか否か判断し(ステップS40)、終了していない場合(ステップS40においてNoの場合)は、ステップS30〜S38の処理を繰り返す。N個の測定データの書き込みが終了した場合(ステップS40においてYesの場合)は、所与の記憶領域に対する書き込み処理を終了する。   Then, it is determined whether or not the writing of N pieces of measurement data has been completed (step S40). If the measurement data has not been completed (No in step S40), the processes of steps S30 to S38 are repeated. When the writing of the N pieces of measurement data is completed (Yes in step S40), the writing process for the given storage area is ended.

次に、このデータ記録装置を実現するためのアルゴリズムについて、図8を参照して説明する。   Next, an algorithm for realizing this data recording apparatus will be described with reference to FIG.

はじめに、初期値を入力する(ステップS50,S52)。なお、ステップS50では、1ブロック分の測定データの数であるNの値や、測定データの測定時間間隔Tint、第1及び第2記憶領域における先頭アドレスXX,YY、専用記憶領域における先頭アドレスZZを、それぞれ指定する。また、ステップS52では、フラグの初期値を設定する。   First, an initial value is input (steps S50 and S52). In step S50, the value of N that is the number of measurement data for one block, the measurement data interval Tint, the start addresses XX and YY in the first and second storage areas, and the start address ZZ in the dedicated storage area Are specified respectively. In step S52, an initial value of the flag is set.

そして、データを書き込む記憶領域を選択する(ステップS54)。本実施の形態では、例えば、FLG1=0の場合は第1記憶領域11、FLG1≠0の場合は第2記憶領域12を選択するように設定してもよい。   Then, the storage area for writing data is selected (step S54). In the present embodiment, for example, the first storage area 11 may be selected when FLG1 = 0, and the second storage area 12 may be selected when FLG1 ≠ 0.

第1記憶領域11が選択された場合(FLG1=0の場合)の処理と第2記憶領域12が選択された場合(FLG1≠0の場合)の処理の手順は同様であるため、以下では、第1記憶領域11が選択された場合(FLG1=0の場合)の処理手順を例にとり、説明する。   The procedure of the process when the first storage area 11 is selected (when FLG1 = 0) and the process when the second storage area 12 is selected (when FLG1 ≠ 0) are the same. The processing procedure when the first storage area 11 is selected (when FLG1 = 0) will be described as an example.

ステップS54においてFLG1=0の場合(第1記憶領域11が選択された場合)、まず、順序特定データN2を更新する(ステップS56)。なお、順序特定データN2は、各ブロックに割り当てられ各ブロックが取得された順序を特定することができるデータであればよく、本実施の形態では、取得されるブロックが更新される毎に(N個の測定データを取得する毎に)順序特定データN2を1ずつカウントアップ(N2=N2+1)して更新するようにしている。   When FLG1 = 0 in step S54 (when the first storage area 11 is selected), the order specifying data N2 is first updated (step S56). Note that the order specifying data N2 may be data that can be assigned to each block and specify the order in which each block is acquired. In the present embodiment, every time the acquired block is updated (N The order specifying data N2 is incremented by 1 (N2 = N2 + 1) and updated every time one piece of measurement data is acquired.

そして、選択された記憶領域の書き込み開始アドレスを決定する(ステップS58、ステップS60)。この例では、FLG3=0及びFLG5=0の場合(ステップS58においてYesの場合)、1ブロックのN個の測定データ及び順序特定データの上書きを行うためにN+1だけアドレスを繰り上げる処理を行う(ステップS60(ステップS22に対応))。FLG3及びFLG5の少なくとも一方が0ではない場合(ステップS58においてNoの場合)には、アドレスを繰り上げる処理は行わず、次の手順に進む(ステップS24に対応)。   Then, the write start address of the selected storage area is determined (step S58, step S60). In this example, when FLG3 = 0 and FLG5 = 0 (in the case of Yes in step S58), a process of incrementing the address by N + 1 is performed in order to overwrite N measurement data and order specifying data of one block (step S58). S60 (corresponding to step S22)). If at least one of FLG3 and FLG5 is not 0 (No in step S58), the process of incrementing the address is not performed and the process proceeds to the next procedure (corresponding to step S24).

そして、フラグの受け渡し処理を行い(ステップS62)、データの書き込み(記録)処理を行う(ステップS64〜ステップS84)。   Then, a flag delivery process is performed (step S62), and a data writing (recording) process is performed (steps S64 to S84).

データの書き込み処理では、はじめに、書き込みアドレス及びカウンタ値の設定を行う(ステップS64)。そして、データの測定を行い(ステップS66)、測定データの値が所定の範囲内であるか否かについて判定する(ステップS68)。   In the data write process, first, a write address and a counter value are set (step S64). Then, data is measured (step S66), and it is determined whether or not the value of the measurement data is within a predetermined range (step S68).

測定データの値が所定の範囲外のデータである場合(ステップS68でYesの場合)、フラグの値を設定し(ステップS70)、データの書き込み処理を行う(ステップS72)。なお、本実施の形態では、ステップS70で設定されるフラグによって、第1及び第2記憶領域の書き込みアドレスが設定され、データの上書きが制限される(ステップS58〜S62参照)。   When the measured data value is outside the predetermined range (Yes in step S68), the flag value is set (step S70), and the data writing process is performed (step S72). In the present embodiment, the write addresses of the first and second storage areas are set by the flag set in step S70, and overwriting of data is restricted (see steps S58 to S62).

測定データの値が所定の範囲内の値である場合(ステップS68でNoの場合)、フラグの値を変更することなくデータの書き込み処理を行う(ステップS72)。   If the value of the measurement data is within a predetermined range (No in step S68), the data writing process is performed without changing the flag value (step S72).

そして、現在の測定データが1ブロックの先頭の測定データである(n=2)か否か判断する(ステップS74)。先頭の測定データである場合(ステップS74でYesの場合)には、測定データを一般データとして保存する処理を行い(ステップS76,S78)、先頭の測定データでない場合(ステップS74でNoの場合)には、次の手順(ステップS80)に進む。   Then, it is determined whether or not the current measurement data is the first measurement data of one block (n = 2) (step S74). If the measurement data is the first measurement data (Yes in step S74), the measurement data is stored as general data (steps S76 and S78). If the measurement data is not the first measurement data (No in step S74). The process proceeds to the next procedure (step S80).

先頭の測定データは、専用記憶領域13のアドレスZZに書き込まれて一般データとして保存される(ステップS76)。さらに、現在のブロックに割り当てられた順序特定データを、専用記憶領域13の次のアドレス(ZZ+1)に書き込んで保存する(ステップS78)。ここで、順序特定データを保存するのは、保存されたデータを読み出して解析する際に、専用記憶領域13に保存される一般データが含まれるブロックと、第1記憶領域11又は第2記憶領域12に保存されるデータが含まれるブロックを取得した順序を特定することを容易にするためである。   The first measurement data is written at the address ZZ in the dedicated storage area 13 and stored as general data (step S76). Further, the order specifying data assigned to the current block is written and stored at the next address (ZZ + 1) in the dedicated storage area 13 (step S78). Here, the order specifying data is saved when the saved data is read and analyzed, the block including the general data saved in the dedicated storage area 13, and the first storage area 11 or the second storage area. This is because it is easy to specify the order in which the blocks including the data stored in 12 are acquired.

なお、本実施の形態では、順序特定データN2はステップS56においてカウントアップして得られる数値データであり測定データと区別がつかない場合もあるため、順序特定データN2を測定データと区別することができる区切りフラグ(F(N2))に変換して保存している。区切りフラグ(F(N2))を順序特定データと考えてもよい。   In the present embodiment, the order specifying data N2 is numerical data obtained by counting up in step S56 and may be indistinguishable from measurement data. Therefore, the order specifying data N2 may be distinguished from measurement data. It is converted into a possible separation flag (F (N2)) and stored. The delimiter flag (F (N2)) may be considered as order specifying data.

そして、ステップS72において測定データを書き込んだアドレスの次のアドレスに、最後に測定データが書き込まれたアドレスを特定するための所定のデータ(末尾区切りデータ)を書き込む(ステップS80)。例えば、ステップS64〜S84における測定データの記録中に(例えば、後述するステップS82における待ち時間Tintの間に)、データ記録装置が寿命に達し、測定データの書き込み処理を終了する場合であっても、末尾区切りデータが残るので、最後に書き込まれた測定データを特定することができる。なお、本実施の形態では、末尾区切りデータは、測定データがN個に達するまでは次のサイクルのステップS72における測定データの書き込みにより上書きされて消去される。また、末尾区切りデータは、測定データがN個に達した後は後述するステップS90における最後尾区切りデータの書き込みにより上書きされて消去される。従って、末尾区切りデータにより第1記憶領域11の必要な記憶容量が増加することはない。   Then, predetermined data (tail delimiter data) for specifying the address at which the measurement data was written last is written to the address next to the address at which the measurement data was written in step S72 (step S80). For example, even during the recording of measurement data in steps S64 to S84 (for example, during a waiting time Tint in step S82 described later), the data recording device reaches the end of its life and ends the measurement data writing process. Since the end delimiter data remains, the last written measurement data can be specified. In the present embodiment, the end delimiter data is overwritten and erased by writing the measurement data in step S72 of the next cycle until the number of measurement data reaches N. Further, after the number of measurement data reaches N, the end delimiter data is overwritten and erased by writing the last delimiter data in step S90 described later. Therefore, the necessary storage capacity of the first storage area 11 is not increased by the tail delimiter data.

そして、待ち時間Tintの経過を待って(ステップS82)、第1記憶領域11に1ブロックのN個のデータが書き込まれたか否かを判定し(ステップS58)、N個のデータが書き込まれるまで、データの書き込み処理(ステップS64〜S84)を繰り返す。ここで、待ち時間Tintの経過を待つのは、次の測定までの時間間隔を制御するためである。   Then, after the waiting time Tint has elapsed (step S82), it is determined whether or not N data of one block has been written in the first storage area 11 (step S58), and until N data has been written. The data writing process (steps S64 to S84) is repeated. The reason for waiting for the elapse of the waiting time Tint is to control the time interval until the next measurement.

第1記憶領域11にN個のデータが書き込まれると、第1記憶領域11の書き込みアドレスをカウントアップして順序特定データ(区切りフラグ)の入力アドレスを設定し、専用記憶領域13の書き込みアドレスをカウントアップして次の一般データの書き込みアドレスを設定する(ステップS86)。ここで、ZZ=ZZ+2とすることによって、各一般データだけでなく、各一般データを含む各ブロックに割り当てられた各順序特定データ(区切りフラグ)も専用記憶領域13にすべて残すようにしている。このようにすれば、専用記憶領域13に残した一般データと第1記憶領域11又は第2記憶領域12にブロック単位で保存したデータとの時間関係を容易に整理することが可能となる。   When N pieces of data are written in the first storage area 11, the write address of the first storage area 11 is counted up, an input address of the order specifying data (separation flag) is set, and the write address of the dedicated storage area 13 is set. Count up to set the write address of the next general data (step S86). Here, by setting ZZ = ZZ + 2, not only each general data but also each order specifying data (separation flag) assigned to each block including each general data is left in the dedicated storage area 13. Yes. In this way, the time relationship between the general data remaining in the dedicated storage area 13 and the data stored in block units in the first storage area 11 or the second storage area 12 can be easily organized.

そして、現在のブロックに割り当てられた順序特定データを、ステップS86でインクリメント(XX = XX+1)後のアドレスXXに書き込んで保存する(ステップS88)。ここで、順序特定データを保存するのは、保存されたデータを読み出して解析する際に、第1記憶領域11に保存される各N個のデータが含まれる各ブロックを取得した順序及び保存されている各ブロックの間に取得されたブロックの数を特定するためである。   Then, the order specifying data assigned to the current block is written and stored in the address XX after increment (XX = XX + 1) in step S86 (step S88). Here, the order specifying data is saved when the stored data is read and analyzed, and the order in which each block including each N pieces of data saved in the first storage area 11 is acquired and saved. This is because the number of blocks acquired between each block is specified.

そして、ステップS88において順序特定データ(区切りフラグ)を書き込んだアドレスの次のアドレスに、最後に1ブロックのN個の測定データが書き込まれたアドレスを特定するための所定のデータ(最後尾区切りデータ)を書き込む(ステップS90)。なお、本実施の形態では、最後尾区切りデータは、次に書き込まれる新たなN個の測定データの先頭の測定データによってステップS72において上書きされて消去される。従って、最後尾区切りデータにより第1記憶領域11の必要な記憶容量が増加することはない。   Then, in step S88, predetermined data for specifying the address at which N measurement data of one block was written last is added to the address next to the address where the order specifying data (separation flag) is written. ) Is written (step S90). In the present embodiment, the tail end delimiter data is overwritten and erased in step S72 by the first measurement data of new N measurement data to be written next. Therefore, the necessary storage capacity of the first storage area 11 does not increase due to the last segment data.

そして、FLG1の値を1に設定し(ステップS92)、第2記憶領域12を選択し(ステップS54)、同様の処理を繰り返す。   Then, the value of FLG1 is set to 1 (step S92), the second storage area 12 is selected (step S54), and the same processing is repeated.

なお、本実施の形態では、第1記憶領域11又は第2記憶領域12のいずれかの記憶領域のすべてにデータが書き込まれたら、以後のデータ保存を行わないようにしてもよい。この場合は、データ記録開始後の最初のイベント発生時のデータが上書きされないようにすることができる。また、第1記憶領域11及び第2記憶領域12をともにリングバッファとして構成し、各記憶領域のすべてにデータが書き込まれたら、古いデータから順に(先頭アドレスに保存されたデータから順に)新しいデータで上書き消去されるようにしてもよい。この場合は、データ記録終了直前の最後のイベント発生時のデータが上書きされないようにすることができる。   In the present embodiment, when data is written in all of the storage areas of the first storage area 11 or the second storage area 12, subsequent data storage may not be performed. In this case, the data at the time of the first event occurrence after the start of data recording can be prevented from being overwritten. Further, both the first storage area 11 and the second storage area 12 are configured as ring buffers, and when data is written in all of the storage areas, new data is started in order from the oldest data (in order from the data stored at the head address). May be overwritten and erased. In this case, the data at the time of the last event occurring immediately before the end of data recording can be prevented from being overwritten.

一方、一般データを保存する専用記憶領域13は、定期的に書き込みが行われるため、リングバッファとして構成し、古いデータから順に上書きして消去しながら使用することが望ましい。   On the other hand, since the dedicated storage area 13 for storing general data is periodically written, it is preferably configured as a ring buffer and used while being overwritten and erased in order from the old data.

本実施の形態では、上述したようにフラグの設定により書き込みアドレスを設定してもよい。これによれば、サイズの小さなデータの授受により書き込みアドレスの設定が可能になるため、データ処理の負担が小さく、かつ、回路規模の小さなデータ記録装置を提供することができる。   In the present embodiment, as described above, the write address may be set by setting a flag. According to this, since it becomes possible to set the write address by exchanging data with a small size, it is possible to provide a data recording apparatus with a small data processing load and a small circuit scale.

(3)効果
本実施の形態に係るデータ記録装置は、以上のように構成されている。このデータ記録装置によると、記憶領域を効率よく利用することが可能なデータ記録装置を提供することができる。以下、その効果について説明する。
(3) Effect The data recording apparatus according to the present embodiment is configured as described above. According to this data recording apparatus, it is possible to provide a data recording apparatus that can efficiently use the storage area. Hereinafter, the effect will be described.

先に説明したように、データ記録装置1では、第1記憶領域11に書き込まれたN個の測定データ(第1ブロックのデータD1)と、その後に取得されたN個の測定データ(第2ブロックのデータD2)とに基づいて、第1ブロックのデータD1の要否を判定する。すなわち、このデータ記録装置では、N個の測定データ(第1ブロックのデータD1)を保存するか否かを、その後に取得された測定データ(第2ブロックのデータD2)を利用して判定する。すなわち、このデータ記録装置によると、N個の測定データの保存の要否が、当該N個の測定データが取得されてから(記憶部に書き込まれてから)所定の時間が経過した後に判定され、かつ、当該N個の測定データは、保存の要否が判定されるまで保持される。そのため、イベントの発生を示す測定データが取得された場合に、当該イベント発生前のデータを自動的に保存することが可能になる。   As described above, in the data recording apparatus 1, N pieces of measurement data (first block data D1) written in the first storage area 11 and N pieces of measurement data (second data) acquired thereafter are stored. The necessity of the data D1 of the first block is determined based on the block data D2). That is, in this data recording apparatus, it is determined using the measurement data (second block data D2) acquired thereafter whether or not N pieces of measurement data (first block data D1) are to be stored. . That is, according to this data recording apparatus, whether or not N pieces of measurement data need to be stored is determined after a predetermined time has elapsed after the N pieces of measurement data have been acquired (written to the storage unit). The N pieces of measurement data are held until it is determined whether or not storage is necessary. Therefore, when measurement data indicating the occurrence of an event is acquired, data before the occurrence of the event can be automatically saved.

例えば、第2ブロックのデータD2がイベントの発生を示すデータ(所定の範囲外の値のデータ)を含んでいる場合、当該第2ブロックのデータD2と、その直前に取得されたN個の測定データ(第1ブロックの測定データD1)とを保存することで、第2ブロックのデータD2の先頭から末尾までのいずれの位置にイベント発生を示すデータが配置されている場合でも、イベント発生前の少なくともN個のデータを自動的に保存することができる。   For example, when the data D2 of the second block includes data indicating the occurrence of an event (data having a value outside a predetermined range), the data D2 of the second block and N measurements acquired immediately before the data D2 By storing the data (measurement data D1 of the first block), even if data indicating event occurrence is arranged at any position from the beginning to the end of the data D2 of the second block, At least N data can be automatically saved.

また、データ記録装置1では、第1記憶領域11にN個の測定データを書き込んだ後に、第2記憶領域12にN個の測定データを書き込む。そして、第1記憶領域11に書き込まれたN個の測定データ(第1ブロックのデータD1)の保存の要否を判定した後に、第1記憶領域11の書き込みアドレスを指定する。すなわち、データ記録装置1によると、第1記憶領域11に新たなデータを書き込む前に、第1ブロックのデータD1(第1記憶領域11に書き込まれたデータのうち最も新しく取得されたN個のデータ)の要否を判定することができる。   In the data recording apparatus 1, after N pieces of measurement data are written in the first storage area 11, N pieces of measurement data are written in the second storage area 12. Then, after determining whether it is necessary to save the N pieces of measurement data (first block data D1) written in the first storage area 11, the write address of the first storage area 11 is designated. That is, according to the data recording apparatus 1, before writing new data to the first storage area 11, the data D1 of the first block (N pieces of data acquired the most recently among the data written to the first storage area 11). Data) can be determined.

そして、当該N個の測定データの要否に基づいて、第1ブロックのデータD1を上書き(上書き消去)するか、上書きせずに保存するかを決定する。具体的には、新たなデータの書き込みアドレスとして、第1ブロックのデータD1が書き込まれたアドレスの後のアドレスを指定すれば、第1ブロックのデータD1を保存することができる。逆に、新たなデータの書き込みアドレスとして、第1ブロックのデータD1が書き込まれた先頭のアドレスを指定すれば、第1ブロックのデータD1が上書き消去される。そのため、第1ブロックのデータD1の要否を判定しながら、第1記憶領域11のアドレスを上位から隙間なく利用することが可能なデータ記録装置を提供することができる。   Then, based on whether or not the N pieces of measurement data are necessary, it is determined whether the data D1 of the first block is to be overwritten (overwritten and erased) or stored without being overwritten. Specifically, if the address after the address where the first block data D1 is written is designated as the new data write address, the first block data D1 can be stored. On the contrary, if the first address where the data D1 of the first block is written is designated as the write address of the new data, the data D1 of the first block is overwritten and erased. Therefore, it is possible to provide a data recording apparatus that can use the address of the first storage area 11 from the upper level without any gap while determining whether or not the data D1 of the first block is necessary.

また、このデータ記録装置では、第1記憶領域又は第2記憶領域に書き込まれたN個のデータ(第1ブロックのデータD1又は第2ブロックのデータD2)が保存を必要としないデータである場合、書き込みアドレス指定部は、第1ブロックのデータD1の先頭データ及び第2ブロックのデータD2の先頭データを専用記憶領域に保存するようにしてもよい。これによると、イベントの発生の有無にかかわらず、先頭データ(測定データの取得間隔よりも長い所定の間隔で取得されたデータ)が専用記憶領域に保存されるため、長期的なデータの変動を確認することが可能になる。ここで、先頭データは測定データの取得間隔よりも広い時間間隔(N×Tint間隔)で取得されるデータであり、これを保存したとしても、保存されるデータの容量が大きく増加することがない。そのため、容量の大きなメモリを利用することなく、測定データを長期的に記録することが可能になる。なお、ここで言う先頭データとは、1つのデータであってもよいが、複数のデータであってもよい。さらに、専用記憶領域13に保存するデータは先頭データに限らず、第1ブロックのデータD1及び第2ブロックのデータD2にそれぞれ含まれる任意の1つ又は複数のデータであってもよい。   Further, in this data recording apparatus, when the N pieces of data (first block data D1 or second block data D2) written in the first storage area or the second storage area are data that do not need to be saved The write address designating unit may store the head data of the first block data D1 and the head data of the second block data D2 in the dedicated storage area. According to this, regardless of the occurrence of an event, the top data (data acquired at a predetermined interval longer than the measurement data acquisition interval) is stored in the dedicated storage area, so long-term data fluctuations are prevented. It becomes possible to confirm. Here, the head data is data acquired at a time interval (N × Tint interval) wider than the measurement data acquisition interval, and even if the data is stored, the capacity of the stored data does not increase greatly. . Therefore, measurement data can be recorded for a long time without using a memory with a large capacity. Note that the head data referred to here may be one piece of data or a plurality of pieces of data. Furthermore, the data stored in the dedicated storage area 13 is not limited to the top data, and may be any one or a plurality of data respectively included in the first block data D1 and the second block data D2.

ここで、イベント発生直前の測定データを保存するためには、イベントが発生する前のブロックの測定データを暫定保存することが必須である。イベントの発生により、例えば、データ記録装置1に対する電力供給が停止する場合もあるため、測定データは不揮発性メモリに保存することが重要である。さらに、不揮発性メモリの記憶容量を増大させないためには、イベント発生直前の測定データを暫定保存しておき、イベントが発生しなかった場合には、当該測定データを上書き消去することが望ましい。すなわち、不揮発性メモリは、頻繁に書き換え可能であり、書き換え回数の制限がない(実質的に書き換え回数の制限を考慮する必要がないほど書き換え可能回数の上限が大きい)ことが重要である。例えば、不揮発性メモリであるEEPROMやフラッシュメモリは書き換え回数に制限があり、頻繁にデータ書き換えが発生する用途にデータ記録装置1を使用する場合には、必ずしも最適なメモリではない。このような場合には、実質的に書き換え回数の制限を考慮する必要がないFeRAMによって不揮発性メモリを構成するのが好適である。   Here, in order to save the measurement data immediately before the event occurrence, it is essential to temporarily save the measurement data of the block before the event occurs. Due to the occurrence of an event, for example, the power supply to the data recording device 1 may stop, so it is important to save the measurement data in a nonvolatile memory. Furthermore, in order not to increase the storage capacity of the non-volatile memory, it is desirable to temporarily store the measurement data immediately before the occurrence of the event, and overwrite and delete the measurement data when the event does not occur. That is, it is important that the nonvolatile memory can be frequently rewritten and has no limit on the number of rewrites (the upper limit of the number of rewrites is so large that it is substantially unnecessary to consider the limit on the number of rewrites). For example, an EEPROM or flash memory which is a nonvolatile memory has a limited number of rewrites, and is not necessarily an optimal memory when the data recording apparatus 1 is used for an application in which data rewrite occurs frequently. In such a case, it is preferable to configure the non-volatile memory with FeRAM that does not need to substantially consider the limit of the number of rewrites.

また、データ記録装置1を、例えば、メモリ保持や送信のためのバッテリーを持つアクティブ型のRFタグに使用する場合等は、不揮発性メモリはデータ書き換え時の消費電力が小さいことが重要である。FeRAMはデータ書き換え時の消費電力が極めて小さく、このような場合にも、FeRAMによって不揮発性メモリを構成するのが好適である。   In addition, when the data recording device 1 is used, for example, in an active RF tag having a battery for memory retention or transmission, it is important that the nonvolatile memory consumes less power when data is rewritten. FeRAM consumes very little power when data is rewritten. In such a case, it is preferable to form a nonvolatile memory using FeRAM.

すなわち、データ記録装置1の不揮発性メモリをFeRAMによって構成することにより、高性能かつ製品寿命の長いデータ記録装置を提供することができる。   That is, by configuring the nonvolatile memory of the data recording apparatus 1 with FeRAM, a data recording apparatus having high performance and a long product life can be provided.

また、従来のデータ記録装置は大量の測定データを保存して送信し、ホスト側で受けとった測定データから必要なデータを選択してデータ解析を行っていたが、データ記録装置1は内部で測定データを取捨選択して必要なデータのみを自動的に保存して送信することができる。従って、データ記録装置1は、測定データを保存するためのメモリ容量を大幅に削減することができる。また、データ記録装置1は、送信するデータ量を削減することができるので、データ送信時の消費電力を大幅に削減することができる。従って、データ記録装置1を使用すれば、例えば、小型化および低消費電力化の要求を満たすアクティブ型のRFタグを実現することができる。   In addition, the conventional data recording apparatus stores and transmits a large amount of measurement data, selects necessary data from the measurement data received on the host side, and performs data analysis. However, the data recording apparatus 1 performs measurement internally. Data can be selected and only necessary data can be automatically saved and transmitted. Therefore, the data recording device 1 can greatly reduce the memory capacity for storing the measurement data. Further, since the data recording apparatus 1 can reduce the amount of data to be transmitted, the power consumption during data transmission can be greatly reduced. Therefore, if the data recording apparatus 1 is used, for example, an active type RF tag that satisfies the demands for miniaturization and low power consumption can be realized.

また、不揮発性メモリの複数の記憶領域には、比較的短い時間間隔で取得されたイベント発生前後のデータのみが保存されているため、データ記録装置1はイベントレコーダとして使用することができる。すなわち、当該複数の記憶領域に保存されたデータを解析することによって、イベント発生の有無やイベント発生時の詳細な状況を判断することができる。   In addition, since only the data before and after the event occurrence acquired at a relatively short time interval is stored in the plurality of storage areas of the nonvolatile memory, the data recording apparatus 1 can be used as an event recorder. In other words, by analyzing the data stored in the plurality of storage areas, it is possible to determine the presence / absence of an event and the detailed situation when the event occurs.

また、不揮発性メモリの専用記憶領域には、比較的長い時間間隔で定期的に取得されたデータが保存されているため、データ記録装置1は長期的なデータ変動の状況を解析するためのデータ記録装置として使用することができる。   In addition, since data acquired periodically at a relatively long time interval is stored in the dedicated storage area of the non-volatile memory, the data recording apparatus 1 uses data for analyzing the long-term data fluctuation situation. It can be used as a recording device.

さらに、データ記録装置1が、複数の記憶領域と専用記憶領域を有する場合には、複数の記憶領域に保存されたイベント発生前後に取得されたデータと専用記憶領域に保存された定期的に取得されたデータとを組み合わせて、より詳細な解析を行うことが可能である。データ記録装置1においては、これらの記憶領域には各ブロックに対応づけて順序特定データが記録されるので、保存されたデータを取得した順序を容易に特定することができる。   Further, when the data recording device 1 has a plurality of storage areas and dedicated storage areas, the data acquired before and after the occurrence of the event stored in the plurality of storage areas and the periodic acquisition stored in the dedicated storage area It is possible to perform a more detailed analysis in combination with the obtained data. In the data recording apparatus 1, since the order specifying data is recorded in these storage areas in association with the respective blocks, the order in which the stored data is acquired can be easily specified.

なお、本発明は、上述の実施の形態に限定されるものではなく、種々の変形が可能である。   In addition, this invention is not limited to the above-mentioned embodiment, A various deformation | transformation is possible.

例えば、図8のフローチャートに従えば、第1記憶領域11又は第2記憶領域12に保存されるブロックの先頭の測定データは、一般データとして専用記憶領域にも重複して保存されるが、重複保存しないようにしてもよい。例えば、ステップS72において、n=2の時は第1記憶領域11にデータを保存しないように変形してもよい。   For example, according to the flowchart of FIG. 8, the measurement data at the head of the block stored in the first storage area 11 or the second storage area 12 is also stored in the dedicated storage area as general data. It may not be saved. For example, in step S72, when n = 2, the first storage area 11 may not be saved.

また、図8のフローチャートでは、専用記憶領域13には、最後に書き込まれた一般データを含むブロックに割り当てられた順序特定データ(区切りフラグ)も残るようにしているが、これに限られない。例えば、ステップS86におけるZZ=ZZ+2をZZ=ZZ+1に変更することによって、次の一般データの書き込みアドレスが、ステップS78において順序特定データ(区切りフラグ)を書き込んだアドレスに設定されるようにしてもよい。すなわち、次の一般データの書き込みにより専用記憶領域13に書き込まれた順序特定データ(区切りフラグ)は上書きされて消去される。従って、順序特定データ(区切りフラグ)により専用記憶領域13の必要な記憶容量が増加することはない。なお、このような処理により、専用記憶領域13には、最後に書き込まれた一般データを含むブロックに割り当てられた順序特定データ(区切りフラグ)しか残らない。しかし、1ブロック毎に1個のデータを一般データとして規則的に保存しているので、最後の順序特定データ(区切りフラグ)だけ残っていれば、専用記憶領域13に保存された各一般データが含まれる各ブロックと、第1記憶領域11又は第2記憶領域12に保存された各N個のデータが含まれる各ブロックを取得した順序を特定することができる。   Further, in the flowchart of FIG. 8, the order specifying data (separation flag) assigned to the block including the last written general data is left in the dedicated storage area 13. However, the present invention is not limited to this. For example, by changing ZZ = ZZ + 2 in step S86 to ZZ = ZZ + 1, the write address of the next general data is set to the address where the order specifying data (separation flag) is written in step S78. It may be. That is, the order specifying data (separation flag) written in the dedicated storage area 13 by the next general data write is overwritten and erased. Therefore, the necessary storage capacity of the dedicated storage area 13 is not increased by the order specifying data (separation flag). As a result of such processing, only the order specifying data (separation flag) assigned to the block including the last written general data remains in the dedicated storage area 13. However, since one data is regularly stored as general data for each block, if only the last order specifying data (separation flag) remains, each general data stored in the dedicated storage area 13 is stored. It is possible to specify the order in which each block included and each block including each N pieces of data stored in the first storage area 11 or the second storage area 12 are acquired.

また、図8のフローチャートでは、イベントが発生したブロック及びその前後のブロックのみを保存しているが、1ブロックのデータ数を減らして、イベントが発生したブロック、イベント発生前の複数のブロック及び(又は)イベント発生後の複数のブロックを保存するようにしてもよい。1ブロックのデータ数を減らしてイベント発生前後の複数のブロックを保存するようにすれば、1ブロックのデータ数を増やしてイベント発生前後の各1つのブロックを保存する場合と比較して、不要なデータを保存する必要がなくなりメモリの効率的な利用が可能となる。例えば、イベント発生前後のN個の測定データを確実に保存するために、1ブロックをN個の測定データで構成すると、イベントが発生したブロック及びイベント発生前後の各1ブロック、すなわち3ブロックに渡る3N個のデータを保存しなければならない。一方、1ブロックをN/2個の測定データで構成すると、イベントが発生したブロック及びイベント発生前後の2ブロック、すなわち5ブロックに渡る2.5N個のデータを保存すればよい。   In the flowchart of FIG. 8, only the block in which the event has occurred and the blocks before and after the event are stored. However, the number of data in one block is reduced, the block in which the event has occurred, Alternatively, a plurality of blocks after the event occurrence may be stored. If the number of data in one block is reduced and multiple blocks before and after the event occur are saved, this is unnecessary compared to the case where the number of data in one block is increased and each block before and after the event occurs is saved. There is no need to store data, and the memory can be used efficiently. For example, in order to securely store N measurement data before and after the occurrence of an event, if one block is composed of N measurement data, the block includes the block where the event has occurred and one block before and after the occurrence of the event, that is, three blocks. 3N pieces of data must be stored. On the other hand, if one block is composed of N / 2 pieces of measurement data, 2.5N data over a block where an event has occurred and two blocks before and after the event, that is, five blocks may be stored.

本発明は、実施の形態で説明した構成と実質的に同一の構成(例えば、機能、方法及び結果が同一の構成、あるいは目的及び効果が同一の構成)を含む。また、本発明は、実施の形態で説明した構成の本質的でない部分を置き換えた構成を含む。また、本発明は、実施の形態で説明した構成と同一の作用効果を奏する構成又は同一の目的を達成することができる構成を含む。また、本発明は、実施の形態で説明した構成に公知技術を付加した構成を含む。   The present invention includes configurations that are substantially the same as the configurations described in the embodiments (for example, configurations that have the same functions, methods, and results, or configurations that have the same objects and effects). In addition, the invention includes a configuration in which a non-essential part of the configuration described in the embodiment is replaced. In addition, the present invention includes a configuration that exhibits the same operational effects as the configuration described in the embodiment or a configuration that can achieve the same object. Further, the invention includes a configuration in which a known technique is added to the configuration described in the embodiment.

データ記録装置の構成を説明するための図。The figure for demonstrating the structure of a data recording device. データ記録装置のブロック図。1 is a block diagram of a data recording device. データ記録装置の動作を説明するためのフローチャート図。The flowchart for demonstrating operation | movement of a data recording device. データ記録装置の動作を説明するためのフローチャート図。The flowchart for demonstrating operation | movement of a data recording device. 不揮発性メモリにデータが書き込まれる様子を示す模式図。The schematic diagram which shows a mode that data are written in a non-volatile memory. データ記録装置の動作を説明するためのフローチャート図。The flowchart for demonstrating operation | movement of a data recording device. データ記録装置の動作を説明するためのフローチャート図。The flowchart for demonstrating operation | movement of a data recording device. データ記録装置の動作を説明するためのフローチャート図。The flowchart for demonstrating operation | movement of a data recording device.

符号の説明Explanation of symbols

1…データ記録装置、 10…不揮発性メモリ、 11…第1記憶領域、 12…第2記憶領域、 20…書き込み制御部、 25…書き込みアドレス指定部、 30…順序特定データ生成部、 35…書き込み停止処理部、 100…CPU、 110…FeRAM、 120…ROM、 130…RAM、 D0…第0ブロックのデータ、 D1…第1ブロックのデータ、 D2…第2ブロックのデータ、 D3…第3ブロックのデータ   DESCRIPTION OF SYMBOLS 1 ... Data recording device, 10 ... Non-volatile memory, 11 ... 1st storage area, 12 ... 2nd storage area, 20 ... Write control part, 25 ... Write address designation part, 30 ... Order specification data generation part, 35 ... Write Stop processing unit, 100 ... CPU, 110 ... FeRAM, 120 ... ROM, 130 ... RAM, D0 ... 0th block data, D1 ... 1st block data, D2 ... 2nd block data, D3 ... 3rd block data

Claims (11)

時系列に受けとった複数の測定データをメモリに書き込む処理を行うデータ記録装置であって、
前記測定データが書き込まれる複数の記憶領域を含む不揮発性メモリと、
所定の数の測定データを1ブロックとして、前記不揮発性メモリの所与の記憶領域に1ブロック分の各測定データを順次書き込み、その後、他の記憶領域に次の1ブロック分の各測定データを順次書き込む処理を繰り返し行う書き込み制御部と、を含み、
前記書き込み制御部は、
各ブロックの測定データが書き込まれる前記不揮発性メモリの記憶領域に、各ブロックに割り当てられ各ブロックが取得された順序を特定するための順序特定データを、各ブロックと対応づけて書き込み、
前記不揮発性メモリの所与の記憶領域に最後に書き込まれた1ブロック、及び、当該1ブロックの後に取得された次の1ブロックが、所定の範囲外の値の測定データを含んでいるか否かを判断し、少なくとも一方が含んでいる場合には、前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データが上書きされないように、前記所与の記憶領域に新しい1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを書き込み、いずれもが含んでいない場合には、前記測定データ及び前記順序特定データが上書きされるように、前記所与の記憶領域に新しい1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを書き込むことを特徴とするデータ記録装置。
A data recording device that performs processing of writing a plurality of measurement data received in time series into a memory,
A nonvolatile memory including a plurality of storage areas in which the measurement data is written;
A predetermined number of measurement data as one block, each measurement data for one block is sequentially written in a given storage area of the nonvolatile memory, and then each measurement data for the next one block is stored in another storage area. A write control unit that repeatedly performs a sequential writing process,
The write control unit
In the storage area of the nonvolatile memory in which the measurement data of each block is written, the order specifying data for specifying the order in which each block is allocated and acquired is written in association with each block,
Whether one block last written in a given storage area of the non-volatile memory and the next one block acquired after the one block include measurement data having a value outside a predetermined range. If at least one of them contains, the measurement data for one block last written in the given storage area and the order specifying data assigned to the one block are not overwritten. , Writing each measurement data for one new block and the order specifying data assigned to the one block to the given storage area, and if none of them includes the measurement data and the order specifying data, In order to be overwritten, each measurement data for one new block and the sequence specifying data assigned to the one block are written in the given storage area. Data recording apparatus characterized by writing.
請求項1において、
前記書き込み制御部は、
前記所与の記憶領域に最後に書き込まれた1ブロックの前に取得された1ブロックが、前記所定の範囲外の値の測定データを含むか否か判断し、含む場合には前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データが上書きされないように、前記所与の記憶領域に新しい1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを書き込むことを特徴とするデータ記録装置。
In claim 1,
The write control unit
It is determined whether or not one block acquired before the last block written in the given storage area includes measurement data having a value outside the predetermined range. Each measurement data of one block newly written in the given storage area and each of the measurement data of one block written in the storage area and the order specifying data assigned to the block are not overwritten. A data recording apparatus, wherein the order specifying data allocated to one block is written.
請求項2において、
前記不揮発性メモリは、
3n個(nは1以上の整数)以上の前記記憶領域を含み、
前記書き込み制御部は、
前記不揮発性メモリの第k(kは1以上3n−1以下の整数)の記憶領域に1ブロック分の各測定データを順次書き込み、その後、第k+1の記憶領域に次の1ブロック分の各測定データを順次書き込み、第3nの記憶領域に1ブロック分の各測定データを順次書き込んだ後は、第1の記憶領域に次の1ブロック分の各測定データを順次書き込む処理を繰り返し行うことを特徴とするデータ記録装置。
In claim 2,
The nonvolatile memory is
3n (n is an integer of 1 or more) or more of the storage area,
The write control unit
Each block of measurement data is sequentially written in the k-th (k is an integer between 1 and 3n-1) storage area of the non-volatile memory, and then the next block is measured in the k + 1 storage area. After sequentially writing data and sequentially writing each measurement data for one block in the 3n storage area, the process of sequentially writing each measurement data for the next block in the first storage area is repeatedly performed. A data recording device.
請求項1乃至3のいずれかにおいて、
前記書き込み制御部は、
前記所定の範囲を予め所定の値に設定することを特徴とするデータ記録装置。
In any one of Claims 1 thru | or 3,
The write control unit
A data recording apparatus, wherein the predetermined range is set to a predetermined value in advance.
請求項1乃至3のいずれかにおいて、
前記書き込み制御部は、
測定データに基づいて、前記所定の範囲を設定することを特徴とするデータ記録装置。
In any one of Claims 1 thru | or 3,
The write control unit
A data recording apparatus characterized in that the predetermined range is set based on measurement data.
請求項1乃至5のいずれかにおいて、
前記書き込み制御部は、
前記測定データが所定の書き込み停止条件を満たしているか否かを判断し、前記所定の書き込み停止条件を満たしている場合に、前記不揮発性メモリへのデータの書き込みを停止させる制御を行う書き込み停止処理部を含むことを特徴とするデータ記録装置。
In any one of Claims 1 thru | or 5,
The write control unit
A write stop process for determining whether or not the measurement data satisfies a predetermined write stop condition and performing control to stop writing data to the nonvolatile memory when the predetermined write stop condition is satisfied A data recording apparatus comprising a section.
請求項1乃至6のいずれかにおいて、
前記記憶領域毎の未使用領域の記憶容量が所定の値を下回ったことを検出する検出部をさらに含むことを特徴とするデータ記録装置。
In any one of Claims 1 thru | or 6.
The data recording apparatus according to claim 1, further comprising a detection unit that detects that the storage capacity of the unused area for each storage area has fallen below a predetermined value.
請求項1乃至7のいずれかにおいて、
前記書き込み制御部は、
前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データが、所定の取得条件を満たすか否か判断し、満たす場合には前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データが上書きされないように、前記所与の記憶領域に新しい1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを書き込むことを特徴とするデータ記録装置。
In any one of Claims 1 thru | or 7,
The write control unit
It is determined whether or not each measurement data for one block last written in the given storage area satisfies a predetermined acquisition condition, and when it is satisfied, 1 last written in the given storage area Each measurement data for one block and the order specification assigned to the one block are stored in the given storage area so that each measurement data for the block and the order specification data assigned to the one block are not overwritten. A data recording apparatus for writing data.
請求項1乃至8のいずれかにおいて、
前記書き込み制御部は、
書き込み先が他の記憶領域から所与の記憶領域に切り替えられて、前記所与の記憶領域に新しい1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを書き込む場合に、前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データに対応する領域の最上位のアドレスを指定することで、前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを上書きするように制御し、
前記所与の記憶領域に最後に書き込まれた1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データに対応する領域の最下位のアドレスよりも下位のアドレスを指定することで、前記1ブロック分の各測定データ及び当該1ブロックに割り当てられた前記順序特定データを上書きしないように制御することを特徴とするデータ記録装置。
In any one of Claims 1 thru | or 8.
The write control unit
When the write destination is switched from the other storage area to the given storage area, and each measurement data for one new block and the order specifying data assigned to the one block are written to the given storage area, By designating the highest address of the area corresponding to each measurement data for one block last written in the given storage area and the order specifying data assigned to the one block, the given data Control to overwrite each measurement data for one block last written in the storage area and the order specifying data assigned to the one block,
By designating a lower address than the lowest address of the area corresponding to each measurement data for one block last written in the given storage area and the order specifying data assigned to the one block A data recording apparatus, wherein control is performed so as not to overwrite each measurement data for one block and the order specifying data assigned to the one block.
請求項1乃至9のいずれかにおいて、
前記不揮発性メモリは、
前記複数の記憶領域に含まれない所定の専用記憶領域をさらに有し、
前記書き込み制御部は、
前記不揮発性メモリの前記専用記憶領域に、前記不揮発性メモリの所与の記憶領域に順次書き込まれた各ブロックの少なくとも1つの各測定データを順次書き込むことを特徴とするデータ記録装置。
In any one of Claims 1 thru | or 9,
The nonvolatile memory is
A predetermined dedicated storage area not included in the plurality of storage areas;
The write control unit
A data recording apparatus, wherein at least one measurement data of each block sequentially written in a given storage area of the nonvolatile memory is sequentially written in the dedicated storage area of the nonvolatile memory.
請求項1乃至10のいずれかにおいて、
前記不揮発性メモリは、強誘電体メモリであることを特徴とするデータ記録装置。
In any one of Claims 1 thru | or 10.
The data recording apparatus according to claim 1, wherein the nonvolatile memory is a ferroelectric memory.
JP2007121698A 2007-05-02 2007-05-02 Data recording device Withdrawn JP2008276647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007121698A JP2008276647A (en) 2007-05-02 2007-05-02 Data recording device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007121698A JP2008276647A (en) 2007-05-02 2007-05-02 Data recording device

Publications (1)

Publication Number Publication Date
JP2008276647A true JP2008276647A (en) 2008-11-13

Family

ID=40054501

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007121698A Withdrawn JP2008276647A (en) 2007-05-02 2007-05-02 Data recording device

Country Status (1)

Country Link
JP (1) JP2008276647A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015118623A1 (en) * 2014-02-05 2015-08-13 株式会社日立製作所 Information processing device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015118623A1 (en) * 2014-02-05 2015-08-13 株式会社日立製作所 Information processing device
JP6100927B2 (en) * 2014-02-05 2017-03-22 株式会社日立製作所 Information processing device

Similar Documents

Publication Publication Date Title
KR101079502B1 (en) Memory system
US9063844B2 (en) Non-volatile memory management system with time measure mechanism and method of operation thereof
US20110145483A1 (en) Semiconductor memory device and method of processing data for erase operation of semiconductor memory device
TWI436369B (en) Methods for measuring usable lifespan and replacing an in-system programming code of a memory device, and data storage system using the same
JP2007193449A (en) Information recorder, and control method therefor
JP5088479B2 (en) Data recording device
KR20120062075A (en) Controller for memory and storage system includint the same, method for measuring life span of memory
JP2020086739A (en) Memory controller and flash memory system including the same
JP2009282923A (en) Semiconductor storage device and nonvolatile memory
JP4431898B2 (en) Data recording device
JPWO2008139689A1 (en) Memory controller, semiconductor recording device, and rewrite count notification method
US10650879B2 (en) Device and method for controlling refresh cycles of non-volatile memories
JP5447617B2 (en) Flash memory controller, flash memory system, and flash memory control method
JP2008276647A (en) Data recording device
JP2005267761A (en) Method for monitoring degradation of flash memory
JP2013246533A (en) Electronic apparatus, memory management system, and memory management method
JP6636930B2 (en) Microcomputer with built-in flash memory, method of writing data to flash memory built in microcontroller, and program for writing data to flash memory
JP6423282B2 (en) Memory control device and memory control method
JP2008116351A (en) Data recorder
JP5535113B2 (en) Memory system
JP2008090933A (en) Semiconductor memory device, data recording device, and method for controlling the semiconductor memory device
KR100700484B1 (en) Data writing management system for nonvolatile memory and the method thereof
KR101368834B1 (en) Flash memory controller dividing endurance into stages
JP5666273B2 (en) Data storage device and data storage method
JP2005250619A (en) Nonvolatile storage device and its rewriting method

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20100706