JPH10214108A - Motion control method for motion controller - Google Patents

Motion control method for motion controller

Info

Publication number
JPH10214108A
JPH10214108A JP2985897A JP2985897A JPH10214108A JP H10214108 A JPH10214108 A JP H10214108A JP 2985897 A JP2985897 A JP 2985897A JP 2985897 A JP2985897 A JP 2985897A JP H10214108 A JPH10214108 A JP H10214108A
Authority
JP
Japan
Prior art keywords
movement command
command
binary
flag
acceleration
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.)
Granted
Application number
JP2985897A
Other languages
Japanese (ja)
Other versions
JP3040958B2 (en
Inventor
Kentaro Fujibayashi
謙太郎 藤林
Yusaku Yamada
雄策 山田
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 JP9029858A priority Critical patent/JP3040958B2/en
Publication of JPH10214108A publication Critical patent/JPH10214108A/en
Application granted granted Critical
Publication of JP3040958B2 publication Critical patent/JP3040958B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform an acceleration and deceleration processing so that a command path and an actual moving path can be prevented from being largely different at the time of operation interruption and resumption during a binary operation. SOLUTION: This method is a binary operation for operating each axis with binary data stored as a moving command to each axis in every distribution cycle. When an interrupting command is inputted at the time of outputting a moving command x10 during this binary operation, 3.x10/4 is outputted at first (a). Then, (x10/4)+(x11/4) is outputted in the next cycle, and x11/4 is outputted in the next cycle, and '0' is outputted in the next cycle, and deceleration is operated in set four cycles (b). At the time of resumption, x11/4, (x11/4)+(x12/4), 3.x12/4, and x13... are outputted, and acceleration is operated in four cycles (c). Acceleration and deceleration is operated as the time of interruption and resumption even during the binary operation so that shock can not be generated. Thus, a difference between the command path and the actual path can be reduced.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、数値制御装置等の
モーションコントローラのモーション制御方法に関す
る。
The present invention relates to a motion control method for a motion controller such as a numerical controller.

【0002】[0002]

【従来の技術】工作機械の送り軸モータを制御する数値
制御装置(CNC装置)などのモーションコントローラ
においては、プログラムされた移動指令を各軸毎に分配
し、プログラムされた移動経路どおりに工具等の制御点
を移動させる。この場合、通常、プログラムされた指令
を前処理して各軸毎の実行移動指令データとなるバイナ
リデータに変換し、このバイナリデータに基づいて各軸
のサーボモータ制御回路にこの移動指令を出力し、各軸
を駆動するサーボモータ等を駆動制御している。
2. Description of the Related Art In a motion controller such as a numerical control device (CNC device) for controlling a feed shaft motor of a machine tool, a programmed movement command is distributed to each axis, and a tool or the like follows a programmed movement path. Move the control point of. In this case, usually, the programmed command is pre-processed and converted into binary data which is execution movement command data for each axis, and the movement command is output to the servo motor control circuit of each axis based on the binary data. , And drives and controls a servo motor for driving each axis.

【0003】しかし、高速で複雑な形状を加工する場
合、上記前処理が間に合わず、各軸への移動指令の分配
ができずに加工を瞬時停止するうような場合が生じる。
このような不具合を避けるために、予め移動指令を前処
理し各軸への分配データであるバイナリデータを登録し
ておき、このバイナリデータをそのまま各軸へ出力する
バイナリ運転が採用されている。
However, when a complicated shape is machined at a high speed, the above-mentioned pre-processing cannot be performed in time, so that the movement command may not be distributed to each axis and the machining may be stopped instantaneously.
In order to avoid such a problem, a binary operation in which a movement command is pre-processed in advance and binary data which is distribution data to each axis is registered, and this binary data is output to each axis as it is, is adopted.

【0004】[0004]

【発明が解決しようとする課題】上記バイナリ運転中に
おいて、非常停止やリセット入力、さらにはフィールド
ホールド指令によって運転の中断を行なうと、バイナリ
データによって駆動されていたモータは急停止し、機械
は大きなショックを発生する。またフィールドホールド
指令によって停止した運転を再開するときには、バイナ
リ運転の途中の状態から運転が再開されることになるか
ら、記憶しているバイナリデータの分配指令がそのまま
各軸のモータに出力され、モータは急加速され大きなシ
ョックを機械に与える。
In the above-mentioned binary operation, when the operation is interrupted by an emergency stop, a reset input, or a field hold command, the motor driven by the binary data is suddenly stopped, and the machine becomes large. Generates shock. When the operation stopped by the field hold command is restarted, the operation is restarted from the state of the binary operation, so the stored binary data distribution command is output as it is to the motor of each axis, and Is suddenly accelerated and gives a big shock to the machine.

【0005】このショックが発生しないようにするに
は、中断・再開時に移動指令に対して加減速処理を行な
って、モータの回転を滑らかに減速、加速することによ
って可動部の移動を滑らかにする必要がある。そこで、
本発明の目的は、モーションコントローラのバイナリ運
転中の運転中断、再開時において、制御装置のプロセッ
サに大きな負担をかけることなく、加減速処理を行なう
モーションコントローラのモーション制御方法を提供す
ることにある。
In order to prevent the occurrence of this shock, acceleration / deceleration processing is performed on a movement command at the time of interruption / resumption, and the rotation of the motor is smoothly decelerated and accelerated to smooth the movement of the movable part. There is a need. Therefore,
An object of the present invention is to provide a motion control method of a motion controller that performs acceleration / deceleration processing without imposing a large load on a processor of a control device when the operation of the motion controller is interrupted or restarted during binary operation.

【0006】[0006]

【課題を解決するための手段】本発明は、モーションコ
ントローラにバイナリ運転時の加減速時間を移動指令の
分配周期の数で予め設定しておき、バイナリ運転途中で
運転停止信号が生じると、上記加減速時間として設定し
た分配周期の数でバイナリデータとして記憶している各
分配周期毎の移動指令を分割し、分配周期毎分割した1
個の移動指令だけ順次少なくなるように、運転停止信号
が発生した移動指令の分から移動指令として出力し減速
する。また、一時停止した後、運転を再開する際には、
上記分割した移動指令の次の1個の分割移動指令から分
配周期毎分割移動量単位で1個ずつ加算して移動指令と
して出力し加速する。
According to the present invention, the acceleration / deceleration time in binary operation is set in advance in the motion controller by the number of distribution cycles of the movement command. The movement command for each distribution cycle stored as binary data is divided by the number of distribution cycles set as the acceleration / deceleration time, and divided by the distribution cycle.
The movement command is output as a movement command from the movement command in which the operation stop signal is generated so that the number of movement commands decreases sequentially, and the speed is reduced. Also, when resuming operation after pausing,
From the one divided movement command next to the divided movement command, one by one is added for each divided movement amount in each distribution cycle, and output as a movement command to accelerate.

【0007】特に上記加減速時間として設定した分配周
期の数を2の累乗の値にすることによって移動指令の分
割を容易にする。すなわち、該分配周期の数を2とす
れば、上記移動指令を上記分配周期の数で分割する際
に、分配移動指令としてバイナリデータで記憶されてい
るレジスタをn回シフトすることによってこの移動指令
を2個に分割することができ、演算が簡単になる。
In particular, by dividing the number of distribution cycles set as the acceleration / deceleration time to a value of a power of 2, the division of the movement command is facilitated. That is, assuming that the number of distribution cycles is 2 n , when the movement command is divided by the number of distribution cycles, the register stored in binary data as the distribution movement command is shifted n times. The command can be divided into 2 n commands, which simplifies the operation.

【0008】[0008]

【発明の実施の形態】以下、図面を参照して本発明の一
実施形態として、モーションコントローラの一種である
工作機械を制御するCNC装置に本発明を適用した例を
説明する。図1はNC工作機械を駆動制御するCNC装
置10の要部を示す機能ブロック図である。CNC装置
10のプロセッサ11はCNC装置10を全体的に制御
するプロセッサである。このプロセッサ11は、ROM
12に格納されたシステムプログラムをバス19を介し
て読み出し、このシステムプログラムに従って、CNC
装置10を全体的に制御する。RAM13には一時的な
計算データや表示データおよびキーボード71を介して
オペレータが入力した各種データ等が格納される。CM
OSメモリ14は図示しないバッテリでバックアップさ
れ、CNC装置10の電源がオフにされても記憶状態が
保持される不揮発性メモリとして構成され、インターフ
ェイス15を介して読込まれた加工プログラムや表示装
置70、キーボード71を介して入力された加工プログ
ラム等が記憶されるようになっている。また、ROM1
2には、加工プログラムの作成および編集のために必要
とされる編集モードの処理や自動運転のための処理を実
施するための各種のシステムプログラムが予め書き込ま
れている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment in which the present invention is applied to a CNC device for controlling a machine tool, which is a kind of motion controller, will be described below as an embodiment of the present invention with reference to the drawings. FIG. 1 is a functional block diagram showing a main part of a CNC device 10 that drives and controls an NC machine tool. The processor 11 of the CNC device 10 is a processor that controls the CNC device 10 as a whole. This processor 11 has a ROM
12 is read out via the bus 19 and the CNC is read in accordance with the system program.
The device 10 is entirely controlled. The RAM 13 stores temporary calculation data, display data, various data input by the operator via the keyboard 71, and the like. CM
The OS memory 14 is backed up by a battery (not shown), and is configured as a non-volatile memory that retains a storage state even when the power of the CNC device 10 is turned off. The processing program and the like input via the keyboard 71 are stored. ROM1
2, various system programs for executing processing in an edit mode and processing for automatic operation required for creating and editing a machining program are written in advance.

【0009】インターフェイス15は、CNC装置10
に接続可能な外部機器のためのインターフェイスであ
り、フロッピーカセットアダプタ等の外部機器72が接
続される。外部機器72からは加工プログラム等が読み
込まれ、また、CNC装置10内で編集された加工プロ
グラムを外部機器72を介してフロッピーカセット等に
記憶させることができる。
The interface 15 is connected to the CNC device 10
This is an interface for an external device connectable to an external device, and an external device 72 such as a floppy cassette adapter is connected to the interface. A processing program or the like is read from the external device 72, and the processing program edited in the CNC device 10 can be stored in a floppy cassette or the like via the external device 72.

【0010】PMC(プログラマブル・マシン・コント
ローラ)16は、CNC装置100に内蔵されたシーケ
ンスプログラムで工作機械側の補助装置、例えば、工具
交換用のロボットハンド等といったアクチュエータを制
御する。即ち、加工プログラムで指令されたM機能,S
機能およびT機能に従って、これらシーケンスプログラ
ムで補助装置側で必要な信号に変換し、I/Oユニット
17から補助装置側に出力する。この出力信号により各
種アクチュエータ等の補助装置が作動する。また、工作
機械の本体に配備された操作盤の各種スイッチ等の信号
を受け、必要な処理をして、プロセッサ11に渡す。
A PMC (Programmable Machine Controller) 16 controls an auxiliary device on the machine tool side, for example, an actuator such as a robot hand for tool change, by a sequence program stored in the CNC device 100. That is, the M function, S commanded by the machining program
According to the function and the T function, the sequence program converts the signals into necessary signals on the auxiliary device side, and outputs the signals from the I / O unit 17 to the auxiliary device side. Auxiliary devices such as various actuators are operated by this output signal. Further, it receives signals from various switches and the like of an operation panel provided in the main body of the machine tool, performs necessary processing, and passes the signals to the processor 11.

【0011】工作機械の送り軸X,Y,Z軸の軸制御回
路30〜32はプロセッサ11から分配周期毎に出力さ
れる各軸の移動指令を受けて、位置、速度ループ処理を
行なってトルク指令をサーボアンプ40〜42に出力す
る。サーボアンプ40〜42はこの指令を受けて、工作
機械の各軸のサーボモータ50〜52を駆動する。各軸
のサーボモータ50〜52には位置・速度検出器が内蔵
されており、この位置・速度検出器から位置,速度フィ
ードバック信号が軸制御回路30〜32にフィードバッ
クされる。図1ではこれらの位置信号のフィードバック
および速度のフィードバックの説明は省略している。
The axis control circuits 30 to 32 for the feed axes X, Y, and Z axes of the machine tool receive a movement command for each axis output from the processor 11 for each distribution cycle, perform a position / speed loop process, and perform torque processing. The command is output to servo amplifiers 40-42. The servo amplifiers 40 to 42 receive the command and drive the servo motors 50 to 52 of the respective axes of the machine tool. Each of the servo motors 50 to 52 has a built-in position / speed detector, from which position / speed feedback signals are fed back to the axis control circuits 30 to 32. In FIG. 1, the description of the position signal feedback and the speed feedback is omitted.

【0012】スピンドル制御回路60は工作機械への主
軸回転指令を受け、スピンドルアンプ61にスピンドル
速度信号を出力する。スピンドルアンプ61はこのスピ
ンドル速度信号を受けて、主軸モータ62を指令された
回転速度で回転させる。主軸モータ62には歯車あるい
はベルト等でポジションコーダ63が結合され、該ポジ
ションコーダ63が主軸の回転に同期して帰還パルスを
出力し、その帰還パルスはインターフェイス18を経由
してプロセッサ11によって読み取られる。
A spindle control circuit 60 receives a spindle rotation command to a machine tool and outputs a spindle speed signal to a spindle amplifier 61. Upon receiving the spindle speed signal, the spindle amplifier 61 rotates the spindle motor 62 at the commanded rotation speed. A position coder 63 is coupled to the spindle motor 62 by a gear or a belt, and the position coder 63 outputs a feedback pulse in synchronization with rotation of the spindle, and the feedback pulse is read by the processor 11 via the interface 18. .

【0013】上述したCNC装置の構成は従来の送り軸
3軸のCNC装置と何等相違するものはない。また、送
り軸が3軸よりも多いCNC装置においても本発明は適
用できるものであり、このCNC装置がバイナリ運転を
行なっている途中において、、非常停止信号(指令)、
リセット指令、フィールドホールド指令等が入力もしく
は発生し、運転を中断する際に、減速処理を行なって運
転を停止する処理をプロセッサ11が行なうこと、及び
フィールドホールド指令で運転を停止した後再開指令に
よってバイナリ運転を一時停止した位置から再開始する
時に加速処理を行なって運転を再開する点が相違するも
のである。
The configuration of the above-described CNC apparatus has no difference from the conventional CNC apparatus having three feed axes. The present invention is also applicable to a CNC device having more than three feed axes. During the binary operation of the CNC device, an emergency stop signal (command),
When a reset command, a field hold command, or the like is input or generated and the operation is interrupted, the processor 11 performs a process of performing a deceleration process and stopping the operation, and a restart command after stopping the operation by the field hold command. The difference is that when the binary operation is restarted from the paused position, the acceleration process is performed and the operation is restarted.

【0014】まず、この実施形態におけるバイナリ運転
時の加減速処理を説明すると、加減速時間を分配周期の
整数倍とし、その数Nを予め設定しておく。そして、減
速を行なう場合、各分配周期毎のバイナリデータの移動
量を上記Nで割りN個の分割移動量とし、そして減速開
始の最初の分配周期では、この分割した移動量の最初の
(N−1)個を合計した移動量を出力し、次の分配周期
では、次に続く(N−2)個の分割移動量を合計した移
動量を出力する以下、順次分配周期毎に(N−3)個、
(N−4)個、…、2個,1個と出力するものである。
また、加速時は、逆に1個、2個、…(N−1)個を出
力するものである。これにより分配周期N周期目に加減
速が完了する。
First, the acceleration / deceleration processing in the binary operation in this embodiment will be described. The acceleration / deceleration time is set to an integral multiple of the distribution cycle, and the number N is set in advance. When deceleration is performed, the movement amount of binary data in each distribution cycle is divided by N to obtain N divided movement amounts, and in the first distribution cycle at the start of deceleration, the first (N In the next distribution cycle, a movement amount obtained by summing up the next (N-2) divided movement amounts is output. 3) Pieces,
(N-4),..., 2 and 1 are output.
During acceleration, one, two,... (N-1) are output in reverse. Thus, the acceleration / deceleration is completed in the N-th distribution cycle.

【0015】例えば、N=4で、図5(a)に示すよう
に、減速開始の分配周期の移動指令がx1 、次の周期が
x2 、さらに次の周期がx3 、以後x4 、x5 …であっ
たとする。そうすると減速開始の分配周期では図5
(b)に示す(3x1 /4)が出力され、次の周期では
[(x1 /4)+(x2 /4)]が出力され、次の周期
では(x2 /4)が出力されることになる。このように
してN=4周期目には移動指令が「0」となり4周期で
減速されることになる。また、一時停止後に引き続いて
加速する時は、図5(c)に示すように、分配周期毎順
次(x2 /4)、[(x2 /4)+(x3 /4)]、
(3x3 /4)を出力しN=4周期目からは次の移動指
令x4 をそのまま出力するようになる。
For example, when N = 4, as shown in FIG. 5 (a), the movement command of the distribution cycle for the start of deceleration is x1, the next cycle is x2, the next cycle is x3, and thereafter x4, x5. Suppose there was. Then, in the distribution cycle at the start of deceleration, FIG.
(3x1 / 4) shown in (b) is output, [(x1 / 4) + (x2 / 4)] is output in the next cycle, and (x2 / 4) is output in the next cycle. Become. In this way, the movement command becomes “0” in the N = 4th cycle, and the speed is reduced in 4 cycles. In addition, when accelerating continuously after the suspension, as shown in FIG. 5C, (x2 / 4), [(x2 / 4) + (x3 / 4)],
(3 × 3/4) is output, and the next movement command x4 is output as it is from the N = 4th cycle.

【0016】図2〜図4は、プロセッサ11が分配周期
毎に実施する処理のフローチャートであり、特にバイナ
リ運転中における中断処理、再開処理を主にした処理の
フローチャートである。
FIGS. 2 to 4 are flow charts of the processing executed by the processor 11 for each distribution cycle, and particularly, the flow charts of the processing mainly of the interruption processing and the restart processing during the binary operation.

【0017】まず、加工NCプログラムは、インタフェ
ース15を介してフロッピーカセットアダプタ等の外部
機器72から読み込まれCMOSメモリ14に格納され
ているとする。そして、該加工NCプログラムには一部
バイナリデータで各軸への分配移動指令が記憶されてい
るものとする。
First, it is assumed that the machining NC program is read from an external device 72 such as a floppy cassette adapter via the interface 15 and stored in the CMOS memory 14. Then, it is assumed that a distribution movement command to each axis is stored as binary data in the machining NC program.

【0018】運転が開始されると、プロセッサ11は分
配周期毎図2〜図4の処理を開始し、CMOSメモリ1
4に記憶された加工NCプログラムの先頭ブロックより
読みだし、バイナリ運転の命令か判断し(ステップS
1)、バイナリ運転指令であれば、フラグBINPREP 、BI
NST を「1」に、BINADSR 、BINACDC を「0」にセット
し(ステップS2)、ステップS3に進む。なお、上記
各フラグ及び後述するフラグは初期設定で最初は「0」
にセットされている。また、バイナリ運転指令でなけれ
ばステップS2の処理を行なわずステップS3に進む。
ステップS3ではフラグBINPREP が「1」か否かでバイ
ナリ運転中かを判断し、該フラグBINPREPが「0」でバ
イナリ運転中でなけれは、従来と同様の通常の処理を行
ない(ステップS19)、各軸への移動指令Lを求め、
各軸を駆動する各サーボモータの軸制御回路30〜32
へ該移動指令Lを出力し(ステップS18)、当該分配
周期の処理を終了する。バイナリ指令が読み込まれなけ
れば、上述したステップS1,S3、S19、S18の
処理を繰り返し実行し、従来と同様の分配処理を行な
う。
When the operation is started, the processor 11 starts the processing of FIGS.
4 is read from the first block of the machining NC program stored in the processing NC program 4 and it is determined whether it is a binary operation command (step S).
1) If binary operation command, flag BINPREP, BI
NST is set to "1", BINADSR and BINACDC are set to "0" (step S2), and the process proceeds to step S3. Note that the above flags and the flags described later are initially set to “0” by default.
Is set to If it is not a binary operation command, the process proceeds to step S3 without performing the process of step S2.
In step S3, it is determined whether or not the binary operation is being performed based on whether or not the flag BINPREP is "1". If the binary operation is not performed with the flag BINPREP being "0", the normal processing similar to the conventional one is performed (step S19). Find the movement command L for each axis,
Axis control circuits 30 to 32 for each servo motor driving each axis
The movement command L is output (step S18), and the processing of the distribution cycle ends. If the binary command is not read, the processes of steps S1, S3, S19, and S18 described above are repeatedly executed, and the same distribution process as in the related art is performed.

【0019】一方ステップS1でバイナリ運転指令が読
まれ、ステップS2で上述したように各種フラグがセッ
トされ、ステップS3でフラグBINPREP が「1」でバイ
ナリ運転中と判断されると、フラグBINST が「1」でバ
イナリ運転の開始かを判断し(ステップS4)、最初は
ステップS2で「1」にセットされているから、ステッ
プS5に移行してバイナリ運転のための指標j,kを
「0」にセットすると共にフラグBINST を「0」にセッ
トする(ステップS5、S6)。
On the other hand, a binary operation command is read in step S1, various flags are set as described above in step S2, and if it is determined in step S3 that the binary operation is being performed when the flag BINPREP is "1", the flag BINST is set to "1". It is determined whether the binary operation is started at "1" (step S4). Since it is initially set to "1" at step S2, the process proceeds to step S5 to set the indexes j and k for binary operation to "0". And the flag BINST is set to "0" (steps S5 and S6).

【0020】そして、一時運転を停止させるフィードホ
ールド信号が有るか、リセット信号、非常停止信号が有
るか判断し(ステップS7,S8)、これらの信号が発
生していなければ、フラグBINACDC が「3」または
「1」にセットされているか判断する(ステップS
9)。最初は、このフラグBINACDC はステップS2で
「0」にセットされているから、ステップS17に進
み、バイナリ分配処理を行なう。
Then, it is determined whether there is a feed hold signal for temporarily stopping the operation, a reset signal, and an emergency stop signal (steps S7 and S8). If these signals are not generated, the flag BINACDC is set to "3". Is set to "1" or "1" (step S
9). Initially, since the flag BINACDC is set to "0" in step S2, the process proceeds to step S17 to perform binary distribution processing.

