JPH03252702A - Serial communication system - Google Patents

Serial communication system

Info

Publication number
JPH03252702A
JPH03252702A JP2049640A JP4964090A JPH03252702A JP H03252702 A JPH03252702 A JP H03252702A JP 2049640 A JP2049640 A JP 2049640A JP 4964090 A JP4964090 A JP 4964090A JP H03252702 A JPH03252702 A JP H03252702A
Authority
JP
Japan
Prior art keywords
data
register
bit
frame
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2049640A
Other languages
Japanese (ja)
Other versions
JP3144680B2 (en
Inventor
Shinichiro Uehara
上原 慎一郎
Manabu Takei
学 武井
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.)
SG KK
Original Assignee
SG KK
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 SG KK filed Critical SG KK
Priority to JP04964090A priority Critical patent/JP3144680B2/en
Publication of JPH03252702A publication Critical patent/JPH03252702A/en
Application granted granted Critical
Publication of JP3144680B2 publication Critical patent/JP3144680B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Control Of Position Or Direction (AREA)
  • Dc Digital Transmission (AREA)
  • Communication Control (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)
  • Control By Computers (AREA)

Abstract

PURPOSE:To accelerate the transmission/reception of data between a velocity control part and a current control part by performing the transmission/reception of only prescribed number of frames setting the frame consisting of a start bit, a data bit, a discrimination bit, and a parity bit as one unit. CONSTITUTION:The frame consisting of the start bit of one bit, the data bit of prescribed number of bits, the discrimination bit of one bit, and the parity bit is set as one unit. Therefore, it is possible to easily identify whether what numbered bit counting from the start bit is the data bit, the discrimination bit, or the parity bit. In such a way, since the constitution of transmitted/ received data is simplified, a time required for the transmission/reception i.e. transmission speed can be remarkably increased, which accelerates the transmission/reception of the data between the velocity control part and the current control part.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、デジタルデータをシリアルで通信するシリア
ル通信方式に係り、例えばサーボモータを駆動制御する
サーボ制御システムの電流制御部と位置制御部との間の
データ通信に適したシリアル通信方式に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a serial communication method for serially communicating digital data, and for example, a current control section and a position control section of a servo control system that drives and controls a servo motor. This invention relates to a serial communication method suitable for data communication between

〔従来技術〕[Prior art]

工作機械又は自動化装置を制御する数値制御装置又は位
置決め装置等では、各軸の位置決めを行うものとしてサ
ーボモータが利用されている。
BACKGROUND ART In numerical control devices or positioning devices that control machine tools or automation equipment, servo motors are used to position each axis.

このサーボモータの駆動を制御するために従来は各サー
ボモータ毎に、それに応じた出力定格のサーボドライバ
及びこのサーボドライバを制御するための位置制御部が
設けられている。以下、このサーボドライバと位置制御
部とをサーボ制御手段といい、このサーボモータとサー
ボ制御手段とが一体になったものをサーボ制御システム
という。
In order to control the drive of this servo motor, conventionally, each servo motor is provided with a servo driver with an output rating corresponding to the servo motor, and a position control section for controlling the servo driver. Hereinafter, this servo driver and position control section will be referred to as a servo control means, and the combination of this servo motor and servo control means will be referred to as a servo control system.

第8図は従来のサーボ制御システムの概略構成を示す図
である。
FIG. 8 is a diagram showing a schematic configuration of a conventional servo control system.

サーボモータ7は例えば交流駆動型のACサーボモータ
である。サーボモータ7には、その現在位置をアブソリ
ュートに検出するための位置センサ8及び現在速度を検
出するための速度センサ(パルスジェネレータ)9が結
合されている。これらの各センサの出力P1及びF5は
位置センサ変換回路64及び速度センサ変換回路(F/
V変換器)63によって位置データP2及び速度データ
F4に変換され、位置制御部51及び速度制御部61に
出力される。さらに、サーボモータ7として同期型サー
ボモータを使用する場合は、位置センサ変換回路64は
位置センサ8の出力P1から界磁の切換位置を制御する
ための位相信号P3を電流制御部62に出力する。
The servo motor 7 is, for example, an AC servo motor of alternating current drive type. The servo motor 7 is coupled with a position sensor 8 for absolutely detecting its current position and a speed sensor (pulse generator) 9 for detecting its current speed. Outputs P1 and F5 of each of these sensors are output to a position sensor conversion circuit 64 and a speed sensor conversion circuit (F/
The V converter) 63 converts the data into position data P2 and speed data F4, and outputs them to the position control section 51 and speed control section 61. Further, when a synchronous servo motor is used as the servo motor 7, the position sensor conversion circuit 64 outputs a phase signal P3 for controlling the field switching position from the output P1 of the position sensor 8 to the current control unit 62. .

位置制御系5は位置制御部51とD/A変換器52とか
ら構成される装 置制御部51は図示していない上位のコントローラから
サーボモータ7の目標位置を示す位置指令データFOを
入力すると共に、サーボモータ7の現在位置を示す上記
位置データP2とを入力する。そして、位置制御部51
は位置指令データFOと位置データP2との間の偏差を
求め、その位置偏差に応じた速度指令信号F1をD/A
変換器52に出力する。D/A変換器52は位置制御部
51からの速度指令信号F1をアナログの速度指令信号
F3に変換してサーボドライバ6に出力する。
The position control system 5 includes a position control section 51 and a D/A converter 52. The device control section 51 inputs position command data FO indicating the target position of the servo motor 7 from a higher-level controller (not shown). , and the above position data P2 indicating the current position of the servo motor 7. Then, the position control section 51
calculates the deviation between the position command data FO and the position data P2, and outputs the speed command signal F1 according to the position deviation to the D/A.
Output to converter 52. The D/A converter 52 converts the speed command signal F1 from the position control section 51 into an analog speed command signal F3 and outputs it to the servo driver 6.

サーボドライバ6は速度制御部61、電流制御部62、
速度センサ変換回路63及び位置センサ64から構成さ
れている。
The servo driver 6 includes a speed control section 61, a current control section 62,
It is composed of a speed sensor conversion circuit 63 and a position sensor 64.

速度制御部61はD/A変換器52からの速度指令信号
F3とサーボモータフの現在速度を示す速度信号F4と
を入力する。速度制御部61は速度指令信号F3と速度
信号F4との偏差を求め、この速度偏差に応じたサーボ
モータ7のトルク信号(電流指令信号)Tlを電流制御
部62に出力する。
The speed control section 61 receives a speed command signal F3 from the D/A converter 52 and a speed signal F4 indicating the current speed of the servo motor. The speed control section 61 determines the deviation between the speed command signal F3 and the speed signal F4, and outputs a torque signal (current command signal) Tl of the servo motor 7 according to this speed deviation to the current control section 62.

電流制御部62は3相のPWM信号によってパワートラ
ンジスタを駆動し、サーボモータフの各相(U相、■相
、W相)に駆動電流を供給する。
The current control unit 62 drives the power transistor with a three-phase PWM signal, and supplies drive current to each phase (U phase, ■ phase, and W phase) of the servo motor.

このとき、電流検出アイソレータCTによってU相及び
V相の電流値の電流フィードバック信号T3が電流制御
部62にフィードバックされる。電流制御部62は、各
相のトルク信号(電流指令信号)Tlと各相の電流フィ
ードバック信号T3との偏差を増幅して駆動電流をサー
ボモータ7に出力する。なお、位置センサ変換回路64
は位置センサ8の出力P1から界磁の回転位置を制御す
るための位相信号P3を電流制御部62に出力する。
At this time, the current feedback signal T3 of the U-phase and V-phase current values is fed back to the current control section 62 by the current detection isolator CT. The current control unit 62 amplifies the deviation between the torque signal (current command signal) Tl of each phase and the current feedback signal T3 of each phase and outputs a drive current to the servo motor 7. Note that the position sensor conversion circuit 64
outputs a phase signal P3 from the output P1 of the position sensor 8 to the current control section 62 for controlling the rotational position of the field.

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

上述のような従来のサーボ制御システムでは、位置制御
系5と速度制御部61との間の応答速度は数m S e
 Qのオーダーであり、速度制御部61と電流制御部6
2との間の応答速度は数十μsecのオーダーである。
In the conventional servo control system as described above, the response speed between the position control system 5 and the speed control section 61 is several meters S e
It is of the order of Q, and the speed control section 61 and the current control section 6
2, the response speed is on the order of several tens of microseconds.

即ち、位置制御系5とサーボドライバ6との間の応答速
度は、速度制御部61と電流制御部62との間の応答速
度よりも十分遅くてもよい。故に、位置制御系5とサー
ボドライバ6との間を分離し、その間をR5232C等
の通信回線で接続し、位置制御系5の速度指令信号を速
度制御部61に送信することが可能である。
That is, the response speed between the position control system 5 and the servo driver 6 may be sufficiently slower than the response speed between the speed control section 61 and the current control section 62. Therefore, it is possible to separate the position control system 5 and the servo driver 6, connect them with a communication line such as R5232C, and transmit the speed command signal of the position control system 5 to the speed control section 61.

しかしながら、R8232C等の通信回線は、速度制御
部61と電流制御部62との間に要求される十μsec
程度の応答速度を満足していないので、速度制御部61
と電流制御部62との間に適用することは不可能とされ
ていた。従って、従来のように位置制御系5とサーボド
ライバ6との間を分離し、その間をR8232C等の通
信回線で接続することはできても、速度制御部61と電
流制御部62との間を分離し、通信回線で接続すること
はできなかった。
However, the communication line such as R8232C requires 10 μsec between the speed control section 61 and the current control section 62.
Since the response speed is not satisfied, the speed control unit 61
It has been considered impossible to apply this method between the current controller and the current controller 62. Therefore, although it is possible to separate the position control system 5 and the servo driver 6 and connect them with a communication line such as R8232C as in the past, the speed control section 61 and the current control section 62 can be They could not be separated and connected via communication lines.

また、R3232C等の通信プロトコルは、7又は8ビ
ットのデータを1つのキャラクタ情報に対応させて通信
する方式なので5次のような問題がある。
Furthermore, since the communication protocol such as R3232C is a system in which 7 or 8 bit data is communicated in correspondence with one character information, there is a problem of the fifth order.

第1に、データ形式がバイナリ数のようなビット単位の
情報なので、データ自身と通信制御用のコード(キャラ
クタ)との区別ができない場合が発生して、−船釣にデ
ータのビット透過性が保証されない。
First, since the data format is bit-based information such as a binary number, there are cases where it is not possible to distinguish between the data itself and the communication control code (character). Not guaranteed.

第2に、シリアル通信の線路をマルチポイント接続した
場合、各接続点における局を指定する制御コードが必要
となり、上述と同様にビット透過性が悪いためにデータ
部と制御コード部とを識別できない。
Second, when serial communication lines are connected at multiple points, a control code is required to specify the station at each connection point, and as mentioned above, the data part and the control code part cannot be distinguished because of poor bit transparency. .

第3に、速度制御部61と電流制御部62との間では、
数値データのみが送信できればよいのに対して、キャラ
クタ情報を送信し、それを数値データに変換するという
無駄な処理を行なわなければならない。
Thirdly, between the speed control section 61 and the current control section 62,
Although it is sufficient to transmit only numerical data, it is necessary to perform the unnecessary processing of transmitting character information and converting it into numerical data.

一方、HDLC(High  Level  Data
  Link  Control)に代表される通信方
式は、データのビット透過性が保証され、局指定機能も
有しているので、速度制御部61と電流制御部62との
間の通信方式として、採用することは可能である。
On the other hand, HDLC (High Level Data
The communication method represented by Link Control guarantees bit transparency of data and also has a station specification function, so it can be used as the communication method between the speed control section 61 and the current control section 62. is possible.

しかし、このHDLCは連続する1″′の数とフラグシ
ーケンスとを制御して送受信、及びそれぞれのデータの
エンコード及びデコードを行なわなければならないため
、それらの機能を満足するためのハードウェアが複雑か
つ高価となり、通信のハードウェアも大規模なものとな
り、コスト的にもサーボ制御システムへ適用するには不
向きである。
However, since this HDLC must control the number of consecutive 1'''s and the flag sequence to transmit and receive, and encode and decode each data, the hardware required to satisfy these functions is complicated and This method is expensive and requires large-scale communication hardware, making it unsuitable for use in servo control systems in terms of cost.

本発明は上述の点に鑑みてなされたものであり、コスト
的にも安価で単純なハードウェアで構成でき、速度制御
部と電流制御部との間におけるデータの送受信を高速で
行えるシリアル通信方式を提供することを目的とする。
The present invention has been made in view of the above points, and is a serial communication method that is inexpensive and can be configured with simple hardware, and that allows data to be sent and received at high speed between a speed control section and a current control section. The purpose is to provide

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

本発明のシリアル通信方式は、フレームの開始を示すた
めの1ビットからなるスタートビットと、このスタート
ビットの次に設けられた所定数のビットからなるデータ
ビットと、このデータビットの次にフレームの種類を判
別するために設けられた1ビットからなる判別ビットと
、この判別ビットの次に設けられたパリティビットとか
らなるフレームを一単位とし、前記データビットに少な
くとも1つの局アドレスをセットしたフレームをスター
トフレームとし、前記データビットに各種のデータをセ
ットしたフレームをデータフレームとし、前記スタート
フレームの次に所定数の前記データフレームを付加して
送受信することを特徴とする。
The serial communication system of the present invention includes a start bit consisting of one bit to indicate the start of a frame, data bits consisting of a predetermined number of bits provided next to the start bit, and a start bit consisting of a predetermined number of bits provided next to the start bit, and a start bit consisting of a predetermined number of bits provided next to the start bit. One unit is a frame consisting of a 1-bit determination bit provided to determine the type and a parity bit provided next to this determination bit, and a frame in which at least one station address is set in the data bit. is set as a start frame, a frame in which various data are set in the data bits is set as a data frame, and a predetermined number of the data frames are added next to the start frame and transmitted/received.

〔作用〕[Effect]

本発明は、1ビットからなるスタートビットと、所定数
のビットからなるデータビットと、1ビットからなる判
別ビットと、パリティビットとからなるフレームを一単
位としているので、受信側では、スタートビットを検出
することによって、スタートビットから何番目のビット
がデータビット、判別ビット又はパリティビットである
かを容易に識別することができる。
In the present invention, one unit is a frame consisting of a start bit consisting of 1 bit, data bits consisting of a predetermined number of bits, a discrimination bit consisting of 1 bit, and a parity bit. By detecting it, it is possible to easily identify which bit from the start bit is a data bit, discrimination bit, or parity bit.

また、このような構成のフレームを予め決められた数だ
け送信し、その最初のフレームのデータビットに少なく
とも1つの局アドレスをセットし、それをスタートフレ
ームとし、データビットに各種のデータをセットされた
データフレームを、このスタートフレームの次に付加し
て送信しているので、マルチポイント接続した場合でも
、送信データが内紛に対するデータなのかどうかを容易
に判断することができる。
Also, a predetermined number of frames with this configuration are transmitted, at least one station address is set in the data bits of the first frame, and this is used as the start frame, and various data are set in the data bits. Since the data frame is added next to the start frame and transmitted, even in the case of multi-point connection, it is possible to easily determine whether the transmitted data is for internal conflict.

さらに、送受信されるデータの構成が単純なため、送受
信に要する時間、即ち、送信速度を大幅に向上でき、従
来不可能とされていた速度制御部と電流制御部との間に
おけるデータの送受信を高速で行うことができ、送受信
用のインターフェイスもコスト的に安価で単純なハード
ウェアで実現できるようになる。
Furthermore, since the structure of the data to be transmitted and received is simple, the time required for transmission and reception, that is, the transmission speed, can be significantly improved, and data transmission and reception between the speed control section and the current control section, which was previously considered impossible, is now possible. This can be done at high speed, and the interface for sending and receiving can be realized with inexpensive and simple hardware.

〔実施例〕〔Example〕

以下、本発明の実施例を添付図面に従って詳細に説明す
る。
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

第1図は本発明の通信方式で用いる送受信データの概略
構成を示す図である。第1図(a)は送信されるフレー
ムの順序を、第1図(b)はそのフレームの一単位の構
成を、第1図(c)は親局から送信されるスタートフレ
ームSFの構成を、第1図(d)は子局から送信される
スタートフレームSFの構成をそれぞれ示す図である。
FIG. 1 is a diagram showing a schematic structure of transmitted and received data used in the communication system of the present invention. Figure 1(a) shows the order of transmitted frames, Figure 1(b) shows the configuration of one unit of the frame, and Figure 1(c) shows the configuration of the start frame SF transmitted from the master station. , FIG. 1(d) is a diagram showing the structure of a start frame SF transmitted from a slave station.

本実施例のデータ伝送の速度は2Mbps(クロック周
波数32MHzの時)であり、伝送フォーマットはNR
Zであり、通信方式は非同期の全二重モードである。
The data transmission speed in this example is 2 Mbps (at a clock frequency of 32 MHz), and the transmission format is NR.
Z, and the communication method is asynchronous full-duplex mode.

親局と子局の間で1回の伝送で送信されるフレーム数は
、1個のスタートフレームSFと、これに続く8個のデ
ータフレームIF〜8Fである。
The number of frames transmitted in one transmission between the master station and the slave station is one start frame SF and the following eight data frames IF to 8F.

以下、本実施例では、データフレームの長さ(データ長
)が8フレームの場合について説明するが、このデータ
長は予め通信システムを構成する際に、マイクロプロセ
ッサ(CPU)又は外部スイッチによって、例えば2フ
レーム、4フレーム、8フレーム、16フレーム等のよ
うにシステムの大きさに応じて任意の長さに切換えられ
るようにする。
In this embodiment, a case will be described in which the data frame length (data length) is 8 frames, but this data length is determined in advance by a microprocessor (CPU) or an external switch when configuring the communication system, for example. The length can be changed to any length such as 2 frames, 4 frames, 8 frames, 16 frames, etc. depending on the size of the system.

そして、−度データ長を設定したら、そのデータ長で通
信が行われる。
Then, once the -degree data length is set, communication is performed using that data length.

スタートフレームSF及びデータフレームIF〜8Fは
共に11ビット構成である。スタートフレームSF及び
データフレームIF〜8Fの最初の1ビットは、フレー
ムの開始を示すためのスタートビットSBであり、具体
的にはハイレベル“I IIがセットされる。従って、
データとデータとの間、即ちデータフレーム8Fと、次
のデータのスタートフレームSFとの間にはローレベル
“071がセットされる。
Both the start frame SF and data frames IF to 8F have an 11-bit configuration. The first bit of the start frame SF and data frames IF to 8F is a start bit SB for indicating the start of the frame, and specifically, a high level "I II" is set. Therefore,
A low level "071" is set between data, that is, between data frame 8F and the start frame SF of the next data.

このスタートビットSBの次には、8ビットからなるデ
ータビット部BO−87が設けられる。
A data bit section BO-87 consisting of 8 bits is provided next to the start bit SB.

データフレームIF〜8Fのデータビット部BO〜B7
には、各種のデータを示すビットがセットされるが、ス
タートフレームSFのデータピット部BO−87には次
のようなデータがセットされる。
Data bit part BO to B7 of data frame IF to 8F
Bits indicating various data are set in , and the following data is set in the data pit portion BO-87 of the start frame SF.

即ち、スタートフレームSFのデータビット部BO−8
7には、少なくとも1つの局アドレスがセットされる。
That is, data bit part BO-8 of start frame SF
At least one station address is set in 7.

親局が子局に対してデータを送信する場合は、データビ
ット部BO−87の最初の3ビットBO,B1及びB2
に、送信先の局アドレスを示すビット5O1S1及びB
2がセットされる。また、親局が子局に対してデータの
送信を要求する場合は1次の3ビットB3、B4及びB
5に、送信の要求される送信要求先の局アドレスを示す
ビットRO,R1及びR2がセットされる。
When the master station transmits data to the slave station, the first three bits BO, B1 and B2 of the data bit section BO-87
bits 5O1S1 and B indicating the destination station address.
2 is set. In addition, when the master station requests data transmission from the slave station, the primary 3 bits B3, B4 and B
Bits RO, R1, and R2 indicating the address of the station to which transmission is requested are set in bit 5.

逆に子局が親局に対してデータを送信する場合は、最初
の3ビットBO,Bl及びB2に、自局のアドレスを示
すビットAO,Al及びA2がセットされる。このよう
なスタートフレームSFを親局と子局との間で送受信す
ることによって、親局と子局をマルチポイント接続する
ことが可能となる。
Conversely, when the slave station transmits data to the master station, the first three bits BO, Bl, and B2 are set to bits AO, Al, and A2 indicating the address of the slave station. By transmitting and receiving such a start frame SF between the master station and the slave stations, it becomes possible to establish a multi-point connection between the master station and the slave stations.

このデータビット部BO−87の次には、フレームの種
類を判別するための1ビットからなる判別ビットDBが
設けられる。即ち、フレームの種類がスタートフレーム
SFの場合はハイレベル“1″がセットされ、データフ
レームIF〜8Fの場合はローレベル“′0″がセット
される。従って、この判別ビットを受信側で判別するこ
とによって、フレームがスタートフレームSFなのか、
データフレームIF〜8Fなのかを判別することができ
る。
A determination bit DB consisting of 1 bit for determining the type of frame is provided next to the data bit section BO-87. That is, when the frame type is a start frame SF, a high level "1" is set, and when the frame type is a data frame IF to 8F, a low level "'0" is set. Therefore, by determining this determination bit on the receiving side, it is possible to determine whether the frame is the start frame SF or not.
It is possible to determine whether the data frame is from IF to 8F.

この判別ビットDBの次には、1ピッ1−からなるパリ
ティビットPBが設けられる。このパリティビットPB
はデータビット部BO−87のハイレベル゛′1″の数
が偶数個の場合にハイレベル“1′″がセットされる。
A parity bit PB consisting of 1 pin 1- is provided next to the discrimination bit DB. This parity bit PB
is set to a high level "1" when the number of high levels "1" in the data bit section BO-87 is an even number.

図示していないが、スタートフレームSFの前には1フ
レーム長又は2フレーム長のアイドル信号を乗せること
ができる。このアイドル信号は、ハイレベル“1″と、
ローレベルII OI+とが交互に繰り返される信号の
ことであり、受信側ではこのアイドル信号のパターンが
正常に送信されたかどうかによって1通信回線の不良を
検出する。即ち、伝送フォーマットがNRZの場合は、
このようなアイドルフレームはデユーティ50パーセン
トの正確な矩形波である。従って、通信線に断線、短絡
、ノイズ混入等の異常が生しれば、正確なアイドル波形
に変化が生じるので、その変化をハート的に検出すれば
通信線の異常を容易に検出することができる。
Although not shown, an idle signal of one frame length or two frame length can be placed before the start frame SF. This idle signal has a high level “1”,
This is a signal in which low levels II and OI+ are alternately repeated, and the receiving side detects a failure in one communication line depending on whether or not this idle signal pattern is transmitted normally. That is, if the transmission format is NRZ,
Such an idle frame is a precise square wave with a duty of 50 percent. Therefore, if an abnormality occurs in the communication line, such as a disconnection, short circuit, or noise intrusion, the accurate idle waveform will change, so if you detect this change heart-wise, you can easily detect an abnormality in the communication line. .

次に、本発明の通信方式が適用されるサーボ制御システ
ムについて説明する。第2図は本発明の通信方式が適用
されるサーボ制御システムの概略構成を示す図である。
Next, a servo control system to which the communication method of the present invention is applied will be explained. FIG. 2 is a diagram showing a schematic configuration of a servo control system to which the communication method of the present invention is applied.

本発明の通信方式は位置速度制御系1のシリアル通信イ
ンターフェイス13と、電流制御系2のシリアル通信イ
ンターフェイス21との間のデータ伝送に適用される。
The communication method of the present invention is applied to data transmission between the serial communication interface 13 of the position and speed control system 1 and the serial communication interface 21 of the current control system 2.

サーボモータ3は例えば同期型のACサーボモータであ
る。サーボモータ3には、その現在位置をアブソリュー
トに検出するための位置センサ4が結合されている。こ
の位置センサ4としては、例えば特開昭57−7040
6号公報に示されたような誘導型の位相シフト型位置セ
ンサを使用し、その出力P1を位置センサ変換回路14
に入力し、デジタルの位置データP2に変換する。
The servo motor 3 is, for example, a synchronous AC servo motor. A position sensor 4 is coupled to the servo motor 3 to absolutely detect its current position. As this position sensor 4, for example, Japanese Patent Application Laid-Open No. 57-7040
An inductive phase shift type position sensor as shown in Publication No. 6 is used, and its output P1 is sent to the position sensor conversion circuit 14.
and converts it into digital position data P2.

上位コントローラ10は位置制御部11に接続されてお
り、サーボモータ3の目標位置を示す位置指令データF
Oを位置制御部11に出力する。
The host controller 10 is connected to the position control unit 11 and receives position command data F indicating the target position of the servo motor 3.
O is output to the position control section 11.

また、上位コントローラ10はシリアル通信インターフ
ェイス13に接続されており、各種データD1の送受信
を行う。
Further, the host controller 10 is connected to a serial communication interface 13, and transmits and receives various data D1.

位置速度制御系1は位置制御部11と、速度制御部12
と、シリアル通信インターフェイス13と1位置センサ
変換回路14と、速度演算部15とから構成される装 置制御部11は上位コントローラ10及び位置センサ変
換手段14に接続されており、サーボモータ3の目標位
置を示す位置指令データFOとサーボモータ3の現在位
置を示す位置データP2を入力する。
The position and speed control system 1 includes a position control section 11 and a speed control section 12.
The device control unit 11, which includes a serial communication interface 13, a 1-position sensor conversion circuit 14, and a speed calculation unit 15, is connected to the host controller 10 and position sensor conversion means 14, and is connected to the target position of the servo motor 3. Position command data FO indicating the current position of the servo motor 3 and position data P2 indicating the current position of the servo motor 3 are input.

位置制御部11は速度制御部12に接続されており、位
置指令データFOと位置データP2との間の偏差を求め
、その位置偏差に応じた速度指令信号F1を速度制御部
12に出力する。なお、位置センサ変換回路14は位置
センサ4の出力P1からサーボモータ3の界磁の切換位
置を制御するための位相信号P3を生成し、シリアル通
信インターフェイス13に出力している。
The position control section 11 is connected to the speed control section 12, finds a deviation between the position command data FO and the position data P2, and outputs a speed command signal F1 to the speed control section 12 according to the position deviation. Note that the position sensor conversion circuit 14 generates a phase signal P3 for controlling the switching position of the field of the servo motor 3 from the output P1 of the position sensor 4, and outputs it to the serial communication interface 13.

速度制御部12は位置制御部11及び速度演算部15及
びシリアル通信インターフェイス13に接続されおり、
位置制御部11からの速度指令信号F1とサーボモータ
3の現在速度を示す速度信号F2とを入力する。速度信
号F2は位置センサ変換回路14の位置データP2を速
度演算部15によって変換したものである。速度演算部
15は位置センサ変換手段14の位置データP2を入力
し、所定の単位時間光たりの位置データP2の変化iに
基づき、デジタル演算によりサーボモータの速度を算出
する。そして、速度制御部12はシリアル通信インター
フェイス13に接続されており、速度指令信号F1と速
度信号F2との偏差を求め、この速度偏差に応じたサー
ボモータ3のトルク信号(電流指令信号)Tlをシリア
ル通信インターフェイス13に出力する。
The speed control section 12 is connected to the position control section 11, the speed calculation section 15, and the serial communication interface 13,
A speed command signal F1 from the position control section 11 and a speed signal F2 indicating the current speed of the servo motor 3 are input. The speed signal F2 is obtained by converting the position data P2 of the position sensor conversion circuit 14 by the speed calculation section 15. The speed calculation section 15 inputs the position data P2 from the position sensor conversion means 14, and calculates the speed of the servo motor by digital calculation based on the change i of the position data P2 per predetermined unit time of light. The speed control unit 12 is connected to the serial communication interface 13, finds the deviation between the speed command signal F1 and the speed signal F2, and generates the torque signal (current command signal) Tl of the servo motor 3 according to this speed deviation. Output to serial communication interface 13.

シリアル通信インターフェイス13は上位コントローラ
10、速度制御部12及び位置センサ変換手段14に接
続されており、上位コントローラ10からの各種データ
D1、トルク信号T1及び位相信号P3を通信回線を介
して電流制御系2のシリアル通信インターフェイス21
に伝送する。
The serial communication interface 13 is connected to the host controller 10, the speed control unit 12, and the position sensor conversion means 14, and transmits various data D1, torque signal T1, and phase signal P3 from the host controller 10 to the current control system via the communication line. 2 serial communication interface 21
to be transmitted.

なお、シリアル通信インターフェイス13とシリアル通
信インターフェイス21との間は双方向の通信回線で接
続されており、上位コントローラlOからの各種データ
D1及び電流制御系2内で生成したデータD2は上位コ
ントローラ10と電流制御系2との間で相互にやりとり
される。
The serial communication interface 13 and the serial communication interface 21 are connected by a bidirectional communication line, and various data D1 from the host controller 1O and data D2 generated within the current control system 2 are sent to the host controller 10. The information is exchanged with the current control system 2.

電流制御系2はシリアル通信インターフェイス21と電
流制御部22とから構成される。
The current control system 2 includes a serial communication interface 21 and a current control section 22.

シリアル通信インターフェイス21は位置速度制御系1
のシリアル通信インターフェイス13及び電流制御部2
2に接続されており、トルク信号T1及び位相信号P3
をシリアル通信インターフェイス13から受信し、トル
ク信号T2及び位相信号P4として電流制御部22に出
力するとともに、電流制御部22内の制御状態を示すス
ティタス信号等の各種データD2をシリアル通信インタ
ーフェイス13に送信する。
Serial communication interface 21 is position speed control system 1
serial communication interface 13 and current control unit 2
2, the torque signal T1 and the phase signal P3
is received from the serial communication interface 13 and outputted to the current control unit 22 as a torque signal T2 and a phase signal P4, and various data D2 such as a status signal indicating the control state within the current control unit 22 is transmitted to the serial communication interface 13. do.

電流制御部22はシタアル通信インターフェイス21及
びサーボモータ3に接続されており、トルク信号T2及
び位相信号P4を入力し、それにM、−Jいて3相のP
WM信号を生成してパワートランジスタを駆動し、サー
ボモータ3の各相(U相、■相、W相)に駆動電流を供
給する。このとき、電流検出アイソレータCTによって
U相及びV相の電流値の電流フィードバック信号T3が
電流制御部22にフィードバックされる。電流制御部2
2は、各相のトルク信号(電流指令信号)T2と各相の
電流フィードバック信号T3との偏差を増幅して駆動電
流をサーボモータ3に供給する。
The current control unit 22 is connected to the external communication interface 21 and the servo motor 3, and inputs the torque signal T2 and the phase signal P4.
A WM signal is generated to drive the power transistor, and a drive current is supplied to each phase (U phase, ■ phase, W phase) of the servo motor 3. At this time, the current feedback signal T3 of the U-phase and V-phase current values is fed back to the current control section 22 by the current detection isolator CT. Current control section 2
2 amplifies the deviation between the torque signal (current command signal) T2 of each phase and the current feedback signal T3 of each phase and supplies a drive current to the servo motor 3.

また、シリアル通信インターフェイス21と電流制御部
22との間はデータ線で接続されており、両者間で各種
データのやりとりが行えるようになっている。
Further, the serial communication interface 21 and the current control section 22 are connected by a data line, so that various data can be exchanged between them.

電流制御部22は、サーボモータのオーバーロード、電
源電圧低下、過電流、過電圧及びオーバーヒート等の制
御状態検出する機能を有しており、また、これらの制御
状態を示すサーボスティタス信号と、電流アンプの定格
を示すIDコードと。
The current control unit 22 has a function of detecting control states such as servo motor overload, power supply voltage drop, overcurrent, overvoltage, and overheat, and also outputs a servo status signal indicating these control states and a current amplifier. ID code indicating the rating.

制御対象となるサーボモータの定格を示すモータ定格コ
ード等の各種データを格納するメモリを有する。電流制
御部22内のメモリに格納されているデータは、必要に
応じて上記データD2として、データ線及びシリアル通
信インターフェイス21及び13を介して上位コントロ
ーラ1oに送信される。なお、モータ定格コードは上記
メモリ内にテーブルとして記憶されている。従って、通
信回線を介して接続されるサーボモータの定格に応じた
テーブル番号を選択することによって、電流制御部22
は定格の異なるサーボモータを制御できるようになる。
It has a memory that stores various data such as a motor rating code indicating the rating of the servo motor to be controlled. The data stored in the memory within the current control section 22 is transmitted to the host controller 1o via the data line and the serial communication interfaces 21 and 13 as the data D2, if necessary. Note that the motor rating code is stored in the memory as a table. Therefore, by selecting the table number according to the rating of the servo motor connected via the communication line, the current control unit 22
can control servo motors with different ratings.

これによって、サーボモータを交換した場合でもテーブ
ル番号を変更するだけで電流制御部をそのサーボモータ
に応じた制御系に変更することができる。
With this, even if the servo motor is replaced, the current control section can be changed to a control system suitable for the servo motor by simply changing the table number.

次に、第2図のサーボ制御システムの動作について説明
する。まず、第2図のようなサーボ制御システムを構成
したら、サーボモータ3の定格を示すテーブル番号のデ
ータD1を上位コントローラ10からシリアル通信イン
ターフェイス13を介して、電流制御系2側のシリアル
通信インターフェイス21に送信する。但し、第2図の
ようにシリアル通信インターフェイス13とシリアル通
信インターフェイス21とが一対一で接続されている場
合には、送信先の局アドレス、送信要求先の局アドレス
及び自局アドレスには固定のものが使用される。
Next, the operation of the servo control system shown in FIG. 2 will be explained. First, after configuring the servo control system as shown in FIG. Send to. However, if the serial communication interface 13 and the serial communication interface 21 are connected one-to-one as shown in Figure 2, the destination station address, transmission request destination station address, and own station address are fixed. things are used.

シリアル通信インターフェイス13から送信されてきた
テーブル番号のデータは、シリアル通信インターフェイ
ス21によって電流制御部22に送信される。これによ
って、電流制御部22ではサーボモータ3の定格を特定
し、サーボモータ3の定格に応じた電流制御部として機
能する。
The table number data transmitted from the serial communication interface 13 is transmitted to the current control section 22 by the serial communication interface 21. Thereby, the current control section 22 specifies the rating of the servo motor 3 and functions as a current control section according to the rating of the servo motor 3.

上位コントローラ10はサーボモータ3の目標位置を示
す位置指令データFOを位置制御部11に出力する。位
置制御部11は位置指令データFO及び位置データP2
に基づいた速度指令信号F1を速度制御部12に出力す
る。
The host controller 10 outputs position command data FO indicating the target position of the servo motor 3 to the position control section 11. The position control unit 11 receives position command data FO and position data P2.
A speed command signal F1 based on this is output to the speed control section 12.

速度制御部12は速度指令信号F1及び速度信号F2に
応じたトルク信号(電流指令信号)Tlをシリアル通信
インターフェイス13に出力する。
The speed control unit 12 outputs a torque signal (current command signal) Tl corresponding to the speed command signal F1 and the speed signal F2 to the serial communication interface 13.

シリアル通信インターフェイス13はシリアル通信イン
ターフェイス21に対して、第1図のフレーム順序でデ
ータを送信する。
The serial communication interface 13 transmits data to the serial communication interface 21 in the frame order shown in FIG.

シリアル通信インターフェイス21は、送信されてきた
トルク信号T2及び位相信号P4のデータを電流制御部
22に対して出力する。
The serial communication interface 21 outputs the transmitted data of the torque signal T2 and phase signal P4 to the current control section 22.

電流制御部22はトルク信号T2、電流フィードバック
信号T3及び位相信号P4に基づいてサーボモータ3の
駆動電流を制御する。サーボモータ3に結合された位置
センサ4の出力P1は位置速度制御系1にフィードバッ
クされる。サーボ制御システムは以上の動作を繰り返し
て、サーボモータ3の回転を制御する。
The current control section 22 controls the drive current of the servo motor 3 based on the torque signal T2, the current feedback signal T3, and the phase signal P4. The output P1 of the position sensor 4 coupled to the servo motor 3 is fed back to the position and speed control system 1. The servo control system repeats the above operations to control the rotation of the servo motor 3.

この制御の途中で、オーバーロード、電源電圧低下、過
電流、過電圧及びオーバーヒート等の異常が発生した場
合、これらの制御状態を示すスティタス信号のデータが
電流制御部22からシリアル通信インターフェイス21
に出力される。このスティタス信号のデータはシリアル
通信インターフェイス13を介して上位コントローラ1
0に送信される。上位コントローラ10はこのスティタ
ス信号のデータを受け、スティタス信号の種類に応じた
処理を行う。
If an abnormality such as overload, power supply voltage drop, overcurrent, overvoltage, or overheat occurs during this control, status signal data indicating these control states is transmitted from the current control unit 22 to the serial communication interface 21.
is output to. The data of this status signal is sent to the host controller 1 via the serial communication interface 13.
Sent to 0. The host controller 10 receives the data of this status signal and performs processing according to the type of the status signal.

サーボモータ3を定格の異なるサーボモータに変更する
場合は、変更後のサーボモータの定格を示すテーブル番
号を電流制御部22に送信してやるだけで、電流制御部
22は変更後のサーボモータに応じた電流制御を行うこ
とができる。
When changing the servo motor 3 to a servo motor with a different rating, simply send the table number indicating the rating of the changed servo motor to the current control unit 22, and the current control unit 22 will change the rating according to the changed servo motor. Current control can be performed.

第3図は第2図のシリアル通信インターフェイス13及
び21の構成を示す図である。
FIG. 3 is a diagram showing the configuration of the serial communication interfaces 13 and 21 of FIG. 2.

クロック分周器31は32MHzのクロックを入力し、
32MH2のクロック、位相反転した32 M Hzの
クロック、シリアル通信インターフェイス内の各ロジッ
ク駆動用の2 M Hzのクロック及び所定周波数のク
ロックACK及びBCKを出力する。
The clock divider 31 inputs a 32 MHz clock,
It outputs a 32 MHz clock, a phase-inverted 32 MHz clock, a 2 MHz clock for driving each logic in the serial communication interface, and clocks ACK and BCK of predetermined frequencies.

デジタルフィルタ32はクロック分周器31、シフトク
ロック発生回路33及びセレクトスイッチ34に接続さ
れ、32 M Hzクロック及び第1図のフレームで構
成された受信データD11 (データD1に相当する)
を入力し、パルス割れ等を修正してシフトクロック発生
回路33及びセレクトスイッチ34に出力する。
The digital filter 32 is connected to the clock frequency divider 31, the shift clock generation circuit 33, and the select switch 34, and receives the received data D11 (corresponding to the data D1) composed of a 32 MHz clock and the frame shown in FIG.
is input, corrects pulse breakage, etc., and outputs it to the shift clock generation circuit 33 and select switch 34.

シフトクロック発生回路33はクロック分周器31、デ
ジタルフィルタ32、受信用シフ!〜レジスタ38及び
ラッチタイミング信号発生回路39に接続され、32M
Hzクロック及びデジタルフィルタ32で修正された受
信データD1を入力し、レジスタのシフト用クロックを
受信用シフトレジスタ38及びラッチタイミング信号発
生回路39に出力する。
The shift clock generation circuit 33 includes a clock frequency divider 31, a digital filter 32, and a reception shift! ~ Connected to the register 38 and latch timing signal generation circuit 39, 32M
The Hz clock and the received data D1 corrected by the digital filter 32 are input, and the register shift clock is output to the reception shift register 38 and the latch timing signal generation circuit 39.

セレクトスイッチ34はデジタルフィルタ32、アイド
ル信号チエツク回路35、スタートビット検出器36、
アンド回路37及びコントロールレジスタフ5に接続さ
れ、デジタルフィルタ32で修正された受信データD1
を、コントロールレジスタ75の出力に応じてアイドル
信号チエツク回路35に出力するか、スタートビット検
出器36及びアンド回路37に直接出力するかを選択的
に切換える。
The select switch 34 includes a digital filter 32, an idle signal check circuit 35, a start bit detector 36,
Received data D1 connected to the AND circuit 37 and the control register 5 and modified by the digital filter 32
is selectively outputted to the idle signal check circuit 35 or directly to the start bit detector 36 and AND circuit 37 according to the output of the control register 75.

アイドル信号チエツク回路35はセレクトスイッチ34
、スタートビット検出器36及びアンド回路37に接続
され、受信データD1の前に付加されたアイドル信号が
正常に受信されたかどうかをチエツクし、その結果をア
イドルチエツク結果信号IDELとしてシリアル通信イ
ンターフェイスの外部(上位コントローラ10又は電流
制御部22)に出力するとともに、その受信データD1
をスタートビット検出器36及びアンド回路37に出力
する。このアイドルチエツク結果信号IDELによって
、通信回線が正常であるか否かを受信側は判断すること
ができる。
The idle signal check circuit 35 is connected to the select switch 34
, the start bit detector 36 and the AND circuit 37, and checks whether the idle signal added before the received data D1 has been received normally, and sends the result as an idle check result signal IDEL to the outside of the serial communication interface. (upper controller 10 or current control unit 22), and the received data D1
is output to the start bit detector 36 and AND circuit 37. The receiving side can determine whether the communication line is normal or not based on the idle check result signal IDEL.

スタートビット検出器36はセレクトスイッチ34、ア
イドル信号チエツク回路35、アンド回路37及びラッ
チタイミング信号発生回路39に(妾続され、セレクト
スイッチ34又はアイドルチエツク回路35のいずれか
から受信データD1を入力し、そのデータを構成する各
フレームSF、IF〜8Fの先頭に位置するスタートビ
ットSBを検出し、スタートビットSBを検出した時点
で、内蔵カウンタをリセットし、スタートビットSBに
続くデータビット部BO−87、判別ビットDB及びパ
リティビットPBに対応する数(本実施例では10)を
カウントするまでの間、アンド回路37にハイレベル“
1”を出力する。
The start bit detector 36 is connected to the select switch 34, the idle signal check circuit 35, the AND circuit 37, and the latch timing signal generation circuit 39, and receives the received data D1 from either the select switch 34 or the idle check circuit 35. , detects the start bit SB located at the head of each frame SF, IF to 8F that constitutes the data, and at the time the start bit SB is detected, resets the built-in counter and starts the data bit section BO- following the start bit SB. 87, until the number corresponding to the discrimination bit DB and parity bit PB (10 in this embodiment) is counted, a high level "" is applied to the AND circuit 37.
Outputs 1”.

アンド回路37はセレクトスイッチ34、アイドル信号
チエツク回路35、スタートビット検出器36及び受信
用シフトレジスタ38に接続され、スタートビット検出
器36からハイレベル111 I+が出力されている間
、受信データD1をセレクトスイッチ34又はアイドル
信号チエツク回路35から受信用シフトレジスタ38に
出力する。
The AND circuit 37 is connected to the select switch 34, the idle signal check circuit 35, the start bit detector 36, and the receiving shift register 38, and receives the received data D1 while the start bit detector 36 outputs the high level 111 I+. The signal is output from the select switch 34 or the idle signal check circuit 35 to the receiving shift register 38.

即ち、スタートビット検出器36及びアンド回路37に
よって、受信データD1の各フレームSF、IF〜8F
の中からスタートビットSBに続くデータビン1一部B
O〜B7、判別ピッ1へDB及びパリティビットPBに
対応する10ビット分が受信用シフトレジスタ38に出
力される。
That is, the start bit detector 36 and the AND circuit 37 detect each frame SF, IF to 8F of the received data D1.
Data bin 1 part B following start bit SB from inside
10 bits corresponding to O to B7, DB to discrimination bit 1, and parity bit PB are output to the reception shift register 38.

受信用シフトレジスタ38はシフトクロック発生回路3
3及びアンド回路37に接続され、シフトクロック発生
回路33のクロックによってアンド回路37からの10
ビット分のデータを格納する。また、受信用シフトレジ
スタ38はラッチタイミング信号発生回路39に接続さ
れ、各フレームSF、IF〜8Fの判別ビットDBのデ
ータを出力する。さらに、受信用シフトレジスタ38は
レジスタ41に8ビット構成のバスで接続され、各フレ
ームのデータビット部BO−87のデータをパラレルに
出力する。シリアル通信インターフェイスが子局に設け
られる場合は、受信用シフトレジスタ38は局セレクト
デコーダ40に接続され、フレームのデータビット部B
O〜B5、即ち送信先局アドレスSO,S1及びS2と
送信要求先アドレスRO,R1及びR2のデータを出力
する。
The reception shift register 38 is the shift clock generation circuit 3
10 from the AND circuit 37 by the clock of the shift clock generation circuit 33.
Stores bits of data. Further, the reception shift register 38 is connected to the latch timing signal generation circuit 39, and outputs the data of the discrimination bit DB of each frame SF, IF to 8F. Furthermore, the reception shift register 38 is connected to the register 41 via an 8-bit bus, and outputs the data in the data bit section BO-87 of each frame in parallel. When a serial communication interface is provided in the slave station, the reception shift register 38 is connected to the station select decoder 40, and the data bit part B of the frame is
It outputs data O to B5, that is, destination station addresses SO, S1, and S2 and transmission request destination addresses RO, R1, and R2.

尚1図示していないが、受信用シフ1−レジスタ38に
はパリティチエツク用のデコーダが接続され、受信デー
タDllのパリティチエツクが行われる。
Although not shown in the figure, a parity check decoder is connected to the reception shift 1 register 38, and a parity check is performed on the reception data Dll.

ラッチタイミング信号発生回路39はシフ1〜クロック
発生回路33、スタートビット検出器36、受信用シフ
1〜レジスタ38及びレジスタ41に接続され、受信用
シフトレジスタ38に格納されている受信データDll
がスタートフレームsF?なのか、データフレームIF
〜8Fなのかを判別ビットDBに基づいて判断し、フレ
ームの順番に応じてレジスタ41の位置に受信データD
llを格納する。
The latch timing signal generation circuit 39 is connected to shift 1 to clock generation circuit 33, start bit detector 36, reception shift 1 to register 38, and register 41, and receives data Dll stored in reception shift register 38.
Is the start frame sF? Is it a data frame IF?
~8F is determined based on the determination bit DB, and the received data D is stored in the register 41 position according to the order of the frames.
Store ll.

また、ラッチタイミング信号発生回路39はレジスタ4
1及び42、シフトレジスタ45に接続され、受信デー
タDllをそれぞれ転送するためのタイミング信号を出
力する。さらに、ラッチタイミング信号発生回路39は
コントロールレジスタ75に接続され、コントロールレ
ジスタ75内の値に応じて第1図のフレーム構成(デー
タフレームの数)を任意に設定できる。即ち、本実施例
では、データフレームが8個の場合について説明してい
るが、データフレームが4個の場合にはこのコントロー
ルレジスタ75の設定値を変更するだけで、4個のデー
タフレームに対応することができる。
Furthermore, the latch timing signal generation circuit 39 is connected to the register 4.
1 and 42 are connected to the shift register 45, and output timing signals for respectively transferring received data Dll. Furthermore, the latch timing signal generation circuit 39 is connected to a control register 75, and the frame configuration (number of data frames) shown in FIG. 1 can be arbitrarily set according to the value in the control register 75. That is, in this embodiment, the case where there are eight data frames is explained, but in the case where there are four data frames, it is possible to correspond to four data frames by simply changing the setting value of this control register 75. can do.

レジスタ41は受信用シフトレジスタ38、ラッチタイ
ミング信号発生回路39、アンド回路47及びレジスタ
42に接続され、ラッチタイミング発生回路39からの
タイミングパルスによって、受信用シフトレジスタ38
から各フレームのデータビット部BO−87のデータを
パラレルに入力し、格納する。また、レジスタ41はア
ンド回路47に接続され、データの格納が終了したらハ
イレベル“1″をアンド回路47に出力する。従って、
アンド回路47の他方の入力がハイレベル゛′1′″の
場合には、格納終了を示す読出可能信号RXRDYが外
部(上位コントローラ10又は電流制御部22)に出力
される。そして、レジスタ41のデータはレジスタ42
に転送され、読出可能状態となる。尚、レジスタ41は
データビット部BO〜B7のデータを各フレームSF、
IF〜8Fよりも1フレーム分多い10個分(8X 1
0ビット)を格納するだけの容量を有する。これは、ス
タートフレームSFとデータフレームIF〜8Fの合計
を偶数にするためである。
The register 41 is connected to the reception shift register 38, the latch timing signal generation circuit 39, the AND circuit 47, and the register 42, and is controlled by the reception shift register 38 by the timing pulse from the latch timing generation circuit 39.
The data in the data bit section BO-87 of each frame is inputted in parallel from the BO-87 and stored. Further, the register 41 is connected to an AND circuit 47, and outputs a high level "1" to the AND circuit 47 when data storage is completed. Therefore,
When the other input of the AND circuit 47 is at a high level "1", the read enable signal RXRDY indicating the end of storage is output to the outside (the upper controller 10 or the current control unit 22). Data is in register 42
The data is transferred to and becomes readable. Note that the register 41 stores the data in the data bit sections BO to B7 for each frame SF,
10 frames (1 frame more than IF~8F) (8X 1
0 bit). This is to make the total of the start frame SF and data frames IF to 8F an even number.

レジスタ42はレジスタ41と同し容量(8×10ビッ
ト)であり、レジスタ41、ラッチタイミング信号発生
回路39、出力バッファ43及びフレームセレクタ44
に接続される。レジスタ42はラッチタイミング信号発
生回路39からのタイミングパルスに応じて、レジスタ
41内のデータを全て格納し、そのデータをフレームセ
レクタ44及び出力バッファ43にパラレルに同時に出
力する。
The register 42 has the same capacity (8 x 10 bits) as the register 41, and includes the register 41, a latch timing signal generation circuit 39, an output buffer 43, and a frame selector 44.
connected to. The register 42 stores all the data in the register 41 in response to a timing pulse from the latch timing signal generation circuit 39, and simultaneously outputs the data to the frame selector 44 and output buffer 43 in parallel.

出力バッファ43はレジスタ41と同じ容量(8XIO
ビット)であり、レジスタ42及びデコーダ76に接続
され、フレームIF〜8Fの中からデコーダ76で指定
されたアドレスに対応するフレームのデータを外部デー
タバスD21を介して外部に出力する。
The output buffer 43 has the same capacity as the register 41 (8XIO
It is connected to the register 42 and the decoder 76, and outputs the data of the frame corresponding to the address specified by the decoder 76 from frames IF to 8F to the outside via the external data bus D21.

フレームセレクタ44はレジスタ42、シフトレジスタ
45及びデコーダ76に接続され、デコーダ76のフレ
ーム選択信号SEに応じて、レジスタ42から順番に出
力されるフレームIF〜8Fの中の任意のフレーム2個
分のデータを選択的にシフ1〜レジスタ45に出力する
The frame selector 44 is connected to the register 42, the shift register 45, and the decoder 76, and corresponds to the frame selection signal SE of the decoder 76 for any two frames among frames IF to 8F sequentially output from the register 42. Data is selectively output to shift 1 to register 45.

シフトレジスタ45は2フレ一ム分のデータ(8×2ビ
ット)を格納するだけの容量を有し。
The shift register 45 has a capacity to store data for two frames (8×2 bits).

ラッチタイミング信号発生回路39、フレームセレクタ
44、出力バッファ46及びコントロールレジスタ75
に接続され、タイミング信号に応じてフレームセレクタ
44で選択された任意の2フレ一ム分のデータを格納し
、コントロールレジスタ75の出力に応じて、格納した
データを所定量だけシフトし、出力バッファ46に出力
する。
Latch timing signal generation circuit 39, frame selector 44, output buffer 46, and control register 75
is connected to the output buffer, stores data for any two frames selected by the frame selector 44 in accordance with the timing signal, shifts the stored data by a predetermined amount in accordance with the output of the control register 75, and outputs data to the output buffer. 46.

即ち、このシフトレジスタ45は第2図の位相信号P4
をサーボモータの極数に応じて出力するためのレジスタ
である。通常、位置センサ変換手段14が出力する位相
信号P3は、極数が2個の場合の信号であるが、サーボ
モータ3の極数が4極、6極、8極の場合にはそれに応
じた位相信号P4を出力しなければならない。従って、
シフトレジスタ45は、受信したデータが第3図の位置
センサ変換手段14から出力された2極分の位相信号P
3から4極、6極又は8極の位相<H号を生成しなけれ
ばならない。従って、シフ1〜レジスタ45はレジスタ
42から出力されるデータの中から位相信号の乗ったフ
レームを取り出し、さらにそのデータをシフトし、極数
が4極、6極、8極の位相信号を生成している。尚、サ
ーボモータ3の極数が2極の場合はデータをシフトせず
に直接出力バッファ46を介して出力すればよい。
That is, this shift register 45 receives the phase signal P4 in FIG.
This is a register to output according to the number of poles of the servo motor. Normally, the phase signal P3 output by the position sensor conversion means 14 is a signal when the number of poles is two, but when the number of poles of the servo motor 3 is 4, 6, or 8, the phase signal P3 is changed accordingly. A phase signal P4 must be output. Therefore,
The shift register 45 converts the received data into a two-pole phase signal P output from the position sensor conversion means 14 shown in FIG.
A phase of 3 to 4 poles, 6 poles or 8 poles <H must be generated. Therefore, shift 1 to register 45 extract the frame carrying the phase signal from the data output from register 42, further shift the data, and generate phase signals with the number of poles of 4, 6, and 8. are doing. Note that when the number of poles of the servo motor 3 is two, the data may be directly outputted via the output buffer 46 without being shifted.

出力バッファ46はシフトレジスタ45に接続され、シ
フトレジスタ45内のデータを固定レベルの位相信号P
4に変換して電流制御部22に出力する。
The output buffer 46 is connected to the shift register 45 and converts the data in the shift register 45 into a fixed level phase signal P.
4 and output to the current control section 22.

以上、受信データの処理について説明したが、通信回線
をマルチポイント接続する場合には、子局側のシリアル
通信インターフェイスに局セレクトデコーダ40、オア
回路46、アンド回路47及び送信側出力バッファ79
が必要となるので、これらについて説明する。
The processing of received data has been described above, but when connecting communication lines at multiple points, the serial communication interface on the slave station side includes the station select decoder 40, the OR circuit 46, the AND circuit 47, and the transmitting side output buffer 79.
These will be explained below.

局セレクトデコーダ40は受信用シフトレジスタ38、
送信側出力バッファ79.オア回路46に接続され、受
信用シフトレジスタ38に格納されている送信先局アド
レスSO,S1及びS2のデータが自局のアドレスであ
る場合は、オア回路46にハイレベル“1″を、そうで
ない場合はローレベルII O”を出力する。オア回路
46は局セレクトデコーダ40及びコントロールレジス
タ75の出力を入力し、その論理和信号をアンド回路4
7に出力する。従って、受信用シフトレジスタ38に格
納されている送信先局アドレス5O5S1及びS2のデ
ータが自局のアドレスであり、がっ、レジスタ41のデ
ータ格納が終了している場合に限り、アンド回路47か
らは読出可能信号RXRDYが出力される。従って、電
流制御部22はそのデータを自局に対するデータとして
読み出すことができる。そうでない場合はアンド回路4
7からは読出可能信号RXRDYは出力されない。
The station select decoder 40 includes a reception shift register 38,
Transmission side output buffer 79. If the data of destination station addresses SO, S1, and S2 connected to the OR circuit 46 and stored in the reception shift register 38 are the addresses of the own station, a high level "1" is input to the OR circuit 46, and so on. Otherwise, it outputs a low level II O''.
Output to 7. Therefore, only when the data of the destination station addresses 5O5S1 and S2 stored in the receiving shift register 38 are the addresses of the own station, and the data storage of the register 41 has been completed, the AND circuit 47 A read enable signal RXRDY is output. Therefore, the current control unit 22 can read the data as data for its own station. If not, AND circuit 4
The read enable signal RXRDY is not output from 7.

このときに、コントロールレジスタ75からオア回路に
ハイレベルII I I+が出力されている場合は、局
セレクトデコーダ40の出力に関係なく受信データは電
流制御部22に読み取られる。即ち、複数の電流制御系
2がマルチポイント接続されており、全ての電流制御部
22に同時に同じデータを送信したい場合には、オア回
路46に対してハイレベルが出力されるようにコントロ
ールレジスタ75をセットすればよい。
At this time, if a high level II II I+ is output from the control register 75 to the OR circuit, the received data is read by the current control unit 22 regardless of the output of the station select decoder 40. That is, when a plurality of current control systems 2 are multi-point connected and it is desired to transmit the same data to all current control units 22 at the same time, the control register 75 is set so that a high level is output to the OR circuit 46. All you have to do is set .

また、局セレクトデコーダ40は送信要求先アドレスR
O1R1及びR2が自局のアドレスである場合は、送信
側出力バッファ79にローレベル“0″を出力し、そう
でない場合はハイレベル“l I+を出力する。従って
、シリアル通信インターフェイスは送信要求先アドレス
RO,R1及びR2が自局のアドレスである場合にのみ
、データを出力し、そうでない場合はデータを出力しな
い。
In addition, the station select decoder 40 also outputs the transmission request destination address R.
If O1R1 and R2 are the addresses of the own station, a low level "0" is output to the transmitting side output buffer 79, otherwise a high level "I+" is output.Therefore, the serial communication interface is the address of the transmission request destination. Data is output only when addresses RO, R1, and R2 are the addresses of the own station; otherwise, no data is output.

受信側が親局の場合には、このような制御は必要なく、
送信されてくるデータを全て読み込めばよい。
If the receiving side is the master station, such control is not necessary.
All you have to do is read all the data that is sent.

次に、データを送信する場合について説明する。Next, the case of transmitting data will be explained.

レジスタ70は外部データバス021、データセレクタ
72及びデコーダ76に接続され、デコーダ76からの
書込み信号WRIに応じて、外部データバスD21を介
して送信されてきたデータを格納し、データセレクタ7
2に出力する。
The register 70 is connected to the external data bus 021, the data selector 72, and the decoder 76, stores data transmitted via the external data bus D21 in response to the write signal WRI from the decoder 76, and selects the data selector 7.
Output to 2.

入力ラッチ71は2フレ一ム分のデータ(8×2ビット
)を格納するだけの容量を有し、外部データバスD22
及びデータセレクタ72に接続され、電流制御部22の
メモリ領域に格納されている電流アンプの定格を示すI
Dコードやモータ定格コード等のデータを格納し、デー
タセレクタ72に出力する。
The input latch 71 has a capacity to store data for two frames (8 x 2 bits), and is connected to the external data bus D22.
and I indicating the rating of the current amplifier connected to the data selector 72 and stored in the memory area of the current control unit 22
Data such as the D code and motor rating code are stored and output to the data selector 72.

データセレクタ72はレジスタ7o、入力ラッチ71、
レジスタ73、コントロールレジスタ75及びデコーダ
76に接続され、デコーダ76のフレーム選択信号SE
に応じて、レジスタ7oがら順番に出力されるフレーム
IF〜8Fの中の任意の順番にフレーム2個分のデータ
を選択的に挿入し、レジスタ73に出力する。
The data selector 72 includes a register 7o, an input latch 71,
It is connected to the register 73, the control register 75 and the decoder 76, and receives the frame selection signal SE of the decoder 76.
Accordingly, data for two frames is selectively inserted into an arbitrary order among frames IF to 8F sequentially outputted from the register 7o, and outputted to the register 73.

レジスタ73はシフトタイミング信号発生回路78、デ
ータセレクタ72及びレジスタ74に接続され、タイミ
ング信号に応じてデータセレクタ72からのデータを格
納し、次段のレジスタ74に出力する。尚、レジスタ7
3はデータビット部BO−37のデータを各フレームS
F、1F〜8Fよりも1フレーム分多い10個分(8X
 10ビット)を格納するだけの容量を有する。
The register 73 is connected to the shift timing signal generation circuit 78, the data selector 72, and the register 74, stores data from the data selector 72 in response to the timing signal, and outputs the data to the register 74 at the next stage. Furthermore, register 7
3 is the data in the data bit section BO-37 for each frame S.
F, 10 pieces (8X
10 bits).

レジスタ74はレジスタ73と同じ容′jIk(8X1
0ビット)であり、レジスタ73、シフトタイミング信
号発生回路78、送信用シフトレジスタ77に接続され
る。レジスタ74はシフトタイミング信号発生回路78
からのタイミングパルスに応じて、レジスタ41内のデ
ータを全て格納する。
Register 74 has the same capacity as register 73 'jIk (8X1
0 bit) and is connected to the register 73, shift timing signal generation circuit 78, and transmission shift register 77. The register 74 is a shift timing signal generation circuit 78
All data in the register 41 is stored in response to timing pulses from the register 41.

データの格納が終了したら送信可能信号TXRDYを電
流制御部22に出力する。従って、電流制御部22はレ
ジスタ74のデータを送信用シフ1〜レジスタ77にパ
ラレル転送し、送信可能状態にすることができる。
When data storage is completed, a transmittable signal TXRDY is output to the current control section 22. Therefore, the current control unit 22 can transfer the data in the register 74 in parallel to the transmitting shift 1 to the register 77 to enable transmission.

送信用シフトレジスタ77はレジスタ74、シフトタイ
ミング信号発生回路78及び送信用出力バッファ79に
接続され、レジスタ74のデータを格納し、タイミング
信号に応じて格納されたデータをシリアルに送信用出力
バッファ79に出力する。
The transmission shift register 77 is connected to the register 74, the shift timing signal generation circuit 78, and the transmission output buffer 79, stores the data in the register 74, and serially transfers the stored data to the transmission output buffer 79 according to the timing signal. Output to.

送信用出力バッファ79は送信用シフトレジスタ77及
び局セレクトデコーダ40に接続され、局セレクトデコ
ーダ40からローレベル110 I+即ち送信してもよ
いという信号を受けることによって、送信用シフトレジ
スタ77からシリアルに出力されるデータを送信データ
D12として出力する。
The transmission output buffer 79 is connected to the transmission shift register 77 and the station select decoder 40, and receives a low level 110 I+ signal from the station select decoder 40, that is, a signal indicating that it is OK to transmit, to serially output the output from the transmission shift register 77. The output data is output as transmission data D12.

コントロールレジスタ75は外部データバスD21、セ
レクトスイッチ34、ラッチタイミング信号発生回路3
9、オア回路46、シフトレジスタ45.データセレク
タ72及びシフトタイミング信号発生回路78に接続さ
れ、各種のコントロール用信号を外部データバスD21
から入力し、そのコントロール用信号を各デバイスに出
力し、アイドル信号の有無、送受信するフレームの数等
を定義する。
The control register 75 includes the external data bus D21, the select switch 34, and the latch timing signal generation circuit 3.
9, OR circuit 46, shift register 45. It is connected to the data selector 72 and the shift timing signal generation circuit 78, and transmits various control signals to the external data bus D21.
The control signal is output to each device, and the presence or absence of an idle signal, the number of frames to be sent and received, etc. are defined.

デコーダ76は電流制御部22から各種の信号、例えば
チップセレクト信号C8、アドレス信号ADR1読出信
号RD、書込信号WR及びデータ読出書込信号DRW等
を入力し、読出信号RDI、RD2、書込信号WRI、
WR2及びフレーム選択信号SE等を各デバイスに出力
する。
The decoder 76 inputs various signals from the current control unit 22, such as a chip select signal C8, an address signal ADR1, a read signal RD, a write signal WR, and a data read/write signal DRW, and receives read signals RDI, RD2, and a write signal. WRI,
It outputs WR2, frame selection signal SE, etc. to each device.

次に、このシリアル通信方式の動作について説明する。Next, the operation of this serial communication method will be explained.

まず、シリアル通信インターフェイスは第1図のような
フレーム構成のデータを受信すると、それを受信データ
Dllとしてデジタルフィルタ32を通過させ、受信デ
ータDllのパルス割れ等を修正する。
First, when the serial communication interface receives data having a frame structure as shown in FIG. 1, it passes it through the digital filter 32 as received data Dll, and corrects pulse breakage and the like in the received data Dll.

修正された受信データDllは、セレクトスイッチ34
によって、アイドル信号チエツク回路35を通過するか
、又は直接アンド回路37及びスタートビット検出器3
6に出力される。従って、受信データDllの内、各フ
レームのスタートビットSBに続くデータビット部BO
−B7、判別ビットDB及びパリティビットPBのデー
タのみが受信用シフトレジスタ38に格納される。
The modified received data Dll is sent to the select switch 34.
depending on whether the signal passes through the idle signal check circuit 35 or directly through the AND circuit 37 and the start bit detector 3.
6 is output. Therefore, in the received data Dll, the data bit part BO following the start bit SB of each frame
-B7, only the data of the discrimination bit DB and the parity bit PB are stored in the reception shift register 38.

受信用フレーム38に格納された受信データD11がス
タートフレームSFの場合、そのデータビット部BO−
85(送信先局アドレスSO,S1及びS2と送信要求
先アドレスRO,R1及びR2)に基づいて、局セレク
トデコーダ40は自局に対して送信されたデータなのか
、自局に対する送信要求なのかを判断する。
When the reception data D11 stored in the reception frame 38 is a start frame SF, its data bit part BO-
Based on 85 (destination station addresses SO, S1, and S2 and transmission request destination addresses RO, R1, and R2), the station select decoder 40 determines whether the data is transmitted to the own station or whether it is a transmission request to the own station. to judge.

自局に対して送信されたデータあり、かつ、レジスタ4
1に受信データの全てのフレームが格納された場合は、
アンド回路47から読出可能信号RXRDYが出力され
るので、受信データDllはレジスタ41及び42、出
力バッファ43及び外部データバスD12を介して電流
制御部22体に取り込まれる。
There is data sent to own station and register 4
If all frames of received data are stored in 1,
Since the AND circuit 47 outputs the read enable signal RXRDY, the received data Dll is taken into the current control unit 22 via the registers 41 and 42, the output buffer 43, and the external data bus D12.

また、受信データDllに位相信号が含まれ、極数を変
換しなければならない場合は、フレームセレクタ44、
シフ1へレジスタ45及び出カバソファ46を介して所
定極数の位相信号P4が出力される。
In addition, if the received data Dll includes a phase signal and the number of poles must be converted, the frame selector 44,
A phase signal P4 having a predetermined number of poles is output to the shifter 1 via the register 45 and the output sofa 46.

次に、データを送信する場合について説明する。Next, the case of transmitting data will be explained.

送信データは外部データバスD21、データセレクタ7
2、レジスタ73及び74を介して送信用シフトレジス
タ77に格納される。このとき、電流制御部22のメモ
リ領域に格納されているデータを同時に送信する場合は
、データセレクタスイッチ72によって、送信データの
任二a、の場所にメモリ領域のデータが挿入される。
Transmission data is external data bus D21, data selector 7
2, stored in the transmission shift register 77 via registers 73 and 74. At this time, if the data stored in the memory area of the current control unit 22 is to be transmitted simultaneously, the data selector switch 72 inserts the data in the memory area into any location a of the transmitted data.

レジスタ74は送信データの格納が終了した時点で送信
可能信号TXRDYを電流制御部22に出力するので、
この送信可能信号T X RD Yに応じて送信用シフ
トレジスタ77から送信データD12が出力される。し
かし、受信用フレーム38に格納された受信データDl
lの送信要求先アドレスRO,R1及びR2が自局に対
する送信要求でなければ、送信用出力バッファ79によ
って送信データD12は出力されない。
The register 74 outputs the transmit enable signal TXRDY to the current control unit 22 at the time when the storage of the transmit data is completed.
Transmission data D12 is output from the transmission shift register 77 in response to the transmission enable signal T.sub.XRD.sub.Y. However, the received data Dl stored in the receiving frame 38
If the transmission request destination addresses RO, R1, and R2 of l are not a transmission request for the own station, the transmission output buffer 79 does not output the transmission data D12.

第4図は第2図の位置センサ4の一例である誘導型の位
相シフト型位置センサからなるアブソリュート型の位置
センサを示す図である。尚、この位置センサ4の詳細に
ついては特開昭57−70406号公報にて公知なので
、ここでは簡単に説明する。
FIG. 4 is a diagram showing an absolute type position sensor consisting of an inductive phase shift type position sensor, which is an example of the position sensor 4 of FIG. 2. The details of this position sensor 4 are known from Japanese Patent Application Laid-Open No. 70406/1982, so a brief explanation will be given here.

位置センサ4は、複数の極A−Dが円周方向に所定間隔
(−例として90度)で設けられたステータ23と、各
極A−Dによって囲まれたステータ23の空間内に挿入
されたロータ24とを備えている。
The position sensor 4 is inserted into a stator 23 in which a plurality of poles A-D are provided at predetermined intervals (for example, 90 degrees) in the circumferential direction, and a space of the stator 23 surrounded by each pole A-D. and a rotor 24.

ロータ24は、回転角度に応じて各極A−Dのリラクタ
ンスを変化させる形状及び材質からなり、−例として偏
心円筒形である。ステータ23の各極A−Dには、1次
コイルIA〜ID及び2次コイル2A〜2Dがそれぞれ
巻回されている。そして、半径方向で対向する2つの極
Aと極Cの第1の対及び極Bと極りの第2の対は差動的
に動作するようにコイルが巻かれて、かつ差動的なりラ
フタンス変化が生じるように構成されている。
The rotor 24 is made of a shape and material that changes the reluctance of each pole A-D depending on the rotation angle, and has an eccentric cylindrical shape, for example. Primary coils IA to ID and secondary coils 2A to 2D are wound around each pole A to D of the stator 23, respectively. The first pair of poles A and C and the second pair of poles B and B, which are radially opposed to each other, are wound with coils so as to operate differentially. It is configured such that a roughtance change occurs.

第1の極の対A及びCに巻かれている1次コイルIA及
びICは、正弦信号sinωtで励磁され、第2の極の
対B及びDに巻かれている1次コイルIB及びICは余
弦信号cosωtで励磁されている。その結果、2次コ
イル2A〜2Dからは、それらの合成出力信号Yが得ら
れる。この合成出力信号Yは、基準信号となる1次交流
信号(1次コイルの励磁信号)sinωを又はcosω
tに対して、ロータ24の回転角度θに応じた電気的位
相角度だけ位相シフトした信号Y=sin(ωを一〇)
である。
The primary coils IA and IC wound around the first pole pair A and C are excited by a sinusoidal signal sinωt, and the primary coils IB and IC wound around the second pole pair B and D are excited by the sinusoidal signal sinωt. It is excited by a cosine signal cosωt. As a result, a composite output signal Y is obtained from the secondary coils 2A to 2D. This composite output signal Y is a primary AC signal (primary coil excitation signal) sinω or cosω, which is a reference signal.
With respect to t, a signal Y=sin (ω is 10) whose phase is shifted by an electrical phase angle corresponding to the rotation angle θ of the rotor 24
It is.

従って、上述のような誘導型の位相シフ1〜型位置セン
サを用いる場合には、1次交流信号sinωを又はco
sωtを発生する交流信号発生手段と、合成出力信号Y
の電気的位相ずれOを測定しロータの位置データを算出
する位相差測定手段とを備える必要がある。この1次交
流信号発生手段と位相差測定手段とは位置センサ変換手
段14の中に設けられる。
Therefore, when using the above-mentioned inductive phase shift type position sensor, the primary AC signal sinω or co
AC signal generating means for generating sωt and a composite output signal Y
It is necessary to provide a phase difference measuring means for measuring the electrical phase shift O of the rotor and calculating the position data of the rotor. The primary AC signal generating means and the phase difference measuring means are provided in the position sensor converting means 14.

第5図は第2図の位置センサ変換手段14の一例を示す
図である。位置センサ変換手段14においては、所定の
高速クロックパルスCPをカウンタ26でカウントし、
このカウンタ26の出力に基づいてサイン・コサイン信
号発生手段27で正弦信号sinωを及び余弦信号co
sωtをそれぞれ発生する。サイン・コサイン信号発生
手段27の出力は前述のように1次コイルIA〜ID及
び2次コイル2A〜2Dのそれぞれに印加される。
FIG. 5 is a diagram showing an example of the position sensor conversion means 14 of FIG. 2. In the position sensor conversion means 14, a predetermined high-speed clock pulse CP is counted by a counter 26,
Based on the output of the counter 26, the sine/cosine signal generating means 27 generates a sine signal sinω and a cosine signal co.
sωt respectively. The output of the sine/cosine signal generating means 27 is applied to the primary coils IA to ID and the secondary coils 2A to 2D, respectively, as described above.

2次コイル2A〜2Dの合成出力信号Y=sin (ω
を一〇)は、ゼロクロス検出手段28に与えられる。ゼ
ロクロス検出手段28は合成出力信号Yの電気位相角が
ゼロのタイミングに同期してパルスLを出力する。パル
スLはラッチ回路29のラッチパルスとして使用される
。従って、ラッチ回路29がパルスLの立ち上がり応じ
てカウンタ26のカウント値をラッチする。カウンタ2
6のカウント値が一巡する期間と正弦信号sinωtの
1周期とを同期させる。すると、ラッチ回路29には基
準交流信号sinωtと合成出力信号Y=sin (ω
を一θ)との位相差θに対応するカウント値がラッチさ
れることとなる。従って、ラッチされた値がデジタルの
位置データDθとして出力される。尚、ラッチパルスL
はタイミングパルスとして適宜利用することもできる。
Combined output signal Y=sin (ω
10) is given to the zero cross detection means 28. The zero cross detection means 28 outputs a pulse L in synchronization with the timing when the electrical phase angle of the composite output signal Y is zero. Pulse L is used as a latch pulse for latch circuit 29. Therefore, the latch circuit 29 latches the count value of the counter 26 in response to the rise of the pulse L. counter 2
The period during which the count value of 6 goes around once is synchronized with one cycle of the sine signal sinωt. Then, the latch circuit 29 receives the reference AC signal sinωt and the composite output signal Y=sin (ω
The count value corresponding to the phase difference θ with respect to θ) is latched. Therefore, the latched value is output as digital position data Dθ. Furthermore, latch pulse L
can also be used appropriately as a timing pulse.

また、ラッチ回路29にラッチされた値のうちサーボモ
ータの一回転内の絶対位置を示す値がデジタルの位相デ
ータP3として出力され、界磁の切換位置制御に利用さ
れる。
Further, among the values latched by the latch circuit 29, a value indicating the absolute position within one rotation of the servo motor is output as digital phase data P3, and is used for field switching position control.

尚、第4図のような位相シフト型位置センサの合成出力
信号P1はサーボモータの絶対位置を信号の位相差とし
ているので、ノイズの影響を受けにくいという特徴を有
する。従って、第2図のように、位置センサ4から位置
速度制御系1に対して合成出力信号P1をフィードバッ
クする場合。
Incidentally, the composite output signal P1 of the phase shift type position sensor as shown in FIG. 4 uses the absolute position of the servo motor as the phase difference of the signal, and therefore has the characteristic that it is not easily affected by noise. Therefore, as shown in FIG. 2, when the composite output signal P1 is fed back from the position sensor 4 to the position and speed control system 1.

通信回線を使用せずに、直接フィードバックして、ノイ
ズ等の影響を受けないので、さしつかえない。
This is acceptable because it provides direct feedback without using a communication line and is not affected by noise or the like.

但し、位置センサ4の合成出力信号P1をシリアル通信
インターフェイス等の通信回線を用いてフィードバック
してもよい。
However, the composite output signal P1 of the position sensor 4 may be fed back using a communication line such as a serial communication interface.

なお、第4図及び第5図は一回転の範囲をアブソリコー
トで検出するものであるが、このようなアブソリュート
センサを複数個組み合わせて多回転にわたってアブソリ
コート位置を検出するようにするとよい。
Although FIGS. 4 and 5 show that the range of one rotation is detected by absolute coating, it is preferable to combine a plurality of such absolute sensors to detect the absolute coating position over multiple rotations.

第6図は本発明の通信方式を用いて複数のサーボモータ
を切り換えて制御する場合の実施例を示す図である。第
6図において第2図と同じ構成のものには同一の符号が
付しであるので、その説明は省略する。
FIG. 6 is a diagram showing an embodiment in which a plurality of servo motors are switched and controlled using the communication system of the present invention. In FIG. 6, the same components as in FIG. 2 are denoted by the same reference numerals, so their explanation will be omitted.

本実施例が第2図のものと異なる点は複数のサーボモー
タ3a、3b〜3nを軸切換ユニット20に接続し、3
相(U相、■相、W相)の駆動電流及び位置センサ用の
正弦信号、余弦信号、合成出力信号を軸切換ユニット2
0で切り換えて交互に駆動するようにした点である。
This embodiment differs from the one in FIG. 2 in that a plurality of servo motors 3a, 3b to 3n are connected to an axis switching unit 20,
The drive current of the phases (U phase, ■ phase, W phase) and the sine signal, cosine signal, and composite output signal for the position sensor are sent to the axis switching unit 2.
The point is that it is switched at 0 and driven alternately.

軸切換ユニット20は電流制御部22、位置センサ変換
手段14、上位コントローラ、サーボモータ3a、3 
b 〜3 n及び位置センサ4a、4b〜4nにそれぞ
れ接続されており、上位コントローラ10からの軸切換
信号chに応じて、駆動電流を各サーボモータ3a、3
b〜3nに、位置センサ用の信号を各位置センサ4a、
4b〜4nに。
The axis switching unit 20 includes a current control section 22, a position sensor conversion means 14, a host controller, and servo motors 3a, 3.
b to 3n and position sensors 4a, 4b to 4n, respectively, and the drive current is applied to each servo motor 3a, 3 according to the axis switching signal channel from the host controller 10.
b to 3n, the position sensor signals are sent to each position sensor 4a,
4b to 4n.

それぞれ切換えて接続する。従って、上位コントローラ
10の軸切換信号chに応じてサーボモータ3a、3 
b −3n及び位置センサ4a、4b〜4nの一組が位
置速度制御系1及び電流制御系2に選択的に接続され、
それぞれのサーボ制御ループを形成する。
Switch and connect each. Therefore, depending on the axis switching signal channel of the host controller 10, the servo motors 3a, 3
b-3n and a set of position sensors 4a, 4b to 4n are selectively connected to the position and speed control system 1 and the current control system 2,
form respective servo control loops.

即ち、軸切換えユニット20は、各サーボモータ3a、
3 b 〜3 n及び各位置センサ4a、4b〜4nの
それぞれに対応して設けられたスイッチング素子を有し
ており、1組のサーボモータ及び位置センサに対応した
スイッチング素子のみを選択的に導通させることにより
、1組のサーボモータ及び位置センサのみを制御ループ
に選択的に接続する。
That is, the axis switching unit 20 has each servo motor 3a,
3b to 3n and each position sensor 4a, 4b to 4n, and selectively conducts only the switching element corresponding to one set of servo motor and position sensor. This selectively connects only one set of servo motors and position sensors to the control loop.

この時、サーボモータ3a、3b〜3nの全ての定格が
同じ場合はサーボモータの定格を示すテーブル番号は一
定のまま切換え制御だけを行えばよい。また、各サーボ
モータ3a、3b〜3nの定格がそれぞれ異なる場合に
は、そのサーボモータを制御する前に通信回線を介して
そのサーボモータの定格を示すテーブル番号を送信して
やれば、1つの電流制御系2で容量の異なるサーボモー
タを順次切換えて制御することができる。
At this time, if all the ratings of the servo motors 3a, 3b to 3n are the same, it is only necessary to perform switching control while keeping the table number indicating the rating of the servo motors constant. In addition, if the ratings of the servo motors 3a, 3b to 3n are different, if the table number indicating the rating of the servo motor is transmitted via the communication line before controlling the servo motor, one current control can be performed. System 2 can sequentially switch and control servo motors with different capacities.

第7図は本発明の通信方式を用いて複数のサーボモータ
を同時に制御する場合の実施例を示す図である。第7図
において第2図と同じ構成のものには同一の符号が付し
であるので、その説明は省略する。
FIG. 7 is a diagram showing an embodiment in which a plurality of servo motors are controlled simultaneously using the communication method of the present invention. In FIG. 7, the same components as in FIG. 2 are denoted by the same reference numerals, so their explanation will be omitted.

本実施例が第2図のものと異なる点はサーボモータの駆
動電流を制御する電流制御系2X、2Y。
This embodiment differs from the one in FIG. 2 in the current control systems 2X and 2Y that control the drive current of the servo motor.

2Zを複数設け、これらの間を通信回線でマルチポイン
ト接続し、各電流制御系2X、2Y、2Zにサーボモー
タ3X、3Y、3zをそれぞれ接続した点である。即ち
、本実施例では、サーボモータと、位置センサと、電流
制御系とからなる組を複数個設け、これらのシリアル通
信インターフェイス21X、2]、Y及び21Zと位置
速度制御系1のシリアル通信インターフェイス13とを
マルチポイント接続とした。また、本実施例も第2図及
び第6図の実施例と同様に 位置センサ4X、4Y及び
4Zの出力PX、PY及びpzは位置センサ変換手段1
4に直接取り込むようにしている。
A plurality of 2Zs are provided, a communication line is used to connect them at multiple points, and servo motors 3X, 3Y, and 3z are connected to each current control system 2X, 2Y, and 2Z, respectively. That is, in this embodiment, a plurality of sets consisting of a servo motor, a position sensor, and a current control system are provided, and these serial communication interfaces 21X, 2], Y, and 21Z and the serial communication interface of the position and speed control system 1 are provided. 13 for multi-point connection. Also, in this embodiment, similarly to the embodiments shown in FIGS. 2 and 6, the outputs PX, PY, and pz of the position sensors 4X, 4Y, and 4Z are converted to the position sensor conversion means 1.
I am trying to import it directly into 4.

位置速度制御系1では、位置制御動作及び速度制御動作
を各軸毎にそれぞれ行い、シリアル通信インターフェイ
ス13では各軸のデータを送受信する。
The position and speed control system 1 performs position control operations and speed control operations for each axis, and the serial communication interface 13 transmits and receives data for each axis.

シリアル通信インターフェイス13がら各電流制御系の
シリアル通信インターフェイス21X、21Y、212
に対して、トルク信号T1、位相データI) 3及び各
種データD1を同時に送信することができ、サーボモー
タ3X、3Y及び3Zを同時に制御することが可能とな
る。各電流制御部22X、22Y、22Zは送信されて
きたデータが自局に対するデータであるがどうかを判別
し、自局に対するデータの場合にはそれを読み取り、そ
のデータに応じた制御を行う。例えば、サーボモータの
駆動に関するデータの場合は、そのデータに基づいて駆
動電流をサーボモータに供給する。
The serial communication interface 13 includes serial communication interfaces 21X, 21Y, and 212 for each current control system.
, the torque signal T1, phase data I) 3, and various data D1 can be transmitted simultaneously, making it possible to control the servo motors 3X, 3Y, and 3Z simultaneously. Each of the current control units 22X, 22Y, and 22Z determines whether the transmitted data is for its own station, reads it if it is for its own station, and performs control according to the data. For example, in the case of data regarding the drive of a servo motor, a drive current is supplied to the servo motor based on the data.

また、サーボモータの定格を示すテーブル番号が送信さ
れてきた場合は、そのテーブル番号に応じて電流制御部
22の駆動電流がそのサーボモータの定格に応じたもの
に変更される。
Furthermore, when a table number indicating the rating of the servo motor is transmitted, the drive current of the current control section 22 is changed to one corresponding to the rating of the servo motor in accordance with the table number.

本実施例のようにサーボモータと電流制御系とからなる
組を複数個設け、位置・速度制御系は共通とし、それら
の間の通信回線をマルチポイント接続とすることによっ
て、複数のサーボモータを同時に制御することができる
As in this embodiment, multiple sets of servo motors and current control systems are provided, the position and speed control systems are common, and the communication lines between them are multi-point connected. can be controlled at the same time.

なお、上述の実施例では、本発明のシリアル通信方式を
サーボ制御システムに適用した場合について説明したが
、これに限定されるものではなくその他のデジタル通信
方式にも同様に適用できることは―゛うまでもない。
In the above embodiment, the case where the serial communication method of the present invention is applied to a servo control system has been described, but it is not limited to this and can be similarly applied to other digital communication methods. not.

〔発明の効果〕 本発明では、スタートビットと、データビットと1判別
ビットと、パリティビットとからなるフレームを一単位
として、所定数のフレームだけ送受信するという構成を
採用したので、送受信に要する時間、即ち、通信速度を
大幅に向上でき、従来不可能とされていた速度制御部と
電流制御部との間におけるデータの送受信を高速で行う
ことができ、送受信用のインターフェイスもコスト的に
安価で単純なハードウェアで実現できるという効果があ
る。
[Effects of the Invention] The present invention employs a configuration in which only a predetermined number of frames are transmitted and received, with each frame consisting of a start bit, data bit, 1 discrimination bit, and parity bit being one unit, so that the time required for transmission and reception is reduced. In other words, the communication speed can be greatly improved, data can be sent and received between the speed control section and the current control section at high speed, which was previously considered impossible, and the interface for sending and receiving is also inexpensive. This has the advantage that it can be realized with simple hardware.

また、送受信するフレームを、局アドレスのセットされ
たスタートフレームと、所定数のデータフレームとで構
成しているので、マルチポイント接続した場合でも、送
信データが自局に対するデータなのかどうかを容易に判
断することができるという効果もある。
In addition, since the frame to be sent and received consists of a start frame with the station address set and a predetermined number of data frames, it is easy to check whether the transmitted data is for the own station, even when multi-point connections are made. It also has the effect of being able to make decisions.

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

第1図は本発明の通信方式で用いる送受信データの一実
施例の概略構成を示す概念図、第2図は本発明の通信方
式が適用されるサーボ制御システムの概略構成を示すブ
ロック図、第3図は第2図のシリアル通信インターフェ
イスの構成例を示すブロック図、 第4図は第1図の位置センサ4の一例である誘導型の位
相シフト型位置センサからなるアブソリュート型の位置
センサを示す図、 第5図は第1図の位置センサ変換手段の一例を示すブロ
ック図、 第6図は本発明の通信方式を用いて複数のサーボモータ
を切り換えて制御する場合の実施例を示すブロック図、 第7図は本発明の通信方式を用いて複数のサーボモータ
を同時に制御する場合の実施例を示すブロック図、 第8図は従来のサーボ制御システムの一例の概略構成を
示すブロック図である。 ・・・受信用シフトレジスタ、41.42・・・レジス
タ、43.46・・・出力バッファタ、45・・・シフ
トレジスタ、40・・・局セレクトデコーダ
FIG. 1 is a conceptual diagram showing a schematic configuration of an embodiment of transmitted and received data used in the communication method of the present invention, FIG. 2 is a block diagram showing a schematic configuration of a servo control system to which the communication method of the present invention is applied, and FIG. 3 is a block diagram showing an example of the configuration of the serial communication interface shown in FIG. 2, and FIG. 4 shows an absolute position sensor consisting of an inductive phase shift type position sensor, which is an example of the position sensor 4 shown in FIG. 1. 5 is a block diagram showing an example of the position sensor conversion means shown in FIG. 1, and FIG. 6 is a block diagram showing an embodiment in which a plurality of servo motors are switched and controlled using the communication system of the present invention. , FIG. 7 is a block diagram showing an embodiment in which a plurality of servo motors are controlled simultaneously using the communication method of the present invention, and FIG. 8 is a block diagram showing a schematic configuration of an example of a conventional servo control system. . ...Reception shift register, 41.42...Register, 43.46...Output buffer, 45...Shift register, 40...Station select decoder

Claims (1)

【特許請求の範囲】 (1)フレームの開始を示すための1ビットからなるス
タートビットと、 このスタートビットの次に設けられた所定数のビットか
らなるデータビットと、 このデータビットの次にフレームの種類を判別するため
に設けられた1ビットからなる判別ビットと、 この判別ビットの次に設けられたパリテイビットとから
なるフレームを一単位とし、 前記データビットに少なくとも1つの局アドレスをセッ
トしたフレームをスタートフレームとし、前記データビ
ットに各種のデータをセットしたフレームをデータフレ
ームとし、 前記スタートフレームの次に所定数の前記データフレー
ムを付加して送受信することを特徴とするシリアル通信
方式。 (2)ハイレベルとローレベルとが交互に繰り返される
アイドルフレームを前記スタートフレームの前に付加し
て送受信することを特徴とする特許請求の範囲第1項記
載のシリアル通信方式。 (3)特許請求の範囲第1項記載の前記スタートフレー
ム及び前記データフレームからなるシリアルデータを送
受信するインターフェイスであって、受信した前記シリ
アルデータの中から前記データビットのみを抽出して出
力することを特徴とするインターフェイス。(4)前記
スタートフレーム及び前記データフレームを構成するビ
ットの中から前記スタートビットを検出するスタートビ
ット検出手段と、 このスタートビット検出手段に接続され、前記スタート
ビット検出手段からの検出信号に応じて前記シリアルデ
ータの中から前記データビット、前記判別ビット及びパ
リテイビットのみを格納する第1のレジスタと、 この第1のレジスタに接続され、前記第1のレジスタに
格納されている前記データビットのみを格納する第2の
レジスタと、 前記第1及び第2のレジスタに接続され、前記第1のレ
ジスタに格納されている前記判別ビットに基づいて、前
記データビットを前記第2のレジスタの所定位置に格納
するタイミング信号発生手段と、 この第2のレジスタに接続され、前記データビットを外
部に出力するための第1の出力バッファとから構成され
ることを特徴とする特許請求の範囲第3項記載のインタ
ーフェイス。 (5)前記第2のレジスタと前記出力バッファとの間に
接続され、前記第2のレジスタに格納されている前記デ
ータビットを格納し、前記出力バッファに転送する第3
のレジスタと、 この第3のレジスタに接続され、前記第3のレジスタか
ら前記出力バッファに転送される前記データビットの中
から所定のフレーム数に対応するデータビットを格納す
る第4のレジスタと、この第4のレジスタに接続され、
前記データビットを外部に出力するための第2の出力バ
ッファとを有することを特徴とする特許請求の範囲第4
項記載のインターフェイス。 (6)前記第1のレジスタに接続され、前記第1のレジ
スタに格納されている前記データビットの中の前記局ア
ドレスに基づいて、前記第2に格納された前記データビ
ットの出力及び前記シリアルデータの送信を制御する局
セレクトデコーダを有することを特徴とする特許請求の
範囲第3項記載のインターフェイス。
[Claims] (1) A start bit consisting of 1 bit to indicate the start of a frame; Data bits consisting of a predetermined number of bits provided next to this start bit; and a frame next to this data bit. One unit is a frame consisting of a 1-bit discrimination bit provided for discriminating the type of information, and a parity bit provided next to this discrimination bit, and at least one station address is set in the data bit. A serial communication system characterized in that a frame in which the data bits are set is a start frame, a frame in which various data are set in the data bits is used as a data frame, and a predetermined number of data frames are added to the start frame and then transmitted and received. (2) The serial communication system according to claim 1, wherein an idle frame in which a high level and a low level are alternately repeated is added before the start frame for transmission and reception. (3) An interface for transmitting and receiving serial data consisting of the start frame and the data frame according to claim 1, which extracts and outputs only the data bits from the received serial data. An interface featuring: (4) start bit detection means for detecting the start bit from among the bits constituting the start frame and the data frame; a first register that stores only the data bits, discrimination bits, and parity bits from the serial data; and only the data bits connected to the first register and stored in the first register. a second register that stores a second register; and a first output buffer connected to the second register for outputting the data bits to the outside. Interface described. (5) a third register connected between the second register and the output buffer, which stores the data bits stored in the second register and transfers them to the output buffer;
a fourth register connected to the third register and storing data bits corresponding to a predetermined number of frames from among the data bits transferred from the third register to the output buffer; connected to this fourth register,
and a second output buffer for outputting the data bits to the outside.
Interface as described in section. (6) connected to the first register and based on the station address among the data bits stored in the first register, the output of the data bits stored in the second and the serial 4. The interface according to claim 3, further comprising a station select decoder for controlling data transmission.
JP04964090A 1990-03-02 1990-03-02 Serial communication method Expired - Fee Related JP3144680B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP04964090A JP3144680B2 (en) 1990-03-02 1990-03-02 Serial communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP04964090A JP3144680B2 (en) 1990-03-02 1990-03-02 Serial communication method

Publications (2)

Publication Number Publication Date
JPH03252702A true JPH03252702A (en) 1991-11-12
JP3144680B2 JP3144680B2 (en) 2001-03-12

Family

ID=12836810

Family Applications (1)

Application Number Title Priority Date Filing Date
JP04964090A Expired - Fee Related JP3144680B2 (en) 1990-03-02 1990-03-02 Serial communication method

Country Status (1)

Country Link
JP (1) JP3144680B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09511851A (en) * 1994-04-08 1997-11-25 インタラクティブ・プロセス・コントロールズ・コーポレーション Analog interface circuit for process controller and process monitor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09511851A (en) * 1994-04-08 1997-11-25 インタラクティブ・プロセス・コントロールズ・コーポレーション Analog interface circuit for process controller and process monitor

Also Published As

Publication number Publication date
JP3144680B2 (en) 2001-03-12

Similar Documents

Publication Publication Date Title
JP2943991B2 (en) Servo control system
JP3297249B2 (en) Control method for distributed remote I / O control system
EP1906518A2 (en) Parallel connection of inverters
US20110241597A1 (en) H-bridge drive circuit for step motor control
JP2003189654A (en) Serial communication device for controlling motor and motor driving gear
JP2007295647A (en) Synchronously operating method of inverter
JP2015198458A (en) Inverter system and method for controlling parallel synchronous operation of multiple inverters
JP6157183B2 (en) Apparatus and method for transmitting energy and data between a control unit and a position finder
CN201655521U (en) Decoding device and system for universal rotating transformer
JPWO2004008628A1 (en) Vector control inverter device
JPH03252702A (en) Serial communication system
JP5081633B2 (en) Motor control device
JP2009278603A (en) Serial communication apparatus
EP2545641B1 (en) Electric motor control
KR20050114744A (en) Apparatus for detection an encorder defect and a phase angle error of synchronous motor and detection method thereof
JPH06351278A (en) Vector controller for induction motor
JP2011019354A (en) Motor control apparatus
JP2540177B2 (en) Servo motor signal transmission equipment
JP2540176B2 (en) Servo motor signal transmission equipment
JP3465458B2 (en) Motor position detector
JP3387298B2 (en) Magnetic pole position detector
TW201427267A (en) Modularized control circuit of fan motor and method for operating the same
KR910000100B1 (en) Speed control
JP2000324882A (en) Encoder for detecting magnetic pole of pm motor
JPH07322669A (en) Servomechanism of motor

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20090105

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100105

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees