JP2003067785A - In-processor communication control device - Google Patents

In-processor communication control device

Info

Publication number
JP2003067785A
JP2003067785A JP2001251105A JP2001251105A JP2003067785A JP 2003067785 A JP2003067785 A JP 2003067785A JP 2001251105 A JP2001251105 A JP 2001251105A JP 2001251105 A JP2001251105 A JP 2001251105A JP 2003067785 A JP2003067785 A JP 2003067785A
Authority
JP
Japan
Prior art keywords
main body
address
communication
unit
processing
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
JP2001251105A
Other languages
Japanese (ja)
Inventor
Masahiko Noguchi
昌彦 野口
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.)
Nippon Signal Co Ltd
Original Assignee
Nippon Signal 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
Application filed by Nippon Signal Co Ltd filed Critical Nippon Signal Co Ltd
Priority to JP2001251105A priority Critical patent/JP2003067785A/en
Publication of JP2003067785A publication Critical patent/JP2003067785A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To efficiently perform the communication of a body control part with each unit in a processor such as automatic ticket-vending machine. SOLUTION: This control device comprises a fixed IP address output means for outputting the fixed IP address of each processing unit to the body control part in the input of a drive power source; an IP address reporting means for reporting, in the receipt of the fixed IP address from each processing unit by the body control part, an IP address to each processing unit from the body control part; a communication means for interrupting the communication once after the receipt of the IP address from the body control part by each processing unit, and then starting the communication by use of the IP address reported to the body control part from each processing unit; and a start control means for starting the processing operation of the body of the processor after the end of the communication using the reported IP address.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、自動券売機や自動
精算機等の駅務機器、あるいはその他の所定の処理を行
うことのできる処理機内に設けられている小規模のLA
Nを効率よく行えるようにした処理機内通信制御装置に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a small-scale LA installed in a station service device such as an automatic ticket vending machine or an automatic settlement machine, or other processing machine capable of performing a predetermined processing.
The present invention relates to an in-processor communication control device capable of efficiently performing N.

【0002】[0002]

【従来の技術】従来、例えば自動券売機内に設けられて
いる小規模のLANは、自動券売機の本体を統括的に制
御するCPUを中心に形成された本体制御部に硬貨処理
ユニット、紙幣処理ユニット、カード処理ユニット及び
発券処理ユニット等の複数のユニットが通信回線を介し
て接続されて構成されている。そして、本体制御部と各
ユニット間は、TCP/IP等の所定のプロトコルによ
り通信が行われている。
2. Description of the Related Art Conventionally, for example, in a small-scale LAN provided in an automatic ticket vending machine, a coin processing unit and a bill processing unit are provided in a main body control section formed mainly of a CPU for controlling the main body of the automatic ticket vending machine. A plurality of units such as a unit, a card processing unit, and a ticket issuing processing unit are connected to each other via a communication line. Then, communication is performed between the main body control unit and each unit by a predetermined protocol such as TCP / IP.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記従
来の処理機内通信制御装置は、TCP/IP通信を行う
に当っては、処理機内に組込まれる各ユニット毎に所定
のIPアドレスを設定して行われるので、ユニットが交
換されたときは、各ユニットのIPアドレスを再設定し
なければならないという欠点があった。
However, in performing the TCP / IP communication, the above-described conventional in-machine communication control device sets a predetermined IP address for each unit incorporated in the processor. Therefore, when a unit is replaced, there is a drawback that the IP address of each unit must be reset.

【0004】そこで、本発明は、上記欠点を解決するた
めになされたものであって、その目的は、ユニットが交
換されたときであってもIPアドレスを自動的に設定で
きるようにした処理機内通信制御装置を提供することに
ある。
Therefore, the present invention has been made to solve the above-mentioned drawbacks, and its purpose is to provide an IP address automatically in a processor even when a unit is replaced. To provide a communication control device.

【0005】[0005]

【課題を解決するための手段】本発明に係る処理機内通
信制御装置は、上記目的を達成するために、処理機の本
体内に組込まれている複数の処理ユニットをその処理機
の本体を統括的に制御する本体制御部で制御して所定の
処理を行う処理機における処理機内通信制御装置であっ
て、前記処理機の本体の駆動電源が投入されたときに、
前記各処理ユニットにそれぞれ固定されている所定の固
定IPアドレスを前記本体制御部へ出力する固定IPア
ドレス出力手段と、前記本体制御部が前記各処理ユニッ
トから所定の固定IPアドレスをそれぞれ受信したとき
に、その本体制御部からそれら各処理ユニットに所定の
IPアドレスをそれぞれ通知するIPアドレス通知手段
と、前記各処理ユニットが前記本体制御部から所定のI
Pアドレスをそれぞれ受信した後、それら各処理ユニッ
トとその本体制御部との通信を一旦中断し、次いで、そ
れら各処理ユニットからその本体制御部へ通知された所
定のIPアドレスを用いてそれぞれ通信する通信手段
と、通知された所定のIPアドレスを用いた通信が終了
した後、前記処理機の本体の所定の処理動作を開始する
開始制御手段と、を有することを特徴としている。処理
機の本体は、駅務機器の本体であることを特徴としてい
る。駅務機器の本体は、自動券売機の本体であることを
特徴としている。
In order to achieve the above object, an in-processor communication control device according to the present invention integrates a plurality of processing units incorporated in the main body of the processor into the main body of the processor. An in-processor communication control device in a processor for controlling a predetermined process by controlling a main body control unit that controls, when the drive power of the main body of the processor is turned on,
A fixed IP address output means for outputting a predetermined fixed IP address fixed to each processing unit to the main body control unit, and a case where the main body control unit receives a predetermined fixed IP address from each processing unit. And an IP address notifying means for notifying each of the processing units of a predetermined IP address from the main body control unit, and each processing unit is provided with a predetermined I from the main body control unit.
After receiving each P address, the communication between each processing unit and its main body control unit is temporarily interrupted, and then each communication is performed using the predetermined IP address notified from the respective processing unit to its main body control unit. It is characterized by including a communication means and a start control means for starting a predetermined processing operation of the main body of the processing machine after the communication using the notified predetermined IP address is completed. The main body of the processor is the main body of the station service equipment. The main feature of the station service device is that of an automatic ticket vending machine.

【0006】[0006]

【発明の実施の形態】以下、本発明の実施の形態を図面
に基づいて説明する。図1は、本発明に係る処理機器を
自動券売機としたときのその本体aの概略構成を示すブ
ロック図である。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of a main body a when the processing device according to the present invention is an automatic ticket vending machine.

【0007】図1中、1は、自動券売機の本体(以下、
「本体」という。)aを統括的に制御するCPUを中心
に形成された本体制御部である。この本体制御部1に
は、本体制御部1に設けられている通信制御部1a及び
通信回線L,L…を介して硬貨処理ユニット2、紙幣処
理ユニット3、カード処理ユニット4及び発券処理ユニ
ット5がそれぞれ接続されている。なお、本体制御部1
には、これらユニット以外に、口座釦を表示するととも
に、その口座釦からの押下信号を入力するタッチパネル
等の他の機器ユニットも接続されているが、ここでは省
略されている。
In FIG. 1, 1 is a main body of an automatic ticket vending machine (hereinafter,
It is called the "main body". ) Is a main body control unit formed mainly of a CPU for controlling a. The main body control unit 1 includes a coin processing unit 2, a bill processing unit 3, a card processing unit 4, and a ticket issuing processing unit 5 via a communication control unit 1a provided in the main body control unit 1 and communication lines L, L ... Are connected respectively. The main body control unit 1
In addition to these units, other device units such as a touch panel for displaying an account button and inputting a depression signal from the account button are also connected to, but they are omitted here.

