JP2016207169A - Motion control system - Google Patents

Motion control system Download PDF

Info

Publication number
JP2016207169A
JP2016207169A JP2015092046A JP2015092046A JP2016207169A JP 2016207169 A JP2016207169 A JP 2016207169A JP 2015092046 A JP2015092046 A JP 2015092046A JP 2015092046 A JP2015092046 A JP 2015092046A JP 2016207169 A JP2016207169 A JP 2016207169A
Authority
JP
Japan
Prior art keywords
axis
control
ram
data
unit
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
JP2015092046A
Other languages
Japanese (ja)
Inventor
康生 富野
Yasuo Tomino
康生 富野
厚 吉山
Atsushi Yoshiyama
厚 吉山
吉田 均
Hitoshi Yoshida
均 吉田
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.)
MELEC CC
Original Assignee
MELEC CC
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 MELEC CC filed Critical MELEC CC
Priority to JP2015092046A priority Critical patent/JP2016207169A/en
Publication of JP2016207169A publication Critical patent/JP2016207169A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a motion control system that reduces the number of times of communication between a control host and a slave and thereby can reduce labor and expense for minor change.SOLUTION: A motion control system of the present invention includes: a controller unit 21; a control host comprising a control program; and a communication interface unit for performing communication between the control host and the controller unit 21. The controller unit 21 includes: a CPU 22 for transforming an execution instruction; axis control logic circuits 31 and 32 for generating a command pulse according to the execution instruction; and a ROM 24. The ROM holds macro data. The axis control logic circuits 31 and 32 comprise: RAMs 36a, 36b, 36c and 36d capable of writing therein macro data; and a RAM interface function for automatically executing the execution instruction according to the macro data in the RAMs 36a, 36b, 36c and 36d.SELECTED DRAWING: Figure 2

Description

本発明は、制御ホストとコントローラユニットとの間で通信が行われるモーションコントロールシステムに関する。   The present invention relates to a motion control system in which communication is performed between a control host and a controller unit.

モーションコントロールシステムは、工作機械や組み立て機械のような産業用機械装置や様々な検査装置などにおいて、モータやセンサ等の動作(モーション)を制御する技術として幅広く用いられている。通常、1つの機械装置には、サーボモータやステッピングモータ等の数多くのパルス駆動モータが用いられており、それぞれのモータの動作をモーションコントロールシステムで制御することにより、位置決め動作や複数軸の同期動作などの様々な動作を円滑に行うことが可能となる。また、モーションコントロールシステムを利用することにより、サーボ制御や、センサ等のI/O制御などを一元的に管理できる。   The motion control system is widely used as a technology for controlling operations (motion) of motors, sensors, etc. in industrial machine devices such as machine tools and assembly machines, various inspection devices, and the like. Normally, a single mechanical device uses a large number of pulse drive motors such as servo motors and stepping motors. By controlling the operation of each motor with a motion control system, positioning operations and multiple axis synchronous operations are performed. Various operations such as these can be performed smoothly. Further, by using the motion control system, servo control, I / O control of sensors, etc. can be managed in an integrated manner.

モーションコントロールシステムでは、一般的に、複数のパルス駆動モータを駆動させるコントローラユニットを有するスレーブや、センサ等の入出力を行うI/Oユニットのようなスレーブと、これらのスレーブの上位に配され、各スレーブの操作や制御を行う制御ホストとが、通信インターフェイスユニットを介して、相互に信号を送受信することが可能に接続されている。   In the motion control system, generally, a slave having a controller unit that drives a plurality of pulse drive motors, a slave such as an I / O unit that performs input / output of sensors, and the like are arranged above these slaves. A control host that operates and controls each slave is connected to be able to transmit and receive signals to and from each other via a communication interface unit.

制御ホストは、例えばPC(パーソナルコンピュータ)やPLC(プログラマブルロジックコントローラ)等により形成されており、C#等の様々な開発言語を用いて構築される制御プログラムと、スレーブとの間で通信を行うためのソフトウェアモジュールとなるデバイスドライバとを有する。   The control host is formed by, for example, a PC (personal computer), a PLC (programmable logic controller), and the like, and communicates between a control program constructed using various development languages such as C # and a slave. A device driver serving as a software module.

このような制御ホストでは、制御プログラムにてスレーブの操作や制御を行うための関数が実行され、また、デバイスドライバにてその実行された関数に基づいてリクエスト信号が1回又は複数回送信される。また一方、リクエスト信号を受信したスレーブでは、そのリクエスト信号に対する応答として、実行結果等のアンサーバック信号が制御ホストに向けて送信され、制御ホストでは、そのアンサーバック信号をデバイスドライバで受信して解析することによって、関数の実行結果が制御プログラムに戻される。   In such a control host, a function for operating and controlling the slave is executed by the control program, and a request signal is transmitted once or a plurality of times based on the executed function by the device driver. . On the other hand, in the slave that has received the request signal, an answerback signal such as an execution result is transmitted to the control host as a response to the request signal, and the control host receives the answerback signal by the device driver and analyzes it. By doing so, the execution result of the function is returned to the control program.

また、例えばパルス駆動モータを駆動させるスレーブには、コントローラユニットと1つ又は複数のドライバユニットとが配されているとともに、各ドライバユニットにパルス駆動モータがそれぞれ接続されている。なお、パルス駆動モータを駆動させるスレーブとしては、コントローラユニットとドライバユニットとがそれぞれ別々のユニットとして配されるスレーブだけでなく、コントローラ機能とドライバ機能とを一体的に備えるコントローラドライバユニットを備えるスレーブも知られている。   For example, a slave that drives a pulse drive motor is provided with a controller unit and one or a plurality of driver units, and a pulse drive motor is connected to each driver unit. The slave that drives the pulse drive motor is not only a slave in which the controller unit and the driver unit are arranged as separate units, but also a slave that includes a controller driver unit that integrally has a controller function and a driver function. Are known.

スレーブのコントローラユニットは、制御ホストからのリクエスト信号を受信するとともに、そのリクエスト信号に従ってドライバユニットに対して所定の指令パルスを出力する機能を備える。また、ドライバユニットは、その入力された指令パルスに従ってモータの励磁コイルに駆動電流を流す機能を備えており、この駆動電流をモータの励磁コイルに流すことにより、モータを円滑に回転駆動させることができる。   The slave controller unit has a function of receiving a request signal from the control host and outputting a predetermined command pulse to the driver unit in accordance with the request signal. The driver unit also has a function of flowing a drive current to the motor excitation coil in accordance with the input command pulse. By flowing this drive current to the motor excitation coil, the motor can be rotated smoothly. it can.

従って、通常のモーションコントロールシステムでは、制御ホストの制御プログラムで関数を実行することにより、制御ホストとモータを駆動させるスレーブとの間で相互に信号の送受信がその都度行われ、更に、スレーブのコントローラユニット及びドライバユニットが、制御ホストからのリクエスト信号に従って上述のような処理をそれぞれ行うことによって、パルス駆動モータの駆動が制御される。   Therefore, in a normal motion control system, a function is executed by the control program of the control host, so that signals are transmitted and received between the control host and the slave that drives the motor each time. The unit and the driver unit perform the processing as described above according to the request signal from the control host, thereby controlling the driving of the pulse drive motor.

ここで、パルス駆動モータを駆動させるスレーブに用いられるコントローラユニットとして、X軸、Y軸、Z軸及びA軸の4軸のパルス駆動モータを駆動させる4軸コントローラユニットを、図11を参照しながら簡単に説明する。   Here, as a controller unit used for a slave for driving a pulse drive motor, a 4-axis controller unit for driving a 4-axis pulse drive motor of X axis, Y axis, Z axis, and A axis will be described with reference to FIG. Briefly described.

図11に示したコントローラユニット81は、様々な処理を行うCPU82と、リクエスト信号の受信及びアンサーバック信号の送信を行う通信制御部83と、CPU82で変換される実行命令に従って指令パルスを発生させる第1及び第2軸制御ロジック回路91,92(第1及び第2パルスジェネレータとも言う)と、第1〜第4ドライバユニット99a〜99dに対して指令パルスの信号を出力する外部機器インターフェイス回路85とを有する。また、コントローラユニット81におけるCPU82、通信制御部83、並びに第1及び第2軸制御ロジック回路91,92は、バス86によって相互に接続されている。   The controller unit 81 shown in FIG. 11 generates a command pulse in accordance with a CPU 82 that performs various processes, a communication control unit 83 that receives a request signal and transmits an answerback signal, and an execution command that is converted by the CPU 82. A first and second axis control logic circuits 91 and 92 (also referred to as first and second pulse generators), an external device interface circuit 85 that outputs a command pulse signal to the first to fourth driver units 99a to 99d; Have The CPU 82, the communication control unit 83, and the first and second axis control logic circuits 91 and 92 in the controller unit 81 are connected to each other by a bus 86.

このコントローラユニット81の通信制御部83は、通信インターフェイス回路87を介して、制御ホストとコントローラユニット81の間に配される通信インターフェイスユニットに接続されており、コントローラユニット81の通信インターフェイス回路87と、通信インターフェイスユニットとの間でシリアル通信が行われる。   The communication control unit 83 of the controller unit 81 is connected to a communication interface unit disposed between the control host and the controller unit 81 via a communication interface circuit 87. The communication interface circuit 87 of the controller unit 81, Serial communication is performed with the communication interface unit.

図11に示した第1軸制御ロジック回路91は、2つの第1及び第2ドライバユニット99a,99bに対して指令パルスを出力することが可能な2軸用の軸制御ロジック回路として形成されており、第2軸制御ロジック回路92も、2つの第3及び第4ドライバユニット99c,99dに対して指令パルスを出力することが可能な2軸用の軸制御ロジック回路として形成されている。   The first axis control logic circuit 91 shown in FIG. 11 is formed as an axis control logic circuit for two axes capable of outputting command pulses to the two first and second driver units 99a and 99b. The second axis control logic circuit 92 is also formed as a two-axis axis control logic circuit capable of outputting command pulses to the two third and fourth driver units 99c and 99d.

この場合、第1軸制御ロジック回路91は、CPU82で変換された実行命令を解析する第1命令解析部93と、解析された実行命令に従ってX軸(第1軸)の第1ドライバユニット99aに対する指令パルスを発生させるとともにその指令パルスのカウントを行う第1軸制御部(X軸制御部)95aと、解析された実行命令に従ってY軸(第2軸)の第2ドライバユニット99bに対する指令パルスを発生させるとともにその指令パルスのカウントを行う第2軸制御部(Y軸制御部)95bとを有する。   In this case, the first axis control logic circuit 91 applies the first instruction analysis unit 93 that analyzes the execution instruction converted by the CPU 82 and the first driver unit 99a for the X axis (first axis) according to the analyzed execution instruction. A first axis control unit (X axis control unit) 95a that generates a command pulse and counts the command pulse, and a command pulse for the second driver unit 99b of the Y axis (second axis) according to the analyzed execution command And a second axis control unit (Y axis control unit) 95b that generates and counts the command pulses.

また、第2軸制御ロジック回路92も、第1軸制御ロジック回路91と同様に、第2命令解析部94と、Z軸(第3軸)の第3ドライバユニット99cに対する指令パルスを発生させるとともにその指令パルスのカウントを行う第3軸制御部(Z軸制御部)95cと、A軸(第4軸)の第4ドライバユニット99dに対する指令パルスを発生させるとともにその指令パルスのカウントを行う第4軸制御部(A軸制御部)95dとを有する。   Similarly to the first axis control logic circuit 91, the second axis control logic circuit 92 generates command pulses for the second command analysis unit 94 and the third driver unit 99c for the Z axis (third axis). A command pulse is generated for the third axis control unit (Z-axis control unit) 95c that counts the command pulse and a fourth driver unit 99d for the A axis (fourth axis) and the command pulse is counted. An axis controller (A-axis controller) 95d.

更に、第1及び第2軸制御ロジック回路91,92の各軸制御部95a〜95dで発生させる指令パルスの信号は、外部機器インターフェイス回路85を介して、X軸、Y軸、Z軸及びA軸のそれぞれ対応する第1〜第4ドライバユニット99a〜99dに出力される。また、例えばパルス駆動モータがサーボモータである場合は、図示しないエンコーダで検知される回転角や回転速度等の情報がフィードバック信号として、各ドライバユニット99a〜99dから外部機器インターフェイス回路85を介して対応する軸制御部に戻される。   Further, command pulse signals generated by the axis control units 95a to 95d of the first and second axis control logic circuits 91 and 92 are transmitted via the external device interface circuit 85 to the X axis, Y axis, Z axis, and A. It is output to the first to fourth driver units 99a to 99d corresponding to the axes. For example, when the pulse drive motor is a servo motor, information such as a rotation angle and a rotation speed detected by an encoder (not shown) is handled as a feedback signal from each driver unit 99a to 99d via the external device interface circuit 85. Is returned to the axis controller.

上述のような構成を有する図11のコントローラユニット81では、パルス駆動モータを駆動させるためのリクエスト信号が制御ホストから通信インターフェイスユニットを介して送信されると、そのリクエスト信号を通信制御部83で受信し、更に、CPU82において、リクエスト信号の判別を行うとともに、リクエスト信号をコマンドとデータからなる実行命令に変換する処理が行われる。   In the controller unit 81 of FIG. 11 having the above-described configuration, when a request signal for driving the pulse drive motor is transmitted from the control host via the communication interface unit, the request signal is received by the communication control unit 83. Further, the CPU 82 performs a process of determining the request signal and converting the request signal into an execution instruction including a command and data.

次に、CPU82は、変換した実行命令を第1及び第2軸制御ロジック回路91,92に送り、その実行命令を各軸制御部95a〜95d(例えば各軸制御部のレジスタ)に書き込む処理を行う。このとき、第1及び第2軸制御ロジック回路91,92では、第1及び第2命令解析部93,94で実行命令が解析されるとともに、その実行命令がCPU82によって各軸制御部95a〜95dに順次書き込まれるため、各軸制御部95a〜95dは、書き込まれた実行命令を実行することによって、その命令に従って指令パルスを各ドライバユニット99a〜99dに向けて出力することができる。   Next, the CPU 82 sends the converted execution instruction to the first and second axis control logic circuits 91 and 92, and writes the execution instruction into the axis control units 95a to 95d (for example, registers of the axis control units). Do. At this time, in the first and second axis control logic circuits 91 and 92, the first and second instruction analysis units 93 and 94 analyze the execution instruction, and the execution instruction is received by the CPU 82 from the axis control units 95a to 95d. Therefore, each axis control unit 95a to 95d can output a command pulse to each of the driver units 99a to 99d according to the executed instruction by executing the written execution instruction.

このようなパルス駆動モータに用いられるコントローラユニットに関する発明が、例えば特開平8−272410号公報(特許文献1)、特開平8−320719号公報(特許文献2)、及び特開2004−282972号公報(特許文献3)等に開示されている。   For example, Japanese Patent Application Laid-Open No. 8-272410 (Patent Document 1), Japanese Patent Application Laid-Open No. 8-320719 (Patent Document 2), and Japanese Patent Application Laid-Open No. 2004-282972 are related to a controller unit used in such a pulse drive motor. (Patent Document 3) and the like.

例えば特許文献1に記載されているコントローラユニットでは、複数の軸制御ロジック回路(特許文献1では「IC」と称する)がバスを介してCPUに接続されており、各軸制御ロジック回路(IC)には、動作を指定するコマンドデータを一時記憶するためのレジスタと、同期スタート端子とが設けられている。また、各軸制御ロジック回路の同期スタート端子同士が相互に接続されている。   For example, in the controller unit described in Patent Document 1, a plurality of axis control logic circuits (referred to as “IC” in Patent Document 1) are connected to a CPU via a bus, and each axis control logic circuit (IC) Are provided with a register for temporarily storing command data for designating an operation and a synchronous start terminal. Further, the synchronous start terminals of the respective axis control logic circuits are connected to each other.

特許文献1によれば、コントローラユニットが上述のような構成を有することにより、各軸制御ロジック回路が、通常スタートコマンド又は同期スタートコマンドの受信に応答してスタートすることができるため、各軸制御ロジック回路の独立動作制御が可能となるだけでなく、同期、同時動作制御も可能となるとしている。   According to Patent Document 1, each axis control logic circuit can start in response to reception of a normal start command or a synchronous start command because the controller unit has the above-described configuration. Not only can independent operation control of the logic circuit be possible, but synchronization and simultaneous operation control are also possible.

また特許文献2では、コントローラユニットの軸制御ロジック回路(特許文献2では「パルス発生回路」と称する)に、次動作用データ領域としてのプリレジスタ(プリバッファ)が設けられている。特許文献2によれば、軸制御ロジック回路がプリレジスタを備えることにより、軸制御ロジック回路の動作時に、次回分の動作用データをプリレジスタに書き込むことができるため、高速動作が可能となるとしている。   In Patent Document 2, a pre-register (prebuffer) as a data area for the next operation is provided in the axis control logic circuit of the controller unit (referred to as “pulse generation circuit” in Patent Document 2). According to Patent Document 2, since the axis control logic circuit includes a pre-register, operation data for the next time can be written to the pre-register during operation of the axis control logic circuit, so that high-speed operation is possible. Yes.

特許文献3に記載されているコントローラユニットは、CPUインターフェイス部と、軸制御ロジック回路(特許文献3では「パルス発生IC」と称する)と、レジスタ部とを有しており、レジスタ部は、モータ動作パラメータを保持する各種のレジスタを備えるとともに、次動作のデータ及び次々動作のデータをそれぞれ書き込むことが可能な第1プリレジスタ及び第2プリレジスタを備える。   The controller unit described in Patent Document 3 includes a CPU interface unit, an axis control logic circuit (referred to as “pulse generation IC” in Patent Document 3), and a register unit. In addition to various registers for holding operation parameters, a first pre-register and a second pre-register capable of writing data for the next operation and data for the next operation are provided.

また、特許文献3では、軸制御ロジック回路が行う位置決め動作の動作パターンとして、モータを目標位置まで定速駆動させる第1速度パターンと、モータを加速スタート後に定速駆動し、更に減速停止させる第2速度パターンと、定速スタート後に減速停止させる第3速度パターンとが用意されている。   In Patent Document 3, as an operation pattern of the positioning operation performed by the axis control logic circuit, a first speed pattern for driving the motor to a target position at a constant speed, a first speed pattern for driving the motor at a constant speed after starting acceleration, and further decelerating and stopping. A two-speed pattern and a third speed pattern for decelerating and stopping after a constant speed start are prepared.

特許文献3によれば、上述のような3種類の速度パターンを備えることにより、指定された速度パターンでパルス駆動モータを位置決め動作させるとともに、スムーズな連続位置決め動作を実行することができるため、動作パターンが高速で行われてもモータへの負荷を軽減し、耐久性を高めることができるとしている。   According to Patent Document 3, since the three types of speed patterns as described above are provided, the pulse drive motor can be positioned with a specified speed pattern and a smooth continuous positioning operation can be performed. Even if the pattern is performed at high speed, the load on the motor can be reduced and the durability can be improved.

特開平8−272410号公報JP-A-8-272410 特開平8−320719号公報JP-A-8-320719 特開2004−282972号公報JP 2004-282972 A

しかし、従来のモーションコントロールシステムにおいては、全てのスレーブの操作や制御が1つの制御ホストで管理されており、パルス駆動モータ等を備えるスレーブに所望の動作を行わせるために、制御ホストの制御プログラムに、スレーブのコントローラユニットに命令を実行させるための全ての関数を持たせる必要があった。   However, in the conventional motion control system, the operation and control of all the slaves are managed by a single control host, and the control program of the control host is used to cause the slave equipped with a pulse drive motor or the like to perform a desired operation. In addition, it is necessary to have all functions for causing the slave controller unit to execute instructions.

このため、複数のスレーブの動作を制御するモーションコントロールシステムでは、制御ホストにおける制御プログラムの構築が複雑になり、また、制御ホストが制御プログラムで関数を実行するときの負担が大きくなることから、制御ホストの処理が遅くなるという問題があった。   For this reason, in a motion control system that controls the operation of multiple slaves, the construction of a control program on the control host is complicated, and the burden on the control host to execute functions in the control program increases. There was a problem that processing of the host became slow.

更に、スレーブが有するパルス駆動モータに所定の動作を行わせるためには、制御ホストの制御プログラムで、その動作を規定するための複数の関数を実行しなければならず、また、1つの関数が実行される毎に制御ホストとスレーブとの間で1回以上の通信を行う必要があった。このため、制御ホストとスレーブとの間での通信回数が必然的に多くなり、制御ホストへの負担がより一層増大する傾向にあった。   Furthermore, in order for the pulse drive motor of the slave to perform a predetermined operation, a control program of the control host must execute a plurality of functions for defining the operation, and one function is It was necessary to perform one or more communications between the control host and the slave each time it was executed. For this reason, the number of communication between the control host and the slave inevitably increases, and the burden on the control host tends to increase further.

