JPH11120424A - Controller for vending machine - Google Patents

Controller for vending machine

Info

Publication number
JPH11120424A
JPH11120424A JP9288393A JP28839397A JPH11120424A JP H11120424 A JPH11120424 A JP H11120424A JP 9288393 A JP9288393 A JP 9288393A JP 28839397 A JP28839397 A JP 28839397A JP H11120424 A JPH11120424 A JP H11120424A
Authority
JP
Japan
Prior art keywords
control unit
terminal control
vending machine
data
main control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9288393A
Other languages
Japanese (ja)
Inventor
Yasuhiko Miyata
泰彦 宮田
Seiji Ebukuro
清治 江袋
Toshitake Maruyama
敏武 丸山
Yasuhiro Yamazaki
康宏 山崎
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo 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
Application filed by Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP9288393A priority Critical patent/JPH11120424A/en
Publication of JPH11120424A publication Critical patent/JPH11120424A/en
Pending legal-status Critical Current

Links

Landscapes

  • Control Of Vending Devices And Auxiliary Devices For Vending Devices (AREA)
  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To normally attain communication between a main control part and terminal control parts while reducing costs by using an imprecise but inexpensive CR oscillation circuit for the pulse oscillation circuit of a terminal control part. SOLUTION: A main control part 1 controls plural terminal control parts 2, 3,... for individually controlling each part of a vending machine through a communication line 4. At that time, the main control part 1 adds the first start bit in an L level and the second start bit in an H level to the head of transmission data for operating data transmission. Then, the terminal control parts 2, 3,... receive such data from the main control part 1, count the output pulses of CR oscillation circuits 22, 32,... in a period since the falling of the first start bit until the rising, and operate data reception or transmission by using the number of count as the length of one bit.

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 control apparatus in which each terminal of a vending machine is controlled by a terminal control unit, and such a terminal control unit is controlled by a main control unit. It is.

【0002】[0002]

【従来の技術】自動販売機の制御装置は、主制御部と複
数の端末制御部とに分かれており、主制御部と各端末制
御部との間はシリアル通信で結ばれている。そして、そ
の通信方式としては、調歩同期方式が採用されている。
調歩同期方式は、主制御部と端末制御部の双方に一定周
波数のパルスを発生する発振回路を設け、それによりタ
イミングを取って通信を行う。
2. Description of the Related Art A vending machine control device is divided into a main control unit and a plurality of terminal control units, and the main control unit and each terminal control unit are connected by serial communication. As a communication method, a start-stop synchronization method is adopted.
In the start-stop synchronization system, an oscillation circuit for generating a pulse of a constant frequency is provided in both the main control unit and the terminal control unit, and communication is performed with timing.

【0003】図8は、従来の自動販売機の制御装置の概
略構成図である。主制御部1は、通信ライン4を介して
通信を行いながら、端末制御部2,3,・・・の制御を
行う。主制御部1および端末制御部2,3は、それぞ
れ、CPU11,21,31により制御が行われるが、
それらには、発振回路12,24,34が設けられてい
て、それぞれ、一定周波数のパルスを発生するようにし
ている。
FIG. 8 is a schematic configuration diagram of a conventional vending machine control device. The main controller 1 controls the terminal controllers 2, 3,... While communicating via the communication line 4. The main controller 1 and the terminal controllers 2 and 3 are controlled by the CPUs 11, 21 and 31, respectively.
They are provided with oscillating circuits 12, 24 and 34, each of which generates a pulse of a constant frequency.

【0004】主制御部1から端末制御部2,3,・・・
へデータを送信する場合は、図9に示すようなフォーマ
ットで送信する。そして、通信速度が4800bpsで
ある場合、1ビットの時間は、1÷4800≒208.
3μ秒となる。すなわち、208.3μ秒毎に、順にス
タートビット(“L”固定),D0 〜D7 ,パリティビ
ット,ストップビット(“H”固定)を出力していく。
[0004] From the main control unit 1 to the terminal control units 2, 3, ...
When the data is transmitted to, the data is transmitted in a format as shown in FIG. If the communication speed is 4800 bps, the time of one bit is 1 ÷ 4800 ≒ 208.
3 μs. That is, a start bit (fixed to "L"), D0 to D7, a parity bit, and a stop bit (fixed to "H") are sequentially output every 208.3 .mu.sec.

【0005】一方、端末制御部2,3,・・・側でそれ
を受信するには、図10に示すように、スタートビット
の立ち下がりエッジを検出した後、ノイズ等の影響で一
時的に“L”になった場合を排除するため、208.3
μ秒の1/2、すなわち、104.15μ秒が経過した
時点で、スタートビットが“L”になっているか否かを
チェックする。その後、208.3μ秒毎にD0 〜D7
,パリティビット,ストップビットを取り込み、パリ
ティビット,ストップビットが正常であれば、正しいデ
ータとして処理する。
On the other hand, as shown in FIG. 10, the terminal control units 2, 3,... Receive the falling edge of the start bit and then temporarily receive the signal due to the influence of noise or the like. 208.3 to eliminate the case of “L”
At the time when 1/2 of .mu.sec, that is, 104.15 .mu.sec has elapsed, it is checked whether or not the start bit is "L". Thereafter, D0 to D7 every 208.3 .mu.sec.
, Parity bit, and stop bit, and if the parity bit and the stop bit are normal, the data is processed as correct data.

