JP2009230283A - Bar code scanner and method for controlling the same - Google Patents

Bar code scanner and method for controlling the same Download PDF

Info

Publication number
JP2009230283A
JP2009230283A JP2008072519A JP2008072519A JP2009230283A JP 2009230283 A JP2009230283 A JP 2009230283A JP 2008072519 A JP2008072519 A JP 2008072519A JP 2008072519 A JP2008072519 A JP 2008072519A JP 2009230283 A JP2009230283 A JP 2009230283A
Authority
JP
Japan
Prior art keywords
width information
barcode
bar code
memory
read
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.)
Pending
Application number
JP2008072519A
Other languages
Japanese (ja)
Inventor
Katsuyuki Suzuki
克行 鈴木
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.)
Toshiba TEC Corp
Original Assignee
Toshiba TEC 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 Toshiba TEC Corp filed Critical Toshiba TEC Corp
Priority to JP2008072519A priority Critical patent/JP2009230283A/en
Publication of JP2009230283A publication Critical patent/JP2009230283A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a bar code scanner surely preventing double reading of a bar code even when an unauthorized interrupt occurs in a CPU (Central Processing Unit) by noise such as static electricity, and to provide a method for controlling the bar code scanner. <P>SOLUTION: A photosensor receives reflected light from the bar code, binarizing an electric signal to be output, and thereafter converts it into width information of bars and spaces constituting the bar code. Next, the width information is stored in a memory, and an interrupt signal generation part outputs an interrupt signal according to that the width information of all the bars and spaces constituting the bar code is completely stored. When the CPU receives the interrupt signal, the CPU sequentially reads the width information of the bars and the spaces from the memory, and erases the width information from the memory. After reading all pieces of the width information, the CPU decodes the width information into bar code information. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

この発明は、バーコードの読み取りに使用されるバーコードスキャナおよびその制御方法に関する。   The present invention relates to a barcode scanner used for reading a barcode and a control method thereof.

従来、流通業などにおける物品の管理には、複数種の幅のバーとスペースとを組み合わせてなるバーコードが用いられている。バーコードは、専用のバーコードスキャナにより読み取られて上位機器にバーコード情報が入力され、情報処理される。一般的に、バーコードスキャナは、バーコードに赤外線などを照射して得られる反射光をフォトセンサにより認識してバーおよびスペースについての2値化されたデータを生成し、このデータを内部に備えたデコード用のFPGA(Field Programmable Gate Array)またはASIC(Application Specific Integrated Circuit)によりバーおよびスペースの幅情報に変換した後、上位機器で認識可能なバーコード情報にデコードしている。   Conventionally, a bar code formed by combining a plurality of types of bars and spaces is used for managing articles in the distribution industry. The bar code is read by a dedicated bar code scanner, and bar code information is input to the host device for information processing. In general, a bar code scanner recognizes reflected light obtained by irradiating a bar code with infrared rays or the like by a photo sensor, generates binarized data about bars and spaces, and stores this data therein. After being converted into bar and space width information by a decoding FPGA (Field Programmable Gate Array) or ASIC (Application Specific Integrated Circuit), it is decoded into bar code information that can be recognized by a host device.

さて、バーコードをバーコードスキャナで読み取る際、長時間バーコードをバーコードスキャナから発せられる赤外線にかざすと、一旦スキャナが認識したバーコードを再度読み取る二重読みが発生することがある。たとえば小売店などでは、商品に付されたバーコードをバーコードスキャナで読み取ることでその商品の商品データを商品販売処理装置に入力し販売処理しているため、このような二重読みが発生すると、同一商品に対して二重に課金されるなどの不都合が生じる。   When a barcode is read by a barcode scanner, if the barcode is held over an infrared ray emitted from the barcode scanner for a long time, double reading may be performed in which the barcode once recognized by the scanner is read again. For example, in a retail store or the like, a barcode attached to a product is read by a barcode scanner, and the product data of the product is input to the product sales processing device for sale processing. Inconveniences such as double charges for the same product occur.

上記二重読みの問題に対処するため、たとえば特許文献1に記載のバーコードデコーダの二重読み防止装置が提案されている。この二重読み防止装置は、バーコードから読み取ったデータをデータバッファに記憶し、新たに読み取ったデータとの一致/不一致を判断して、不一致であるとき若しくは予め設定した基準回数をスキャン回数が超えたときに新たに読み取ったデータを出力するように構成されている。
特開平4−297969号公報
In order to deal with the problem of double reading, for example, a double reading prevention device for a barcode decoder described in Patent Document 1 has been proposed. This double reading prevention device stores the data read from the bar code in the data buffer, judges the coincidence / non-coincidence with the newly read data, and when the number of scans does not match or sets a preset reference number When it exceeds, it is configured to output newly read data.
JP-A-4-297969

