JPS63284604A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPS63284604A
JPS63284604A JP62120400A JP12040087A JPS63284604A JP S63284604 A JPS63284604 A JP S63284604A JP 62120400 A JP62120400 A JP 62120400A JP 12040087 A JP12040087 A JP 12040087A JP S63284604 A JPS63284604 A JP S63284604A
Authority
JP
Japan
Prior art keywords
program
processing
time
executed
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP62120400A
Other languages
Japanese (ja)
Inventor
Kunio Tanaka
久仁夫 田中
Hirosuke Chiba
千葉 弘介
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.)
Fanuc Corp
Original Assignee
Fanuc 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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP62120400A priority Critical patent/JPS63284604A/en
Publication of JPS63284604A publication Critical patent/JPS63284604A/en
Pending legal-status Critical Current

Links

Landscapes

  • Testing And Monitoring For Control Systems (AREA)
  • Numerical Control (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE:To shorten the processing time with a programmable controller by showing the time needed for processing of a sequence program on a display screen and performing the prescribed processing with reference to said shown time. CONSTITUTION:A numerical control NC system consists of an NC device main body 1, a machine tool 2, a programmable controller 3, a data transfer control part 4, and a display device 5. The controller 3 consists of a computer and stores the control software CTP of a sequence program SQP, etc. into a ROM 3b together with a processor 3a, etc. The program SQP is divided into a high- level program part requiring the emergency processing like an emergency stop, etc., and a low-level program part which carries out the processing based on the data received from the NC device 1, etc. Then the TOP counts the total executing time and displays it on the device 5.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 本発明はプログラマブル・コントロール装置(ゴログラ
マプル・コントローラ)に係す、特にシーケンスプログ
ラムの実行に要する1・−タルな実行時間を計時して表
示するプログラマブル・コントローラに関する。
[Detailed Description of the Invention] <Industrial Application Field> The present invention relates to a programmable control device (gologram pull controller), and in particular measures and displays the total execution time required to execute a sequence program. Regarding programmable controllers.

〈従来技術〉 数値制御システムにおいてはNC装置側からの指令に基
づいて工作機械の各機械要素が制御されろ。そして、N
C装置側と工作機械間の信号の授受制御は、NC装置側
に設けられたプログラマブル・コントローラがシーケン
スプログラムに基づいて実行する。
<Prior Art> In a numerical control system, each mechanical element of a machine tool is controlled based on commands from the NC device. And N
Control of signal transmission and reception between the C device and the machine tool is executed by a programmable controller provided on the NC device based on a sequence program.

このシーケンスプログラムはNC装置側と工作機械間の
データ授受を司どる強電回路の機能を命令コードとオペ
ランドで論理的にプログラムしたものであり、システム
によっては相当長いプログラムとなる。
This sequence program is a logical program of the functions of the high-power circuit that controls data exchange between the NC device side and the machine tool using instruction codes and operands, and depending on the system, the program can be quite long.

このため、シルケンスプログラムSPRは第4図に示す
ように、非常停止等の緊急処理を要する第ルベルのプロ
グラム部分PRIと、工作機械やNC装置からのデータ
に基づいて所定の処理を行い、従ってこれらNC装置等
との同期処理が要求される第2レベルのプログラム部分
PR2と、同期処理が不要でありプログラマブル・コン
トローラ側で勝手に処理できる第3レベルのメツセージ
作成等のプログラム部分PR3に区分されている。そし
て、第2レベルのプログラム部分PR2は、複数のサブ
プログラム部分SPI〜SPnに分割されている。
Therefore, as shown in Figure 4, the Silkens program SPR performs predetermined processing based on the program part PRI of the first rubel that requires emergency processing such as an emergency stop, and data from the machine tool and NC device. The program is divided into a second level program part PR2, which requires synchronization with these NC devices, and a third level program part PR3, which does not require synchronization and can be processed automatically by the programmable controller, such as creating messages. ing. The second level program portion PR2 is divided into a plurality of subprogram portions SPI to SPn.

かかるシーケンスプログラムにおいては、所定時間毎に
たとえば16m5ec毎に割込パルス(タイマ割込)が
発生すると、まず第ルベルのプログラム部分PRIが全
て実行され、該第1プログラム部分の実行後に第2プロ
グラム部分PR2の所定のサブプログラム部分S P 
i  (i = 1 、2 。
In such a sequence program, when an interrupt pulse (timer interrupt) occurs at a predetermined time interval, for example, every 16 m5ec, the entire program portion PRI of the first level is executed, and after the execution of the first program portion, the second program portion is executed. Predetermined subprogram portion S P of PR2
i (i = 1, 2.

・・)が実行され、しかる後16 m5ecの残時間の
間第3レベルのプログラム部分PR3の未実行位置から
該第3レベルのプログラム部分が実行されるようになっ
ている。
) is executed, and then the third level program portion is executed from the unexecuted position of the third level program portion PR3 for a remaining time of 16 m5ec.

そして、第2レベルの最後のサブプログラム部分の実行
が終了すれば、プログラマブル・コントローラの管理プ
ログラムはシーケンスプログラムの処理結果をNC装置
及び機械側に出力すると共に、これらNC装置や機械か
ら出されている新たな信号を内蔵のRAMに記憶して上
記シーケンスプログラム処理を継続する。
When the execution of the last subprogram part of the second level is completed, the management program of the programmable controller outputs the processing results of the sequence program to the NC device and machine, and also outputs the processing results from these NC devices and machines. A new signal is stored in the built-in RAM, and the above sequence program processing is continued.

〈発明が解決しようとしている問題点〉ところて、ある
レベルのプログラムから次のレベルのプログラムを走ら
せるtこめには管理プログラムが介在し、その間シーケ
ンスプログラムが実行されず、従ってレベル数が多いと
シーケンスプログラムの実行時間が長くなるという問題
が生じる。従来方法はレベルが3段階あるため処理時間
が長くなっている。
<Problem to be solved by the invention> However, a management program intervenes during the process of running a program at a certain level to a program at the next level, and during this time the sequence program is not executed. A problem arises in that the execution time of the sequence program becomes long. The conventional method requires a long processing time because there are three levels.

又、従来のシーケンスプログラムにおいてはジャンプ命
令により第2レベルのサブプログラム処理が短い時間で
終了しても16 m5ecの残りの間緊急を要さない第
3レベルのプログラム部分が実行されるという問題があ
る。
Another problem with conventional sequence programs is that even if the second level subprogram processing is completed in a short time due to a jump instruction, the third level program portion that does not require an emergency is executed for the remainder of the 16 m5ec. be.

以上から、本発明の目的はシーケンスプログラムの処理
時間を短縮でき、しかもシーケンスプログラムの処理に
要する時間をディスプレイ画面に描画して該時間を参考
にして所定の処理を行えるゴログラマプル・コントロー
ル装置を提供するととである。
From the foregoing, it is an object of the present invention to provide a goragrample control device that can shorten the processing time of a sequence program, and can also draw the time required to process a sequence program on a display screen and perform predetermined processing using the time as a reference. That is.

〈問題点を解決するための手段〉 第1図は本発明にかかるプログラマブル・コントロール
装W(プログラマブル・コントローラ)を備えた数値制
御システムのブロック図である。
<Means for Solving the Problems> FIG. 1 is a block diagram of a numerical control system equipped with a programmable control device W (programmable controller) according to the present invention.

1はNC装置、2は工作機械、3はゴログラマプル・コ
ントロール装Wt(フログラマプル・コントローラ)、
4はデータ授受制御部、5はディスプレイ装置であり、
プログラマブル・コン1−ローラ3において3aはプロ
セッサ、3bはプログラム7メモリ (ROM)、3c
はRAM、3dはDr/Do装置である。
1 is an NC device, 2 is a machine tool, 3 is a phlogramaple control device Wt (phlogramaple controller),
4 is a data exchange control unit, 5 is a display device,
In the programmable controller 1-roller 3, 3a is a processor, 3b is a program 7 memory (ROM), and 3c
is a RAM, and 3d is a Dr/Do device.

又、SQPはシーケンスプログラム、CTPは管理ソフ
トウェアである。
Further, SQP is a sequence program, and CTP is management software.

〈作用〉 ゴログラマプル・コン)・ローラ3 ハROM 3 b
に記憶されたシーケンスプログラムSQPによりNC装
置1と工作機械2との間のデータ授受な制御する。
<Function> Gologram pull con) roller 3 ha ROM 3 b
The data exchange between the NC device 1 and the machine tool 2 is controlled by the sequence program SQP stored in the .

このシーケンスプログラムは所定時間毎に常に実行され
るハイレベルのプログラム部分PR1と、ローレベルの
プログラム部分PR2に区分されている。
This sequence program is divided into a high-level program portion PR1 that is always executed at predetermined time intervals and a low-level program portion PR2.

管理ソフトウェア3bは所定時間(16m5ec)毎に
ハイレベルのプログラム部分PRIをプロセ、ソサ3a
をして実行させると共に、16m5ecの残りの時間ロ
ーレベルのプログラム部分PR2を未実行位置から継続
して実行させると共に、ローレベルのプログラム部分P
R2が全て実行される迄に要する1・−タル時間を常時
計時し、たとえばその最小、最大時間をディスプレイ装
置5に表示する。
The management software 3b processes the high-level program part PRI every predetermined time (16m5ec), and the software 3a
At the same time, for the remaining time of 16m5ec, the low level program part PR2 is continuously executed from the unexecuted position, and the low level program part P
The 1.-tal time required until all R2 is executed is constantly clocked, and the minimum and maximum times are displayed on the display device 5, for example.

〈実施例〉 第1図はNCシステムのブロック図であり、1は数値制
御装置(NC装置)、2は工作機械、3はプログラマブ
ル・コントロール装置(プログラマブル・コントローラ
)、4はデータ授受制御部、5はディスプレイ装置であ
る。
<Example> Fig. 1 is a block diagram of the NC system, where 1 is a numerical control device (NC device), 2 is a machine tool, 3 is a programmable control device (programmable controller), 4 is a data exchange control section, 5 is a display device.

NC装置1はNCプログラムデータに基づいて所定のN
C制御を行って機械可動部(工具または千−プル)を移
動させ、プログラマブル・コントロ=う3はシーケンス
プログラムSQPに基づいてNC装置1からのM−、S
−、T−機能命令及び工作機械2からの接点信号等に応
じた所定のシーツ1ンス制御を実行し、該処理結果をN
C装置1に転送すると共に、処理結果に基づいて工作機
械2の各機械要素を制御する。NC装置1とゴログラマ
プル・コントローラ3間のデジタル信号の授受は、たと
えば共通RAMとバスア〜ビク (バス制御部)を備え
たデータ授受制御部4を介して行われる。
The NC device 1 performs a predetermined N based on the NC program data.
The programmable controller 3 controls M- and S from the NC device 1 based on the sequence program SQP.
-, T- Executes predetermined sheet 1ance control according to function commands and contact signals from the machine tool 2, and outputs the processing results to N
The data is transferred to the C device 1, and each mechanical element of the machine tool 2 is controlled based on the processing results. Digital signals are exchanged between the NC device 1 and the gorogram pull controller 3 via a data exchange control section 4 that includes, for example, a common RAM and a bus control section.

プログラマブル・コントローラ3はコンピュータ構成に
なっており、ゴロセッサ3aと、ROMであるプログラ
ムメモリ3b、RAM3cと、デジタル信号の入出力装
置(DI/Do装置)3dを有しており、ROM3bに
はシーケンスプログラムSQPや該シーケンスプログラ
ムを走らせたり、その他の処理を実行させるための管理
ソフ]・ウェアCTPが記憶され、RA M 3 cI
ζはNC装置1や機械3との間で授受されるデータ等が
記憶されている。
The programmable controller 3 has a computer configuration, and includes a program processor 3a, a program memory 3b as a ROM, a RAM 3c, and a digital signal input/output device (DI/Do device) 3d, and the ROM 3b stores a sequence program. Management software for running SQP, the sequence program, and other processing]・ware CTP is stored in the RAM 3 cI
ζ stores data exchanged with the NC device 1 and the machine 3.

シーケンスプログラムSQPは第2図に示すように、非
常停止等の緊急処理を要するハイレベルのプログラム部
分PRHと、工作機械やNC装置からのデータに基づい
た処理(NC装置等との同期処理が要求される処理)や
メツセージ作成等プログラマブル・コントローラ側で勝
手に処理できる処理(同期処理が不要)を実行するロー
レベルのプログラム部分PRLに区分されている。
As shown in Figure 2, the sequence program SQP includes a high-level program part PRH that requires emergency processing such as an emergency stop, and processing based on data from the machine tool or NC device (synchronization processing with the NC device, etc. is required). The program is divided into a low-level program portion PRL that executes processing that can be processed automatically on the programmable controller side (no synchronization processing required), such as message creation (processing to be executed) and message creation.

管理ソフトウェアCTPはシーケンスプログラムを走ら
せたり、シーケンスプログラムのトータルな実行時間を
計時してディスプレイ装置5に表示する。
The management software CTP runs the sequence program and measures the total execution time of the sequence program and displays it on the display device 5.

第3図は本発明の処理の流れ図であり、以下この流れ図
に従って第1図の全体的動作を説明する。
FIG. 3 is a flowchart of the process of the present invention, and the overall operation of FIG. 1 will be explained below according to this flowchart.

管理ソフトウェアCTPは所定のタイミングでデータ授
受制御部4及びDI/Do装置3dを介して、NC装置
1や工作機械2からのデータを読み取ってRA M 3
 cに記憶すると共に、シーケンス処理結果を同様にN
C装置1、工作機械3に出力する(ステ・ツブ101)
The management software CTP reads data from the NC device 1 and the machine tool 2 via the data exchange control section 4 and the DI/Do device 3d at a predetermined timing, and stores the data in the RAM 3.
In addition to storing the sequence processing result in N
Output to C device 1 and machine tool 3 (STEP 101)
.

しかる後、タイマ割込(たとえば16m5ec毎に発生
する)が発生すると(ステップ102)、管理ソフトウ
ェアCTPは計時を開始すると共りこ(ステップ103
) 、RAM3 cに記憶されているデータに基づいて
シーケンスプログラムSQPにおけるハイレベルのプロ
グラム部分PRHな実行させる(ステップ104)。
Thereafter, when a timer interrupt (for example, occurs every 16 m5ec) occurs (step 102), the management software CTP starts timing and interrupts (step 103).
), the high-level program portion PRH in the sequence program SQP is executed based on the data stored in the RAM 3c (step 104).

ハイレベルのプログラム部分が全て実行されれば、管理
ソフトウェアCTPは16 m5ecの残時間の間、ロ
ーレベルのプログラム部分PRLにおける未実行位置か
らプログラムを実行する(ステ、ツブ105)。尚、未
実行位置は後述するようにポインタに記憶されているか
ら該ポインタが指示するアドレスからローレベルのプロ
グラムPRLを実行する(第2図参照)。
When all the high-level program parts are executed, the management software CTP executes the program from the unexecuted position in the low-level program part PRL for the remaining time of 16 m5ec (step 105). Incidentally, since the unexecuted position is stored in a pointer as described later, the low level program PRL is executed from the address indicated by the pointer (see FIG. 2).

ローレベルのプログラム部分)川0.の大賞中1ζ該プ
ログラム部分PRLが全て終了したか判別し(ステップ
106)、終了していなければタイマ割り込みが発生す
る迄ローレベルのプログラムを実行しくステップ107
)、タイマ割込が発生すれハ次に実行すべきアドレスを
ポインタに格納し、以後ステップ104以降の処理を繰
り返す。
Low-level program part) River 0. During the grand prize of 1ζ, it is determined whether the program part PRL has been completely completed (step 106), and if it has not been completed, the low level program is executed until a timer interrupt occurs (step 107).
), when a timer interrupt occurs, the next address to be executed is stored in the pointer, and the processing from step 104 onwards is repeated.

一方、ステップ106においてローレベルのプログラム
部分PRLの処理が終了すれば管理ソフトウェアCTP
は、時間計時を停止すると共に、計時時間tと最小実行
時間T IT l +1、最大実行時間TMAX(共に
初期値は零)と比較し、TM、N:> tてあればt→
T111 Nとして最小実行時間を更新し、TM□〈t
であればt→Tようとして最大実行時間を更新しくステ
ップ1.08)、該TMAXj TMl□をNC装置1
に転送してディスプレイ装置5に表示する(ステップ1
09)。
On the other hand, if the processing of the low-level program portion PRL is completed in step 106, the management software CTP
stops the time measurement, and compares the measured time t with the minimum execution time T IT l +1 and the maximum execution time TMAX (both initial values are zero), and if TM, N: > t, then t →
T111 Update the minimum execution time as N, TM□〈t
If so, update the maximum execution time by going from t to T (step 1.08), and change the TMAXj TMl□ to the NC device 1.
and display it on the display device 5 (step 1
09).

〈発明の効果〉 以上本発明によれば、従来に比較してシーケンスプログ
ラムのレベル数を少なくてきたからレベル切り替えに際
して管理ソフトウェアが介在する時間が少なくなり、シ
ーケンスプログラムの処理時間を短縮でき、しかもジャ
ンプ命令により飛ばされたプログラムの実行に要する時
間が確実に短縮できる。
<Effects of the Invention> According to the present invention, since the number of levels of a sequence program is reduced compared to the past, the time required for management software to intervene when switching levels is reduced, and the processing time of a sequence program can be shortened. The time required to execute a program skipped by an instruction can be reliably shortened.

又、本発明によればシーケンスプログラムの実行に要す
る時間を表示するように構成したから、オペレータは該
実行時間を把握でき、しかもシーケンスプログラムのト
ータルな実行時間を考慮して機械側からプログラマブル
・コン1−ローラに出力している接点信号の最小継続時
間を決定することができろ。
Further, according to the present invention, since the time required to execute the sequence program is displayed, the operator can grasp the execution time, and the programmable controller can be controlled from the machine side by considering the total execution time of the sequence program. 1 - Determine the minimum duration of the contact signal output to the roller.

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

第1図は本発明にかかるプログラマブル・コントロール
装置を含むNCシステムのブロック図、第2図はシーケ
ンスプログラムの構成図、第3図は本発明の処理の流れ
図、 第4図は従来方法説明図である。 1・・NG装置、2・・工作機械、 3・・プログラマブル・コントローラ、4・・データ授
受制御部、 5・・ディスプレイ装置、 SQP・・シーケンスプログラム、 CTP・・管理ソフトウェア 特許出願人        ファナック株式会社代理人
          弁理士  齋藤千幹第2図 第4図 第3図
Fig. 1 is a block diagram of an NC system including a programmable control device according to the present invention, Fig. 2 is a configuration diagram of a sequence program, Fig. 3 is a flowchart of the processing of the present invention, and Fig. 4 is an explanatory diagram of a conventional method. be. 1.NG device, 2.Machine tool, 3.Programmable controller, 4.Data exchange control unit, 5.Display device, SQP.Sequence program, CTP.Management software patent applicant FANUC CORPORATION Agent Patent Attorney Chiki Saito Figure 2 Figure 4 Figure 3

Claims (1)

【特許請求の範囲】 シーケンス処理を実行するシーケンスプログラムを有し
、NC装置と工作機械間のデータ授受を制御するプログ
ラママブル・コントロール装置において、 シーケンスプログラムを、所定時間毎に常に実行される
ハイレベルのプログラム部分と、ハイレベルのプログラ
ム部分の実行後に未実行位置から実行されるローレベル
のプログラム部分とに区分すると共に、 ローレベルのプログラム部分が全て実行される迄に要す
るトータル時間を計時して表示することを特徴とするプ
ログラマブル・コントロール装置。
[Claims] In a programmable control device that has a sequence program that executes sequence processing and controls data exchange between an NC device and a machine tool, the sequence program is always executed at predetermined time intervals. The program is divided into a high-level program part and a low-level program part that is executed from an unexecuted position after the high-level program part is executed, and the total time required until all the low-level program parts are executed is measured. A programmable control device characterized by displaying information.
JP62120400A 1987-05-18 1987-05-18 Programmable controller Pending JPS63284604A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62120400A JPS63284604A (en) 1987-05-18 1987-05-18 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62120400A JPS63284604A (en) 1987-05-18 1987-05-18 Programmable controller

Publications (1)

Publication Number Publication Date
JPS63284604A true JPS63284604A (en) 1988-11-21

Family

ID=14785275

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62120400A Pending JPS63284604A (en) 1987-05-18 1987-05-18 Programmable controller

Country Status (1)

Country Link
JP (1) JPS63284604A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0457107A (en) * 1990-06-27 1992-02-24 Hitachi Ltd Controller for robot
JPH0484205A (en) * 1990-07-26 1992-03-17 Mitsubishi Electric Corp Fa controller
CN102902211A (en) * 2012-09-28 2013-01-30 烟台宝钢钢管有限责任公司 Method for preventing malfunction of emergency stop and quick stop signals in control system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54131812A (en) * 1978-04-04 1979-10-13 Nippon Denso Co Ltd Time-division multiple signal transmission system for vehicles
JPS56148398A (en) * 1980-04-21 1981-11-17 Mitsubishi Heavy Ind Ltd Cleaning device
JPS59212905A (en) * 1983-05-18 1984-12-01 Fanuc Ltd Control system of programmable controller
JPS61194534A (en) * 1985-02-22 1986-08-28 Nec Corp Microprocessor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54131812A (en) * 1978-04-04 1979-10-13 Nippon Denso Co Ltd Time-division multiple signal transmission system for vehicles
JPS56148398A (en) * 1980-04-21 1981-11-17 Mitsubishi Heavy Ind Ltd Cleaning device
JPS59212905A (en) * 1983-05-18 1984-12-01 Fanuc Ltd Control system of programmable controller
JPS61194534A (en) * 1985-02-22 1986-08-28 Nec Corp Microprocessor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0457107A (en) * 1990-06-27 1992-02-24 Hitachi Ltd Controller for robot
JPH0484205A (en) * 1990-07-26 1992-03-17 Mitsubishi Electric Corp Fa controller
CN102902211A (en) * 2012-09-28 2013-01-30 烟台宝钢钢管有限责任公司 Method for preventing malfunction of emergency stop and quick stop signals in control system

Similar Documents

Publication Publication Date Title
KR890002437B1 (en) A numerical control system
EP0171435B1 (en) Numerical control method
JPS6134605A (en) Controlling system of programmable controller
JPS63284604A (en) Programmable controller
JPH0766286B2 (en) Processing method of NC device
JP2752514B2 (en) Program execution method of CNC device
JPS63268002A (en) Programmable controller
CN110568821B (en) Numerical controller
US20030225812A1 (en) Controller for machine
US5124620A (en) Control method for robots
JPH01246602A (en) Special function unit for programmable controller
EP0476154A1 (en) System for executing instruction of pc
JPH03105503A (en) Programmable controller
JPS62210511A (en) Method for executing sequence program in programmable controller
JPS63289605A (en) Sequence control monitor system
EP0422246A1 (en) Programmable controller
JPH0683652A (en) Microcomputer system
JPH0836413A (en) Time management system for cnc
JPS60241104A (en) Arithmetic method of digital controller
JPS63293649A (en) Display system for working state of processor
JPH0224703A (en) Numerical controller
JPH01137339A (en) Microprocessor
JPS62162104A (en) Flow chart type programmable controller
JPS63211004A (en) Programmable controller
JPH07120175B2 (en) Composite control device and control method thereof