【0006】なお、このような自動販売機の制御装置に
関連する従来の文献としては、例えば、特公昭62-35154
号公報(G07F 9/00) がある。
Conventional documents relating to such a vending machine control device include, for example, Japanese Patent Publication No. 62-35154.
(G07F 9/00).

【0007】[0007]

【発明が解決しようとする課題】上記従来の自動販売機
の制御装置においては、主制御部1から送信されたデー
タを端末制御部2,3,・・・が受信する際に、受信し
たデータの幅に対応して発振回路から出力されるパルス
に基づいて、サンプリングのタイミングが決定される。
その場合、上記パルスの時間的な誤差が約±2.5%を
超えると、サンプリングのタイミングがずれてしまって
通信が成り立たなくなる。すなわち、端末制御部2,
3,・・・の発振回路24,25として、CR発振回路
(コンデンサと抵抗とよりなる発振回路)のような精度
の低い発振回路を用いると、温度変化等により発振周波
数が大きく変動してしまい通信が成り立たなくなる。
In the above-mentioned conventional vending machine control device, when the terminal control units 2, 3,... The sampling timing is determined based on the pulse output from the oscillation circuit corresponding to the width of.
In this case, if the time error of the pulse exceeds about ± 2.5%, the timing of sampling is shifted and communication cannot be established. That is, the terminal control unit 2,
When low-precision oscillation circuits such as CR oscillation circuits (oscillation circuits including capacitors and resistors) are used as the oscillation circuits 24 and 25 of 3,..., The oscillation frequency greatly fluctuates due to temperature changes and the like. Communication fails.

【0008】そこで、従来、端末制御部の発振回路2
4,25として、精度の高いセラミック発振子や水晶発
振子を用いた発振回路が用いられていたわけであるが、
そのようなセラミック発振子や水晶発振子を用いた発振
回路は価格が高いという問題点があった。
Therefore, conventionally, the oscillation circuit 2 of the terminal control unit is used.
Oscillation circuits using high-precision ceramic oscillators or crystal oscillators were used for 4, 25,
An oscillation circuit using such a ceramic oscillator or a crystal oscillator has a problem that the price is high.

【0009】本発明は、そのような問題点を解決し、端
末制御部のクロックパルス発生用に、精度は低いが安価
なCR発振回路を用いてコストの低減を図りながら、主
制御部と端末制御部の間の通信は正常に行われるように
することを目的とするものである。
The present invention solves such a problem, and uses a low-precision but inexpensive CR oscillation circuit for generating a clock pulse for the terminal control unit while reducing the cost while using the main control unit and the terminal. The communication between the control units is intended to be performed normally.

【0010】[0010]

【課題を解決するための手段】前記課題を解決するた
め、請求項1記載の自動販売機の制御装置は、自動販売
機の各部を個別に制御する複数の端末制御部と、前記複
数の端末制御部を通信線を通して統括して制御する主制
御部とを具えた自動販売機の制御装置であって、前記端
末制御部は、該端末制御部内で用いる通信の基準時間
を、前記主制御部から送信されてくるデータに基づいて
決定することを特徴とする。このようにすると、端末制
御部のパルス発生用に、安価なCR発振回路を用いてコ
ストの低減を図りながら、主制御部と端末制御部との間
の通信は正常に行われるようにすることができる。
According to a first aspect of the present invention, there is provided a vending machine control apparatus comprising: a plurality of terminal control units for individually controlling each unit of the vending machine; A vending machine control device comprising: a main control unit that controls and controls a control unit through a communication line, wherein the terminal control unit sets a reference time of communication used in the terminal control unit to the main control unit. Is determined on the basis of data transmitted from. In this way, communication between the main control unit and the terminal control unit can be performed normally while reducing costs by using an inexpensive CR oscillation circuit for pulse generation of the terminal control unit. Can be.

【0011】そして、請求項2記載の自動販売機の制御
装置は、前記主制御部は、送信データの先頭に、Lレベ
ル又はHレベルのいずれか一方に固定された第1のスタ
ートビットと、前記第1のスタートビットと反対のレベ
ルに固定された第2のスタートビットを付してデータの
送信を行い、前記端末制御部は、該端末制御部内で用い
る通信の基準時間を、前記第1のスタートビットの立ち
下がりから立ち上がりまで、又は、立ち上がりから立ち
下がりまでの時間に基づいて決定することを特徴とす
る。このようにすると、データが送られてくる毎にその
時のビットの長さに基づいて通信の基準時間を決定する
ことができ、通信の安定性を確保できる。
According to a second aspect of the present invention, in the vending machine control device, the main control unit includes a first start bit fixed to one of an L level and an H level at the beginning of the transmission data; Data transmission is performed with a second start bit fixed at a level opposite to the first start bit, and the terminal control unit sets the reference time of communication used in the terminal control unit to the first start bit. Is determined based on the time from the fall of the start bit to the rise or the time from the rise to the fall. In this way, each time data is sent, the communication reference time can be determined based on the bit length at that time, and communication stability can be ensured.