【0021】このバイナリ分配処理は図3、図4に示す
処理である。まず、フラグBINACDCの値を判断する(ス
テップSB1)。この場合、該フラグBINACDC はステッ
プS2で「0」にセットされたままであるから、ステッ
プSB24に移行して当該ブロックのバイナリデータx
j(指標jはステップS5でバイナリ運転開始時に
「0」にセットされているから「0」から始まる)を読
みだし、移動指令Lとしてレジスタに格納し、指標jを
「1」インクリメントする(ステップSB25)。そし
て、指標jがバイナリデータの総数P以上に達したかに
よってバイナリ運転終了か否かを判断し(ステップSB
34)、バイナリ運転を終了していなければ、バイナリ
分配処理を終了しメインルーチンに復帰する。メインル
ーチンではレジスタに記憶された移動量Lを各軸のサー
ボモータの軸制御回路30〜32へ出力し(ステップS
18)、当該分配周期の処理を終了する。
This binary distribution processing is the processing shown in FIGS. First, the value of the flag BINACDC is determined (step SB1). In this case, since the flag BINACDC remains set to "0" in step S2, the process proceeds to step SB24 to execute the binary data x of the block.
j (indicator j is set to “0” at the start of the binary operation in step S5 and starts from “0”), stored as a movement command L in a register, and increments index j by “1” (step S5). SB25). Then, it is determined whether or not the binary operation is completed based on whether or not the index j has reached the total number P of the binary data (step SB).
34) If the binary operation has not been completed, the binary distribution process is terminated and the process returns to the main routine. In the main routine, the movement amount L stored in the register is output to the axis control circuits 30 to 32 of the servo motors of the respective axes (Step S).
18), the processing of the distribution cycle ends.

【0022】次の分配周期では、フラグBINPREP が
「1」フラグBINST が「0」、フラグBINACDC が「0」
にセットされているから、ステップS1、S3、S4と
進み、ステップS4からステップS5,S6の処理を行
なうことなくステップS7に進む。フィードホールド信
号、リセット信号、非常停止信号が発生していなけれ
ば、ステップS8、S9、SB1、SB24、SB2
5、SB34、S18の処理を行なってバイナリデータ
による移動指令を各軸のサーボモータの軸制御回路30
〜32に出力する。以下、フィードホールド信号、リセ
ット信号、非常停止信号が発生しない限り、分配周期
毎、ステップS1、S3、S4、S7〜S9、SB1、
SB24、SB25、SB34、S18の処理を繰り返
し実行し、バイナリデータによる移動指令を各軸のサー
ボモータの軸制御回路30〜32に出力する。
In the next distribution cycle, the flag BINPREP is "1", the flag BINST is "0", and the flag BINADC is "0".
, The process proceeds to steps S1, S3, and S4, and proceeds to step S7 without performing the processes from step S4 to steps S5 and S6. If the feed hold signal, the reset signal, and the emergency stop signal have not been generated, steps S8, S9, SB1, SB24, SB2
5, the processing of SB34 and S18 is performed, and the movement command based on the binary data is sent to the axis control circuit 30 of the servomotor of each axis.
To 32. Hereinafter, steps S1, S3, S4, S7 to S9, SB1,
The processing of SB24, SB25, SB34, and S18 is repeatedly executed, and a movement command based on binary data is output to the axis control circuits 30 to 32 of the servo motors of the respective axes.

