JPH01236305A - Machine controlling method - Google Patents

Machine controlling method

Info

Publication number
JPH01236305A
JPH01236305A JP6386788A JP6386788A JPH01236305A JP H01236305 A JPH01236305 A JP H01236305A JP 6386788 A JP6386788 A JP 6386788A JP 6386788 A JP6386788 A JP 6386788A JP H01236305 A JPH01236305 A JP H01236305A
Authority
JP
Japan
Prior art keywords
task
instruction
pointer
content
executed
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
JP6386788A
Other languages
Japanese (ja)
Inventor
Akihiro Sato
彰洋 佐藤
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP6386788A priority Critical patent/JPH01236305A/en
Publication of JPH01236305A publication Critical patent/JPH01236305A/en
Pending legal-status Critical Current

Links

Landscapes

  • Control By Computers (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE:To eliminate the necessity for a timer and, at the same time, to surely prevent interruption for another task while one instruction is executed by performing task switching in the course of a main processing procedure, instead of performing in the course of an interruption processing procedure. CONSTITUTION:Whether or not the content of the status register 2 of a task pointed out by a task pointer 1 indicates an executing state is checked and, when the content does not indicate an executing state, the process is moved to the process S3. When the content indicates an executing state, on the other hand, the process is moved to the process S2. Then the instruction indicated by the program counter 3 pointed out by the task pointer 1 is analyzed and executed. When the execution is completed, the task pointer 1 is increased and the process is repeated.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は機械制御方法、特に、コンピュータ制御の機械
制御方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for controlling a machine, and in particular to a method for controlling a computer-controlled machine.

〔従来の技術〕[Conventional technology]

次に従来の機械制御方法について図面を参照して詳細に
説明する。
Next, a conventional machine control method will be explained in detail with reference to the drawings.

第4図(a)、(b)は従来の機械制御方法の一例を示
すフローチャートである。
FIGS. 4(a) and 4(b) are flowcharts showing an example of a conventional machine control method.

第4図(a)、(b)に示す機械制御方法は、タスクが
次に実行すべき命令を読み込む命令読み込み手段30と
、命令を解析する解析手段31と、解析した命令を実行
する実行手段32と、現在の状態を保存する保存手段3
3と、過去の状態を獲得する獲得手段34と、割り込み
状態から復帰する復帰手段35とを含んで構成される。
The machine control method shown in FIGS. 4(a) and 4(b) includes an instruction reading means 30 for reading an instruction to be executed next by a task, an analysis means 31 for analyzing the instruction, and an execution means for executing the analyzed instruction. 32, and storage means 3 for saving the current state.
3, acquisition means 34 for acquiring the past state, and return means 35 for returning from the interrupt state.

通常は、第4図(a)の命令読み込み手段30、解析手
段31.実行手段32を繰り返しており、タイマにより
割り込みが発生すると、仕事を中断し、第4図(b)の
保存手段33.獲得手段34、復帰手段35を実行する
Normally, the instruction reading means 30, the analysis means 31 . The execution means 32 is repeated, and when an interrupt is generated by the timer, the work is interrupted and the storage means 33 of FIG. 4(b) is executed. The acquisition means 34 and the return means 35 are executed.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来の機械制御方法は、ある時間間隔を得るた
めタイマーが必要であり、さらに割込みの際に実行され
る手段が煩雑かつ時間がかかり、またタスク間の相互排
斥を行う必要があるため処理プログラムが複雑になると
いう欠点があった。
The conventional machine control method described above requires a timer to obtain a certain time interval, and furthermore, the measures executed in the event of an interrupt are complicated and time-consuming, and the processing requires mutual exclusion between tasks. The drawback was that the program was complicated.

〔課題を解決するための手段〕[Means to solve the problem]

本発明の機械制御方法は、 (^)タスクの状態を記憶する記憶手段、(B)前記(
A)の内容から実行状態か待機状態かを判定する判定手
段、 (C)前記(B)で実行状態と判定された時に、タスク
が次に実行すべき命令を読込む読込手段、(D)前記(
C)で読込んだ命令を解析する解析手段、 (17)前記(D)で解析した命令を実行する実行手−
段、 (F)1つのタスクの処理が終了したのち、他のタスク
に切替える切替手段、 とを含んで構成される。
The machine control method of the present invention includes (^) a storage means for storing the state of a task; (B) the above (
(A) determining means for determining whether the task is in an execution state or a standby state based on the content; (C) a reading means for reading an instruction to be executed next by the task when it is determined in (B) that the task is in an execution state; (D) Said (
(17) An execution unit that executes the instruction analyzed in (D) above.
(F) switching means for switching to another task after processing of one task is completed;

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例を示す流れ図、第2図は第1
図の構成を示すブロック図である。
FIG. 1 is a flow chart showing one embodiment of the present invention, and FIG.
FIG. 2 is a block diagram showing the configuration of the figure.

第2図に示す機械制御装置は、タスク・ポインタ1と、
ステータス・レジスタ2と、プログラム・カウンタ3と
を含んで構成される。
The machine control device shown in FIG. 2 has a task pointer 1,
It is configured to include a status register 2 and a program counter 3.

ステータス・レジスタ2と、プログラム・カウンタ3は
、タスク1つにつき1つずつ存在する。
One status register 2 and one program counter 3 exist for each task.

第3図は、この実施例の動作を説明するフローチャート
である。
FIG. 3 is a flowchart explaining the operation of this embodiment.

タスク・ポインタ1のさすタスクのステータス・レジス
タ2の内容が実行状態を表わしているか否かを調べ、実
行状態を表わしていなければS3に、表わしていればS
2に移行する。  (Sl )タスク・ポインタ1のさ
すプログラム・カウンタ3のさす命令を解析、実行する
。(S2)タスク・ポインタ1を増す。(S、) という手順が繰返えされる。
It is checked whether the contents of status register 2 of the task pointed to by task pointer 1 indicate the execution state.
Move to 2. (Sl) Analyze and execute the instruction pointed to by program counter 3 pointed to by task pointer 1. (S2) Increment task pointer 1. The procedure (S,) is repeated.

タスクを切替える際は、タスク、ポインタを変化させる
だけでよいので、現在の状態を格納する等の特別な処理
を必要としない。
When switching tasks, it is only necessary to change the task and pointer, so no special processing such as storing the current state is required.

〔発明の効果〕〔Effect of the invention〕

本発明の機械制御方法は、タスク切替えを、割込み処理
手順内で行う代りに、主処理手順内で行うことにより、
タイマーが省略でき、また−命令を実行中は決して他タ
スクの処理が割込まないので、相互排斥を特に行う必要
がないという効果がある。
The machine control method of the present invention performs task switching within the main processing procedure instead of within the interrupt processing procedure.
The timer can be omitted, and since the processing of other tasks will never interrupt the execution of an instruction, there is no need to perform mutual exclusion.

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

第1図は本発明のクレーム対応図、第2図は本発明の一
実施例を説明するためのブロック図、第3図は第2図の
動作を説明するフローチャー1〜、第4図(a)、(b
)は従来の一例を示すフローチャートである。 1・・・タスク・ポインタ、2・・・ステータス・レジ
スタ、3・・・プログラム・カウンタ。
FIG. 1 is a diagram corresponding to the claims of the present invention, FIG. 2 is a block diagram for explaining an embodiment of the present invention, and FIG. 3 is a flowchart 1 to 4 for explaining the operation of FIG. a), (b
) is a flowchart showing a conventional example. 1...Task pointer, 2...Status register, 3...Program counter.

Claims (1)

【特許請求の範囲】 (A)タスクの状態を記憶する記憶手段、 (B)前記(A)の内容から実行状態か待機状態かを判
定する判定手段、 (C)前記(B)で実行状態と判定された時に、タスク
が次に実行すべき命令を読込む読込手段、 (D)前記(C)で読込んだ命令を解析する解析手段、 (E)前記(D)で解析した命令を実行する実行手段、 (F)1つのタスクの処理が終了したのち、他のタスク
に切替える切替手段、 とを含むことを特徴とする機械制御方法。
[Scope of Claims] (A) Storage means for storing the state of a task; (B) Judgment means for determining whether the task is in an execution state or a standby state based on the contents of (A); (C) An execution state in the above (B). (D) an analysis means for analyzing the instruction read in (C) above; (E) an analysis unit for analyzing the instruction analyzed in (D) above. A machine control method comprising: (F) a switching means for switching to another task after processing of one task is completed.
JP6386788A 1988-03-16 1988-03-16 Machine controlling method Pending JPH01236305A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6386788A JPH01236305A (en) 1988-03-16 1988-03-16 Machine controlling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6386788A JPH01236305A (en) 1988-03-16 1988-03-16 Machine controlling method

Publications (1)

Publication Number Publication Date
JPH01236305A true JPH01236305A (en) 1989-09-21

Family

ID=13241686

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6386788A Pending JPH01236305A (en) 1988-03-16 1988-03-16 Machine controlling method

Country Status (1)

Country Link
JP (1) JPH01236305A (en)

Similar Documents

Publication Publication Date Title
JPH01236305A (en) Machine controlling method
JPH03105503A (en) Programmable controller
JPH02118733A (en) System for controlling execution of task
JPS63289654A (en) Program branching instruction monitoring system
JPH02176834A (en) Self-monitor system for program logic
JPH02304634A (en) Processor system
JPH0375940A (en) Multitask controller
JP2880658B2 (en) Runaway detection device for multitask program
JP2684966B2 (en) I / O processor debug device
JPH0362131A (en) Multiprocessor system
JPH0350633A (en) Post-processing system for stall program
JPS61211746A (en) Program executing control system
JPS61183705A (en) Operating trace processing method of programmable controller
JPS61267137A (en) System for controlling interrupting action
JPS60263233A (en) Program control system
JPH02118855A (en) Processing control system
JPH0394340A (en) Control conversion tracing system at the time of cpu runaway
JPH0468446A (en) Debugging supporting device
JPH04256036A (en) Program analysis system
JPS62119663A (en) Information processing unit
JPS63116214A (en) Programming device
JPS638946A (en) Program debug supporting system
JPH02206848A (en) Device for supervising action state of programmable controller
JPH04168535A (en) Latch data collecting system
JP2000148449A (en) Analyzer