ところで、上記デコーダ用のFPGAまたはASICでは、2値化されたデータから得られる幅情報を逐次的にメモリに記憶し、一つのバーコードを構成する全てのバーおよびスペースから幅情報を取得し終えた際にCPU(Central Processing Unit)へ所定の割込信号を発する。そして、この割込信号を検知したCPUが上記メモリから幅情報を取得して上位機器で認識可能なバーコード情報にデコードしている。   By the way, in the decoder FPGA or ASIC, the width information obtained from the binarized data is sequentially stored in the memory, and the width information has been obtained from all the bars and spaces constituting one barcode. A predetermined interrupt signal is issued to a CPU (Central Processing Unit). The CPU that detects this interrupt signal acquires the width information from the memory and decodes it into bar code information that can be recognized by the host device.

しかしながら、CPUは、上記割込信号ではなく静電気が基盤上の回路パターン近傍で発生した際に生じるノイズなどの不正割込みによってもメモリから幅情報を取得してしまう。このようなCPUの誤読取が発生すると、メモリから既に読み取った幅情報を再度読み取るために二重読みが発生することとなる。また、上記特許文献1に記載の二重読み防止機能などでは、かかるCPUへの不正割込による二重読みに対処することができない。   However, the CPU obtains the width information from the memory not by the interrupt signal but also by an illegal interrupt such as noise generated when static electricity is generated near the circuit pattern on the board. When such erroneous CPU reading occurs, double reading occurs in order to read again the width information that has already been read from the memory. Further, the double reading prevention function described in Patent Document 1 cannot cope with double reading due to an illegal interrupt to the CPU.

本発明は、上記のような事情に基づいてなされたものであり、その目的は、静電気などのノイズによってCPUに不正な割り込みが生じた場合においても確実にバーコードの二重読みを防止することができるバーコードスキャナおよびその制御方法を提供することである。   The present invention has been made based on the above situation, and its purpose is to reliably prevent double reading of a barcode even when an illegal interrupt occurs in the CPU due to noise such as static electricity. It is to provide a barcode scanner and a control method thereof.

本発明に係るバーコードスキャナは、受光したバーコードからの反射光を電気信号に変換して出力する受光手段と、この受光手段が出力した前記電気信号を前記バーコードを構成するバーおよびスペースに対応する信号に2値化する2値化手段と、この2値化手段が2値化した前記電気信号をバーコードを構成する各バーおよびスペースの幅情報に変換して出力する幅情報変換手段と、この幅情報変換手段が出力した前記幅情報を記憶する記憶手段と、この記憶手段に前記バーコードを構成する全てのバーおよびスペースの前記幅情報を記憶し終えたことに応じて割込信号を出力する割込み手段と、この割込み手段が出力した前記割込信号を受信したとき、前記記憶手段から前記幅情報を読み出す読出制御手段と、この読出制御手段が読み出した前記幅情報を前記記憶手段から消去する消去制御手段と、前記読出制御手段が読み出した前記幅情報をバーコード情報にデコードするデコード手段とを備えてなることを特徴としている。   The bar code scanner according to the present invention includes a light receiving unit that converts reflected light from a received bar code into an electric signal and outputs the electric signal, and the electric signal output from the light receiving unit is applied to a bar and a space constituting the bar code. Binarization means for binarizing into corresponding signals, and width information conversion means for converting the electric signals binarized by the binarization means into width information of each bar and space constituting the barcode and outputting the information And storage means for storing the width information output by the width information converting means, and interrupting in response to completion of storing the width information of all bars and spaces constituting the barcode in the storage means. An interrupt means for outputting a signal; a read control means for reading the width information from the storage means when the interrupt signal output by the interrupt means is received; and the read control means And erasing control means for erasing the width information from said storage means and is characterized by comprising a decoding means for decoding the width information said reading control means has read the bar code information.

かかる手段を講じた本発明によれば、静電気などのノイズによってCPUに不正な割り込みが生じた場合においても確実にバーコードの二重読みを防止することができるバーコードスキャナおよびその制御方法を提供することができる。   According to the present invention in which such a measure is taken, a barcode scanner capable of reliably preventing double reading of a barcode even when an illegal interruption occurs in the CPU due to noise such as static electricity, and a control method therefor are provided. can do.

以下、本発明を実施するための一実施の形態について、図面を参照しながら説明する。
図1は、本発明に係るバーコードスキャナ1の要部構成を示すブロック図である。バーコードスキャナ1は、制御主体であるCPU2、当該バーコードスキャナ1の動作に必要な制御プログラムからなるファームウェア3、光の明暗を検知してアナログ電気信号を出力するフォトセンサ4、アナログ信号をデジタル信号に変換するA/D変換回路5、所定の処理を実行するようにプログラムされたFPGA6およびPOS(Point Of Sales)端末などの外部機器8との接続に用いるUSB(登録商標)ポート7を備えている。
Hereinafter, an embodiment for carrying out the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing a main configuration of a barcode scanner 1 according to the present invention. The bar code scanner 1 includes a CPU 2 that is a control main body, firmware 3 that includes a control program necessary for the operation of the bar code scanner 1, a photo sensor 4 that detects the brightness of light and outputs an analog electric signal, and digitally converts the analog signal. An A / D conversion circuit 5 for converting signals, an FPGA 6 programmed to execute predetermined processing, and a USB (registered trademark) port 7 used for connection to an external device 8 such as a POS (Point Of Sales) terminal are provided. ing.

上記フォトセンサ4は、図示しない光源から照射されるレーザ光が読み取り対象となるバーコード上を走査した際の反射光を受光し、バーコードを構成するバーおよびスペースの色彩の違いにより生ずる反射光の明暗に応じたアナログ電気信号をA/D変換回路5に出力する(受光手段)。A/D変換回路5は、入力された電気信号をバーコードのバー部分に相当する“0”とスペース部分に相当する“1”とからなるデータに2値化してFPGA6に出力する(2値化手段)。上記FPGA6は、入力された2値データからバーコードを構成する各バーおよびスペースの16bitの幅情報を生成し、所定のタイミングで割込信号をCPU2に出力する。そして、CPU2は、この割込信号を受けたときにFPGA6から幅情報を取得してバーコードの規格に応じたデコード処理を進行する。このようにしてデコードされたバーコード情報は、USBポート7を介して接続された外部機器8に出力される。   The photosensor 4 receives reflected light when a laser beam emitted from a light source (not shown) scans a barcode to be read, and is reflected light caused by a color difference between bars and spaces constituting the barcode. An analog electric signal corresponding to the brightness of the signal is output to the A / D conversion circuit 5 (light receiving means). The A / D conversion circuit 5 binarizes the input electrical signal into data composed of “0” corresponding to the bar portion of the barcode and “1” corresponding to the space portion, and outputs the data to the FPGA 6 (binary). Means). The FPGA 6 generates 16-bit width information of each bar and space constituting the barcode from the input binary data, and outputs an interrupt signal to the CPU 2 at a predetermined timing. When the CPU 2 receives this interrupt signal, it acquires the width information from the FPGA 6 and proceeds with the decoding process according to the barcode standard. The barcode information decoded in this way is output to the external device 8 connected via the USB port 7.

図2は、FPGA6の要部構成を示すブロック図である。FPGA6は、2値データの入力を受けるビデオ信号入力部10、バーコードの読み取りを検出するバーコード検出部11、上記幅情報を記憶するメモリAおよびメモリB、これらメモリAおよびメモリBへの幅情報の書き込みおよび読み出しを制御するメモリコントロール部12、所定の情報を記憶するレジスタ13および割込信号を生成する割込信号生成部14を備えている。   FIG. 2 is a block diagram showing a main configuration of the FPGA 6. The FPGA 6 includes a video signal input unit 10 that receives binary data input, a barcode detection unit 11 that detects barcode reading, a memory A and a memory B that store the width information, and a width to these memories A and B. A memory control unit 12 that controls writing and reading of information, a register 13 that stores predetermined information, and an interrupt signal generation unit 14 that generates an interrupt signal are provided.

上記ビデオ信号入力部10は、上記2値データの“0”と“1”とのエッジを検出したときには、次にエッジが検出されるまでの時間を内蔵したタイマで測定し、測定したデータの“0”または“1”の種別と共に、測定した時間を16bit情報としてバーコード検出部11に出力する。すなわち、ビデオ信号入力部10は、A/D変換回路5が2値化した電気信号をバーコードを構成する各バーおよびスペースの幅情報に変換して出力する幅情報変換手段である。上記バーコード検出部11は、入力された16bit情報がバーコードのバーまたはスペースの幅情報であるか否かを判断し、幅情報であると判断されるときにはメモリコントロール部12にこの16bit情報を“0”または“1”の種別すなわちバーまたはスペースの種別と共に出力し、幅情報でないと判断されるときにはこの16bit情報を破棄する。幅情報の出力を受けたメモリコントロール部12は、当該幅情報をメモリAまたはメモリBのいずれか一方に書き込み、後にCPU2からの要求を受けた際に当該幅情報を読み出す。   When the video signal input unit 10 detects an edge between “0” and “1” of the binary data, the video signal input unit 10 measures the time until the next edge is detected, and measures the measured data Together with the type of “0” or “1”, the measured time is output to the barcode detection unit 11 as 16-bit information. That is, the video signal input unit 10 is width information conversion means for converting the electrical signal binarized by the A / D conversion circuit 5 into width information of each bar and space constituting the barcode and outputting the information. The barcode detection unit 11 determines whether or not the input 16-bit information is barcode bar or space width information. If it is determined that the input is 16-bit information, the barcode control unit 11 sends the 16-bit information to the memory control unit 12. This is output together with the type of “0” or “1”, that is, the type of bar or space, and this 16-bit information is discarded when it is determined not to be width information. Receiving the output of the width information, the memory control unit 12 writes the width information into either the memory A or the memory B, and reads the width information when a request from the CPU 2 is received later.

図3は、メモリAおよびメモリBに記憶されるデータの構成を示す模式図である。メモリAおよびメモリBには、各アドレスに対して一つの幅情報を記憶可能なメモリエリアが形成されている。このメモリエリアには、メモリコントロール部12の制御の下に幅情報の書き込みおよび読み出しが可能である。   FIG. 3 is a schematic diagram showing a configuration of data stored in the memory A and the memory B. In the memory A and the memory B, a memory area capable of storing one width information for each address is formed. In this memory area, width information can be written and read out under the control of the memory control unit 12.

さて、メモリコントロール部12は、幅情報をメモリAまたはメモリBの一方から読み出している間に入力される他のバーコードの幅情報を他方のメモリに書き込むことができる。図4は、幅情報の読み出しおよび書き込みに使用されるメモリの切り換えを説明するための模式図である。メモリコントロール部12は、あるバーコードの幅情報をメモリAに書き込み終えた後(ST101)、メモリAからの幅情報の読み出しがあると、メモリBを幅情報の書き込み用に切り換える。このときメモリコントロール部12は、バーコード検出部11から他のバーコードの幅情報が入力されたときには、当該幅情報をメモリBに書き込む(ST102)。メモリAからの幅情報の読み出しおよびメモリBへの幅情報の書き込みが完了した後、メモリBからの幅情報の読み出しがあると、メモリAを幅情報の書き込み用に切り換える。このときメモリコントロール部12は、バーコード検出部11から他のバーコードの幅情報が入力されたときには、当該幅情報をメモリAに書き込む(ST103)。以降も同様にメモリAとメモリBとを適宜切り換えながら幅情報の書き込みおよび読み取りに使用する。このように、メモリAとメモリBとを適宜切り換えるメモリコントロール部12の処理は、メモリ切り換え制御手段を構成する。このようにメモリAとメモリBとを切り換え可能に構成することで、CPU2からの幅情報の読み取りが完了する前に入力される他のバーコードの幅情報を破棄することなく保存でき、バーコードを読み取る効率が向上する。   Now, the memory control unit 12 can write the width information of another barcode input while reading the width information from either the memory A or the memory B into the other memory. FIG. 4 is a schematic diagram for explaining switching of memories used for reading and writing of width information. After writing the width information of a certain barcode into the memory A (ST101), the memory control unit 12 switches the memory B to the writing of the width information when the width information is read from the memory A. At this time, when the width information of another barcode is input from the barcode detection unit 11, the memory control unit 12 writes the width information in the memory B (ST102). After the width information is read from the memory A and the width information is written to the memory B, when the width information is read from the memory B, the memory A is switched to write the width information. At this time, when the width information of another barcode is input from the barcode detection unit 11, the memory control unit 12 writes the width information in the memory A (ST103). Thereafter, similarly, the memory A and the memory B are used for writing and reading the width information while switching appropriately. Thus, the processing of the memory control unit 12 that switches between the memory A and the memory B as appropriate constitutes a memory switching control means. Since the memory A and the memory B are configured to be switchable in this way, the width information of other barcodes input before the reading of the width information from the CPU 2 can be saved without being discarded. Reading efficiency is improved.

次に、メモリAに幅情報が記憶される場合を例にとり、CPU2およびFPGA6で行われる処理を図5の流れ図を用いて具体的に説明する。なお、当該処理が行われるとき、レジスタ13にはカウンタiおよびカウンタNが形成される。
先ず、バーコード検出部11にてビデオ信号入力部10から入力される16bit情報がバーコードを構成するバーまたはスペースの幅情報であるか否かが判断される(ST201)。この処理はバー又はスペースの幅情報であると判断されるまで繰り返され(ST201のNo)、バーコードを検知したと判断されたときには(ST201のYes)、当該16bit情報がバーまたはスペースの種別と共に幅情報としてメモリコントロール部12に入力される。このとき、メモリコントロール部12は、レジスタ13に形成されたカウンタiを“1”に初期化するとともに当該幅情報のバーまたはスペースの種別を記憶する(ST202)。
Next, taking the case where the width information is stored in the memory A as an example, the processing performed by the CPU 2 and the FPGA 6 will be specifically described with reference to the flowchart of FIG. When this processing is performed, a counter i and a counter N are formed in the register 13.
First, it is determined whether or not the 16-bit information input from the video signal input unit 10 in the barcode detection unit 11 is the width information of the bar or space constituting the barcode (ST201). This process is repeated until it is determined that the width information of the bar or space is determined (No in ST201), and when it is determined that the barcode is detected (Yes in ST201), the 16-bit information is displayed together with the type of the bar or space. The width information is input to the memory control unit 12. At this time, the memory control unit 12 initializes the counter i formed in the register 13 to “1” and stores the type of the bar or space of the width information (ST202).

