JP3663606B2 - Time management method using fixed period type PLC - Google Patents

Time management method using fixed period type PLC Download PDF

Info

Publication number
JP3663606B2
JP3663606B2 JP34863295A JP34863295A JP3663606B2 JP 3663606 B2 JP3663606 B2 JP 3663606B2 JP 34863295 A JP34863295 A JP 34863295A JP 34863295 A JP34863295 A JP 34863295A JP 3663606 B2 JP3663606 B2 JP 3663606B2
Authority
JP
Japan
Prior art keywords
plc
time
time management
current value
fixed period
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 - Fee Related
Application number
JP34863295A
Other languages
Japanese (ja)
Other versions
JPH09167004A (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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric Corp
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 Yaskawa Electric Corp filed Critical Yaskawa Electric Corp
Priority to JP34863295A priority Critical patent/JP3663606B2/en
Publication of JPH09167004A publication Critical patent/JPH09167004A/en
Application granted granted Critical
Publication of JP3663606B2 publication Critical patent/JP3663606B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、定周期PLC装置(プログラマブル ロジック コントローラ)の定周期制御の間に、ユーザー命令を使用して、ユーザーが自由に管理できる時間を発生させて、外部機器のコントロールに利用することを可能にする方法に関する。
【0002】
【従来の技術】
従来技術では、PLCの制御周期の間に、任意の時間管理を利用する場合、PLC装置のシステム側に、I/O機器としてプリセット機能付きのカウンタを設け、CPUのIN/OUT命令により時刻値をプリセットし、致達時刻の通知のために割込信号発生、または、前記カウンタの計数値をIN命令により読み込んで監視する方法で任意時間を管理することは可能であった。
【0003】
【発明が解決しようとする課題】
ところが、従来技術では、前記の割込信号発生方法によるとCPU側の負担が大きくなるという問題があった。また、割り込みのためのI/Oを設けられないPLC装置では任意時間を管理することはできなかった。
そこで、発明は、割込信号発生を用いず、PLCの定周期制御の間に、任意の時間をユーザーが設定してその設定時間に応じた時限信号を出力し、これを外部機器のコントロールに利用する方法を提供するものである。
【0004】
【課題を解決するための手段】
上記問題を解決するため、本発明は、定周期型PLCに、前記定周期のサイクル時間より短い周期を有する基準パルスを計数する時間管理カウンタと、前記PLCのユーザプログラムのIN命令で前記時間管理カウンタの計数値をPLCに読み込むための読み込みゲートとを設け、
1)前記PLCの定周期処理が開始されると、前記ユーザプログラムのIN命令により前記時間管理カウンタの現在値Tを読み込んでT in に格納し、
2)目標時間ΔT と前記現在値T in を加算し目標時間T sn を設定し、
3)外部制御機器用の信号Aを出力し、
4)前記ユーザプログラムのIN命令により前記時間管理カウンタの現在値Tを読み込んでT inx に格納し、
5)前記現在値T inx と前記目標時間T sn を比較し、
6)前記現在値T inx が前記目標時間T sn と等しいか大きければ、前記外部制御機器用の信号AをOFFし、
7)前記現在値T inx が前記目標時間T sn より小さければ、4)からのステップを繰り返すことを特徴とする定周期型PLCを利用した時間管理方法である。
【0005】
【発明の実施の形態】
上記手段により、定周期型PLCの制御周期の間に、ユーザプログラムを利用して任意の時間幅の信号を外部に出力することができる。
以下、本発明の具体的実施例を図に基づいて説明する。
図1は本発明の実施例の構成を示す図で、1はPLCすなわちプログラマブル・ロジック・コントローラ、2はCPU、3は時間管理用のハードカウンタで、lMHzのパルスを無条件に計数させる。4は読み込みゲートで、ユーザプログラム側からは、IN命令により任意に時間管理カウンタ3の計数内容を読み込むことができる。
図2は任意時間管理のためのユーザプログラムをフローチャートで表したものである。また、図3は図2の作用を説明するための図である。以下、図2、図3により、このユーザプログラムの作用を以下に説明する。
PLCのシステム領域処理の途中から、定周期PLCの1周期が開始され(K)、システム領域処理が完了すると定周期処理が開始され(A)、つぎに時間管理カウンタ1の現在値すなわち計数値TをIN命令で読み込む(B)。
つぎに、この計数値TをTinに格納し(C)、目標時間ΔTn と現在値Tinから目標時間Tsnを設定した後(D)、外部機器制御用の信号Aを出力する(E)。
これから後は、前記外部機器制御用の信号Aの継続時間をカウントするユーザプログラムF〜Hを実行する。すなわち、時間管理カウンタ1の計数値TをIN命令により読み込み(F)、現在時間値TをTinx に格納し(G)、続いてこの格納された現在時間値Tinx と前記目標時間Tsnを比較して、目標時間に到達していなければ前記ステップ(F)に戻り、目標時間に到達していれば次のステップ(I)に移る(H)。
ステップIでは、信号AをOFFし、次のステップJではその他の仕事として、演算、伝送等を実行する。
従って、目標時間ΔTn の設定値の選択により、外部へ出力する時間信号を任意に調整できるので、これを用いて外部機器を制御することが可能となる。外部機器の制御例としては、トランジスタのゲート信号制御によりパルス幅変調を制御したり、発生させた定周期パルスでPLC自身への割り込みをかけ、定周期の処理を実行させる等がある。
【0006】
【発明の効果】
以上述べたように、本発明によれば、PLC装置のシステム側に負担をかけることなく、任意の時間信号を発生させ、この信号をPLCの外部機器を制御する信号として利用することができる。
【図面の簡単な説明】
【図1】本発明の実施例の構成図
【図2】本発明の実施例の処理フロー
【図3】本発明の動作説明図
【符号の説明】
1 PLC
2 CPU
3 時間管理カウンタ
4 読み込みゲート
[0001]
BACKGROUND OF THE INVENTION
The present invention can be used to control an external device by generating a time that can be freely managed by a user using a user command during a fixed cycle control of a fixed cycle PLC device (programmable logic controller). About how to make.
[0002]
[Prior art]
In the prior art, when using arbitrary time management during the control period of the PLC, a counter with a preset function is provided on the system side of the PLC device as an I / O device, and the time value is determined by an IN / OUT instruction of the CPU. It is possible to manage an arbitrary time by presetting and generating an interrupt signal for notification of the arrival time or reading and monitoring the count value of the counter by an IN command.
[0003]
[Problems to be solved by the invention]
However, the conventional technique has a problem in that the burden on the CPU side is increased according to the interrupt signal generation method. In addition, a PLC device that is not provided with an I / O for interrupt cannot manage arbitrary time.
Therefore, the present invention does not use interrupt signal generation, and outputs a timed signal according to the set time for the user to set an arbitrary time during the fixed-cycle control of the PLC, which is used for control of the external device. It provides a way to use it.
[0004]
[Means for Solving the Problems]
To solve the above problems, the present invention is the periodic type PLC, said the time management counter for counting the reference pulse having a constant period shorter period than the cycle time of the time management in IN command of the user program of the PLC A reading gate for reading the count value of the counter into the PLC;
1) When the periodic processing of the PLC is started, the current value T of the time management counter is read by the IN instruction of the user program and stored in Tin .
2) Add the target time ΔT n and the current value T in to set the target time T sn .
3) Output signal A for external control equipment,
4) The current value T of the time management counter is read by the IN instruction of the user program and stored in T inx .
5) Compare the current value T inx with the target time T sn ,
6) If the current value T inx is equal to or greater than the target time T sn , the signal A for the external control device is turned off,
7) A time management method using a fixed period type PLC, wherein the steps from 4) are repeated if the current value T inx is smaller than the target time T sn .
[0005]
DETAILED DESCRIPTION OF THE INVENTION
By the above means, a signal having an arbitrary time width can be output to the outside using the user program during the control period of the fixed-cycle PLC.
Hereinafter, specific embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram showing a configuration of an embodiment of the present invention. 1 is a PLC, that is, a programmable logic controller, 2 is a CPU, 3 is a hard counter for time management, and counts 1 MHz pulses unconditionally. Reference numeral 4 denotes a reading gate, from which the count contents of the time management counter 3 can be arbitrarily read from the user program side by an IN command.
FIG. 2 is a flowchart showing a user program for arbitrary time management. FIG. 3 is a diagram for explaining the operation of FIG. The operation of this user program will be described below with reference to FIGS.
In the middle of the PLC system area process, one period of the fixed period PLC is started (K), and when the system area process is completed, the fixed period process is started (A). T is read with an IN command (B).
Next, the count value T is stored in T in (C), and after setting the target time T sn from the target time ΔT n and the current value T in (D), a signal A for external device control is output ( E).
Thereafter, user programs F to H for counting the duration of the external device control signal A are executed. That is, the count value T of the time management counter 1 is read by an IN command (F), the current time value T is stored in T inx (G), and then the stored current time value T inx and the target time T sn are stored. If the target time has not been reached, the process returns to step (F). If the target time has been reached, the process proceeds to the next step (I) (H).
In step I, the signal A is turned OFF, and in the next step J, calculation, transmission, etc. are executed as other tasks.
Accordingly, since the time signal output to the outside can be arbitrarily adjusted by selecting the set value of the target time ΔT n , it is possible to control the external device using this. Examples of external device control include pulse width modulation by controlling the gate signal of a transistor, interrupting the PLC itself with a generated periodic pulse, and executing periodic processing.
[0006]
【The invention's effect】
As described above, according to the present invention, an arbitrary time signal can be generated without imposing a burden on the system side of the PLC device, and this signal can be used as a signal for controlling an external device of the PLC.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of an embodiment of the present invention. FIG. 2 is a processing flow of an embodiment of the present invention. FIG. 3 is an operation explanatory diagram of the present invention.
1 PLC
2 CPU
3 Time management counter 4 Reading gate

Claims (1)

定周期型PLCに、前記定周期のサイクル時間より短い周期を有する基準パルスを計数する時間管理カウンタと、前記PLCのユーザプログラムのIN命令で前記時間管理カウンタの計数値をPLCに読み込むための読み込みゲートとを設け、
1)前記PLCの定周期処理が開始されると、前記ユーザプログラムのIN命令により前記時間管理カウンタの現在値Tを読み込んでT in に格納し、
2)目標時間ΔT と前記現在値T in を加算し目標時間T sn を設定し、
3)外部制御機器用の信号Aを出力し、
4)前記ユーザプログラムのIN命令により前記時間管理カウンタの現在値Tを読み込んでT inx に格納し、
5)前記現在値T inx と前記目標時間T sn を比較し、
6)前記現在値T inx が前記目標時間T sn と等しいか大きければ、前記外部制御機器用の信号AをOFFし、
7)前記現在値Tinxが前記目標時間Tsnより小さければ、4)からのステップを繰り返すことを特徴とする定周期型PLCを利用した時間管理方法。
A time management counter that counts a reference pulse having a period shorter than the cycle time of the fixed period to the fixed period type PLC, and reading for reading the count value of the time management counter into the PLC by an IN instruction of the user program of the PLC With a gate,
1) When the periodic processing of the PLC is started, the current value T of the time management counter is read by the IN instruction of the user program and stored in Tin .
2) Add the target time ΔT n and the current value T in to set the target time T sn .
3) Output signal A for external control equipment,
4) The current value T of the time management counter is read by the IN instruction of the user program and stored in T inx .
5) Compare the current value T inx with the target time T sn ,
6) If the current value T inx is equal to or greater than the target time T sn , turn off the signal A for the external control device,
7) A time management method using a fixed period type PLC, wherein the steps from 4) are repeated if the current value T inx is smaller than the target time T sn .
JP34863295A 1995-12-18 1995-12-18 Time management method using fixed period type PLC Expired - Fee Related JP3663606B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34863295A JP3663606B2 (en) 1995-12-18 1995-12-18 Time management method using fixed period type PLC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34863295A JP3663606B2 (en) 1995-12-18 1995-12-18 Time management method using fixed period type PLC

Publications (2)

Publication Number Publication Date
JPH09167004A JPH09167004A (en) 1997-06-24
JP3663606B2 true JP3663606B2 (en) 2005-06-22

Family

ID=18398306

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34863295A Expired - Fee Related JP3663606B2 (en) 1995-12-18 1995-12-18 Time management method using fixed period type PLC

Country Status (1)

Country Link
JP (1) JP3663606B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103018498A (en) * 2012-12-25 2013-04-03 镇江市松协电器有限公司 Refrigerator air door detecting table

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103018498A (en) * 2012-12-25 2013-04-03 镇江市松协电器有限公司 Refrigerator air door detecting table

Also Published As

Publication number Publication date
JPH09167004A (en) 1997-06-24

Similar Documents

Publication Publication Date Title
CN112515801B (en) Control method and device based on vibration strength of toothbrush motor
JP3663606B2 (en) Time management method using fixed period type PLC
WO2020113929A1 (en) Page skip control method and device
JP2001265412A (en) Programmable controller
JP2914100B2 (en) Analog signal processor for programmable controller
JP2752514B2 (en) Program execution method of CNC device
US5940628A (en) Control processor for user setting a change prohibition period during which a program change command will not be executed until the lapse of that period
JPS5853762B2 (en) Delay time control circuit
JP3538358B2 (en) Programmable controller
JP6648541B2 (en) Control device
JPS6112284B2 (en)
JPS60181812A (en) Keyboard controller
JPS638962Y2 (en)
JPS62152045A (en) Programmable controller
JPH05158710A (en) Timer managing system
JPH054203U (en) Periodic pulse counting device
JP3890877B2 (en) Vehicle control device
JPH07271614A (en) Priority control system for task restricted in execution time
JPS605356A (en) Self-monitoring timer system
KR0175846B1 (en) Position control device of motor and position control method
JPH01149637A (en) System for monitoring polling control response
JPS616704A (en) Programmable controller
JPH0427730B2 (en)
JPS5819905A (en) Counting device for sequence controller
JPH04195610A (en) Process controller

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041101

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041105

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041224

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050307

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050320

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090408

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090408

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100408

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees