JP2001034822A - Controller for automatic vending machine - Google Patents

Controller for automatic vending machine

Info

Publication number
JP2001034822A
JP2001034822A JP11207664A JP20766499A JP2001034822A JP 2001034822 A JP2001034822 A JP 2001034822A JP 11207664 A JP11207664 A JP 11207664A JP 20766499 A JP20766499 A JP 20766499A JP 2001034822 A JP2001034822 A JP 2001034822A
Authority
JP
Japan
Prior art keywords
program
control program
rewriting
stored
control
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
JP11207664A
Other languages
Japanese (ja)
Inventor
Naohito Matsumoto
尚人 松本
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.)
Sanden Corp
Original Assignee
Sanden 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 Sanden Corp filed Critical Sanden Corp
Priority to JP11207664A priority Critical patent/JP2001034822A/en
Publication of JP2001034822A publication Critical patent/JP2001034822A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To surely reload a control program. SOLUTION: A control device 1 is provided with a flash memory 12, in which a control program, 12 and a read program 122 are stored, and a RAM 13 capable of temporarily storing data and when a memory card 5 storing a reload program 51 and a new control program 52 is loaded, the read program 122 is run. Concerning the read program 122, the reload program 511 is transferred from the memory card 5 to a work area 131 of the RAM 13 and in this work area 131, the reload program 51 is run. Thus, even when the memory card 5 is ejected while running the reload program 51, a CPU 11 does not run away.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、各種物品を販売す
る自動販売機の制御装置について、その制御プログラム
の更新に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control system for a vending machine which sells various articles, and to an update of the control program.

【0002】[0002]

【従来の技術】従来、この種の自動販売機の制御装置
は、制御プログラムを記憶した記憶装置と、該制御プロ
グラムを実行する演算装置と、各種機器とのインターフ
ェース部とを備えている。この制御装置は、演算装置が
記憶装置に記憶されている制御プログラムを実行するこ
とにより動作する。ここで、制御プログラムを記憶した
記憶装置としては、フラッシュメモリ等の電気的に書き
換え可能な不揮発性メモリが用いられている。インター
フェース部に接続する機器としては、顧客の販売要求を
指示する商品選択ボタン、金額等を表示する表示器、冷
却装置を構成する圧縮機や送風器等、管理者用のリモコ
ンなどである。
2. Description of the Related Art Conventionally, a control device for a vending machine of this type includes a storage device storing a control program, an arithmetic unit for executing the control program, and interfaces with various devices. This control device operates when the arithmetic device executes a control program stored in the storage device. Here, an electrically rewritable nonvolatile memory such as a flash memory is used as a storage device storing the control program. The devices connected to the interface unit include a product selection button for instructing a customer's sales request, a display for displaying the amount of money, a compressor and a blower constituting a cooling device, and a remote controller for an administrator.

【0003】ところで、記憶装置に記憶されている制御
プログラムは、自動販売機が市場に投入された以降に、
例えばリモコン操作方法の修正変更などのために、その
内容を変更する場合がある。すなわち制御プログラムの
バージョンアップである。従来の制御装置では、記憶装
置として前述したような電気的に書き換え可能な不揮発
性メモリを用いており、また書換用プログラムをフラッ
シュメモリなどの不揮発性メモリに記憶している。そし
て、制御装置に新たな制御プログラムを記憶したメモリ
カードやFDD(Floppy Disk Drive)を接続し、書換
用プログラムを実行することにより制御プログラムを新
たな制御プログラムに書き換えている。ここで、制御プ
ログラムの書換の際には、既に記憶されている制御プロ
グラムと新しい制御プログラムの種別やバージョンをチ
ェックし、変更する必要がある場合にのみ書換を行って
いる。
[0003] By the way, the control program stored in the storage device, after the vending machine was put on the market,
For example, the contents may be changed for the purpose of modifying the remote control operation method. That is, the version of the control program is upgraded. In a conventional control device, an electrically rewritable nonvolatile memory as described above is used as a storage device, and a rewriting program is stored in a nonvolatile memory such as a flash memory. Then, a memory card or a floppy disk drive (FDD) storing a new control program is connected to the control device, and the control program is rewritten by executing the rewriting program. Here, at the time of rewriting the control program, the types and versions of the already stored control program and the new control program are checked, and rewriting is performed only when it is necessary to change the control program.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、従来の
制御装置は、書換プログラムが制御装置内のメモリに記
憶されており、この書換プログラム自体は書き換えられ
ないため、制御プログラムのバージョンチェック方法、
制御プログラムの書換手順、新たな制御プログラムの格
納フォーマット等が固定されていた。このため、バージ
ョンアップ時に誤った制御プログラムに書き換えてしま
ったり、また将来の拡張性に乏しいという問題があっ
た。
However, in the conventional control device, a rewrite program is stored in a memory in the control device, and the rewrite program itself is not rewritten.
The rewriting procedure of the control program, the storage format of the new control program, and the like were fixed. For this reason, there has been a problem that the control program is rewritten to an erroneous control program at the time of version upgrade, and that future expandability is poor.

【0005】この問題を解決するために、外部記憶媒体
として演算装置から直接アクセス可能なメモリカードを
用いるとともに、このメモリカードに書換プログラム及
び新しい制御プログラムを記憶する方法が提案されてい
る。この方法では、メモリカードに記憶されている書換
プログラムを実行することにより制御装置の制御プログ
ラムを新しい制御プログラムに書き換えている。しか
し、この方法では、演算装置が直接メモリカードにアク
セスしているので、書換プログラムの実行中に誤ってメ
モリカードが抜き外されてしまうと演算装置が暴走して
しまうという問題があった。
In order to solve this problem, a method has been proposed in which a memory card which can be directly accessed from an arithmetic unit is used as an external storage medium, and a rewrite program and a new control program are stored in the memory card. In this method, the control program of the control device is rewritten to a new control program by executing the rewrite program stored in the memory card. However, in this method, since the arithmetic unit directly accesses the memory card, there is a problem that the arithmetic unit runs away if the memory card is accidentally removed during execution of the rewriting program.

【0006】本発明は、上記事情に鑑みてなされたもの
であり、その目的とするところは、制御プログラムの書
き換えを確実に行うことができる自動販売機の制御装置
を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a vending machine control device capable of reliably rewriting a control program.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、請求項1では、制御プログラムが記憶された電気的
に書き換え可能な第1記憶手段と、第1記憶手段の制御
プログラムを実行する演算装置とを備え、着脱自在な外
部記憶媒体を装着することにより前記制御プログラムを
書き換え可能な自動販売機の制御装置において、前記外
部記憶媒体には、第2の制御プログラムと、前記第1記
憶手段に記憶された制御プログラムを第2の制御プログ
ラムに書き換える書換プログラムとが予め記憶され、外
部記憶媒体に記憶されている書換プログラムを読み出す
読出プログラムが記憶された第2記憶手段と、読出プロ
グラムにより読み出された書換プログラムを一時的に格
納する第3記憶手段とを備え、前記演算装置は、外部記
憶媒体が装着されると前記読出プログラムを実行して外
部記憶媒体に記憶されている書換プログラムを第3記憶
手段に格納し、第3記憶手段に記憶した書換プログラム
を実行することを特徴とするものを提案する。
In order to achieve the above object, according to the present invention, an electrically rewritable first storage means storing a control program and a control program for the first storage means are executed. A control device for a vending machine, comprising an arithmetic device, wherein the control program can be rewritten by mounting a detachable external storage medium, wherein the external storage medium includes a second control program, the first storage A rewriting program for rewriting the control program stored in the means into a second control program is stored in advance, and a second storage means storing a reading program for reading the rewriting program stored in the external storage medium; Third storage means for temporarily storing the read rewrite program, wherein the arithmetic unit has an external storage medium mounted thereon. The running read program stores the rewriting program stored in the external storage medium in the third storage means, proposes what and executes the rewriting program stored in the third storage means and.

【0008】本発明によれば、外部記憶媒体が装着され
ると、演算装置が第2記憶手段に記憶されている読出プ
ログラムを実行することにより、外部記憶媒体に記憶さ
れている書換プログラムが第3記憶手段に読み出され
る。この後に、演算装置は第3記憶手段に読み出された
書換プログラムを実行することにより、第1記憶手段に
記憶されている制御プログラムが、外部記憶媒体に記憶
されている第2の制御プログラムに書き換えられる。こ
のように、書換プログラムが制御装置に設けられた第3
記憶手段において実行されるので、書換実行中に外部記
憶媒体が抜き外された場合には、当該書換プログラムの
実行は正常に完了しないものの、演算装置の暴走を防止
することができる。また、書換プログラムは制御プログ
ラムのみを書き換えるので、書換プログラムの実行中に
外部記憶媒体が抜き外された場合であっても、読出プロ
グラムが初期化されたりデータ破損を受けない。これに
より、制御プログラムの書き換えを確実に再開させるこ
とができる。したがって、制御プログラムの書き換えを
確実に行うことができる。
According to the present invention, when the external storage medium is mounted, the arithmetic unit executes the readout program stored in the second storage means, so that the rewriting program stored in the external storage medium is read. 3 Read out to storage means. Thereafter, the arithmetic unit executes the rewriting program read out to the third storage means, so that the control program stored in the first storage means is replaced with the second control program stored in the external storage medium. Rewritten. As described above, the rewriting program is provided in the third device provided in the control device.
Since the execution is performed by the storage means, if the external storage medium is removed during the execution of the rewriting, the execution of the rewriting program is not completed normally, but runaway of the arithmetic unit can be prevented. Further, since the rewriting program rewrites only the control program, even if the external storage medium is removed during the execution of the rewriting program, the reading program is not initialized and the data is not damaged. Thereby, the rewriting of the control program can be reliably restarted. Therefore, the control program can be reliably rewritten.

【0009】本発明の好適な態様の一例として、請求項
2では、請求項1記載の自動販売機の制御装置におい
て、前記書換プログラムの実行では、外部記憶媒体に記
憶されている第2の制御プログラムが第1記憶手段に記
憶されている制御プログラムと比較して同一種別である
ときにのみ書き換えを行うことを特徴とするものを提案
する。
According to a second aspect of the present invention, in the control device for a vending machine according to the first aspect, the execution of the rewriting program includes a second control stored in an external storage medium. A program is proposed in which rewriting is performed only when the program is of the same type as the control program stored in the first storage means.

【0010】本発明によれば、第1記憶手段に記憶され
ている制御プログラムと外部記憶媒体に記憶されている
第2の制御プログラムの種別が同一であるときにのみ書
き換えが行われるので、誤って異なる種別の制御プログ
ラムで書き換えられることがない。
According to the present invention, rewriting is performed only when the type of the control program stored in the first storage means and the type of the second control program stored in the external storage medium are the same. It is not rewritten by different types of control programs.

【0011】また、他の好適な態様の一例として、請求
項3では、請求項1記載の自動販売機の制御装置におい
て、前記書換プログラムの実行では、外部記憶媒体に記
憶されている第2の制御プログラムが第1記憶手段に記
憶されている制御プログラムと比較してバージョンが新
しいものであるときにのみ書き換えを行うことを特徴と
するものを提案する。
According to another preferred embodiment of the present invention, in the control device for a vending machine according to the first aspect of the present invention, in the execution of the rewriting program, the second program stored in an external storage medium is executed. A feature is proposed in which the control program is rewritten only when the version is newer than the control program stored in the first storage means.

【0012】本発明によれば、外部記憶媒体に記憶され
ている第2の制御プログラムが第1記憶手段に記憶され
ている制御プログラムよりもバージョンが新しくなって
いるときにのみ書き換えが行われるので、誤って古いバ
ージョンの制御プログラムで書き換えられることがな
い。
According to the present invention, rewriting is performed only when the version of the second control program stored in the external storage medium is newer than the version of the control program stored in the first storage means. It is not accidentally rewritten by an old version of the control program.

【0013】さらに、他の好適な態様の一例として、請
求項4では、請求項1記載の自動販売機の制御装置にお
いて、前記書換プログラムの実行では、外部記憶媒体に
記憶されている第2の制御プログラムが第1記憶手段に
記憶されている制御プログラムと比較して同一種別且つ
バージョンが新しいものであるときにのみ書き換えを行
うことを特徴とするものを提案する。
In another preferred embodiment, in the control device for a vending machine according to the first aspect of the present invention, the execution of the rewriting program includes the step of storing the second program stored in an external storage medium. It is proposed that the control program is rewritten only when the control program is of the same type and newer version than the control program stored in the first storage means.

【0014】本発明によれば、外部記憶媒体に記憶され
ている第2の制御プログラムが第1記憶手段に記憶され
ている制御プログラムと同一種別で且つバージョンが新
しくなっているときにのみ書き換えが行われるので、誤
って異なる種別や古いバージョンの制御プログラムで書
き換えられることがない。
According to the present invention, rewriting can be performed only when the second control program stored in the external storage medium is of the same type as the control program stored in the first storage means and the version is newer. Since it is performed, it is not accidentally rewritten by a different type or an older version of the control program.

【0015】[0015]

【発明の実施の形態】本発明の一実施の形態にかかる自
動販売機の制御装置について図1及び図2を参照して説
明する。図1は自動販売機の制御装置の構成図、図2は
制御プログラムの書換動作を説明するフローチャートで
ある。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A control device for a vending machine according to an embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a configuration diagram of a control device of a vending machine, and FIG. 2 is a flowchart illustrating a rewriting operation of a control program.

【0016】この制御装置1は、主演算装置であるCP
U11と、電気的に書き換え可能な不揮発性メモリであ
るフラッシュメモリ12と、揮発性メモリであるRAM
13と、各種機器との接続インターフェースであるI/
Oインターフェース14と、これらを接続するバス15
からなる。I/Oインターフェース14は、自動販売機
の構成機器である各種機器に接続している。図1では、
その一例として、顧客による商品選択の指示を入力する
商品選択ボタン2と、自動販売機に設置されている冷却
装置を構成する圧縮機3と、自動販売機の管理者により
操作され各種データの入出力を行うリモコン4を示し
た。また、この制御装置1には、メモリカード5が装着
可能となっている。
The control device 1 includes a main processing unit CP
U11, a flash memory 12 which is an electrically rewritable nonvolatile memory, and a RAM which is a volatile memory
13 and I / O which is a connection interface between various devices.
O interface 14 and a bus 15 for connecting these
Consists of The I / O interface 14 is connected to various devices that are components of the vending machine. In FIG.
As an example, a product selection button 2 for inputting a product selection instruction by a customer, a compressor 3 constituting a cooling device installed in a vending machine, and input of various data operated by an administrator of the vending machine. The remote controller 4 for outputting is shown. Further, a memory card 5 can be mounted on the control device 1.

【0017】フラッシュメモリ12には、制御プログラ
ム121と読出プログラム122が記憶されている。制
御プログラム121は、I/Oインターフェース部14
を介して接続する各種機器に信号を入出力することによ
り自動販売機を制御する。この制御プログラム121
は、主に通常の販売動作時に実行される販売用プログラ
ムとリモコンの操作による管理用プログラムを備えてい
る。この制御プログラム121による制御については、
従来の制御装置と同様なのでここでは説明は省略する。
また、制御プログラム121は、自身の制御プログラム
の種別を示す識別子と、そのバージョン(版)に関する
情報を有している。ここで、制御プログラムの識別子と
は、制御プログラムを適用することができる自動販売機
を識別するために設けたものである。読出プログラム1
22は、制御プログラム121の書き換えの際に実行さ
れるプログラムである。この読出プログラム122は、
メモリカード5に記憶されているデータを読み出してR
AM13に格納する。具体的には、読出プログラム12
2は、メモリカード5に記憶されている書き換えプログ
ラム51を読み出してRAM13に格納する。
The flash memory 12 stores a control program 121 and a read program 122. The control program 121 includes the I / O interface unit 14
The vending machine is controlled by inputting / outputting signals to / from various devices connected via the vending machine. This control program 121
Has a sales program mainly executed during a normal sales operation and a management program by operating a remote controller. For the control by the control program 121,
The description is omitted here because it is similar to the conventional control device.
Further, the control program 121 has an identifier indicating the type of its own control program and information on its version (version). Here, the identifier of the control program is provided to identify a vending machine to which the control program can be applied. Read program 1
A program 22 is executed when the control program 121 is rewritten. This reading program 122
The data stored in the memory card 5 is read and R
Store it in AM13. Specifically, the read program 12
2 reads out the rewriting program 51 stored in the memory card 5 and stores it in the RAM 13.