次に、メモリコントロール部12は、メモリAのアドレスiに当該幅情報を記憶し(ST203)、入力される幅情報が途切れたか否か、すなわちバーコードが途切れたか否かを判断する(ST204)。この判断は、たとえばタイマで幅情報が入力されたときからの経過時間を測定し、所定時間が過ぎても次の幅情報が入力されない場合に入力される幅情報が途切れたと判断するようにする。そして、入力される幅情報が途切れていないと判断されるときには(ST204のNo)、カウンタiをインクリメントし(ST205)、ST203の処理に戻って次に受信した幅情報をメモリAの次のアドレスiに書き込む。このように、メモリコントロール部12は、入力される幅情報をメモリAにアドレス順に記憶していく。   Next, the memory control unit 12 stores the width information at the address i of the memory A (ST203), and determines whether or not the input width information is interrupted, that is, whether or not the barcode is interrupted (ST204). . In this determination, for example, the elapsed time from when the width information is input by the timer is measured, and if the next width information is not input even after the predetermined time has elapsed, it is determined that the input width information has been interrupted. . When it is determined that the input width information is not interrupted (No in ST204), the counter i is incremented (ST205), and the processing returns to ST203 and the next received width information is the next address in the memory A. Write to i. As described above, the memory control unit 12 stores the input width information in the memory A in the order of addresses.

一方、入力される幅情報が途切れたことをメモリコントロール部12が検知したときには(ST204のYes)、割込信号生成部14がCPU2に対して割込信号を出力する(ST206)。すなわち、割込信号生成部14は、メモリAにバーコードを構成する全てのバーおよびスペースの幅情報を記憶し終えたことに応じて割込信号を出力する割込み手段である。   On the other hand, when the memory control unit 12 detects that the input width information is interrupted (Yes in ST204), the interrupt signal generation unit 14 outputs an interrupt signal to the CPU 2 (ST206). In other words, the interrupt signal generation unit 14 is an interrupt unit that outputs an interrupt signal in response to the storage of the width information of all the bars and spaces constituting the barcode in the memory A.

しかる後、CPU2は、レジスタ13に記憶されたカウンタiの値とST202の処理にて記憶した先頭の幅情報のバーまたはスペースの種別とを取得し(ST207)、カウンタNを“1”に初期化する(ST208)。このとき取得したカウンタiの値は、CPU2が取得すべき幅情報の数NmaxとしてCPU2の図示しないメモリエリアに記憶保持される。   Thereafter, the CPU 2 acquires the value of the counter i stored in the register 13 and the type of the bar or space of the head width information stored in the processing of ST202 (ST207), and initially sets the counter N to “1”. (ST208). The value of counter i acquired at this time is stored and held in a memory area (not shown) of CPU 2 as the number Nmax of width information to be acquired by CPU 2.

次に、CPU2は、FPGA6に幅情報の読み出しを要求する。この要求を受けてメモリコントロール部12は、メモリAのアドレスNに記憶された幅情報を読み出してCPU2に出力し(ST209)、メモリAのアドレスNに“0”を書き込む(ST210)。すなわち、CPU2がFPGA6に要求して幅情報を読み出すST9の処理は読出制御手段であり、メモリコントロール部12がメモリAから読み出した幅情報を消去するST10の処理は消去制御手段である。   Next, the CPU 2 requests the FPGA 6 to read the width information. Upon receiving this request, the memory control unit 12 reads the width information stored in the address N of the memory A and outputs it to the CPU 2 (ST209), and writes “0” in the address N of the memory A (ST210). That is, the process of ST9 in which the CPU 2 requests the FPGA 6 to read the width information is a read control unit, and the process of ST10 in which the memory control unit 12 erases the width information read from the memory A is an erase control unit.

次に、CPU2は、カウンタNの値をレジスタ13から取得して、カウンタNの値が取得すべき幅情報の数Nmaxに達したか否かを判断する(ST211)。幅情報の数Nmaxに達していないと判断されるときには(ST211のNo)、カウンタNをインクリメントし(ST212)、再びメモリコントロール部12に幅情報の読み出しを要求する。   Next, the CPU 2 acquires the value of the counter N from the register 13 and determines whether or not the value of the counter N has reached the number Nmax of width information to be acquired (ST211). When it is determined that the number Nmax of width information has not been reached (No in ST211), the counter N is incremented (ST212), and the memory control unit 12 is requested to read the width information again.

一方、幅情報の数Nmaxに達したと判断されるときには(ST11のYes)、CPU2は、ST207の処理にて取得した先頭のバーまたはスペースの種別に基づいて読み出した各幅情報のバーまたはスペースの種別を特定し、予め保持したバーコードの規格情報と照合することでバーコード情報にデコードする(ST13)。すなわち、CPU2が実行するST13の処理はデコード手段である。デコードされたバーコード情報は、USBポート7を介して外部機器に出力されて当該読み取り処理が終了する。なお、メモリBに幅情報を書き込み、読み出す場合であっても同様にST201〜ST213の処理が実行される。   On the other hand, when it is determined that the number Nmax of width information has been reached (Yes in ST11), the CPU 2 reads the bar or space of each width information read based on the type of the top bar or space acquired in the process of ST207. Is identified, and it is decoded into barcode information by collating with the barcode standard information held in advance (ST13). That is, the process of ST13 executed by the CPU 2 is a decoding unit. The decoded barcode information is output to the external device via the USB port 7, and the reading process is completed. Even when the width information is written to and read from the memory B, the processes of ST201 to ST213 are similarly executed.

以上説明したように、バーコードスキャナ1は、CPU2がメモリAまたはメモリBからバーコードの幅情報を取得する際、メモリコントロール部12がメモリAまたはメモリBの所定のアドレスに記憶された幅情報を読み取るとともにその幅情報を消去する。そのため、既に読み取られた後の幅情報が再度メモリAまたはメモリBから読み取られることはないので、静電気などのノイズによる不正な割込みが生じた場合においても確実にバーコードの二重読みを防止することができる。   As described above, in the barcode scanner 1, when the CPU 2 acquires the barcode width information from the memory A or the memory B, the memory controller 12 stores the width information stored at a predetermined address in the memory A or the memory B. Is read and the width information is erased. For this reason, since the width information that has already been read is not read again from the memory A or the memory B, double reading of the barcode is surely prevented even when an illegal interruption due to noise such as static electricity occurs. be able to.

なお、この発明は前記実施形態そのままに限定されるものではなく、実施段階においては、その要旨を逸脱しない範囲内にて各構成要素を適宜変形して具体化することができる。   In addition, this invention is not limited to the said embodiment as it is, In an implementation stage, in the range which does not deviate from the summary, each component can be deform | transformed and embodied suitably.

例えば、上記実施形態においては、FPGA6を用いてバーコードスキャナ1を構成したがこれに限定されず、FPGA6に代えて、FPGA6と同様の処理を行うように設計されたASICなどを用いてもよい。   For example, in the above embodiment, the barcode scanner 1 is configured using the FPGA 6, but the invention is not limited to this, and an ASIC designed to perform the same processing as the FPGA 6 may be used instead of the FPGA 6. .

また、CPU2がメモリAからバーコードの幅情報を取得する際、メモリコントロール部12がメモリAまたはメモリBの所定のアドレスに記憶された幅情報を読み取るとともにその幅情報を消去するように構成したが(ST209〜ST212)、メモリAまたはメモリBから一つのバーコードを構成する全てのバーおよびスペースの幅情報を読み取った後に全てのアドレスに記憶された幅情報を消去するようにしてもよい。このような処理構成とした場合であっても、CPU2への不正な割り込みが生じた際の二重読み防止が実現できる。   Further, when the CPU 2 acquires the barcode width information from the memory A, the memory control unit 12 reads the width information stored at a predetermined address of the memory A or the memory B and erases the width information. However, after reading the width information of all the bars and spaces constituting one barcode from the memory A or B, the width information stored in all addresses may be erased. Even in such a processing configuration, it is possible to prevent double reading when an illegal interrupt to the CPU 2 occurs.

また、FPGA6には、メモリAおよびメモリBに加えてより多数のメモリを搭載してメモリ切り換え手段により適宜幅情報の書き込みおよび読み取りに使用するようにしてもよい。例えば、メモリAおよびメモリBに加えてさらにメモリCを搭載し、メモリAに記憶された幅情報の読み出しがあったときにメモリBを幅情報の書き込み用に切り換え、さらにメモリAからの読み出しが完了する前にメモリBへの幅情報の書き込みが完了したときにはメモリCを幅情報の書き込み用に切り換える。このような構成とすることで、バーコードを読み取る効率をより向上させることができる。   In addition to the memory A and the memory B, a larger number of memories may be mounted on the FPGA 6 and used for writing and reading width information as appropriate by the memory switching means. For example, in addition to the memory A and the memory B, the memory C is further mounted. When the width information stored in the memory A is read, the memory B is switched to write the width information. When the writing of the width information to the memory B is completed before completion, the memory C is switched for writing the width information. With such a configuration, the efficiency of reading a barcode can be further improved.

この他、前記実施形態に開示されている複数の構成要素を適宜組み合わせることにより種々の発明を形成することができる。例えば、実施形態に示される全体構成要素から幾つかの構成要素を削除してもよい。   In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from the overall components shown in the embodiment.