特に、制御ホストがPCで形成されるモーションコントロールシステムにおいて、スレーブのセンサ等から得られる情報を用いてPCで画像処理や計測等を行う場合には、PCのCPUに対する負担が更に増大するため、モーションコントロールに関するPCの負担を軽減することや、モーションコントロールに用いる制御プログラムをよりシンプルに構築すること等が要求されている。   In particular, in a motion control system in which a control host is formed by a PC, when image processing or measurement is performed by a PC using information obtained from a slave sensor or the like, the burden on the CPU of the PC further increases. It is required to reduce the burden on the PC related to motion control and to construct a control program used for motion control more simply.

その上、従来のモーションコントロールシステムでは、制御ホストとスレーブとの間で行う通信の通信回数が多くなり、パルス駆動モータの数が多くなったり、パルス駆動モータの動作が複雑になったりするほど、両者間の通信回数も増大する。しかし、制御ホストとスレーブとの間の通信回数が増大すると、制御ホストのPCのCPUの性能、制御ホストとスレーブとの間の通信速度、スレーブ(特に、コントローラユニット)の内部処理時間等の影響によって、システムにおける実行処理時間が制約されてしまい、また、PCのCPUの性能によりモーションコントロールの処理時間にバラつきや誤差を生じさせることがあった。このため、従来のモーションコントロールシステムでは、リアルタイム性の向上や複数軸の同期精度の向上に限界がある。更に、システムの高速化を図ることが難しいことから、機械装置の性能向上を妨げる要因となっていた。   In addition, in the conventional motion control system, the number of communications performed between the control host and the slave increases, and the number of pulse drive motors increases or the operation of the pulse drive motors becomes more complex. The number of communications between the two also increases. However, if the number of communications between the control host and slave increases, the CPU performance of the control host PC, the communication speed between the control host and slave, the internal processing time of the slave (especially the controller unit), etc. As a result, the execution processing time in the system is restricted, and the performance of the motion control may vary depending on the performance of the CPU of the PC. For this reason, the conventional motion control system has limitations in improving the real time property and the synchronization accuracy of a plurality of axes. Furthermore, since it is difficult to increase the speed of the system, it has been a factor that hinders the performance improvement of mechanical devices.

また一般に、大きな機械装置のシステムを一から開発することは、数年に一度の割合であって多くはなく、実際の現場では、一度構築された装置システムに対して、ユーザーから要求された仕様に合わせるように、モーションの一部変更や軸の追加等のマイナーチェンジを行うことが多い。このようなマイナーチェンジを行う場合には、スレーブの動作を制御する制御ホストの制御プログラムを変更することが必要になる。   Also, in general, developing a large mechanical system from scratch is not often done once every few years. In the actual field, the specifications required by the user for the equipment system once constructed. In many cases, minor changes such as partial change of motion and addition of axes are made to match the above. When such a minor change is performed, it is necessary to change the control program of the control host that controls the operation of the slave.

しかし、モーションコントロールシステムにおいて、制御ホストの制御プログラムを一部でも変更する場合、その制御プログラムの変更部分が正常に動作するかを確認するだけでなく、その変更に伴う他のモーションの制御に対する影響の検証やデバック等を、制御プログラムの全体に対して行うことが必要となる。このため、従来のモーションコントロールシステムでは、一部分のモーションの変更のみであっても、多大な労力、費用、時間を要するとともに、大きなリスクも伴うものであった。   However, in the motion control system, when even a part of the control program of the control host is changed, not only whether the changed part of the control program operates normally but also the effect on the control of other motions due to the change. It is necessary to perform verification, debugging, etc. on the entire control program. For this reason, in the conventional motion control system, even if only a part of the motion is changed, a great amount of labor, cost, and time are required, and there is a great risk.

本発明は上記従来の課題に鑑みてなされたものであって、その目的は、制御ホストの制御プログラムをシンプルに構築して制御ホストに対する負担を低減するとともに、制御ホストとスレーブとの間での通信回数を減少させることが可能で、且つ、装置のモーションをマイナーチェンジする際の労力や費用を低減するとともに変更に伴うリスクを小さくすることが可能なモーションコントロールシステムを提供することにある。   The present invention has been made in view of the above-described conventional problems. The object of the present invention is to simply construct a control host control program to reduce the burden on the control host, and to reduce the burden between the control host and the slave. It is an object of the present invention to provide a motion control system capable of reducing the number of communication times, reducing labor and cost when minor changes are made to the motion of the apparatus, and reducing the risk associated with the change.

上記目的を達成するために、本発明により提供されるモーションコントロールシステムは、基本的な構成として、パルス駆動モータ用の1つ又は複数のモータドライバに対して指令パルスを出力する少なくとも1つのコントローラユニットと、制御プログラムを備える制御ホストと、前記制御ホスト及び前記コントローラユニット間の通信を行う通信インターフェイスユニットとを有し、前記制御ホストが、前記制御プログラムの関数の実行により前記コントローラユニットに対するリクエスト信号を送信し、前記コントローラユニットが、前記リクエスト信号に基づいて前記指令パルスを出力することにより、前記パルス駆動モータの動作制御を行うモーションコントロールシステムであって、前記コントローラユニットは、前記リクエスト信号から実行命令を変換するCPUと、前記実行命令に従って前記指令パルスを発生させる1つ又は複数の軸制御ロジック回路とを有するモーションコントロールシステムにおいて、前記コントローラユニットはROMを有するとともに、前記ROMに、複数の実行命令を予め備える少なくとも1つのマクロデータが保持され、前記軸制御ロジック回路は、前記制御ホストから指定される前記ROM内の前記マクロデータを書き込むことが可能なRAMを備え、且つ、前記制御ホストからの前記リクエスト信号により、前記RAMに書き込まれた前記マクロデータに従って複数の前記実行命令を順番に自動実行するRAMインターフェイス機能を備えてなることを最も主要な特徴とするものである。   In order to achieve the above object, a motion control system provided by the present invention basically has at least one controller unit that outputs a command pulse to one or more motor drivers for a pulse drive motor. A control host having a control program, and a communication interface unit for performing communication between the control host and the controller unit, and the control host sends a request signal to the controller unit by executing a function of the control program. And the controller unit controls the operation of the pulse drive motor by outputting the command pulse based on the request signal. The controller unit includes the request unit. In a motion control system having a CPU that converts an execution command from a signal and one or more axis control logic circuits that generate the command pulse in accordance with the execution command, the controller unit includes a ROM, and the ROM includes: At least one macro data having a plurality of execution instructions in advance is held, the axis control logic circuit includes a RAM capable of writing the macro data in the ROM designated by the control host, and The main feature is that it has a RAM interface function that automatically executes a plurality of execution instructions in order according to the macro data written in the RAM in response to the request signal from the control host.

本発明のモーションコントロールシステムにおいて、前記軸制御ロジック回路は、前記実行命令を解析する命令解析部と、前記指令パルスを発生させる1つ又は複数の軸制御部とを備え、前記RAMは、各軸制御部に1つずつ設けられていることが好ましい。   In the motion control system of the present invention, the axis control logic circuit includes a command analysis unit that analyzes the execution command, and one or more axis control units that generate the command pulse, and the RAM includes each axis It is preferable that the controller is provided one by one.

また、本発明のモーションコントロールシステムにおいて、前記RAMは、前記実行命令をそれぞれ書き込むことが可能な複数のアドレスを有し、前記軸制御ロジック回路は、前記RAMインターフェイス機能により、前記リクエスト信号により指定される所定のアドレスの前記実行命令から前記マクロデータを自動実行可能であることが好ましい。
更に、本発明のモーションコントロールシステムにおいて、前記RAMは、複数の前記マクロデータを書き込むことが可能な容量を有することが好ましい。
In the motion control system of the present invention, the RAM has a plurality of addresses to which the execution instructions can be written, and the axis control logic circuit is designated by the request signal by the RAM interface function. It is preferable that the macro data can be automatically executed from the execution instruction at a predetermined address.
Furthermore, in the motion control system of the present invention, it is preferable that the RAM has a capacity capable of writing a plurality of the macro data.

更にまた、前記ROMは、複数の前記RAMにそれぞれ対応して書き込まれる複数のマクロデータを備えた1枚又は複数枚のシートデータを保持していることが好ましい。   Furthermore, it is preferable that the ROM holds one or a plurality of sheet data including a plurality of macro data written corresponding to the plurality of RAMs.

この場合、前記コントローラユニットは、複数の前記RAMに、前記リクエスト信号により指定される1枚の前記シートデータから、対応する前記マクロデータを展開してそれぞれ書き込むことが可能とされていることが好ましい。また、前記コントローラユニットは、複数の前記RAMに、前記リクエスト信号により指定される2枚以上の前記シートデータから、指定される前記マクロデータを組み合わせてそれぞれ書き込むことが可能とされていても良い。   In this case, it is preferable that the controller unit can develop and write the corresponding macro data from a single sheet of data specified by the request signal into a plurality of the RAMs. . In addition, the controller unit may be capable of writing the specified macro data in combination to the plurality of RAMs from the two or more sheets of data specified by the request signal.

本発明のモーションコントロールシステムにおいて、前記制御ホストは、前記ROMに保持されている前記マクロデータの少なくとも一部を、前記制御プログラム又は専用の書き換えプログラムで書き換えることが可能とされていることが好ましい。
更に、前記制御ホストは、前記RAMに書き込まれた前記マクロデータの少なくとも一部を、前記制御プログラム又は専用の書き換えプログラムで書き換えることが可能とされていることが好ましい。
In the motion control system of the present invention, it is preferable that the control host can rewrite at least a part of the macro data held in the ROM by the control program or a dedicated rewrite program.
Furthermore, it is preferable that the control host can rewrite at least a part of the macro data written in the RAM with the control program or a dedicated rewriting program.

本発明に係るモーションコントロールシステムは、指令パルスを出力する少なくとも1つのコントローラユニットと、制御プログラムを備える制御ホストと、制御ホスト及びコントローラユニット間の通信を行う通信インターフェイスユニットとを有する。また、コントローラユニットは、制御ホストのリクエスト信号から実行命令を変換するCPUと、実行命令に従って指令パルスを発生させる軸制御ロジック回路と、複数の実行命令をマクロ化したマクロデータを保持するROMとを有する。   The motion control system according to the present invention includes at least one controller unit that outputs a command pulse, a control host that includes a control program, and a communication interface unit that performs communication between the control host and the controller unit. In addition, the controller unit includes a CPU that converts an execution command from a request signal of the control host, an axis control logic circuit that generates a command pulse according to the execution command, and a ROM that holds macro data in which a plurality of execution commands are converted into macros. Have.

このような本発明のモーションコントロールシステムによれば、従来のモーションコントロールシステムでは制御ホストに持たせていた関数の一部を、複数の実行命令の集合体からなるマクロデータとして、コントローラユニットのROMに持たせて記憶させておくことができる。   According to the motion control system of the present invention as described above, a part of the function provided to the control host in the conventional motion control system is stored in the ROM of the controller unit as macro data consisting of a collection of a plurality of execution instructions. You can have it and remember it.

これにより、マクロデータに持たせた実行命令に対応する関数を制御ホストの制御プログラムに持たせなくても良くなるため、制御ホストの制御プログラムを従来のものよりもシンプルに構築することが可能となるとともに、制御プログラムで関数を実行するときの制御ホストの負担を低減できる。更に、制御ホストの制御プログラムをシンプル化できれば、制御プログラムの開発に要する労力及び時間を削減でき、また、モーションコントロールシステムの立ち上げを円滑に行うことができる。   This eliminates the need for the control program of the control host to have a function corresponding to the execution instruction given to the macro data, making it possible to construct the control program of the control host more simply than the conventional one. In addition, it is possible to reduce the burden on the control host when the function is executed by the control program. Furthermore, if the control program of the control host can be simplified, the labor and time required for developing the control program can be reduced, and the motion control system can be started up smoothly.

また本発明では、コントローラユニットのROMに、実行命令の集合体であるマクロデータを保持するとともに、コントローラユニットの軸制御ロジック回路が、制御ホストから指定されるROM内のマクロデータを書き込むことが可能なRAMを備える。更に、軸制御ロジック回路は、RAMに書き込まれたマクロデータに従って複数の実行命令を順番に自動実行するRAMインターフェイス機能を備える。   In the present invention, the controller unit ROM holds macro data, which is a collection of execution instructions, and the axis control logic circuit of the controller unit can write the macro data in the ROM designated by the control host. A random RAM is provided. Further, the axis control logic circuit has a RAM interface function for automatically executing a plurality of execution instructions in order according to macro data written in the RAM.

従って、例えば制御ホストの制御プログラムが、コントローラユニットに対し、指定するマクロデータをROMからRAMに書き込むようにリクエスト信号を送信し、更にその後、RAMに書き込まれたマクロデータに従って実行命令を自動実行するようにリクエスト信号を送信することにより、コントローラユニット側で、マクロデータに従ってパルス駆動モータに所定の動作を自動的に行わせることが可能となる。   Therefore, for example, the control program of the control host transmits a request signal to the controller unit so as to write the specified macro data from the ROM to the RAM, and then automatically executes the execution command according to the macro data written in the RAM. By transmitting the request signal as described above, the controller unit can automatically cause the pulse drive motor to perform a predetermined operation according to the macro data.

このため、本発明では、スレーブに所定の動作を行わせるために、従来のように制御プログラムで複数の関数を実行して制御ホストとコントローラユニットとの間で複数回の通信を繰り返して行う必要がなくなり、制御ホストとコントローラユニット間の通信回数を大きく低減させるとともに、その通信に要する時間を削減することができる。   Therefore, in the present invention, in order to cause the slave to perform a predetermined operation, it is necessary to repeatedly execute a plurality of functions between the control host and the controller unit by executing a plurality of functions in the control program as in the past. The number of communications between the control host and the controller unit can be greatly reduced, and the time required for the communications can be reduced.

すなわち、本発明では、制御ホストの制御プログラムをシンプルに構築できるとともに、制御ホストとコントローラユニット間の通信の回数や時間を少なくできるため、制御ホストの負担を、従来のモーションコントロールシステムよりも大きく低減させることができ、その結果、制御ホストの処理が遅くなるという従来の課題を解消することができる。   That is, according to the present invention, the control program of the control host can be simply constructed, and the number of times and the time of communication between the control host and the controller unit can be reduced, so that the burden on the control host is greatly reduced compared to the conventional motion control system. As a result, the conventional problem that the processing of the control host is slow can be solved.

しかも、制御ホストとコントローラユニット間の通信回数の減少により、制御ホストの性能、制御ホストとスレーブとの間の通信速度、コントローラユニットの内部処理時間に依存しないようなリアルタイム性を備えた高度なモーションコントロールを安定して実現することができる。更に、モーションコントロールの実行処理時間のバラつきや誤差を抑えて、実行処理時間を安定して確保し易くなるため、処理の遅延による制御の破綻が生じることを防止できる。このため、位置決めの微細制御の向上や複数軸の同期精度の向上、また、機械装置の高速化及び性能向上を図ることができる。   In addition, by reducing the number of communications between the control host and the controller unit, advanced motion with real-time performance that does not depend on the performance of the control host, the communication speed between the control host and the slave, and the internal processing time of the controller unit. Control can be realized stably. Furthermore, since it is easy to stably secure the execution processing time by suppressing variations and errors in the execution processing time of the motion control, it is possible to prevent control failure due to processing delay. Therefore, it is possible to improve the fine control of positioning, improve the synchronization accuracy of a plurality of axes, and increase the speed and performance of the mechanical device.

更に本発明のモーションコントロールシステムでは、例えば複数のコントローラユニットのROMに、制御プログラムの関数に対応するマクロデータを分散させて保持させることが可能となる。このため、各スレーブで行う一連のモーションをそのスレーブの機能として完結させて自動実行させることができ、それによって、各スレーブにおける一連のモーションを円滑に且つ確実に行うことができる。   Furthermore, in the motion control system of the present invention, macro data corresponding to the function of the control program can be distributed and held in ROMs of a plurality of controller units, for example. For this reason, a series of motions performed by each slave can be completed and automatically executed as a function of the slave, whereby a series of motions in each slave can be smoothly and reliably performed.

特に本発明では、スレーブが行うモーションを、制御プログラムの関数で規定することも、また、RAMに書き込むことが可能なマクロデータとしてコントローラユニットのROMに保持することも可能となることから、制御ホストの制御プログラムと、ROMに保持するマクロデータとの間に互換性を持たせることができる。それにより、システム設計の自由度を高めることができ、ユーザーから要求される仕様に、より柔軟に対応することが可能となる。   In particular, in the present invention, the motion performed by the slave can be defined by a function of the control program, and can also be stored in the ROM of the controller unit as macro data that can be written to the RAM. It is possible to make the control program compatible with the macro data stored in the ROM. As a result, the degree of freedom in system design can be increased, and the specifications required by the user can be handled more flexibly.

更に本発明では、モーションコントロールシステムにおいてモーションの一部変更や軸の追加等のマイナーチェンジを行う場合に、そのマイナーチェンジを行う部分のコントローラユニットのマクロデータのみを変更することによって、制御ホストの制御プログラムや、その他のコントローラユニットのマクロデータを変更しなくても容易に対応することが可能となる。   Furthermore, in the present invention, when a minor change such as a partial change of motion or an addition of an axis is performed in the motion control system, only the macro data of the controller unit of the part that performs the minor change is changed, Thus, it is possible to easily cope without changing the macro data of other controller units.

またこの場合、マイナーチェンジを行うコントローラユニットのマクロデータのみを変更すれば良く、変更しないコントローラユニットへの影響がなくなる(又は少なくなる)ため、その部分的な変更に伴う他の制御に対する影響の検証やデバック等を、そのコントローラユニット内の小さな範囲で行うだけで十分となる。従って、本発明では、従来のモーションコントロールシステムに比べて、マイナーチェンジを行う際に要する労力、費用、時間を大幅に低減できるとともに、マイナーチェンジの際に伴うリスクも小さくすることが可能となるという大きなメリットが得られる。   In this case, it is only necessary to change the macro data of the controller unit that performs the minor change, and the influence on the controller unit that is not changed is eliminated (or reduced). It is sufficient to perform debugging or the like within a small range within the controller unit. Therefore, compared with the conventional motion control system, the present invention can greatly reduce the labor, cost, and time required for making a minor change and can also reduce the risk associated with a minor change. Is obtained.

このような本発明のモーションコントロールシステムにおいて、軸制御ロジック回路は、実行命令を解析する命令解析部と、指令パルスを発生させる1つ又は複数の軸制御部とを備えており、また、各軸制御部にはRAMが1つずつ設けられている。これにより、各軸制御部のRAMに、対応するマクロデータを書き込んで軸制御部ごとに自動実行させることができるため、軸制御部ごとにモーションを完結させることができる。従って、例えば軸制御部ごとのモーションを1つの制御ホストで一元的に制御する場合に比べて、それぞれの軸制御部の制御が容易となり、また、各軸制御部のモーションを安定して行わせることができる。   In such a motion control system of the present invention, the axis control logic circuit includes a command analysis unit that analyzes an execution command, and one or a plurality of axis control units that generate a command pulse. The control unit is provided with one RAM. Accordingly, corresponding macro data can be written in the RAM of each axis control unit and automatically executed for each axis control unit, so that the motion can be completed for each axis control unit. Therefore, for example, the control of each axis control unit becomes easier and the motion of each axis control unit can be stably performed as compared to the case where the motion for each axis control unit is centrally controlled by one control host. be able to.

また、本発明のモーションコントロールシステムにおいて、軸制御部のRAMは、実行命令をそれぞれ書き込むことが可能な複数のアドレスを有し、軸制御ロジック回路は、RAMインターフェイス機能により、リクエスト信号により指定される所定のアドレスの実行命令からマクロデータを自動実行可能である。これにより、軸制御部に、マクロデータに従った所定の動作を、マクロデータの初めからでも、又はマクロデータの途中からでも安定して行わせることが可能となり、スレーブの動作を多様に制御することができる。   In the motion control system of the present invention, the RAM of the axis control unit has a plurality of addresses to which execution instructions can be written, and the axis control logic circuit is designated by a request signal by the RAM interface function. Macro data can be automatically executed from an execution instruction at a predetermined address. As a result, it is possible to cause the axis control unit to perform a predetermined operation according to the macro data stably from the beginning of the macro data or from the middle of the macro data, and various operations of the slave are controlled. be able to.

更に、本発明のモーションコントロールシステムにおいて、軸制御部のRAMは、複数のマクロデータを書き込むことが可能な容量を有する。これにより、制御ホストのリクエスト信号により、軸制御部のRAMに複数のマクロデータを一度に書き込んで記憶させることができる。この場合、RAMに書き込まれた複数のマクロデータの中から1つ又は複数のマクロデータを指定して自動実行させることができる。   Furthermore, in the motion control system of the present invention, the RAM of the axis control unit has a capacity capable of writing a plurality of macro data. Thereby, a plurality of macro data can be written and stored at once in the RAM of the axis control unit in response to a request signal from the control host. In this case, one or a plurality of macro data can be designated and automatically executed from among a plurality of macro data written in the RAM.

このように、RAMに書き込まれた複数のマクロデータの中からスレーブの動作パターンを選択して自動的に行わせることができ、また、スレーブの動作パターンを変更する際にRAMにおけるマクロデータの書き換えをその都度行わなくても良くなるため、スレーブの動作をより効率的に制御することができる。   As described above, the slave operation pattern can be selected automatically from the plurality of macro data written in the RAM, and the macro data in the RAM can be rewritten when the slave operation pattern is changed. Therefore, the operation of the slave can be controlled more efficiently.

更にまた、コントローラユニットのROMは、複数のRAMにそれぞれ対応して書き込まれる複数のマクロデータを備えた1枚又は複数枚のシートデータを保持することが可能である。これにより、各軸制御部のRAMに展開する相互に対応した複数のマクロデータを1枚のシートデータにまとめて保持することができるため、マクロデータの管理を行い易くすることができる。   Furthermore, the ROM of the controller unit can hold one or a plurality of sheet data including a plurality of macro data written corresponding to the plurality of RAMs. As a result, a plurality of macro data corresponding to each other developed in the RAM of each axis control unit can be held together in one sheet data, so that the management of the macro data can be facilitated.

また、ROMの中に、RAMに展開可能な複数のシートデータが保持されていることにより、スレーブに行わせることが可能な複数の多様な動作パターンを持たせておくことが可能となる。このため、スレーブに実際に動作を行わせる際に複数のシートデータから所要のシートデータを選択することによって、スレーブに所定の動作を円滑に行わせることができるとともに、スレーブに行わせる動作パターンの変更も容易に行うことができる。   In addition, since a plurality of sheet data that can be expanded in the RAM is held in the ROM, it is possible to have a plurality of various operation patterns that can be performed by the slave. Therefore, by selecting the required sheet data from a plurality of sheet data when the slave actually performs the operation, the slave can smoothly perform the predetermined operation and the operation pattern to be performed by the slave. Changes can also be made easily.

この場合、コントローラユニットは、複数の軸制御部の各RAMに、リクエスト信号により指定される1枚のシートデータから、対応するマクロデータを展開してそれぞれ書き込むことが可能とされている。これにより、1枚のシートデータから、各軸制御部のRAMに対して、相互に動作が対応するマクロデータを展開して書き込むことができるため、RAMへの書き込みを容易に且つ効率的に行うことができ、また、複数の軸制御部に、互いに対応する動作を円滑に行わせることができる、
また本発明において、コントローラユニットは、複数の軸制御部の各RAMに、リクエスト信号により指定される2枚以上のシートデータから、指定されるマクロデータを組み合わせてそれぞれ書き込むことが可能である。これにより、制御ホストの制御プログラムを変更することなく、各軸制御部で自動実行させることが可能な動作パターンの種類を容易に増大させることができる。
In this case, the controller unit can develop and write corresponding macro data from each sheet data designated by the request signal into each RAM of the plurality of axis control units. As a result, since the macro data corresponding to the operations can be expanded and written from one sheet data to the RAM of each axis control unit, writing to the RAM is performed easily and efficiently. In addition, the plurality of axis control units can smoothly perform operations corresponding to each other,
In the present invention, the controller unit can write the specified macro data in combination to each of the RAMs of the plurality of axis control units from the two or more sheet data specified by the request signal. This makes it possible to easily increase the types of operation patterns that can be automatically executed by each axis control unit without changing the control program of the control host.

本発明のモーションコントロールシステムにおいて、制御ホストは、ROMに保持されているマクロデータの少なくとも一部を、制御プログラム又は専用の書き換えプログラムで書き換えることが可能である。更に、制御ホストは、RAMに書き込まれたマクロデータの少なくとも一部を、制御プログラム又は専用の書き換えプログラムで書き換えることが可能である。   In the motion control system of the present invention, the control host can rewrite at least a part of the macro data held in the ROM with a control program or a dedicated rewrite program. Furthermore, the control host can rewrite at least a part of the macro data written in the RAM with a control program or a dedicated rewrite program.

これにより、制御ホストの制御プログラム自体を変更することなく、マクロデータに従って自動実行させることが可能な動作パターンを容易に変更することができる。また、動作パターンの一部を変更する等のマイナーチェンジを行う際に要する労力、費用、時間を大幅に低減できるとともに、マイナーチェンジの際に伴うリスクも小さくできる。   As a result, the operation pattern that can be automatically executed according to the macro data can be easily changed without changing the control program itself of the control host. In addition, the labor, cost, and time required for making a minor change such as changing a part of the operation pattern can be greatly reduced, and the risk associated with the minor change can be reduced.

本発明のモーションコントロールシステムを示すブロック図である。It is a block diagram which shows the motion control system of this invention. 同モーションコントロールシステムにおける4軸コントローラユニットを示すブロック図である。It is a block diagram which shows the 4-axis controller unit in the motion control system. 同モーションコントロールシステムにおけるリクエスト信号のフォーマットを示す概略図である。It is the schematic which shows the format of the request signal in the motion control system. 同モーションコントロールシステムにおけるアンサーバック信号のフォーマットを示す概略図である。It is the schematic which shows the format of an answerback signal in the same motion control system. 4軸コントローラユニットの各RAMに書き込まれるマクロデータについて説明する説明図である。It is explanatory drawing explaining the macro data written in each RAM of a 4-axis controller unit. 4軸コントローラユニットのROMに保持されるシートデータについて説明する説明図である。It is explanatory drawing explaining the sheet | seat data hold | maintained at ROM of a 4-axis controller unit. 実施例で実行するパルス駆動モータの動作パターンを示すグラフである。It is a graph which shows the operation pattern of the pulse drive motor performed in an Example. X軸用のマクロデータの内容を説明する図である。It is a figure explaining the content of the macro data for X axes. 実施例において、制御ホストの制御プログラムが実行する関数の内容を説明する図である。In an Example, it is a figure explaining the content of the function which the control program of a control host performs. 従来のモーションコントロールシステムにおいて、制御ホストの制御プログラムが実行する関数の内容を説明する図である。It is a figure explaining the content of the function which the control program of a control host performs in the conventional motion control system. 従来のモーションコントロールシステムにおける4軸コントローラユニットを示すブロック図である。It is a block diagram which shows the 4-axis controller unit in the conventional motion control system.

以下に、本発明の好適な実施の形態について、図面を参照しながら詳細に説明する。
ここで、図1は、本実施形態におけるモーションコントロールシステムを示すブロック図であり、図2は、同モーションコントロールシステムにおける4軸コントローラユニットを示すブロック図である。
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.
Here, FIG. 1 is a block diagram showing a motion control system in the present embodiment, and FIG. 2 is a block diagram showing a 4-axis controller unit in the motion control system.

図1に示す本実施形態のモーションコントロールシステム1は、工作機械や組み立て機械などの産業用機械装置や検査装置等における動作を制御するシステムとして形成されている。このモーションコントロールシステム1は、PCにより形成される制御ホスト10と、制御ホスト10の制御下に配される第1スレーブ20、第2スレーブ40、及び第3スレーブ60と、制御ホスト10と第1〜第3スレーブ20,40,60間の通信を行う通信インターフェイスユニット70とを有する。   A motion control system 1 according to this embodiment shown in FIG. 1 is formed as a system that controls operations in industrial machine devices such as machine tools and assembly machines, inspection devices, and the like. The motion control system 1 includes a control host 10 formed by a PC, a first slave 20, a second slave 40, and a third slave 60 that are arranged under the control of the control host 10, the control host 10, and the first To a communication interface unit 70 for performing communication between the third slaves 20, 40, 60.

ここで、スレーブとは、制御ホスト10の後述する制御プログラム11が関数を実行することによって、指定された命令に従って動作するユニットのことを言い、本実施形態では、第1スレーブ20、第2スレーブ40、及び第3スレーブ60として、コントローラユニット21、コントローラ機能とドライバ機能を一体型にしたコントローラドライバユニット41、及びデジタルI/Oユニット61が用いられている。なお、本実施形態において、制御ホスト10の制御下に配されるスレーブの個数は限定されるものではなく、1つのスレーブのみが配されていても良いし、4つ以上のスレーブが配されていても良い。   Here, the slave means a unit that operates in accordance with a designated instruction by executing a function by a control program 11 (to be described later) of the control host 10, and in this embodiment, the first slave 20 and the second slave. 40 and the third slave 60 are a controller unit 21, a controller driver unit 41 in which a controller function and a driver function are integrated, and a digital I / O unit 61. In the present embodiment, the number of slaves arranged under the control of the control host 10 is not limited, and only one slave may be arranged, or four or more slaves are arranged. May be.

本実施形態の制御ホスト10は、C#等の開発言語を用いて構築される制御プログラム11と、第1スレーブ20〜第3スレーブ60に対する通信を行うためのソフトウェアモジュールとなるデバイスドライバ12とを有しており、制御プログラム11で関数を実行することにより、第1スレーブ20〜第3スレーブ60を動作させ、また、その動作を制御することができる。   The control host 10 of the present embodiment includes a control program 11 constructed using a development language such as C #, and a device driver 12 serving as a software module for communicating with the first slave 20 to the third slave 60. The first slave 20 to the third slave 60 can be operated and their operations can be controlled by executing the function by the control program 11.

例えば本実施形態の制御ホスト10において、制御プログラム11で関数が実行されると、制御プログラム11から、その関数実行に基づく内部信号がデバイスドライバ12に送られる。また、デバイスドライバ12では、制御プログラム11からの内部信号を受信すると、その内部信号に基づいてリクエスト信号71を生成して通信インターフェイスユニット70に送信する。   For example, in the control host 10 of this embodiment, when a function is executed by the control program 11, an internal signal based on the function execution is sent from the control program 11 to the device driver 12. Further, when receiving an internal signal from the control program 11, the device driver 12 generates a request signal 71 based on the internal signal and transmits it to the communication interface unit 70.

本実施形態において、制御ホスト10のデバイスドライバ12から送信されるリクエスト信号71は、図3に示すようなフォーマットで形成されており、このリクエスト信号71には、信号の長さ、信号の送り先、及び信号の内容などの情報が含まれている。   In the present embodiment, the request signal 71 transmitted from the device driver 12 of the control host 10 is formed in a format as shown in FIG. 3, and the request signal 71 includes a signal length, a signal destination, And information such as signal contents.

より具体的に説明すると、本実施形態のリクエスト信号71は、信号の長さを示すリクエスト長71aの情報と、信号の送り先を示すスレーブアドレス71bの情報及びスレーブタイプ71cの情報と、信号の実質的な内容を示すリクエストコード71dの情報及びリクエストデータ71eの情報とを有する。   More specifically, the request signal 71 of the present embodiment includes information on the request length 71a indicating the length of the signal, information on the slave address 71b indicating the destination of the signal, information on the slave type 71c, and the actual signal. Information of the request code 71d indicating the general contents and information of the request data 71e.

リクエスト長71aの情報は、当該リクエスト長71aを除くリクエスト信号71の長さ、すなわち、スレーブアドレス71b、スレーブタイプ71c、リクエストコード71d、及びリクエストデータ71eの情報の合計の長さ(バイト数)を示す。このリクエスト長71aの情報は、各スレーブ20,40,60がリクエスト信号71を受信したときに、それぞれのスレーブ20,40,60がその受信したリクエスト信号71が正しいものか否かを判別する要素の一つとなる。   The information of the request length 71a is the length of the request signal 71 excluding the request length 71a, that is, the total length (number of bytes) of the information of the slave address 71b, the slave type 71c, the request code 71d, and the request data 71e. Show. The information of the request length 71a is an element for determining whether or not each slave 20, 40, 60 receives the request signal 71 when each slave 20, 40, 60 receives the request signal 71. It becomes one of.

リクエスト信号71におけるスレーブアドレス71bの情報は、リクエスト信号71の送信先となる特定のスレーブのアドレスを指定している。スレーブタイプ71cの情報は、送信先となるスレーブにおけるユニットの種類を特定している。リクエストコード71dの情報は、リクエスト信号71で行わせる処理の対象(例えばスレーブのポートへのライト)を指定している。   The information of the slave address 71 b in the request signal 71 specifies the address of a specific slave that is the transmission destination of the request signal 71. The information of the slave type 71c specifies the type of unit in the slave that is the transmission destination. The information of the request code 71d designates the processing target (for example, write to the slave port) to be performed by the request signal 71.

リクエストデータ71eの情報は、リクエスト信号71で行わせる処理の具体的な内容を指定しており、このリクエストデータ71eには、例えば軸の指定、処理を実行させるコマンド、そのコマンドの具体的なデータなどの内容が含まれる。なお、本発明のリクエスト信号71のフォーマットは、図3に示したものに限定されるものではなく、任意に変更することができる。   The information of the request data 71e specifies the specific contents of the processing to be performed by the request signal 71, and the request data 71e includes, for example, an axis specification, a command for executing the processing, and specific data of the command. Etc. are included. The format of the request signal 71 of the present invention is not limited to that shown in FIG. 3 and can be arbitrarily changed.

一方、本実施形態の制御ホスト10から、後述する通信インターフェイスユニット70を介して、スレーブにリクエスト信号71が送られると、そのリクエスト信号71を各スレーブ20,40,60が一斉に受信し、各スレーブ20,40,60がリクエスト信号71の内容を自分に対するものであるか否かを判断する。   On the other hand, when the request signal 71 is sent from the control host 10 of the present embodiment to the slave via the communication interface unit 70 described later, the slaves 20, 40, 60 receive the request signal 71 simultaneously, The slaves 20, 40, 60 determine whether or not the content of the request signal 71 is for itself.

更に、各スレーブ20,40,60は、そのリクエスト信号71が自分に対するものと判断した場合には、そのリクエスト信号71の内容を実行した後に、実行結果等の内容を含むアンサーバック信号72を、通信インターフェイスユニット70を介して、制御ホスト10に送信する。制御ホスト10では、そのアンサーバック信号72をデバイスドライバ12で受信して解析し、その解析に基づいて関数の実行結果が制御プログラム11に戻される。   Furthermore, when each slave 20, 40, 60 determines that the request signal 71 is for itself, after executing the content of the request signal 71, the slave 20 receives the answer back signal 72 including the content of the execution result, etc. The data is transmitted to the control host 10 via the communication interface unit 70. In the control host 10, the answerback signal 72 is received and analyzed by the device driver 12, and the function execution result is returned to the control program 11 based on the analysis.

ここで、本実施形態で送信されるアンサーバック信号72は、リクエスト信号71を実行した結果を示す信号であり、図4に示すようなフォーマットで形成されている。このアンサーバック信号72は、信号の長さを示すアンサー長72aの情報と、エラーの有無を示すエラー判定結果72bの情報と、リクエスト信号71に対する応答の内容を示すアンサーバックデータ72cの情報とを有する。   Here, the answer back signal 72 transmitted in the present embodiment is a signal indicating the result of executing the request signal 71, and is formed in a format as shown in FIG. The answerback signal 72 includes information on an answer length 72a indicating the length of the signal, information on an error determination result 72b indicating the presence / absence of an error, and information on an answerback data 72c indicating the content of a response to the request signal 71. Have.

アンサーバック信号72におけるアンサー長72aの情報は、当該アンサー長72aを除くアンサーバック信号72の長さ、すなわち、エラー判定結果72b及びアンサーバックデータ72cの情報の合計の長さ(バイト数)を示す。エラー判定結果72bの情報は、受信したリクエスト信号71に対してエラーが生じたか否かを示すとともに、エラーが生じた場合にはそのエラーの内容を示す。アンサーバックデータ72cの情報には、リクエスト信号71に対して実行した結果や内容などのデータが含まれる。なお、本発明のアンサーバック信号72のフォーマットも、図4に示したものに限定されるものではなく、任意に変更することができる。   The information of the answer length 72a in the answer back signal 72 indicates the length of the answer back signal 72 excluding the answer length 72a, that is, the total length (number of bytes) of the information of the error determination result 72b and the answer back data 72c. . The information of the error determination result 72b indicates whether or not an error has occurred with respect to the received request signal 71, and indicates the content of the error when an error has occurred. The information of the answerback data 72c includes data such as results and contents executed on the request signal 71. Note that the format of the answerback signal 72 of the present invention is not limited to that shown in FIG. 4 and can be arbitrarily changed.

本実施形態の制御ホスト10は、PCにより形成されているため、制御プログラム11によるモーションコントロールの処理以外に、第3スレーブ60の後述するセンサ等から得られる情報を用いて、画像処理等の様々な処理を行うことも可能である。なお、本実施形態の制御ホスト10はPCにより形成されているが、本発明では、制御ホスト10をPLCにより形成することも可能である。   Since the control host 10 of the present embodiment is formed by a PC, in addition to the motion control processing by the control program 11, various information such as image processing can be used by using information obtained from a sensor described later of the third slave 60. It is also possible to perform a simple process. In addition, although the control host 10 of this embodiment is formed by PC, in this invention, it is also possible to form the control host 10 by PLC.

また、本実施形態の制御ホスト10は、制御プログラム11により、第1スレーブ20のコントローラユニット21の後述するROM24に保持されているマクロデータ75やシートデータ76の少なくとも一部を書き換えることが可能であり、また、同コントローラユニット21における後述する第1RAM36a〜第4RAM36dに書き込まれるマクロデータ75の少なくとも一部を書き換えることが可能に構成されている。なお、本発明では、ROM24や第1RAM36a〜第4RAM36d内のマクロデータ75等の書き換えを制御プログラム11によって行う代わりに、制御ホスト10に、ROM24や第1RAM36a〜第4RAM36d内のマクロデータ75等を書き換える専用の書き換えプログラムを持たせることも可能である。   Further, the control host 10 of the present embodiment can rewrite at least a part of the macro data 75 and the sheet data 76 held in the ROM 24 described later of the controller unit 21 of the first slave 20 by the control program 11. In addition, at least a part of macro data 75 written in a first RAM 36a to a fourth RAM 36d, which will be described later, in the controller unit 21 can be rewritten. In the present invention, the macro data 75 and the like in the ROM 24 and the first RAM 36a to the fourth RAM 36d are rewritten to the control host 10 instead of rewriting the macro data 75 and the like in the ROM 24 and the first RAM 36a to the fourth RAM 36d by the control program 11. It is also possible to have a dedicated rewrite program.

本実施形態の通信インターフェイスユニット70は、制御ホスト10のデバイスドライバ12との間で、バス又はシリアル通信を介してリクエスト信号71及びアンサーバック信号72の送受信を行うとともに、第1スレーブ20〜第3スレーブ60との間で、シリアル通信によるリクエスト信号71及びアンサーバック信号72の送受信を行うユニットである。   The communication interface unit 70 according to the present embodiment transmits / receives a request signal 71 and an answerback signal 72 to / from the device driver 12 of the control host 10 via a bus or serial communication, and the first slave 20 to the third slave. This is a unit that transmits and receives a request signal 71 and an answerback signal 72 by serial communication with the slave 60.

この場合、図3及び図4に示したフォーマットのリクエスト信号71及びアンサーバック信号72の伝達を行うシリアル通信を「ALII(エーエルツー)通信」と称し、この「ALII通信」は、本出願人が市販するコントローラユニットやモーションコントロールシステムなどに用いられている。なお、本願で用いるシリアル通信の用語には、ALII通信が含まれるものとする。   In this case, the serial communication for transmitting the request signal 71 and the answer back signal 72 in the format shown in FIGS. 3 and 4 is referred to as “ALII communication”, and this “ALII communication” is commercially available by the applicant. Used in controller units and motion control systems. The term serial communication used in the present application includes ALII communication.

本実施形態の通信インターフェイスユニット70において、制御ホスト10を形成するPCに接続する形態は特に限定されるものではなく、例えばPCIバスやPCIExpress(登録商標)バスなどのスロット挿入タイプのもの、又は、USB、Ethernet(登録商標)、及びEtherCAT(登録商標)などのシリアル通信タイプのものを利用することが可能である。   In the communication interface unit 70 of the present embodiment, the form of connection to the PC forming the control host 10 is not particularly limited. For example, a slot insertion type such as a PCI bus or a PCI Express (registered trademark) bus, or Serial communication types such as USB, Ethernet (registered trademark), and EtherCAT (registered trademark) can be used.

本実施形態において、通信インターフェイスユニット70と第1〜第3スレーブ20,40,60との間のシリアル通信の通信仕様には、絶縁型RS485(半二重通信)方式が採用されている。また、シリアル通信の通信速度(ボーレート)として、20Mbps又は10Mbpsが設定される。   In the present embodiment, the insulation RS485 (half duplex communication) system is adopted for the communication specifications of serial communication between the communication interface unit 70 and the first to third slaves 20, 40, 60. Further, 20 Mbps or 10 Mbps is set as the communication speed (baud rate) of serial communication.