【0018】RAM13は、制御プログラム121の実
行中に各種データを一時的に保持したり、読出プログラ
ム122によりメモリカード5から読み出されたデータ
を記憶する作業領域131を備えている。RAM13と
しては、例えばSRAMが用いられる。
The RAM 13 has a work area 131 for temporarily holding various data during execution of the control program 121 and for storing data read from the memory card 5 by the read program 122. As the RAM 13, for example, an SRAM is used.

【0019】CPU11は、プログラムを実行する演算
装置である。通常時には、フラッシュメモリ12に記憶
されている制御プログラム121を演算実行する。ま
た、このCPU11は、所定の割り込み信号に基づき各
種処理が可能となっており、メモリカード5が装着され
ると割り込み信号IRQが発生し、これに対してフラッ
シュメモリ12に記憶されている読出プログラム122
を実行するように設定されている。
The CPU 11 is an arithmetic unit that executes a program. Normally, the control program 121 stored in the flash memory 12 is arithmetically executed. The CPU 11 is capable of performing various processes based on a predetermined interrupt signal. When the memory card 5 is inserted, an interrupt signal IRQ is generated, and the read program stored in the flash memory 12 is responded to the interrupt signal IRQ. 122
Is set to run.

【0020】メモリカード5は、制御プログラム121
の内容を書き換える際に制御装置1に装着される。メモ
リカード5は、フラッシュメモリを備えた携帯型のもの
である。このメモリカード5は、制御装置1のバス15
に接続される。このような接続により、CPU11は、
フラッシュメモリ12及びRAM13のアドレス空間に
加えて、メモリカード5によるアドレス空間が追加され
たように認識される。また、このメモリカード5を制御
装置1に装着すると、CPU11に対して割り込み信号
IRQが出力される。CPU11は、この割り込み信号
IRQを受け付けるとフラッシュメモリ12に記憶され
ている読出プログラム122の先頭アドレスに制御を移
し、当該プログラムを演算実行する。
The memory card 5 has a control program 121
Is attached to the control device 1 when rewriting the contents of. The memory card 5 is a portable type having a flash memory. This memory card 5 is connected to the bus 15 of the control device 1.
Connected to. With such a connection, the CPU 11
It is recognized that the address space of the memory card 5 has been added in addition to the address spaces of the flash memory 12 and the RAM 13. When the memory card 5 is mounted on the control device 1, an interrupt signal IRQ is output to the CPU 11. When receiving the interrupt signal IRQ, the CPU 11 shifts the control to the head address of the read program 122 stored in the flash memory 12, and executes the program.

【0021】メモリカード5には、書換プログラム51
と、新制御プログラム52が記憶されている。書換プロ
グラム51は、前記読出プログラム122によりRAM
13の作業領域131に格納された後に、この作業領域
131において実行される。この書換プログラム51
は、メモリカード5に記憶されている新制御プログラム
52を読み出し、フラッシュメモリ12に記憶されてい
る制御プログラム121を新制御プログラム52に書き
換え更新する。ここで、書換プログラム51は、制御プ
ログラムの書き換えを以下の条件で行う。すなわち、メ
モリカード5に記憶されている新制御プログラム52に
は、制御プログラム121と同様に、新制御プログラム
52の種別を示す識別子及びバージョン情報が記憶され
ている。書換プログラム51は、メモリカード5に記憶
されている新制御プログラム52がフラッシュメモリ1
2に記憶されている制御プログラム121と比較して、
種別を示す識別子が同一であり、且つバージョンが新し
くなっていることを条件に書き換えを行う。
The memory card 5 has a rewriting program 51
And a new control program 52 are stored. The rewriting program 51 is stored in the RAM by the read program 122.
After being stored in the 13 work areas 131, it is executed in this work area 131. This rewriting program 51
Reads the new control program 52 stored in the memory card 5 and rewrites and updates the control program 121 stored in the flash memory 12 with the new control program 52. Here, the rewriting program 51 rewrites the control program under the following conditions. That is, the new control program 52 stored in the memory card 5 stores the identifier indicating the type of the new control program 52 and the version information, similarly to the control program 121. The new control program 52 stored in the memory card 5 corresponds to the flash memory 1.
2 compared with the control program 121 stored in
Rewriting is performed on condition that the identifier indicating the type is the same and the version is new.

【0022】次に、この制御装置1の動作について図2
のフローチャートを参照して説明する。この制御装置1
では、メモリカード5の装着により割り込み信号IRQ
が発生し、CPU11はフラッシュメモリ12の読出プ
ログラム122の処理に移る(ステップS1)。
Next, the operation of the control device 1 will be described with reference to FIG.
This will be described with reference to the flowchart of FIG. This control device 1
Then, when the memory card 5 is inserted, the interrupt signal IRQ
Occurs, and the CPU 11 proceeds to the processing of the read program 122 of the flash memory 12 (step S1).

【0023】次に、読出プログラム122では、メモリ
カード5の書換プログラム51をRAM13の作業領域
131にコピーし(ステップS2)、処理を作業領域1
31にコピーされた書換プログラム51に移す(ステッ
プS3)。
Next, in the reading program 122, the rewriting program 51 of the memory card 5 is copied to the work area 131 of the RAM 13 (step S2), and the processing is performed in the work area 1
Then, the process proceeds to the rewriting program 51 copied to the program 31 (step S3).

【0024】次に、書換プログラム51では、フラッシ
ュメモリ12に記憶されている制御プログラム121の
種別を示す識別子と、メモリカード5に記憶されている
新制御プログラム52の種別を示す識別子とを比較し、
同一種別でないならば処理を終了させる(ステップS
4)。次いで、新制御プログラム52と制御プログラム
121のバージョン情報を比較し、新制御プログラム5
2が制御プログラム121よりもバージョンが新しいも
のでないならば処理を終了させる(ステップS5)。次
いで、フラッシュメモリ12における制御プログラム1
21の格納領域を初期化し(ステップS6)、メモリカ
ード5に記憶されている新制御プログラム52をフラッ
シュメモリ12に転送し書き込む(ステップS7)。最
後に、CPU11はフラッシュメモリ12に転送された
新制御プログラム52の処理に移る(ステップS8)。
Next, the rewriting program 51 compares the identifier indicating the type of the control program 121 stored in the flash memory 12 with the identifier indicating the type of the new control program 52 stored in the memory card 5. ,
If they are not the same type, the process is terminated (step S
4). Next, the version information of the new control program 52 and the version information of the control program 121 are compared, and the new control program 5
If No. 2 is not a newer version than the control program 121, the process is terminated (step S5). Next, the control program 1 in the flash memory 12
The storage area 21 is initialized (step S6), and the new control program 52 stored in the memory card 5 is transferred to the flash memory 12 and written (step S7). Finally, the CPU 11 shifts to processing of the new control program 52 transferred to the flash memory 12 (step S8).

【0025】以上のステップにより、制御装置1にメモ
リカード5が装着されると、読出プログラム122によ
り、メモリカード5に記憶されている書換プログラム5
1が制御装置1内に設けられているRAM13の作業領
域131に読み出され、これが実行される。書換プログ
ラム51が実行されると、メモリカード5に記憶されて
いる新制御プログラム52が書き換え条件を満たしてい
る場合にのみフラッシュメモリ12の制御プログラム1
21が新制御プログラム52に書き換えられる。このよ
うに、本実施の形態の制御装置1では、書換プログラム
51が制御装置1に設けられたRAM13の作業領域1
31において実行される。したがって、書換実行中に外
部記憶媒体であるメモリカード5が抜き外された場合に
は、書換プログラム51からアクセス対象となるメモリ
カード5が存在しないことにより書換プログラム51は
正常に実行できなくなるものの、CPU11のプログラ
ムカウンタはRAM13内のアドレスを示しているので
CPU11の暴走を防止できる。また、書換プログラム
51はフラッシュメモリ12の制御プログラム121の
みを書き換えるので、書換プログラム51の実行中にメ
モリカード5が抜き外された場合であっても、読出プロ
グラム122が初期化されたりデータ破損を受けない。
これにより、読出プログラム122を再実行することに
より制御プログラムの書き換えを確実に再開させること
ができる。したがって、制御プログラムの書き換えを確
実に行うことができる。
When the memory card 5 is mounted on the control device 1 by the above steps, the rewriting program 5 stored in the memory card 5 is read by the read program 122.
1 is read into the work area 131 of the RAM 13 provided in the control device 1 and is executed. When the rewriting program 51 is executed, the control program 1 of the flash memory 12 is only stored when the new control program 52 stored in the memory card 5 satisfies the rewriting condition.
21 is rewritten to the new control program 52. As described above, in the control device 1 of the present embodiment, the rewrite program 51 is stored in the work area 1 of the RAM 13 provided in the control device 1.
It is executed at 31. Therefore, when the memory card 5 as the external storage medium is removed during execution of the rewriting, the rewriting program 51 cannot be normally executed because the memory card 5 to be accessed from the rewriting program 51 does not exist. Since the program counter of the CPU 11 indicates the address in the RAM 13, runaway of the CPU 11 can be prevented. In addition, since the rewriting program 51 rewrites only the control program 121 of the flash memory 12, even if the memory card 5 is removed during execution of the rewriting program 51, the reading program 122 is initialized or data corruption may occur. I do not receive.
Thus, rewriting of the control program can be reliably restarted by re-executing the read program 122. Therefore, the control program can be reliably rewritten.

