JP3284929B2 - vending machine - Google Patents

vending machine

Info

Publication number
JP3284929B2
JP3284929B2 JP17948497A JP17948497A JP3284929B2 JP 3284929 B2 JP3284929 B2 JP 3284929B2 JP 17948497 A JP17948497 A JP 17948497A JP 17948497 A JP17948497 A JP 17948497A JP 3284929 B2 JP3284929 B2 JP 3284929B2
Authority
JP
Japan
Prior art keywords
program
storage means
vending machine
stored
control data
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.)
Expired - Lifetime
Application number
JP17948497A
Other languages
Japanese (ja)
Other versions
JPH10177674A (en
Inventor
義信 特手
一哉 川▲崎▼
一彦 杉野
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
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
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=26499330&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=JP3284929(B2) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP17948497A priority Critical patent/JP3284929B2/en
Priority to KR1019970052438A priority patent/KR19980032787A/en
Publication of JPH10177674A publication Critical patent/JPH10177674A/en
Application granted granted Critical
Publication of JP3284929B2 publication Critical patent/JP3284929B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/108Transfer of content, software, digital rights or licenses
    • G06F21/1082Backup or restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/18Payment architectures involving self-service terminals [SST], vending machines, kiosks or multimedia terminals

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、記憶媒体としてフ
ラッシュメモリを備え、そのフラッシュメモリに制御プ
ログラムなどのデータをメモリカードを介して記憶させ
る機構の自動販売機に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a vending machine having a flash memory as a storage medium and storing data such as a control program in the flash memory via a memory card.

【0002】[0002]

【従来の技術】自動販売機にあっても制御プログラムの
バージョンアップが必要になる。これは、機能アップの
ためのバージョンアップというよりも、自動販売機の管
理会社からの要請に基づくものが多い。同一タイプの自
動販売機であっても納入先の管理会社によって異なるプ
ログラムが組み込まれることもある。
2. Description of the Related Art It is necessary to upgrade a control program even in a vending machine. This is often based on a request from a vending machine management company rather than a version upgrade for functional enhancement. Even for the same type of vending machine, different programs may be installed depending on the management company of the delivery destination.

【0003】さて、その制御プログラムは、通常、EP
−ROMと呼ばれる記憶媒体に書き込まれているが、従
来は、そのEP−ROM単体をROM書き込み機にセッ
トしてプログラムを書き込んでから、そのEP−ROM
を基板に実装している。
[0003] The control program is usually EP
-Written in a storage medium called a ROM, conventionally, the EP-ROM alone is set in a ROM writer to write a program, and then the EP-ROM is written.
Is mounted on the substrate.

【0004】このようなことから、ROMを一旦基板に
実装してしまうと、プログラムのバージョンアップ等で
プログラムを変更したい場合、ROMを基板から取り外
し(そのためには基板を収納しているボックスから分解
しなければならないこともある)、そして、取り外した
ROMの内容を光学的な処理により消去してから再度、
ROM書き込み機にセットし、改めてデータ書き込みを
行うか、別途、新たにROMを用意し、そのROMを基
板に実装しなければならない。このように実装済みのR
OMに対するプログラム変更(俗にいうP−ROM交換)
には多数の手間と工程がかかる。
[0004] For this reason, once the ROM is mounted on the board, if it is desired to change the program by upgrading the program, the ROM is removed from the board (for this purpose, the ROM is disassembled from the box containing the board). You may have to do that), and then erase the contents of the removed ROM by optical processing,
It must be set in a ROM writer and write data again, or a new ROM must be separately prepared and the ROM must be mounted on a board. R already implemented in this way
Program change for OM (P-ROM exchange commonly called)
Requires a lot of labor and steps.

【0005】そこで通常のRAMのように電気的に書き
込みおよび消去が容易に行えるフラッシュメモリがEP
−ROMの代替として注目されるようになっている。こ
のフラッシュメモリは、データのバックアップ不要でか
つ大容量のデータ記憶が可能であることからプログラム
の記憶媒体に適する。
[0005] Therefore, a flash memory which can be easily electrically written and erased like a normal RAM is EP.
-Attention is being paid as an alternative to ROM. This flash memory is suitable for a program storage medium because it does not require data backup and can store a large amount of data.

【0006】図29は、自動販売機内の制御ボックスに
フラッシュメモリを備えたものを示しており、1は本自
動販売機を総括制御するマイクロコンピュータ(以下マ
イコンと略記)であり、フラッシュメモリ2に記憶のプ
ログラムおよびRAM3に記憶の販売制御に必要な制御
用データ(設定データおよび制御データなど)に基づき、
販売機構(不図示)を制御する。販売が行われると、売上
データとしてRAM3に記憶される。
FIG. 29 shows a vending machine in which a flash memory is provided in a control box. A microcomputer 1 (hereinafter abbreviated as “microcomputer”) controls the vending machine. Based on a storage program and control data (setting data and control data, etc.) necessary for sales control stored in the RAM 3,
It controls a sales organization (not shown). When sales are performed, the sales data is stored in the RAM 3.

【0007】このようなフラッシュメモリ2に、バージ
ョンアップなどの理由により、制御プログラムを書き替
える場合、一般には、フラッシュメモリ書き込み装置4
を用い、シリアル通信などによって、マイコン1を介し
てフラッシュメモリ2に制御プログラムを書き込んでい
る。書き込んだプログラムによって、RAM3に記憶し
ている制御用データの格納アドレスが異なるため、制御
プログラムを書き換えた場合、RAM3に記憶していた
元の制御用データは無効となる。
When the control program is rewritten to such a flash memory 2 for a reason such as version upgrade, the flash memory writing device 4 is generally used.
The control program is written in the flash memory 2 via the microcomputer 1 by serial communication or the like. Since the storage address of the control data stored in the RAM 3 differs depending on the written program, when the control program is rewritten, the original control data stored in the RAM 3 becomes invalid.

【0008】[0008]

【発明が解決しようとする課題】そこで、従来は図20
に示したように、プログラムを書き替える前に、制御用
データを、別途接続した別ユニットのデータローダ5な
どに退避させておき、プログラムの書き込み後に、退避
させていた制御用データを、適したアドレスに改めて再
配置するか、キーボード6を用いて逐一手作業にて再入
力する必要があり、手間がかかる。
Therefore, conventionally, FIG.
As shown in (1), before the program is rewritten, the control data is saved in the data loader 5 or the like of another unit separately connected, and after the program is written, the saved control data is replaced with an appropriate data. It is necessary to rearrange the addresses again, or to manually re-enter the addresses one by one using the keyboard 6, which is troublesome.

【0009】しかも、書き込む制御プログラムによって
は、制御用データの退避作業が必要でない場合もあるた
め、プログラムの書き込みの際に制御用データの退避の
要、不要を事前に把握しておなければならず、勘違いに
より、データの退避が必要なのにそれを行わなかった為
に、自動販売機が誤動作するといつた課題が生じた。
In addition, depending on the control program to be written, it may not be necessary to save the control data. Therefore, it is necessary to know in advance whether the control data must be saved when writing the program. However, because of the misunderstanding, the data was required to be evacuated, but this was not performed, and a problem occurred when the vending machine malfunctioned.

【0010】又、メモリカードに記憶されているプログ
ラムが有償の場合でも、前述の書き込み装置を使用する
ことにより、複数台の自動販売機に書き込むことが可能
となるため、不正コピーを防止することはできなかっ
た。
[0010] Further, even if the program stored in the memory card is charged, it is possible to write in a plurality of vending machines by using the above-mentioned writing device, thereby preventing illegal copying. Could not.

【0011】従って本発明は、書き込み、消去が可能な
メモリに格納されたプログラムのバージョンアップ等の
管理を容易かつ正確に行える自動販売機を提供すること
を目的とする。
SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a vending machine which can easily and accurately manage the version upgrade of a program stored in a writable and erasable memory.

【0012】[0012]

【課題を解決するための手段】請求項1に係わる自動販
売機は、図1に示すように、携帯メモリ(150)に、新プ
ログラムを記憶するプログラム記憶手段(151)とは別
に、新たに新制御用データを記憶する制御用データ記憶
手段(152)を設けている。
As shown in FIG. 1, a vending machine according to claim 1 is newly provided in a portable memory (150) separately from a program storage means (151) for storing a new program. A control data storage means (152) for storing new control data is provided.

【0013】その携帯メモリ(150)を自動販売機に装着
したとき、携帯メモリ(150)のプログラム記憶手段(151)
から読み出された新プログラムは、プログラム記憶手段
(101)に書き込まれ、又、新制御用データ記憶手段(152)
から読み出された新制御用データは、制御用データ記憶
手段(102)に書き込まれる。このように携帯メモリ(150)
に記憶のプログラムおよび制御用テータを自動販売機(1
00)にコピーすることができる。
When the portable memory (150) is mounted on a vending machine, a program storage means (151) of the portable memory (150) is provided.
The new program read from the
(101), and new control data storage means (152)
The new control data read from is written to the control data storage means (102). Thus portable memory (150)
Vending machine (1
00).

【0014】請求項2に係わる自動販売機は、プログラ
ム記憶手段(101)および制御用データ記憶手段(102)に記
憶の現行のプログラムおよび制御用データを用いるか、
携帯メモリ(150)のプログラム記憶手段(101)および制御
用データ記憶手段(102)に記憶の新プログラムおよび制
御用データを用いるかを切り替えるためのメモリマップ
切換手段(SW)を備えており、この構成により、携帯メモ
リ(150)を装着することにより、自動販売機(100)側の現
行のプログラムを書き換えることなく、携帯メモリ(15
0)側のプログラムで動作可能となる。
The vending machine according to claim 2 uses the current program and control data stored in the program storage means (101) and the control data storage means (102),
The program storage means (101) and the control data storage means (102) of the portable memory (150) are provided with a memory map switching means (SW) for switching between using a new program stored and control data. By the configuration, the portable memory (150) can be installed without rewriting the current program on the vending machine (100) side by installing the portable memory (150).
Operation becomes possible with the 0) side program.

【0015】請求項3に係わる自動販売機は、図3に示
すように、携帯メモリ(150)に、新プログラムに対応し
た制御用データの種類および記憶エリア等の情報を記憶
している制御データ毎情報記憶手段(153)と、制御用デ
ータ記憶手段(102)に記憶されていた制御用データを一
時的に退避させるための一時退避データ記憶手段(154)
と、後述の制御データ毎情報記憶手段(103)に記憶の制
御データの種類等の情報を退避させて記憶する一時退避
データ情報記憶手段(155)とを備え、自動販売機(100)に
は、プログラム記憶手段(101)に記憶の現行のプログラ
ムに対応した制御データの情報を記憶している制御デー
タ毎情報記憶手段(103)を備える。
As shown in FIG. 3, a vending machine according to a third aspect of the present invention has a portable memory (150) in which information such as a type of control data and a storage area corresponding to a new program is stored. Each information storage means (153) and a temporary save data storage means (154) for temporarily saving the control data stored in the control data storage means (102)
A temporary save data information storage means (155) for saving and storing information such as the type of control data stored in the control data for each control data information means (103) described later, and the vending machine (100) And a control-data-specific information storage means (103) storing information of control data corresponding to the current program stored in the program storage means (101).

【0016】自動販売機(100)に新プログラムを書き込
むとき、制御用データ記憶手段(102)に記憶のプログラ
ム用の制御データを制御データ毎情報記憶手段(103)の
情報に基づき、一時退避データ記憶手段(154)に一時退
避させ、そのデータを新プログラム用制御データ毎情報
記憶手段(153)の情報に基づき、制御用データ記憶手段
(102)に再配置することにより、新プログラム用の制御
用データを得ることができ、売上データはそのまま利用
できる。尚、請求項4に示したように、一時退避データ
記憶手段(154)および一時退避データ情報記憶手段(155)
は自動販売機側に持つようにしてもよい。
When a new program is written in the vending machine (100), the control data for the program stored in the control data storage means (102) is temporarily stored in the control data storage means (102) based on the information of the control data information storage means (103). The data is temporarily saved in the storage means (154), and the data is stored in the control data storage means based on the information in the new program control data per information storage means (153).
By relocating to (102), control data for the new program can be obtained, and the sales data can be used as it is. As described in claim 4, the temporary save data storage means (154) and the temporary save data information storage means (155)
May be provided on the vending machine side.

【0017】請求項5に係わる自動販売機は、図4に示
すように、携帯メモリ(150)の新プログラム用制御デー
タ毎情報記憶手段(153)に記憶の情報と、制御用データ
毎情報記憶手段(103)に記憶の情報とが同一であるかを
比較する手段(104)を備え、その比較により、両情報が
異なる場合は、請求項3のごとく、制御用データ記憶手
段(102)に記憶の制御用データを携帯メモリに一時退避
させ、改めて所定のアドレスに再配置するが、両情報が
同一の場合は、制御用データの退避、再配置を行なう必
要はない。
According to a fifth aspect of the present invention, as shown in FIG. 4, the information stored in the new program control data per information storage means (153) of the portable memory (150) and the control data per information storage are provided. The means (103) is provided with means (104) for comparing whether the stored information is the same as the stored information. If the two information are different by the comparison, the control data storage means (102) is added to the control data storage means (102). The stored control data is temporarily saved in the portable memory and relocated to a predetermined address again. However, if the two information are the same, it is not necessary to save and relocate the control data.

【0018】請求項6に係わる自動販売機は、図5に示
すように、携帯メモリ(150)に記憶の制御プログラムの
種別(缶機用、カップ機用など)を記憶する手段(155)を
携帯メモリ(150)に備え、当該自動販売機(100)には、記
憶している現行のプログラムの種別を記憶する手段(10
5)および、両プログラムの種別が同一であるかを比較す
る比較手段(106)を備え、プログラムの書き換えの際
に、両プログラムの種別が同一の場合は、制御用データ
の退避、再配置を行うが、プログラムの種別が異なる場
合は、制御用データにデータレベルの互換性がないた
め、標準値書込手段(107)に記憶の標準値を、自動販売
機(100)の制御用データ記憶手段(102)に書き込む。
As shown in FIG. 5, the vending machine according to claim 6 includes means (155) for storing the type of control program (for cans, cups, etc.) in the portable memory (150). In the portable memory (150), the vending machine (100) stores the type of the stored current program (10
5) and comparing means (106) for comparing whether the types of both programs are the same, and when rewriting the programs, if the types of both programs are the same, save and relocate the control data. If the type of the program is different, the control data is not compatible with the data level, so the standard value of the storage is stored in the standard value writing means (107), and the control data of the vending machine (100) is stored. Write to means (102).

【0019】請求項7に係わる自動販売機は、図6に示
すように、携帯メモリ(150)に、新プログラムや制御用
データの書き込み処理がどの時点まで終了したかの情報
を記憶する処理経過記憶手段(156)を備え、自動販売機
(100)に、前記情報を作成して処理経過記憶手段(156)に
書き込む処理経過書込手段(106)と、処理経過記憶手段
(156)の記憶内容から書き込みが中断した状態であるか
を判定する中断判定手段(108)と、中断されたことが判
定されたとき、中断した以降の処理から書き込みを再開
する中断再開手段(109)とを備える。これにより、処理
の中断の後に処理を再開したとき、処理経過を中断判定
手段(108)により判定し、中断再開手段(109)により、中
断した以降の処理から再開されるため、最初からやり直
す必要はない。
In the vending machine according to the seventh aspect, as shown in FIG. 6, the process of storing the information indicating to which point the writing process of the new program and the control data has been completed in the portable memory (150) is shown. Vending machine with storage means (156)
(100) a process progress writing means (106) for creating the information and writing the information in the process progress storage means (156);
(156) an interruption determining means (108) for determining whether the writing is interrupted from the stored contents, and an interruption resuming means (108) for restarting the writing from the processing after the interruption when it is determined that the writing has been interrupted. 109). Thus, when the processing is resumed after the interruption of the processing, the processing progress is determined by the interruption determining means (108), and the processing is resumed from the interrupted processing by the interruption resuming means (109). There is no.

【0020】請求項8に係わる自動販売機は、図7に示
すように、一連の処理開始時に、それぞれ共通の認証コ
ードを記憶する認証コード記憶手段(157)、(110)を携帯
メモリおよび当該自動販売機に備え、中断した前記処理
を再開するとき、比較手段(111)の比較により、両記憶
手段に記憶していた認証コードが一致するときは、中断
した以降の処理から再開すればよいが、両認証コードが
異なる場合、つまり、処理再開時に別の携帯メモリを挿
入したような場合は、一般には認証コードは一致せず、
従って、そのような場合は、中断した処理が再開された
場合でも最初から処理を実行する。
As shown in FIG. 7, the vending machine according to claim 8 includes authentication code storage means (157) and (110) for storing a common authentication code at the start of a series of processes, respectively, as a portable memory and a portable memory. In preparation for a vending machine, when resuming the interrupted process, when the authentication codes stored in both storage devices match according to the comparison by the comparing unit (111), the process may be resumed from the process after the interruption. However, if the two authentication codes are different, that is, if another portable memory is inserted when the processing is resumed, the authentication codes generally do not match,
Therefore, in such a case, even if the interrupted process is restarted, the process is executed from the beginning.

【0021】請求項9に係わる自動販売機は、図8に示
すように、当該自動販売機における制御動作の間に変化
した各種データを検出する手段(112)を備え、検出した
変化データを、携帯メモリ(150)に設定した変化データ
記憶手段(158)に記憶することにより、制御異常が発生
したとき、変化データ記憶手段(158)に記憶の変化デー
タを解析することにより、どの時点で異常が発生したか
を知ることができる。
The vending machine according to claim 9 is provided with means (112) for detecting various data changed during the control operation in the vending machine as shown in FIG. By storing the change data in the change data storage means (158) set in the portable memory (150), when a control abnormality occurs, the change data stored in the change data storage means (158) is analyzed to determine Can be known whether or not a problem has occurred.

【0022】請求項10に係わる自動販売機は、図9に
示すように、電源オン時に携帯メモリの装着有無を検出
する手段(113)と、装着時にプログラムの書き込み指示
を出す書き換え指令手段(114)を備えることにより、装
着無しのときは、プログラム記憶手段(101)に記憶のプ
ログラムに基づく制御が実行されるが、携帯メモリの装
着が有ったときは、その携帯メモリに記憶のプログラム
の書き込みが自動的に実行される。
As shown in FIG. 9, the vending machine according to the tenth aspect includes a means (113) for detecting whether or not the portable memory is mounted when the power is turned on, and a rewriting command means (114) for issuing a program writing instruction when the portable memory is mounted. ), The control based on the program stored in the program storage means (101) is executed when there is no attachment, but when the portable memory is attached, the control of the program stored in the portable memory is executed. Writing is performed automatically.

【0023】請求項11に係わる自動販売機は、図10
に示すように、プログラムの書き換え終了後に携帯メモ
リ(150)が取り外されてから電源オンにされたとき、新
プログラムの実行を指示するプログラム実行手段(115)
を備えることにより、プログラムの書き換えから実行ま
での一連の処理を簡便に行える。
The vending machine according to the eleventh aspect is shown in FIG.
As shown in (5), when the portable memory (150) is removed and the power is turned on after the rewriting of the program, the program execution means (115) for instructing the execution of the new program
, A series of processes from rewriting to execution of a program can be easily performed.

【0024】請求項12に係わる自動販売機は、図11
に示すように、新プログラムの書き込み、新制御用デー
タの書き込み、自動販売機内の制御用データの退避、再
配置など、どの動作を実行するための携帯メモリである
かを記憶する動作種別記憶手段(159)を携帯メモリ(150)
に備え、自動販売機(100)には、前記動作種別記憶手段
(159)に記憶の動作種別に基づき、対応する動作の実行
を指令する動作指令手段(116)を備えることにより、所
望の携帯メモリを挿入するだけで、処理内容が異なる種
々の携帯メモリが有る場合でも、装着した携帯メモリに
沿った適した処理が実行される。
A vending machine according to a twelfth aspect is shown in FIG.
Operation type storage means for storing which operation is to be performed, such as writing a new program, writing new control data, saving and rearranging control data in a vending machine, etc. (159) Mobile memory (150)
In the vending machine (100), the operation type storage means
(159) is provided with an operation instructing means (116) for instructing execution of a corresponding operation based on an operation type of storage, so that there are various portable memories having different processing contents only by inserting a desired portable memory. Even in such a case, a process suitable for the attached portable memory is executed.

【0025】請求項13に係わる自動販売機は、図12
に示すように、携帯メモリに使用可能回数または使用回
数を記憶する記憶手段(160)を備え、その携帯メモリが
使用される毎に、計数手段(117)により使用可能回数を
カウントダウン、又は使用回数をカウントアップし、そ
のカウント値が規定値なったことが使用回数判定手段(1
18)により判定されれば、使用禁止手段(119)によって、
以後、その携帯メモリの使用が禁止される。
A vending machine according to a thirteenth aspect is shown in FIG.
As shown in the figure, the portable memory is provided with a storage means (160) for storing the number of usable times or the number of times of use, and each time the portable memory is used, the number of usable times is counted down by the counting means (117), or Is counted up, and it is determined that the count value has reached the specified value.
If determined by (18), by use prohibition means (119),
Thereafter, the use of the portable memory is prohibited.

【0026】尚、請求項14に記載したように、上記計
数手段(117)および使用回数判定手段(118)は携帯メモリ
側に備えてもよい。又、上記使用可能回数または使用回
数が、単なる数値や文字のごとき特定のデータである場
合は、請求項15に示したように、使用回数に関係なく
使用できるようにするのが望ましい。
The counting means (117) and the number-of-times-of-use determining means (118) may be provided on the portable memory side. When the usable number or the number of uses is specific data such as a simple numerical value or a character, it is desirable that the data can be used regardless of the number of uses.

【0027】請求項16に係わる自動販売機は、図13
に示すように、プログラム記憶手段(101)におけるプロ
グラム記憶エリアの終端を記憶しているプログラム記憶
エリア終端記憶手段(120)と、プログラム記憶手段(101)
に記憶された新旧のプログラムの各終端を記憶している
プログラム終端記憶手段(121)と、指定により所望のプ
ログラムを読み出して実行する制御プログラム選択手段
(122)とを備えたることにより、新プログラムで正常に
機能しなかったような場合、旧プログラムを読み出して
販売を制御を続行できる。
FIG. 13 shows a vending machine according to the present invention.
As shown in the figure, a program storage area end storage means (120) storing the end of the program storage area in the program storage means (101), and a program storage means (101)
Program end storage means (121) for storing the end of each of the old and new programs stored in the storage unit, and a control program selecting means for reading and executing a desired program by designating
With the provision of (122), when the new program does not function properly, the old program can be read and the sales can be controlled.

【0028】請求項17に係わる自動販売機は、図14
に示すように、プログラム記憶手段(101)に記憶のプロ
グラムを退避し記憶するプログラム退避記憶手段(123)
と、プログラム記憶手段(101)に新プログラムの書き込
み時に、書き込み異常を検出するプログラム書込み異常
検出手段(124)と、書き込み異常が検出されたとき、プ
ログラム退避手段(123)に退避させていた旧プログラム
をプログラム記憶手段(101)に書き込むプログラム再度
書込み手段(126)とを備えることにより、書き込みが行
えない場合でも元のプログラムで販売を続行できる。
FIG. 14 shows a vending machine according to a seventeenth aspect.
As shown in (1), a program save storage means (123) for saving and storing a program stored in the program storage means (101).
When writing a new program in the program storage means (101), a program writing error detecting means (124) for detecting a writing error, and when a writing error is detected, the program saving means (123) By providing the program rewriting means (126) for writing the program into the program storage means (101), the sales can be continued with the original program even if the writing cannot be performed.

【0029】請求項18に係わる自動販売機は、図15
に示すように、プログラム記憶手段(101)に記憶のプロ
グラムをコピー記憶するプログラム記憶手段(123')と、
プログラム記憶手段(101)に新プログラムの書き込み時
に、書き込み異常が検出されたとき、そのときの書き込
みアドレスを記憶する異常アドレス記憶手段(125)と、
異常が検出されたとき、プログラム記憶手段(101)に、
プログラム記憶手段(123')に記憶していた旧プログラム
を、前記書き込みアドレスまで書き込むプログラム再度
書込み手段(126)とを備えるものであり、書き込みの途
中で異常が生じたとき、旧プログラムに復帰させる必要
があるが、その際、新プログラムが書き込まれたエリア
に対してのみ旧プログラムを書き込むため、プログラム
復旧に要する時間を短縮できる。
FIG. 15 shows a vending machine according to the present invention.
As shown in, program storage means (123 ') to copy and store the program stored in the program storage means (101),
When writing a new program in the program storage means (101), when a write error is detected, an error address storage means (125) for storing the write address at that time,
When an abnormality is detected, the program storage means (101)
A program rewriting means (126) for writing the old program stored in the program storage means (123 ') up to the write address, and when an error occurs during writing, the old program is restored. At this time, since the old program is written only in the area where the new program has been written, the time required for program recovery can be reduced.

【0030】請求項19に係わる自動販売機は、図16
に示すように、プログラム記憶手段(101)に記憶のプロ
グラムを退避し記憶するプログラム退避記憶手段(123)
と、プログラム記憶手段(101)に書き込んだ新プログラ
ムの動作異常を検出する制御プログラム動作異常検出手
段(127)と、動作異常が検出されたとき、プログラム退
避手段(123)に退避させていた旧プログラムをプログラ
ム記憶手段(101)に書き込むプログラム再度書込み手段
(126)とを備えており、新プログラムでの動作が異常の
場合、退避させていた旧プログラムを復活させる。
The vending machine according to the nineteenth aspect is shown in FIG.
As shown in (1), a program save storage means (123) for saving and storing a program stored in the program storage means (101).
And a control program operation abnormality detection means (127) for detecting an operation abnormality of the new program written in the program storage means (101), and an old program stored in the program evacuation means (123) when an operation abnormality is detected. Program rewriting means for writing a program to the program storage means (101)
(126), and when the operation in the new program is abnormal, the saved old program is restored.

【0031】請求項20に係わる自動販売機は、図17
に示すように、自動販売機の制御プログラムおよび制御
用データをそれぞれ記憶する手段(161)、(162)を携帯メ
モリに備えると共に、書き込みモードなのか読み出しモ
ードなのかを記憶するモード記憶手段(163)とを備える
ことにより、読み出しモード時には、自動販売機Aに記
憶のプログラムおよび制御用データを携帯メモリに記憶
し、その携帯メモリを別の自動販売機Bに装着して、書
き込みモードにて、記憶していたプログラムおよび制御
用データをその自動販売機に書き込むことにより、自動
販売機Aのデータを自動販売機Bにコピーすることがで
きる。
A vending machine according to a twentieth aspect is shown in FIG.
As shown in (1), means (161) and (162) for respectively storing a control program and control data of a vending machine are provided in a portable memory, and mode storage means (163) for storing a write mode or a read mode. In the read mode, the program and the control data stored in the vending machine A are stored in the portable memory, and the portable memory is mounted on another vending machine B, and in the write mode, The data of the vending machine A can be copied to the vending machine B by writing the stored program and control data to the vending machine.

【0032】[0032]

【発明の実施の形態】図18は、本発明の自動販売機の
制御ブロック図である。自動販売機制御ボックスにはメ
モリカードインタフェイス7が備えられ、このメモリカ
ードインタフェイス7には携帯メモリとしてメモリカー
ド10が挿入される。11は、メモリマップ切換スイッ
チであり、プログラムとして、フラッシュメモリ2から
読み込むか、メモリカード10から読み込むかを切り換
える。上述した計数手段および使用回数判定手段はマイ
コン1が担うが、メモリカード10側に設けてもよい。
FIG. 18 is a control block diagram of a vending machine according to the present invention. The vending machine control box is provided with a memory card interface 7, and a memory card 10 is inserted into the memory card interface 7 as a portable memory. Reference numeral 11 denotes a memory map changeover switch, which switches between reading from the flash memory 2 and reading from the memory card 10 as a program. The microcomputer 1 performs the counting means and the number-of-times-of-use determining means described above, but may be provided on the memory card 10 side.

【0033】このメモリカード10は、プログラムの記
憶エリア10Aとは別に制御用データとして、設定デー
タ、売上データおよび制御データと、上述した一時退避
データや一時退避データ情報および認証コード等を記憶
する記憶エリア10Bを持つ。一時退避データや一時退
避データ情報はRAM3に記憶するようにしてもよい。
売上データとしては、自動販売機で生じた変化データ
(入金信号や販売信号等)をも記憶する。又、プログラム
には、本プログラムが採用する制御用データをRAM3
のどのアドレスに格納するかを記憶しているRAMデー
タテーブルが含まれる。
The memory card 10 stores setting data, sales data, and control data, and the above-mentioned temporary save data, temporary save data information, an authentication code, and the like as control data separately from the program storage area 10A. It has an area 10B. The temporary save data and the temporary save data information may be stored in the RAM 3.
Sales data includes change data generated by vending machines
(A deposit signal, a sales signal, etc.) are also stored. In the program, control data adopted by the program is stored in the RAM 3.
A RAM data table storing which address is stored in the RAM is included.

【0034】メモリカード10としては、 :メモリカード10に記憶のプログラムと制御用デー
タを自動販売機に書き込む :プログラムだけを書き込み、制御用データについて
は、現行のデータを新プログラム用に再配置して利用す
る :自動販売機のプログラムと制御用データをメモリカ
ード10にコピーし、そのメモリカード10を用いて他
の自動販売機に記憶させるコピー用の3種類の動作種別
がある。 のカードでは、新プログラム用の設定データおよび制
御データを記憶しており、動作種別、のカードで
は、自動販売機のRAM3からの設定データ、売上デー
タおよび制御データが記憶される。
For the memory card 10, write the program and control data stored in the memory card 10 to the vending machine .: Write only the program, and for the control data, rearrange the existing data for the new program. Utilization: There are three types of copying operations in which a program and control data of a vending machine are copied to a memory card 10 and stored in another vending machine using the memory card 10. The card of (1) stores setting data and control data for a new program. The card of operation type stores setting data, sales data, and control data from the RAM 3 of the vending machine.

【0035】以下、本自動販売機の制御動作を図19以
降のフローチャートに従って説明する。自動販売機の電
源をオンにすると、ステップS1からステップS2に進
み、メモリカード10がメモリカードインタフェイス7
に挿入されているかが判断される。挿入されていなけれ
ば、後で説明する図22の制御フローAを実行し、現行
のプログラムに基づき販売制御が行われる。
Hereinafter, the control operation of the vending machine will be described with reference to the flowcharts shown in FIG. When the power of the vending machine is turned on, the process proceeds from step S1 to step S2, in which the memory card 10
Is determined. If not inserted, the control flow A of FIG. 22 described later is executed, and sales control is performed based on the current program.

【0036】メモリカード10が挿入されている場合
は、ステップS2からステップS3に進み、メモリマッ
プ切り換えにより、メモリカード10に記憶のプログラ
ムで直接販売制御を行うのかを判定する。メモリカード
10のプログラムを用いる場合は、ステップS4にて、
メモリマップの切り換えを行う。メモリマップ切換回路
11の詳細を図26に示している。
If the memory card 10 has been inserted, the process proceeds from step S2 to step S3, where it is determined whether or not the sales control is performed directly by the program stored in the memory card 10 by switching the memory map. When the program of the memory card 10 is used, in step S4,
Switches the memory map. Details of the memory map switching circuit 11 are shown in FIG.

【0037】マイコン1よりのチップセレクト信号CS
は、アンドゲートAND2に供給されると共にアンドゲ
ートAND1には反転器INVを通じて供給される。そ
してそれぞれのアンドゲートAND1、AND2の他方
の入力部にはアドレスデコーダ11Aよりの読み出しア
ドレスが供給される。チップセレクト信号CSにより、
いづれか一方のアンドゲートがオンになり、そのオンの
アンドゲートを通じて読み出しアドレスがフラッシュメ
モリ2もしくはメモリカード10のプログラム記憶エリ
ア10Aに送出される。今、アンドゲートAND2をオ
ンにすれば、メモリカード10のプログラムがマイコン
1に読み込まれる。この制御は、現行のプログラムを残
したままで、別のプログラムで販売制御を行わせたいと
きに好適である。
Chip select signal CS from microcomputer 1
Is supplied to the AND gate AND2 and supplied to the AND gate AND1 through the inverter INV. Then, a read address from the address decoder 11A is supplied to the other input section of each of the AND gates AND1 and AND2. By the chip select signal CS,
One of the AND gates is turned on, and the read address is transmitted to the flash memory 2 or the program storage area 10A of the memory card 10 through the ON AND gate. Now, when the AND gate AND2 is turned on, the program of the memory card 10 is read into the microcomputer 1. This control is suitable when the sales control is to be performed by another program while leaving the current program.

【0038】図19に戻り、メモリカード10で自動販
売機を直接制御しない場合は、ステップS3からステッ
プS5に進み、メモリカード10の動作種別が判定され
る。ここでのカード(プログラムと制御用データを書
き込む)であったとき、ステップS6に進み、自動販売
機とメモリカード10とでそれぞれ記憶していた認証コ
ードが一致するかが判定される。
Returning to FIG. 19, when the vending machine is not directly controlled by the memory card 10, the process proceeds from step S3 to step S5, and the operation type of the memory card 10 is determined. If it is the card (write the program and control data) here, the process proceeds to step S6, and it is determined whether the authentication codes stored in the vending machine and the memory card 10 match each other.

【0039】認証コードが一致しない場合、つまり、そ
のメモリカード10が今回初めて当自動販売機に挿入さ
れた場合、データの書き込みは最初から行う必要があ
る。ステップS8に進み、メモリカード10および自動
販売機に認証コードとして現時刻が書き込まれる。ステ
ップS9Aでは、フラッシュメモリ2に新プログラムを
書き込める空き記憶エリアがあるかが判定される。
When the authentication codes do not match, that is, when the memory card 10 is inserted into the vending machine for the first time, data must be written from the beginning. Proceeding to step S8, the current time is written into the memory card 10 and the vending machine as an authentication code. In step S9A, it is determined whether there is an empty storage area in the flash memory 2 where a new program can be written.

【0040】図27に示すように、フラッシュメモリ2
において、旧プログラムのプログラム終端アドレスと、
プログラムエリア終端アドレスとの差から空き記憶エリ
アがわかり、その空き記憶エリアよりも新プログラムの
エリアが大きい場合は新プログラムをプログラムエリア
の先頭アドレスより書き込む。
As shown in FIG. 27, the flash memory 2
In the program end address of the old program,
An empty storage area is known from the difference from the program area end address, and if the area of the new program is larger than the empty storage area, the new program is written from the start address of the program area.

【0041】一方、空き記憶エリアよりも新プログラム
のエリアが小さい場合は新プログラムを書き込むことが
できるため、ステップS9AからステップS10Aに進
み、メモリカード10の新プログラムがフラッシュメモ
リ2の空き記憶エリアに書き込まれる。この場合、フラ
ッシュメモリ2には新旧二つのプログラムが共存する。
ステップS13では、プログラムの書き込みが終了した
段階を示すために状態データとして“1”が記憶され
る。そしてステップS14にてメモリカード10に記憶
の制御用データがRAM3に書き込まれ、続いて制御用
データの書き込みが終了した段階を示すために状態デー
タとして“2”が記憶される。次のステップS16で新
プログラム実行の指令をした場合、ステップS17で新
プログラムのベースアドレスがセットされることによ
り、制御フローAに進んだとき、新プログラムにて販売
制御が行われる。一方、新プログラム実行を指令しなか
ったときは、旧プログラムのベースアドレスがセットさ
れたままなので、現行のプログラムに従って販売制御が
行われる。
On the other hand, when the area of the new program is smaller than the free storage area, the new program can be written. Therefore, the process proceeds from step S9A to step S10A, and the new program of the memory card 10 is stored in the free storage area of the flash memory 2. Written. In this case, the old and new programs coexist in the flash memory 2.
In step S13, "1" is stored as state data to indicate the stage at which the writing of the program has been completed. Then, in step S14, the control data stored in the memory card 10 is written into the RAM 3, and subsequently "2" is stored as state data to indicate the stage at which the writing of the control data has been completed. When a new program execution command is issued in the next step S16, the base address of the new program is set in step S17, and when the process proceeds to the control flow A, sales control is performed by the new program. On the other hand, when the execution of the new program is not instructed, the sales program is controlled according to the current program because the base address of the old program remains set.

【0042】図22の制御フローAにおいて、入金があ
ると(ステップS21)、その入金信号が挿入されていた
メモリカード10に記憶され(ステップS22)、次に商
品選択釦がオンされれば(ステップS23)、その商品選
択信号がメモリカード10に記憶され(ステップS2
4)、そして選択した商品が搬出されれば(ステップS2
5)、その商品搬出の信号がメモリカード10に記憶さ
れる(ステップS27)。つり銭の払い戻しが行われると
(ステップS27)、その払い戻し信号がメモリカード1
0に記憶され(ステップS28)、この後は元に戻り入金
を待つ。この間、制御動作に異常が発生すれば(ステッ
プS29)、当該プログラムによる販売が停止される(ス
テップS30)。
In the control flow A shown in FIG. 22, when there is a deposit (step S21), the deposit signal is stored in the memory card 10 in which the deposit signal has been inserted (step S22). (Step S23), the product selection signal is stored in the memory card 10 (Step S2).
4) Then, if the selected product is carried out (step S2)
5), the signal of the product discharge is stored in the memory card 10 (step S27). Once the change is refunded
(Step S27), the refund signal is the memory card 1
0 (step S28), and thereafter returns to the original state and waits for payment. During this time, if an abnormality occurs in the control operation (step S29), the sales by the program are stopped (step S30).

【0043】このように販売制御で発生した各種信号を
メモリカード10に記憶しておくことで、故障発生時に
記憶していた信号を調べることにより、故障原因を特定
するのに役立つ。尚、図19のステップS2から制御フ
ローAに進んだときは、ステップS22等はスキップす
る。
By storing the various signals generated by the sales control in the memory card 10 as described above, it is useful to identify the cause of the failure by checking the signal stored at the time of the failure. When the process proceeds from step S2 in FIG. 19 to control flow A, step S22 and the like are skipped.

【0044】今までの説明は、メモリカード10を初め
て挿入した場合であったが、例えばステップS13で状
態データ=1が記憶された後、停電等により、以後の書
き込み処理が中断した場合について説明する。その場
合、電源が回復したとき、ステップS1から順に進み、
ステップS6にて、認証コードが一致するか判定され
る。上述の説明からわかるように、両認証コードは一致
するのでステップS7に進む。状態データ=1となって
いるので、ステップS7からステップS14に進み、R
AM3へのデータ書き込みから実施される。状態データ
=2の場合はステップS16に進む。このように前回の
作業で処理が終了した段階から処理が開始されるので無
駄がない。
The description so far has been about the case where the memory card 10 is inserted for the first time. However, for example, after the status data = 1 is stored in step S13, the case where the subsequent write processing is interrupted due to a power failure or the like will be described. I do. In that case, when the power is restored, the process proceeds sequentially from step S1,
In step S6, it is determined whether the authentication codes match. As can be seen from the above description, since the two authentication codes match, the process proceeds to step S7. Since state data = 1, the process proceeds from step S7 to step S14, where R
This is performed from writing data to AM3. If the status data is 2, the process proceeds to step S16. As described above, since the processing is started from the stage where the processing is completed in the previous operation, there is no waste.

【0045】以上の制御はのメモリカードを使用し、
かつ、空き記憶エリアに新プログラムを書き込むもので
あったが、のメモリカード10を使用する別の制御を
図20に示している。ステップS9Bでは、フラッシュ
メモリ2に記憶の現行プログラムがRAM3の空き記憶
エリアに退避され、ステップS10Bでそのフラッシュ
メモリ2に新プログラムが書き込まれ、ステップS11
でその書き込みに異常が発生したかが判定され、発生し
ていないときはステップS10Bにてプログラムの書き
込みが続行される。書き込みが終了すると、ステップS
13にて状態データ=1が記憶され、続いてステップS
14にて制御用データが書き込まれ、状態データ=2が
記憶される。書き込み異常が発生したときは、退避させ
ていた旧プログラムがステップS15Aにてフラッシュ
メモリ2に書き込まれる。尚、現行プログラムを退避さ
せる箇所として自動販売機側の空き記憶エリアとしても
よい。この制御ではプログラムの書き換えが正常に行え
なかった場合でも旧プログラムで販売を継続することが
できる。
The above control uses a memory card,
FIG. 20 shows another control for using the memory card 10 in which the new program is written in the free storage area. In step S9B, the current program stored in the flash memory 2 is evacuated to an empty storage area of the RAM 3, and in step S10B, a new program is written in the flash memory 2, and step S11 is performed.
It is determined whether an error has occurred in the writing, and if not, the program writing is continued in step S10B. When the writing is completed, step S
In step 13, the state data = 1 is stored, and subsequently, in step S
At 14, control data is written, and state data = 2 is stored. If a write error has occurred, the saved old program is written to the flash memory 2 in step S15A. It should be noted that an empty storage area on the vending machine side may be used as a location where the current program is saved. With this control, even if the program cannot be rewritten normally, sales can be continued with the old program.

【0046】この図20の制御に関連する別の制御を図
21に示している。ステップS9Cで現行プログラムが
RAM3の空き記憶エリアに記憶される。データの退避
ではないためフラッシュメモリ2には現行のプログラム
がそのまま残る。ステップS10Bでは、フラッシュメ
モリ2に対して新プログラムが書き込みアドレスの更新
によって順次、上書きされ、その書き込みが終了する
と、ステップS13に進み状態データ=1が記憶され、
続いてステップS14にて制御用データが書き込まれ、
状態データ=2が記憶される。
Another control related to the control of FIG. 20 is shown in FIG. In step S9C, the current program is stored in the free storage area of the RAM 3. Since the data is not saved, the current program remains in the flash memory 2. In step S10B, the new program is sequentially overwritten in the flash memory 2 by updating the write address, and when the writing is completed, the process proceeds to step S13, where status data = 1 is stored, and
Subsequently, control data is written in step S14,
State data = 2 is stored.

【0047】一方、図28に示すように、旧プログラム
の記憶エリアに対して、旧プログラムエリアのスタート
アドレス[S]から新プログラムを上書をしていった
所、書き込みアドレス[Y]の箇所で書き込み異常が発
生したとする。この場合、ステップS15Bにて、スタ
ートアドレス[S]からアドレス[Y]までのエリア
に、別に記憶していた旧プログラムが再び書き込まれる
ことにより、フラッシュメモリ2に、元の旧プログラム
が復元される。この制御によれば、旧プログラムの復旧
に要する時間を短縮できる。
On the other hand, as shown in FIG. 28, the new program is overwritten from the start address [S] of the old program area to the old program storage area, and the write address [Y] is written. It is assumed that a writing error has occurred in. In this case, in step S15B, the old program stored separately is written again in the area from the start address [S] to the address [Y], so that the original old program is restored in the flash memory 2. . According to this control, the time required for restoring the old program can be reduced.

【0048】以上の制御は、新プログラム書き込み時に
異常を検出すれば、旧プログラムに戻るものであった
が、書き込みが正常に行われても実際の新プログラムに
よる動作時に異常が生じる場合がある。それに対応でき
る制御フローA'を図23に示している。
In the above control, if an abnormality is detected at the time of writing a new program, the program returns to the old program. However, even if the writing is performed normally, an abnormality may occur during the operation of the actual new program. FIG. 23 shows a control flow A ′ that can respond to this.

【0049】ステップS21〜ステップS28について
は図22のフローと同じである。プログラム異常検出タ
スクにおいて、販売制御時に異常が発生すると、ステッ
プS31にて新プログラに替えて旧プログラムが復元さ
れる。この制御フローA'が図19のフローに続くもの
であれば、プログラムエリアのベースアドレスを旧プロ
グラムに変更する。この制御フローA'が図20のフロ
ーに続くものであれば、退避させいてた旧プログラムを
フラッシュメモリ2に再書き込みする。この制御フロー
A'が図21のフローに続くものであれば、別に記憶し
ていた旧プログラムをフラッシュメモリ2に再書き込み
する。このようにしてフラッシュメモリ2に旧プログラ
ムを復元した後、ステップS32にてCPUをリセット
することにより、旧プログラムで動作させる。
Steps S21 to S28 are the same as those in the flow of FIG. If an abnormality occurs during sales control in the program abnormality detection task, the old program is restored in place of the new program in step S31. If the control flow A 'follows the flow of FIG. 19, the base address of the program area is changed to the old program. If the control flow A ′ follows the flow of FIG. 20, the saved old program is rewritten to the flash memory 2. If the control flow A ′ follows the flow of FIG. 21, the old program stored separately is rewritten to the flash memory 2. After restoring the old program in the flash memory 2 in this way, the CPU is reset in step S32 to operate with the old program.

【0050】図19に戻り、ステップS5の動作種別の
判定で、挿入されていたメモリカード10の動作種別が
(プログラムだけを書き込み、制御用データについて
は、現行のデータを利用する)の場合、ステップS5か
ら図24のステップS41に進む。
Returning to FIG. 19, the operation type of the inserted memory card 10 is determined by the operation type determination in step S5.
In the case of (writing only the program and using the current data for the control data), the process proceeds from step S5 to step S41 in FIG.

【0051】そのステップS41では自動販売機とメモ
リカード10とにそれぞれ記憶のプログラムとの種別が
同じであるかが判定される。ここで両プログラムの種別
が同一であるとき、ステップS42にて自動販売機とメ
モリカード10とにそれぞれ記憶の制御用データの情報
が一致するかが判定される。一致するときは、ステップ
S43で自動販売機とメモリカード10とにそれぞれ記
憶の認証コードが一致するかが判定され、一致しないと
きはステップS48に進むが一致するときはステップS
44で状態データが0であるかが判定される。状態デー
タが0のときは、ステップS48にて、自動販売機とメ
モリカード10に対して認証コードとして現在の時刻が
書き込まれ、そしてメモリカード10に記憶の新プログ
ラムがフラッシュメモリ10に書き込まれる。
In step S41, it is determined whether the types of programs stored in the vending machine and the memory card 10 are the same. Here, when the types of both programs are the same, it is determined in step S42 whether or not the information of the control data stored in the vending machine and the information of the control data stored in the memory card 10 match. If they match, it is determined in step S43 whether the authentication codes stored in the vending machine and the memory card 10 match, and if they do not match, the process proceeds to step S48, but if they do match, the process proceeds to step S48.
At 44, it is determined whether the status data is 0. If the status data is 0, the current time is written as an authentication code into the vending machine and the memory card 10 in step S48, and the new program stored in the memory card 10 is written into the flash memory 10.

【0052】その際、その書き込みはフラッシュメモリ
の空き記憶エリアに書き込む(図19)、現行のプログラ
ムを一旦退避させた上で新プログラムを書き込む(図2
0)、現行のプログラムを別のメモリにも記憶した上で
現行のプログラムに上書きし、その書込み時に異常が発
生すれば、書き込んだエリアに対しての現行のプログラ
ムを再書き込みする(図21)のいずれであってもよい。
プログラムの書き込みが終了すれば、状態データ=1が
記憶される。
At this time, the writing is performed in an empty storage area of the flash memory (FIG. 19), and the current program is temporarily saved and then a new program is written (FIG. 2).
0), the current program is stored in another memory and overwritten on the current program, and if an error occurs at the time of writing, the current program is rewritten in the written area (FIG. 21). Any of these may be used.
When the writing of the program is completed, the state data = 1 is stored.

【0053】一方、ステップS44にて状態データが0
でなく、2の場合はステップS48をスキップして、図
22または図23の制御フローへ進む。
On the other hand, in step S44, the status data is 0.
However, in the case of 2, the process skips step S48 and proceeds to the control flow of FIG. 22 or 23.

【0054】先のステップS42で制御用データが同一
の情報でないと判定されたときはステップS45に進
み、認証コードが一致するか判定され、一致するときは
ステップS46で状態データが0であるか判定される。
状態データが0であるとき、および認証コードが一致し
ないときは、ステップ47にて、RAM3に記憶の制御
用データが、上述した制御データ毎情報に従ってメモリ
カード10に退避され、状態データ=1が記憶される。
その後はステップS48に進み、認証コードの書き込
み、プログラムの書き換えおよび状態データ=2が記憶
され、そしてステップS49において、退避させていた
制御用データが新プログラムに対応するよう、メモリカ
ード10に記憶していた情報(一時退避データ情報)に基
づきアドレスの変更によりRAM3に再配置される。
If it is determined in step S42 that the control data is not the same information, the process proceeds to step S45, where it is determined whether the authentication codes match, and if they match, whether the status data is 0 in step S46. Is determined.
When the status data is 0 and when the authentication codes do not match, in step 47, the control data stored in the RAM 3 is saved to the memory card 10 in accordance with the above-described control data, and the status data = 1 is set. It is memorized.
Thereafter, the process proceeds to step S48, in which the authentication code is written, the program is rewritten, and the state data = 2 is stored. In step S49, the saved control data is stored in the memory card 10 so as to correspond to the new program. Based on the information (temporary evacuation data information), the address is changed and relocated to the RAM 3.

【0055】一方、状態データが1の場合はステップS
48に進み、状態データが2の場合はステップS49に
進む。
On the other hand, if the status data is 1, step S
The process proceeds to 48, and if the status data is 2, the process proceeds to step S49.

【0056】先のステップS41でプログラムの種別が
同一でないと判定されたときは、ステップS45にて認
証コードが一致するか判定され、一致しない場合はステ
ップS48に進み、一致するときはステップS46にて
状態データが0であるか判定され、0の場合はステップ
S48に進み、次にステップS50にてRAM3に制御
用データとして初期値が書き込まれ、状態データ=3が
記憶される。
If it is determined in step S41 that the types of the programs are not the same, it is determined in step S45 whether the authentication codes match. If they do not match, the process proceeds to step S48, and if they match, the process proceeds to step S46. It is determined whether the status data is 0. If the status data is 0, the process proceeds to step S48. Next, in step S50, the initial value is written as control data in the RAM 3 and the status data = 3 is stored.

【0057】ステップS46の判定で状態データが2の
場合はステップS50に進み、状態データ=3のときは
ステップS50をスキップする。
If it is determined in step S46 that the status data is 2, the process proceeds to step S50, and if the status data = 3, step S50 is skipped.

【0058】さて、図19のステップS5のメモリカー
ド10の動作種別の判定でのカード(自動販売機Aの
データを別の自動販売機Bにコピーする)と判定された
ときは、図25のステップS61に進む。まず、当メモ
リカード10の使用回数nが使用可能回数Z未満である
かが判定される。nがZの値に等しければ当メモリカー
ド10の使用が禁止されるが、そうでないときは、ステ
ップS62に進む。ここでメモリカード10が挿入され
ている自動販売機がコピー元機であるか、つまり、自動
販売機Aであるかが判定され、そうである場合は、ステ
ップS63にて認証コードが一致するか判定され、一致
しない場合はステップS65に進み、認証コードが書き
込まれ、フラッシュメモリ2に記憶の現行のプログラム
が読み出されてメモリカード10に書き込まれ、最後に
状態データとして1が記憶される。次のステップS66
では、RAM3に記憶の制御用データが読み出されてメ
モリカード10に書き込まれ、状態データとして2が記
憶される。
When it is determined in step S5 of FIG. 19 that the operation type of the memory card 10 is a card (the data of the vending machine A is copied to another vending machine B), it is determined in FIG. Proceed to step S61. First, it is determined whether the number of uses n of the memory card 10 is less than the number of usable times Z. If n is equal to the value of Z, use of the memory card 10 is prohibited. If not, the process proceeds to step S62. Here, it is determined whether the vending machine in which the memory card 10 is inserted is the copy source machine, that is, whether the vending machine A is the vending machine A. If so, whether the authentication codes match in step S63 If it is determined that they do not match, the process proceeds to step S65, where the authentication code is written, the current program stored in the flash memory 2 is read and written into the memory card 10, and 1 is finally stored as status data. Next step S66
Then, the control data stored in the RAM 3 is read out and written into the memory card 10, and 2 is stored as status data.

【0059】認証コードが一致する場合は、ステップS
63からステップS64に進み、状態データが0である
かが判定される。0の場合はステップS65に進むが、
1の場合はステップS66に進み、2の場合はステップ
S66をスキップして図22もしくは図23の制御フロ
ーへ進むことにより、当自動販売機Aは現行のプログラ
ムに従って販売制御を続行する。
If the authentication codes match, step S
From 63, the process proceeds to step S64, and it is determined whether the status data is 0. If it is 0, the process proceeds to step S65,
In the case of 1, the process proceeds to step S66, and in the case of 2, the process skips step S66 and proceeds to the control flow of FIG. 22 or 23, whereby the vending machine A continues the sales control according to the current program.

【0060】その自動販売機Aに挿入していたメモリカ
ード10を別の自動販売機Bに挿入して電源をオンにす
れば、図19のステップS1、S2、S3、S4、S5
を通って図25のステップS61に進む。ここでもn<
Zとすれば、次のステップS62において、メモリカー
ド10が挿入された自動販売機がコピー元機であるかが
判定される。この場合はコピー元機でないので、つまり
上述した自動販売機Bであるので、ステップS67へ進
む。ここで認証コードが一致するか判定され、一致しな
い場合はステップS69に進み、認証コードが書き込ま
れ、メモリカード10に記憶していたプログラムが自動
販売機Bに読み込まれ、フラッシュメモリ2に書き込ま
れ、最後に状態データとして1が記憶される。次のステ
ップS70では、メモリカード10に記憶していた制御
用データが自動販売機Bに読み込まれてRAM2に書き
込まれ、状態データとして2が記憶される。
If the memory card 10 inserted in the vending machine A is inserted into another vending machine B and the power is turned on, steps S1, S2, S3, S4, S5 in FIG.
Then, the process proceeds to step S61 in FIG. Again, n <
If Z, in the next step S62, it is determined whether the vending machine into which the memory card 10 is inserted is a copy source machine. In this case, since it is not the copy source machine, that is, the above-mentioned vending machine B, the process proceeds to step S67. Here, it is determined whether or not the authentication codes match. If they do not match, the process proceeds to step S69, where the authentication code is written, the program stored in the memory card 10 is read into the vending machine B, and written into the flash memory 2. Finally, 1 is stored as state data. In the next step S70, the control data stored in the memory card 10 is read into the vending machine B and written into the RAM 2, and 2 is stored as state data.

【0061】認証コードが一致する場合は、ステップS
67からステップS68に進み、状態データが0である
かが判定される。0の場合はステップS69に進むが、
1の場合はステップS70に進み、2の場合はステップ
S71に進む。
If the authentication codes match, step S
The process proceeds from step 67 to step S68, and it is determined whether the status data is 0. If it is 0, the process proceeds to step S69,
In the case of 1, the process proceeds to step S70, and in the case of 2, the process proceeds to step S71.

【0062】このようにして自動販売機Aに記憶のプロ
グラムおよび制御用データが自動販売機Bにコピーされ
る。ステップS71では、コピーしたデータにプログラ
ムが含まれず、かつ制御用データも価格等のデータのみ
の特定データであるか判定される。特定データでないと
きのみステップS72にてnの値が1インクリメントさ
れる。この後は制御フローに進むことにより、自動販売
機Bは、自動販売機Aのデータに従って販売制御が行わ
れる。
Thus, the program and the control data stored in the vending machine A are copied to the vending machine B. In step S71, it is determined whether or not the copied data does not include a program and the control data is specific data including only data such as price. Only when the data is not specific data, the value of n is incremented by 1 in step S72. Thereafter, by proceeding to the control flow, the vending machine B performs the vending control according to the data of the vending machine A.

【0063】[0063]

【発明の効果】請求項1に係わる発明では、携帯メモリ
に、新プログラムだけでなく、そのプログラムに対応す
る制御用データも記憶しておき、新プログラムの書き込
み時に制御用データをも書き込むため、短時間でかつ書
き込み間違いを起こすことなく、プログラムおよび制御
用データの設定を行える。請求項2に係わる発明は、内
部に記憶の現行のプログラムおよび制御用データを用い
るか、装着された携帯メモリ(150)に記憶の新プログラ
ムおよび制御用データを用いるかを切り替えるためのメ
モリマップ切換手段(SW)を備えることにより、現行のプ
ログラムを残したままで書き換えることなく、携帯メモ
リのプログラムで動作させることができる。請求項3に
係わる発明は、携帯メモリには、新プログラムに対する
制御用データの種類および記憶エリア等の情報Aを記憶
し、自動販売機には、現行のプログラムに対する現行の
制御用データの情報Bを記憶しており、携帯メモリの新
プログラムを書き込む際、現行の制御用データを情報B
に基づいて携帯メモリに一時退避させ、その後、退避し
ていたデータを情報Aに基づき改めて自動販売機に再配
置するものであり、プログラムの更新があっても、現行
の制御用データを再利用できる。請求項5に係わる発明
は、請求項4において、情報Aと情報Bとが同一である
かを比較し、同一の場合は、自動販売機側の制御用デー
タの退避、再配置を行わないものであり、それに要する
時間を節約できる。請求項6に係わる発明は、携帯メモ
リに記憶のプログラムの種別と当該自動販売機に記憶の
現行プログラムの種別とが同一であるかと判定された時
は自動販売機の制御用データを退避、再配置して現行の
データを再利用するが、異なる場合は、現行の制御用デ
ータを再利用できないため、制御用データとして標準値
を書き込むものであり、携帯メモリがどのようなもので
あれ、誤りなく適正なデータ書き込みを行える。請求項
7に係わる発明は、携帯メモリに、新プログラムや制御
用データの書き込み処理がどの時点まで終了したかの情
報を記憶しておくことで、書き込みが中断してその処理
を再開する時、中断した以降から書き込みが実行される
ため、最初からやり直す必要がなくなる。請求項8に係
わる発明は、請求項7において、処理開始時に、携帯メ
モリと自動販売機とに共通の認証コードを書き込むよう
にし、処理が中断された後に処理を再開するとき、両者
り認証コードが一致するときのみ、中断した以降から書
き込みを実行し、認証コードが一致しないときは、最初
から書き込みを行うものであり、関係の無い携帯メモリ
の挿入による誤設定をなくせる。請求項9に係わる発明
は、当該自動販売機で生じた変化データを携帯メモリに
逐一、記憶しておくことで、故障が発生したときに、そ
の変化データを参照することにより、原因究明に役立た
せることができる。請求項10に係わる発明は、電源オ
ン時に携帯メモリが装着されておれば、その携帯メモリ
に記憶のプログラムの書き替えを行うので、手間が省け
るだけでなく、誤った書き込み指令をなくすことができ
る。請求項11に係わる発明は、請求項10において、
プログラムの書き換え終了後に携帯メモリが取り外され
てから電源オンにされたとき、新プログラムを実行を指
示するので、プログラム指定の作業も不要となる。請求
項12に係わる発明は、新プログラムの書き込み、新制
御用データの書き込み、自動販売機内の制御用データの
退避、再配置など、どの動作を実行するための携帯メモ
リであるかを携帯メモリに記憶しておくことで、所望の
携帯メモリを挿入するだけで、処理内容が異なる種々の
携帯メモリが有る場合でも、装着した携帯メモリに沿っ
た適した処理を実行できる。請求項13に係わる発明
は、携帯メモリの使用回数が規定回数になれば、以後の
使用を禁止するものであり、無制限な使用を禁止でき
る。請求項16に係わる発明は、プログラム記憶手段に
おけるプログラム記憶エリアの終端と、プログラム記憶
手段に記憶された新旧のプログラムの各終端とを記憶し
ておくことで、アドレス指定により、指定のプログラム
を実行できる。請求項17に係わる発明は、新プログラ
ムの書き込みに当たって現行のプログラムを別の所には
退避させておき、新プログラムの書き込み時に異常が生
じたとき、退避させていた旧プログラムを再度書き込む
ため、販売制御を続行できる。請求項18に係わる発明
は、現行のプログラムを別の記憶手段に記憶した上で新
プログラムを上書きし、書き込み異常が発生したとき、
スタートアドレスから異常が発生したアドレスまで旧プ
ログラムを書き込むものであり、旧プログラムを復旧に
要する時間を短縮できる。請求項19に係わる発明は、
現行のプログラムを別の記憶手段に退避させた上で新プ
ログラムを書き込み、その新プログラムによる動作時に
異常が生じたとき、旧プログラムを復活させるものであ
り、販売制御を継続できる。請求項20に係わる発明
は、自動販売機Aに記憶の御プログラムおよび制御用デ
ータを取り込み、それらのデータを別の自動販売機Bに
書き込むものであり、自動販売機Aの内容を自動販売機
Bに容易にコピーすることができる。
According to the present invention, not only the new program but also the control data corresponding to the program is stored in the portable memory, and the control data is written when the new program is written. The program and control data can be set in a short time and without writing errors. The invention according to claim 2 is a memory map switching method for switching between using a current program and control data stored therein or using a new program and control data stored in a mounted portable memory (150). By providing the means (SW), it is possible to operate with the program of the portable memory without rewriting the current program while keeping it. According to a third aspect of the present invention, the portable memory stores information A such as the type of control data and the storage area for the new program, and the vending machine stores information B of the current control data for the current program. When writing a new program in the portable memory, the current control data is stored in the information B.
Temporarily saves the data in the portable memory based on the information A, and then relocates the saved data to the vending machine again based on the information A. Even if the program is updated, the current control data is reused. it can. According to a fifth aspect of the present invention, in the fourth aspect, the information A and the information B are compared to determine whether they are the same. If the information A and the information B are the same, the control data on the vending machine is not saved or rearranged. And the time required for it can be saved. According to a sixth aspect of the present invention, when it is determined that the type of the program stored in the portable memory and the type of the current program stored in the vending machine are the same, the control data of the vending machine is saved and re-stored. The current data is reused by arranging it, but if it is different, the current control data cannot be reused, so standard values are written as control data. And proper data writing can be performed. According to a seventh aspect of the present invention, when the writing process of the new program or the control data has been stored in the portable memory, information indicating up to which point the writing process has been completed is interrupted and the process is resumed. Since writing is performed after the interruption, there is no need to start over. The invention according to claim 8 is the invention according to claim 7, wherein a common authentication code is written in the portable memory and the vending machine at the start of the processing, and when the processing is resumed after the processing is interrupted, the two-way authentication code is used. When the authentication code does not match, the writing is performed from the beginning only when the authentication code does not match, and the erroneous setting due to the insertion of the irrelevant portable memory can be eliminated. The invention according to claim 9 is useful for investigating the cause by referring to the change data when a failure occurs by storing the change data generated in the vending machine in the portable memory one by one. Can be made. According to the tenth aspect of the present invention, if the portable memory is mounted when the power is turned on, the program stored in the portable memory is rewritten, so that not only the labor can be saved but also an erroneous write command can be eliminated. . The invention according to claim 11 is the invention according to claim 10,
When the power is turned on after the portable memory is removed after the rewriting of the program, the execution of the new program is instructed, so that the work of designating the program is not required. According to a twelfth aspect of the present invention, in the portable memory, which operation is to be performed, such as writing a new program, writing new control data, saving and rearranging control data in the vending machine, is described. By storing, even if a desired portable memory is inserted, even if there are various portable memories having different processing contents, it is possible to execute a process suitable for the attached portable memory. According to the invention of claim 13, when the number of times of using the portable memory reaches the specified number, the subsequent use is prohibited, and unlimited use can be prohibited. The invention according to claim 16 executes the designated program by address designation by storing the end of the program storage area in the program storage means and the end of each of the old and new programs stored in the program storage means. it can. According to a seventeenth aspect of the present invention, when writing a new program, the current program is evacuated to another place, and when an error occurs during writing of the new program, the evacuated old program is written again. Control can continue. The present invention according to claim 18 is characterized in that the current program is stored in another storage means, and then the new program is overwritten.
The old program is written from the start address to the address where the abnormality has occurred, and the time required for restoring the old program can be reduced. The invention according to claim 19 is
The new program is written after the current program is saved in another storage means, and when an abnormality occurs during the operation of the new program, the old program is restored and the sales control can be continued. According to a twentieth aspect of the present invention, a storage control program and control data are taken into a vending machine A, and the data are written into another vending machine B. B can be easily copied.

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

【図1】 本発明の第1態様(請求項1)を示したクレー
ム対応図
FIG. 1 is a diagram corresponding to a claim showing a first embodiment (claim 1) of the present invention.

【図2】 本発明の第2態様(請求項2)を示したクレー
ム対応図
FIG. 2 is a claim correspondence diagram showing a second embodiment (claim 2) of the present invention.

【図3】 本発明の第3態様(請求項3)を示したクレー
ム対応図
FIG. 3 is a diagram corresponding to claims showing a third embodiment (claim 3) of the present invention.

【図4】 本発明の第4態様(請求項5)を示したクレー
ム対応図
FIG. 4 is a diagram corresponding to a claim showing a fourth embodiment (claim 5) of the present invention.

【図5】 本発明の第5態様(請求項6)を示したクレー
ム対応図
FIG. 5 is a claim correspondence diagram showing a fifth embodiment (claim 6) of the present invention.

【図6】 本発明の第6態様(請求項7)を示したクレー
ム対応図
FIG. 6 is a claim correspondence diagram showing a sixth aspect (claim 7) of the present invention.

【図7】 本発明の第7態様(請求項8)を示したクレー
ム対応図
FIG. 7 is a claim correspondence diagram showing a seventh aspect (claim 8) of the present invention.

【図8】 本発明の第8態様(請求項9)を示したクレー
ム対応図
FIG. 8 is a claim correspondence diagram showing an eighth aspect (claim 9) of the present invention.

【図9】 本発明の第9態様(請求項10)を示したクレ
ーム対応図
FIG. 9 is a claim correspondence diagram showing a ninth aspect (claim 10) of the present invention.

【図10】 本発明の第10態様(請求項11)を示した
クレーム対応図
FIG. 10 is a claim correspondence diagram showing a tenth aspect (claim 11) of the present invention.

【図11】 本発明の第11態様(請求項12)を示した
クレーム対応図
FIG. 11 is a claim correspondence diagram showing an eleventh aspect (claim 12) of the present invention.

【図12】 本発明の第12態様(請求項14)を示した
クレーム対応図
FIG. 12 is a claim correspondence diagram showing a twelfth aspect (claim 14) of the present invention.

【図13】 本発明の第13態様(請求項16)を示した
クレーム対応図
FIG. 13 is a claim correspondence diagram showing a thirteenth aspect (claim 16) of the present invention.

【図14】 本発明の第14態様(請求項17)を示した
クレーム対応図
FIG. 14 is a view corresponding to a claim showing a fourteenth aspect (claim 17) of the present invention.

【図15】 本発明の第15態様(請求項18)を示した
クレーム対応図
FIG. 15 is a claim correspondence diagram showing a fifteenth aspect (claim 18) of the present invention.

【図16】 本発明の第16態様(請求項19)を示した
クレーム対応図
FIG. 16 is a view corresponding to a claim showing a sixteenth aspect (claim 19) of the present invention.

【図17】 本発明の第17態様(請求項20)を示した
クレーム対応図
FIG. 17 is a claim correspondence diagram showing a seventeenth aspect (claim 20) of the present invention.

【図18】 本発明の実施形態を示した制御ブロック図FIG. 18 is a control block diagram showing an embodiment of the present invention.

【図19】 本発明の実施形態における制御動作を示し
たフローチャート
FIG. 19 is a flowchart illustrating a control operation according to the embodiment of the present invention.

【図20】 本発明の実施形態における制御動作を示し
たフローチャート
FIG. 20 is a flowchart illustrating a control operation according to the embodiment of the present invention.

【図21】 本発明の実施形態における制御動作を示し
たフローチャート
FIG. 21 is a flowchart showing a control operation according to the embodiment of the present invention.

【図22】 本発明の実施形態における制御動作を示し
たフローチャート
FIG. 22 is a flowchart illustrating a control operation according to the embodiment of the present invention.

【図23】 本発明の実施形態における制御動作を示し
たフローチャート
FIG. 23 is a flowchart showing a control operation according to the embodiment of the present invention.

【図24】 本発明の実施形態における制御動作を示し
たフローチャート
FIG. 24 is a flowchart showing a control operation according to the embodiment of the present invention.

【図25】 本発明の実施形態における制御動作を示し
たフローチャート
FIG. 25 is a flowchart illustrating a control operation according to the embodiment of the present invention.

【図26】 図18にあるメモリマップ切換回路11の
詳細を示した回路図
FIG. 26 is a circuit diagram showing details of a memory map switching circuit 11 shown in FIG. 18;

【図27】 フラッシュメモリの空き記憶エリアに新プ
ログラムの書き込み時を示したメモリマップ図
FIG. 27 is a memory map diagram showing when a new program is written in a free storage area of a flash memory.

【図28】 新プログラムの上書き途中で中断して旧プ
ログラムを復旧するときのフラッシュメモリのメモリマ
ップ図
FIG. 28 is a memory map diagram of a flash memory when restoring an old program by interrupting the overwriting of a new program

【図29】 従来の自動販売機におけるデータ設定の方
法を示した図
FIG. 29 is a diagram showing a data setting method in a conventional vending machine.

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

1 マイクロコンピュータ 2 フラッシュメモリ 3 RAM 7 メモリカードインタフェイス 10 メモリカード 11 メモリマップ切換回路 DESCRIPTION OF SYMBOLS 1 Microcomputer 2 Flash memory 3 RAM 7 Memory card interface 10 Memory card 11 Memory map switching circuit

フロントページの続き (56)参考文献 特開 平3−296187(JP,A) 特開 昭62−286196(JP,A) 特開 平1−276389(JP,A) 特開 平5−197869(JP,A) 特開 平5−298530(JP,A) 特開 平4−241087(JP,A) 特開 平4−274592(JP,A) 実開 平2−14175(JP,U) (58)調査した分野(Int.Cl.7,DB名) G07F 9/00 Continuation of the front page (56) References JP-A-3-296187 (JP, A) JP-A-62-286196 (JP, A) JP-A-1-276389 (JP, A) JP-A-5-197869 (JP) JP-A-5-298530 (JP, A) JP-A-4-241087 (JP, A) JP-A-4-274592 (JP, A) JP-A-2-14175 (JP, U) (58) Field surveyed (Int. Cl. 7 , DB name) G07F 9/00

Claims (19)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 メモリカードのごとき携帯メモリ(150)
のプログラム記憶手段(151)に予め記憶させたプログラ
ムのデータを、自動販売機(100)内の電気的に書き込み
消去が可能なプログラム記憶手段(101)に書き込み、そ
の書き込んだプログラムと、制御用データ記憶手段(10
2)に記憶の販売価格等の制御用データとに基づき販売制
御を行う自動販売機(100)において、 携帯メモリ(150)に、新プログラムに対応する制御用デ
ータを記憶する制御用データ記憶手段(152)を設け、前
記携帯メモリ(150)を自動販売機(100)に装着して、携帯
メモリ(150)から読み込んだ新プログラムをプログラム
記憶手段(101)に書き込む際、制御用データ記憶手段(15
2)に記憶された制御用データを制御用データ記憶手段(1
02)に書き込むことを特徴とする自動販売機。
A portable memory such as a memory card (150)
The program data stored in advance in the program storage means (151) is written in the electrically rewritable program storage means (101) in the vending machine (100). Data storage means (10
2) In a vending machine (100) that performs sales control based on control data such as selling prices stored in a storage device, a control data storage means for storing control data corresponding to a new program in a portable memory (150). (152), the portable memory (150) is attached to the vending machine (100), and when a new program read from the portable memory (150) is written to the program storage means (101), the control data storage means (15
The control data stored in the control data storage means (1)
Vending machine characterized by writing in 02).
【請求項2】 携帯メモリ(150)のプログラム記憶手段
(101)に記憶の新プログラムを用いるか、自動販売機内
のプログラム記憶手段(101)に記憶の現行プログラムを
用いるかを切り替えるためのメモリマップ切換手段(SW)
を備えた請求項1記載の自動販売機。
2. A program storage means of the portable memory (150).
Memory map switching means (SW) for switching between using a new program stored in (101) or using a current program stored in program storage means (101) in a vending machine
The vending machine according to claim 1, further comprising:
【請求項3】 メモリカードのごとき携帯メモリ(150)
のプログラム記憶手段(151)に予め記憶させたプログラ
ムのデータを、自動販売機(100)内の電気的に書き込み
消去が可能なプログラム記憶手段(101)に書き込み、そ
の書き込んだプログラムと、制御用データ記憶手段(10
2)に記憶の販売価格等の制御用データとに基づき販売制
御を行う自動販売機(100)において、 携帯メモリに、新プログラムに対応した制御用データの
種類および記憶エリア等の情報を記憶している制御デー
タ毎情報記憶手段(153)と、制御用データ記憶手段(102)
に記憶されていた制御用データを一時的に退避させるた
めの一時退避データ記憶手段(154)と、後述の制御デー
タ毎情報記憶手段(103)に記憶の制御用データの種類等
の情報を退避させて記憶する一時退避データ情報記憶手
段(155)とを備え、 自動販売機(100)には、プログラム記憶手段(101)に記憶
のプログラムに対応した制御用データの情報を記憶して
いる制御データ毎情報記憶手段(103)を備え、 自動販売機(100)に新プログラムを書き込むとき、制御
用データ記憶手段(102)に記憶の制御用データを制御デ
ータ毎情報記憶手段(103)の情報に基づき、一時退避デ
ータ記憶手段(154)に一時退避させ、そのデータを新プ
ログラム用制御データ毎情報記憶手段(153)の情報に基
づき、制御用データ記憶手段(102)に再配置することを
特徴とする自動販売機。
3. A portable memory such as a memory card (150).
The program data stored in advance in the program storage means (151) is written in the electrically rewritable program storage means (101) in the vending machine (100). Data storage means (10
2) In a vending machine (100) that performs sales control based on control data such as sales prices stored in a memory, information such as a type of control data and a storage area corresponding to the new program is stored in a portable memory. Control data information storage means (153) and control data storage means (102)
The temporary save data storage means (154) for temporarily saving the control data stored in the control data, and information such as the type of control data stored in the control data information storage means (103) described later are saved. A temporary evacuation data information storage means (155) for storing and storing information of control data corresponding to the program stored in the program storage means (101) in the vending machine (100). A data-by-data information storage means (103) is provided, and when writing a new program into the vending machine (100), control data stored in the control data storage means (102) is stored in the control data-by-control information storage means (103). Based on the information of the new-program control-data-based information storage means (153), the data is temporarily saved in the temporary save data storage means (154), and is relocated to the control data storage means (102). Vending machine characterized.
【請求項4】 携帯メモリ(150)側にある一時退避デー
タ記憶手段(154)および一時退避データ情報記憶手段(15
5)を自動販売機側に設けた請求項3記載の自動販売機。
4. A temporary save data storage means (154) and a temporary save data information storage means (15) provided in the portable memory (150).
The vending machine according to claim 3, wherein (5) is provided on the vending machine side.
【請求項5】 制御データ毎情報記憶手段(103)に記憶
の情報と、携帯メモリ(150)内の新プログラム用制御デ
ータ毎情報記憶手段(153)に記憶の情報とを比較する制
御データ毎情報比較手段(104)を備え、両情報が一致す
る場合、プログラム書き換えの際、制御用データの一時
退避および再配置を行わない請求項3または4に記載の
自動販売機。
5. Each control data for comparing information stored in the control data information storage means (103) with information stored in the new program control data per information storage means (153) in the portable memory (150). 5. The vending machine according to claim 3, further comprising an information comparison unit, wherein when the two information match, the control data is not temporarily saved and relocated when the program is rewritten.
【請求項6】 携帯メモリ(150)に、新プログラムが缶
機用もしくはカップ機用であるといった種別を記憶する
プログラム種別記憶手段(155)を備え、 自動販売機(100)に、現行のプログラムの種別を記憶す
るプログラム種別記憶手段(105)と、両プログラム種別
記憶手段に記憶の種別が一致するかを比較するプログラ
ム種別比較手段(106)と、プログラムの種別が一致する
とき、プログラムの書き換え時に、制御データの退避、
再配置を行い、プログラムの種別が一致しないとき、標
準値書込み手段(107)により標準値を制御用データ記憶
手段(102)に書き込む請求項3〜5のいずれかに記載の
自動販売機。
6. A portable memory (150) comprising a program type storage means (155) for storing a type such as whether a new program is for a can machine or a cup machine, and wherein the vending machine (100) has an existing program. A program type storage means (105) for storing the type of the program, a program type comparison means (106) for comparing whether the storage type matches the two program type storage means, and rewriting the program when the program type matches. Sometimes, save control data,
6. The vending machine according to claim 3, wherein the rearrangement is performed, and when the types of the programs do not match, the standard value is written into the control data storage means by the standard value writing means.
【請求項7】 携帯メモリ(150)に、新プログラムや制
御用データの書き込み処理がどの時点まで終了したかの
情報を記憶する処理経過記憶手段(156)を備え、 自動販売機(100)に、前記情報を作成して処理経過記憶
手段(156)に書き込む処理経過書込手段(106)と、処理経
過記憶手段(156)の記憶内容から書き込みが中断した状
態であるかを判定する中断判定手段(108)と、中断され
たことが判定されたとき、中断した以降の処理から書き
込みを再開する中断再開手段(109)とを備えた請求項1
ないし6のいずれかに記載の自動販売機。
7. A portable memory (150) comprising processing progress storage means (156) for storing information indicating up to which point the writing process of a new program or control data has been completed. A process progress writing unit (106) that creates the information and writes the information to the process progress storage unit (156); and an interruption determination that determines whether or not the writing has been interrupted based on the storage content of the process progress storage unit (156). 2. An interruption resuming means (109) for resuming writing from a process after the interruption when it is determined that the interruption has been made.
7. The vending machine according to any one of items 6 to 6.
【請求項8】 プログラムを書き替える一連の処理を開
始する時に、その開始時毎に変わる認証コードを記憶す
る認証コード記憶手段(157)を携帯メモリ(150)に備え、
自動販売機(100)には、前記認証コード記憶手段(157)に
記憶させたのと同じ認証コードを記憶する認証コード記
憶手段(110)と、両認証コード記憶手段に記憶の認証コ
ードが一致するかを比較する認証コード比較手段(111)
とを備え、 中断した前記処理を再開するとき、両認証コードが不一
致であれば、前記処理が中断した後に処理を再開したと
きでも最初から処理を実行する請求項7に記載の自動販
売機。
8. A portable memory (150) having an authentication code storage means (157) for storing an authentication code which changes every time a series of processes for rewriting a program is started,
The vending machine (100) has an authentication code storage unit (110) that stores the same authentication code stored in the authentication code storage unit (157), and the authentication codes stored in both authentication code storage units match. Authentication code comparing means (111) for comparing whether to perform
The vending machine according to claim 7, further comprising: when restarting the interrupted process, if the two authentication codes do not match, the process is executed from the beginning even when the process is restarted after the interrupted process.
【請求項9】 制御動作の間に変化した各種データを検
出する変化データ検出手段(112)を備え、検出した変化
データを、携帯メモリに設定した変化データ記憶手段(1
58)に書き込む請求項1ないし8のいずれかに記載の自
動販売機。
9. A change data detecting means (112) for detecting various data changed during a control operation, and storing the detected change data in a change data storage means (1) set in a portable memory.
The vending machine according to any one of claims 1 to 8, which is written in (58).
【請求項10】 電源オン時に携帯メモリ(150)の装着
有無を検出するメモリ装着有無検出手段(113)と、装着
時、プログラムの書き込み指示を出す書換指令手段(11
4)とを備える請求項1ないし9のいずれかに記載の自動
販売機。
10. A memory mounting presence / absence detecting means (113) for detecting whether or not the portable memory (150) is mounted when the power is turned on, and a rewriting command means (11) for issuing a program writing instruction when the portable memory (150) is mounted.
The vending machine according to any one of claims 1 to 9, further comprising (4).
【請求項11】 プログラムの書き換え終了後に携帯メ
モリ(150)が取り外された後に電源がオンされたとき、
新プログラムの実行を指示するプログラム実行手段(11
5)を備える請求項10に記載の自動販売機。
11. When the power is turned on after the portable memory (150) is removed after rewriting the program,
Program execution means (11
The vending machine according to claim 10, comprising: (5).
【請求項12】 新プログラムの書き込み、新制御用デ
ータの書き込み、自動販売機内の制御用データの退避、
再配置など、どの動作を実行するための携帯メモリであ
るかを記憶する動作種別記憶手段(159)を携帯メモリ(15
0)に備え、自動販売機(100)には、前記動作種別記憶手
段(159)に記憶の動作種別に基づき、対応する動作の実
行を指令する動作指令手段(116)を備えた請求項1ない
し11のいずれかに記載の自動販売機。
12. Writing a new program, writing new control data, saving control data in a vending machine,
The operation type storage means (159) for storing which operation is to be executed, such as rearrangement, is stored in the portable memory (15).
0), the vending machine (100) includes an operation command means (116) for instructing execution of a corresponding operation based on the operation type stored in the operation type storage means (159). 12. The vending machine according to any one of claims 11 to 11.
【請求項13】 携帯メモリ(150)に、使用可能回数ま
たは使用回数を記憶する使用回数記憶手段(160)を備
え、自動販売機(100)には、その携帯メモリが使用され
る毎に、前記使用回数記憶手段(160)に記憶の値をカウ
ントダウン、又はカウントアップする計数手段(117)
と、そのカウント値が規定値になったかを判定する使用
回数判定手段(118)と、前記カウント値が規定値になっ
たとき、携帯メモリ(150)の使用を禁止する使用禁止手
段(119)とを設けた請求項1ないし12のいずれかに記
載の自動販売機。
13. The portable memory (150) is provided with a use count storage means (160) for storing the number of usable times or the number of uses, and the vending machine (100) is provided with each time the portable memory is used, Counting means (117) for counting down or counting up the value stored in the usage count storage means (160)
A use count determining means (118) for determining whether the count value has reached a specified value, and a use inhibiting means (119) for inhibiting use of the portable memory (150) when the count value has reached a specified value. The vending machine according to any one of claims 1 to 12, further comprising:
【請求項14】 上記計数手段(117)および使用回数判
定手段(118)を携帯メモリ側に備えた請求項13に記載
の自動販売機。
14. The vending machine according to claim 13, wherein said counting means (117) and use count judging means (118) are provided on the portable memory side.
【請求項15】 上記使用可能回数または使用回数が特
定のデータである場合には、使用回数に関係なく使用で
きるようにした請求項13または14に記載の自動販売
機。
15. The vending machine according to claim 13, wherein when the number of usable times or the number of times of use is specific data, the vending machine can be used regardless of the number of times of use.
【請求項16】 プログラム記憶手段(101)におけるプ
ログラム記憶エリアの終端を記憶しているプログラム記
憶エリア終端記憶手段(120)と、プログラム記憶手段(10
1)に記憶された新旧のプログラムの各終端を記憶してい
るプログラム終端記憶手段(121)と、指定により所望の
プログラムを読み出して実行する制御プログラム選択手
段(122)とを備えた請求項1〜15のいずれかに記載の
自動販売機。
16. A program storage area end storage means (120) for storing the end of the program storage area in the program storage means (101), and a program storage means (10).
A program end storage means (121) for storing the end of each of the old and new programs stored in (1), and a control program selection means (122) for reading and executing a desired program according to designation. The vending machine according to any one of claims 15 to 15.
【請求項17】 プログラム記憶手段(101)に記憶のプ
ログラムを退避し記憶するプログラム退避記憶手段(12
3)と、プログラム記憶手段(101)に新プログラムの書き
込み時に、書き込み異常を検出するプログラム書込み異
常検出手段(124)と、書き込み異常が検出されたとき、
プログラム退避手段(123)に退避させていた旧プログラ
ムをプログラム記憶手段(101)に書き込むプログラム再
度書込み手段(126)とを備えた請求項1〜16のいずれ
かに記載の自動販売機。
17. A program save storage means (12) for saving and storing a program stored in a program storage means (101).
3), when a new program is written to the program storage means (101), a program writing abnormality detecting means (124) for detecting a writing abnormality, and when a writing abnormality is detected,
17. The vending machine according to claim 1, further comprising a program rewriting means (126) for writing the old program saved in the program saving means (123) to the program storage means (101).
【請求項18】 プログラム記憶手段(101)に記憶のプ
ログラムをコピー記憶するプログラム記憶手段(123')
と、プログラム記憶手段(101)に新プログラムの書き込
み時に、書き込み異常が検出されたとき、そのときの書
き込みアドレスを記憶する異常アドレス記憶手段(125)
と、異常が検出されたとき、プログラム記憶手段(101)
に、プログラム記憶手段(123')に記憶していた旧プログ
ラムを、前記書き込みアドレスまで書き込むプログラム
再度書込み手段(126)とを備えた請求項1〜16のいず
れかに記載の自動販売機。
18. A program storage means (123 ') for copying and storing a program stored in a program storage means (101).
When writing a new program in the program storage means (101), when a write error is detected, an abnormal address storage means (125) for storing the write address at that time
When an abnormality is detected, the program storage means (101)
17. The vending machine according to claim 1, further comprising a program rewriting means (126) for writing the old program stored in the program storage means (123 ') up to the write address.
【請求項19】 プログラム記憶手段(101)に記憶のプ
ログラムを退避し記憶するプログラム退避記憶手段(12
3)と、プログラム記憶手段(101)に書き込んだ新プログ
ラムの動作異常を検出する制御プログラム動作異常検出
手段(127)と、動作異常が検出されたとき、プログラム
退避手段(123)に退避させていた旧プログラムをプログ
ラム記憶手段(101)に書き込むプログラム再度書込み手
段(126)とを備えた請求項1〜16のいずれかに記載の
自動販売機。
19. A program save storage means (12) for saving and storing a program stored in a program storage means (101).
3), a control program operation abnormality detection unit (127) for detecting an operation abnormality of the new program written in the program storage unit (101), and a program evacuation unit (123) when an operation abnormality is detected. 17. The vending machine according to claim 1, further comprising a program rewriting means (126) for writing the old program into the program storage means (101).
JP17948497A 1996-10-14 1997-07-04 vending machine Expired - Lifetime JP3284929B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP17948497A JP3284929B2 (en) 1996-10-14 1997-07-04 vending machine
KR1019970052438A KR19980032787A (en) 1996-10-14 1997-10-14 vending machine

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP8-270870 1996-10-14
JP27087096 1996-10-14
JP17948497A JP3284929B2 (en) 1996-10-14 1997-07-04 vending machine

Publications (2)

Publication Number Publication Date
JPH10177674A JPH10177674A (en) 1998-06-30
JP3284929B2 true JP3284929B2 (en) 2002-05-27

Family

ID=26499330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17948497A Expired - Lifetime JP3284929B2 (en) 1996-10-14 1997-07-04 vending machine

Country Status (2)

Country Link
JP (1) JP3284929B2 (en)
KR (1) KR19980032787A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1096443B1 (en) 1998-07-02 2008-07-16 Sharp Kabushiki Kaisha Copyright management device, electronic-production sales device, electronic-book display device, key information management device, and electronic-production distribution management system in which these devices are connected via communication lines
JP2005332301A (en) * 2004-05-21 2005-12-02 Fujitsu Ltd Method and program for processing program updating, and information processing terminal
TWI301598B (en) * 2006-10-24 2008-10-01 Int Currency Tech Calibration system and method thereof

Also Published As

Publication number Publication date
KR19980032787A (en) 1998-07-25
JPH10177674A (en) 1998-06-30

Similar Documents

Publication Publication Date Title
US6601132B2 (en) Nonvolatile memory and method of writing data thereto
US5450589A (en) Firmware modification system wherein older version can be retrieved
US6789158B2 (en) Method of rewriting program in a flash microcomputer
US6745278B2 (en) Computer capable of rewriting an area of a non-volatile memory with a boot program during self mode operation of the computer
EP0723226A1 (en) Powerfail durable flash EEPROM upgrade
JP3268130B2 (en) Data processing device using flash EEPROM
US6883060B1 (en) Microcomputer provided with flash memory and method of storing program into flash memory
JPH11161563A (en) Storage and reproduction method for data
JP2002099441A (en) Communication terminal apparatus and its operating method
JP2004303238A (en) Flash memory access device and method
JP3284929B2 (en) vending machine
JP3385844B2 (en) vending machine
US5657301A (en) Automatic changer system capable of rewriting a control program for controlling the system
US6363456B1 (en) IC card, IC card processing system, and IC card processing method
JPH113287A (en) Storage device and storage area management method used for the device
EP0287600B1 (en) Method and device to execute two instruction sequences in an order determined in advance
JPH10333898A (en) Microcomputer
JP3313576B2 (en) Memory access control method and device
EP0996103B1 (en) Automatic vending machine
JPH11327911A (en) Image forming device
JP3037375B2 (en) File compression processing method
CN1145118C (en) Control device of automatic vendor
JPH1196051A (en) Software rewriting system
KR950008834B1 (en) Data restoring method for electronic cash-register
JP2004021446A (en) Programmable controller system and programmable controller

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080308

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090308

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090308

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100308

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110308

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110308

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120308

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120308

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130308

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130308

Year of fee payment: 11

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130308

Year of fee payment: 11

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130308

Year of fee payment: 11

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130308

Year of fee payment: 11

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130308

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140308

Year of fee payment: 12

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term