【0023】一方、このバイナリ運転中に、フィードホ
ールド信号が発生するか、リセット信号もしくは非常停
止信号が発生すると、それを検出しプロセッサ11はス
テップS7、もしくはステップS8からステップS10
に移行して、フラグBINACDCが「3」であるか判断す
る。フラグBINACDC は「0」にセットされたままである
から、ステップS11に移行して該フラグBINACDC を
「2」にセットし、フラグBINADST が「2」か否か判断
する。このフラグBINADST はステップS2で「0」にセ
ットされているから、ステップS13に進んで該フラグ
BINADST を「1」にセットし、バイナリ分配処理(ステ
ップS17)に移行する。
On the other hand, if a feed hold signal is generated or a reset signal or an emergency stop signal is generated during the binary operation, the processor 11 detects the signal, and the processor 11 detects the signal from step S7 or step S8 to step S10.
To determine whether the flag BINACDC is "3". Since the flag BINACDC is still set to "0", the process proceeds to step S11, where the flag BINACDC is set to "2", and it is determined whether or not the flag BINADST is "2". Since this flag BINADST is set to "0" in step S2, the process proceeds to step S13 and the flag BINADST is set to "0".
BINADST is set to "1", and the flow shifts to binary distribution processing (step S17).

【0024】バイナリ分配処理では、フラグBINACDC が
減速中を示す「2」にセットされているからステップS
B1からステップSB2に移行し、さらにバイナリ運転
中における加減速開始を示すフラグBINADST が「1」か
判断し、この場合、ステップS13で「1」にセットさ
れているから、ステップSB3に移行してバイナリ運転
中における加減速期間の周期を計数する指標iを「1」
にセットし、フラグBINADST を「2」にセットし(ステ
ップSB4)、フラグBINACDC が加速中を示す「1」に
セットされているか、減速中を示す「2」にセットされ
ているか判断する(ステップSB5)。現時点において
は、ステップS11でフラグBINACDC は「2」とセット
され減速中を示している(フィードホールドの信号によ
って減速停止実行中)ので、減速処理を開始することに
なる。ステップSB5以下の処理が加減速処理である
が、まず、この加減速処理について一般的に説明する。
In the binary distribution processing, since the flag BINACDC is set to "2" indicating that the vehicle is decelerating, step S
The process proceeds from B1 to step SB2, and further determines whether the flag BINADST indicating the start of acceleration / deceleration during binary operation is "1". In this case, since it is set to "1" in step S13, the process proceeds to step SB3. The index i for counting the cycle of the acceleration / deceleration period during the binary operation is "1".
And the flag BINADST is set to "2" (step SB4), and it is determined whether the flag BINACDC is set to "1" indicating that the vehicle is accelerating or "2" indicating that the vehicle is decelerating (step SB4). SB5). At the present time, the flag BINACDC is set to "2" in step S11 to indicate that deceleration is being performed (deceleration stop is being executed by the signal of the feed hold), so that the deceleration process is started. The processing after step SB5 is the acceleration / deceleration processing. First, the acceleration / deceleration processing will be generally described.

【0025】フラグBINACDC が「2」で減速中を示して
いるときには、加減速の移動量を算出するためのパラメ
ータtempの値を指標iから指標kの値を減算して求める
(temp=i−k)(ステップSB7)。また、フラグBI
NACDC が「1」で加速中であると、ステップSB6に移
行し上記パラメータtempを設定されている加減速周期数
N(予め加減速時間を分配周期の数Nで設定しておく)
から指標i、kを減じて求める(temp=N−i−k)。
When the flag BINACDC is "2" indicating deceleration, the value of the parameter temp for calculating the amount of acceleration / deceleration is obtained by subtracting the value of the index k from the index i (temp = i- k) (Step SB7). Also the flag BI
If NACDC is "1" and the vehicle is accelerating, the process proceeds to step SB6 where the parameter temp is set to the number of acceleration / deceleration cycles N (the acceleration / deceleration time is set in advance by the number N of distribution cycles).
To obtain the index i, k (temp = N−ik).

【0026】そして、該パラメータtempの値が、「正」
か、「0」か、「負」か判断し(ステップSB8)、正
であれば、ステップSB9、「0」であればステップS
B14、負であればステップSB20に進む。パラメー
タtempの値が正であるときは指標jで示されるブロック
の移動指令xjを読み取り(ステップSB9)、フラグ
BINACDC を判断し(ステップSB10)、「1」で加速
中のときには、読み取った移動指令xjと指標iの値よ
り次の第1式の演算を行なって移動指令Lを求める(ス
テップSB11)。
When the value of the parameter temp is "positive"
, "0" or "negative" (step SB8), and if positive, step SB9; if "0", step S8
B14, if negative, proceed to Step SB20. When the value of the parameter temp is positive, the movement command xj of the block indicated by the index j is read (step SB9), and the flag
BINACDC is determined (step SB10), and when acceleration is being performed at "1", the following first equation is calculated from the read movement command xj and the value of the index i to obtain a movement command L (step SB11).

【0027】 L=i・xj /N …(1) また、フラグBINACDC が「2」で減速中のときには、次
の第2式の演算を行なって移動指令Lを求める(ステッ
プSB12)。
L = i · xj / N (1) When the flag BINACDC is “2” and the vehicle is decelerating, the following second formula is calculated to obtain the movement command L (step SB12).

【0028】 L=(N−i)・xj/N …(2) そして、指標kに(N−temp)の値をセットして(ステ
ップSB13)(ステップSB26に移行する。
L = (N−i) · xj / N (2) Then, the value of (N−temp) is set to the index k (step SB13) (the process proceeds to step SB26).

【0029】また、パラメータtempの値が「0」のとき
には、指標jで示されるブロックの移動指令xjを読み
取り(ステップSB14)、フラグBINACDC を判断し
(ステップSB15)、「1」で加速中のときには上記
第1式の演算を行ない移動指令Lを求め(ステップSB
16)、フラグBINACDC が「2」で減速中のときには、
上記第2式の演算を行ない移動指令Lを求め(ステップ
SB17)、指標kを「0」指標jを「1」インクリメ
ントし(ステップSB18、SB19)、ステップSB
26に移行する。
When the value of the parameter temp is "0", the movement command xj of the block indicated by the index j is read (step SB14), and the flag BINACDC is judged (step SB15). Sometimes, the calculation of the first equation is performed to obtain the movement command L (step SB)
16) When the flag BINACDC is “2” and the vehicle is decelerating,
The movement command L is obtained by performing the calculation of the second equation (step SB17), the index k is incremented by "0", and the index j is incremented by "1" (steps SB18 and SB19), and the step SB is performed.
Move to 26.

【0030】さらに、パラメータtempの値が「負」のと
きには、指標jの値、及びこの指標jの次の値(j+
1)で示されるブロックの移動指令xj、xj+1 を読み
取り(ステップSB20)、次の3式の演算を行なって
移動指令Lを求める(ステップSB21)。
Further, when the value of the parameter temp is "negative", the value of the index j and the next value (j +
The movement commands xj and xj + 1 of the block indicated by 1) are read (step SB20), and the following three expressions are operated to obtain the movement command L (step SB21).

【0031】 L=[(N−k)・xj/N]−temp・xj+1 /N …(3) そして、指標kを「−temp」に設定し、指標jを「1」
インクリメントし(ステップSB22,SB23)、ス
テップSB26へ移行する。
L = [(N−k) · xj / N] −temp · xj + 1 / N (3) Then, the index k is set to “−temp”, and the index j is set to “1”.
The value is incremented (steps SB22 and SB23), and the process proceeds to step SB26.

【0032】ステップSB26では指標iを「1」イン
クリメントし該指標iが加減速時間の設定周期数N以上
か判断し(ステップSB27)、以上でなければ(ステ
ップSB34に移行してバイナリ運転が終了していなけ
れば、メインルーチンに戻り、算出した移動指令Lをサ
ーボモータに出力して当該周期の処理を終了する。
In step SB26, the index i is incremented by "1", and it is determined whether or not the index i is equal to or greater than the set number N of acceleration / deceleration times (step SB27). If not, the flow proceeds to step SB34 to terminate the binary operation. If not, the process returns to the main routine, outputs the calculated movement command L to the servomotor, and ends the processing in the cycle.

【0033】そこで、加減速時間を決める設定分配周期
の数Nを「4」として、上記加減速処理を説明する。ま
た、バイナリ運転の各ブロックの移動指令が例えば図6
(a)に示すものとし、例えば指標jが「10」でxj
=x10の移動指令を出力しようとする時に、フィードホ
ールド信号が発生するか、リセット信号もしくは非常停
止信号が発生した(ステップS7,S8)とする。
The acceleration / deceleration process will be described with the number N of the set distribution cycles for determining the acceleration / deceleration time set to "4". Further, the movement command of each block of the binary operation is, for example, as shown in FIG.
(A), for example, if the index j is "10" and xj
It is assumed that a feed hold signal is generated or a reset signal or an emergency stop signal is generated (Steps S7 and S8) when a movement command of = x10 is to be output.

【0034】その時、前述したように、フラグBINACDC
が「2」、フラグBINADST が「1」に設定され(ステッ
プS10〜S13)、ステップSB1に移行して、さら
にステップSB2〜SB4によって指標iが「1」に設
定させると共にBINADST が「2」に設定されている点は
前述したとおりである。そして、ステップSB5で、フ
ラグBINACDC が「2」で減速中と判断されると、パラメ
ータtempには、i−k=1−0=1がセットされる(ス
テップSB7)。なお、指標iはバイナリ運転加減速開
始時にステップSB3で「1」に、指標kはバイナリ運
転開始時にステップSB5で「0」に設定されている。
temp=1で「正」であるから、ステップSB9に移行し
てブロックの移動指令xj=x10をよむ。なお、指標j
はバイナリ運転開始時にステップS5で「0」にセット
され、該指標jで示されるブロックの移動指令xjが出
力される毎に「1」インクリメンタルされており(ステ
ップSB24,SB25参照)、上述したようにj=1
0の時にフィードホールド信号が発生するか、リセット
信号もしくは非常停止信号が発生したとしているから移
動指令xj=x10が読み込まれる。
At that time, as described above, the flag BINACDC
Is set to "2", the flag BINADST is set to "1" (steps S10 to S13), the process proceeds to step SB1, the index i is set to "1" by steps SB2 to SB4, and BINADST is set to "2". The points set are as described above. If it is determined in step SB5 that the flag BINACDC is "2" and the vehicle is decelerating, ik = 1-0 = 1 is set in the parameter temp (step SB7). The index i is set to "1" at step SB3 at the start of binary operation acceleration / deceleration, and the index k is set to "0" at step SB5 at the start of binary operation.
Since temp = 1 and “correct”, the process proceeds to step SB9 to read the block movement command xj = x10. The index j
Is set to “0” in step S5 at the start of the binary operation, and is incremented by “1” each time the movement command xj of the block indicated by the index j is output (see steps SB24 and SB25), as described above. J = 1
Since it is determined that a feed hold signal has been generated at the time of 0 or a reset signal or an emergency stop signal has been generated, the movement command xj = x10 is read.

【0035】そしてフラグBINACDC が「2」であるから
ステップSB10からステップSB12に移行して、上
記第2式にN=4、i=1、xj =x10、を代入し移動
指令Lを求める。
Then, since the flag BINACDC is "2", the flow shifts from step SB10 to step SB12, where N = 4, i = 1, xj = x10 are substituted into the above-mentioned second equation to obtain the movement command L.

【0036】L=(N−i)・xj/N=(4−1)・
x10/4=(3/4)・x10 次に指標kをk=3(N−temp=4−1=3)とし(ス
テップSB13)、指標iを「1」インクリメントし
「2」とし(ステップSB26)、この指標iの値がN
=4以上か判断し、以上ではないからステップSB34
に移行して、さらにバイナリ運転が終了しているか判断
し、終了していないので、メインルーチンに戻り、ステ
ップS18でステップSB12で求めた移動指令L=
(3/4)x10を出力する。
L = (N−i) · xj / N = (4-1) ·
x10 / 4 = (3/4) × 10 Next, the index k is set to k = 3 (N-temp = 4-1 = 3) (step SB13), and the index i is incremented by “1” to “2” (step SB13). SB26), and the value of the index i is N
= 4 or more, and if not, step SB34
It is determined whether the binary operation has been completed or not. Since the binary operation has not been completed, the process returns to the main routine, and in step S18, the movement command L obtained in step SB12 =
(3/4) × 10 is output.

【0037】次の周期では、ステップS1、S3、S4
の処理をしてステップS7もしくはステップS8からス
テップS10に移行し、フラグBINACDC は「2」に設定
されたままであり、フラグBINADST はステップSB4で
「2」に設定されているからステップS10,S11,
S12の処理を行なった後バイナリ分配処理(ステップ
S17)に移行して、ステップSB1,SB2,SB
5,SB7に移行する。ステップSB7では、指標i=
2で、指標k=3であるから、パラメータtemp=2−3
=−1となる。temp=−1で負であるので、ステップS
B8からステップSB20に移行し、移動指令xj=x
10及び次の移動指令xj+1 を読み(なお、指標jはイン
クリメントされておらず前の「10」のままである)、
第3式の演算を行ない移動指令Lを求める(ステップS
B21)。
In the next cycle, steps S1, S3, S4
The process proceeds from step S7 or step S8 to step S10, and the flag BINACDC remains set to "2" and the flag BINADST is set to "2" in step SB4, so that steps S10, S11,
After performing the process of S12, the process proceeds to the binary distribution process (step S17), and the process proceeds to steps SB1, SB2, and SB.
5, the process proceeds to SB7. In step SB7, the index i =
2 and the index k = 3, the parameter temp = 2-3
= -1. Since temp = −1 and negative, step S
The process proceeds from B8 to step SB20, and the movement command xj = x
10 and the next movement command xj + 1 are read (the index j is not incremented and remains at the previous “10”),
The calculation of the third equation is performed to obtain the movement command L (step S
B21).

【0038】 L=[(N−k)・xj/N]−temp・xj+1 /N =[(4−3)・x10/4]+1・x11/4 =(1/4)・x10+(1/4)・x11 次に指標k=−temp=1とし、指標jを「1」インクリ
メントし、j=11とし(ステップSB22,SB2
3)、指標iを「1」インクリメントし、i=3とする
(ステップSB26)。指標i=3で、N=4以上では
ないから、ステップSB34に移行し、バイナリ運転が
終了していなければ、メインルーチンに戻り、ステップ
SB21で求めた上記移動指令Lを出力する(ステップ
S18)。
L = [(N−k) · xj / N] −temp · xj + 1 / N = [(4-3) · x10 / 4] + 1 · x11 / 4 = (1/4) · x10 + ( 1 /) × 11 Next, the index k is set to −temp = 1, the index j is incremented by “1”, and j is set to 11 (steps SB22 and SB2).
3) The index i is incremented by "1" to set i = 3 (step SB26). Since the index i is not equal to 3 and N is not equal to or more than 4, the process proceeds to step SB34. If the binary operation is not completed, the process returns to the main routine and outputs the movement command L obtained in step SB21 (step S18). .

【0039】次の周期では同様に、ステップS1,S
3,S4,S7もしくはS8,S10,S11,S1
2,SB1,SB2,SB5,SB7と処理し、指標i
=3、指標k=1であるからtemp=3−1=2で正であ
るから、ステップSB8からSB9に移行して、移動指
令xj=x11を読みだし、上記第2式より移動指令Lを
求める(ステップSB10,SB12)。
In the next cycle, steps S1, S
3, S4, S7 or S8, S10, S11, S1
2, SB1, SB2, SB5, SB7, and the index i
= 3 and index k = 1, so that temp = 3-1 = 2, which is positive, the process proceeds from step SB8 to SB9 to read the movement command xj = x11, and to calculate the movement command L from the above equation (2). (Steps SB10 and SB12).

【0040】L=(N−i)・xj/N=(4−3)・
x11/4=(1/4)・x11 そして指標kをk=N−temp=4−2=2とし(ステッ
プSB13)、指標iを「1」インクリメントして(ス
テップSB26)、i=4とする。その結果指標iがN
=4以上となるから、ステップSB28に移行し、フラ
グBINACDC が「2」か否か判断し、この場合「2」であ
るから、ステップSB29に移行して、非常停止もしく
はリセット信号があるかを判断する。そして非常停止も
しくはリセット信号があれば、フラグBINPREP を
「0」、フラグBINACDC ,BINADST を「0」にセットし
バイナリ運転の加減速処理を終了し(ステップSB3
0,SB31)、ステップSB34に移行してバイナリ
運転終了かを指標jがバイナリデータの総数P以上かに
よって判断し、終了していなければ、メインルーチンに
戻りステップSB13で求めた上記移動指令L=(1/
4)・x11を出力する(ステップS18)。
L = (N−i) · xj / N = (4-3) ·
x11 / 4 = (1/4) x11 Then, the index k is set to k = N-temp = 4-2 = 2 (step SB13), the index i is incremented by "1" (step SB26), and i = 4 I do. As a result, the index i is N
= 4 or more, the flow shifts to step SB28 to determine whether or not the flag BINACDC is "2". In this case, since the flag BINACDC is "2", the flow shifts to step SB29 to determine whether there is an emergency stop or reset signal. to decide. If there is an emergency stop or reset signal, the flag BINPREP is set to "0", and the flags BINACDC and BINADST are set to "0", thereby terminating the acceleration / deceleration processing of the binary operation (step SB3).
0, SB31), and proceeds to step SB34 to determine whether or not the binary operation is completed based on whether or not the index j is equal to or greater than the total number P of binary data. If not, the process returns to the main routine and returns to the main routine, where the movement command L = (1 /
4) Output x11 (step S18).

【0041】次の周期では、ステップS1からステップ
S3に進み、フラグBINPREP が「0」にセットされてい
るからステップS19に進んで通常の処理を行なう。こ
の場合、リセットもしくは非常停止中であるから、移動
指令Lは求められずL=0であり、サーボモータの軸制
御回路30〜32への出力は「0」となる(ステップS
18)。以後、各周期毎ステップS1,S3,S19,
S18の処理を繰り返し、サーボモータの軸制御回路3
0〜32への出力は「0」で駆動されることはない。
In the next cycle, the process proceeds from step S1 to step S3, and since the flag BINPREP is set to "0", the process proceeds to step S19 to perform normal processing. In this case, since the reset or emergency stop is being performed, the movement command L is not obtained and L = 0, and the output of the servo motor to the axis control circuits 30 to 32 is "0" (step S).
18). Thereafter, steps S1, S3, S19,
The processing of S18 is repeated, and the axis control circuit 3 of the servo motor
The outputs to 0 to 32 are not driven at "0".

【0042】一方、ステップSB29で、非常停止もし
くはリセット信号が検出されないとき(フィードホール
ド信号の発生時)は、フラグBINACDC を「3」、フラグ
BINADST を「0」にセットし(ステップSB32,SB
33)、バイナリ運転終了かを判断し(ステップSB3
4)、終了でなければ、メインルーチンに戻りステップ
SB13で求めた上記移動指令L=(1/4)・x11を
出力する(ステップS18)。そして、次の周期から
は、ステップS1,S3、S4、S7,S10、S17
と移行し、ステップS17のバイナリ分配処理では、ス
テップSB1からステップSB36に移行して移動指令
Lを「0」としてメインルーチンに戻り、この「0」の
移動指令Lをサーボモータの軸制御回路30〜32に出
力する(ステップS18)。その結果モータは駆動され
ず、機械は停止状態にある。
On the other hand, in step SB29, when the emergency stop or the reset signal is not detected (when the feed hold signal is generated), the flag BINACDC is set to "3",
BINADST is set to "0" (steps SB32 and SB
33), and determine whether the binary operation is completed or not (step SB3)
4) If not ended, the process returns to the main routine and outputs the above-mentioned movement command L = (1/4) .x11 obtained in step SB13 (step S18). Then, from the next cycle, steps S1, S3, S4, S7, S10, S17
In the binary distribution process of step S17, the process proceeds from step SB1 to step SB36 to set the movement command L to "0" and returns to the main routine. The movement command L of "0" is transferred to the axis control circuit 30 of the servo motor. (Step S18). As a result, the motor is not driven and the machine is at a standstill.

【0043】以上の通り、バイナリ運転中に非常停止、
リセットまたはフードホールド信号が発生すると、加減
速時間を決める周期数Nが4であると、出力しようとし
た移動指令をx10、次の移動指令をx11とすると、移動
指令Lは、 減速開始の1周期目の移動指令L =(3/4)・x10 減速開始から2周期目の移動指令L=(1/4)・x10
+(1/4)・x11 減速開始から3周期目の移動指令L=(1/4)・x11 減速開始から4周期以降の移動指令L=0 となる。図6(a)に示した例で、x10/4=a、x11
/4=b、x12/4=cとすると、図6(b)に示すよ
うに、減速開始の1周期目に「3a」が出力され2周期
目に「a+b」が出力され3周期目に「b」が出力され
ることになる。その結果、移動指令x11の半分(2b)
を出力した状態で停止することになる。
As described above, the emergency stop during the binary operation,
When a reset or a hood hold signal is generated, if the number of cycles N for determining the acceleration / deceleration time is 4, the moving command to be output is x10, and the next moving command is x11, the moving command L is 1 at the start of deceleration. Movement command L in the cycle: L = (3/4) × 10 Move command L in the second cycle from the start of deceleration L = (1 /) × 10
+ (1/4) .x11 Movement command L in the third cycle from the start of deceleration = (1/4) .x11 Movement command L = 0 after the 4th cycle from the start of deceleration. In the example shown in FIG. 6A, x10 / 4 = a, x11
Assuming that / 4 = b and x12 / 4 = c, as shown in FIG. 6B, "3a" is output in the first cycle of deceleration start, "a + b" is output in the second cycle, and "B" will be output. As a result, half (2b) of the movement command x11
Will be stopped in the state where is output.

【0044】以上のようにして減速されて停止するか
ら、図7に示すように、x10の移動指令がABで、x11
の移動指令がBC、x12の移動指令がCDであったと
き、実際の移動はab、bc、cdとなり、移動経路誤
差は小さなものとなる。
Since the vehicle is decelerated and stopped as described above, as shown in FIG. 7, the movement command of x10 is AB and x11
When the movement command is BC and the movement command of x12 is CD, the actual movement is ab, bc, and cd, and the movement path error is small.

【0045】フードホールド信号の発生で、上述したよ
うに減速して停止し、ステップS1,S3,S4,S
7,S10,SB1,SB36,S18の処理を繰り返
し実行し、機械を停止した状態にあるとき、フィードホ
ールド信号が停止されフィードホールド状態がとかれる
と、ステップS7からステップS8、S9に移行し、ス
テップS9でフラグBINACDC が「1」又は「3」か判断
され、このフラグはフードホールド信号により減速停止
したときには、ステップSB32で「3」にセットされ
ているから、ステップS14に移行して、フラグBINACD
C を「1」にセットし、フラグBINADST が「2」否か判
断し(ステップS15)、このフラグBINADST はステッ
プSB33で「0」にセットされているから、ステップ
S16に移行して該フラグBINADST を「1」にセットす
る。
When the hood hold signal is generated, the vehicle decelerates and stops as described above, and steps S1, S3, S4, S
7, S10, SB1, SB36, and S18 are repeatedly executed, and when the machine is stopped and the feed hold signal is stopped and the feed hold state is set, the process proceeds from step S7 to steps S8 and S9. In step S9, it is determined whether the flag BINACDC is "1" or "3". When the flag is decelerated and stopped by the hood hold signal, the flag is set to "3" in step SB32. BINACD
C is set to "1", and it is determined whether or not the flag BINADST is "2" (step S15). Since this flag BINADST has been set to "0" in step SB33, the process proceeds to step S16, where the flag BINADST is set. Is set to “1”.

【0046】そして、バイナリ分配処理に移行し、フラ
グBINACDC が「1」、フラグBINADST が「1」であるか
ら、ステップSB1、SB2からステップSB3に移行
して指標iを「1」にセットし、フラグBINADST を
「2」にセットする(ステップSB4)。次にステップ
SB5に移行してフラグBINACDC の値により加速中か減
速中かを判断するが、この場合ステップS14で、該フ
ラグBINACDC は「1」にセットされ加速中を示すから、
ステップSB6に移行してパラメータtempを求める。前
述した例でN=4で、フィードホールドにより減速停止
したとき、指標kは「2」、指標jは「11」で終わっ
ている。そこで、 temp=N−i−k=4−1−2=1 temp=1で「正」であるから、ステップSB8からステ
ップSB9に進み移動指令xj=x11を読み、フラグBI
NACDC は「1」で有り加速中であるので、ステップSB
10からステップSB11に進み上記第1式の演算を行
なって移動指令Lを求める。
Then, the process proceeds to the binary distribution process. Since the flag BINACDC is "1" and the flag BINADST is "1", the process proceeds from step SB1, SB2 to step SB3 to set the index i to "1". The flag BINADST is set to "2" (step SB4). Next, the flow proceeds to step SB5 to determine whether the vehicle is accelerating or decelerating based on the value of the flag BINACDC. In this case, in step S14, the flag BINACDC is set to “1” to indicate that the vehicle is accelerating.
The process proceeds to Step SB6 to obtain the parameter temp. In the example described above, when N = 4 and deceleration to stop by feed hold, the index k ends with “2” and the index j ends with “11”. Therefore, since temp = Nik = 4-1-2 = 1 and temp = 1 is “positive”, the process proceeds from step SB8 to step SB9 to read the movement command xj = x11 and read the flag BI
Since NACDC is “1” and accelerating, step SB
The process proceeds from step 10 to step SB11 to calculate the movement command L by performing the calculation of the first equation.