RS485の通信方式は、ケーブルの引き回しが容易であり、また、ノイズに強く、一つのケーブル(伝送路)の抵抗やスレーブの負荷抵抗の影響を受け難いため、複数のスレーブを組み込むことが可能である。例えば、本実施形態のモーションコントロールシステム1の場合、最大で15ユニットのスレーブを、通信インターフェイスユニット70に対してシリアル通信(ALII通信)で接続して制御することが可能である。   The RS485 communication system is easy to route the cable, is resistant to noise, and is not easily affected by the resistance of one cable (transmission path) or the load resistance of the slave, so multiple slaves can be incorporated. is there. For example, in the case of the motion control system 1 of the present embodiment, a maximum of 15 units of slaves can be connected to the communication interface unit 70 by serial communication (ALII communication) and controlled.

本実施形態の第1スレーブ20となるコントローラユニット21は、4軸コントローラユニットとして形成されており、このコントローラユニット21には、X軸(第1軸)、Y軸(第2軸)、Z軸(第3軸)、及びA軸(第4軸)の各軸に配される4つのパルス駆動モータ38が、それぞれドライバユニット39を介して接続されている。   The controller unit 21 serving as the first slave 20 of the present embodiment is formed as a four-axis controller unit. The controller unit 21 includes an X axis (first axis), a Y axis (second axis), and a Z axis. Four pulse drive motors 38 arranged on each axis (third axis) and A axis (fourth axis) are connected via a driver unit 39, respectively.

この場合、接続されるパルス駆動モータ38として、サーボモータ又はステッピングモータが用いられる。また、X軸、Y軸、Z軸、及びA軸に配されるパルス駆動モータ38を、それぞれ第1パルス駆動モータ38a、第2パルス駆動モータ38b、第3パルス駆動モータ38c、及び第4パルス駆動モータ38dとし、各パルス駆動モータ38a〜38dが接続するドライバユニット39を、順番に、第1ドライバユニット39a、第2ドライバユニット39b、第3ドライバユニット39c、及び第4ドライバユニット39dとする。   In this case, a servo motor or a stepping motor is used as the pulse drive motor 38 to be connected. The pulse drive motors 38 arranged on the X axis, the Y axis, the Z axis, and the A axis are respectively referred to as a first pulse drive motor 38a, a second pulse drive motor 38b, a third pulse drive motor 38c, and a fourth pulse. The driver unit 39 to which the pulse motors 38a to 38d are connected is referred to as a first driver unit 39a, a second driver unit 39b, a third driver unit 39c, and a fourth driver unit 39d in order.

本実施形態の4軸コントローラユニット21は、図2に示すように、様々な処理を行うCPU22と、リクエスト信号71の受信及びアンサーバック信号72の送信を行う通信制御部23と、複数のマクロデータ75が予め記憶されている1つのROM24と、指令パルスを発生させる第1及び第2軸制御ロジック回路31,32(第1及び第2パルスジェネレータとも言う)と、第1及び第2軸制御ロジック回路31,32で発生させた指令パルスの信号を第1ドライバユニット39a〜第4ドライバユニット39dに対して出力する外部機器インターフェイス回路25とを有する。   As shown in FIG. 2, the 4-axis controller unit 21 of the present embodiment includes a CPU 22 that performs various processes, a communication control unit 23 that receives a request signal 71 and transmits an answerback signal 72, and a plurality of macro data. One ROM 24 in which 75 is stored in advance, first and second axis control logic circuits 31 and 32 (also referred to as first and second pulse generators) for generating command pulses, and first and second axis control logic The external device interface circuit 25 outputs the command pulse signals generated by the circuits 31 and 32 to the first driver unit 39a to the fourth driver unit 39d.

この場合、4軸コントローラユニット21におけるCPU22、通信制御部23、ROM24、並びに第1及び第2軸制御ロジック回路31,32は、バス(データバス)26によって相互に接続されている。なお、第1ドライバユニット39a〜第4ドライバユニット39d、及び外部機器インターフェイス回路25については、従来の4軸コントローラユニットに用いられる一般的なドライバユニット、及び外部機器インターフェイス回路と同様であるため、ここでは、これらの詳しい説明を省略することとする。   In this case, the CPU 22, the communication control unit 23, the ROM 24, and the first and second axis control logic circuits 31 and 32 in the 4-axis controller unit 21 are connected to each other by a bus (data bus) 26. Note that the first driver unit 39a to the fourth driver unit 39d and the external device interface circuit 25 are the same as the general driver unit and external device interface circuit used in the conventional 4-axis controller unit. Then, these detailed explanations will be omitted.

本実施形態の4軸コントローラユニット21においてCPU22が行う主な処理を例示すると、CPU22は、通信制御部23で受信したリクエスト信号71の判別を行うとともに、そのリクエスト信号71が4軸コントローラユニット21に対するものである場合には、リクエスト信号71を実行命令に変換する処理を行う。この場合、図3に示したフォーマットで形成されたリクエスト信号71(特に、リクエスト信号71のリクエストデータ71eの部分)は、CPU22の処理によって、8ビットのコマンドと、16ビットの第1データと、16ビットの第2データとを有する実行命令に変換される。なお、実際にCPU22で変換される実行命令は、第2データ、第1データ、及びコマンドの順番で構成されている。   The main processing performed by the CPU 22 in the four-axis controller unit 21 of this embodiment is exemplified. The CPU 22 determines the request signal 71 received by the communication control unit 23, and the request signal 71 is sent to the four-axis controller unit 21. If it is, the request signal 71 is converted into an execution instruction. In this case, the request signal 71 (particularly, the request data 71e portion of the request signal 71) formed in the format shown in FIG. 3 is processed by the CPU 22 with an 8-bit command, 16-bit first data, It is converted into an execution instruction having 16-bit second data. Note that the execution instruction that is actually converted by the CPU 22 is composed of the order of the second data, the first data, and the command.

また、CPU22は、受信したリクエスト信号71の内容に従って、変換された実行命令(すなわち、コマンドと第1及び第2データ)を、第1及び第2軸制御ロジック回路31,32の後述する各軸制御部35a〜35dに書き込む処理や、各軸制御部35a〜35dからデータ(情報)を読み出す処理などを行い、更に、実行結果等の内容を含むアンサーバック信号72を生成する処理を行う。   Further, the CPU 22 sends the converted execution instruction (that is, the command and the first and second data) according to the content of the received request signal 71 to each axis (described later) of the first and second axis control logic circuits 31 and 32. A process of writing to the control units 35a to 35d, a process of reading data (information) from each of the axis control units 35a to 35d, and the like, and a process of generating an answerback signal 72 including contents such as execution results are performed.

更にまた、CPU22は、受信したリクエスト信号71の内容に従って、例えばROM24にアクセスし、当該ROM24に記憶されているモーションコントロール用のマクロデータ75を読み出すとともに、その読み出したマクロデータ75を、第1及び第2軸制御ロジック回路31,32の後述する第1RAM36a〜第4RAM36dに書き込む処理を行う。   Furthermore, the CPU 22 accesses, for example, the ROM 24 according to the content of the received request signal 71, reads the macro data 75 for motion control stored in the ROM 24, and reads the read macro data 75 into the first and the second macro data 75. The second axis control logic circuits 31 and 32 perform processing of writing in first RAM 36a to fourth RAM 36d, which will be described later.

通信制御部23は、通信インターフェイス回路27を介して通信インターフェイスユニット70に接続されており、制御ホスト10から送られたリクエスト信号71の受信と、CPU22で生成されたアンサーバック信号72の送信とを行う。また、コントローラユニット21の通信インターフェイス回路27と、通信インターフェイスユニット70との間では、上述したシリアル通信(ALII通信)が行われる。   The communication control unit 23 is connected to the communication interface unit 70 via the communication interface circuit 27, and receives the request signal 71 sent from the control host 10 and sends the answerback signal 72 generated by the CPU 22. Do. Further, the serial communication (ALII communication) described above is performed between the communication interface circuit 27 of the controller unit 21 and the communication interface unit 70.

ROM24は、データの書き込みや消去を自由に行うことができるとともに、電源を切っても書き込まれたデータが消えないフラッシュメモリであり、従来のコントローラユニットには、本実施形態のようなROM24は設けられていなかった。また、本実施形態のROM24には、第1及び第2軸制御ロジック回路31,32の第1RAM36a〜第4RAM36dに書き込むことが可能な複数のモーションコントロール用マクロデータ75が保持(記憶)されている。   The ROM 24 is a flash memory in which data can be freely written and erased and the written data does not disappear even when the power is turned off. The conventional controller unit is provided with the ROM 24 as in this embodiment. It was not done. The ROM 24 of the present embodiment holds (stores) a plurality of motion control macro data 75 that can be written to the first RAM 36a to the fourth RAM 36d of the first and second axis control logic circuits 31 and 32. .

第1及び第2軸制御ロジック回路31,32は、それぞれ、2つのパルス駆動モータ38のドライバユニット39に対して指令パルスを出力することが可能な軸制御部35a〜35dを2つずつ備えた2軸用の軸制御ロジック回路(集積回路)として形成されている。なお、本実施形態の第1及び第2軸制御ロジック回路31,32は、それぞれ2軸用に形成されているが、本発明では、軸制御ロジック回路が1軸用に形成されていても良く、また、1つのコントローラユニットに1つの軸制御ロジック回路のみが設けられていても良い。   Each of the first and second axis control logic circuits 31 and 32 includes two axis control units 35a to 35d that can output command pulses to the driver units 39 of the two pulse drive motors 38, respectively. It is formed as an axis control logic circuit (integrated circuit) for two axes. The first and second axis control logic circuits 31 and 32 of this embodiment are each formed for two axes. However, in the present invention, the axis control logic circuit may be formed for one axis. In addition, only one axis control logic circuit may be provided in one controller unit.

第1軸制御ロジック回路31は、CPU22から送られた実行命令の解析を行う第1命令解析部33と、解析された実行命令に従ってX軸(軸1)の第1ドライバユニット39aに対する指令パルスを発生させるとともにモータの回転数(位置)を判断するために指令パルスのカウントを行うX軸用の第1軸制御部(X軸制御部)35aと、第1軸制御部35aに対して設けられ、マクロデータ75を書き込むことが可能な第1RAM36aと、解析された実行命令に従ってY軸(軸2)の第2ドライバユニット39bに対する指令パルスを発生させるとともにその指令パルスのカウントを行うY軸用の第2軸制御部(Y軸制御部)35bと、第2軸制御部35bに対して設けられ、マクロデータ75を書き込むことが可能な第2RAM36bとを有する。このような本実施形態の第1軸制御ロジック回路31は、例えば図11に示したような従来の第1及び第2軸制御ロジック回路91,92と比較すると、第1RAM36a及び第2RAM36bが新たに設けられていることに違いを有する。   The first axis control logic circuit 31 sends a command pulse to the first driver unit 39a of the X axis (axis 1) according to the analyzed first execution unit 33 for analyzing the execution instruction sent from the CPU 22. The first axis control unit 35a for X axis (X axis control unit) 35a for generating command and counting command pulses to determine the rotation speed (position) of the motor and the first axis control unit 35a are provided. The first RAM 36a to which the macro data 75 can be written and the Y-axis for generating a command pulse for the second driver unit 39b on the Y-axis (axis 2) according to the analyzed execution command and counting the command pulse A second RAM 36 provided for the second axis control unit (Y axis control unit) 35b and the second axis control unit 35b and capable of writing macro data 75. With the door. In the first axis control logic circuit 31 of this embodiment, the first RAM 36a and the second RAM 36b are newly compared with the conventional first and second axis control logic circuits 91 and 92 shown in FIG. 11, for example. There is a difference in being provided.

更に、第1軸制御ロジック回路31は、CPU22でリクエスト信号71から変換された実行命令に従って、第1軸制御部(X軸制御部)35aに対し、第1RAM36aにアクセスし、且つ、その第1RAM36aに書き込まれたマクロデータ75の後述する実行命令77を順番に自動実行させる第1RAMインターフェイス機能と、第2軸制御部(Y軸制御部)35bに対し、第2RAM36bにアクセスし、且つ、その第2RAM36bに書き込まれたマクロデータ75の実行命令77を順番に自動実行させる第2RAMインターフェイス機能とを有する。   Further, the first axis control logic circuit 31 accesses the first RAM 36a to the first axis control unit (X-axis control unit) 35a according to the execution instruction converted from the request signal 71 by the CPU 22, and the first RAM 36a. The second RAM 36b is accessed for the first RAM interface function for automatically executing the execution instructions 77 to be described later of the macro data 75 written in the above in order, and the second axis control unit (Y axis control unit) 35b, and the second RAM 36b is accessed. And a second RAM interface function for automatically executing the execution instruction 77 of the macro data 75 written in the 2RAM 36b in order.

第1軸制御ロジック回路31の第1命令解析部33は、CPU22でリクエスト信号71から変換された実行命令を解析し、更に、その実行命令に含まれるコマンドと第1データ及び第2データとに従って、第1軸制御部35a及び第2軸制御部35bに所定の動作を行わせることができる。   The first instruction analysis unit 33 of the first axis control logic circuit 31 analyzes the execution instruction converted from the request signal 71 by the CPU 22, and further according to the command, the first data, and the second data included in the execution instruction. The first axis control unit 35a and the second axis control unit 35b can perform predetermined operations.

例えば第1命令解析部33は、実行命令に含まれるコマンドと第1データ及び第2データとに従って、第1軸制御部35aに、所定の第1条件で指令パルスを発生させるとともに、発生させた指令パルスの回数をカウントするといった動作を実行させるとともに、第2軸制御部35bに、所定の第2条件で指令パルスを発生させるとともに、発生させた指令パルスの回数をカウントするといった動作を実行させることが可能である。   For example, the first command analysis unit 33 causes the first axis control unit 35a to generate and generate a command pulse under a predetermined first condition according to the command included in the execution command, the first data, and the second data. An operation of counting the number of command pulses is executed, and the second axis control unit 35b is caused to generate a command pulse under a predetermined second condition and to perform an operation of counting the number of generated command pulses. It is possible.

また、第1命令解析部33は、第1及び第2RAMインターフェイス機能による処理(RAMインターフェイス処理)により、実行命令に含まれるコマンドと第1及び第2データとに従って、第1軸制御部35aに対し、第1RAM36aにアクセスして第1RAM36aに書き込まれたマクロデータ75の実行命令77を所定のアドレスの番地から順番に自動実行させるとともに、第2軸制御部35bに対し、第2RAM36bにアクセスして第2RAM36bに書き込まれたマクロデータ75の実行命令77を所定のアドレスの番地から順番に自動実行させることが可能である。   In addition, the first instruction analysis unit 33 performs the processing by the first and second RAM interface functions (RAM interface processing) to the first axis control unit 35a according to the command and the first and second data included in the execution instruction. Then, the execution instruction 77 of the macro data 75 written in the first RAM 36a by accessing the first RAM 36a is automatically executed in order from the address of the predetermined address, and the second axis control unit 35b is accessed by accessing the second RAM 36b. The execution instruction 77 of the macro data 75 written in the 2RAM 36b can be automatically executed in order from a predetermined address.

第1軸制御ロジック回路31の第1RAM36a及び第2RAM36bは、データの書き込みや消去を自由に行うことができるものの、ROM24とは異なり、電源の供給が遮断されると書き込まれデータ(内容)が失われる揮発メモリである。   The first RAM 36a and the second RAM 36b of the first axis control logic circuit 31 can freely write and erase data. However, unlike the ROM 24, the data (content) is lost when the power supply is cut off. Volatile memory.

第1RAM36aは、CPU22により、ROM24に保存されているX軸用のマクロデータ75を書き込むことが可能に構成されている。また、第1RAM36aは、上述した第1RAMインターフェイス機能により、第1軸制御部35aからアクセスされて、書き込まれたX軸用のマクロデータ75の実行命令77が順番に読み出される。   The first RAM 36 a is configured so that the CPU 22 can write macro data 75 for the X axis stored in the ROM 24. Further, the first RAM 36a is accessed from the first axis control unit 35a by the first RAM interface function described above, and the execution instructions 77 of the written X-axis macro data 75 are sequentially read out.

第2RAM36bも、第1RAM36aと同様に、CPU22により、ROM24に保存されているY軸用のマクロデータ75を書き込むことが可能に構成されているとともに、第2RAMインターフェイス機能により、第2軸制御部35bがアクセスして、書き込まれたY軸用のマクロデータ75の実行命令77が順番に読み出される。   Similarly to the first RAM 36a, the second RAM 36b is configured such that the CPU 22 can write the macro data 75 for the Y axis stored in the ROM 24, and the second RAM interface function allows the second axis control unit 35b. Are accessed, and the execution instructions 77 of the written macro data 75 for the Y-axis are read in order.

この場合、本実施形態の第1RAM36a及び第2RAM36bは、「0000」番地〜「4095」番地の4096個のアドレスをそれぞれ備えるとともに、1つのアドレスに、マクロデータ75を形成する1つの実行命令77(後述するように、コマンドと第1及び第2データとからなる命令)を格納することが可能な容量を有する。   In this case, each of the first RAM 36a and the second RAM 36b of the present embodiment includes 4096 addresses from “0000” to “4095”, and one execution instruction 77 that forms the macro data 75 at one address ( As will be described later, it has a capacity capable of storing a command and an instruction comprising first and second data.

第2軸制御ロジック回路32は、CPU22から送られた実行命令の解析を行う第2命令解析部34と、解析された実行命令に従ってZ軸(軸3)の第3ドライバユニット39cに対する指令パルスを発生させるとともにその指令パルスのカウントを行うZ軸用の第3軸制御部(Z軸制御部)35cと、第3軸制御部35cに対して設けられ、マクロデータ75を書き込むことが可能な第3RAM36cと、解析された実行命令に従ってA軸(軸4)の第4ドライバユニット39dに対する指令パルスを発生させるとともにその指令パルスのカウントを行うA軸用の第4軸制御部(A軸制御部)35dと、第4軸制御部35dに対して設けられ、マクロデータ75を書き込むことが可能な第4RAM36dとを有する。   The second axis control logic circuit 32 sends a command pulse to the third command unit 39c for the Z axis (axis 3) according to the second command analysis unit 34 for analyzing the execution command sent from the CPU 22 and the analyzed execution command. The third axis control unit 35c for Z axis (Z axis control unit) 35c for generating and counting the command pulses and the third axis control unit 35c are provided for writing macro data 75. 3RAM 36c and A-axis fourth axis control unit (A-axis control unit) that generates command pulses for the A-axis (axis 4) fourth driver unit 39d according to the analyzed execution command and counts the command pulses 35d and a fourth RAM 36d provided for the fourth axis control unit 35d and capable of writing the macro data 75.

この場合、第2軸制御ロジック回路32における第2命令解析部34、第3及び第4軸制御部35c,35d、並びに、第3及び第4RAM36c,36dは、上述した第1軸制御ロジック回路31における第1命令解析部33、第1及び第2軸制御部35a,35b、並びに、第1及び第2RAM36a,36bと、駆動制御するモータ38の軸が異なること以外は実質的に同様に形成されている。   In this case, the second command analysis unit 34, the third and fourth axis control units 35c and 35d, and the third and fourth RAMs 36c and 36d in the second axis control logic circuit 32 are the same as the first axis control logic circuit 31 described above. The first command analysis unit 33, the first and second axis control units 35a and 35b, and the first and second RAMs 36a and 36b are substantially the same except that the axes of the motors 38 to be driven are different. ing.

また本実施形態において、第1及び第2軸制御ロジック回路31,32の各軸制御部35a〜35dから出力する指令パルスの信号は、外部機器インターフェイス回路25を介して、X軸、Y軸、Z軸及びA軸のそれぞれ対応するドライバユニット39に送られる。また、例えばパルス駆動モータ38がサーボモータである場合は、図示しないエンコーダで検知される回転角や回転速度の情報がフィードバック信号として、各ドライバユニット39から外部機器インターフェイス回路25を介して対応する各軸制御部35a〜35dに戻される。   In the present embodiment, the command pulse signals output from the axis control units 35 a to 35 d of the first and second axis control logic circuits 31 and 32 are transmitted via the external device interface circuit 25 to the X axis, Y axis, It is sent to the driver unit 39 corresponding to each of the Z axis and the A axis. For example, when the pulse drive motor 38 is a servo motor, information on the rotation angle and rotation speed detected by an encoder (not shown) is used as a feedback signal from each driver unit 39 via the external device interface circuit 25. It is returned to the axis controllers 35a to 35d.

このような本実施形態のコントローラユニット21において、ROM24に予め保持され、且つ、第1RAM36a〜第4RAM36dに書き込み可能なモーションコントロール用のマクロデータ(「モーションコントロールマクロ」とも言う)75は、図5及び図6に示すように、第1軸制御部35a〜第4軸制御部35dにそれぞれ所要の動作を行わせるために組み合わされた複数の実行命令77の集合体であり、1つのマクロデータ75は、各軸制御部35a〜35dが一連の動作を行うために設定される複数の実行命令77を予め順番に並べてマクロ化することによって形成されている。   In the controller unit 21 of this embodiment, macro data for motion control (also referred to as “motion control macro”) 75 that is stored in the ROM 24 in advance and can be written to the first RAM 36a to the fourth RAM 36d is shown in FIG. As shown in FIG. 6, the first axis control unit 35 a to the fourth axis control unit 35 d are aggregates of a plurality of execution instructions 77 combined to perform a required operation, and one macro data 75 is Each axis control unit 35a to 35d is formed by arranging a plurality of execution instructions 77 set in order to perform a series of operations in advance in order to make a macro.

このマクロデータ75を形成するそれぞれの実行命令77は、CPU22の処理によってリクエスト信号71から変換される実行命令と同様の構造(フォーマット)を有する。すなわち、マクロデータ75を形成する各実行命令77は、各軸制御部35a〜35dに動作を行わせるための8ビットのコマンドと、16ビットの第1データと、16ビットの第2データとを有する。なお、マクロデータ75を形成する実際の実行命令77は、CPU22で変換される実行命令と同様に、第2データ、第1データ、及びコマンドの順番で構成されている。   Each execution instruction 77 forming the macro data 75 has the same structure (format) as the execution instruction converted from the request signal 71 by the processing of the CPU 22. That is, each execution instruction 77 forming the macro data 75 includes an 8-bit command for causing the axis control units 35a to 35d to perform an operation, 16-bit first data, and 16-bit second data. Have. The actual execution instruction 77 that forms the macro data 75 is composed of the order of the second data, the first data, and the command, like the execution instruction converted by the CPU 22.

すなわち、本実施形態のマクロデータ75は、従来のモーションコントロールシステムでは制御ホスト10の制御プログラム11が予め備える複数の関数の代わりに、それらの複数の関数に対応した複数の実行命令77を順番に並べた集合体により形成されている。この複数の実行命令77の集合体であるマクロデータ75は、コントローラユニット21のROM24の領域に予め記憶されている。   That is, in the macro data 75 of this embodiment, in the conventional motion control system, a plurality of execution instructions 77 corresponding to a plurality of functions are sequentially provided instead of a plurality of functions provided in advance in the control program 11 of the control host 10. It is formed by an aggregate that is arranged. The macro data 75 that is an aggregate of the plurality of execution instructions 77 is stored in advance in the ROM 24 area of the controller unit 21.

この場合、1つのマクロデータ75を形成する実行命令77の個数は、各軸のパルス駆動モータ38に実行させる動作の内容に応じてそれぞれ設定される。
なお、本実施形態にて、マクロデータ75の書き込み先となる第1RAM36a〜第4RAM36dは、上述のように「0000」番地〜「4095」番地の4096個のアドレスをそれぞれ有しており、1つのアドレスには、1つの実行命令77が書き込まれる。すなわち、各RAMに同時に書き込むことが可能な実行命令77の個数は、最大で4096個であるため、1つのマクロデータ75を形成する実行命令77の個数は、4096個以下に制限される。
In this case, the number of execution instructions 77 forming one macro data 75 is set according to the content of the operation to be executed by the pulse drive motor 38 of each axis.
In the present embodiment, the first RAM 36a to the fourth RAM 36d to which the macro data 75 is written have 4096 addresses from “0000” to “4095” as described above. One execution instruction 77 is written to the address. That is, since the maximum number of execution instructions 77 that can be simultaneously written in each RAM is 4096, the number of execution instructions 77 forming one macro data 75 is limited to 4096 or less.

また本実施形態では、図6に示したように、X軸用のマクロデータ75、Y軸用のマクロデータ75、Z軸用のマクロデータ75、及びA軸用のマクロデータ75といった4軸分のマクロデータ75が一つにまとめられることにより1枚のシートデータ76が形成されており、4軸分のマクロデータ75が1つに組み合わされたシートデータ76の形態でROM24に保持されている。この1枚のシートデータ76に収容されるX軸用のマクロデータ75、Y軸用のマクロデータ75、Z軸用のマクロデータ75、及びA軸用のマクロデータ75は、各軸で互いに異なる動作を実行させることが可能である。   In this embodiment, as shown in FIG. 6, four-axis data such as macro data 75 for the X axis, macro data 75 for the Y axis, macro data 75 for the Z axis, and macro data 75 for the A axis. The sheet data 76 is formed by combining the macro data 75 into one, and is stored in the ROM 24 in the form of sheet data 76 in which the macro data 75 for the four axes are combined into one. . The X-axis macro data 75, the Y-axis macro data 75, the Z-axis macro data 75, and the A-axis macro data 75 accommodated in the single sheet data 76 are different from each other. It is possible to execute an operation.

この場合、ROM24は、4軸分のマクロデータ75が組み合わされた複数枚分のシートデータ76を記憶することが可能な容量を有しており、例えば本実施形態の場合、15枚分のシートデータ76をROM24に記憶することが可能である。なお、本発明において、ROM24に記憶させることが可能なシートデータ76の枚数(すなわち、ROM24の記憶容量)は特に限定されるものではなく、任意に変更することが可能である。   In this case, the ROM 24 has a capacity capable of storing a plurality of sheets of sheet data 76 in which macro data 75 for four axes is combined. For example, in the case of the present embodiment, the ROM 24 has 15 sheets. Data 76 can be stored in the ROM 24. In the present invention, the number of sheet data 76 that can be stored in the ROM 24 (that is, the storage capacity of the ROM 24) is not particularly limited, and can be arbitrarily changed.

また、1枚のシートデータ76を形成するX軸用のマクロデータ75、Y軸用のマクロデータ75、Z軸用のマクロデータ75、及びA軸用のマクロデータ75は、上述のように4つの軸が互いに異なる動作を行うものの、4つの軸が相互に対応する一連の動作を行うように組み合わせることによって、例えば後述するように、制御ホスト10から送信するリクエスト信号71に従って、ROM24内のマクロデータ75を第1RAM36a〜第4RAM36dのそれぞれに展開して書き込む際に、制御ホスト10からのリクエスト信号71の送信回数を少なくしてマクロデータ75の展開を効率的に行うことができる。更に、4つの軸が相互に対応する動作を行うように予め組み合わされているため、4軸のパルス駆動モータ38の同期精度も高められる。   The X-axis macro data 75, the Y-axis macro data 75, the Z-axis macro data 75, and the A-axis macro data 75 forming one sheet data 76 are 4 as described above. Although the four axes perform different operations, the four axes perform a series of operations corresponding to each other, so that, for example, as will be described later, the macro in the ROM 24 is set according to a request signal 71 transmitted from the control host 10. When the data 75 is expanded and written in each of the first RAM 36a to the fourth RAM 36d, the macro data 75 can be efficiently expanded by reducing the number of transmissions of the request signal 71 from the control host 10. Furthermore, since the four axes are preliminarily combined so as to perform operations corresponding to each other, the synchronization accuracy of the four-axis pulse drive motor 38 is also improved.

なお、1枚のシートデータ76に組み合わされる4軸分のマクロデータ75は、互いに対応する動作を行わないものであっても良い。また、1枚のシートデータ76には、4軸分のマクロデータ75ではなく、4軸のうちの1軸分、2軸分、又は3軸分のマクロデータ75のみが収容されていても良い。例えば、第1及び第2シートのシートデータ76には4軸分のマクロデータ75が収容されており、第3シートのシートデータ76には、X軸とY軸の2軸分のマクロデータ75のみが収容されていても良い。   Note that the macro data 75 for four axes combined with one sheet data 76 may not perform operations corresponding to each other. Further, one sheet data 76 may contain only macro data 75 for one axis, two axes, or three axes of the four axes instead of the macro data 75 for four axes. . For example, the macro data 75 for four axes is stored in the sheet data 76 of the first and second sheets, and the macro data 75 for two axes of the X axis and the Y axis is stored in the sheet data 76 of the third sheet. Only may be accommodated.

更に、ROM24に複数枚分のシートデータ76を記憶する場合、シートデータ76の1枚1枚毎に、4軸のパルス駆動モータ38に実行させる動作パターンが異なる4軸分のマクロデータ75を持たせることができる。例えばROM24に、第1シート〜第15シートまでの15枚分のシートデータ76を保持する場合では、第1シートのシートデータ76は4つのパルス駆動モータ38が動作パターンAで相互に対応する動作を行う4軸分のマクロデータ75を有し、第2シートのシートデータ76は4つのパルス駆動モータ38が動作パターンBで相互に対応する動作を行う4軸分のマクロデータ75を有することが可能であり、それによって、1つのROM24に、4軸のパルス駆動モータ38について15種類の動作パターンを記憶させておくことが可能となる。   Further, when a plurality of sheets of sheet data 76 are stored in the ROM 24, macro data 75 for four axes having different operation patterns to be executed by the four-axis pulse drive motor 38 is provided for each sheet of sheet data 76. Can be made. For example, when the sheet data 76 for 15 sheets from the first sheet to the fifteenth sheet is held in the ROM 24, the sheet data 76 of the first sheet is an operation that the four pulse drive motors 38 correspond to each other in the operation pattern A. The second-sheet sheet data 76 includes four-axis macro data 75 in which the four pulse drive motors 38 perform corresponding operations in the operation pattern B. It is possible to store 15 types of operation patterns for the 4-axis pulse drive motor 38 in one ROM 24.

また、1枚のシートデータ76には、上述のようにX軸、Y軸、Z軸、及びA軸の4軸分のマクロデータ75が保持されているが、1枚のシートデータ76の各軸に収容されるマクロデータ75の個数は、1つであっても、複数であっても良い。   Further, as described above, the macro data 75 for the four axes of the X axis, the Y axis, the Z axis, and the A axis is held in one sheet data 76. The number of macro data 75 accommodated on the shaft may be one or plural.

例えば図6に本実施形態のシートデータ76の一例を示したように、1枚のシートデータ76は、第1RAM36a〜第4RAM36dに対応して、「0000」番地〜「4095」番地の4096個のアドレス×4軸分の容量を有しており、この1枚のシートデータ76の各軸に、最大で4096個の実行命令77(全体で4096個×4軸分の実行命令77)をそれぞれ保持することが可能である。   For example, as shown in FIG. 6 as an example of the sheet data 76 of this embodiment, one sheet data 76 corresponds to the first RAM 36a to the fourth RAM 36d and has 4096 addresses from “0000” to “4095”. It has a capacity for address x 4 axes, and holds up to 4096 execution instructions 77 (total of 4096 execution instructions 77 for 4 axes) on each axis of this sheet data 76. Is possible.

更に、このシートデータ76のX軸には、複数の実行命令77をマクロ化した1つのマクロデータ75が保持されており、Y軸、Z軸、及びA軸には、それぞれ、複数の実行命令77をマクロ化したマクロデータ75が2つずつ保持されている。   Further, the X axis of the sheet data 76 holds a single macro data 75 obtained by converting a plurality of execution instructions 77 into a macro, and each of the Y axis, the Z axis, and the A axis has a plurality of execution instructions. Two pieces of macro data 75 obtained by converting 77 into a macro are stored.

すなわち、1枚のシートデータ76の各軸には、マクロデータ75を形成する実行命令77の合計の個数が4096個以下となれば、1つのマクロデータ75のみを保持することもできるし、2つ以上の複数のマクロデータ75を保持することもできる。   That is, only one macro data 75 can be held in each axis of one sheet data 76 if the total number of execution instructions 77 forming the macro data 75 is 4096 or less. A plurality of macro data 75 can be held.

またこの場合、各軸のマクロデータ75を任意のアドレスの領域に設定することが可能であり、特に、4つの軸が相互に対応した動作を実行するように、各軸のマクロデータ75を互いに対応する所定のアドレスの領域に設定することができる。   In this case, it is possible to set the macro data 75 of each axis in an area of an arbitrary address, and in particular, the macro data 75 of each axis is mutually set so that the four axes execute operations corresponding to each other. A corresponding predetermined address area can be set.

例えば図6の一番に上に示したシートデータ76では、制御ホスト10からのリクエスト信号71で4つの軸の動作を同時にスタートさせることが可能なように、各軸のマクロデータ75は、それぞれ「0000」番地のアドレスから実行命令77を保持するように設定されている。   For example, in the sheet data 76 shown at the top of FIG. 6, the macro data 75 of each axis is respectively set so that the operation of the four axes can be started simultaneously by the request signal 71 from the control host 10. The execution instruction 77 is set to be held from the address “0000”.

従って、図6のシートデータ76のマクロデータ75を、第1及び第2軸制御ロジック回路31,32の第1RAM36a〜第4RAM36dに対し、図5に示したように展開してそれぞれ書き込み、その後、制御ホスト10から、マクロデータ75を自動実行させるためのリクエスト信号71を送信することによって、各軸制御部35a〜35dは、対応する各RAM36a〜36dに書き込まれたマクロデータ75に従って、実行命令77を「0000」番地のアドレスから同じタイミングで順番に自動実行することができる。それにより、各軸のパルス駆動モータ38a〜38dに所定の動作を安定して行わせることができるとともに、各軸の動作を他の軸と容易に同期させることができる。   Accordingly, the macro data 75 of the sheet data 76 in FIG. 6 is developed and written in the first RAM 36a to the fourth RAM 36d of the first and second axis control logic circuits 31 and 32 as shown in FIG. By transmitting a request signal 71 for automatically executing the macro data 75 from the control host 10, each axis control unit 35a to 35d executes an execution instruction 77 according to the macro data 75 written in the corresponding RAM 36a to 36d. Can be automatically executed in order from the address “0000” at the same timing. Thereby, the pulse drive motors 38a to 38d of each axis can stably perform a predetermined operation, and the operation of each axis can be easily synchronized with other axes.

またこの場合、図6のシートデータ76のY軸には、2つのマクロデータ75が間隔を開けて設定されている。従って、Y軸の第2パルス駆動モータ38bは、他の軸のパルス駆動モータ38と同じタイミングで、最初のマクロデータ75に従って所定の動作をスタートさせることができ、更に、最初のマクロデータ75の動作が終了した後に所定の時間が経過してから、次のマクロデータ75に従って所定の動作を実行することが可能となる。   In this case, two macro data 75 are set at an interval on the Y axis of the sheet data 76 in FIG. Therefore, the second pulse drive motor 38b for the Y axis can start a predetermined operation according to the first macro data 75 at the same timing as the pulse drive motor 38 for the other axes. It is possible to execute a predetermined operation according to the next macro data 75 after a predetermined time elapses after the operation ends.

更に、図6のシートデータ76のZ軸及びA軸には、2つのマクロデータ75が連続的に設定されている。従って、Z軸及びA軸の第3及び第4パルス駆動モータ38c,38dは、X軸及びY軸の第1及び第2パルス駆動モータ38a,38bと同じタイミングで、最初のマクロデータ75に従って所定の動作をスタートさせることができ、更に、最初のマクロデータ75の動作が終了した直後に次のマクロデータ75に従って所定の動作を連続的に実行することが可能となる。   Further, two macro data 75 are continuously set on the Z-axis and the A-axis of the sheet data 76 in FIG. Therefore, the third and fourth pulse drive motors 38c and 38d for the Z axis and the A axis are predetermined according to the first macro data 75 at the same timing as the first and second pulse drive motors 38a and 38b for the X axis and the Y axis. In addition, immediately after the operation of the first macro data 75 is completed, a predetermined operation can be continuously executed according to the next macro data 75.

また図1に示したように、本実施形態のモーションコントロールシステム1には、制御ホスト10の制御下に、第1スレーブ20の4軸コントローラユニット21の他に、第2スレーブ40となるコントローラドライバユニット41と、第3スレーブ60となるデジタルI/Oユニット61とが接続されている。   As shown in FIG. 1, the motion control system 1 of the present embodiment includes a controller driver that becomes the second slave 40 in addition to the four-axis controller unit 21 of the first slave 20 under the control of the control host 10. The unit 41 and the digital I / O unit 61 that is the third slave 60 are connected.

第2スレーブ40のコントローラドライバユニット41は、第5パルス駆動モータ38e及び第6パルス駆動モータ38fを駆動させるためのコントローラ機能とドライバ機能とを一体的に備えており、コントローラ機能を発揮するコントローラ部分については、第1スレーブ20の4軸コントローラユニット21を2軸用に変更すること以外は、第1スレーブ20のコントローラユニット21と実質的に同様に形成されている。   The controller driver unit 41 of the second slave 40 is integrally provided with a controller function and a driver function for driving the fifth pulse driving motor 38e and the sixth pulse driving motor 38f. Is substantially the same as the controller unit 21 of the first slave 20 except that the four-axis controller unit 21 of the first slave 20 is changed to the two-axis type.

すなわち、第2スレーブ40のコントローラドライバユニット41にも、複数のマクロデータ75を保持する図示しないROMと、そのROM内のマクロデータ75を書き込むことが可能な図示しない第5RAM及び第6RAMとが設けられている。   That is, the controller driver unit 41 of the second slave 40 also includes a ROM (not shown) that holds a plurality of macro data 75 and a fifth RAM and a sixth RAM (not shown) that can write the macro data 75 in the ROM. It has been.

第3スレーブ60のデジタルI/Oユニット61には、各種のセンサやエアシリンダなどの外部機器62が接続されており、制御ホスト10からのリクエスト信号71を受信して外部機器62に信号を出力する機能や、外部機器62からの信号を入力して制御ホスト10に送信する機能を有する。   The digital I / O unit 61 of the third slave 60 is connected to an external device 62 such as various sensors and air cylinders, and receives a request signal 71 from the control host 10 and outputs a signal to the external device 62. And a function of inputting a signal from the external device 62 and transmitting it to the control host 10.

また、デジタルI/Oユニット61に接続されるセンサ等の外部機器62は、機械設備等の制御対象の状態を検出するとともに、その検出した情報をデジタルI/Oユニット61に入力し、また、デジタルI/Oユニット61からの出力信号に応答して制御対象を作動させる動作を行うことが可能である。この場合、本実施形態のデジタルI/Oユニット61では、外部機器62の接続を32点まで拡張することが可能である。なお、本発明において、外部機器62の接続点数は特に限定されるものではない。   In addition, an external device 62 such as a sensor connected to the digital I / O unit 61 detects the state of a control target such as mechanical equipment and inputs the detected information to the digital I / O unit 61. In response to an output signal from the digital I / O unit 61, it is possible to perform an operation for operating the control target. In this case, in the digital I / O unit 61 of this embodiment, the connection of the external device 62 can be expanded to 32 points. In the present invention, the number of connection points of the external device 62 is not particularly limited.

次に、本実施形態のモーションコントロールシステム1における動作制御について説明する。なお、本実施形態では、第1スレーブ20の4軸コントローラユニット21の制御について主に説明することとし、制御の仕方が第1スレーブ20と実質的に同様となる第2スレーブ40のコントローラドライバユニット41、及び、パルス駆動モータ38が接続されていない第3スレーブ60のデジタルI/Oユニット61の制御に関する説明については省略する。   Next, operation control in the motion control system 1 of the present embodiment will be described. In the present embodiment, the control of the four-axis controller unit 21 of the first slave 20 will be mainly described. The controller driver unit of the second slave 40 whose control method is substantially the same as that of the first slave 20. 41 and the description regarding the control of the digital I / O unit 61 of the third slave 60 to which the pulse drive motor 38 is not connected is omitted.

本実施形態のモーションコントロールシステム1では、制御ホスト10及び4軸コントローラユニット21の電源を入れると、先ず、コントローラユニット21の第1RAM36a〜第4RAM36dを自動的に初期化する。一方、コントローラユニット21のROM24は、コントローラユニット21の電源が切られても、そこに記憶されているデータが消去されないため、ROM24には、予め記憶させておいた図6に示すような第1シート〜第4シートの4枚分のシートデータ76が保存されているとともに、それぞれのシートデータ76には、X軸、Y軸、Z軸及びA軸の4軸分のマクロデータ75が収容されている。   In the motion control system 1 of the present embodiment, when the control host 10 and the 4-axis controller unit 21 are turned on, first, the first RAM 36a to the fourth RAM 36d of the controller unit 21 are automatically initialized. On the other hand, since the data stored in the ROM 24 of the controller unit 21 is not erased even when the power of the controller unit 21 is turned off, the first ROM as shown in FIG. Sheet data 76 for four sheets from the sheet to the fourth sheet is stored, and each sheet data 76 stores macro data 75 for four axes of the X axis, the Y axis, the Z axis, and the A axis. ing.

なお、ROM24内のシートデータ76やマクロデータ75については、制御ホスト10の制御プログラム11で所定の関数を実行することにより、ROM24に新たなシートデータ76を追加すること、既に保持されているシートデータ76やマクロデータ75の一部又は全部を変更すること、及び、既に保持されているシートデータ76を削除すること等の処理を行うことができる。   As for the sheet data 76 and macro data 75 in the ROM 24, new sheet data 76 is added to the ROM 24 by executing a predetermined function in the control program 11 of the control host 10, and already held sheets. Processing such as changing part or all of the data 76 and the macro data 75 and deleting the already held sheet data 76 can be performed.

第1RAM36a〜第4RAM36dを初期化した後、制御ホスト10は、制御プログラム11にて、所要のシートデータ76における4軸分のマクロデータ75を第1RAM36a〜第4RAM36dに書き込むようにする関数を実行する。具体的には、ROM24に保持している第1シート〜第4シートの4枚分のシートデータ76から、これから実行する動作パターンのマクロデータ75を備える所要の1枚のシートデータ76(例えば第1シートのシートデータ76)を選択するとともに、その選択したシートデータ76に収容されているX軸、Y軸、Z軸及びA軸の各マクロデータ75を、第1RAM36a〜第4RAM36dに展開して書き込むように指示する関数を実行する。   After initializing the first RAM 36a to the fourth RAM 36d, the control host 10 executes a function for causing the control program 11 to write the macro data 75 for the four axes in the required sheet data 76 to the first RAM 36a to the fourth RAM 36d. . Specifically, one sheet data 76 (for example, the first sheet data) including the macro data 75 of the operation pattern to be executed from the sheet data 76 for four sheets of the first sheet to the fourth sheet held in the ROM 24. 1 sheet data 76) is selected, and the X-axis, Y-axis, Z-axis, and A-axis macro data 75 stored in the selected sheet data 76 are expanded to the first RAM 36a to the fourth RAM 36d. Executes a function that instructs to write.

これにより、制御ホスト10は、関数を実行した制御プログラム11からデバイスドライバ12に内部信号が送られ、更に、デバイスドライバ12にてマクロデータ75の書き込みを指示するリクエスト信号71(図3を参照)を生成し、そのリクエスト信号71をデバイスドライバ12から送信する。   As a result, the control host 10 receives an internal signal from the control program 11 that has executed the function to the device driver 12, and further requests the device driver 12 to write the macro data 75 (see FIG. 3). And the request signal 71 is transmitted from the device driver 12.

デバイスドライバ12から送信されたリクエスト信号71は、シリアル通信インターフェイスユニット70を経由して、第1スレーブ20〜第3スレーブ60の各ユニットに一斉に送られる。このとき、4軸コントローラユニット21は、そのリクエスト信号71を通信制御部23で受信し、更に、その受信したリクエスト信号71をCPU22で解析する。   The request signal 71 transmitted from the device driver 12 is sent all at once to each unit of the first slave 20 to the third slave 60 via the serial communication interface unit 70. At this time, the 4-axis controller unit 21 receives the request signal 71 by the communication control unit 23, and further analyzes the received request signal 71 by the CPU 22.

コントローラユニット21のCPU22は、そのリクエスト信号71が4軸コントローラユニット21に対する信号であることを確認するとともに、そのリクエスト信号71の内容を解析する。更に、CPU22は、受信したリクエスト信号71のリクエストコード71d及びリクエストデータ71eの内容に従って、ROM24に保持されている4枚のシートデータ76から、指定された所要の1枚のシートデータ76(例えば第1シートのシートデータ76)を読み出し、更に、読み出したシートデータ76に収容されているX軸、Y軸、Z軸及びA軸の4軸分のマクロデータ75を、それぞれ対応する第1RAM36a〜第4RAM36dに展開して書き込む処理を行う。   The CPU 22 of the controller unit 21 confirms that the request signal 71 is a signal for the 4-axis controller unit 21 and analyzes the content of the request signal 71. Further, the CPU 22 selects one specified sheet data 76 (for example, the first number) from the four sheet data 76 stored in the ROM 24 according to the contents of the request code 71d and the request data 71e of the received request signal 71. Sheet data 76) of one sheet, and the macro data 75 corresponding to four axes of the X axis, the Y axis, the Z axis, and the A axis stored in the read sheet data 76 are respectively corresponding to the first RAM 36a to A process of developing and writing in the 4RAM 36d is performed.

その後、第1RAM36a〜第4RAM36dへのマクロデータ75の書き込みが終了すると、CPU22は、マクロデータ75の書き込みが終了した内容のアンサーバック信号72(図4を参照)を生成して通信制御部23から送信する。このアンサーバック信号72は、4軸コントローラユニット21から、シリアル通信インターフェイスユニット70を経由して、制御ホスト10に送られる。   Thereafter, when the writing of the macro data 75 to the first RAM 36a to the fourth RAM 36d is completed, the CPU 22 generates an answer back signal 72 (see FIG. 4) with the content of the writing of the macro data 75 completed, and then from the communication control unit 23. Send. The answer back signal 72 is sent from the 4-axis controller unit 21 to the control host 10 via the serial communication interface unit 70.

制御ホスト10では、送られてきたアンサーバック信号72をデバイスドライバ12で受信して解析することによって、エラーが生じずにマクロデータ75の書き込み処理が正常に完了したことを確認でき、またそれによって、制御ホスト10から次のリクエスト信号71を送ることが可能となる。   In the control host 10, the received answerback signal 72 is received and analyzed by the device driver 12, thereby confirming that the writing process of the macro data 75 has been normally completed without causing an error. The next request signal 71 can be sent from the control host 10.

続いて、制御ホスト10は、第1RAM36a〜第4RAM36dに書き込まれたマクロデータ75に従って、第1軸制御部35a〜第4軸制御部35dが、例えば「0000」番地から所定番地までのアドレスの実行命令77を順番に自動実行するように指示する関数を実行し、その自動実行を指示するリクエスト信号71をデバイスドライバ12から送信する。   Subsequently, in accordance with the macro data 75 written in the first RAM 36a to the fourth RAM 36d, the control host 10 causes the first axis control unit 35a to the fourth axis control unit 35d to execute addresses from “0000” to a predetermined address, for example. A function for instructing to automatically execute the instructions 77 in order is executed, and a request signal 71 instructing the automatic execution is transmitted from the device driver 12.

このリクエスト信号71を、シリアル通信インターフェイスユニット70を経由して、4軸コントローラユニット21が受信することにより、同コントローラユニット21のCPU22は、そのリクエスト信号71が4軸コントローラユニット21に対する信号であることを確認するとともに、そのリクエスト信号71の内容を解析する。   When the 4-axis controller unit 21 receives the request signal 71 via the serial communication interface unit 70, the CPU 22 of the controller unit 21 confirms that the request signal 71 is a signal for the 4-axis controller unit 21. And the contents of the request signal 71 are analyzed.

更に、CPU22は、受信したリクエスト信号71をコマンドと第1及び第2データとからなる実行命令に変換し、その変換した実行命令を第1及び第2軸制御ロジック回路31,32に送るとともに、制御ホスト10に対するアンサーバック信号72を生成して通信制御部23から送信する。   Further, the CPU 22 converts the received request signal 71 into an execution instruction composed of a command and first and second data, and sends the converted execution instruction to the first and second axis control logic circuits 31 and 32. An answerback signal 72 for the control host 10 is generated and transmitted from the communication control unit 23.

また、実行命令を受けた第1及び第2軸制御ロジック回路31,32では、第1及び第2命令解析部33,34でその実行命令を解析するとともに、それぞれのRAMインターフェイス処理によって、第1軸制御部35a〜第4軸制御部35dに、第1RAM36a〜第4RAM36dに書き込まれたマクロデータ75に従って、「0000」番地のアドレスから順番に実行命令77を自動的に実行する処理を行わせることができる。   In addition, the first and second axis control logic circuits 31 and 32 that have received the execution command analyze the execution command by the first and second command analysis units 33 and 34, and the first and second axis control logic circuits 31 and 32 receive the first command by the respective RAM interface processes. The axis control unit 35a to the fourth axis control unit 35d are caused to perform a process of automatically executing the execution instruction 77 sequentially from the address “0000” in accordance with the macro data 75 written in the first RAM 36a to the fourth RAM 36d. Can do.

具体的には、第1軸制御部35a〜第4軸制御部35dは、第1RAM36a〜第4RAM36dに書き込まれたマクロデータ75の「0000」番地のアドレスから実行命令77を読み出して実行し、更に、「0000」番地の実行命令77を実行した直後に、そのアドレスの番地+1のアドレス(すなわち、「0001」番地のアドレス)から実行命令77を読み出して実行し、以下、これを繰り返す。   Specifically, the first axis control unit 35a to the fourth axis control unit 35d read and execute the execution instruction 77 from the address “0000” of the macro data 75 written in the first RAM 36a to the fourth RAM 36d. Immediately after executing the execution instruction 77 at the address “0000”, the execution instruction 77 is read out from the address at the address + 1 (ie, the address at the address “0001”) and executed.

これによって、第1軸制御部35a〜第4軸制御部35dは、それぞれのRAMインターフェイス機能による自動実行処理中は、制御ホスト10とコントローラユニット21との間でリクエスト信号71やアンサーバック信号72の送受信を行わずに、第1RAM36a〜第4RAM36dに書き込まれたマクロデータ75に従って実行命令77をそれぞれ順番に読み出して自動的に実行することができ、またそれによって、ユーザーの設定条件で指令パルスを発生させて、第1パルス駆動モータ38a〜第4パルス駆動モータ38dに所要の動作を行わせることができる。   As a result, the first axis control unit 35a to the fourth axis control unit 35d allow the request signal 71 and the answerback signal 72 to be transmitted between the control host 10 and the controller unit 21 during the automatic execution process by the respective RAM interface functions. Without executing transmission / reception, the execution instructions 77 can be read out in order according to the macro data 75 written in the first RAM 36a to the fourth RAM 36d and automatically executed, thereby generating a command pulse in accordance with user setting conditions. Thus, the first pulse driving motor 38a to the fourth pulse driving motor 38d can perform a required operation.

そして、第1及び第2軸制御ロジック回路31,32は、各RAMインターフェイス処理によって、第1RAM36a〜第4RAM36dに書き込まれたマクロデータ75が所定番地のアドレスの実行命令77まで行われると、マクロデータ75の実行を自動的に停止させることができる。   When the macro data 75 written in the first RAM 36a to the fourth RAM 36d is executed up to the execution instruction 77 at the address of the predetermined address by each RAM interface process, the first and second axis control logic circuits 31 and 32 perform macro data. The execution of 75 can be automatically stopped.

なお、本実施形態では、例えば実行停止のコマンドを備えた実行命令77をマクロデータ75に含めることにより、マクロデータ75の自動実行を、実行停止のコマンドによって終了させることもでき、更に、制御ホスト10から実行停止のリクエスト信号71を送信することによって終了させることもできる。   In this embodiment, for example, by including an execution instruction 77 having an execution stop command in the macro data 75, the automatic execution of the macro data 75 can be terminated by the execution stop command. It can also be terminated by sending a stop request signal 71 from 10.

このように、本実施形態では、第1及び第2軸制御ロジック回路31,32の第1軸制御部35a〜第4軸制御部35dにマクロデータ75の実行命令77をそれぞれ自動実行させ、且つ自動停止させることにより、コントローラユニット21側において、制御ホスト10との通信を行わずに、各パルス駆動モータ38の一連の動作を軸制御部35a〜35dごとに自動的に行わせて完結させることができる。これによって、各軸制御部35a〜35dが独立して指令パルスの発生等の処理を行うことがきるため、軸制御部ごとの処理が円滑になるとともに、各パルス駆動モータ38の動作も安定させることができる。   Thus, in the present embodiment, the first axis control unit 35a to the fourth axis control unit 35d of the first and second axis control logic circuits 31 and 32 are each automatically executed with the execution instruction 77 of the macro data 75, and By automatically stopping, the controller unit 21 side automatically completes a series of operations of each pulse drive motor 38 for each of the axis controllers 35a to 35d without communicating with the control host 10. Can do. As a result, each of the axis control units 35a to 35d can independently perform processing such as generation of a command pulse, so that the processing for each axis control unit becomes smooth and the operation of each pulse drive motor 38 is also stabilized. be able to.

ここで、本実施形態のモーションコントロールシステム1と、図11に示した従来のモーションコントロールシステムとの違いを具体的に説明すると、例えば従来のモーションコントロールシステムにおいては、本実施形態のような一連の動作を4軸の各パルス駆動モータに行わせるために、制御ホストとコントローラユニット81との間の通信を、本実施形態のマクロデータ75を形成する実行命令77の個数以上の回数で行う必要があるとともに、その通信を行うたびに、制御ホストやコントローラユニット81においてリクエスト信号及びアンサーバック信号の処理を行ったり、実行命令を第1及び第2軸制御ロジック回路91,92に書き込む処理を行ったりしなければならなかった。このため、前述したように、制御ホストへの負担の増大、実行処理時間の制約、システムの高速化の限界等の問題があった。   Here, the difference between the motion control system 1 of the present embodiment and the conventional motion control system shown in FIG. 11 will be described in detail. For example, in the conventional motion control system, a series of processes as in the present embodiment is performed. In order to cause each of the four-axis pulse drive motors to perform the operation, it is necessary to perform communication between the control host and the controller unit 81 with the number of execution instructions 77 or more that form the macro data 75 of the present embodiment. In addition, every time the communication is performed, the control host and the controller unit 81 process the request signal and the answer back signal, and write the execution command to the first and second axis control logic circuits 91 and 92. Had to do. For this reason, as described above, there are problems such as an increase in the burden on the control host, restrictions on execution processing time, and limitations on speeding up the system.

これに対して、本実施形態のモーションコントロールシステム1では、上述のように、コントローラユニット21のROM24に、制御プログラム11の関数に対応する複数の実行命令77を備えたマクロデータ75を予め記憶させておくとともに、そのROM24に記憶したマクロデータ75を第1RAM36a〜第4RAM36dに書き込んで自動的に順番に実行させることができる。   In contrast, in the motion control system 1 of the present embodiment, as described above, the macro data 75 including a plurality of execution instructions 77 corresponding to the functions of the control program 11 is stored in the ROM 24 of the controller unit 21 in advance. In addition, the macro data 75 stored in the ROM 24 can be written in the first RAM 36a to the fourth RAM 36d and automatically executed in order.

これにより、本実施形態では、制御ホスト10とコントローラユニット21との間の通信回数を従来よりも少なくして、マクロデータ75に従った動作を完結させることができる。その上、第1スレーブ20や第2スレーブ40を動作させるための制御プログラム11の様々な関数を、実行命令77として、第1スレーブ20のコントローラユニット21に配されるROM24や、第2スレーブ40のユニットに配される図示しないROM等に分散して保持させることができる。   Thereby, in the present embodiment, the number of communications between the control host 10 and the controller unit 21 can be reduced as compared with the conventional case, and the operation according to the macro data 75 can be completed. In addition, various functions of the control program 11 for operating the first slave 20 and the second slave 40 are used as execution instructions 77 to execute the ROM 24 and the second slave 40 arranged in the controller unit 21 of the first slave 20. Can be distributed and held in a ROM or the like (not shown) disposed in the unit.

すなわち、本実施形態では制御プログラム11の複数の関数に対応した複数の実行命令77からなるマクロデータ75を、第1スレーブ20のROM24に保持しているため、従来に比べて、制御プログラム11をシンプルに構築することが可能となるとともに、制御プログラム11での関数実行による制御ホスト(PC)10への負担を低減することができる。   That is, in this embodiment, since the macro data 75 composed of a plurality of execution instructions 77 corresponding to a plurality of functions of the control program 11 is held in the ROM 24 of the first slave 20, the control program 11 is compared with the conventional case. A simple construction can be achieved, and the burden on the control host (PC) 10 due to the function execution by the control program 11 can be reduced.

また、制御ホスト10とコントローラユニット21の間の通信回数を大幅に減少できることにより、通信時間の低減や、制御ホスト10やコントローラユニット21における内部処理時間の低減を図ることができる。このため、制御ホスト10の負担を更に低減して、制御ホスト10の処理が遅くなることや、制御ホスト10及びコントローラユニット21の処理時間にバラつきや誤差を生じさせることを防止でき、更には、コントローラユニット21のリアルタイム性や4軸間の同期精度を向上させることができ、また、システムの高速化や機械装置の性能向上などを容易に実現できる。   In addition, since the number of communications between the control host 10 and the controller unit 21 can be significantly reduced, the communication time can be reduced and the internal processing time in the control host 10 and the controller unit 21 can be reduced. For this reason, it is possible to further reduce the burden on the control host 10 to prevent the processing of the control host 10 from being slowed, and to prevent variations and errors in the processing time of the control host 10 and the controller unit 21. The real-time property of the controller unit 21 and the synchronization accuracy between the four axes can be improved, and the system can be speeded up and the performance of the mechanical device can be easily improved.

更に、本実施形態のモーションコントロールシステム1では、上述のように、コントローラユニット21のROM24に、第1シート〜第4シートの4枚分のシートデータ76が保持されている。このため、例えば機械装置の処理対象物の変更等によって第1パルス駆動モータ38a〜第4パルス駆動モータ38dの動作パターンを変更する場合には、第1RAM36a〜第4RAM36dに既に書き込まれているマクロデータ75(例えば、第1シートのマクロデータ75)を、その他のシートのマクロデータ75(例えば、第2シートのマクロデータ75)に置き換える(上書きする)ことが可能である。   Furthermore, in the motion control system 1 of the present embodiment, the sheet data 76 for four sheets of the first sheet to the fourth sheet is held in the ROM 24 of the controller unit 21 as described above. For this reason, for example, when the operation pattern of the first pulse drive motor 38a to the fourth pulse drive motor 38d is changed by changing the processing object of the mechanical device, the macro data already written in the first RAM 36a to the fourth RAM 36d. 75 (for example, the macro data 75 of the first sheet) can be replaced (overwritten) with the macro data 75 of other sheets (for example, the macro data 75 of the second sheet).

このように第1RAM36a〜第4RAM36dに書き込むマクロデータ75のシートデータ76を切り替えることによって、第1パルス駆動モータ38a〜第4パルス駆動モータ38dが行う一連の動作パターンを容易に変更でき、また、制御ホスト10の制御プログラム11自体を変更する必要がない。更に、第1スレーブ20のコントローラユニット21内でシートデータ76の切り替えが行われるだけであるため、その第1スレーブ20の変更に伴う第2スレーブ40のコントローラドライバユニット41や、第3スレーブ60のデジタルI/Oユニット61への影響をなくす(又は小さくする)ことができる。   By switching the sheet data 76 of the macro data 75 to be written in the first RAM 36a to the fourth RAM 36d in this way, a series of operation patterns performed by the first pulse driving motor 38a to the fourth pulse driving motor 38d can be easily changed and controlled. There is no need to change the control program 11 itself of the host 10. Further, since the sheet data 76 is only switched in the controller unit 21 of the first slave 20, the controller driver unit 41 of the second slave 40 or the third slave 60 associated with the change of the first slave 20. The influence on the digital I / O unit 61 can be eliminated (or reduced).

更に本実施形態において、第1パルス駆動モータ38a〜第4パルス駆動モータ38dが行う動作パターンを部分的に変更する場合(例えば、X軸の第1パルス駆動モータ38a及びY軸の第2パルス駆動モータ38bの回転速度を部分的に変更する場合)には、制御ホスト10の制御プログラム11を用いて、コントローラユニット21のROM24に保存されているマクロデータ75の所要部分のみを書き換えることによって対応することが可能である。或いは、ROM24に保存されているマクロデータ75は書き換えずに、対応するRAM(例えば第1及び第2RAM36a,36b)に書き込まれたマクロデータ75の所要部分のみを書き換えることによって対応することも可能である。   Further, in the present embodiment, when the operation pattern performed by the first pulse drive motor 38a to the fourth pulse drive motor 38d is partially changed (for example, the X-axis first pulse drive motor 38a and the Y-axis second pulse drive). In the case of partially changing the rotation speed of the motor 38b), the control program 11 of the control host 10 is used to rewrite only the required portion of the macro data 75 stored in the ROM 24 of the controller unit 21. It is possible. Alternatively, the macro data 75 stored in the ROM 24 can be dealt with by rewriting only a required portion of the macro data 75 written in the corresponding RAM (for example, the first and second RAMs 36a and 36b) without rewriting. is there.

このように、変更が必要となるROM24内の又は各RAM36a,36b内のマクロデータ75のみを書き換えることによって、機械装置の動作を一部変更するといったマイナーチェンジを、例えば動作パターンを変更しない軸(例えばZ軸及びA軸)のマクロデータ75を変更せずに、また、制御ホスト10の制御プログラム11を変更せずに容易に行うことができる。更には、第2スレーブ40のコントローラドライバユニット41や、第3スレーブ60のデジタルI/Oユニット61への影響をなくす(又は小さくする)こともできる。   In this way, minor changes such as partially changing the operation of the mechanical device by rewriting only the macro data 75 in the ROM 24 or the RAMs 36a and 36b that need to be changed, for example, an axis that does not change the operation pattern (for example, Z-axis and A-axis) macro data 75 can be easily changed without changing the control program 11 of the control host 10. Further, the influence on the controller driver unit 41 of the second slave 40 and the digital I / O unit 61 of the third slave 60 can be eliminated (or reduced).

このように本実施形態のモーションコントロールシステム1では、第1RAM36a〜第4RAM36dに展開するシートデータ76の切り替えや、制御ホスト10の制御プログラム11によるROM24又は第1〜第4RAM36a〜36d内のマクロデータ75の書き換え等によって、制御ホスト10の制御プログラム11を変更することなく、また、第2スレーブ40及び第3スレーブ60へ影響を与えることなく(又は与える影響を小さくして)、第1〜第4パルス駆動モータ38a〜38dにおける動作パターンの変更や動作のマイナーチェンジ等を容易に行うことができる。   As described above, in the motion control system 1 of this embodiment, the sheet data 76 developed in the first RAM 36a to the fourth RAM 36d is switched, and the macro data 75 in the ROM 24 or the first to fourth RAMs 36a to 36d by the control program 11 of the control host 10 is used. Without changing the control program 11 of the control host 10 and without affecting the second slave 40 and the third slave 60 (or reducing the effect). It is possible to easily change the operation pattern and minor change of operation in the pulse drive motors 38a to 38d.

従って、本実施形態では、例えば一部の動作を変更する場合でも制御プログラムの変更が必要となる従来のモーションコントロールシステムに比べて、動作パターンの変更や動作のマイナーチェンジに要する労力、費用、時間を大きく低減でき、また、制御プログラム11にバグや欠陥等が生じるリスクを回避して、マイナーチェンジ等をローリスクで迅速に且つ低コストで行うことが可能となる。   Therefore, in this embodiment, for example, compared with a conventional motion control system that requires a change in the control program even when a part of the operation is changed, the labor, cost, and time required for the change of the operation pattern and the minor change of the operation are reduced. The risk can be greatly reduced, and the risk of bugs and defects occurring in the control program 11 can be avoided, and minor changes can be made quickly and at low cost with low risk.

なお、本実施形態では、第1軸制御部35a〜第4軸制御部35dがそれぞれのRAMインターフェイス機能によってマクロデータ75の自動実行を行う際に、マクロデータ75に従って「0000」番地のアドレスから順番に実行命令77を自動実行する場合について説明している。   In the present embodiment, when the first axis control unit 35a to the fourth axis control unit 35d automatically execute the macro data 75 by the respective RAM interface functions, the addresses from “0000” are sequentially assigned according to the macro data 75. The case where the execution instruction 77 is automatically executed is described.

しかし、本発明において、第1軸制御部35a〜第4軸制御部35dがマクロデータ75の自動実行をスタートさせるアドレスの番地は、制御ホスト10の制御プログラム11で任意に設定することができ、例えば第1軸制御部35a〜第4軸制御部35dを、第1RAM36a〜第4RAM36dに書き込まれたマクロデータ75について、アドレスの途中の任意の番地(例えば「1000」番地)の実行命令77から順番に自動実行させることも可能である。   However, in the present invention, the address at which the first axis control unit 35a to the fourth axis control unit 35d start the automatic execution of the macro data 75 can be arbitrarily set by the control program 11 of the control host 10, For example, the first axis control unit 35a to the fourth axis control unit 35d are arranged in order from the execution instruction 77 at an arbitrary address in the middle of the address (for example, address “1000”) for the macro data 75 written in the first RAM 36a to the fourth RAM 36d. Can be automatically executed.

また、第1軸制御部35a〜第4軸制御部35dにマクロデータ75の自動実行を行わせる場合、第1軸制御部35a〜第4軸制御部35dに、第1RAM36a〜第4RAM36dに書き込まれたマクロデータ75について、アドレスが互いに同じ番地の実行命令77から順番に自動実行させるだけでなく、互いに異なる番地の実行命令77から順番に自動実行させることも可能である。   In addition, when the macro data 75 is automatically executed by the first axis control unit 35a to the fourth axis control unit 35d, the first axis control unit 35a to the fourth axis control unit 35d are written in the first RAM 36a to the fourth RAM 36d. In addition, the macro data 75 can be automatically executed in order from the execution instructions 77 having different addresses, as well as being automatically executed in order from the execution instructions 77 having the same addresses.

更に、本実施形態では、ROM24に保持されているシートデータ76のマクロデータ75を第1RAM36a〜第4RAM36dに展開して書き込む際に、1枚のシートデータ76から第1RAM36a〜第4RAM36dにマクロデータ75を展開して書き込む場合について説明している。   Further, in the present embodiment, when the macro data 75 of the sheet data 76 held in the ROM 24 is expanded and written in the first RAM 36a to the fourth RAM 36d, the macro data 75 is transferred from one sheet data 76 to the first RAM 36a to the fourth RAM 36d. It explains the case of expanding and writing.

しかし、本発明では、ROM24内のシートデータ76からマクロデータ75を第1RAM36a〜第4RAM36dに展開して書き込む場合、第1軸制御部35a〜第4軸制御部35dごとに、複数のシートデータ76の中から所要のマクロデータ75を選択して、対応する第1RAM36a〜第4RAM36dに書き込むこともできる。例えば、第1RAM36aには、第1シートのシートデータ76に収容されているX軸のマクロデータ75を書き込み、第2RAM36b〜第4RAM36dには、第2シートのシートデータ76に収容されている各軸のマクロデータ75を展開して書き込むことも可能である。   However, in the present invention, when the macro data 75 is expanded and written from the sheet data 76 in the ROM 24 to the first RAM 36a to the fourth RAM 36d, a plurality of sheet data 76 is provided for each of the first axis control unit 35a to the fourth axis control unit 35d. Necessary macro data 75 can be selected from the above and written to the corresponding first RAM 36a to fourth RAM 36d. For example, the X-axis macro data 75 stored in the sheet data 76 of the first sheet is written in the first RAM 36a, and the axes stored in the sheet data 76 of the second sheet are written in the second RAM 36b to the fourth RAM 36d. It is also possible to develop and write the macro data 75.

更にまた、本実施形態では、第1〜第4パルス駆動モータ38a〜38dに所要の動作を行わせるために、上述のようにROM24に保持されているマクロデータ75を第1RAM36a〜第4RAM36dに書き込んで自動実行する方法の他に、従来と同様に、制御ホスト10の制御プログラム11にてその動作を行わせるための複数の関数を実行してリクエスト信号71をコントローラユニット21に送り、そのリクエスト信号71をコントローラユニット21のCPU22で実行命令に変換して、実行命令を第1及び第2軸制御ロジック回路31,32に順次書き込む方法を採用することが可能である。   Furthermore, in the present embodiment, in order to cause the first to fourth pulse drive motors 38a to 38d to perform a required operation, the macro data 75 held in the ROM 24 as described above is written to the first RAM 36a to the fourth RAM 36d. In addition to the method of automatically executing the process, a plurality of functions for causing the control program 11 of the control host 10 to perform the operation are executed and a request signal 71 is sent to the controller unit 21 in the same manner as in the prior art. It is possible to adopt a method in which 71 is converted into an execution instruction by the CPU 22 of the controller unit 21 and the execution instruction is sequentially written in the first and second axis control logic circuits 31 and 32.

すなわち、本実施形態では、第1〜第4パルス駆動モータ38a〜38dに所要の動作を行わせる場合に、ROM24に保持されているマクロデータ75を、第1RAM36a〜第4RAM36dに書き込んで自動実行する方法と、制御ホスト10の制御プログラム11で複数の関数を順番に実行する方法とから選択することが可能である。   That is, in the present embodiment, when the first to fourth pulse drive motors 38a to 38d perform required operations, the macro data 75 held in the ROM 24 is written into the first RAM 36a to the fourth RAM 36d and automatically executed. It is possible to select from a method and a method of executing a plurality of functions in order by the control program 11 of the control host 10.

更にこの場合、制御ホスト10の制御プログラム11で複数の関数を順番に実行して第1〜第4軸制御部35a〜35dを制御することによって、第1〜第4パルス駆動モータ38a〜38dに所要の動作を行わせることが可能であり、また、複数の関数を実行して第1RAM36a〜第4RAM36dに複数の実行命令77を書き込んで保存してから、第1RAM36a〜第4RAM36dに保存した複数の実行命令77をRAMインターフェイス処理で順番に自動実行することによって、第1〜第4パルス駆動モータ38a〜38dに所定の動作を行わせることも可能である。また本実施形態では、RAM36a〜36dの実行命令77を自動実行中に、制御ホスト10の制御プログラム11によって、その後に続くRAM36a〜36dの実行命令77を書き込むことも可能である。   Further, in this case, the first to fourth pulse drive motors 38a to 38d are controlled by the control program 11 of the control host 10 by sequentially executing a plurality of functions and controlling the first to fourth axis control units 35a to 35d. It is possible to perform a required operation, and after executing a plurality of functions and writing and storing a plurality of execution instructions 77 in the first RAM 36a to the fourth RAM 36d, a plurality of operations stored in the first RAM 36a to the fourth RAM 36d are stored. It is also possible to cause the first to fourth pulse drive motors 38a to 38d to perform a predetermined operation by automatically executing the execution command 77 sequentially in the RAM interface process. In the present embodiment, it is also possible to write the subsequent execution instructions 77 of the RAMs 36a to 36d by the control program 11 of the control host 10 while the execution instructions 77 of the RAMs 36a to 36d are automatically executed.

このように、本実施形態のモーションコントロールシステム1では、第1〜第4パルス駆動モータ38a〜38dに所要の動作を行わせる手段として、ROM24に保持するマクロデータ75と、制御ホスト10の制御プログラム11に持たせる関数とに互換性を持たせて、自由に選択することが可能となる。これにより、モーションコントロールシステム1の設計に大きな自由度を持たせることができ、それによって、ユーザーから要求される仕様に柔軟に対応することが可能となる。   As described above, in the motion control system 1 of the present embodiment, the macro data 75 stored in the ROM 24 and the control program of the control host 10 are used as means for causing the first to fourth pulse drive motors 38a to 38d to perform required operations. It is possible to freely select the function having compatibility with the function to be assigned to the function 11. Thereby, it is possible to give a great degree of freedom to the design of the motion control system 1, and thereby it is possible to flexibly cope with specifications required by the user.

以下に、上述した実施形態に係るモーションコントロールシステム1を用いて、第1スレーブ20のコントローラユニット21に接続されたX軸のパルス駆動モータ38aを、図7に示した所定の動作パターンで動作させる実施例を示す。更に、比較のために、図11に示したコントローラユニット81を有する従来のモーションコントロールシステムを用いて、X軸のパルス駆動モータを同様の動作パターンで動作させる比較例を示すことにより、本発明で得られる効果を明確に説明する。   The X-axis pulse drive motor 38a connected to the controller unit 21 of the first slave 20 is operated with the predetermined operation pattern shown in FIG. 7 using the motion control system 1 according to the embodiment described above. An example is shown. For comparison, a comparative example in which the X-axis pulse drive motor is operated in the same operation pattern using the conventional motion control system having the controller unit 81 shown in FIG. The effect obtained will be explained clearly.

ここで、図7に示したX軸のパルス駆動モータ38aの動作パターンについて説明すると、この動作パターンは、X軸のモータ38aに4回の台形駆動を実行させるものであり、先ず、第1パルス出力周期として500Hzで所定回数の第1パルス出力を行い、その後、1000Hzの速度でモータの台形駆動動作を開始し、5000Hzの最高速度まで100ms/kHzの割合で加速する。更に、モータを所定の位置まで最高速度で回転させた後、1000Hzの終了速度まで100ms/kHzの割合で減速することによって、1回分の台形駆動を終了させる。そして、このような台形状の駆動を4回連続して行った後に停止させる。   Here, the operation pattern of the X-axis pulse drive motor 38a shown in FIG. 7 will be described. This operation pattern causes the X-axis motor 38a to perform trapezoidal driving four times. First, the first pulse A first pulse is output a predetermined number of times at an output cycle of 500 Hz, and thereafter, a trapezoidal driving operation of the motor is started at a speed of 1000 Hz, and is accelerated to a maximum speed of 5000 Hz at a rate of 100 ms / kHz. Further, after rotating the motor to a predetermined position at the maximum speed, the motor is decelerated at a rate of 100 ms / kHz to an end speed of 1000 Hz, thereby completing one trapezoidal drive. Then, the trapezoidal driving is continuously performed four times and then stopped.

(実施例)
本実施例のモーションコントロールシステム1では、図2に示したコントローラユニット21のROM24に、X軸のパルス駆動モータ38aに図7に示した動作パターンを行わせるためのマクロデータ75が予め保持されている。ここで、X軸用のマクロデータ75の内容を図8に示す。
(Example)
In the motion control system 1 of the present embodiment, macro data 75 for causing the X-axis pulse drive motor 38a to perform the operation pattern shown in FIG. 7 is stored in advance in the ROM 24 of the controller unit 21 shown in FIG. Yes. Here, the contents of the X-axis macro data 75 are shown in FIG.

なお、図8のマクロデータ75はX軸の動作を行うものであり、その他のY軸、Z軸及びA軸についても、図示は省略するが所定の動作パターンを行わせるマクロデータ75がある。これらのX軸、Y軸、Z軸及びA軸の4軸分のマクロデータ75が1つのシートデータ76に収容されてROM24に保持されている。   Note that the macro data 75 in FIG. 8 is for performing an X-axis operation, and the other Y-axis, Z-axis, and A-axis include macro data 75 for performing a predetermined operation pattern although not shown. The macro data 75 for the four axes of the X axis, the Y axis, the Z axis, and the A axis is accommodated in one sheet data 76 and held in the ROM 24.

X軸のマクロデータ75は、コマンドと第1及び第2データからなる実行命令77として、以下のような内容をもつ複数の実行命令77が、「0000」番地のアドレスから、「0010」番地のアドレスまで順番に書き込まれている。   The X-axis macro data 75 is an execution instruction 77 composed of a command and first and second data, and a plurality of execution instructions 77 having the following contents are changed from the address “0000” to the address “0010”. The address is written in order.

具体的に説明すると、「0000」番地のアドレスには、第1パルスの出力周期を設定するための実行命令77が書き込まれており、「0001」番地のアドレスには、速度データの倍率と最高速度を設定するための実行命令77が書き込まれている。以下、「0002」番地〜「0010」番地の各アドレスには、開始速度と終了速度を設定するための実行命令77(アドレス「0002」)、直線加速割合と直線減速割合を設定するための実行命令77(アドレス「0003」)、指定した相対位置までパルス出力を実行する(言い換えると、1回の台形駆動を行う)ための4つの実行命令77(アドレス「0004」〜「0007」)、自動実行の終了を準備するための実行命令77(アドレス「0008」)、自動実行を終了するための実行命令77(アドレス「0009」)、及び、即時停止のための実行命令77(アドレス「0010」)が書き込まれている。   More specifically, an execution instruction 77 for setting the output period of the first pulse is written at the address “0000”, and the speed data magnification and maximum are set at the address “0001”. An execution instruction 77 for setting the speed is written. Hereinafter, an execution instruction 77 (address “0002”) for setting a start speed and an end speed is executed at each address of addresses “0002” to “0010”, and execution for setting a linear acceleration rate and a linear deceleration rate. Instruction 77 (address “0003”), four execution instructions 77 (addresses “0004” to “0007”) for executing pulse output to a specified relative position (in other words, performing one trapezoidal drive), automatic An execution instruction 77 (address “0008”) for preparing the end of execution, an execution instruction 77 (address “0009”) for ending automatic execution, and an execution instruction 77 (address “0010”) for immediate stop ) Is written.

そして、本実施例のモーションコントロールシステム1において、実際に図7に示した動作パターンをパルス駆動モータ38に行わせる場合、図9に示した関数の内容が制御ホストの制御プログラムで実行される。具体的に説明すると、先ず、制御ホスト10において、(1)番目の関数として、ROM24から上述した所定のシートデータ76を読み出し、そのシートデータ76に収容されている各軸のマクロデータ75を第1RAM36a〜第4RAM36dに展開して書き込むように指示する関数を制御プログラム11で実行し、1回目のリクエスト信号71をデバイスドライバ12から送信する。送信されたリクエスト信号71は、シリアル通信インターフェイスユニット70を介して、第1スレーブ20〜第3スレーブ60の各ユニットに一斉に送られる。   In the motion control system 1 of this embodiment, when the operation pattern shown in FIG. 7 is actually performed by the pulse drive motor 38, the contents of the function shown in FIG. 9 are executed by the control program of the control host. More specifically, first, the control host 10 reads the predetermined sheet data 76 described above from the ROM 24 as the (1) th function, and the macro data 75 of each axis contained in the sheet data 76 is read as the first function. The control program 11 executes a function for instructing to expand and write to the first RAM 36a to the fourth RAM 36d, and transmits the first request signal 71 from the device driver 12. The transmitted request signal 71 is sent simultaneously to each unit of the first slave 20 to the third slave 60 via the serial communication interface unit 70.

次に、コントローラユニット21は、1回目のリクエスト信号71を通信制御部23で受信し、更に、その受信したリクエスト信号71をCPU22で解析する。更に、CPU22は、受信したリクエスト信号71の内容に従って、ROM24から所定のシートデータ76を読み出し、そのシートデータ76に収容されている4軸のマクロデータ75を、それぞれ対応する第1RAM36a〜第4RAM36dに展開して書き込む処理を行う。その後、コントローラユニット21は、マクロデータ75の書き込みが終了した内容のアンサーバック信号72を生成し、シリアル通信インターフェイスユニット70を介して制御ホスト10に送信する。   Next, the controller unit 21 receives the first request signal 71 by the communication control unit 23, and further analyzes the received request signal 71 by the CPU 22. Further, the CPU 22 reads predetermined sheet data 76 from the ROM 24 in accordance with the contents of the received request signal 71, and stores the 4-axis macro data 75 stored in the sheet data 76 in the corresponding first RAM 36a to fourth RAM 36d. Process to expand and write. Thereafter, the controller unit 21 generates an answer-back signal 72 having the content of the completion of writing the macro data 75 and transmits it to the control host 10 via the serial communication interface unit 70.

続いて、アンサーバック信号72を受信した制御ホスト10は、(2)番目の関数として、第1RAM36a〜第4RAM36dに書き込まれたマクロデータ75に従って、「0000」番地のアドレスから実行命令77を順番に自動実行するように指示する関数を制御プログラム11で実行し、2回目のリクエスト信号71をデバイスドライバ12から送信する。   Subsequently, the control host 10 that has received the answer back signal 72 sequentially executes the execution instruction 77 from the address “0000” according to the macro data 75 written in the first RAM 36a to the fourth RAM 36d as the (2) th function. A function for instructing automatic execution is executed by the control program 11 and a second request signal 71 is transmitted from the device driver 12.

2回目のリクエスト信号71を受信したコントローラユニット21のCPU22は、受信したリクエスト信号71を、コマンドと第1及び第2データとからなる実行命令に変換し、その変換した実行命令を第1及び第2軸制御ロジック回路31,32に送るとともに、制御ホスト10に対するアンサーバック信号72を生成して通信制御部23から送信する。   The CPU 22 of the controller unit 21 that has received the second request signal 71 converts the received request signal 71 into an execution instruction composed of a command and first and second data, and the converted execution instruction is first and first. In addition to being sent to the biaxial control logic circuits 31 and 32, an answer back signal 72 for the control host 10 is generated and transmitted from the communication control unit 23.

また、実行命令を受けた第1軸制御ロジック回路31では、第1命令解析部33でその実行命令77を解析するとともに、RAMインターフェイス機能によって、第1軸制御部35a及び第2軸制御部35bに、第1RAM36a及び第2RAM36bに書き込まれたマクロデータ75に従ってアドレス「0000」番地から順番に実行命令77を自動的に実行する処理を行わせる。   Further, in the first axis control logic circuit 31 that has received the execution command, the first command analysis unit 33 analyzes the execution command 77, and by the RAM interface function, the first axis control unit 35a and the second axis control unit 35b. In addition, in accordance with the macro data 75 written in the first RAM 36a and the second RAM 36b, a process of automatically executing the execution instruction 77 in order from the address “0000” is performed.

これによって、第1軸制御部35aは、第1RAM36aのマクロデータ75に従って指令パルスを所定の条件で出力するとともに、指令パルスのカウントを行うができ、それにより、X軸のパルス駆動モータ38aを、図7に示した台形状の動作パターンで駆動させることができる。   As a result, the first axis control unit 35a can output a command pulse under a predetermined condition in accordance with the macro data 75 of the first RAM 36a and can count the command pulse, whereby the X-axis pulse drive motor 38a is It can be driven by the trapezoidal operation pattern shown in FIG.

(比較例)
図11に示したコントローラユニット81を備える従来のモーションコントロールシステムにおいて、図7に示した動作パターンをX軸のパルス駆動モータに行わせる場合について、図10を参照しながら説明する。ここで、図10は、制御ホストの制御プログラムが実行する関数の内容を説明する図である。
(Comparative example)
In the conventional motion control system including the controller unit 81 shown in FIG. 11, a case where the operation pattern shown in FIG. 7 is performed by the X-axis pulse drive motor will be described with reference to FIG. Here, FIG. 10 is a diagram illustrating the contents of functions executed by the control program of the control host.

先ず、制御ホストの制御プログラムで、(1)番目の第1パルスの出力周期を設定するための関数を実行し、1回目のリクエスト信号71をデバイスドライバから送信する。送信されたリクエスト信号71は、シリアル通信インターフェイスユニットを介して、第1スレーブ〜第3スレーブの各ユニットに一斉に送られる。   First, in the control program of the control host, a function for setting the output cycle of the (1) first pulse is executed, and the first request signal 71 is transmitted from the device driver. The transmitted request signal 71 is sent all at once to the first to third slave units via the serial communication interface unit.

コントローラユニット81は、1回目のリクエスト信号71を通信制御部83で受信し、更に、その受信したリクエスト信号71をCPU82で解析する。更に、CPU82は、受信したリクエスト信号71をコマンドと第1及び第2データとからなる実行命令に変換し、その変換した実行命令を第1及び第2軸制御ロジック回路91,92に送って各軸制御部95a〜95dに書き込むとともに、制御ホストに対するアンサーバック信号72を生成して通信制御部83から送信する。   The controller unit 81 receives the first request signal 71 by the communication control unit 83, and further analyzes the received request signal 71 by the CPU 82. Further, the CPU 82 converts the received request signal 71 into an execution instruction composed of a command and first and second data, and sends the converted execution instruction to the first and second axis control logic circuits 91 and 92. In addition to writing to the axis controllers 95a to 95d, an answer back signal 72 for the control host is generated and transmitted from the communication controller 83.

次に、アンサーバック信号72を受信した制御ホストは、(2)番目の速度データの倍率と最高速度を設定するための関数を制御プログラムで実行し、2回目のリクエスト信号71をデバイスドライバから送信する。また、コントローラユニット81は2回目のリクエスト信号71を受信し、その受信したリクエスト信号71を実行命令に変換して第1及び第2軸制御ロジック回路91,92の各軸制御部95a〜95dに書き込むとともに、アンサーバック信号72を生成して通信制御部83から送信する。   Next, the control host that has received the answerback signal 72 executes a function for setting the magnification and maximum speed of the (2) second speed data by the control program, and transmits the second request signal 71 from the device driver. To do. Further, the controller unit 81 receives the second request signal 71, converts the received request signal 71 into an execution command, and sends it to the axis control units 95a to 95d of the first and second axis control logic circuits 91 and 92. In addition to writing, an answer back signal 72 is generated and transmitted from the communication control unit 83.

以下同じように、制御ホストは、アンサーバック信号72の受信をまって、(3)番目の開始速度と終了速度を設定するための関数、(4)番目の直線加速割合と直線減速割合を設定するための関数、(5)番目の指定した相対位置までパルス出力を実行して1回目の台形駆動を行うための関数、(6)番目の指定した相対位置までパルス出力を実行して2回目の台形駆動を行うための関数、(7)番目の指定した相対位置までパルス出力を実行して3回目の台形駆動を行うための関数、(8)番目の指定した相対位置までパルス出力を実行して4回目の台形駆動を行うための関数を制御プログラムで順番に実行するとともに、制御プログラムで関数を実行する毎にリクエスト信号71をコントローラユニット81に送信する。   In the same manner, the control host receives the answer back signal 72 and sets (3) a function for setting the start speed and end speed, and (4) sets the linear acceleration rate and linear deceleration rate. (5) a function for executing pulse output to the first specified relative position and performing the first trapezoidal drive, and (6) executing a pulse output to the specified relative position for the second time. Function to perform the trapezoidal drive, (7) function to execute the pulse output to the third specified relative position and perform the third trapezoidal drive, (8) execute the pulse output to the specified relative position Then, a function for performing the fourth trapezoidal drive is executed in order by the control program, and a request signal 71 is transmitted to the controller unit 81 every time the function is executed by the control program.

また、コントローラユニット81では、リクエスト信号71を通信制御部83で受信する毎に、CPU82によるリクエスト信号71の解析、受信したリクエスト信号71から実行命令への変換、変換した実行命令の書き込み、受信したリクエスト信号71に対するアンサーバック信号72の送信といった処理が行われる。   Further, every time the communication control unit 83 receives the request signal 71, the controller unit 81 analyzes the request signal 71 by the CPU 82, converts the received request signal 71 into an execution instruction, writes the received execution instruction, and receives it. Processing such as transmission of the answerback signal 72 in response to the request signal 71 is performed.

すなわち、従来のモーションコントロールシステムで図7に示した動作パターンをX軸のパルス駆動モータに行わせるためには、制御ホストとコントローラユニット81間におけるリクエスト信号71及びアンサーバック信号72の送受信を合計8回行う必要があるとともに、コントローラユニット81内では、リクエスト信号71を受信するたびに、同じような内部処理を繰り返して行う必要がある。   That is, in order to cause the X-axis pulse drive motor to perform the operation pattern shown in FIG. 7 in the conventional motion control system, a total of 8 transmissions / receptions of the request signal 71 and the answerback signal 72 between the control host and the controller unit 81 are performed. In addition, the controller unit 81 needs to repeat the same internal process every time the request signal 71 is received.

以上のような実施例及び比較例を比べると、X軸のパルス駆動モータ38に、図7に示した同じ動作パターンを実行させる場合に、実施例に係るモーションコントロールシステム1では、比較例に係るモーションコントロールシステムに比べ、制御ホスト10とコントローラユニット21間の通信回数及び通信時間を減少させるとともに、制御ホスト10への負担を大幅に低減させることができる。更に、コントローラユニット21の第1軸制御部35aの動作を、RAMインターフェイス機能によってマクロデータ75に従って完結させることができるため、第1軸制御部35aによる指令パルスの発生を安定して円滑に行うことができる。   When comparing the embodiment and the comparative example as described above, when the same operation pattern shown in FIG. 7 is executed by the X-axis pulse drive motor 38, the motion control system 1 according to the embodiment relates to the comparative example. Compared to the motion control system, the number of communications and the communication time between the control host 10 and the controller unit 21 can be reduced, and the burden on the control host 10 can be greatly reduced. Furthermore, since the operation of the first axis control unit 35a of the controller unit 21 can be completed according to the macro data 75 by the RAM interface function, the generation of command pulses by the first axis control unit 35a can be performed stably and smoothly. Can do.

しかも、上述の実施例及び比較例では、図7に示した比較的シンプルな動作パターンをX軸のモータに実行させる場合について説明しているが、実際のモーションコントロールシステムでは、4軸全てに所要の動作パターンを実行させることから、1軸のみについて説明した上述の実施例の場合よりも上述した本発明の効果がより顕著に表れる。その上、例えば図7よりも複雑な動作パターンでモータを駆動させる場合には、上述した効果がより有効的に発揮される。   In addition, in the above-described embodiments and comparative examples, the case where the X-axis motor is caused to execute the relatively simple operation pattern shown in FIG. 7 is described. However, in an actual motion control system, all four axes are required. Since the above operation pattern is executed, the above-described effect of the present invention appears more remarkably than in the case of the above-described embodiment in which only one axis is described. In addition, for example, when the motor is driven with a more complicated operation pattern than in FIG. 7, the above-described effects are more effectively exhibited.

1 モーションコントロールシステム
10 制御ホスト
11 制御プログラム
12 デバイスドライバ
20 第1スレーブ
21 コントローラユニット(4軸コントローラユニット)
22 CPU
23 通信制御部
24 ROM
25 外部機器インターフェイス回路
26 バス(データバス)
27 通信インターフェイス回路
31 第1軸制御ロジック回路
32 第2軸制御ロジック回路
33 第1命令解析部
34 第2命令解析部
35a 第1軸制御部(X軸制御部)
35b 第2軸制御部(Y軸制御部)
35c 第3軸制御部(Z軸制御部)
35d 第4軸制御部(A軸制御部)
36a 第1RAM
36b 第2RAM
36c 第3RAM
36d 第4RAM
38 パルス駆動モータ
38a 第1パルス駆動モータ
38b 第2パルス駆動モータ
38c 第3パルス駆動モータ
38d 第4パルス駆動モータ
38e 第5パルス駆動モータ
38f 第6パルス駆動モータ
39 ドライバユニット
39a 第1ドライバユニット
39b 第2ドライバユニット
39c 第3ドライバユニット
39d 第4ドライバユニット
40 第2スレーブ
41 コントローラドライバユニット
60 第3スレーブ
61 デジタルI/Oユニット
62 外部機器
70 通信インターフェイスユニット
71 リクエスト信号
71a リクエスト長
71b スレーブアドレス
71c スレーブタイプ
71d リクエストコード
71e リクエストデータ
72 アンサーバック信号
72a アンサー長
72b エラー判定結果
72c アンサーバックデータ
75 マクロデータ
76 シートデータ
77 実行命令
DESCRIPTION OF SYMBOLS 1 Motion control system 10 Control host 11 Control program 12 Device driver 20 1st slave 21 Controller unit (4-axis controller unit)
22 CPU
23 Communication control unit 24 ROM
25 External device interface circuit 26 Bus (data bus)
27 Communication Interface Circuit 31 First Axis Control Logic Circuit 32 Second Axis Control Logic Circuit 33 First Command Analysis Unit 34 Second Command Analysis Unit 35a First Axis Control Unit (X-axis Control Unit)
35b Second axis control unit (Y axis control unit)
35c 3rd axis control part (Z-axis control part)
35d Fourth axis control unit (A axis control unit)
36a first RAM
36b Second RAM
36c 3rd RAM
36d 4th RAM
38 pulse drive motor 38a first pulse drive motor 38b second pulse drive motor 38c third pulse drive motor 38d fourth pulse drive motor 38e fifth pulse drive motor 38f sixth pulse drive motor 39 driver unit 39a first driver unit 39b first 2 driver unit 39c 3rd driver unit 39d 4th driver unit 40 2nd slave 41 controller driver unit 60 3rd slave 61 digital I / O unit 62 external device 70 communication interface unit 71 request signal 71a request length 71b slave address 71c slave type 71d Request code 71e Request data 72 Answer back signal 72a Answer length 72b Error determination result 72c Answer server Data 75 Macro data 76 Sheet data 77 Execution instruction

Claims (9)

パルス駆動モータ用の1つ又は複数のモータドライバに対して指令パルスを出力する少なくとも1つのコントローラユニットと、制御プログラムを備える制御ホストと、前記制御ホスト及び前記コントローラユニット間の通信を行う通信インターフェイスユニットとを有し、前記制御ホストが、前記制御プログラムの関数の実行により前記コントローラユニットに対するリクエスト信号を送信し、前記コントローラユニットが、前記リクエスト信号に基づいて前記指令パルスを出力することにより、前記パルス駆動モータの動作制御を行うモーションコントロールシステムであって、前記コントローラユニットは、前記リクエスト信号から実行命令を変換するCPUと、前記実行命令に従って前記指令パルスを発生させる1つ又は複数の軸制御ロジック回路とを有するモーションコントロールシステムにおいて、
前記コントローラユニットはROMを有するとともに、前記ROMに、複数の実行命令を予め備える少なくとも1つのマクロデータが保持され、
前記軸制御ロジック回路は、前記制御ホストから指定される前記ROM内の前記マクロデータを書き込むことが可能なRAMを備え、且つ、前記制御ホストからの前記リクエスト信号により、前記RAMに書き込まれた前記マクロデータに従って複数の前記実行命令を順番に自動実行するRAMインターフェイス機能を備えてなる、
ことを特徴とするモーションコントロールシステム。
At least one controller unit that outputs a command pulse to one or a plurality of motor drivers for a pulse drive motor, a control host that includes a control program, and a communication interface unit that performs communication between the control host and the controller unit And the control host transmits a request signal to the controller unit by executing a function of the control program, and the controller unit outputs the command pulse based on the request signal, whereby the pulse A motion control system for controlling the operation of a drive motor, wherein the controller unit includes a CPU that converts an execution command from the request signal, and one or a plurality of shaft controls that generate the command pulse according to the execution command. In motion control system having a logic circuit,
The controller unit includes a ROM, and the ROM stores at least one macro data that includes a plurality of execution instructions in advance.
The axis control logic circuit includes a RAM capable of writing the macro data in the ROM designated by the control host, and the RAM written in the RAM by the request signal from the control host. A RAM interface function for automatically executing a plurality of execution instructions in order according to macro data;
A motion control system characterized by this.
前記軸制御ロジック回路は、変換された前記実行命令を解析する命令解析部と、前記指令パルスを発生させる1つ又は複数の軸制御部とを備え、
前記RAMは、各軸制御部に1つずつ設けられてなる、
請求項1記載のモーションコントロールシステム。
The axis control logic circuit includes a command analysis unit that analyzes the converted execution command, and one or more axis control units that generate the command pulse,
The RAM is provided one for each axis control unit.
The motion control system according to claim 1.
前記RAMは、前記実行命令をそれぞれ書き込むことが可能な複数のアドレスを有し、
前記軸制御ロジック回路は、前記RAMインターフェイス機能により、前記リクエスト信号により指定される所定のアドレスの前記実行命令から前記マクロデータを自動実行してなる、
請求項1又は2記載のモーションコントロールシステム。
The RAM has a plurality of addresses at which the execution instructions can be written,
The axis control logic circuit automatically executes the macro data from the execution instruction at a predetermined address specified by the request signal by the RAM interface function.
The motion control system according to claim 1 or 2.
前記RAMは、複数の前記マクロデータを書き込むことが可能な容量を有してなる請求項1〜3のいずれかに記載のモーションコントロールシステム。   The motion control system according to claim 1, wherein the RAM has a capacity capable of writing a plurality of the macro data. 前記ROMは、複数の前記RAMにそれぞれ対応して書き込まれる複数の前記マクロデータを備えた1枚又は複数枚のシートデータを保持してなる請求項1〜4のいずれかに記載のモーションコントロールシステム。   The motion control system according to claim 1, wherein the ROM holds one or a plurality of sheet data including a plurality of the macro data written in correspondence with the plurality of RAMs. . 前記コントローラユニットは、複数の前記RAMに、前記リクエスト信号により指定される1枚の前記シートデータから、対応する前記マクロデータを展開してそれぞれ書き込むことが可能とされてなる請求項5記載のモーションコントロールシステム。   6. The motion according to claim 5, wherein the controller unit is capable of expanding and writing the corresponding macro data from a single sheet of data specified by the request signal into a plurality of the RAMs. Control system. 前記コントローラユニットは、複数の前記RAMに、前記リクエスト信号により指定される2枚以上の前記シートデータから、指定される前記マクロデータを組み合わせてそれぞれ書き込むことが可能とされてなる請求項5記載のモーションコントロールシステム。   6. The controller unit according to claim 5, wherein the specified macro data can be written in a plurality of RAMs in combination from the two or more sheet data specified by the request signal. Motion control system. 前記制御ホストは、前記ROMに保持されている前記マクロデータの少なくとも一部を、前記制御プログラム又は専用の書き換えプログラムで書き換えることが可能とされてなる請求項1〜7のいずれかに記載のモーションコントロールシステム。   The motion according to claim 1, wherein the control host can rewrite at least a part of the macro data held in the ROM by the control program or a dedicated rewrite program. Control system. 前記制御ホストは、前記RAMに書き込まれた前記マクロデータの少なくとも一部を、前記制御プログラム又は専用の書き換えプログラムで書き換えることが可能とされてなる請求項1〜8のいずれかに記載のモーションコントロールシステム。   The motion control according to claim 1, wherein the control host can rewrite at least part of the macro data written in the RAM with the control program or a dedicated rewrite program. system.
JP2015092046A 2015-04-28 2015-04-28 Motion control system Pending JP2016207169A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015092046A JP2016207169A (en) 2015-04-28 2015-04-28 Motion control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015092046A JP2016207169A (en) 2015-04-28 2015-04-28 Motion control system

Publications (1)

Publication Number Publication Date
JP2016207169A true JP2016207169A (en) 2016-12-08

Family

ID=57487273

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015092046A Pending JP2016207169A (en) 2015-04-28 2015-04-28 Motion control system

Country Status (1)

Country Link
JP (1) JP2016207169A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102121001B1 (en) * 2020-01-06 2020-06-09 주식회사 델타팜 Multi-axis motion control system supporting backup communication

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4878002A (en) * 1988-10-27 1989-10-31 Advanced Engineering Systems, Operations & Products, Inc. Multi-axis DSP-based parallel processing servo controller for machine tools and robots
JPH02278306A (en) * 1989-04-19 1990-11-14 Fanuc Ltd Numeric controller
JPH0816220A (en) * 1994-06-30 1996-01-19 Komatsu Ltd Programmable sequence controller
JPH11129144A (en) * 1997-10-28 1999-05-18 Toshiba Mach Co Ltd Control device for nc machine tool
US5963003A (en) * 1998-04-22 1999-10-05 Allen-Bradley Company, Llc Method and apparatus for asynchronous multi-axis servo path planning
JP2001306150A (en) * 2000-04-18 2001-11-02 Nippon Pulse Motor Co Ltd Operation setting table which sets operation state of shaft control motor and control board which controls the shaft control motor by the operation setting table
JP2002132307A (en) * 2000-10-18 2002-05-10 Yaskawa Electric Corp Motion controller and program editor
JP2004078895A (en) * 2002-06-17 2004-03-11 Sanyo Electric Co Ltd Distributed control system, and distributed control method
US20060100723A1 (en) * 2004-10-29 2006-05-11 Dynacity Technology (Hk) Limited Modular multi-axis motion control and driving system and method thereof
JP2013073351A (en) * 2011-09-27 2013-04-22 Fuji Mach Mfg Co Ltd Servo drive system
JPWO2013099032A1 (en) * 2011-12-28 2015-04-30 株式会社安川電機 Motion controller and motor control system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4878002A (en) * 1988-10-27 1989-10-31 Advanced Engineering Systems, Operations & Products, Inc. Multi-axis DSP-based parallel processing servo controller for machine tools and robots
JPH02278306A (en) * 1989-04-19 1990-11-14 Fanuc Ltd Numeric controller
JPH0816220A (en) * 1994-06-30 1996-01-19 Komatsu Ltd Programmable sequence controller
JPH11129144A (en) * 1997-10-28 1999-05-18 Toshiba Mach Co Ltd Control device for nc machine tool
US5963003A (en) * 1998-04-22 1999-10-05 Allen-Bradley Company, Llc Method and apparatus for asynchronous multi-axis servo path planning
JP2001306150A (en) * 2000-04-18 2001-11-02 Nippon Pulse Motor Co Ltd Operation setting table which sets operation state of shaft control motor and control board which controls the shaft control motor by the operation setting table
JP2002132307A (en) * 2000-10-18 2002-05-10 Yaskawa Electric Corp Motion controller and program editor
JP2004078895A (en) * 2002-06-17 2004-03-11 Sanyo Electric Co Ltd Distributed control system, and distributed control method
US20060100723A1 (en) * 2004-10-29 2006-05-11 Dynacity Technology (Hk) Limited Modular multi-axis motion control and driving system and method thereof
JP2013073351A (en) * 2011-09-27 2013-04-22 Fuji Mach Mfg Co Ltd Servo drive system
JPWO2013099032A1 (en) * 2011-12-28 2015-04-30 株式会社安川電機 Motion controller and motor control system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102121001B1 (en) * 2020-01-06 2020-06-09 주식회사 델타팜 Multi-axis motion control system supporting backup communication

Similar Documents

Publication Publication Date Title
US8249726B2 (en) Method and device for accessing a functional module of automation system
CN109388107B (en) Control device
US10496079B2 (en) Control device and control method
CN109557890B (en) Control device
CN109581976B (en) Control device
JP6626240B2 (en) controller
US20140005805A1 (en) Cpu of plc, system program for plc, and recording medium storing system program for plc
EP2687931A1 (en) Control device and system program
US10761513B2 (en) Information processing device, information processing method, and non-transitory computer-readable recording medium
EP2682830A1 (en) Control device and system program, and recording medium
CN100392587C (en) A guide for programming an intelligent module
JP7327225B2 (en) Robot control system and control method
JP2016207169A (en) Motion control system
CN111052012B (en) Control device and control system
US10509393B2 (en) Control device and control method
US20220397880A1 (en) Control device
JP2017204955A (en) Pulse output logic circuit for motor control and controller unit for motor control
JP2020144594A (en) Control device and software deployment method
WO2011125178A1 (en) Control system, control device and control method
US20210405597A1 (en) Engineering device, engineering method, and information storage medium
JP7231073B2 (en) Controllers and control systems
CN114690692B (en) High-speed interpolation pulse output method and device based on shift register
AU2016102107A4 (en) Robot control system
EP3428753A1 (en) Automation system and method with cycle-based and event-based automation devices
JP2022114752A (en) Control device, program execution method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170210

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20170830

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171205

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180129

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180403

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20181009