【0012】また、請求項3記載の自動販売機の制御装
置は、前記主制御部と端末制御部との間に基準信号線を
設け、主制御部は、該基準信号線を使って送信データの
1ビットの長さに対応する基準信号を送信し、端末制御
部は、該端末制御部内で用いる通信の基準時間を、前記
基準信号に基づいて決定することを特徴とする。このよ
うにすると、通信のフォーマットが従来のものに固定さ
れていて変更できない場合でも、主制御部から送信され
る基準信号に基づいて、端末制御部内で用いる通信の基
準時間を正確に決定することができる。その結果、端末
制御部の発振回路に、安価なCR発振回路を用いてコス
トの低減を図りながら、主制御部と端末制御部の間の通
信は正常に行われるようにすることができる。
According to a third aspect of the present invention, in the vending machine control device, a reference signal line is provided between the main control unit and the terminal control unit, and the main control unit uses the reference signal line to transmit transmission data. The terminal control unit transmits a reference signal corresponding to the length of 1 bit, and the terminal control unit determines a reference time of communication used in the terminal control unit based on the reference signal. With this configuration, even when the communication format is fixed to the conventional one and cannot be changed, the reference time of the communication used in the terminal control unit is accurately determined based on the reference signal transmitted from the main control unit. Can be. As a result, communication between the main control unit and the terminal control unit can be performed normally while reducing the cost by using an inexpensive CR oscillation circuit as the oscillation circuit of the terminal control unit.

【0013】そしてまた、請求項4記載の自動販売機の
制御装置は、前記主制御部は、データを送信する端末制
御部に応じて通信速度を変えて送信することを特徴とす
る。このようにすると、端末制御部に送信するデータ量
等に応じて通信速度を変化させることができて、通信の
効率化を図ることができる。
According to a fourth aspect of the present invention, in the vending machine control device, the main control unit transmits the data at a different communication speed according to a terminal control unit that transmits data. With this configuration, the communication speed can be changed according to the amount of data to be transmitted to the terminal control unit, and communication efficiency can be improved.

【0014】さらに、請求項5記載の自動販売機の制御
装置は、前記端末制御部は、パルス発振回路と、該発振
回路から出力されるパルスをカウントして所定の時間を
計時する制御用タイマーとを具えており、前記制御用タ
イマーにおける前記パルスのカウント数と時間との関係
を前記主制御部から出力されるデータに基づいて決定す
ることを特徴とする。このようにすると、安価なCR発
振回路を用いた場合でも、制御用タイマーの正確さを確
保することができる。
The control device for a vending machine according to claim 5, wherein the terminal control section counts a pulse output from the oscillation circuit and counts a pulse output from the oscillation circuit to count a predetermined time. And determining the relationship between the pulse count and time in the control timer based on data output from the main control unit. In this way, even if an inexpensive CR oscillation circuit is used, the accuracy of the control timer can be ensured.

【0015】[0015]

【発明の実施の形態】以下、本発明の実施の形態を図面
に基づいて詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0016】(第1実施形態)図1は、第1実施形態の
概略構成図である。端末制御部2,3の発振回路とし
て、従来の自動販売機の制御装置では、前述したよう
に、高価なセラミック発振回路を用いていた。それに対
して、本発明では、主制御部1の発振回路12は、精度
の高いセラミック発振子や水晶発振子を用いた発振回路
を用いるが、端末制御部2,3,・・・の発振回路とし
ては、CR発振回路22,32のような安価な発振回路
を用いる。
(First Embodiment) FIG. 1 is a schematic configuration diagram of a first embodiment. As the oscillation circuits of the terminal control units 2 and 3, in the control device of the conventional vending machine, as described above, an expensive ceramic oscillation circuit was used. On the other hand, in the present invention, the oscillation circuit 12 of the main control unit 1 uses an oscillation circuit using a high-precision ceramic oscillator or a crystal oscillator, but the oscillation circuit of the terminal control units 2, 3,. Inexpensive oscillation circuits such as CR oscillation circuits 22 and 32 are used.

【0017】CR発振回路22,32は、周囲温度等の
影響を受けて、発振周波数が大きく変動する。したがっ
て、主制御部1から4800bpsで送信された図9に
示したようなフォーマットのデータを、端末制御部2,
3,・・・側で受信する場合、図10に示したようなタ
イミングでデータを取り込むために、208.3μ秒を
カウントしようとして、所定のカウント数だけ発振回路
のパルスをカウントしても、実際の時間は変動してしま
う。
The oscillation frequencies of the CR oscillation circuits 22 and 32 greatly fluctuate under the influence of the ambient temperature and the like. Therefore, data in a format as shown in FIG. 9 transmitted from the main control unit 1 at 4800 bps is transmitted to the terminal control units 2 and
In the case of receiving on the 3,... Side, in order to take in data at the timing as shown in FIG. The actual time fluctuates.

【0018】そこで、この実施形態では、主制御部1か
ら送信する際の、データのフォーマットを図2のように
する。すなわち、データの先頭部分に、“L”固定のス
タートビット1と、“H”固定のスタートビット2を付
し、その後に、データD0 〜D7 ,パリティビット,ス
トップビット(“H”固定)を出力するようにする。
Therefore, in this embodiment, the data format when transmitting from the main control unit 1 is as shown in FIG. That is, a start bit 1 fixed at "L" and a start bit 2 fixed at "H" are added to the head of the data, and then data D0 to D7, a parity bit, and a stop bit (fixed at "H") are added. Output.

【0019】そして、端末制御部2,3,・・・では、
主制御部1から送られてきたデータの1ビットの時間を
測定するために、スタートビット1が“L”の間に、当
該端末制御部のCR発振回路22,32,・・・が発振
したパルス数がいくつあるかをカウントする。例えば、
CR発振回路22,32の発振周波数を1MHz とする
と、1μ秒に1つのパルスが出力されることになる。し
たがって、図3に示すように、スタートビット1が立ち
下がった時点T0 にCR発振回路22,32から出力さ
れるパルスのカウントを開始し、スタートビット1が立
ち上がった時点T1 にカウントを終了すると、208.
3(μ秒)÷1(μ秒)≒208(カウント)となる。
そのカウント数を1ビットの長さとして記憶しておく。
In the terminal control units 2, 3,...
While the start bit 1 is “L”, the CR oscillation circuits 22, 32,... Of the terminal control unit oscillate in order to measure the time of one bit of the data sent from the main control unit 1. Count how many pulses there are. For example,
Assuming that the oscillation frequency of the CR oscillation circuits 22 and 32 is 1 MHz, one pulse is output every 1 microsecond. Therefore, as shown in FIG. 3, when the counting of the pulses output from the CR oscillation circuits 22 and 32 starts at the time T0 when the start bit 1 falls, and the counting ends at the time T1 when the start bit 1 rises, 208.
3 (μsec) ÷ 1 (μsec) ≒ 208 (count).
The count number is stored as a one-bit length.

【0020】次に、スタートビット1が立ち上がった時
点T1 から、208(カウント)×1.5=312(カ
ウント)後の時点T2 に、通信ライン4をサンプリング
し、データD0 を得る。その後は、208カウント毎に
通信ライン4をサンプリングし、データD1 ,D2 ,・
・・,D7 ,パリティビット,ストップビットを得る。
Next, the communication line 4 is sampled at a time T2 after 208 (counts) .times.1.5 = 312 (counts) from the time T1 when the start bit 1 rises to obtain data D0. Thereafter, the communication line 4 is sampled every 208 counts, and data D1, D2,.
..., D7, parity bit, and stop bit are obtained.

【0021】また、端末制御部から主制御部へデータを
送信する場合は、受信時に得た最新のカウント数を利用
して1ビットの長さとする。すなわち、上記の例では、
208カウントを1ビットの長さとして送信を行う。
When data is transmitted from the terminal control unit to the main control unit, the length is set to 1 bit using the latest count number obtained at the time of reception. That is, in the above example,
Transmission is performed with 208 counts as 1 bit length.

【0022】ところで、CR発振回路は、周囲温度等の
影響を受けて、発振周波数が変動するが、その点につい
て、図4を使って説明する。図4は、CR発振回路の発
振周波数が±25%の幅で変動した場合を示している。
例えば、100%が1MHZであるとすると、その時
は、前述したように、208カウントを1ビットの長さ
として処理する。
The oscillation frequency of the CR oscillation circuit fluctuates under the influence of the ambient temperature and the like. This will be described with reference to FIG. FIG. 4 shows a case where the oscillation frequency of the CR oscillation circuit fluctuates within a range of ± 25%.
For example, if 100% is 1 MHz, then, as described above, 208 counts are processed as 1-bit length.

【0023】それに対して、CR発振回路の発振周波数
が75%の0.75MHZ になると、発振パルスの間隔
は、1.33μ秒となり、4800bpsのときの1ビ
ット当たりのパルス数は、208.3(μ秒)÷1.3
3(μ秒)≒156となる。したがって、そのカウント
数156を記憶しておき、その後は、156カウント毎
に通信ラインをサンプリングし、データD1 ,D2 ,・
・・,D7 ,パリティビット,ストップビットを得る。
また、送信するときも、156カウントを1ビットの長
さとして送信を行う。
On the other hand, when the oscillation frequency of the CR oscillation circuit becomes 75%, that is, 0.75 MHz, the interval between oscillation pulses becomes 1.33 μsec, and the number of pulses per bit at 4800 bps is 208.3. (Μsec) ÷ 1.3
3 (μsec) ≒ 156. Therefore, the count number 156 is stored, and thereafter, the communication line is sampled every 156 counts, and the data D1, D2,.
..., D7, parity bit, and stop bit are obtained.
Also, when transmitting, the transmission is performed with 156 counts as 1 bit length.

【0024】そしてまた、CR発振回路の発振周波数が
125%の1.25MHZ になると、発振パルスの間隔
は、0.8μ秒となり、4800bpsのときの1ビッ
ト当たりのパルス数は、208.3(μ秒)÷0.8
(μ秒)≒260となる。したがって、そのカウント数
260を記憶しておき、その後は、260カウント毎に
通信ラインをサンプリングし、データD1 ,D2 ,・・
・,D7 ,パリティビット,ストップビットを得る。ま
た、送信するときも、260カウントを1ビットの長さ
として送信を行う。
When the oscillation frequency of the CR oscillation circuit becomes 125%, that is, 1.25 MHz, the interval between oscillation pulses becomes 0.8 μs, and the number of pulses per bit at 4800 bps is 208.3 ( μs) ÷ 0.8
(Μsec) ≒ 260. Therefore, the count number 260 is stored, and thereafter, the communication line is sampled every 260 counts, and the data D1, D2,.
・, D7, parity bit and stop bit are obtained. Also, when transmitting, the transmission is performed with 260 counts as the length of 1 bit.

【0025】このように、受信したデータのスタートビ
ット1を基準として、1ビットの長さを発振回路のカウ
ント数で測り、それに合わせて処理するので、発振回路
の発振周波数が変動しても正常な通信が可能になる。
As described above, the length of one bit is measured by the count number of the oscillation circuit based on the start bit 1 of the received data, and the processing is performed in accordance with the count. Communication becomes possible.

【0026】なお、上記第1実施形態では、スタートビ
ット1をLレベル、スタートビット2をHレベルとした
が、必ずしもそれに限定されず、図5に示すように、極
性を反転させて、スタートビット1をHレベル、スター
トビット2をLレベルとしてもよい。
In the first embodiment, the start bit 1 is set at the L level and the start bit 2 is set at the H level. However, the present invention is not necessarily limited to this. As shown in FIG. 1 may be at the H level and the start bit 2 may be at the L level.

【0027】(第2実施形態)図6は、第2実施形態の
概略構成図である。この実施形態では、2本の通信ライ
ン4,4の他に基準信号ライン5を設け、それにより1
ビットの長さに関係した基準信号を与えるようにしてい
る。その基準信号は、図7に示すような1ビットの長さ
に対応したパルス幅Wを有している。そして、端末制御
部では、基準信号が“L”の間に、当該端末制御部のC
R発振回路22,32,・・・が発振したパルス数がい
くつあるかをカウントして、1ビットの長さを測る。そ
のパルス幅Wは、それに基づいて1ビットの長さが分か
ればよいので、必ずしも1ビットの長さにする必要はな
く、1ビットの1/2,1/4等の長さにしてもよい。
(Second Embodiment) FIG. 6 is a schematic configuration diagram of a second embodiment. In this embodiment, a reference signal line 5 is provided in addition to the two communication lines 4 and 4, thereby
The reference signal related to the bit length is provided. The reference signal has a pulse width W corresponding to the length of one bit as shown in FIG. Then, in the terminal control unit, while the reference signal is “L”, the C of the terminal control unit is
The number of pulses oscillated by the R oscillation circuits 22, 32,... Is counted, and the length of one bit is measured. The pulse width W need only be determined by the length of one bit based on the pulse width W. Therefore, the pulse width W does not necessarily need to be set to one bit length, and may be set to 1 /, 1 /, or the like of one bit. .

【0028】この実施形態のようにすれば、通信のフォ
ーマットを図9に示すような、従来のフォーマットのま
まで通信することができる。したがって、CPUの通信
のフォーマットが図9のものに限定されている場合は、
この実施形態を採用すれば、上記ものと同様な効果が得
られる。
According to this embodiment, communication can be performed with the conventional communication format as shown in FIG. Therefore, if the communication format of the CPU is limited to that of FIG.
By employing this embodiment, the same effects as those described above can be obtained.

【0029】ところで、従来の自動販売機の制御装置で
は、通信速度を一定の速度、例えば、4800bpsに
固定して通信する必要があったが、本発明のようにすれ
ば、固定する必要がなくなる。すなわち、本発明による
端末制御部では、送られてくるデータの通信速度に関係
なく、1ビットの長さを測ることができ、それに合わせ
て受信できるので、主制御部1は、送信先の端末制御部
に応じて通信速度を変化させることができる。例えば、
送信するデータ量が多い端末制御部に対しては、960
0bpsのように通信速度を速くして、通信時間が長く
ならないようにし、送信するデータ量が少ない端末制御
部に対しては、4800bpsのように通信速度を遅く
して、正確な通信を行うようにすれば、より一層効率的
な通信が可能となる。
In the conventional vending machine control device, it was necessary to communicate at a fixed communication speed of, for example, 4800 bps. However, according to the present invention, there is no need to fix the communication speed. . That is, the terminal control unit according to the present invention can measure the length of one bit regardless of the communication speed of the transmitted data and can receive the data in accordance with the length, so that the main control unit 1 The communication speed can be changed according to the control unit. For example,
960 for the terminal control unit that transmits a large amount of data.
The communication speed is increased such as 0 bps so that the communication time does not become longer. For a terminal control unit that transmits a small amount of data, the communication speed is reduced such as 4800 bps and accurate communication is performed. In this case, more efficient communication becomes possible.

【0030】また、端末制御部2,3,・・・は、タイ
マーを使って制御を行う場合があるが、そのような場合
は、CR発振回路22,32,・・・が出力するパルス
を使って、制御用のタイマーを構成することになる。そ
の際、CR発振回路22,32,・・・の発振周波数が
変動すると、制御の時間が変動してしまい、正常な制御
ができなくなる。例えば、販売制御部において、商品搬
出用ソレノイドの通電時間を10ミリ秒にする場合、制
御用タイマーに誤差が生じて、必要な時間通電できず,
商品を搬出できなかったり、必要以上に長い期間通電し
て、電力や時間を無駄に消費したりする可能性が生じ
る。
May be controlled using a timer. In such a case, the pulses output from the CR oscillation circuits 22, 32,... This will constitute a control timer. At this time, if the oscillation frequency of the CR oscillation circuits 22, 32,... Fluctuates, the control time fluctuates and normal control cannot be performed. For example, when the sales control unit sets the energization time of the product unloading solenoid to 10 milliseconds, an error occurs in the control timer, and the energization cannot be performed for a necessary time.
There is a possibility that the product cannot be carried out or that power is supplied for an unnecessarily long time and power and time are wasted.

【0031】そのようなことに対して、上記第1実施形
態におけるスタートビット1や、第2実施形態における
基準信号を使って、制御用タイマーの補正をするように
することができる。すなわち、主制御部1から送られて
くるデータのスタートビット1や基準信号の長さは、常
に一定であるため、それが“L”である期間にカウント
されるパルス数に基づいて、単位時間当たりのカウント
数が分かる。その単位時間当たりのカウント数を使え
ば、正確なタイマーにすることができる。
To cope with such a situation, the control timer can be corrected using the start bit 1 in the first embodiment and the reference signal in the second embodiment. That is, since the length of the start bit 1 and the reference signal of the data sent from the main control unit 1 is always constant, the unit time is determined based on the number of pulses counted during the period when the start bit 1 is "L". You can see the count number per hit. By using the count number per unit time, an accurate timer can be obtained.

【0032】[0032]

【発明の効果】本発明は、以上説明したように構成され
ているので、次に記載するような効果を奏する。請求項
1記載の自動販売機の制御装置は、端末制御部は、該端
末制御部内で用いる通信の基準時間を、主制御部から送
信されてくる精度の高いデータに基づいて決定するよう
にしたので、端末制御部のパルス発生用に、安価なCR
発振回路を用いてコストの低減を図りながら、主制御部
と端末制御部との間の通信は正常に行われるようにする
ことができる。
Since the present invention is configured as described above, it has the following effects. In the control device for a vending machine according to the first aspect, the terminal control unit determines the reference time of communication used in the terminal control unit based on highly accurate data transmitted from the main control unit. Therefore, inexpensive CR for pulse generation of the terminal control unit
Communication between the main control unit and the terminal control unit can be performed normally while reducing cost by using the oscillation circuit.

【0033】そして、請求項2記載の自動販売機の制御
装置は、主制御部は、送信データの先頭に、Lレベルの
第1のスタートビットと、Hレベルの第2のスタートビ
ットを付してデータの送信を行い、端末制御部は、該端
末制御部内で用いる通信の基準時間を、前記第1のスタ
ートビットの立ち下がりから立ち上がりまでの時間に基
づいて決定するようにした。その結果、データが送られ
てくる毎にその時のビットの長さに基づいて通信の基準
時間を決定することができ、通信の安定性を確保するこ
とができる。
In the control device for a vending machine according to a second aspect of the present invention, the main control unit attaches an L-level first start bit and an H-level second start bit to the head of the transmission data. Then, the terminal control unit determines the reference time of communication used in the terminal control unit based on the time from the fall to the rise of the first start bit. As a result, each time data is transmitted, the communication reference time can be determined based on the bit length at that time, and communication stability can be ensured.