【0047】 L=i・xj/N=1・x11/4=(1/4)・x11 そして、指標kをk=N−temp=4−1=3にセットし
(ステップSB13)、指標iを「1」インクリメント
して「2」とし(ステップSB26)、前述したステッ
プSB27、SB34,S18の処理を行ない、求めた
移動指令Lをサーボモータに出力する。
L = i · xj / N = 1 · x11 / 4 = (・) · x11 Then, the index k is set to k = N−temp = 4-1 = 3 (step SB13), and the index i is set. Is incremented by "1" to "2" (step SB26), and the processing of steps SB27, SB34, and S18 described above is performed, and the obtained movement command L is output to the servomotor.

【0048】次の周期では、ステップS1,S3,S
4,S7,S8,S9に進み、フラグBINACDC は「1」
であるから、ステップS14、S15と進み、フラグBI
NADSTはステップSB4で、「2」セットされているか
ら、バイナリ分配処理へ移行しステップSB1、SB
2,SB5、SB6と進む。ステップSB6では、i=
2、k=3であるから、パラメータtemp=N−i−k=
4−2−3=−1であり、負で有るから、ステップSB
8からステップSB20に移行し移動指令xj=x11、
xj+1 =x12をメモリから読みだし、上記第3式の演算
を行なって移動指令Lを求める(ステップSB21)。
In the next cycle, steps S1, S3, S
Proceed to 4, S7, S8, S9, and the flag BINACDC is "1"
Therefore, the process proceeds to steps S14 and S15, and the flag BI
Since NADST is set to "2" in step SB4, the process shifts to binary distribution processing, and steps SB1, SB
The process proceeds to 2, SB5 and SB6. In step SB6, i =
2. Since k = 3, the parameter temp = N−i−k =
Since 4-2-3 = −1, which is negative, step SB
8 to step SB20, where the movement command xj = x11,
xj + 1 = x12 is read out of the memory, and the operation of the third equation is performed to obtain the movement command L (step SB21).

【0049】 L=[(N−k)・xj/N]−temp・xj+1 /N =[(4−3)・x11/4]+1・x12/4 =(1/4)・x11+(1/4)・x12 そして、指標kをk=−temp=1、指標jをインクリメ
ントして「12」とし(ステップSB22,SB2
3)、さらに指標iをインクリメントして「3」とし
(ステップSB26)、以下前述したステップSB2
7,SB34,S18の処理を行ない上記移動指令Lを
サーボモータの軸制御回路30〜32へ出力する。
L = [(N−k) · xj / N] −temp · xj + 1 / N = [(4-3) · x11 / 4] + 1 · x12 / 4 = (1/4) · x11 + ( 1 /) × 12 Then, the index k is set to k = −temp = 1, and the index j is incremented to “12” (steps SB22 and SB2).
3) Further, the index i is incremented to “3” (Step SB26), and the above-described Step SB2
7, SB34 and S18, and outputs the movement command L to the axis control circuits 30 to 32 of the servomotor.

【0050】次の周期では、ステップS1,S3,S
4,S7,S8,S9,S14,S15,SB1,SB
2,SB5,SB6の処理を行ない、ステップSB6で
は、temp=N−i−k=4−3−1=0を求め、temp=
0であるからステップSB14に移行して、メモリより
xj =x12を読みだし、フラグBINACDC は「1」である
から第1式の演算を行なって移動指令Lを求める(ステ
ップSB15,SB16)。 L=i・xj/N=3・x12/4=(3/4)・x12 そして、指標kを「0」とし、指標jを「1」インクリ
メントしてj=13とし、(ステップSB18,SB1
9)、さらに指標iを「1」インクリメントして「4」
とする(ステップSB26)。その結果ステップSB2
7で指標iがN=4以上であることが判断されるから、
ステップSB28に移行して、フラグBINACDC が「1」
で「2」ではないからステップS31へ進み、フラグBI
NACDC 、BINADST を共に「0」とし、前述したステップ
SB34,S18の処理を行ない上記求めた移動指令L
をサーボモータの軸制御回路30〜32に出力する。
In the next cycle, steps S1, S3, S
4, S7, S8, S9, S14, S15, SB1, SB
2, SB5 and SB6 are performed, and in step SB6, temp = Nik = 4-3-1 = 0 is obtained, and temp = Nik = 4-3-1 = 0.
Since it is 0, the process proceeds to step SB14, where xj = x12 is read from the memory. Since the flag BINACDC is "1", the operation of the first expression is performed to obtain the movement command L (steps SB15 and SB16). L = i · xj / N = 3 · x12 / 4 = (3/4) · x12 Then, the index k is set to “0”, the index j is incremented by “1” to j = 13, and (step SB18, SB1
9) Further, the index i is incremented by “1” to “4”
(Step SB26). As a result, step SB2
7, it is determined that the index i is N = 4 or more.
Proceed to step SB28 to set the flag BINACDC to "1".
Is not "2", the process proceeds to step S31, and the flag BI
NACDC and BINADST are both set to “0”, and the processing of steps SB34 and S18 described above is performed to execute the movement command L obtained above.
Is output to the axis control circuits 30 to 32 of the servomotor.

【0051】次の周期からは、ステップS1,S3,S
4,S7,S8,S9と進み、フラグBINACDC は「0」
で、「1」でも「3」でもないので、ステップS17の
バイナリ分配処理に進み、バイナリ分配処理では、フラ
グBINACDC が「0」であるからステップSB1からステ
ップSB24に進んで、指標j(=13)で示される移
動指令xj(=x13)をメモリから読みだし移動指令L
とし、かつ該指標jを「1」インクリメントし(ステッ
プSB25)、指標jの値がバイナリデータの数P以上
になったかを判断し(ステップSB34)、P以上でな
ければ、上記移動指令L=xjをサーボモータの軸制御
回路30〜32に出力する(ステップS18)。以下こ
の処理を各周期毎繰り返すことになる。その結果、加速
処理を終えたx13から順次各周期毎、x14、x15…とサ
ーボモータに移動指令が出力される通常のバイナリ運転
の処理がなされる。
From the next cycle, steps S1, S3, S
Advance to 4, S7, S8, S9, flag BINACDC is "0"
Since neither "1" nor "3", the process proceeds to the binary distribution process of step S17. In the binary distribution process, since the flag BINACDC is "0", the process proceeds from step SB1 to step SB24, and the index j (= 13) ) Is read out from the memory and the movement command xj (= x13) is read out.
And the index j is incremented by "1" (step SB25), and it is determined whether or not the value of the index j is equal to or more than the number P of binary data (step SB34). xj is output to the servo motor axis control circuits 30 to 32 (step S18). Hereinafter, this processing is repeated for each cycle. As a result, a normal binary operation process in which a movement command is output to the servo motor in the order of x13, x15,.

【0052】その結果、図6(c)に示すように、加速
開始の1周期目に「b」、2周期目に「b+c」、3周
期目に「3c」が出力され、減速処理によって残ってい
た移動指令x11の半分(2b)と次の周期の移動指令x
12(=4c)によって加速処理が行なわれ、加速が完了
した段階で次の移動指令x13以降が順次出力されること
になる。
As a result, as shown in FIG. 6C, "b" is output in the first cycle of the acceleration start, "b + c" in the second cycle, and "3c" in the third cycle. Half (2b) of the movement command x11 that was used and the movement command x in the next cycle
Acceleration processing is performed by 12 (= 4c), and when the acceleration is completed, the next movement command x13 and thereafter are sequentially output.

【0053】そして、ステップSB34でj≧Pとなり
バイナリ運転が終了すると、フラグBINPREP を「0」に
セットする。その結果、次の周期からは、ステップS
1,S3,S19,S18と処理され通常の処理の運転
となる。
Then, when j ≧ P in step SB34 and the binary operation ends, the flag BINPREP is set to “0”. As a result, from the next cycle, step S
The processing is performed in the order of 1, S3, S19, and S18, and the operation of the normal processing is performed.

【0054】指標jが「10」で、移動指令x11を出力
しようとするときにフィードホールド信号が発生し、減
速し停止した後、フィードホールド信号が解除され加速
してバイナリ運転が再開されるときの指標、移動指令等
の変化状態を、加減速時間を規定するNが「4」のとき
を表1に、N=5のときを表2に示す。なお、非常停
止、リセット信号による停止の場合は、上記減速停止の
みの指標、移動指令等の変化状態となる。
When the index j is "10" and a movement command x11 is to be output, a feed hold signal is generated, and after deceleration and stop, the feed hold signal is released and accelerated to resume binary operation. Table 1 shows the change state of the index, the movement command, and the like when N, which defines the acceleration / deceleration time, is "4", and Table 2 when N = 5. In the case of an emergency stop or a stop due to a reset signal, the index of only the above-described deceleration stop, a movement command, and the like are changed.