【0008】上記硬貨処理ユニット2は、本体aに投入
された硬貨を検銭し、必要に応じて釣銭硬貨を排出する
機能を有し、硬貨処理ユニット2内に組込まれているC
PUを中心に形成されている図示しないユニット制御部
により制御されるように構成されている。そして、その
ユニット制御部は、そのユニット制御部に組込まれてい
る通信制御部2aを介して本体制御部1と通信できるよ
うに構成されている。また、そのユニット制御部の図示
しないメモリには、硬貨処理ユニット2の識別番号に相
当する固定されたIPアドレスが記憶されている。
The coin processing unit 2 has a function of inspecting coins inserted into the main body a and discharging change coins if necessary, and is incorporated in the coin processing unit 2.
It is configured to be controlled by a unit controller (not shown) formed around the PU. The unit controller is configured to communicate with the main body controller 1 via the communication controller 2a incorporated in the unit controller. A fixed IP address corresponding to the identification number of the coin processing unit 2 is stored in a memory (not shown) of the unit controller.

【0009】上記紙幣処理ユニット3は、本体aに投入
された紙幣を検銭し、必要に応じて釣銭を排出する機能
を有し、紙幣処理ユニット3内に組込まれているCPU
を中心に形成されている図示しないユニット制御部によ
り制御されるように構成されている。そして、そのユニ
ット制御部は、そのユニット制御部に組込まれている通
信制御部3aを介して本体制御部1と通信できるように
構成されている。また、そのユニット制御部の図示しな
いメモリには、紙幣処理ユニット3の識別番号に相当す
る固定されたIPアドレスが記憶されている。
The banknote processing unit 3 has a function of inspecting banknotes inserted in the main body a and discharging change as needed, and a CPU incorporated in the banknote processing unit 3
It is configured so as to be controlled by a unit controller (not shown) which is formed around the center. The unit controller is configured to communicate with the main body controller 1 via the communication controller 3a incorporated in the unit controller. Further, a fixed IP address corresponding to the identification number of the bill processing unit 3 is stored in a memory (not shown) of the unit controller.

【0010】上記カード処理ユニット4は、本体aに挿
入されたプリペイドカードやSFカード等のカード類に
記憶されているデータを読取って減額処理を行うととも
に、そのカード類に印字やパンチ孔を開ける機能を有
し、カード処理ユニット4内に組込まれているCPUを
中心に形成されている図示しないユニット制御部により
制御されるように構成されている。そして、そのユニッ
ト制御部は、そのユニット制御部に組込まれている通信
制御部4aを介して本体制御部1と通信できるように構
成されている。また、そのユニット制御部の図示しない
メモリには、カード処理ユニット4の識別番号に相当す
る固定されたIPアドレスが記憶されている。
The card processing unit 4 reads data stored in cards such as a prepaid card and an SF card inserted in the main body a to perform a reduction process, and at the same time, prints or punches holes in the cards. It has a function and is configured to be controlled by a unit controller (not shown) centered on a CPU incorporated in the card processing unit 4. The unit controller is configured to communicate with the main body controller 1 via the communication controller 4a incorporated in the unit controller. A fixed IP address corresponding to the identification number of the card processing unit 4 is stored in a memory (not shown) of the unit controller.

【0011】上記発券処理ユニット5は、口座釦で特定
された乗車券を生成し、その生成された乗車券を本体a
の発券口に排出する機能を有し、発券処理ユニット5内
に組込まれているCPUを中心に形成されている図示し
ないユニット制御部により制御されるように構成されて
いる。そして、そのユニット制御部は、そのユニット制
御部に組込まれている通信制御部5aを介して本体制御
部1と通信できるように構成されている。また、そのユ
ニット制御部の図示しないメモリには、発券処理ユニッ
ト5の識別番号に相当する固定されたIPアドレスが記
憶されている。
The ticket issuing processing unit 5 generates a boarding ticket specified by the account button, and uses the generated boarding ticket as the main body a.
It has a function of ejecting to the ticket issuing port and is configured to be controlled by a unit controller (not shown) formed around a CPU incorporated in the ticket issuing processing unit 5. Then, the unit controller is configured to communicate with the main body controller 1 via the communication controller 5a incorporated in the unit controller. In addition, a fixed IP address corresponding to the identification number of the ticket issuing processing unit 5 is stored in a memory (not shown) of the unit controller.

【0012】上記構成の本体a内における通信制御動作
を図2のフローチャートを用いて説明する。今、本体a
の図示しないスイッチが係員によって操作されて、本体
aの駆動電源が投入されたとする(ステップ100肯
定。以下、ステップを「S」とする。)。
The communication control operation in the main body a having the above structure will be described with reference to the flowchart of FIG. Body a now
It is assumed that a switch (not shown) is operated by a person in charge to turn on the driving power source of the main body a (Yes in step 100. Hereinafter, step is referred to as “S”).

【0013】本体aの駆動電源が投入されると、各処理
ユニット2〜5に記憶されている固定されたIPアドレ
スを用いて本体制御部1にそれぞれ通信が行われる(S
102)。したがって、本体制御部1では、受信された
固定IPアドレスにより各処理ユニット2〜5を確認す
ることができる(S104)。次いで、本体制御部1
は、各処理ユニット2〜5に対して所定のIPアドレス
を割当て、その割当てられたIPアドレスを各処理ユニ
ット2〜5にそれぞれ送出する。その送出されたIPア
ドレスは、各処理ユニット2〜5の図示しないメモリに
それぞれ記憶される(S106)。
When the drive power source of the main body a is turned on, communication is performed with the main body control section 1 using the fixed IP address stored in each processing unit 2-5 (S).
102). Therefore, the main body control unit 1 can confirm each of the processing units 2 to 5 by the received fixed IP address (S104). Next, main body control unit 1
Assigns a predetermined IP address to each processing unit 2-5, and sends the assigned IP address to each processing unit 2-5. The transmitted IP address is stored in the memory (not shown) of each processing unit 2-5 (S106).

【0014】本体制御部1からの所定のIPアドレスが
各処理ユニット2〜5に送出された後、本体制御部1と
各処理ユニット2〜5との通信が一旦中断される(S1
08)。そして、その後、本体制御部1から割当てられ
た所定のIPアドレスを用いて本体制御部1と各処理ユ
ニット2〜5との間の通信が開始され、本体aの発券処
理動作が開始される(S110、S112肯定、S11
4)。
After a predetermined IP address is sent from the main body control unit 1 to each processing unit 2-5, the communication between the main body control unit 1 and each processing unit 2-5 is interrupted (S1).
08). Then, thereafter, communication between the main body control unit 1 and each of the processing units 2 to 5 is started using a predetermined IP address assigned by the main body control unit 1, and the ticket issuing processing operation of the main body a is started ( S110, S112 affirmative, S11
4).

【0015】以上のように、本実施の形態に係る本体a
では、各処理ユニット2〜5に対して自動的にIPアド
レスが割当てられるので、処理ユニットの交換が行われ
ても容易に対処することができる。
As described above, the main body a according to the present embodiment
Then, since the IP addresses are automatically assigned to the processing units 2 to 5, it is possible to easily deal with the replacement of the processing units.

【0016】なお、上述の例では、処理機を自動券売機
としたが、自動精算機等の他の駅務機器であってもよ
い。特に、処理機が自動券売機の場合、そこに組込まれ
る処理ユニットを交換する頻度が高いので有利である。
In the above example, the processing machine is an automatic ticket vending machine, but other station service equipment such as an automatic settlement machine may be used. In particular, when the processing machine is an automatic ticket vending machine, it is advantageous because the processing unit incorporated therein is frequently replaced.

【0017】[0017]

【発明の効果】本発明に係る処理機用通信制御装置は、
処理機の本体の駆動電源が投入されたときに、各処理ユ
ニットにそれぞれ固定されている所定の固定IPアドレ
スを本体制御部へ出力する固定IPアドレス出力手段
と、前記本体制御部が前記各処理ユニットから所定の固
定IPアドレスをそれぞれ受信したときに、その本体制
御部からそれら各処理ユニットに所定のIPアドレスを
それぞれ通知するIPアドレス通知手段と、前記各処理
ユニットが前記本体制御部から所定のIPアドレスをそ
れぞれ受信した後、それら各処理ユニットとその本体制
御部との通信を一旦中断し、次いで、それら各処理ユニ
ットからその本体制御部へ通知された所定のIPアドレ
スを用いてそれぞれ通信する通信手段と、通知された所
定のIPアドレスを用いた通信が終了した後、前記処理
機の本体の所定の処理動作を開始する開始制御手段とか
らなるので、自動的にIPアドレスを設定することがで
きる。処理機の本体を駅務機器の本体としたときは、駅
務機器内に設けられている複数の処理ユニットのIPア
ドレスを容易に設定することができる。駅務機器の本体
を自動券売機の本体としたときは、自動券売機内に設け
られている複数の処理ユニットのIPアドレスを容易に
設定することができる。
The communication control device for a processor according to the present invention is
A fixed IP address output unit that outputs a predetermined fixed IP address fixed to each processing unit to the main body control unit when the drive power of the main body of the processing machine is turned on, and the main body control unit performs each processing described above. When a predetermined fixed IP address is received from each unit, an IP address notifying unit that notifies each processing unit of the predetermined IP address from the main body control unit, and each processing unit receives a predetermined IP address from the main body control unit. After receiving the respective IP addresses, the communication between the respective processing units and the main body control unit is temporarily suspended, and then the respective communication is performed using the predetermined IP addresses notified to the main body control unit from the respective processing units. After the communication with the communication means and the notified predetermined IP address is completed, the predetermined processing of the main body of the processor is performed. Since consisting of start control means for starting the operation, it is possible to automatically set the IP address. When the main body of the processor is the main body of the station service device, the IP addresses of a plurality of processing units provided in the station service device can be easily set. When the main body of the station service device is the main body of the automatic ticket vending machine, the IP addresses of a plurality of processing units provided in the automatic ticket vending machine can be easily set.

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

【図1】本発明に係る処理機を自動券売機としたときの
その本体の概略構成図である。
FIG. 1 is a schematic configuration diagram of a main body when an automatic ticket vending machine is used as a processing machine according to the present invention.

【図2】制御動作を示すフローチャートである。FIG. 2 is a flowchart showing a control operation.

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

a 自動券売機の本体(本体) 1 本体制御部 1a 通信制御部 L 通信回線 2 硬貨処理ユニット 2a 通信制御部 3 紙幣処理ユニット 3a 通信制御部 4 カード処理ユニット 4a 通信制御部 5 発券処理ユニット 5a 通信制御部 a Main body of the automatic ticket vending machine (main body) 1 Main body control section 1a Communication control unit L communication line 2 coin processing unit 2a Communication control unit 3 banknote processing unit 3a Communication control unit 4 card processing unit 4a Communication control unit 5 Ticket processing unit 5a Communication control unit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 処理機の本体内に組込まれている複数の
処理ユニットをその処理機の本体を統括的に制御する本
体制御部で制御して所定の処理を行う処理機における処
理機内通信制御装置であって、 前記処理機の本体の駆動電源が投入されたときに、前記
各処理ユニットにそれぞれ固定されている所定の固定I
Pアドレスを前記本体制御部へ出力する固定IPアドレ
ス出力手段と、 前記本体制御部が前記各処理ユニットから所定の固定I
Pアドレスをそれぞれ受信したときに、その本体制御部
からそれら各処理ユニットに所定のIPアドレスをそれ
ぞれ通知するIPアドレス通知手段と、 前記各処理ユニットが前記本体制御部から所定のIPア
ドレスをそれぞれ受信した後、それら各処理ユニットと
その本体制御部との通信を一旦中断し、次いで、それら
各処理ユニットからその本体制御部へ通知された所定の
IPアドレスを用いてそれぞれ通信する通信手段と、 通知された所定のIPアドレスを用いた通信が終了した
後、前記処理機の本体の所定の処理動作を開始する開始
制御手段と、 を有することを特徴とする処理機内通信制御装置。
1. An in-machine communication control in a processor for controlling a plurality of processing units incorporated in the main body of the processor by a main body control section for integrally controlling the main body of the processor to perform predetermined processing. The apparatus is a predetermined fixing unit that is fixed to each of the processing units when driving power of the main body of the processing machine is turned on.
A fixed IP address output means for outputting a P address to the main body control unit;
IP address notifying means for notifying the respective processing units of a predetermined IP address from the main body control unit when each P address is received, and each processing unit receiving a predetermined IP address from the main body control unit. After that, the communication between each of the processing units and the main body control unit is temporarily interrupted, and then the communication unit that communicates using the predetermined IP address notified to the main body control unit from each of the processing units, and the notification means. And a start control means for starting a predetermined processing operation of the main body of the processing machine after the communication using the specified predetermined IP address is completed.
【請求項2】 処理機の本体は、駅務機器の本体である
ことを特徴とする請求項1に記載の処理機内通信制御装
置。
2. The in-processor communication control device according to claim 1, wherein the main body of the processing machine is a main body of station service equipment.
【請求項3】 駅務機器の本体は、自動券売機の本体で
あることを特徴とする請求項2に記載の処理機内通信制
御装置。
3. The in-machine communication control device according to claim 2, wherein the main body of the station service device is a main body of an automatic ticket vending machine.
JP2001251105A 2001-08-22 2001-08-22 In-processor communication control device Pending JP2003067785A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001251105A JP2003067785A (en) 2001-08-22 2001-08-22 In-processor communication control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001251105A JP2003067785A (en) 2001-08-22 2001-08-22 In-processor communication control device

Publications (1)

Publication Number Publication Date
JP2003067785A true JP2003067785A (en) 2003-03-07

Family

ID=19079807

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001251105A Pending JP2003067785A (en) 2001-08-22 2001-08-22 In-processor communication control device

Country Status (1)

Country Link
JP (1) JP2003067785A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007183761A (en) * 2006-01-05 2007-07-19 Lecip Corp Fare box
JP2008107953A (en) * 2006-10-24 2008-05-08 Jr East Mechatronics Co Ltd Ic determination unit and automatic ticket gate
JP2012146346A (en) * 2012-05-11 2012-08-02 Lecip Holdings Corp Fare box

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007183761A (en) * 2006-01-05 2007-07-19 Lecip Corp Fare box
JP2008107953A (en) * 2006-10-24 2008-05-08 Jr East Mechatronics Co Ltd Ic determination unit and automatic ticket gate
JP2012146346A (en) * 2012-05-11 2012-08-02 Lecip Holdings Corp Fare box

Similar Documents

Publication Publication Date Title
US7668987B2 (en) Method and apparatus for controlling a peripheral via different data ports
US20070248393A1 (en) Method and apparatus for driving a printer
US7099035B2 (en) Methods for voucher and coupon printing
CN100343794C (en) Interface for voucher and coupon printing
JP2003067785A (en) In-processor communication control device
US20220245998A1 (en) Information processing device and payout management system
US20070195365A1 (en) Method and apparatus for converting a printer firmware download port to a communicatons port
JPH07299244A (en) Ball lending machine
JP3527018B2 (en) Station service equipment
JP2004334308A (en) Ticket processor and maintenance method for ticket processor
JP2003217006A (en) Automatic vending machine
JPH08249400A (en) Operation terminal device
JP2002334351A (en) Refunding device
JP2002358543A (en) Processing program setting device for station job
JPH08161599A (en) Control system of automatic vending machine
JP3729219B2 (en) Information collection device for vending machines
JP3571647B2 (en) Parking management system
JPH0765078A (en) Commodity sales data processor
JP2003217007A (en) Automatic vending machine
JPH10149456A (en) Fare recognition device for ticket examination machine
JPH103553A (en) Receipt issuing device for ticket issuing machine
JPH06266912A (en) Non-contact ic card
JPH11102487A (en) Store system using handy terminal
JP2007072779A (en) Station service equipment and station service system
JP2000207623A (en) Controller for vending machine