【0026】また、書換プログラム51は、新制御プロ
グラム52が、フラッシュメモリ12に記憶されている
制御プログラム121に対して、同一種別であり、且つ
バージョンが新しくなっている場合にのみ書き換えを行
う。これにより、誤った種類の制御プログラムや古いバ
ージョンの制御プログラムに書き換えられることがな
い。また、この制御プログラムの種別やバージョンのチ
ェックは書換プログラム51により行われ、この書換プ
ログラム51はメモリカード5に記憶されているので、
当該チェック方法を変更する場合には、制御装置1のR
OM交換等を行うことなく当該書換プログラム51を変
更するだけで容易に行うことができる。
The rewriting program 51 rewrites the new control program 52 only when the control program 121 stored in the flash memory 12 is of the same type and has a new version. As a result, the control program is not rewritten to the wrong type of control program or the old version of the control program. The type and version of the control program are checked by the rewriting program 51. Since the rewriting program 51 is stored in the memory card 5,
To change the checking method, the R
This can be easily performed by simply changing the rewriting program 51 without performing OM exchange or the like.

【0027】なお、本実施の形態では、書換プログラム
51において制御プログラムの書き換えに先立って、そ
の種別及びバージョンをチェックしていたが、種別のみ
のチェック又はバージョンのみのチェックとしてもよ
い。制御プログラムの種別のみをチェックする場合に
は、古いのバージョンの制御プログラムによる書き換え
が可能になる。これは、例えば制御プログラムの更新後
に当該制御プログラムに不具合があった場合など、種々
の理由により制御プログラムを古いものに戻す必要があ
る場合などに有効である。また、バージョンのみをチェ
ックする場合には、適用可能な自動販売機が単一であっ
たり、全ての自動販売機で適用可能な場合などに有効で
ある。また、これらの場合には、書換プログラム51を
簡略化することができる。
In this embodiment, the rewriting program 51 checks the type and version of the control program before rewriting the control program. However, only the type or the version may be checked. When only the type of the control program is checked, rewriting by an old version of the control program becomes possible. This is effective when it is necessary to return the control program to an old one for various reasons, for example, when there is a problem in the control program after the update of the control program. Checking only the version is effective when only one vending machine can be applied or when all vending machines can be applied. In these cases, the rewriting program 51 can be simplified.

【0028】また、本実施の形態では、メモリカード5
の装着により割込信号が発生し、これにより読出プログ
ラム122が実行されるように構成したが、本発明はこ
れに限定されるものではない。例えば、メモリカード5
の装着後にリモコン4を操作して書き換え動作を開始す
るようにしてもよい。
In the present embodiment, the memory card 5
Is configured to generate an interrupt signal upon execution of the readout program 122, thereby executing the reading program 122. However, the present invention is not limited to this. For example, memory card 5
The rewriting operation may be started by operating the remote controller 4 after the mounting.

【0029】さらに、本実施の形態では、制御プログラ
ム121と読出プログラム122を一つのフラッシュメ
モリ12に記憶させたが、制御プログラム121と読出
プログラム122をそれぞれ異なる記憶手段に記憶させ
てもよい。
Further, in the present embodiment, the control program 121 and the read program 122 are stored in one flash memory 12, but the control program 121 and the read program 122 may be stored in different storage units.

【0030】さらに、本実施の形態では、制御プログラ
ム121と読出プログラム122の記憶手段としてフラ
ッシュメモリ12を用いたが、本発明はこれに限定され
るものではない。すなわち、電気的に書き換え可能な不
揮発性の記憶手段であれば他のものであってもよい。例
えば、いわゆるEEPROMと呼ばれる記憶素子を用い
てもよく、また磁気記憶装置や光磁気記憶装置などを用
いてもよい。
Further, in the present embodiment, the flash memory 12 is used as the storage means for the control program 121 and the read program 122, but the present invention is not limited to this. That is, any other electrically rewritable nonvolatile storage means may be used. For example, a storage element called an EEPROM may be used, or a magnetic storage device or a magneto-optical storage device may be used.

【0031】さらに、本実施の形態では、書換プログラ
ム51を一時的に格納する記憶手段として、SRAMで
あるRAM13を用いたが、本発明はこれに限定される
ものではない。すなわち、一時的にプログラムを格納す
ることができれば、不揮発性であっても揮発性であって
もよい。例えば、フラッシュメモリなどを用いてもよ
く、またDRAMなどを用いてもよい。
Further, in the present embodiment, the RAM 13 which is an SRAM is used as the storage means for temporarily storing the rewriting program 51, but the present invention is not limited to this. That is, as long as the program can be temporarily stored, the program may be nonvolatile or volatile. For example, a flash memory or the like may be used, or a DRAM or the like may be used.

【0032】さらに、本実施の形態では、書換プログラ
ム51及び新制御プログラム52を記憶する着脱可能な
外部記憶媒体としてメモリカード5を用いたが、本発明
はこれに限定されるものではない。他の半導体記憶素子
や磁気記憶媒体や光磁気記憶媒体、光記憶媒体などであ
ってもよい。例えば、フロッピーディスクやCD−RO
Mなどを用いてもよい。
Further, in the present embodiment, the memory card 5 is used as a removable external storage medium for storing the rewriting program 51 and the new control program 52, but the present invention is not limited to this. Other semiconductor storage elements, magnetic storage media, magneto-optical storage media, optical storage media, and the like may be used. For example, floppy disk or CD-RO
M or the like may be used.

【0033】[0033]

【発明の効果】以上詳述したように、本発明にかかる自
動販売機の制御装置によれば、外部記憶媒体が装着され
ると、演算装置が第2記憶手段に記憶されている読出プ
ログラムを実行することにより、外部記憶媒体に記憶さ
れている書換プログラムが第3記憶手段に読み出され
る。この後に、演算装置は第3記憶手段に読み出された
書換プログラムを実行することにより、第1記憶手段に
記憶されている制御プログラムが、外部記憶媒体に記憶
されている第2の制御プログラムに書き換えられる。こ
のように、書換プログラムが制御装置に設けられた第3
記憶手段において実行されるので、書換実行中に外部記
憶媒体が抜き外された場合には、当該書換プログラムの
実行は正常に完了しないものの、演算装置の暴走を防止
することができる。また、書換プログラムは制御プログ
ラムのみを書き換えるので、書換プログラムの実行中に
外部記憶媒体が抜き外された場合であっても、読出プロ
グラムが初期化されたりデータ破損を受けない。これに
より、制御プログラムの書き換えを確実に再開させるこ
とができる。したがって、制御プログラムの書き換えを
確実に行うことができる。
As described above in detail, according to the vending machine control device of the present invention, when an external storage medium is mounted, the arithmetic unit reads the read program stored in the second storage means. By executing, the rewriting program stored in the external storage medium is read out to the third storage means. Thereafter, the arithmetic unit executes the rewriting program read out to the third storage means, so that the control program stored in the first storage means is replaced with the second control program stored in the external storage medium. Rewritten. As described above, the rewriting program is provided in the third device provided in the control device.
Since the execution is performed by the storage means, if the external storage medium is removed during the execution of the rewriting, the execution of the rewriting program is not completed normally, but runaway of the arithmetic unit can be prevented. Further, since the rewriting program rewrites only the control program, even if the external storage medium is removed during the execution of the rewriting program, the reading program is not initialized and the data is not damaged. Thereby, the rewriting of the control program can be reliably restarted. Therefore, the control program can be reliably rewritten.

【図面の簡単な説明】[Brief description of the drawings]

【図1】自動販売機の制御装置の構成図FIG. 1 is a configuration diagram of a control device of a vending machine.

【図2】制御プログラムの書換動作を説明するフローチ
ャート
FIG. 2 is a flowchart illustrating a rewriting operation of a control program.

【符号の説明】[Explanation of symbols]

1…制御装置、11…CPU、12…フラッシュメモ
リ、121…制御プログラム、122…読出プログラ
ム、13…RAM、131…作業領域、14…I/Oイ
ンターフェース、15…バス、5…メモリカード、51
…書換プログラム、52…新制御プログラム
DESCRIPTION OF SYMBOLS 1 ... Control device, 11 ... CPU, 12 ... Flash memory, 121 ... Control program, 122 ... Reading program, 13 ... RAM, 131 ... Work area, 14 ... I / O interface, 15 ... Bus, 5 ... Memory card, 51
... Rewriting program, 52 ... New control program

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 制御プログラムが記憶された電気的に書
き換え可能な第1記憶手段と、第1記憶手段の制御プロ
グラムを実行する演算装置とを備え、着脱自在な外部記
憶媒体を装着することにより前記制御プログラムを書き
換え可能な自動販売機の制御装置において、 前記外部記憶媒体には、第2の制御プログラムと、前記
第1記憶手段に記憶された制御プログラムを第2の制御
プログラムに書き換える書換プログラムとが予め記憶さ
れ、 外部記憶媒体に記憶されている書換プログラムを読み出
す読出プログラムが記憶された第2記憶手段と、読出プ
ログラムにより読み出された書換プログラムを一時的に
格納する第3記憶手段とを備え、 前記演算装置は、外部記憶媒体が装着されると前記読出
プログラムを実行して外部記憶媒体に記憶されている書
換プログラムを第3記憶手段に格納し、第3記憶手段に
記憶した書換プログラムを実行することを特徴とする自
動販売機の制御装置。
1. An electronically rewritable first storage means in which a control program is stored, and an arithmetic unit for executing the control program in the first storage means, wherein a removable external storage medium is mounted. In the vending machine control device capable of rewriting the control program, the external storage medium has a second control program and a rewriting program for rewriting a control program stored in the first storage means into a second control program. A second storage unit in which a read program for reading a rewrite program stored in an external storage medium is stored in advance, and a third storage unit for temporarily storing a rewrite program read by the read program. The arithmetic unit executes the readout program when an external storage medium is mounted and is stored in the external storage medium. A rewriting program stored in the third storage means, and the rewriting program stored in the third storage means is executed.
【請求項2】 前記書換プログラムの実行では、外部記
憶媒体に記憶されている第2の制御プログラムが第1記
憶手段に記憶されている制御プログラムと比較して同一
種別であるときにのみ書き換えを行うことを特徴とする
請求項1記載の自動販売機の制御装置。
2. The execution of the rewriting program, the rewriting is performed only when the second control program stored in the external storage medium is of the same type as the control program stored in the first storage means. The vending machine control device according to claim 1, wherein the control is performed.
【請求項3】 前記書換プログラムの実行では、外部記
憶媒体に記憶されている第2の制御プログラムが第1記
憶手段に記憶されている制御プログラムと比較してバー
ジョンが新しいものであるときにのみ書き換えを行うこ
とを特徴とする請求項1記載の自動販売機の制御装置。
3. The execution of the rewriting program is performed only when the version of the second control program stored in the external storage medium is newer than the version of the control program stored in the first storage means. The control device for a vending machine according to claim 1, wherein rewriting is performed.
【請求項4】 前記書換プログラムの実行では、外部記
憶媒体に記憶されている第2の制御プログラムが第1記
憶手段に記憶されている制御プログラムと比較して同一
種別且つバージョンが新しいものであるときにのみ書き
換えを行うことを特徴とする請求項1記載の自動販売機
の制御装置。
4. The execution of the rewriting program, wherein the second control program stored in the external storage medium is of the same type and newer version than the control program stored in the first storage means. 2. The vending machine control device according to claim 1, wherein rewriting is performed only at a time.
JP11207664A 1999-07-22 1999-07-22 Controller for automatic vending machine Pending JP2001034822A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11207664A JP2001034822A (en) 1999-07-22 1999-07-22 Controller for automatic vending machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11207664A JP2001034822A (en) 1999-07-22 1999-07-22 Controller for automatic vending machine

Publications (1)

Publication Number Publication Date
JP2001034822A true JP2001034822A (en) 2001-02-09

Family

ID=16543521

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11207664A Pending JP2001034822A (en) 1999-07-22 1999-07-22 Controller for automatic vending machine

Country Status (1)

Country Link
JP (1) JP2001034822A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6421279B1 (en) * 1993-04-08 2002-07-16 Hitachi, Ltd. Flash memory control method and apparatus processing system therewith
JP2002324266A (en) * 2001-04-25 2002-11-08 Fuji Electric Co Ltd Automatic vending machine
JP2003076433A (en) * 2001-08-30 2003-03-14 Anritsu Corp Measuring device
US6741910B1 (en) * 2001-03-16 2004-05-25 Fuji Electric Co., Ltd. Control device for automatic vending machine
JP2006079259A (en) * 2004-09-08 2006-03-23 Juki Corp Controller
JP2009048584A (en) * 2007-08-23 2009-03-05 Sony Corp Information processing apparatus, information processing method, and computer program
WO2011027574A1 (en) 2009-09-03 2011-03-10 サンデン株式会社 Control device for a vending machine
JP2011249312A (en) * 2010-04-28 2011-12-08 Jsr Corp Electronic component, connection method of electronic member, and circuit connection member
WO2015136972A1 (en) * 2014-03-14 2015-09-17 オムロン株式会社 Control apparatus and control apparatus system

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6421279B1 (en) * 1993-04-08 2002-07-16 Hitachi, Ltd. Flash memory control method and apparatus processing system therewith
US6741910B1 (en) * 2001-03-16 2004-05-25 Fuji Electric Co., Ltd. Control device for automatic vending machine
JP2002324266A (en) * 2001-04-25 2002-11-08 Fuji Electric Co Ltd Automatic vending machine
JP2003076433A (en) * 2001-08-30 2003-03-14 Anritsu Corp Measuring device
JP2006079259A (en) * 2004-09-08 2006-03-23 Juki Corp Controller
JP4591486B2 (en) * 2007-08-23 2010-12-01 ソニー株式会社 Information processing apparatus, information processing method, and computer program
JP2009048584A (en) * 2007-08-23 2009-03-05 Sony Corp Information processing apparatus, information processing method, and computer program
WO2011027574A1 (en) 2009-09-03 2011-03-10 サンデン株式会社 Control device for a vending machine
JP2011249312A (en) * 2010-04-28 2011-12-08 Jsr Corp Electronic component, connection method of electronic member, and circuit connection member
WO2015136972A1 (en) * 2014-03-14 2015-09-17 オムロン株式会社 Control apparatus and control apparatus system
CN106062766A (en) * 2014-03-14 2016-10-26 欧姆龙株式会社 Control apparatus and control apparatus system
JPWO2015136972A1 (en) * 2014-03-14 2017-04-06 オムロン株式会社 Control device and control device system
US10187379B2 (en) 2014-03-14 2019-01-22 Omron Corporation Control apparatus and control apparatus system

Similar Documents

Publication Publication Date Title
US20040015941A1 (en) Information-processing apparatus equipped with nonvolatile memory device and firmware-updating method for use in the apparatus
US7657732B2 (en) Apparatus and method for securely and conveniently rebooting a computer system
CN104025047A (en) Information Processing Device, Information Processing Method, And Computer Program
JP2010195111A (en) Onboard computer system
JP2001034822A (en) Controller for automatic vending machine
JP3385844B2 (en) vending machine
JP3093541B2 (en) Terminal device and online system for managing version numbers of programs and data
JP2008009799A (en) Image forming device
JP3028055B2 (en) PC card system and program rewriting method
JP2000066928A (en) Processing history recording system
JPH08161160A (en) Method for updating firmware of optical disk reproducing device
JP2001117779A (en) Electronic instrument and program rewriting method
JP2009251680A (en) Method and program for starting information processor
JPH04299728A (en) Data recorder
JP2000172917A (en) Controller for vending machine
CN117806924B (en) Control method and device of indicating device, server and medium
JP2001273143A (en) Electronic controller
JP2000149111A (en) Controller for automatic vending machine
JP3037375B2 (en) File compression processing method
JP2001265602A (en) Program booting system
JPH11338690A (en) Flash memory, firmware use system device and firmware rewriting method
JPH1091539A (en) Data storage
CN1235147C (en) Information management system and method for application device
CN117806924A (en) Control method and device of indicating device, server and medium
JPH08286948A (en) Device and method for supporting software development

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060120

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090309

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090330

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090520

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090730