【0034】また、請求項3記載の自動販売機の制御装
置は、主制御部と端末制御部との間に基準信号線を設
け、主制御部は、該基準信号線を使って送信データの1
ビットの長さに対応する基準信号を送信し、端末制御部
は、該端末制御部内で用いる通信の基準時間を、前記基
準信号に基づいて決定するようにした。その結果、通信
のフォーマットを変更する必要がなくなり、従来の通信
のフォーマットしか採用できない場合でも、端末制御部
の発振回路に、安価なCR発振回路を用いてコストの低
減を図りながら、主制御部と端末制御部の間の通信は正
常に行われるようにすることができる。
According to a third aspect of the present invention, there is provided a vending machine control device, wherein a reference signal line is provided between a main control unit and a terminal control unit, and the main control unit uses the reference signal line to transmit transmission data. 1
A reference signal corresponding to the bit length is transmitted, and the terminal control unit determines a reference time of communication used in the terminal control unit based on the reference signal. As a result, there is no need to change the communication format, and even when only the conventional communication format can be adopted, the main control unit can reduce the cost by using an inexpensive CR oscillation circuit for the oscillation circuit of the terminal control unit. Communication between the terminal control unit and the terminal control unit can be performed normally.

【0035】そしてまた、請求項4記載の自動販売機の
制御装置は、主制御部が、データを送信する端末制御部
に応じて通信速度を変えて送信するようにしたので、端
末制御部に送信するデータ量等に応じて通信速度を変化
させることができて、通信の効率化を図ることができ
る。
In the control device for a vending machine according to the fourth aspect, the main control unit transmits the data at a different communication speed in accordance with the terminal control unit for transmitting data. The communication speed can be changed according to the amount of data to be transmitted and the like, and communication efficiency can be improved.

【0036】さらに、請求項5記載の自動販売機の制御
装置は、端末制御部のパルス発振回路の出力パルスに基
づいて時間を計時する制御用タイマーの出力パルスのカ
ウント数と計時時間との関係を主制御部から出力される
データに基づいて決定するようにしたので、安価なCR
発振回路を用いた場合でも、制御用タイマーの正確さを
確保することができる。
Further, in the control device for a vending machine according to the present invention, the relationship between the count number of the output pulse of the control timer for measuring time based on the output pulse of the pulse oscillation circuit of the terminal control unit and the clocking time. Is determined based on data output from the main control unit, so that a low-cost CR
Even when an oscillation circuit is used, the accuracy of the control timer can be ensured.

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

【図1】第1実施形態の概略構成図である。FIG. 1 is a schematic configuration diagram of a first embodiment.

【図2】第1実施形態の通信フォーマットを示す図であ
る。
FIG. 2 is a diagram illustrating a communication format according to the first embodiment.

【図3】端末制御部における受信データのサンプリング
タイミングを示す図である。
FIG. 3 is a diagram showing sampling timing of received data in a terminal control unit.

【図4】第1実施形態における通信フォーマットと発振
パルスとの関係を示す図である。
FIG. 4 is a diagram illustrating a relationship between a communication format and an oscillation pulse in the first embodiment.

【図5】第2実施形態の概略構成図である。FIG. 5 is a schematic configuration diagram of a second embodiment.

【図6】第2実施形態の概略構成図である。FIG. 6 is a schematic configuration diagram of a second embodiment.

【図7】第2実施形態における受信データのサンプリン
グ間隔決定方法を示す図である。
FIG. 7 is a diagram illustrating a method of determining a sampling interval of received data in a second embodiment.

【図8】従来の自動販売機の制御装置の概略構成図であ
る。
FIG. 8 is a schematic configuration diagram of a conventional vending machine control device.

【図9】従来の自動販売機の制御装置における通信フォ
ーマットを示す図である。
FIG. 9 is a diagram showing a communication format in a conventional vending machine control device.

【図10】従来の自動販売機の制御装置における受信デ
ータのサンプリングタイミングを示す図である。
FIG. 10 is a diagram showing sampling timing of received data in a conventional vending machine control device.

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

4…通信ライン 5…基準信号ライン 12,24,34…発振回路 13…バッファ 22,32…CR発振回路 4 communication line 5 reference signal line 12, 24, 34 oscillation circuit 13 buffer 22, 32 CR oscillation circuit

フロントページの続き (72)発明者 山崎 康宏 大阪府守口市京阪本通2丁目5番5号 三 洋電機株式会社内Continuation of front page (72) Inventor Yasuhiro Yamazaki 2-5-5 Keihanhondori, Moriguchi-shi, Osaka Sanyo Electric Co., Ltd.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 自動販売機の各部を個別に制御する複数
の端末制御部と、前記複数の端末制御部を通信線を通し
て統括して制御する主制御部とを具えた自動販売機の制
御装置であって、前記端末制御部は、該端末制御部内で
用いる通信の基準時間を、前記主制御部から送信されて
くるデータに基づいて決定することを特徴とする自動販
売機の制御装置。
An apparatus for controlling a vending machine, comprising: a plurality of terminal controllers for individually controlling the respective units of the vending machine; and a main controller for controlling the plurality of terminal controllers integrally through a communication line. Wherein the terminal control unit determines a reference time for communication used in the terminal control unit based on data transmitted from the main control unit.
【請求項2】 前記主制御部は、送信データの先頭に、
Lレベル又はHレベルのいずれか一方に固定された第1
のスタートビットと、前記第1のスタートビットと反対
のレベルに固定された第2のスタートビットを付してデ
ータの送信を行い、前記端末制御部は、該端末制御部内
で用いる通信の基準時間を、前記第1のスタートビット
の立ち下がりから立ち上がりまで、又は、立ち上がりか
ら立ち下がりまでの時間に基づいて決定することを特徴
とする請求項1記載の自動販売機の制御装置。
2. The method according to claim 1, wherein the main control unit includes:
First level fixed to either L level or H level
And a second start bit fixed at a level opposite to that of the first start bit to transmit data, and the terminal control unit sets a reference time for communication used in the terminal control unit. 2. The control device for a vending machine according to claim 1, wherein the control unit determines the value of the first start bit from the fall to the rise of the first start bit or the time from the rise to the fall of the first start bit.
【請求項3】 前記主制御部と端末制御部との間に基準
信号線を設け、主制御部は、該基準信号線を使って送信
データの1ビットの長さに対応する基準信号を送信し、
端末制御部は、該端末制御部内で用いる通信の基準時間
を、前記基準信号に基づいて決定することを特徴とする
請求項1記載の自動販売機の制御装置。
3. A reference signal line is provided between the main control unit and a terminal control unit, and the main control unit transmits a reference signal corresponding to one bit length of transmission data using the reference signal line. And
The vending machine control device according to claim 1, wherein the terminal control unit determines a reference time of communication used in the terminal control unit based on the reference signal.
【請求項4】 前記主制御部は、データを送信する端末
制御部に応じて通信速度を変えて送信することを特徴と
する請求項1,2または3記載の自動販売機の制御装
置。
4. The vending machine control device according to claim 1, wherein the main control unit changes the communication speed according to a terminal control unit that transmits data and transmits the data.
【請求項5】 前記端末制御部は、パルス発振回路と、
該発振回路から出力されるパルスをカウントして所定の
時間を計時する制御用タイマーとを具えており、前記制
御用タイマーにおける前記パルスのカウント数と時間と
の関係を前記主制御部から出力されるデータに基づいて
決定することを特徴とする請求項1,2,3または4記
載の自動販売機の制御装置。
5. The terminal control unit, comprising: a pulse oscillation circuit;
A control timer that counts pulses output from the oscillation circuit and counts a predetermined time, and outputs the relationship between the number of pulses and time in the control timer from the main control unit. 5. The vending machine control device according to claim 1, wherein the determination is made based on data obtained from the vending machine.
JP9288393A 1997-10-21 1997-10-21 Controller for vending machine Pending JPH11120424A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9288393A JPH11120424A (en) 1997-10-21 1997-10-21 Controller for vending machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9288393A JPH11120424A (en) 1997-10-21 1997-10-21 Controller for vending machine

Publications (1)

Publication Number Publication Date
JPH11120424A true JPH11120424A (en) 1999-04-30

Family

ID=17729630

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9288393A Pending JPH11120424A (en) 1997-10-21 1997-10-21 Controller for vending machine

Country Status (1)

Country Link
JP (1) JPH11120424A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013255088A (en) * 2012-06-07 2013-12-19 Panasonic Corp Serial communication device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013255088A (en) * 2012-06-07 2013-12-19 Panasonic Corp Serial communication device

Similar Documents

Publication Publication Date Title
JPH0918405A (en) Intermittent reception controller
EP0910823B1 (en) Method for resetting processor, and watchdog
US6442704B1 (en) Ring oscillator clock frequency measuring method, ring oscillator clock frequency measuring circuit, and microcomputer
US20240053459A1 (en) Modified uart interface and uart data transmission for real-time data transmission of echo data to a higher-level computer system
JPH11120424A (en) Controller for vending machine
EP0645609B1 (en) Improvements in or relating to gas meters
US6946886B2 (en) Clock-synchronized serial communication device and semiconductor integrated circuit device
JP2866332B2 (en) Ultrasonic flow meter
US4679169A (en) Printer hammer resetting control system
JP2560141B2 (en) Data compensation method in asynchronous data transfer
JPH09294219A (en) Measurement device for horizontal synchronizing signal frequency
TW202311775A (en) Laser jammer and implementation method thereof
JPS5825654Y2 (en) Time division remote control device
JP2672686B2 (en) Phase synchronization control method and apparatus for facsimile
JP2766838B2 (en) Time data receiving device
JPH1144784A (en) Time counting device
JPH0998108A (en) Wireless telecontrol equipment
JP2678172B2 (en) Time data receiving device and time adjusting device
JPH0626367B2 (en) Communication control device
JPH11177543A (en) Serial communication equipment and its method
JP2000261525A (en) Communication equipment and reception detection method
JP2766837B2 (en) Time data transmission device
KR100291387B1 (en) Synchronizing method for ending asynchronous bus
JPH05260565A (en) Multiplex communication method
JP2001168891A (en) Vehicle multiplex transmitting device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040421

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040622

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040820

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050628