【0055】なお、上記加減速時間として設定する分配
周期の数Nを2の累乗2として設定すれば、分配周期
毎の移動指令xjをこの数Nで割る第1〜第3式の演算
を行なうステップSB11,SB12,SB16,SB
17,SB21の処理が簡単となる。すなわち、移動指
令xjはバイナリデータとして記憶されているから、こ
の移動指令xjをレジスタに格納し、下位方向にn回シ
フトすれば、移動指令xjはNで割られたことになり、
割り算が、レジスタのシフト処理だけですみ処理が簡単
になる。
If the number N of the distribution cycles set as the acceleration / deceleration time is set as a power of 2 2n , the calculations of the first to third equations for dividing the movement command xj for each distribution cycle by this number N are performed. Steps SB11, SB12, SB16, SB
17, SB21 processing is simplified. That is, since the movement command xj is stored as binary data, if the movement command xj is stored in the register and shifted n times in the lower direction, the movement command xj is divided by N.
The division can be performed simply by shifting the register.

【0056】[0056]

【表1】 [Table 1]

【0057】[0057]

【表2】 [Table 2]

【0058】[0058]

【発明の効果】本発明は、バイナリ運転を行なっている
ときに、運転途中で停止しても、減速処理して停止させ
るから、機械に大きなショックを発生させない。また、
この運転途中で中断した運転を再開する際も加速処理し
て駆動するから、運転再開時にも機械に大きなショック
を発生させない。さらに、加減速処理に伴う経路誤差も
小さくすることができる。
According to the present invention, even if the operation is stopped during the binary operation, the machine is decelerated and stopped, so that no large shock is generated in the machine. Also,
Even when restarting the operation interrupted during the operation, the machine is driven by acceleration processing, so that a large shock is not generated in the machine even when the operation is restarted. Further, a path error associated with the acceleration / deceleration processing can be reduced.

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

【図1】本発明を適用した一実施形態のCNC制御装置
のブロック図である。
FIG. 1 is a block diagram of a CNC control device according to an embodiment to which the present invention is applied.

【図2】同実施形態におけるプロセッサが実行する分配
周期毎の処理のフローチャートである。
FIG. 2 is a flowchart of a process for each distribution cycle executed by a processor in the embodiment.

【図3】図2におけるフローチャートにおけるバイナリ
分配処理のフローチャートである。
FIG. 3 is a flowchart of a binary distribution process in the flowchart in FIG. 2;

【図4】図2の続きのフローチャートである。FIG. 4 is a flowchart continued from FIG. 2;

【図5】本発明の加減速処理の一例の説明図である。FIG. 5 is a diagram illustrating an example of an acceleration / deceleration process according to the present invention.

【図6】本発明の一実施形態における加減速処理の一例
の説明図である。
FIG. 6 is a diagram illustrating an example of an acceleration / deceleration process according to an embodiment of the present invention.

【図7】バイナリ運転に対して本発明の加減速処理を行
なったときの指令経路と実際の経路の説明図である。
FIG. 7 is an explanatory diagram of a command path and an actual path when the acceleration / deceleration processing of the present invention is performed for binary operation.

【符号の説明】[Explanation of symbols]

10 数値制御装置(CNC装置) 11 プロセッサ 10 Numerical control unit (CNC device) 11 Processor

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 複数の制御軸を制御するモーションコン
トローラであって、分配周期毎の各軸への移動指令を予
め直接各軸に指令できるバイナリデータとして登録し
て、該バイナリデータによって機械を駆動制御するバイ
ナリ運転におけるモーションコントローラのモーション
制御方法において、予め加減速時間を移動指令の分配周
期の数で設定しておき、バイナリ運転途中で運転停止信
号が生じると、上記加減速時間として設定した分配周期
の数でバイナリデータとして記憶している各分配周期毎
の移動指令を分割し、分配周期毎分割した1個の移動指
令だけ順次少なくなるように、運転停止信号が発生した
移動指令の分から移動指令として出力し減速するモーシ
ョンコントローラのモーション制御方法。
1. A motion controller for controlling a plurality of control axes, wherein a movement command to each axis for each distribution cycle is registered in advance as binary data capable of directly instructing each axis, and a machine is driven by the binary data. In the motion control method of the motion controller in the binary operation to be controlled, the acceleration / deceleration time is set in advance by the number of distribution cycles of the movement command, and when the operation stop signal is generated during the binary operation, the distribution set as the acceleration / deceleration time is set. The movement command for each distribution cycle stored as binary data is divided according to the number of cycles, and movement is performed from the movement command at which the operation stop signal is generated so that the number of movement commands divided by each distribution cycle is sequentially reduced by one. Motion control method of a motion controller that outputs as a command and decelerates.
【請求項2】 一時停止した後、運転を再開する際に
は、上記分割した移動指令の次の1個の分割移動指令か
ら、分配周期毎順次分割移動量単位で1個ずつ加算して
移動指令として出力し加速する請求項1記載のモーショ
ンコントローラのモーション制御方法。
2. When the operation is resumed after the suspension, the moving is performed by adding one by one in units of divided movement amount in each distribution cycle from one divided movement command following the divided movement command. 2. The motion control method for a motion controller according to claim 1, wherein the motion is output as a command and accelerated.
【請求項3】 上記加減速時間として設定した分配周期
の数は2の累乗である請求項1又は請求項2記載のモー
ションコントローラのモーション制御方法。
3. The motion control method according to claim 1, wherein the number of distribution cycles set as the acceleration / deceleration time is a power of two.
JP9029858A 1997-01-30 1997-01-30 Motion control method of motion controller Expired - Fee Related JP3040958B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9029858A JP3040958B2 (en) 1997-01-30 1997-01-30 Motion control method of motion controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9029858A JP3040958B2 (en) 1997-01-30 1997-01-30 Motion control method of motion controller

Publications (2)

Publication Number Publication Date
JPH10214108A true JPH10214108A (en) 1998-08-11
JP3040958B2 JP3040958B2 (en) 2000-05-15

Family

ID=12287675

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9029858A Expired - Fee Related JP3040958B2 (en) 1997-01-30 1997-01-30 Motion control method of motion controller

Country Status (1)

Country Link
JP (1) JP3040958B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480760B1 (en) 2000-03-15 2002-11-12 Kawasaki Jukogyo Kabushiki Kaisha Robot restarting method
JP2007537521A (en) * 2004-05-13 2007-12-20 シーメンス アクチエンゲゼルシヤフト Data medium containing a control file for a machine controller stored in the data medium, and associated method and apparatus
US9823644B2 (en) 2012-07-17 2017-11-21 Mitsubishi Electric Corporation Numerical control device and numerical control system
CN113805531A (en) * 2021-09-22 2021-12-17 吉林省齐智科技有限公司 Full-automatic unattended early warning method for numerical control machine tool

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480760B1 (en) 2000-03-15 2002-11-12 Kawasaki Jukogyo Kabushiki Kaisha Robot restarting method
JP2007537521A (en) * 2004-05-13 2007-12-20 シーメンス アクチエンゲゼルシヤフト Data medium containing a control file for a machine controller stored in the data medium, and associated method and apparatus
US9823644B2 (en) 2012-07-17 2017-11-21 Mitsubishi Electric Corporation Numerical control device and numerical control system
CN113805531A (en) * 2021-09-22 2021-12-17 吉林省齐智科技有限公司 Full-automatic unattended early warning method for numerical control machine tool

Also Published As

Publication number Publication date
JP3040958B2 (en) 2000-05-15

Similar Documents

Publication Publication Date Title
JP3671020B2 (en) Numerical controller
US9310799B2 (en) Numerical controller having function of operation based on table format data
EP0230471B1 (en) Manual operation system for machine controlled by numerical control unit
CN111123841B (en) Numerical controller
JP3040958B2 (en) Motion control method of motion controller
JP2006004275A (en) Numerical control device
JP2007245247A (en) Machine having program validation function
CN105320075B (en) The numerical control device of speed controlling function with Overlapped control
JPH11143519A (en) Acceleration-deceleration control method for numerical control, and numerical controller
JP2006172388A (en) Numerical controller
JPH06222819A (en) Machining program executing method for nc device
US10048677B2 (en) Numerical controller that shortens cycle time of machining program
JP4116640B2 (en) Numerical control device with multi-system control function
JP2008269483A (en) Numerical controller
JPH02220107A (en) Test operation control system
EP0930554A1 (en) Method of conversion of robot teaching program
JP2004086306A (en) Multiple system numerical controller
JPH10301614A (en) Numeric controller
JP2544654B2 (en) Injection control method of electric injection molding machine
JP6997131B2 (en) Numerical control device
JP2008130013A (en) Numerical control device
JP2868527B2 (en) Numerical control unit
JPH0969007A (en) Multi-robot reproduction control system
JPH03166602A (en) Dividing system for ladder program
WO1991003008A1 (en) System for controlling program of pc

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20000215

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20080303

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090303

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees