Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPS638481B2 - - Google Patents
[go: Go Back, main page]

JPS638481B2 - - Google Patents

Info

Publication number
JPS638481B2
JPS638481B2 JP13433182A JP13433182A JPS638481B2 JP S638481 B2 JPS638481 B2 JP S638481B2 JP 13433182 A JP13433182 A JP 13433182A JP 13433182 A JP13433182 A JP 13433182A JP S638481 B2 JPS638481 B2 JP S638481B2
Authority
JP
Japan
Prior art keywords
data
output
time
address
channel
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
Application number
JP13433182A
Other languages
Japanese (ja)
Other versions
JPS5924308A (en
Inventor
Masaaki Iga
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.)
Omron Corp
Original Assignee
Omron Tateisi Electronics Co
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 Omron Tateisi Electronics Co filed Critical Omron Tateisi Electronics Co
Priority to JP13433182A priority Critical patent/JPS5924308A/en
Publication of JPS5924308A publication Critical patent/JPS5924308A/en
Publication of JPS638481B2 publication Critical patent/JPS638481B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Program-control systems
    • G05B19/02Program-control systems electric
    • G05B19/04Program control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/10Program control other than numerical control, i.e. in sequence controllers or logic controllers using selector switches

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)

Description

【発明の詳細な説明】[Detailed description of the invention]

(イ) 発明の分野 この発明は複数の負荷を予め設定した時刻に駆
動あるいは停止するための制御をなすプログラム
タイマに関する。 (ロ) 発明の背景 一般にプログラムタイマを用いて複数の負荷の
駆動・停止制御をなす場合、同一時刻に複数のチ
ヤネル(複数の負荷)を駆動制御することがあ
る。この場合プログラムタイマより負荷への出力
送出タイミングは、複数のチヤネル出力を同時に
送出するため、駆動制御する負荷が重負荷である
場合に契約電力をオーバしたり、線路の電圧が瞬
時降下して他の機器に悪影響を及ぼすという問題
がある。この問題を解決するためには、出力送出
タイミングを各チヤネル毎に少しずつずらすこと
が望ましい。 一方、軽負荷の場合には、上記のように出力送
出タイミングを各チヤネル毎にわざわざずらす必
要はない。それゆえに複数の負荷を同時刻に駆動
制御する場合でも、負荷状況に応じて同時出力し
たり各チヤネル毎にタイミングをずらして出力す
ることが選択できれば好都合である。 (ハ) 発明の目的 この発明の目的は、ユーザが、簡単に負荷の状
況(軽負荷、重負荷)に応じて、同時駆動すべき
負荷への出力態様を選択し得るプログラムタイマ
を提供するにある。 (ニ) 発明の構成と効果 上記目的を達成するためにこの発明のプログラ
ムタイマは、複数の設定ステツプ記憶領域を有
し、各設定ステツプ記憶領域に制御すべき負荷番
号・駆動/停止を示すデータおよび曜日・時分等
の設定時刻情報を記憶する手段と、時間信号を発
生する手段と、この時間信号発生手段よりの時間
信号を受け曜日・時分等の現在時刻情報を計数す
る手段と、前記各設定時刻情報と前記現在時刻情
報とを比較して両情報の一致を確認する比較手段
と、前記比較手段の一致出力に基づいて対応する
負荷を制御する信号を出力する手段と、同時刻に
複数の負荷が駆動されるように設定されている場
合、前記出力手段よりの複数の駆動信号を各負荷
に同時に出力するか所定のタイミングだけずらし
た順次出力を出すかを切換える切換手段とで構成
されている。 この発明のプログラムタイマによれば、同時刻
に複数の負荷を駆動制御する場合に、負荷の状況
に応じ各負荷を同時に駆動するか負荷チヤネル毎
に順次タイミングをずらして出力し負荷を駆動す
るかの選択を、切換手段を操作することにより簡
単に行なうことができる。 (ホ) 実施例の説明 以下、図面に示す実施例により、この発明をさ
らに詳細に説明する。 第1図はこの発明の一実施例を示すプログラム
タイマのブロツク図である。同図において1は4
ビツトの1チツプC−MOSマイクロプロセツサ
(以下CPUという)である。このCPU1は後述す
る処理フローに基づいてタイマ機能を実行する。
CPU1には、駆動パルス及び時間パルスを与え
るためクロツクパルス発生回路2が接続され、さ
らに所定の周期(たとえば2.5mS)でCPU1に割
込みをかけるための割込信号発生回路3が接続さ
れている。 キーボード4はCPU1に接続されており、数
字・曜日・チヤネル番号の他に種々のデータを
CPU1に入力するものでありCPU1に内蔵され
るメモリ(RAM)にプログラムデータを書込
み、あるいはそのデータを消去し、修正する。 CPU1の出力は時刻表示部5、曜日表示部6
及び設定出力モニタ7に加えられ表示されるよう
になつている。なお時刻表示部5は4桁の数字表
示器で構成され、現在時刻やプログラム設定時に
おけるチヤネル番号、オン・オフデータ及びプロ
グラム時刻を表示する。曜日表示部6は各曜日に
対応する7個の発光素子で構成され、現在の曜日
を表示するとともにプログラム設定時の曜日表示
も行なう。設定出力モニタ7は4チヤネル分の発
光素子で構成されプログラム設定時に設定したチ
ヤネル番号を表示する。 週間プログラムスイツチ8は、各曜日に対応す
る7個のスイツチからなり、CPU1に接続され
ている。この週間プログラムスイツチ8は、“自
動”の状態にあるとその日はプログラムに従つて
チヤネルの負荷の制御が行なわれる。しかし、
“切”の状態にあるとすべてのチヤネルの負荷の
制御は行なわれないようになつている。 CPU1と出力モニタ10、リレー部11間に
自動/手動切換回路9が設けられている。自動/
手動切換回路9は、チヤネル毎に「入」,「切」,
「自動」を切換え得る切換スイツチより構成され
ており、各チヤネルとも「自動」に設定された場
合にのみCPU1の出力が出力モニタ10やリレ
ー部11に伝えられ「入」の場合にはCPU1の
出力とは無関係にリレー部11が強制的に駆動さ
れる。リレー部11は、このプログラムタイマに
接続される機器を動作(駆動)又は停止させる4
個からなるものであり、出力モニタ10は各チヤ
ネル毎に負荷機器の動作状態を表示する発光素子
から成るものである。 12は出力送出のモード選択スイツチ回路であ
つてこの回路がオン状態にあれば、同一時刻に複
数の出力を同時に送出する(この場合を同時起動
モードという)。逆にオフ状態にある場合には同
一時刻に出力すべき複数の出力を1秒毎に順次送
出する(この場合を順次起動モードという。)す
なわち出力送出モード選択スイツチ回路12によ
つて同時起動モードと順次起動モードが選択設定
される。 なお13はメイン電源よりの電圧Eを安定化
し、CPU1に電力を供給する定電圧回路、14
はメイン電源が断の状態でもこれをバツクアツプ
してCPU1の処理動作を実行させるバツテリで
ある。 第2図及び第3図は第1図に示したプログラム
タイマの外部ケースの表面図及び裏面図を示して
おり、第1図に示すものと同一番号はそれぞれ対
応するものを示している。15は出力端子であ
る。 上記実施例のプログラムカウンタのCPU1は、
記憶手段としてRAMを内蔵しておりこのRAM
は第4図に示すように、スタツク及びワーキング
用の記憶領域M1、演算用のレジスタN1,N2
及び設定ステツプのデータストア領域M2等に割
当てられている。ここで設定ステツプのデータス
トア領域M2は、25の設定ステツプが設定可能で
あり、1設定ステツプ毎の記憶領域には、曜日・
時分データ、チヤネルNo.データ、出力のオン・オ
フを示すデータが記憶されるようになつている。
その1設定ステツプのデータ記憶配置を示すと第
5図に示す通りでありn番地の4ビツトb1〜b
4には1分データが、n+1番地の3ビツト分b
1〜b3には10分データがn+2番地の4ビツト
分には1時位データが、n+3番地のb1・b2
の2ビツトには10時位データが、同b3・b4の
2ビツトにはチヤネルNo.がさらにn+4番地のb
1〜b3の3ビツトには曜日データが、そして同
番地のビツトb4には出力のオン・オフを示すデ
ータが設定記憶される。各設定ステツプのデータ
の設定は、キーボード4からなされる。 またCPU1は各チヤネル毎の出力状態を記憶
する出力レジスタを有しており、第6図に示すよ
うにB1〜B4の4ビツトの記憶セルを持ち、そ
のれぞれB1〜B4のビツトセルが対応する各チ
ヤネルの現在の出力状態を記憶するようになつて
いる。 次に以上のように構成される実施例プログラム
タイマの動作を第7図、第8図に示す処理フロー
を参照して説明する。 第7図は割込みルーチンの処理フロー図であ
る。 割込み信号発生回路3より2.5mS毎にCPU1に
割込み信号が加えられ、その度に停電か否か判定
し(ステツプST1)、停電でなければ表示処理を
なし(ST2)、キーボードをサーチして押された
キーがあればこれを読込み(ST3)、2.5mS毎の
時刻カウントを行なう(ST4)。停電の場合は
ST1での判定がYESとなりST5で停電フラグ
(図示せず)が1か否か判定し1であればそのま
ま、1でなければ1にして(ST6)、次に時刻カ
ウントを行なう(ST4)。この時刻カウント後は
第8図に示す通常処理ルーチンにリターンする。 今ここで、設定ステツプデータとして次表に示
すものがCPU1内のRAMに設定されており、現
在時刻が月曜日の12時34分になり、その時の出力
状態が1チヤネル…オフ、2チヤネル…オン、3
チヤネル…オフ、4チヤネル…オン(出力レジス
タの内容1010)である時を例にあげて通常処理ル
ーチンの動作を説明する。
(a) Field of the Invention The present invention relates to a program timer that controls driving or stopping a plurality of loads at preset times. (B) Background of the Invention In general, when a program timer is used to control driving and stopping of multiple loads, multiple channels (multiple loads) may be controlled to be driven at the same time. In this case, the output timing from the program timer to the load is determined by sending multiple channel outputs at the same time, so if the load to be driven and controlled is a heavy load, the contracted power may be exceeded, or the voltage on the line may drop momentarily. There is a problem in that it has a negative effect on other equipment. In order to solve this problem, it is desirable to slightly shift the output sending timing for each channel. On the other hand, in the case of a light load, there is no need to take the trouble to shift the output sending timing for each channel as described above. Therefore, even when driving and controlling a plurality of loads at the same time, it would be convenient if it were possible to select simultaneous output or staggered output for each channel depending on the load situation. (c) Purpose of the Invention The purpose of the present invention is to provide a program timer that allows the user to easily select the output mode to the loads to be simultaneously driven according to the load status (light load, heavy load). be. (d) Structure and Effects of the Invention In order to achieve the above object, the program timer of the present invention has a plurality of setting step storage areas, and each setting step storage area stores data indicating the load number and drive/stop to be controlled. and means for storing set time information such as day of the week, hour and minute, means for generating a time signal, and means for receiving the time signal from the time signal generating means and counting current time information such as day of the week, hour and minute; Comparing means for comparing each of the set time information and the current time information to confirm whether the two pieces of information match; means for outputting a signal for controlling a corresponding load based on a matching output of the comparing means; When a plurality of loads are set to be driven at the same time, a switching means is provided for switching between outputting the plurality of drive signals from the output means to each load at the same time or sequentially outputting them with a predetermined timing shift. It is configured. According to the program timer of the present invention, when driving and controlling multiple loads at the same time, it is possible to drive each load at the same time or to drive the loads by sequentially shifting the timing for each load channel depending on the load condition. The selection can be easily made by operating the switching means. (E) Description of Embodiments The present invention will be described in more detail below with reference to embodiments shown in the drawings. FIG. 1 is a block diagram of a program timer showing one embodiment of the present invention. In the same figure, 1 is 4
It is a 1-bit C-MOS microprocessor (hereinafter referred to as CPU). This CPU 1 executes a timer function based on a processing flow described later.
A clock pulse generation circuit 2 is connected to the CPU 1 to provide drive pulses and time pulses, and an interrupt signal generation circuit 3 is also connected to the CPU 1 to interrupt the CPU 1 at a predetermined period (for example, 2.5 mS). Keyboard 4 is connected to CPU 1, and can store various data in addition to numbers, days of the week, and channel numbers.
It is input to the CPU 1, and program data is written into the memory (RAM) built into the CPU 1, or the data is erased and corrected. The output of CPU1 is time display section 5, day of the week display section 6
and is added to and displayed on the setting output monitor 7. The time display section 5 is composed of a four-digit numerical display, and displays the current time, the channel number at the time of program setting, on/off data, and program time. The day of the week display section 6 is composed of seven light emitting elements corresponding to each day of the week, and displays the current day of the week as well as the day of the week when the program is set. The setting output monitor 7 is composed of light emitting elements for four channels, and displays the channel number set at the time of program setting. The weekly program switch 8 consists of seven switches corresponding to each day of the week, and is connected to the CPU 1. When the weekly program switch 8 is in the "automatic" state, the channel load is controlled according to the program for that day. but,
When in the "off" state, load control of all channels is disabled. An automatic/manual switching circuit 9 is provided between the CPU 1, the output monitor 10, and the relay section 11. Automatic/
The manual switching circuit 9 can be turned on or off for each channel.
It consists of a changeover switch that can switch between "auto" and when each channel is set to "auto", the output of CPU 1 is transmitted to output monitor 10 and relay section 11, and when it is "on", the output of CPU 1 is transmitted to The relay section 11 is forcibly driven regardless of the output. The relay unit 11 operates (drives) or stops the equipment connected to this program timer.
The output monitor 10 is made up of light emitting elements that display the operating status of the load equipment for each channel. Reference numeral 12 denotes a mode selection switch circuit for output transmission, and when this circuit is in an on state, a plurality of outputs are simultaneously transmitted at the same time (this case is referred to as simultaneous activation mode). Conversely, when it is in the off state, multiple outputs to be output at the same time are sent out sequentially every second (this case is referred to as sequential startup mode).In other words, the output transmission mode selection switch circuit 12 selects simultaneous startup mode. The startup mode is selected and set sequentially. Note that 13 is a constant voltage circuit that stabilizes the voltage E from the main power supply and supplies power to the CPU 1, and 14
is a battery that backs up the main power and allows the CPU 1 to perform processing operations even when the main power is turned off. 2 and 3 show front and back views of the external case of the program timer shown in FIG. 1, and the same numbers as those shown in FIG. 1 indicate corresponding parts, respectively. 15 is an output terminal. The CPU1 of the program counter in the above embodiment is
It has built-in RAM as a storage means, and this RAM
As shown in FIG. 4, there is a storage area M1 for stack and working, registers N1 and N2 for calculations
and is allocated to the data store area M2 of the setting step. Here, 25 setting steps can be set in the setting step data store area M2, and the storage area for each setting step includes days of the week,
Time and minute data, channel number data, and data indicating output on/off status are stored.
The data storage arrangement for the 1 setting step is shown in Fig. 5, and the 4 bits b1 to b at address n
4 contains 1 minute data, 3 bits of address n+1 b
1 to b3 contain 10 minute data, 4 bits at address n+2 contain 1 o'clock data, and b1 and b2 at address n+3.
The 2 bits of b3 and b4 contain the data at the 10 o'clock position, and the channel number is stored in the 2 bits of b3 and b4.
Day of the week data is set and stored in three bits 1 to b3, and data indicating output on/off is stored in bit b4 at the same address. Data settings for each setting step are performed using the keyboard 4. The CPU 1 also has an output register that stores the output status of each channel, and has 4-bit memory cells B1 to B4 as shown in Figure 6, and each bit cell B1 to B4 corresponds to the output register. The current output status of each channel is stored. Next, the operation of the embodiment program timer configured as described above will be explained with reference to the processing flows shown in FIGS. 7 and 8. FIG. 7 is a processing flow diagram of the interrupt routine. An interrupt signal is applied to the CPU 1 from the interrupt signal generation circuit 3 every 2.5 mS, and each time it is determined whether or not there is a power outage (step ST1), if there is no power outage, no display processing is performed (ST2), and the keyboard is searched and pressed. If there is a key, it is read (ST3) and the time is counted every 2.5 mS (ST4). In case of power outage
The determination in ST1 is YES, and in ST5 it is determined whether the power outage flag (not shown) is 1 or not. If it is 1, it is left as is; if it is not 1, it is set to 1 (ST6), and then time is counted (ST4). After this time count, the routine returns to the normal processing routine shown in FIG. Now, the setting step data shown in the table below is set in the RAM in CPU1, the current time is 12:34 on Monday, and the output status at that time is 1 channel...off, 2 channel...on ,3
The operation of the normal processing routine will be explained by taking as an example the case where channels are off and four channels are on (output register contents 1010).

【表】 動作スタート後のST11の初期設定に続いて、
1分経過しているか判定されるが(ST12)、1
分間経過していると出力レジスタの内容すなわち
現在の出力状態1010をN1番地にストアする(ST
13)。そして設定ステツプアドレスを1にして
(ST14)、次に25の設定ステツプデータをすべ
てサーチしたか判定する(ST15)。当初は判定
NOなので、次に設定ステツプ1の時刻・曜日デ
ータが現在時刻と一致したか判定する(ST1
6)。上記例では一致するので次に設定ステツプ
1に記憶されるチヤネルNo.データよりチヤネル判
別を行なう。設定ステツプ1の場合チヤネルNo.デ
ータは00でありこれはチヤネルNo.1を意味する。
このチヤネルNo.1をデータ0001としてCPU1内
のアキユムレータAccにストアする(ST17)。
続いてST18で設定ステツプ1のn+4番地の
b4ビツトを参照して設定出力がオンかオフか判
定する。この場合1(オン)なので、ST19に移
り、N1番地のデータ1010とアキユムレータAcc
のデータ0001の論理和をとりその結果データ1011
をN1番地にストアする(ST22)。そして設定
ステツプアドレスに+1して、2とし(ST2
3)、ST15にジヤンプする。 今度は設定ステツプ2についてST15以降の
動作を進行することになる。上記例ではST15
のデータとすべてサーチしたか?の判定NOで
ST16に移り時刻・曜日が一致したか判定する
が、これはYESでST17に移り設定ステツプ2
のチヤネルNo.データ01よりチヤネルNo.2を判別
し、そのデータ0010をアキユムレータAccにセツ
トする。続いてオンデータか判定するが(ST1
8)、設定ステツプ2のn′+4番地のビツトb4
は0(オフ)でありその判定がNOとなるので設
定ステツプ1の場合とは相違し、アキユムレータ
Accの内容0010を反転して1101を得、これをアキ
ユムレータAccに再セツトする(ST20)。次に
N1番地のデータ1011とアキユムレータAccのデ
ータ1101の論理積をとり(ST21)、その結果デ
ータ1001をN1番地に再ストアする(ST22)。
そして設定ステツプアドレスに+1して3とし
(ST23)、ST15にジヤンプする。 続いて設定ステツプ3についてST15以降の
動作が進行する。この設定ステツプ3の場合も
ST15の判定NO、ST16の時刻・曜日が一致
したか?の判定YESとなりST17に移る。ST1
7では設定ステツプ3のチヤネルNo.データ10より
チヤネルNo.3を判別しそのデータ0100をアキユム
レータAccにセツトする。続いて設定ステツプ3
のn′+4番地のビツトb41より、オンデータ
か?YESの判定をし(ST18)、設定ステツプ
1の場合と同様N1番地のデータとアキユムレー
タAccの論理和をとる(ST19)。この場合両デ
ータは1001と0100であるから結果データは1101と
なりこのデータがN1番地にストアされる(ST2
2)。そして設定ステツプアドレスに+1して4
とし(ST23)、ST15にジヤンプする。 以後も設定ステツプデータのすべてのサーチが
完了するまで、ST15以降の動作が繰り返され
るがここで示した例では設定時刻・曜日が現在時
刻・曜日と一致するのは上表の3ステツプのみで
ある。したがつてST16での時刻・曜日一致し
たか?の判定はNOとなりST23で、ステツプ
アドレスの歩進だけが継続される。 データのすべてのサーチが終了するとST15
からST24にジヤンプする。ST24ではN1番
地のデータと出力レジスタとの比較が行なわれ現
在の出力とN1番地のストア内容が一致するか判
定される。もし一致している場合には、すでに出
力を送出していることになるので、ST25・ST
26でタイマチエツク及びタイマ処理を行ない
ST27に移る。 上記例ではN1番地のストアデータが1101、出
力レジスタのデータが1010なので不一致であり、
ここで送出出力モード切換選択回路12をチエツ
クして、同時起動モードか、順次起動モードかの
判別を行なう(ST29)、同時起動モードに設定
されている場合には、N1番地のデータ1101をア
キユムレータAccにロードし(ST30)、さらに
アキユムレータAccにストアされたデータ1101を
出力レジスタを経て出力処理を行なう。 ST29で順次起動モードが設定されている場
合には、1秒タイマ(CPU1内に内蔵)が起動
されているかどうかの判定を行なう(ST32)。
1秒タイマが起動されていない場合には先ず現在
の出力状態すなわち出力レジスタの内容1010をア
キユムレータAccにロードし、次にこのロードし
たデータとN1番地のデータとの論理積をとり、
その結果値をN2番地にストアする(ST33)。
上記例ではデータ1010とN1番地のデータ1101と
の論理積として1000が得られる。このデータは、
出力オン状態がなお続くチヤネルを示すデータで
ある。 続いてN1番地とN2番地の排他的論理和演算を
行ないその結果をアキユムレータAccにストアす
る(ST34)。上記例では1101と1000の排他的論
理和であり、結果データとして0101が得られる。
このデータは出力がオンに変わるチヤネルを示す
データである。すなわち1チヤネルと3チヤネル
がオンに変わるものであることを示している。 ST34に続いて、アキユムレータAccの20
ビツト(第1ビツト)が1か否か判定し(ST3
5)、1であればST36に移りN2番地の内容+
0001をN2番地に再ストアする。上記例では20
ツトが1でありN2番地に1000がストアされてい
るので、N2番地には新たに1000+0001=1001が
ストアされる。次に1秒タイマを起動し(ST3
7)、続いてN2番地のデータ1001をアキユムレー
タAccに転送し(ST38)、さらにアキユムレー
タAccのデータ1001を出力レジスタを経て出力処
理する(ST31)。これにより先ずチヤネル1が
オンされることになる。そして2チヤネルはオン
からオフ、3チヤネルはオフのまま4チヤネルは
オンのままである。 以後、ST27のキーフラグ=1か?NOを経
てST12からST24にもどる。ST24ではN1
番地のデータ1101と出力レジスタの内容1001が一
致しないので判定NOでST29に移るが、順次
起動モードなのでこのステツプにおける判定も
NOでST32に移り1秒タイマが起動している
か判定される。この判定はYESなので次に1秒
経過したかチエツクする(ST25)。1秒が経過
していない場合はST27にジヤンプし、1秒が
経過するまで、同様の処理が繰り返される。 ST25で1秒が経過したとの判定を得ると1
秒タイマをストツプすると同時にその内容をクリ
アする(ST26)。 ST26以降の動作はST27判定NO→ST12
判定NO→ST24判定NO→ST29判定NO→
ST32と進行する。ST32での1秒タイマ起動
しているか?の判定は上記したようにST26で
1秒タイマは停止されているのでこの判定はNO
となりST33に移る。このステツプでは出力レ
ジスタのデータ1001とN1番地のデータ1101の論
理積をとりその結果データ1001がアキユムレータ
AccよりN2番地にストアされる。次にST34で
N1番地のデータ1101とN2番地のデータ1001の排
他的論理和をとりその結果データ0100をアキユム
レータAccにストアする。 アキユムレータAccにストアされたデータ0100
は20ビツト、21ビツトが0で22ビツトが1である
ので、ST35の20ビツト=1か?の判定はNO、
ST39の判定NO、ST41の判定YESとなり、
処理はST42に移る。ST42ではN2番地の内
容1001と0100が加算され、その結果値1101が再度
N2番地にストアされる。続いてST37に移り1
秒タイマを起動し、さらにST38でN2番地のデ
ータをアキユムレータAccにロードし、ST31
でアキユムレータAccのデータ1101を出力レジス
タに転送し出力処理する。これによりチヤネル1
に続いて1秒後にチヤネル3もオンしたことにな
る。(チヤネル2はオフ、チヤネル4はオンした
まま) ST31における出力処理後は、ST27の判定
NO→ST12の判定NOを経てST24にもどる
が、ここでは現在の出力レジスタの内容1101と
N1番地のデータは一致するのでこのステツプに
おける判定はYESとなり、1秒経過すると1秒
タイマを停止しその内容をクリアし(ST25,
ST26)、以後ST27に移る。 以上のように、同時刻に負荷チヤネルの複数を
同時にオン(駆動)出力する場合に同時起動か順
次起動かを予め設定しておくことにより複数の出
力をまつたく同時にオンしたり、あるいは若干の
タイミング時間(たとえば1秒)をずらして順次
オンすることができる。同時起動とするか順次起
動とするかは負荷の軽重(小大)に応じて決定す
ればよい。 なお上記実施例における1秒タイマは2.5mS毎
の割込み回数をカウントし、400回を計数すると
丁度、起動後1秒間経過したことになるので簡単
に実現できる。このカウント回数を800回、1200
回と変更してやることにより1秒タイマに代え
て、2秒タイマ、3秒タイマを得ることができる
から順次起動におけるずらしタイミング幅は任意
に変えることができる。
[Table] Following the initial settings of ST11 after starting operation,
It is determined whether 1 minute has passed (ST12), but 1
If minutes have elapsed, the contents of the output register, that is, the current output status 1010, is stored at address N1 (ST
13). Then, the setting step address is set to 1 (ST14), and then it is determined whether all 25 setting step data have been searched (ST15). Initially judged
Since NO, it is next determined whether the time and day of the week data in setting step 1 match the current time (ST1
6). In the above example, since they match, the channel is then determined based on the channel number data stored in setting step 1. In the case of setting step 1, the channel number data is 00, which means channel number 1.
This channel No. 1 is stored as data 0001 in the accumulator Acc in the CPU 1 (ST17).
Next, in ST18, set address n+4 of setting step 1.
Determine whether the set output is on or off by referring to the b4 bit. In this case, it is 1 (on), so it moves to ST19, and the data 1010 at address N1 and the accumulator Acc are
Take the logical sum of data 0001 and the result is data 1011
is stored at address N1 (ST22). Then add +1 to the setting step address to set it to 2 (ST2
3) Jump to ST15. This time, regarding setting step 2, the operations from ST15 onward will proceed. In the above example, ST15
Have you searched all the data? Judgment NO
The process moves to ST16 and it is determined whether the time and day of the week match, but if this is YES, the process moves to ST17 and sets step 2.
The channel No. 2 is determined from the channel No. data 01, and the data 0010 is set in the accumulator Acc. Next, it is determined whether the data is on (ST1
8) Bit b4 at address n'+4 in setting step 2
is 0 (off) and the judgment is NO, which is different from the case of setting step 1, and the accumulator
The content 0010 of Acc is inverted to obtain 1101, which is reset to the accumulator Acc (ST20). next
The data 1011 at the N1 address and the data 1101 at the accumulator Acc are ANDed (ST21), and the resulting data 1001 is restored to the N1 address (ST22).
Then, add 1 to the set step address to make it 3 (ST23), and jump to ST15. Next, regarding setting step 3, the operations from ST15 onward proceed. Also for this setting step 3
Did the judgment NO in ST15 match the time and day of the week in ST16? The judgment is YES and the process moves to ST17. ST1
In step 7, channel No. 3 is determined from the channel number data 10 of setting step 3, and the data 0100 is set in the accumulator Acc. Next, setup step 3
Is the data on from bit b41 at address n'+4? A YES determination is made (ST18), and as in the case of setting step 1, the data at address N1 and the accumulator Acc are logically summed (ST19). In this case, since both data are 1001 and 0100, the resulting data is 1101 and this data is stored at address N1 (ST2
2). Then add +1 to the setting step address to make it 4.
(ST23) and jumps to ST15. Thereafter, the operations from ST15 onwards are repeated until all searches of the setting step data are completed, but in the example shown here, the setting time and day of the week match the current time and day of the week only for the three steps in the table above. . Therefore, did the time and day of the week match in ST16? The determination is NO, and in ST23, only the increment of the step address is continued. When all data searches are completed, ST15
Jumps from ST24. In ST24, the data at address N1 is compared with the output register to determine whether the current output matches the stored content at address N1. If they match, it means that the output has already been sent, so ST25 and ST
26 performs timer check and timer processing.
Move to ST27. In the above example, the store data at address N1 is 1101 and the output register data is 1010, so there is a mismatch.
Here, the transmission output mode switching selection circuit 12 is checked to determine whether it is the simultaneous start mode or the sequential start mode (ST29).If the simultaneous start mode is set, data 1101 at address N1 is transferred to the accumulator. The data 1101 stored in the accumulator Acc is loaded into Acc (ST30), and the data 1101 stored in the accumulator Acc is outputted via the output register. If the sequential startup mode is set in ST29, it is determined whether a one-second timer (built in the CPU 1) is activated (ST32).
If the 1-second timer is not activated, first load the current output state, that is, the contents of the output register 1010, into the accumulator Acc, then perform the logical product of this loaded data and the data at address N1,
The resulting value is stored at address N2 (ST33).
In the above example, 1000 is obtained as the AND of data 1010 and data 1101 at address N1. This data is
This data indicates channels whose output remains on. Next, an exclusive OR operation is performed on the N1 address and the N2 address, and the result is stored in the accumulator Acc (ST34). In the above example, it is the exclusive OR of 1101 and 1000, and 0101 is obtained as the result data.
This data indicates the channel whose output is turned on. In other words, it shows that channels 1 and 3 are turned on. Following ST34, it is determined whether the 20 bit (first bit) of the accumulator Acc is 1 (ST3
5) If it is 1, move to ST36 and read the contents of address N2 +
Restore 0001 to address N2. In the above example, 20 bits are 1 and 1000 is stored at address N2, so 1000+0001=1001 is newly stored at address N2. Next, start the 1 second timer (ST3
7) Next, the data 1001 at address N2 is transferred to the accumulator Acc (ST38), and the data 1001 of the accumulator Acc is outputted via the output register (ST31). As a result, channel 1 is first turned on. Channel 2 changes from on to off, channel 3 remains off, and channel 4 remains on. After that, is the ST27 key flag = 1? Return from ST12 to ST24 via NO. N1 in ST24
Since the address data 1101 and the output register contents 1001 do not match, the judgment is NO and the process moves to ST29, but since it is a sequential startup mode, the judgment at this step is also
If NO, the process moves to ST32 and it is determined whether the 1-second timer is activated. Since this judgment is YES, it is next checked whether one second has elapsed (ST25). If one second has not elapsed, the process jumps to ST27, and the same process is repeated until one second has elapsed. If you get a judgment that 1 second has passed in ST25, 1
At the same time as stopping the second timer, its contents are cleared (ST26). Operation after ST26 is ST27 judgment NO → ST12
Judgment NO → ST24 judgment NO → ST29 judgment NO →
Proceed with ST32. Is the 1 second timer on ST32 running? As mentioned above, the 1 second timer is stopped in ST26, so this judgment is NO.
Then move to ST33. In this step, data 1001 in the output register and data 1101 in address N1 are ANDed, and the result is data 1001 in the accumulator.
Stored at address N2 from Acc. Next in ST34
The data 1101 at the N1 address and the data 1001 at the N2 address are exclusive-ORed and the resulting data 0100 is stored in the accumulator Acc. Data 0100 stored in accumulator Acc
is 20 bits, 21 bits are 0, and 22 bits are 1, so is ST35's 20 bits = 1? The judgment is NO,
ST39 decision is NO, ST41 decision is YES,
The process moves to ST42. In ST42, the contents of address N2, 1001 and 0100, are added, and the resultant value is 1101 again.
Stored at address N2. Next, move on to ST37 1
Start the second timer, then load the data at address N2 into the accumulator Acc in ST38, and then in ST31
The data 1101 of the accumulator Acc is transferred to the output register and output processing is performed. This allows channel 1
One second later, channel 3 is also turned on. (Channel 2 remains off, channel 4 remains on) After output processing in ST31, judgment in ST27
NO → After the judgment NO in ST12, the process returns to ST24, but here the current output register contents 1101 and
Since the data at address N1 match, the judgment in this step is YES, and when 1 second has passed, the 1 second timer is stopped and its contents are cleared (ST25,
ST26), then proceed to ST27. As described above, when turning on (driving) outputs of multiple load channels at the same time, by setting in advance whether to start simultaneously or sequentially, it is possible to turn on multiple outputs at the same time, or to turn on a few outputs at the same time. They can be turned on sequentially by shifting the timing time (for example, 1 second). Whether to start simultaneously or sequentially can be determined depending on the weight (small or large) of the load. Note that the 1 second timer in the above embodiment counts the number of interrupts every 2.5 mS, and when it counts 400 times, it means that exactly 1 second has passed after activation, so it can be easily implemented. Repeat this count 800 times, 1200
By changing the number of times, a 2-second timer and a 3-second timer can be obtained instead of a 1-second timer, so the shift timing width in sequential activation can be arbitrarily changed.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の一実施例を示すプログラム
タイマのブロツク図、第2図は第1図に示すプロ
グラムタイマの外部ケースの表面図、第3図は同
裏面図、第4図は第1図に示すプログラムタイマ
を構成するCPUに内蔵されるRAMの記憶領域配
置を示す図、第5図は第4図に示すRAMの一設
定ステツプに割当てられる記憶領域を示す図、第
6図は出力レジスタのビツト配置を示す図、第7
図は第1図に示すプログラムタイマの割込ルーチ
ンの処理フロー図、第8図(第8図−、第8図
−)は同通常ルーチンの処理フロー図である。 1:CPU、2:クロツクパルス発生回路、
3:割込発生回路、4:キーボード、5:時刻表
示部、6:曜日表示部、7:設定出力モニタ、
8:週間プログラムスイツチ、9:自動/手動切
換回路、10:出力モニタ、11:リレー部、1
2:モード選択スイツチ回路、13:定電圧回
路、14:バツテリ、15:出力端子。
FIG. 1 is a block diagram of a program timer showing an embodiment of the present invention, FIG. 2 is a front view of the external case of the program timer shown in FIG. 1, FIG. 3 is a back view of the same, and FIG. Figure 5 is a diagram showing the storage area allocation of the RAM built into the CPU that constitutes the program timer shown in Figure 4. Figure 5 is a diagram showing the storage area allocated to one setting step of the RAM shown in Figure 4. Figure 6 is the output Diagram showing the bit arrangement of the register, No. 7
This figure is a processing flow diagram of the program timer interrupt routine shown in FIG. 1, and FIG. 8 (FIG. 8-, FIG. 8-) is a processing flow diagram of the same normal routine. 1: CPU, 2: Clock pulse generation circuit,
3: Interrupt generation circuit, 4: Keyboard, 5: Time display section, 6: Day of the week display section, 7: Setting output monitor,
8: Weekly program switch, 9: Automatic/manual switching circuit, 10: Output monitor, 11: Relay section, 1
2: Mode selection switch circuit, 13: Constant voltage circuit, 14: Battery, 15: Output terminal.

Claims (1)

【特許請求の範囲】 1 複数の負荷を予め設定した時刻に駆動あるい
は停止制御するためのプログラムタイマであつ
て、 複数の設定ステツプ記憶領域を有し、各設定ス
テツプ記憶領域に制御すべき負荷番号、駆動/停
止を示すデータおよび曜日・時分等の設定時刻情
報を記憶する手段と、時間信号を発生する手段
と、この時間信号発生手段よりの時間信号を受け
曜日・時分等の現在時刻情報を計数する手段と、
前記各設定時刻情報と前記現在時刻情報とを比較
して両情報の一致を確認する比較手段と、前記比
較手段の一致出力に基づいて対応する負荷を制御
する信号を出力する手段と、同時刻に複数の負荷
が駆動されるように設定されている場合、前記出
力手段よりの複数の駆動信号を各負荷に同時に出
力するか所定のタインミングだけずらした順次出
力を出すかを切換得るようにした手段とで構成さ
れることを特徴とするプログラムタイマ。
[Scope of Claims] 1. A program timer for driving or stopping a plurality of loads at preset times, having a plurality of setting step storage areas, each setting step storage area storing a load number to be controlled. , means for storing data indicating drive/stop and setting time information such as day of the week, hour and minute; means for generating a time signal; and means for receiving the time signal from the time signal generating means and determining the current time such as day of the week, hour and minute. a means of counting information;
Comparing means for comparing each of the set time information and the current time information to confirm whether the two pieces of information match; means for outputting a signal for controlling a corresponding load based on a matching output of the comparing means; When a plurality of loads are set to be driven at the same time, it is possible to switch between outputting the plurality of drive signals from the output means to each load at the same time or sequentially outputting the outputs shifted by a predetermined timing. A program timer comprising: means.
JP13433182A 1982-07-31 1982-07-31 Program timer Granted JPS5924308A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13433182A JPS5924308A (en) 1982-07-31 1982-07-31 Program timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13433182A JPS5924308A (en) 1982-07-31 1982-07-31 Program timer

Publications (2)

Publication Number Publication Date
JPS5924308A JPS5924308A (en) 1984-02-08
JPS638481B2 true JPS638481B2 (en) 1988-02-23

Family

ID=15125833

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13433182A Granted JPS5924308A (en) 1982-07-31 1982-07-31 Program timer

Country Status (1)

Country Link
JP (1) JPS5924308A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6357876U (en) * 1986-10-03 1988-04-18

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6392907U (en) * 1986-12-08 1988-06-15

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6357876U (en) * 1986-10-03 1988-04-18

Also Published As

Publication number Publication date
JPS5924308A (en) 1984-02-08

Similar Documents

Publication Publication Date Title
US4293927A (en) Power consumption control system for electronic digital data processing devices
US4283784A (en) Multiple time zone, alarm and user programmable custom watch
JPS638481B2 (en)
US4998229A (en) Programmable world timepiece with automatic restoration mode
US4023107A (en) Sequential channel tuning system with a memory
US4999794A (en) Electronic device for reducing the power consumption during the supply of back up power
US4115993A (en) Digital alarm watch
EP0703516B1 (en) Programmable electronic device for the control of irrigation systems
JP3604153B2 (en) Electronic clock with power generation function
US4163360A (en) Timer device
US4589779A (en) Multi-alarm timepiece with simplified operating means
US4175377A (en) Timepiece with display device for warning battery life
US4473302A (en) Electronic device
US4176517A (en) Integrated circuit for timepiece
US4431314A (en) Presettable digital time-piece display system
EP0366422B1 (en) Electronic timepiece
US6249488B1 (en) System and method for keeping time
JP4498549B2 (en) Digital display electronic clock
JP2916531B2 (en) Electronic clock with data storage function
JPS6236560B2 (en)
JPS6244387Y2 (en)
GB2064835A (en) Power consumption control system for electronic digital data processing devices
JPS59151083A (en) Wrist watch with timer function
JPS6215149B2 (en)
JPH04262292A (en) Dual-selection system of reference frequency for time piece