JPH06100927B2 - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH06100927B2
JPH06100927B2 JP60118750A JP11875085A JPH06100927B2 JP H06100927 B2 JPH06100927 B2 JP H06100927B2 JP 60118750 A JP60118750 A JP 60118750A JP 11875085 A JP11875085 A JP 11875085A JP H06100927 B2 JPH06100927 B2 JP H06100927B2
Authority
JP
Japan
Prior art keywords
signal
output
arithmetic processing
frequency
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP60118750A
Other languages
Japanese (ja)
Other versions
JPS61278905A (en
Inventor
直大 黒河
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP60118750A priority Critical patent/JPH06100927B2/en
Publication of JPS61278905A publication Critical patent/JPS61278905A/en
Publication of JPH06100927B2 publication Critical patent/JPH06100927B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、精密位置決め制御など
に利用するのに適した各種周波数の高周波パルスの選択
出力機能を付加したプログラマブルコントローラ(以
下、PCと略す)に関する。
Description: FIELD OF THE INVENTION The present invention relates to a programmable controller (hereinafter abbreviated as PC) having a function of selectively outputting high frequency pulses of various frequencies suitable for use in precision positioning control and the like. .

〔発明の背景〕 高周波パルスを利用した位置決め制御
の例として、長い電線を所定の長さにカッタで切断する
場合がある。例えば、40m/sの速度で移動する電線を40c
mごとに切断する場合、誤差を少なくするため、1msご
と、すなわち電線が4cm移動するごとにパルスをカウン
タに入力し、パルスを10個数えたら切断するといったよ
うに制御されるが、切断のタイミングが1msずれると切
断された電線の長さに4cmの誤差が生じるため、周波数
でいえば1kHzまたはそれ以上の高周波パルスを用いた高
速かつ時間的精度の高い制御が必要となる。
BACKGROUND OF THE INVENTION As an example of positioning control using a high frequency pulse, there is a case where a long electric wire is cut into a predetermined length by a cutter. For example, an electric wire that moves at a speed of 40 m / s
When cutting every m, in order to reduce the error, it is controlled to input a pulse into the counter every 1 ms, that is, every time the wire moves 4 cm, and cut it when 10 pulses are counted, but the timing of cutting A deviation of 1 ms will cause an error of 4 cm in the length of the cut wire, so high-speed and time-accurate control using high-frequency pulses of 1 kHz or more in terms of frequency is required.

このため、パルス供給源として市販の発振器を用いる場
合には、発振器自体が高価であり、また市販の発振器は
計測用で、一般産業用として作られたものでないため、
温度、湿温、ノイズなどの環境条件の悪い工場現場では
信頼性に欠け、盤面への取付もむづかしい等の問題があ
った。
Therefore, when a commercially available oscillator is used as the pulse supply source, the oscillator itself is expensive, and the commercially available oscillator is for measurement and is not made for general industry.
There were problems such as lack of reliability and difficulty in mounting on the board surface at the factory site where environmental conditions such as temperature, humidity and noise were bad.

近年、各種機器のシーケンス制御には、専用のリレー制
御盤よりも汎用化されたPCが多く採用されており、この
PCは工場現場での環境条件にも十分耐えられるように特
別に設計されているので、位置決め制御などに必要な高
周波パルスをPCから出力させることができれば、上記の
ような問題は解消する。
In recent years, more general-purpose PCs have been adopted for sequence control of various devices than dedicated relay control boards.
The PC is specially designed to withstand the environmental conditions at the factory site, so if the high-frequency pulse required for positioning control can be output from the PC, the above problems will be solved.

PCからパルス信号を出力させるには、シーケンス命令に
より1スキャンごとに出力をオン、オフ反転させる方法
もある。しかし、この方法では、出力パルスの周波数が
PCの演算処理速度、いわゆるスキャンタイム(一般的に
は10〜20ms)によって決まり、特開昭58-195902号に記
載のように演算処理速度の向上に特別な工夫を凝らして
旧来の2〜10倍の高速化が計られたものにおいても、1k
Hzまたはそれ以上の周期の安定したパルス出力を得るこ
とはできず、また任意の周波数のパルスを選択して取り
出すこともできない。
In order to output the pulse signal from the PC, there is also a method of turning on / off the output every scan by a sequence command. However, with this method, the frequency of the output pulse is
It is determined by the arithmetic processing speed of the PC, the so-called scan time (generally 10 to 20 ms). As described in JP-A-58-195902, the conventional 2 to 10 is used with special measures to improve the arithmetic processing speed. Even if the speed is doubled, 1k
It is not possible to obtain a stable pulse output with a cycle of Hz or higher, and it is not possible to select and take out a pulse with an arbitrary frequency.

これは、PC内部での演算処理にマイクロコンピュータを
用い、直列逐次処理を行なうため、多くのシーケンスプ
ログラムを処理する場合、スキャンタイムが長くなり、
また処理内容によって演算処理時間にバラツキが生じる
のを避けられないためである。
This is because the microcomputer is used for arithmetic processing inside the PC and serial serial processing is performed, so when processing many sequence programs, the scan time becomes longer,
Further, it is inevitable that the calculation processing time varies depending on the processing content.

〔発明の目的〕 本発明は、外部負荷に対して、演算処
理部の演算結果と共に、基準パルス発生回路の信号と同
期したパルス信号を供給し、外部負荷の制御精度の向上
と、例えば工場現場など、ノイズの多い低環境条件下で
も適応性を有し、簡便に利用可能なプログラマブルコン
トローラ(PC)を提供することを目的としている。
[Object of the Invention] The present invention supplies a pulse signal synchronized with the signal of the reference pulse generation circuit to the external load together with the calculation result of the calculation processing unit, thereby improving the control accuracy of the external load and, for example, a factory site. The purpose is to provide a programmable controller (PC) that is adaptable even in noisy low environment conditions and can be easily used.

〔発明の概要〕 本発明は、シーケンスプログラムの入
力を行なうプログラム部と、上記シーケンスプログラム
を記憶する第1のメモリと、このシーケンスプログラム
にしたがって論理演算を行なう演算処理部と、この演算
処理部の処理手続を記憶する第2のメモリと、この演算
処理部に接続されて外部からの信号を受ける入力部と、
この演算処理部の演算結果を制御対象となる外部負荷に
伝える出力部と、この演算処理部に接続されてシーケン
ス演算処理に必要なタイミング信号を供給する基準パル
ス発生回路と、この基準パルス発生回路からの出力信号
を分周する分周回路と、この分周回路から出力される複
数の分周信号のうちの一つを選択する信号選択手段と、
上記分周路からのタイミング信号を上記演算処理部に入
力する第1の割込み端子と、上記プログラム部のキー操
作入力により上記分周信号を指定し、上記演算処理部を
介してこの指定信号を保持するラッチ回路と、このラッ
チ回路に保持された分周信号を上記信号選択手段から上
記演算処理部に優先的に入力する第2の割込み端子とを
有し、上記演算処理部は、上記入力された割込み信号に
対応した割込み処理を行なうことにより、最も優先順位
の高いものから処理を行ない、上記分周信号を増幅し分
周信号に同期したパルス信号として外部負荷に出力する
ことを特徴とするプログラマブルコントローラである。
SUMMARY OF THE INVENTION The present invention provides a program section for inputting a sequence program, a first memory for storing the sequence program, an arithmetic processing section for performing a logical operation according to the sequence program, and an arithmetic processing section for the arithmetic processing section. A second memory for storing the processing procedure; an input section connected to the arithmetic processing section for receiving a signal from the outside;
An output unit for transmitting the calculation result of the calculation processing unit to an external load to be controlled, a reference pulse generation circuit connected to the calculation processing unit for supplying a timing signal necessary for sequence calculation processing, and the reference pulse generation circuit A frequency dividing circuit for dividing the output signal from the frequency division circuit, and signal selecting means for selecting one of a plurality of frequency dividing signals output from the frequency dividing circuit,
A first interrupt terminal for inputting the timing signal from the frequency dividing path to the arithmetic processing section and the frequency dividing signal are designated by a key operation input of the program section, and the designated signal is given through the arithmetic processing section. It has a latch circuit for holding it and a second interrupt terminal for preferentially inputting the frequency-divided signal held in the latch circuit from the signal selecting means to the arithmetic processing section, and the arithmetic processing section inputs the input signal. By performing interrupt processing corresponding to the generated interrupt signal, the processing with the highest priority is processed, and the divided signal is amplified and output to the external load as a pulse signal synchronized with the divided signal. It is a programmable controller.

〔発明の作用〕[Operation of the invention]

上記の構成により、特定の信号指定手段によらず、プロ
グラム部のキー操作入力によって容易に分周信号の選択
指定が可能であり、パルス信号は基準パルス発生回路の
信号を分周しているので周期が安定しており、またパル
ス信号は、基準パルス発生回路の信号と同期しているの
で、演算処理部から供給された演算結果とのタイミング
を合わせることができ、連携動作を行なわせることが容
易であるとともに、分周信号は増幅されているからノイ
ズの影響を受けにくい。
With the above configuration, it is possible to easily select and specify the divided signal by the key operation input of the program section regardless of the specific signal specifying means, and the pulse signal divides the signal of the reference pulse generation circuit. Since the cycle is stable and the pulse signal is synchronized with the signal of the reference pulse generation circuit, it is possible to match the timing with the calculation result supplied from the calculation processing unit and to perform the cooperative operation. It is easy and the frequency-divided signal is amplified so that it is less susceptible to noise.

〔発明の実施例〕 以下、本発明の実施例を図面により
説明する。
Embodiments of the Invention Embodiments of the present invention will be described below with reference to the drawings.

第1図は本発明の第1の実施例を示す。この図におい
て、1は外部の接点等による入力信号源、2は上記接点
等の信号を受ける入力部、3はシーケンスプログラムに
従って論理演算を行なう演算処理部(CPU)であり、シ
ーケンスプログラムはユーザRAM4に記憶され、その処理
手順はシステムROM5に記憶されている。6は上記演算処
理部3の演算結果を外部負荷に伝える出力部、7はシー
ケンスプログラムを入力するためのプログラム部、8、
9はPCと外部機器とをつなぐための入力端子群および出
力端子群である。
FIG. 1 shows a first embodiment of the present invention. In the figure, 1 is an input signal source by an external contact or the like, 2 is an input unit for receiving the signal of the contact or the like, 3 is an arithmetic processing unit (CPU) for performing a logical operation according to a sequence program, and the sequence program is a user RAM 4 The system ROM 5 stores the processing procedure. 6 is an output section for transmitting the calculation result of the calculation processing section 3 to an external load, 7 is a program section for inputting a sequence program, 8,
Reference numeral 9 denotes an input terminal group and an output terminal group for connecting the PC and an external device.

10は水晶発振器等からなる基準パルス発生回路で、演算
処理部3での処理時間の基準単位となる時間的精度の高
い高周波(例えば1MHz)の基準パルス(クロック)を発
生し、その出力信号は演算処理部3のクロック入力端子
(CP)に入力される。また、上記基準パルス発生回路10
の出力信号は分周回路11で例えば100〜10Hzに分周さ
れ、タイマ演算やウォッチドッグタイマ用のタイミング
信号として演算処理部3の割込入力端子(INT1)に入力
されるようになっている。
Reference numeral 10 is a reference pulse generation circuit composed of a crystal oscillator or the like, which generates a high-frequency (for example, 1 MHz) reference pulse (clock) with high temporal accuracy, which is a reference unit of the processing time in the arithmetic processing unit 3, and its output signal is It is input to the clock input terminal (CP) of the arithmetic processing unit 3. In addition, the reference pulse generation circuit 10
The output signal of is divided into, for example, 100 to 10 Hz by the frequency dividing circuit 11, and is input to the interrupt input terminal (INT 1 ) of the arithmetic processing unit 3 as a timing signal for timer arithmetic and watchdog timer. There is.

以上2〜11はPCの一般的な構成要素であり、本実施例で
はさらに外部負荷への高周波パルスの選択出力機能を実
現するため、信号選択手段としての選択回路12、パルス
選択入力端子13と、出力手段としての専用の出力部15、
パルス出力端子16を設けてある。
The above 2 to 11 are general components of the PC, and in the present embodiment, in order to further realize the selection output function of the high frequency pulse to the external load, the selection circuit 12 as the signal selection means, the pulse selection input terminal 13 and , A dedicated output section 15 as an output means,
A pulse output terminal 16 is provided.

上記基準パルス発生回路10の出力信号を分周する分周回
路11には一般的にカウンタIC等が用いられるため、この
分周回路11からは、1kHz前後の高周波パルスを含む複数
の分周信号が得られる。
Since a counter IC or the like is generally used for the frequency dividing circuit 11 for frequency-dividing the output signal of the reference pulse generating circuit 10, the frequency dividing circuit 11 outputs a plurality of frequency dividing signals including high-frequency pulses of around 1 kHz. Is obtained.

上記選択回路12はこの複数の分周信号のうちの一つを選
択するためのもので、マルチプレクサ等の電子回路から
なっており、パルス選択入力端子13に接続された外部接
点14による信号で分周信号の選択指定を行なうことがで
きる。
The selection circuit 12 is for selecting one of the plurality of frequency-divided signals, is composed of an electronic circuit such as a multiplexer, and is divided by a signal from an external contact 14 connected to the pulse selection input terminal 13. It is possible to specify the selection of the frequency signal.

出力部15は上記の選択された分周信号をパルス出力端子
16に伝えるためのもので、出力部6に準じた構成、すな
わち少なくとも演算処理部と外部回路とを電気的に絶縁
する変圧器またはホトカプラ等の絶縁素子と外部負荷を
駆動するパワー素子とを備えた構成となっている。出力
部6に用いられるパワー素子は、電磁リレー、半導体リ
レー(SSR)、スイッチング用トランジスタなど多種多
様であるが、電磁リレーでは5〜20ms、SSRでは約11ms
の出力遅れがあり、高周波パルスの出力には対応できな
いため、出力部15のパワー素子としては、出力遅れが少
なく高周波パルスの出力に適したスイッチング用トラン
ジスタを使用するのがよい。
The output unit 15 is a pulse output terminal for the selected divided signal
16 is provided for the purpose of transmission to the output unit 6, and is provided with a configuration similar to that of the output unit 6, that is, at least an insulating element such as a transformer or a photocoupler that electrically insulates the arithmetic processing unit from the external circuit and a power element that drives an external load. It has been configured. There are various types of power elements used in the output unit 6, such as electromagnetic relays, semiconductor relays (SSRs), and switching transistors, but 5-20ms for electromagnetic relays and about 11ms for SSRs.
Since there is an output delay and the output of the high frequency pulse cannot be dealt with, it is preferable to use a switching transistor having a small output delay and suitable for the output of the high frequency pulse as the power element of the output unit 15.

本実施例では、図示しない電源スイッチの投入により基
準パルス発生回路10から基準パルスが発生し、この基準
パルスに同期して2〜9の各部によりPC本来の機能が営
まれる。また、分周回路11は上記基準パルス発生回路10
の出力信号を数回分周し所定の周期のタイミング信号と
して演算処理部3のINT1端子へ出力し、タイマ演算やウ
ォッチドッグタイマ等の機能を可能にする。
In this embodiment, when a power switch (not shown) is turned on, a reference pulse is generated from the reference pulse generating circuit 10, and the respective parts 2 to 9 perform the original functions of the PC in synchronization with the reference pulse. Further, the frequency dividing circuit 11 is the reference pulse generating circuit 10 described above.
Output signal is divided into several times and output to the INT 1 terminal of the arithmetic processing unit 3 as a timing signal of a predetermined cycle to enable functions such as timer calculation and watchdog timer.

ここで、分周回路11からは1kHz前後の高周波パルスを含
む複数の分周信号が出力されるため、選択回路12は上記
複数の分周信号のうち外部接点14により指定された一つ
の信号を選択して出力部15へ伝え、この選択された分周
信号は出力部15でパワー増幅された後、パルス出力端子
16を通して外部負荷に伝えられる。本実施例では、この
ように選択回路12で選択された分周信号が専用の出力部
15、出力端子16を通して外部に出力されるので、演算処
理部3におけるスキャンタイムとは関係なく、またPC本
来の演算処理機能には何らの影響をも及ぼさずに、周期
の安定した高周波のパルス出力が得られる。
Here, since the frequency dividing circuit 11 outputs a plurality of frequency dividing signals including a high frequency pulse of around 1 kHz, the selecting circuit 12 selects one of the frequency dividing signals specified by the external contact 14. The selected divided signal is transmitted to the output unit 15. The selected divided signal is power-amplified by the output unit 15, and then the pulse output terminal
It is transmitted to the external load through 16. In this embodiment, the divided signal thus selected by the selection circuit 12 is output to the dedicated output section.
Since it is output to the outside through the output terminal 16 and the output terminal 16, the high-frequency pulse with a stable cycle has no relation to the scan time in the arithmetic processing unit 3 and does not affect the original arithmetic processing function of the PC. Output is obtained.

上記実施例では、外部接点14による信号で分周信号の選
択指定を可能にしているが、外部信号による選択指定の
必要がない場合は、第2図に示すようにPC内部に選択回
路12のパルス選択入力を与えるディップスイッチ17等の
指定手段を設け、必要に応じて分周信号の選択指定がで
きるようにしてもよく、こうすれば第1図のパルス選択
入力端子13は不要となる。
In the above embodiment, the frequency division signal can be selected and designated by the signal from the external contact 14. However, when the selection and designation by the external signal is not necessary, the selection circuit 12 is provided in the PC as shown in FIG. Designating means such as a DIP switch 17 for giving a pulse selection input may be provided so that the divided signal can be selected and designated as required. In this case, the pulse selection input terminal 13 in FIG. 1 becomes unnecessary.

ディップスイッチ17のように選択指定形態が2進数であ
るための煩わしさを避けたい場合には、分周信号の選択
手段として第3図に示すようなロータリスイッチ18を用
いたり、あるいは図面には示さないが分周回路11の複数
の出力端子のうちの一つを出力部15に配線により切換接
続できるようにしてもよい。信号選択手段のさらに他の
例として、第4図に示すように分周回路11から出力され
る複数の分周信号をそれぞれ出力部15aを介して複数の
パルス出力端子16aに伝え、この複数のパルス出力端子1
6aのうちの一つを選んで外部負荷を接続できるようにし
てもよく、こうすれば複数の外部負荷に同時に選択され
た分周信号を出力させることができる。
When it is desired to avoid the inconvenience of the DIP switch 17 in that the selection and designation form is a binary number, a rotary switch 18 as shown in FIG. Although not shown, one of the plurality of output terminals of the frequency dividing circuit 11 may be switchably connected to the output section 15 by wiring. As still another example of the signal selecting means, as shown in FIG. 4, a plurality of frequency-divided signals output from the frequency dividing circuit 11 are transmitted to a plurality of pulse output terminals 16a via the output section 15a, respectively. Pulse output terminal 1
One of 6a may be selected so that an external load can be connected, and in this way, the selected divided signal can be output to a plurality of external loads at the same time.

第5図は本発明の第2の実施例を示す。本実施例は上記
分周信号の選択指定にプログラム部の操作キーを利用し
たものであり、1〜12および15、16の各部は第1の実施
例と同じであるが、本実施例では、プログラム部7の有
する操作キーで分周信号を選択指定すると、その指定内
容がシステムROM5に記憶された処理手順により演算処理
部3を介してラッチ回路19に出力される。そして、上記
ラッチ回路19に保持された指定内容に応じて選択回路12
は分周回路11から出力される複数の分周信号のうちの一
つを選択して出力部15に伝え、パルス出力端子16から出
力させる。
FIG. 5 shows a second embodiment of the present invention. In this embodiment, the operation keys of the program section are used to select and specify the above-mentioned frequency division signal, and each section of 1 to 12 and 15, 16 is the same as the first embodiment, but in this embodiment, When the frequency-divided signal is selected and designated by the operation key of the program unit 7, the designated content is output to the latch circuit 19 via the arithmetic processing unit 3 according to the processing procedure stored in the system ROM 5. Then, according to the designated contents held in the latch circuit 19, the selection circuit 12
Selects one of a plurality of frequency-divided signals output from the frequency dividing circuit 11, transmits it to the output unit 15, and causes the pulse output terminal 16 to output the signal.

本実施例によれば、プログラム部7のキー操作により分
周信号の選択指定ができるので、前記ディップスイッチ
17のような別の指定手段が不要となる。
According to this embodiment, since the frequency division signal can be selected and designated by operating the keys of the program section 7, the dip switch is used.
There is no need for another specifying means such as 17.

第6図は出力手段の異なる本発明の第3の実施例を示
す。
FIG. 6 shows a third embodiment of the present invention having different output means.

本実施例はPCの出力部6が高周波パルスの出力に適した
スイッチング用トランジスタをパワー素子として構成さ
れている場合を対象とするもので、1〜12および19の各
部は第5図の実施例と同じであるが、選択回路12の出力
を演算処理部3の第2の割込入力端子INT2に入力し、演
算処理部3を介して選択された分周信号に同期したパル
ス信号を出力させる構成となっている。
This embodiment is intended for the case where the output portion 6 of the PC is constituted by a switching transistor suitable for outputting a high frequency pulse as a power element, and each portion 1 to 12 and 19 is the embodiment of FIG. Same as the above, but the output of the selection circuit 12 is input to the second interrupt input terminal INT 2 of the arithmetic processing unit 3, and a pulse signal synchronized with the divided signal selected via the arithmetic processing unit 3 is output. It is configured to let.

一般的に演算処理部3は前記したINT1端子、INT2端子の
ように複数の割込入力端子を有する場合が多く、通常の
演算処理中にこれらの割込入力端子の一つに割込信号が
入ると、その演算処理を一時中断し、割込信号に応じた
別の特定の演算処理(割込処理)を行ない、これが終了
すると上記中断した演算処理を引き続き行なうようにな
っている。また、複数の割込入力端子には割込処理の優
先順位が定められており、同時に割込信号が入った場合
には優先順位の高いものから処理が行なわれ、また優先
順位の低いものの処理中に優先順位の高い割込信号が入
った場合は上記処理を一時中断して、優先順位の高い処
理を行ない、それが終了すると上記中断した処理に戻
り、引き続き処理を行なうようになっている。
Generally, the arithmetic processing unit 3 often has a plurality of interrupt input terminals like the INT 1 terminal and the INT 2 terminal described above, and interrupts one of these interrupt input terminals during normal arithmetic processing. When a signal is input, the arithmetic processing is temporarily interrupted, another specific arithmetic processing (interrupt processing) according to the interrupt signal is performed, and when this is completed, the interrupted arithmetic processing is continued. In addition, the priority order of interrupt processing is set for multiple interrupt input terminals. If interrupt signals are received at the same time, the processing with the highest priority is processed, and the processing with the lowest priority is processed. When an interrupt signal with a high priority is input, the above process is temporarily interrupted, the process with a high priority is performed, and when it ends, the process returns to the interrupted process and continues the process. .

本実施例は上記機能を利用し、優先順位の最も高い割込
入力端子(INT2)に選択回路12の出力信号を入れて、該
出力信号の立上り(立下りでもよい)で割込処理を行な
わせ、その演算結果を演算処理部3から出力部6へ出力
し、パルス出力として出力端子群9のいずれか一つに伝
えるようにしたものである。
This embodiment utilizes the above-mentioned function, puts the output signal of the selection circuit 12 into the interrupt input terminal (INT 2 ) having the highest priority, and performs the interrupt processing at the rising edge (or falling edge) of the output signal. The calculation result is output from the calculation processing unit 3 to the output unit 6, and is transmitted to any one of the output terminal groups 9 as a pulse output.

この動作を第8図、第9図により説明する。This operation will be described with reference to FIGS. 8 and 9.

第8図はユーザRAM4に記憶されたシーケンスプログラム
に基づいて演算処理部3が論理演算を行なう様子をフロ
ーチャートで示したものである。
FIG. 8 is a flowchart showing how the arithmetic processing unit 3 performs a logical operation based on the sequence program stored in the user RAM 4.

まず同図(a)に示すメインプログラムのフローチャー
トでは、所定の操作によりシーケンス演算処理がスター
トすると、第6図には示されていないプログラムカウン
タをリセットして、ユーザRAM4の内容を読み出し、この
内容に基づいて論理演算を行なう(ステップ101〜10
3)。次のステップ104では上記の演算結果がラッチ回路
19に出力すべき内容か否かを判定し、出力すべき内容で
あればラッチ回路19に出力する(ステップ105)。すな
わち、この内容が分周回路11から出力される分周信号を
指定するものであり、ラッチ回路19から選択回路12に与
えられる。今、これが第6図におけるロの分周信号を指
定する内容であったとすると、選択回路12の出力信号ホ
はロと同じ信号となり、タイミングチャートで示すと第
9図のようになる。
First, in the flow chart of the main program shown in FIG. 7A, when the sequence operation process is started by a predetermined operation, the program counter not shown in FIG. 6 is reset and the contents of the user RAM 4 are read out. Logical operation based on
3). In the next step 104, the above calculation result is the latch circuit.
It is determined whether or not the content is to be output to 19, and if the content is to be output, the content is output to the latch circuit 19 (step 105). That is, this content specifies the frequency-divided signal output from the frequency dividing circuit 11, and is given from the latch circuit 19 to the selection circuit 12. If this is the content for designating the frequency-divided signal of (b) in FIG. 6, the output signal (e) of the selection circuit 12 becomes the same signal as (b), and the timing chart shows it as shown in FIG.

第9図において、イ〜ニは分周信号の波形、ホは選択回
路12の出力信号波形、ヘは指定内容をラッチ回路19へ出
力するタイミングを示している。
In FIG. 9, (a) to (d) show the waveform of the divided signal, (e) shows the output signal waveform of the selection circuit 12, and (f) shows the timing of outputting the designated contents to the latch circuit 19.

上記の演算結果がラッチ回路に出力すべき内容でないと
き、すなわち一般の論理演算出力であれば出力部6へ出
力し(ステップ106)、プログラムカウンタを歩進させ
(ステップ107)、1スキャンが終了したかどうかの判
定(ステップ108)をして、もしNOであればステップ102
へ戻り、引き続きユーザRAM4の内容を読み出して次々と
演算処理を行ない、もし1スキャンが終了したならばス
テップ101へ戻ってプログラムカウンタをリセットした
後、ユーザRAM4の内容読出しと演算処理を繰返し行な
う。
When the operation result is not the content to be output to the latch circuit, that is, if it is a general logic operation output, it is output to the output unit 6 (step 106), the program counter is incremented (step 107), and one scan is completed. It is determined whether or not (step 108), and if NO, step 102
Then, the contents of the user RAM 4 are continuously read out and the arithmetic processing is performed one after another. If one scan is completed, the process returns to step 101 to reset the program counter, and then the contents of the user RAM 4 and the arithmetic processing are repeated.

上記したフローチャート(a)の動作中に選択回路12の
出力信号ホが演算処理部3のINT2端子に入るため、上記
出力信号ホの立上りによりフローチャート(a)の動作
が一時中断され、割込処理が行なわれる。第8図(b)
が割込処理のフローチャートで、まず演算処理部3に内
蔵されたパルスレジスタの内容(論理値の“1"または
“0")を読み出し、出力部6のあらかじめ指定されたポ
ート(出力端子群9のうちの一つ)に出力した後、上記
パルスレジスタの内容を反転処理する(ステップ109〜1
11)。
Since the output signal e of the selection circuit 12 enters the INT 2 terminal of the arithmetic processing unit 3 during the operation of the above-mentioned flowchart (a), the operation of the flowchart (a) is temporarily interrupted by the rise of the above-mentioned output signal e, and the interrupt Processing is performed. Fig. 8 (b)
In the flowchart of the interrupt processing, first, the contents of the pulse register built in the arithmetic processing unit 3 (logical value “1” or “0”) is read out, and the prespecified port of the output unit 6 (output terminal group 9 Of the pulse register is inverted (steps 109 to 1).
11).

この反転処理は、次の割込時に出力部6へ出力する内容
を反転させることを意味する。
This reversing process means reversing the contents output to the output unit 6 at the next interrupt.

以上により割込処理が終了すると、フローチャート
(a)の中断したところに戻り、引き続き処理が行なわ
れる。
When the interrupt process is completed as described above, the process returns to where the flowchart (a) was interrupted and the process is continued.

これらのタイミングは第9図の割込処理およびトの波形
で示される。すなわち、第9図のa、bはそれぞれ第8
図のフローチャート(a)、フローチャート(b)の処
理時間を示すものであり、トは出力端子群9へ出力され
るパルス波形を示すものである。この出力パルス波形ト
は選択された分周信号波形ホに同期し、この分周信号を
さらに1/2分周したものに相当する。
These timings are shown by the interrupt processing and the waveform of FIG. That is, a and b in FIG.
The processing time of the flowchart (a) and the flowchart (b) of the figure is shown, and g shows the pulse waveform output to the output terminal group 9. This output pulse waveform G is synchronized with the selected divided signal waveform E, and corresponds to the divided signal further divided by 1/2.

本実施例では、優先順位の最も高い割込処理によりパル
ス出力を行なうため、スキャンタイムのバラツキの影響
を受けずに周期の安定した出力パルスが得られる。
In this embodiment, since the pulse output is performed by the interrupt process having the highest priority, the output pulse having a stable cycle can be obtained without being affected by the variation in the scan time.

ところで、上記割込処理が行なわれたときはその分処理
時間が加算され、スキャンタイムの遅れとなるが、上記
割込処理の内容は極めて簡単であるため、汎用のマイク
ロコンピュータでも10〜20μsで処理がすみ、その遅れ
が特に問題となることはない。例えば、通常のスキャン
タイムが10msであるとき、出力したいパルス周波数を1k
Hzとすると、0.5msごとに割込処理(10〜20μs)を行
なえばよく、これによる遅れは 10ms/0.5ms×(10〜20μs)=200〜400μsとなり、1
スキャンタイム(10ms)に比べ無視できる値である。
By the way, when the above-mentioned interrupt processing is performed, the processing time is added by that amount, and the scan time is delayed, but since the content of the interrupt processing is extremely simple, even a general-purpose microcomputer takes 10 to 20 μs. Processing is completed, and the delay is not a particular problem. For example, when the normal scan time is 10ms, the pulse frequency you want to output is 1k.
If it is set to Hz, interrupt processing (10 to 20 μs) should be performed every 0.5 ms, and the delay due to this is 10 ms / 0.5 ms × (10 to 20 μs) = 200 to 400 μs.
This value is negligible compared to the scan time (10ms).

本実施例によれば、第1図〜第5図の実施例のようにパ
ルス出力のための専用の出力部15や出力端子16を設けな
くてよい。また、必要とあれば第7図に示すように外部
接点21による信号で制御用入力端子20を通してラッチ回
路19(または選択回路12)を制御し、割込を禁止するこ
とも可能である。
According to the present embodiment, it is not necessary to provide the dedicated output section 15 and the output terminal 16 for pulse output as in the embodiments of FIGS. If necessary, the latch circuit 19 (or the selection circuit 12) can be controlled through the control input terminal 20 by a signal from the external contact 21 as shown in FIG. 7 to prohibit the interrupt.

第6図にはラッチ回路19を用いて分周信号の選択指定を
行なう方式を示したが、分周信号の選択は第1図〜第3
図に示すような他の方式で行なってもよい。
FIG. 6 shows a method of selecting and designating the divided signal using the latch circuit 19. However, the divided signal is selected by referring to FIGS.
It may be performed by another method as shown in the figure.

第10図はさらに演算処理部での論理演算の結果によりパ
ルス出力の制御を可能にした本発明の第4の実施例を示
す。
FIG. 10 shows a fourth embodiment of the present invention in which the pulse output can be controlled according to the result of the logical operation in the arithmetic processing section.

本実施例は第1の実施例に制御線22、ラッチ回路23、AN
Dゲート24を追加したものであり、演算処理部3はユー
ザRAM4に記憶されたシーケンスプログラムの内容に基づ
き、入力信号源1からの入力信号等について論理演算を
行ない、外部入力信号が特定の論理状態にあるときの
み、演算結果を出力部6の一部に割当てた制御線22に出
力し、ラッチ回路23を動作可能な状態とする。次に選択
回路12の出力信号の立上りにより上記ラッチ回路23の出
力がONになるため、この出力を受けてANDゲート24が開
となり、上記選択回路12の出力信号はANDゲート24を介
して出力部15へ伝えられる。これらのタイミングを第11
図に示す。
This embodiment is the same as the first embodiment except for the control line 22, the latch circuit 23, and the AN.
In addition to the D gate 24, the arithmetic processing unit 3 performs a logical operation on the input signal from the input signal source 1 based on the contents of the sequence program stored in the user RAM 4, and the external input signal has a specific logic. Only in the state, the calculation result is output to the control line 22 assigned to a part of the output section 6, and the latch circuit 23 is made operable. Next, since the output of the latch circuit 23 is turned on by the rise of the output signal of the selection circuit 12, the AND gate 24 is opened in response to this output, and the output signal of the selection circuit 12 is output via the AND gate 24. Reported to Part 15. These timings are the 11th
Shown in the figure.

すなわち本実施例によれば、入力信号源1からの各種入
力信号の論理状態により出力パルスをほぼ同期させて周
力端子16へ出力させることができる。これは、第12図に
示すように複数台のPC(PC1〜PC3)により1台の被制御
装置25を制御するにあたり、うち1台のPC(PC1)から
被制御装置25へのパルス出力を他のPC(PC2、PC3)の出
力が特定の論理状態にあるときのみ行なわせるような場
合に有効である。
That is, according to the present embodiment, the output pulse can be output to the peripheral force terminal 16 substantially in synchronization with the logical state of various input signals from the input signal source 1. As shown in FIG. 12, when controlling one controlled device 25 by a plurality of PCs (PC1 to PC3), the pulse output from one of the PCs (PC1) to the controlled device 25 is controlled. This is useful when the output of another PC (PC2, PC3) is to be performed only when it is in a specific logic state.

〔発明の効果〕 本発明は、シーケンス演算処理に必要
なタイミング信号の供給源としてPCに内蔵された基準パ
ルス発生回路と分周回路とを利用し、特に、特定の指定
手段を必要とせず、単にプログラム部のキー操作入力に
より分周信号の選択指定ができ、操作が容易であるとと
もに、PC自体の演算処理速度(スキャンタイム)とは無
関係に、精密位置決め制御などにおける時間計測用に好
適で周期の安定した高周波のパルス出力が得られ、外部
負荷の制御精度の向上を図ることが可能であり、かつ上
記分周回路の複数の分周信号のうちから、用途に応じた
周期のパルスを選択して出力させることができるから、
ノイズに対する抵抗力を有し、低環境の工場現場にも手
軽に利用可能な高周波パルスの安定供給源としてPCに新
たな機能を付加することができるなどの顕著な効果を奏
する。
[Advantages of the Invention] The present invention uses a reference pulse generating circuit and a frequency dividing circuit built in a PC as a supply source of a timing signal necessary for sequence operation processing, and in particular, does not require a specific designating means, The frequency division signal can be selected and specified simply by inputting the key operation in the program section, and the operation is easy, and it is suitable for time measurement in precision positioning control, etc., regardless of the calculation processing speed (scan time) of the PC itself. A high-frequency pulse output with a stable cycle can be obtained, and it is possible to improve the control accuracy of the external load.Moreover, a pulse with a cycle suitable for the application can be selected from the multiple frequency-divided signals of the frequency divider circuit. You can select and output it,
It has resistance to noise and can be added to PC as a stable supply source of high frequency pulse that can be easily used even in a low environment factory.

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

第1図は本発明の第1の実施例を示すブロック図、第2
図〜第4図は第1の実施例の部分的な変形例を示すブロ
ック図、第5図は本発明の第2の実施例を示すブロック
図、第6図は本発明の第3の実施例を示すブロック図、
第7図は第3の実施例の部分的な変形例を示すブロック
図、第8図(a)、(b)は第3の実施例の動作フロー
チャート、第9図は第3の実施例のタイミングチャー
ト、第10図は本発明の第4の実施例を示すブロック図、
第11図は第4の実施例のタイミングチャート、第12図は
第4の実施例の応用例を示すブロック図である。 10:基準パルス発生回路、11:分周回路、 12、13、14、16a、17、18、19:信号選択手段、 15、15a、16、109、110、111:出力手段
FIG. 1 is a block diagram showing the first embodiment of the present invention, and FIG.
4 to 4 are block diagrams showing a partially modified example of the first embodiment, FIG. 5 is a block diagram showing a second embodiment of the present invention, and FIG. 6 is a third embodiment of the present invention. Block diagram showing an example,
FIG. 7 is a block diagram showing a partially modified example of the third embodiment, FIGS. 8 (a) and 8 (b) are operation flowcharts of the third embodiment, and FIG. 9 is a flowchart of the third embodiment. Timing chart, FIG. 10 is a block diagram showing a fourth embodiment of the present invention,
FIG. 11 is a timing chart of the fourth embodiment, and FIG. 12 is a block diagram showing an application example of the fourth embodiment. 10: reference pulse generation circuit, 11: frequency divider circuit, 12, 13, 14, 16a, 17, 18, 19: signal selection means, 15, 15a, 16, 109, 110, 111: output means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】シーケンスプログラムの入力を行なうプロ
グラム部と、 上記シーケンスプログラムを記憶する第1のメモリと、 このシーケンスプログラムにしたがって論理演算を行な
う演算処理部と、 この演算処理部の処理手続を記憶する第2のメモリと、 この演算処理部に接続されて外部からの信号を受ける入
力部と、 この演算処理部の演算結果を制御対象となる外部負荷に
伝える出力部と、 この演算処理部に接続されてシーケンス演算処理に必要
なタイミング信号を供給する基準パルス発生回路と、 この基準パルス発生回路からの出力信号を分周する分周
回路と、 この分周回路から出力される複数の分周信号のうちの一
つを選択する信号選択手段と、 上記分周回路からのタイミング信号を上記演算処理部に
入力する第1の割込み端子と、 上記プログラム部のキー操作入力により上記分周信号を
指定し、上記演算処理部を介してこの指定信号を保持す
るラッチ回路と、 このラッチ回路に保持された分周信号を上記信号選択手
段から上記演算処理部に優先的に入力する第2の割込み
端子とを有し、 上記演算処理部は、上記入力された割込み信号に対応し
た割込み処理を行なうことにより、最も優先順位の高い
ものから処理を行ない、上記分周信号を増幅し分周信号
に同期したパルス信号として外部負荷に出力することを
特徴とするプログラマブルコントローラ。
1. A program section for inputting a sequence program, a first memory for storing the sequence program, an arithmetic processing section for performing a logical operation according to the sequence program, and a processing procedure of the arithmetic processing section. A second memory, an input unit connected to the arithmetic processing unit for receiving a signal from the outside, an output unit for transmitting the arithmetic result of the arithmetic processing unit to an external load to be controlled, and an arithmetic unit for the arithmetic processing unit. A reference pulse generation circuit that is connected and supplies a timing signal required for sequence calculation processing, a frequency division circuit that divides the output signal from this reference pulse generation circuit, and a plurality of frequency division circuits that are output from this frequency division circuit. Signal selecting means for selecting one of the signals, and a first interrupt terminal for inputting the timing signal from the frequency dividing circuit to the arithmetic processing section , A latch circuit that specifies the divided signal by a key operation input of the program unit and holds the specified signal via the arithmetic processing unit, and a divided signal held in the latch circuit from the signal selection means. A second interrupt terminal that is preferentially input to the arithmetic processing unit, and the arithmetic processing unit performs the interrupt processing corresponding to the input interrupt signal, and processes from the highest priority. A programmable controller which amplifies the frequency-divided signal and outputs it as a pulse signal synchronized with the frequency-divided signal to an external load.
JP60118750A 1985-06-03 1985-06-03 Programmable controller Expired - Lifetime JPH06100927B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60118750A JPH06100927B2 (en) 1985-06-03 1985-06-03 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60118750A JPH06100927B2 (en) 1985-06-03 1985-06-03 Programmable controller

Publications (2)

Publication Number Publication Date
JPS61278905A JPS61278905A (en) 1986-12-09
JPH06100927B2 true JPH06100927B2 (en) 1994-12-12

Family

ID=14744124

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60118750A Expired - Lifetime JPH06100927B2 (en) 1985-06-03 1985-06-03 Programmable controller

Country Status (1)

Country Link
JP (1) JPH06100927B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2547106B2 (en) * 1990-01-18 1996-10-23 株式会社キーエンス Sequence controller

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59153225A (en) * 1983-02-21 1984-09-01 Hitachi Ltd Semiconductor integrated circuit device and information processing system using the device
JPS603007A (en) * 1983-06-21 1985-01-09 Agency Of Ind Science & Technol Synchronization system of distributed numerical control system
JPS6045828A (en) * 1983-08-24 1985-03-12 Hitachi Ltd Single chip microcomputer

Also Published As

Publication number Publication date
JPS61278905A (en) 1986-12-09

Similar Documents

Publication Publication Date Title
US4614880A (en) Power supply circuitry for a microcomputer system
US5261082A (en) Semiconductor integrated circuit having a plurality of oscillation circuits
US4945300A (en) Power source control apparatus
US4011516A (en) Frequency correction arrangement
JPH06100927B2 (en) Programmable controller
US3956644A (en) Integral cycle, precise zero voltage switch
EP0152094A2 (en) Multiple clock pulse generator
JPH05313776A (en) Pulse generation circuit
JPH08202372A (en) Volume control system for piezoelectric buzzer
JP2988360B2 (en) Clock generation circuit
JP2538074B2 (en) Logic integrated circuit
JPH01120610A (en) Clock input device for microprocessor
EP0190899A2 (en) Apparatus for recording and displaying control data
JP3584342B2 (en) Synchronous operation start / stop control system for multiple ICs
KR880000501B1 (en) Power controller for multi-function
JP3051937B2 (en) Variable counting pulse signal generator
JPS61140876A (en) Semiconductor integrated circuit device
KR860003480Y1 (en) Wait state signal generator of microprocessor
JP2513032B2 (en) Microcomputer input control circuit
JPH0443290B2 (en)
JPH01134556A (en) Function selection control circuit
JPH0310963B2 (en)
JPH03268622A (en) Method and apparatus for transmission control
JPS62131756A (en) Triac controller
JP2002131383A (en) Semiconductor integrated circuit and its inspection method

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term