本発明の一実施形態におけるバーコードスキャナの要部構成を示すブロック図。1 is a block diagram showing a main configuration of a barcode scanner according to an embodiment of the present invention. 同実施形態におけるFPGAの要部構成を示すブロック図。The block diagram which shows the principal part structure of FPGA in the same embodiment. 同実施形態におけるメモリに記憶されるデータの構成を示す模式図。The schematic diagram which shows the structure of the data memorize | stored in the memory in the embodiment. 同実施形態におけるメモリの切り換えを説明するための模式図。The schematic diagram for demonstrating switching of the memory in the embodiment. 同実施形態においてCPUおよびFPGAで行われる処理の流れ図。4 is a flowchart of processing performed by a CPU and an FPGA in the embodiment.

符号の説明Explanation of symbols

A,B…メモリ、i,N…カウンタ、1…バーコードスキャナ、2…CPU、3…ファームウェア、4…フォトセンサ、5…A/D変換回路、6…FPGA、7…USBポート、8…外部機器、10…ビデオ信号入力部、11…バーコード検出部、12…メモリコントロール部、13…レジスタ、14…割込信号生成部   A, B ... Memory, i, N ... Counter, 1 ... Barcode scanner, 2 ... CPU, 3 ... Firmware, 4 ... Photo sensor, 5 ... A / D conversion circuit, 6 ... FPGA, 7 ... USB port, 8 ... External device, 10 ... video signal input unit, 11 ... barcode detection unit, 12 ... memory control unit, 13 ... register, 14 ... interrupt signal generation unit

Claims (5)

受光したバーコードからの反射光を電気信号に変換して出力する受光手段と、
この受光手段が出力した前記電気信号を前記バーコードを構成するバーおよびスペースに対応する信号に2値化する2値化手段と、
この2値化手段が2値化した前記電気信号をバーコードを構成する各バーおよびスペースの幅情報に変換して出力する幅情報変換手段と、
この幅情報変換手段が出力した前記幅情報を記憶する記憶手段と、
この記憶手段に前記バーコードを構成する全てのバーおよびスペースの前記幅情報を記憶し終えたことに応じて割込信号を出力する割込み手段と、
この割込み手段が出力した前記割込信号を受信したときに前記記憶手段から前記幅情報を読み出す読出制御手段と、
この読出制御手段が読み出した前記幅情報を前記記憶手段から消去する消去制御手段と、
前記読出制御手段が読み出した前記幅情報をバーコード情報にデコードするデコード手段と、
を備えてなることを特徴とするバーコードスキャナ。
A light receiving means for converting the reflected light from the received bar code into an electrical signal and outputting it,
Binarizing means for binarizing the electrical signal output by the light receiving means into signals corresponding to the bars and spaces constituting the barcode;
Width information conversion means for converting the electric signal binarized by the binarization means into width information of each bar and space constituting the barcode and outputting the information;
Storage means for storing the width information output by the width information conversion means;
Interrupt means for outputting an interrupt signal in response to the storage of the width information of all the bars and spaces constituting the barcode in the storage means;
Read control means for reading the width information from the storage means when receiving the interrupt signal output by the interrupt means;
Erasure control means for erasing the width information read by the read control means from the storage means;
Decoding means for decoding the width information read by the read control means into barcode information;
A bar code scanner comprising:
前記消去制御手段は、前記読出制御手段が前記記憶手段から一つのバー又はスペースの前記幅情報を読み出す度に前記記憶手段から当該幅情報を消去することを特徴とする請求項1に記載のバーコードスキャナ。   2. The bar according to claim 1, wherein the erase control unit erases the width information from the storage unit each time the read control unit reads the width information of one bar or space from the storage unit. Code scanner. 前記幅情報変換手段、前記記憶手段および前記割込み手段がFPGAにより具現され、
前記読出制御手段は、前記割込信号を受信したときに前記FPGAに前記幅情報の読み出しを要求して前記幅情報を前記記憶手段から読み出させ、この幅情報を前記消去制御手段が前記記憶手段から消去することを特徴とする請求項1に記載のバーコードスキャナ。
The width information conversion unit, the storage unit, and the interrupt unit are implemented by an FPGA.
The read control means requests the FPGA to read the width information when the interrupt signal is received, and causes the width information to be read from the storage means, and the erase control means stores the width information. The barcode scanner according to claim 1, wherein the barcode scanner is erased from the means.
前記記憶手段を複数有し、
前記読出制御手段が特定の前記記憶手段から前記幅情報を読み出すに際して、前記幅情報変換手段が出力する前記幅情報を記憶するための前記記憶手段を当該特定の前記記憶手段から他の前記記憶手段に切り換えるメモリ切り換え制御手段をさらに備えてなることを特徴とする請求項1に記載のバーコードスキャナ。
A plurality of storage means;
When the read control means reads the width information from the specific storage means, the storage means for storing the width information output by the width information conversion means is changed from the specific storage means to the other storage means. 2. The barcode scanner according to claim 1, further comprising a memory switching control means for switching between the two.
受光したバーコードからの反射光を電気信号に変換して出力する受光ステップと、
出力された前記電気信号を前記バーコードを構成するバーおよびスペースに対応する信号に2値化する2値化ステップと、
2値化された前記電気信号をバーコードを構成する各バーおよびスペースの幅情報に変換して出力する幅情報変換ステップと、
出力された前記幅情報を所定の記憶手段に記憶する記憶ステップと、
前記バーコードを構成する全てのバーおよびスペースの前記幅情報が前記記憶手段に記憶され終えたことに応じて割込信号を出力する割込みステップと、
出力された前記割込信号を制御手段が受信したとき、前記記憶手段から前記幅情報を読み出す読出ステップと、
読み出された前記幅情報を前記記憶手段から消去する消去ステップと、
前記読出ステップにて読み出された前記幅情報をバーコード情報にデコードするデコードステップと、
を備えてなることを特徴とするバーコードスキャナの制御方法。
A light receiving step for converting the reflected light from the received bar code into an electrical signal and outputting it;
A binarization step for binarizing the output electric signal into a signal corresponding to a bar and a space constituting the barcode;
A width information conversion step of converting the binarized electrical signal into width information of each bar and space constituting the barcode and outputting the information;
A storage step of storing the output width information in a predetermined storage means;
An interrupt step of outputting an interrupt signal in response to the width information of all the bars and spaces constituting the bar code being stored in the storage means;
A reading step of reading the width information from the storage means when the control means receives the output interrupt signal;
An erasing step of erasing the read width information from the storage means;
A decoding step of decoding the width information read in the reading step into bar code information;
A control method for a bar code scanner, comprising:
JP2008072519A 2008-03-19 2008-03-19 Bar code scanner and method for controlling the same Pending JP2009230283A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008072519A JP2009230283A (en) 2008-03-19 2008-03-19 Bar code scanner and method for controlling the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008072519A JP2009230283A (en) 2008-03-19 2008-03-19 Bar code scanner and method for controlling the same

Publications (1)

Publication Number Publication Date
JP2009230283A true JP2009230283A (en) 2009-10-08

Family

ID=41245627

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008072519A Pending JP2009230283A (en) 2008-03-19 2008-03-19 Bar code scanner and method for controlling the same

Country Status (1)

Country Link
JP (1) JP2009230283A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06103398A (en) * 1992-09-18 1994-04-15 Fujitsu Ltd Feader
JPH06325196A (en) * 1993-05-17 1994-11-25 Olympus Optical Co Ltd Bar code reader
JP2002032711A (en) * 2000-07-14 2002-01-31 Bankutekku Japan Kk Device and method for document recognition

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06103398A (en) * 1992-09-18 1994-04-15 Fujitsu Ltd Feader
JPH06325196A (en) * 1993-05-17 1994-11-25 Olympus Optical Co Ltd Bar code reader
JP2002032711A (en) * 2000-07-14 2002-01-31 Bankutekku Japan Kk Device and method for document recognition

Similar Documents

Publication Publication Date Title
JP3896827B2 (en) Information code decoding method and decoding system
US20110119429A1 (en) Nonvolatile memory controller and method for writing data to nonvolatile memory
KR930018423A (en) Barcode reader
MY138294A (en) Access to printing material container
KR102114642B1 (en) Data protection method, apparatus and device
JP3542971B2 (en) Barcode reading method, barcode reading device, and program
JPH10198754A (en) Code reader
JP2009230283A (en) Bar code scanner and method for controlling the same
US9704006B2 (en) Image processing apparatus
JP2007034546A (en) Optical reader
EP3754579A1 (en) Barcode generation device and barcode generation method
KR100829108B1 (en) Apparatus and method for reading 2 dimensional barcode with a pattern gradient calculation function
JP3804140B2 (en) Two-dimensional code reader
JP3872626B2 (en) Memory device
US20060091217A1 (en) Graphical code reader that is configured for efficient decoder management
JP4985781B2 (en) Semiconductor memory device and control method thereof
JPH0283686A (en) Optical reader
JP2005092344A (en) Semiconductor device
JP4475332B2 (en) Information code reading apparatus and information code reading method
JP4553014B2 (en) Information code reading apparatus and information code reading method
JPH04283885A (en) Automatic identification decoder
JP2853357B2 (en) Barcode reader
US20090168119A1 (en) Image scanning apparatus having scan background and image scanning method thereof
JP4873312B2 (en) Optical information reader
JPH02125385A (en) Image signal processor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101019

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101102

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101217

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110315