JPH04199404A - Control device - Google Patents
Control deviceInfo
- Publication number
- JPH04199404A JPH04199404A JP2333900A JP33390090A JPH04199404A JP H04199404 A JPH04199404 A JP H04199404A JP 2333900 A JP2333900 A JP 2333900A JP 33390090 A JP33390090 A JP 33390090A JP H04199404 A JPH04199404 A JP H04199404A
- Authority
- JP
- Japan
- Prior art keywords
- switch
- state
- input
- signal
- converter
- 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
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Program-control systems
- G05B19/02—Program-control systems electric
- G05B19/04—Program control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Program control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
産業上の利用分野
本発明は、スイッチが押されている期間は電圧を変化さ
せ、スイッチが離されると電圧を一定に保つように設計
された制御装置に関するものである。DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a control device designed to vary the voltage during the period when a switch is pressed and to keep the voltage constant when the switch is released. .
従来の技術
近年、機器の制御にマイクロプロセッサが広く使用され
ている。このような機器では、スイッチが押されている
期間は電圧を連続的に変化させ、スイッチが離されると
電圧を一定に保つ制御がよく行われている0例えば、テ
レビ受信機では、音量ボリュームスイッチを押さえてい
る間は音量が連続的に増大、または、減少方向に変化し
続け、スイッチが離されると、その時点での音量が一定
に保たれるような制御が行われている。BACKGROUND OF THE INVENTION In recent years, microprocessors have been widely used to control equipment. In such devices, control is often used to continuously change the voltage while the switch is pressed and keep the voltage constant when the switch is released.0For example, in a television receiver, the volume switch Control is such that while the switch is held down, the volume continues to increase or decrease, and when the switch is released, the volume remains constant at that point.
以下図面を参照しながら、上述した従来の制御装置の一
例について説明する。第2図は従来の制御装置の機能ブ
ロックを示すものである。An example of the conventional control device mentioned above will be described below with reference to the drawings. FIG. 2 shows functional blocks of a conventional control device.
第2図において、1はオンとオフの2値のスイッチ、2
はスイッチ切換時のチャタリングを除去するシェミット
トリガ入力回路、3は制御回路プログラムに従ってデー
タ入出力などの処理を行なうマイクロプロセサ回路、4
はマイクロプロセッサ回路3にデータを入力する入力ポ
ート、5はマイクロプロセッサ回路3からデータを出力
する出力ポート、6はマイクロプロセンサ回路3に割込
処理要求信号を入力する割込入力部、7は制御プログラ
ムを格納するROM、8はマイクロプロセッサ回路3が
処理に使うRAM、9はディジタルデータをアナログ電
圧に変換するDA変換器、15は入力ポート4からデー
タを入力する周期を計測して信号を割込入力部6に出力
するタイマカウンタである。aはスイッチ1とシュミッ
トトリガ入力回路2を結ぶ信号線、bはシュミットトリ
ガ入力回路2と入力ポート4を結ぶ入力信号線、Cはタ
イマカウンタ15と割込入力部6を結ぶ割込信号線、d
は出力ポート5とAD変換器9を結ぶ出力信号線、eは
マイクロプロセッサ回路3と入力ポート4、出力ポート
5、割込入力部6、ROM7、RAM8を結ぶアドレス
およびデータバス、fばAD変換器9の出力端である。In Figure 2, 1 is a binary switch of on and off, 2
3 is a Shemite trigger input circuit that eliminates chattering when switching switches; 3 is a microprocessor circuit that performs processing such as data input/output according to the control circuit program; 4
5 is an input port for inputting data to the microprocessor circuit 3; 5 is an output port for outputting data from the microprocessor circuit 3; 6 is an interrupt input section for inputting an interrupt processing request signal to the microprocessor circuit 3; 7 is an interrupt input port for inputting an interrupt processing request signal to the microprocessor circuit 3; ROM stores the control program, 8 is RAM used by the microprocessor circuit 3 for processing, 9 is a DA converter that converts digital data into analog voltage, 15 measures the cycle of inputting data from the input port 4 and generates a signal. This is a timer counter that is output to the interrupt input section 6. a is a signal line connecting the switch 1 and the Schmitt trigger input circuit 2; b is an input signal line connecting the Schmitt trigger input circuit 2 and the input port 4; C is an interrupt signal line connecting the timer counter 15 and the interrupt input section 6; d
is an output signal line that connects the output port 5 and the AD converter 9, e is an address and data bus that connects the microprocessor circuit 3, input port 4, output port 5, interrupt input section 6, ROM 7, and RAM 8, and f is an AD conversion line. This is the output terminal of the device 9.
以上のように構成された制御装置について、以下その動
作について説明する。The operation of the control device configured as described above will be explained below.
タイマカウント15は一定周期で信号を割込入力部6に
信号を出力する。マイクロプロセッサ回路3は割入力が
有る度に入力ポート4からスイッチ1の状態を読み出す
。スイッチ1がオン状態のとき、マイクロプロセッサ回
路3は出力ポート5のデータを増加させる。また、スイ
ッチ1がオフ状態のとき、マイクロプロセッサ回路3は
出力ポート5のデータを一定に保持する。出力ポート5
のデータはAD変換器9によって電圧に変化されて出力
端fから出力されるにうして、スイッチ1が押されてい
る期間は出力端fの電圧を増大させ、スイッチ1が離さ
れると出力端fの電圧を一定に保つ制御を行うことがで
きる。The timer count 15 outputs a signal to the interrupt input section 6 at regular intervals. The microprocessor circuit 3 reads the state of the switch 1 from the input port 4 every time there is an interrupt input. When the switch 1 is on, the microprocessor circuit 3 increases the data at the output port 5. Furthermore, when the switch 1 is in the off state, the microprocessor circuit 3 holds the data at the output port 5 constant. Output port 5
The data is changed into a voltage by the AD converter 9 and output from the output terminal f, so that while the switch 1 is pressed, the voltage at the output terminal f is increased, and when the switch 1 is released, the voltage at the output terminal f is increased. Control can be performed to keep the voltage of f constant.
発明が解決しようとする課題
しかしながら上記のような構成では、マイクロプロセッ
サ回路3は、常時、一定周期でスイッチの状態を入力す
るので、スイッチのオンオフ状態とは関係なくマイクロ
プロセッサ回路3を一定時間占有する。このためスイッ
チの数が多い場合や、DA変換器9の制御以外にも多く
の処理がある場合には制?n速度が低下するという課題
を有していた。Problems to be Solved by the Invention However, in the above configuration, the microprocessor circuit 3 is always input with the switch state at a constant cycle, so the microprocessor circuit 3 is occupied for a certain period of time regardless of the on/off state of the switch. do. Therefore, if there are a large number of switches or if there are many processes other than controlling the DA converter 9, there may be restrictions. The problem was that the n speed decreased.
本発明は上記課題に鑑み、スイッチの個数や制御対象が
増加しても制御速度がほとんど低下しない制御装置を提
供するものである。In view of the above problems, the present invention provides a control device in which the control speed hardly decreases even if the number of switches or the number of objects to be controlled increases.
課題を解決するための手段
上記課題を解決するために本発明の制御装置は、オン状
態オフ状態の2値のスイッチと、上記スイッチの状態が
オフからオンに変わったときは信号を1回だけ出力し、
また、状態がオンからオフに変わったときは信号を一定
回数だけ繰り返し出力する変化検出手段と、ディジタル
で指定した数値をアナログ電圧に変換して出力するDA
変換器と、上記変化検出手段から信号が入力されるとス
イッチの状態を調べて、オン状態のときは上記DA変換
器に与える数値を連続して変化させ、また、オフ状態の
ときは上記DA変換器に与える数値を現在の値に保持す
る制御手段を備える。Means for Solving the Problems In order to solve the above problems, the control device of the present invention includes a binary switch of an on state and an off state, and a signal that is sent only once when the state of the switch changes from off to on. output,
In addition, there is a change detection means that repeatedly outputs a signal a certain number of times when the state changes from on to off, and a DA that converts a digitally specified value into an analog voltage and outputs it.
When a signal is input from the converter and the change detection means, the state of the switch is checked, and when the switch is in the on state, the value given to the DA converter is continuously changed, and when the switch is in the off state, the value given to the DA converter is continuously changed. Control means are provided for maintaining the numerical value applied to the converter at its current value.
作用
本発明は上記した構成によって、スイッチの状態を読む
のは、スイッチの状態が変化したときだけ限定されるの
で、負荷が軽減され、スイッチの個数や制限対象が増加
しても制御速度がほとんど低下しないこととなる。Effect of the Invention With the above-described configuration, the present invention can read the switch state only when the switch state changes, so the load is reduced and the control speed is almost constant even if the number of switches or the number of restricted objects increases. There will be no decline.
実施例
以下、本発明の一実施例の制御装置について、図面を参
照しながら説明する。第1図は本発明の一実施例におけ
る制御装置の機能ブロックを示すものである。Embodiment Hereinafter, a control device according to an embodiment of the present invention will be described with reference to the drawings. FIG. 1 shows functional blocks of a control device in an embodiment of the present invention.
第1図において、1スイツチ、2はンユミントトリガ入
力回路、3はマイクロプロセッサ回路、4は入力ポート
、5は出力ポート、6は割込入力部、7はROM、8は
RAM、9はAD変換器であり、以上は従来の制御装置
の機能ブロックを示す第2図の構成と同じである。10
はスイッチ1の状態がオフからオンに変化したときに信
号を出力する立ち上がりエツジ検出回路、11はスイッ
チlの状態がオンからオフに変化したときに信号を出力
する立ち下がりエツジ検出回路、12.13および14
は入力された信号を一定時間だけ遅延させて出力する遅
延回路である。In Figure 1, 1 is a switch, 2 is a digital trigger input circuit, 3 is a microprocessor circuit, 4 is an input port, 5 is an output port, 6 is an interrupt input section, 7 is a ROM, 8 is a RAM, and 9 is an AD converter. The above configuration is the same as that of FIG. 2 showing the functional blocks of a conventional control device. 10
11 is a rising edge detection circuit that outputs a signal when the state of switch 1 changes from off to on; 11 is a falling edge detection circuit that outputs a signal when the state of switch 1 changes from on to off; 12. 13 and 14
is a delay circuit that delays an input signal by a certain amount of time and outputs the delayed signal.
aはスイッチlとシュミントトリガ入力回路2を結ぶ信
号線、bはンユミノトトリガ入力回路2と入力ポート4
を結ぶ入力信号線、dは出力ポート5とAD変換器9を
結ぶ出力信号線、eはマイクロプロセンサ回路3と入力
ポート4、出力ポート5、割込入力部6、ROM7、R
AM8を結ふアドレスバス、およびデータバス、fはA
D変換器9の出力端、gはシュミントトリガ入力回路2
と立ち上がりエツジ検出回路10、立ち下がりエツジ検
出回路11を結ぶ信号線、hは立ち上がり工。a is a signal line connecting switch l and Schmint trigger input circuit 2, b is a signal line connecting switch L and Schmint trigger input circuit 2 and input port 4
d is an output signal line that connects the output port 5 and the AD converter 9, e is the input signal line that connects the microprocessor sensor circuit 3, input port 4, output port 5, interrupt input section 6, ROM 7, R
Address bus and data bus connecting AM8, f is A
Output terminal of D converter 9, g is Schmint trigger input circuit 2
A signal line connects the rising edge detection circuit 10 and the falling edge detection circuit 11, and h is the rising edge.
ジ検出回路10と割込入力部6を結ぶ割込信号線、iは
立ち下がりエツジ検出回路11と割込入力部6を結ぶ割
込信号線、jは遅延回路12と割込入力部6を結ぶ割込
信号線、kは遅延回路14と割込入力部6を結ぶ割込信
号線である。i is an interrupt signal line connecting falling edge detection circuit 11 and interrupt input section 6; j is an interrupt signal line connecting delay circuit 12 and interrupt input section 6; The connecting interrupt signal line k is an interrupt signal line connecting the delay circuit 14 and the interrupt input section 6.
以上のように構成された制御装置について、以下第1図
を用いてその動作を説明する。The operation of the control device configured as described above will be explained below with reference to FIG.
まず、スイッチ1の状態がオフからオンに変わると、ス
イッチlの状態の変化が立ち上がりエツジ検出回路10
によって検出されて割込信号が割込入力部6に入力され
る0割込信号が入力されるとマイクロプロセッサ回路3
は入力ポート4からスイッチの状態を読み出す、このと
きスイッチ1の状態はオンであるのでマイクロプロセン
サ回路3は出力ポート5の値を連続的に増大させる。こ
の結果DA変換器9の出力電圧が連続的に増大する。First, when the state of the switch 1 changes from off to on, the change in the state of the switch l rises and the edge detection circuit 10
When a 0 interrupt signal is input, the interrupt signal is detected by the microprocessor circuit 3 and input to the interrupt input section 6.
reads the state of the switch from the input port 4. At this time, since the state of the switch 1 is on, the microprocessor sensor circuit 3 continuously increases the value of the output port 5. As a result, the output voltage of the DA converter 9 increases continuously.
次にスイッチ1の状態がオンからオフに変わると、スイ
ッチlの状態が立ち下がりエツジ検出回路11によって
検出されて割込信号が割込入力部6に入力される。また
割込信号は、1段の遅延回路12、および、2段の遅延
回路13.14にも入力されて、時間を遅延させて、割
込入力部6に入力される。こうして、スイッチ1の状態
がオンからオフに変わると、割込信号が3回入力される
こととなる9割込信号が入力されるマイクロプロセッサ
回路3は入力ポート4からスイッチの状態を読み出す、
このときスイッチ1の状態はオフであるのでマイクロプ
ロセッサ回路3は出力ポート5の値を一定に保持する。Next, when the state of the switch 1 changes from on to off, the state of the switch l is detected by the falling edge detection circuit 11 and an interrupt signal is input to the interrupt input section 6. The interrupt signal is also input to the one-stage delay circuit 12 and the two-stage delay circuit 13.14, delayed in time, and input to the interrupt input section 6. In this way, when the state of the switch 1 changes from on to off, the interrupt signal will be input three times.9 The microprocessor circuit 3 to which the interrupt signal is input reads the state of the switch from the input port 4.
At this time, since the switch 1 is off, the microprocessor circuit 3 holds the value of the output port 5 constant.
この結果DA変換器9の出力電圧も一定に保持されて出
力端fより出力される。As a result, the output voltage of the DA converter 9 is also held constant and output from the output terminal f.
スイッチ1の状態がオフからオンに変化したときの割込
信号が1回だけであるのに、スイッチ1がオンからオフ
に変化したときの割込信号が3回入力されるのは、スイ
ッチオフの場合に発生する誤動作を重要視するからであ
る。The reason why the interrupt signal is input three times when switch 1 changes from on to off is because the interrupt signal is input only once when the state of switch 1 changes from off to on. This is because malfunctions that occur in these cases are given importance.
例えば、テレビ受信機の音量増のスイッチの場合、オン
状態が認識されない場合は再度スイッチを押しなおせば
よい。しかし、オフ状態が認識されない場合は、スイッ
チを離しているのにもかかわらず、音量が増大し続ける
こととなる。For example, in the case of a volume increase switch on a television receiver, if the on state is not recognized, the switch can be pressed again. However, if the off state is not recognized, the volume will continue to increase even though the switch is released.
従来例の場合には、一定周期でスイッチの状態を読み出
すので、もし誤動作が発生してもすぐに回復することが
できる。しかし、本構成のように、エツジを検出する場
合は、万が一誤動作した場合を考慮することが実用上必
要である。In the case of the conventional example, the state of the switch is read out at regular intervals, so that even if a malfunction occurs, it can be recovered immediately. However, when detecting edges as in this configuration, it is practically necessary to consider the case of malfunction.
以上のように本実施例によれば、スイッチ1と立ち上が
りエツジ検出回路10と、立ち下がりエツジ検出回路1
1と、遅延回路12.13.14と、入力ポート4と、
割込入力部6と、出力ポート5と、AD変換器9と、マ
イクロプロセッサ回路3と、RMA7と、RAM8を設
けることにより、スイッチ1の状態が変化したときだけ
、スイッチの状態を読み出し、オンの時は出力電圧を連
続して上昇させ、オフの時は一定に保つ制御が可能であ
る。As described above, according to this embodiment, the switch 1, the rising edge detection circuit 10, and the falling edge detection circuit 1
1, delay circuits 12, 13, and 14, and input port 4,
By providing the interrupt input section 6, output port 5, AD converter 9, microprocessor circuit 3, RMA 7, and RAM 8, the state of the switch 1 is read out and turned on only when the state of the switch 1 changes. It is possible to control the output voltage by continuously increasing it when it is off and keeping it constant when it is off.
発明の効果
以上のように本発明によれば、オン状態とオフ状態の2
値のスイッチと、上記スイッチの状態が、オフからオン
に変わったときは信号を1回だけ出力し、また状態がオ
ンからオフに変わったときは信号を一定回数だけ繰り返
し出力する変化検出手段と、DA変換器と、上記変化検
出手段から信号が入力されるとスイッチの状態を調べて
、オン状態のときは上記DA変換器に与える数値を連続
して変化させ、また、オフ状態のときは上記DA変換器
に与える数値を現在の値に保持する制御手段とを設ける
ことにより、・スイッチの状態を読む回数を限定するこ
とができ、負荷が軽減されるので、スイッチの個数や制
御対象が増加しても制御速度がほとんど低下しないこと
となる。Effects of the Invention As described above, according to the present invention, there are two states, an on state and an off state.
a value switch, and a change detection means that outputs a signal only once when the state of the switch changes from off to on, and repeatedly outputs the signal a fixed number of times when the state changes from on to off. When a signal is input from the DA converter and the change detection means, the state of the switch is checked, and when the switch is on, the value given to the DA converter is continuously changed, and when the switch is off, the value given to the DA converter is continuously changed. By providing a control means that maintains the numerical value given to the DA converter at the current value, the number of times the switch status is read can be limited, the load is reduced, and the number of switches and the objects to be controlled can be reduced. Even if it increases, the control speed will hardly decrease.
第1図は本発明の一莫施例における制御装置の機能ブロ
ック図、第2図は従来の制御装置の機能ブロック図であ
る。
1・・・・・・スイッチ、3・・・・・・マイクロプロ
セッサ回路、4・・・・・・入力ポート、5・・・・・
・出力ポート、6・・・・・・割込入力部、7・・・・
・・ROM、8・・・・・・RAM、9・・・・・・A
D変換器、10・・・・・・立ち上がりエツジ検出回路
、11・・・・・・立ち下がりエツジ検出回路、12.
13゜14・・・・・・遅延回路。FIG. 1 is a functional block diagram of a control device according to an embodiment of the present invention, and FIG. 2 is a functional block diagram of a conventional control device. 1...Switch, 3...Microprocessor circuit, 4...Input port, 5...
・Output port, 6... Interrupt input section, 7...
...ROM, 8...RAM, 9...A
D converter, 10... rising edge detection circuit, 11... falling edge detection circuit, 12.
13゜14... Delay circuit.
Claims (1)
号を1回だけ出力し、また、上記スイッチの状態がオン
からオフに変わったときは信号を一定回数だけ繰り返し
出力する変化検出手段と、ディジタルで指定した数値を
アナログ電圧に変換して出力するDA変換器と、 上記変化検出手段から信号が入力されるとスイッチの状
態を調べて、オン状態のときは上記DA変換器に与える
数値を連続して変化させ、また、オフ状態のときは上記
DA変換器に与える数値を現在の値に保持する制御手段
とを備えたことを特徴とする制御装置。[Claims] A binary switch of an on state and an off state, a signal is output only once when the state of the switch changes from off to on, and a signal is output only once when the state of the switch changes from on to off. A change detection means that repeatedly outputs a signal a certain number of times when a change occurs, and a DA converter that converts a digitally designated value into an analog voltage and outputs it, and when a signal is input from the change detection means, the state of the switch is determined. and a control means for continuously changing the numerical value given to the DA converter when in the on state, and maintaining the numerical value given to the DA converter at the current value when in the off state. A control device characterized by:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2333900A JPH04199404A (en) | 1990-11-29 | 1990-11-29 | Control device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2333900A JPH04199404A (en) | 1990-11-29 | 1990-11-29 | Control device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH04199404A true JPH04199404A (en) | 1992-07-20 |
Family
ID=18271211
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2333900A Pending JPH04199404A (en) | 1990-11-29 | 1990-11-29 | Control device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH04199404A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20140092900A (en) | 2011-12-12 | 2014-07-24 | 제이에프이 스틸 가부시키가이샤 | Aluminum or aluminum alloy-coated steel material and method for manufacturing the same |
-
1990
- 1990-11-29 JP JP2333900A patent/JPH04199404A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20140092900A (en) | 2011-12-12 | 2014-07-24 | 제이에프이 스틸 가부시키가이샤 | Aluminum or aluminum alloy-coated steel material and method for manufacturing the same |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0351002B2 (en) | ||
| JPH04199404A (en) | Control device | |
| JP2793226B2 (en) | Self-power counter input determination method | |
| JPS5985130A (en) | Switch input circuit | |
| JP2732585B2 (en) | Process input device | |
| CN1092813C (en) | Programmable controller | |
| JPS6228838A (en) | Interruption control circuit | |
| JPS6335465Y2 (en) | ||
| JP3669034B2 (en) | Programmable controller | |
| JP2901713B2 (en) | Input circuit of programmable controller | |
| JPS6327930A (en) | Interruption control circuit | |
| JPH08172576A (en) | Video signal switching device | |
| JP2692961B2 (en) | Load selection cutoff device | |
| JPH01143413A (en) | Chattering preventing circuit | |
| JPS62272618A (en) | Chattering prevention device | |
| JP2523707Y2 (en) | ON / OFF delay circuit | |
| KR950007938B1 (en) | How to reset the shelf programmable logic controller | |
| JPS59204415A (en) | Abnormality discriminating circuit | |
| JPH01174986A (en) | Output shielding circuit | |
| JPH02111802U (en) | ||
| JPS61141042A (en) | Input noise processing method in device for utilizing computer | |
| JPH03118789A (en) | Reversible leonard device | |
| JPH01255025A (en) | Input device | |
| JPH035804A (en) | Chattering prevention circuit | |
| JPH0515074U (en) | Sensor training device |