JP3878312B2 - Serial communication device - Google Patents

Serial communication device Download PDF

Info

Publication number
JP3878312B2
JP3878312B2 JP00713298A JP713298A JP3878312B2 JP 3878312 B2 JP3878312 B2 JP 3878312B2 JP 00713298 A JP00713298 A JP 00713298A JP 713298 A JP713298 A JP 713298A JP 3878312 B2 JP3878312 B2 JP 3878312B2
Authority
JP
Japan
Prior art keywords
data
serial
setting command
parallel
time setting
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.)
Expired - Fee Related
Application number
JP00713298A
Other languages
Japanese (ja)
Other versions
JPH11205392A (en
Inventor
康一 林
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.)
Okuma Corp
Original Assignee
Okuma Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Okuma Corp filed Critical Okuma Corp
Priority to JP00713298A priority Critical patent/JP3878312B2/en
Publication of JPH11205392A publication Critical patent/JPH11205392A/en
Application granted granted Critical
Publication of JP3878312B2 publication Critical patent/JP3878312B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)
  • Numerical Control (AREA)
  • Programmable Controllers (AREA)
  • Communication Control (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、シリアル通信により接続さた制御機器または計測機器間の動作タイミングを同期させることができるシリアル通信装置に関するものである。
【0002】
【従来の技術】
近年、数値制御装置のオープン化にともない数値制御システムを構成する機器間の接続性を向上させる目的で、数値制御装置と、可動軸の制御を行う複数のサーボコントローラ等の機器とをリング状またはバス状のシリアル通信ネットワークにより接続するネットワーク型の数値制御システムが使用されるようになってきた。このようなネットワーク型のシステムでは、それ以前のシステムのように必要な信号を個別の配線を用いて接続することが不可能であり、数値制御装置と各サーボコントローラの動作タイミングをシリアル通信を用いて正確に同期させる必要があった。
【0003】
図4にはリング状にネットワークを構成したネットワーク型数値制御システムの一例を示す。また、図5と図6には、これらの装置が内蔵する通信装置の従来例と、図7には図4のネットワーク型数値制御システムに図5と図6の従来の通信装置を適用した場合の通信線N1,N2,N3,N4,N5上に送信される通信フレームと数値制御装置20とサーボコントローラ21,22,23,24がそれぞれ内蔵するタイマーの値をT,T11,T12,T13,T14の信号名で示すタイミングチャートである。
図4の数値制御装置20に図5の通信装置とサーボコントローラ21,22,23,24それぞれに図6の通信装置を内蔵させた従来のネットワーク型数値制御システムでは、数値制御装置20内でタイマー32が一定周期で出力する割り込み要求信号INTをマイクロコンピュータ31へ出力している。マイクロコンピュータ31では、割り込み信号INTを受けると、制御データを送信するための割り込み処理が開始され、まず始めにパラレルシリアル変換器5へ通信を開始する信号CSを送り、次にデータバスSDを通じてシステムを同期させるための時刻設定指令のデータをパラレルシリアル変換器5へ順次出力する。さらに、マイクロコンピュータ31はパラレルシリアル変換器5に通信終了信号CEを送る。パラレルシリアル変換器5では主にデータバスSDを通して入力されたパラレルデータをエンコードしシリアルのデータに変換してドライバー6へ出力する。ドライバー6では入力信号を電力増幅し通信線N1へ通信フレームを送信する。この時刻設定指令の通信フレームFSYNCは通信フレームの開始を示すスタートフラグ部SFと送信相手の宛先を示す宛先情報部DAとコマンド部CMとして時刻設定指令を示すコードとフレームチェックデータ部CRとフレームの終了を示すエンドフラグ部EFにより構成され、宛先情報部DAはすべての装置を示すアドレスコードとしている。また、スタートフラグ部SFとフレームチェックデータ部CRとエンドフラグ部EFは通信開始信号CSと通信終了信号CEをトリガーとしてパラレルシリアル変換器5で自動的に出力されるようにできている。時刻設定指令の通信フレーム送信後は、マイクロコンピュータ31が時刻設定指令の送信と同様な操作を行うことにより、サーボコントローラ21,22,23,24宛にそれぞれモータ25、26、27、28の位置決めに必要な制御情報データを含んだ4つの通信フレームFRAM1、FRAM2,FRAM3、FRAM4を送信する。
【0004】
サーボコントローラ21では通信線N1からシリアルデータをレシーバ18で受け信号レベルを変換後、シリアルパラレル変換器17でシリアルデータのパラレルデータ変換とデコードを行いパラレルデータをデータバスRD1へ出力する。そのほかシリアルパラレル変換器17では、スタートフラグ部SFやエンドフラグ部EFの識別やフレームチェックデータ部CRのチェック結果等をステータス信号ST1としてマイクロプロセッサー19や受信フレーム識別回路29へ出力する。受信フレーム識別回路29では、ステータス信号ST1とデータバスRD1のデータから受信フレームのコマンド部CMが時刻設定指令であることを認識するとタイマー30へ設定信号ST1を出力する。タイマー30では設定信号ST1が入力されるとカウント中のタイマーの値を予めマイクロプロセッサー19が設定した初期タイマーデータ(09)に変更する。また、受信フレーム識別回路29は受信フレームの宛先情報部DAが他局への宛先を示していれば切替信号SL1を切替器10へ出力し、データバスRD1のデータをデータバスPD1を通してパラレルシリアル変換器15へ出力するとともに、通信開始信号CS1や通信終了信号CE1をパラレルシリアル変換器15へ出力する。以上により、サーボコントローラ19では時刻設定指令の通信フレームFSYNCを受けるとタイマー30を一定の値(09)に設定し直す他、自局のみの宛先以外のフレームFSYNC、FRAM2、FRAM3、FRAME4の通信フレームをドライバー16より通信線N2へ送信する中継処理を行う。また、サーボコントローラ21では、自局宛の通信フレームFRAM1を受けた場合、マイクロコンピュータ19がその内容を読み取るのと平行して、パラレルシリアル変換器15へ通信開始信号CS1を出力後、切替器10経由でデータバスSD1とPD1によりモータ25関係の情報データを順次出力し、さらに通信終了信号CE1の出力を行うことにより、ドライバー16より通信フレームFRAM11として出力する。サーボコントローラ22、23、24でも、時刻設定指令の通信フレーム受信時のタイマーの設定値が異なる他はサーボコントローラ21と同様の処理が行われる。これにより、数値制御システム全体の各装置の制御タイミングをほぼ同期させることができる。
【0005】
【発明が解決しようとする課題】
従来の各装置間のタイミングを合わせる方式では、一定サイクルで時刻設定指令の通信フレームを送信する必要があり、これを割り込み処理により行うため、いくら割込処理の優先レベルを高くしても直前に実行していた命令が完了するまでは割込処理に入ることができないため、割込を行う直前の命令により時刻設定指令の通信フレームを送信するタイミングに時間的なばらつきを生じるという問題があり正確に装置間の動作タイミングを揃えることができず、システム全体をタイミングを揃えて正確に動作させることができなかった。
また、時刻設定指令の通信フレームをハード的に一定タイミングで送信するようにした場合は、他の制御に必要なデータをこの時刻設定指令の通信時を避けるように調整しなければならず、通信装置をIC化し他の制御または計測システムの装置に搭載しようとした場合、通信のタイミング設計の自由度に制約を与えるという問題があった。
その他、従来例で説明したリング状に接続されたシステムでは、時刻設定指令の通信フレームを中継処理する時に時間遅れが生じ、各サーボコントローラが時刻設定指令の通信フレームを同時に受信することができないため、時刻設定指令を受信時にタイマーに設定する値は、可動軸ごとに中継遅れを考慮して異なる値を予め設定する必要があり、そのための通信プロトコル上の手間を必要とした。
【0006】
本発明は、上述した問題点を解消するためになされたもので、本発明の目的はシリアル通信ネットワークにより接続された機器間のタイミングを正確に合わせることができ、かつ、いろいろなシリアル通信ネットワークにより構成される制御または計測システムに柔軟に適用できるシリアル通信装置を提供することにある。
【0007】
【課題を解決するための手段】
発明は時刻設定指令の指令コードと時刻情報データをシリアル通信により受信し、中継して送信するシリアル通信装置において、シリアルデータをパラレルデータに変換するシリアルパラレル変換手段と、時刻をカウントするタイマーと、前記シリアルパラレル変換手段から出力されるコードから時刻設定指令を識別する時刻設定指令識別手段1と、前記時刻設定指令識別手段1が時刻設定指令を認識した場合に前記シリアルパラレル変換手段から出力される時刻情報データを前記タイマーに設定する自動時刻変更手段と、パラレルデータをシリアルデータに変換するパラレルシリアル変換手段と、他局宛のデータを受信した場合に受信データを前記パラレルシリアル変換手段へ出力する中継手段と、前記パラレルシリアル変換手段に入力されるコードから時刻設定指令を識別する時刻設定指令識別手段2と、前記時刻設定指令識別手段2が時刻設定指令コードを認識した時に、前記時刻設定指令コードの後に中継手段からの時刻情報データを前記タイマーが示す時刻情報データに置換して前記パラレルシリアル変換手段へ自動的に送る自動時刻情報置換手段とを備えたことを特徴とする。
【0008】
【作用】
本発明は、時刻設定指令の通信フレームを送信する瞬間の時刻を時刻情報データとして通信フレームの中に付加して送信し、受信側の装置はこの時刻情報データをタイマーに設定するため、いかなるタイミングで時刻設定指令の通信フレームを送信しても、受信側装置のタイマーの時刻を正確に合わせることができるため、割り込み処理等の時間ばらつきの影響を受けることがない上、送信手順の変更も自由に行うことが可能である。また、時刻設定指令を中継する場合も、常に中継送信時の時刻に時刻情報データを置き換えるため時刻設定指令の通信フレームの中継遅れを考慮する必要がないため、各装置ごとに予め中継遅れを考慮したパラメータを各装置に設定する必要もない。
【0009】
【発明の実施の形態】
以下、図面に基づいて本発明の実施例を説明する。
図1は、図4に示した一般の数値制御システム上の数値制御装置等が内蔵する本発明の通信装置である。また図2は、図4のサーボコントローラ21、22、23、24等が内蔵する本発明の通信装置である。また、図3は図4の数値制御システム上の数値制御装置等が図1の通信装置を内蔵し、サーボコントローラ21、22、23、24が図2の通信装置の通信装置を内蔵した場合の回線N1、N2、N3と数値制御装置20とサーボコントローラ21、22が内蔵するタイマーの値をT、T1、T2の信号名で示すタイミングチャートである。図1、図2において、図5、図6と同一要素には同符号を付して説明を省略する。
【0010】
図4の数値制御装置20に図1の本発明の通信装置、そしてサーボコントローラ21,22,23,24それぞれに図2の本発明の通信装置を内蔵させたネットワーク型数値制御システムでは、数値制御装置20内でタイマー2が一定周期で出力する割り込み要求信号INTをマイクロコンピュータ1へ出力している。マイクロコンピュータ1では、割り込み信号INTを受けると制御データを送信するための割り込み処理が開始され、まず始めにパラレルシリアル変換器5と送信フレーム識別回路3へ通信を開始する信号CSを送り、次に切替器4経由でデータバスSD、PDを通じてシステムを同期させるための時刻設定指令のデータをパラレルシリアル変換器5と送信フレーム識別回路3へ順次出力する。送信フレーム識別回路3では通信開始信号CSとデータバスPDのデータから時刻設定指令のコマンド部CMのコードが時刻設定指令であることを識別すると切替器4へ切替信号SLを通信終了信号CEが入力されるまで出力する。これによりタイマー2の時刻データTが切替器4からパラレルシリアル変換器5へデータバスPDを通じて出力される。以上により、パラレルシリアル変換器5とドライバー6を通して通信線N1に時刻設定指令の通信フレームFTIMEが出力される。この通信フレームFTIMEは通信フレームの開始を示すスタートフラグ部SFと宛先情報部DAとコマンド部CMとして時刻設定指令を示すコードと時刻設定指令の時刻情報データであるタイマー2の出力データT(04)とフレームチェックデータ部CRとフレームの終了を示すエンドフラグ部EFにより構成される。時刻設定指令の通信フレームFTIME送信後は、従来例と同様にサーボコントローラ21、22、23、24宛にそれぞれモータ25、26、27、28の位置決めに必要な制御情報データを含んだ4つの通信フレームFRAM1、FRAM2、FRAM3、FRAM4を送信する。
【0011】
サーボコントローラ21では通信線N1からシリアルデータをレシーバ18で受け信号レベルを変換後、シリアルパラレル変換器17でシリアルデータのパラレルデータ変換とデコードが行われパラレルデータがデータバスRD1へ出力される。そのほかシリアルパラレル変換器17ではスタートフラグSFやエンドフラグEFの識別やフレームチェックデータ部CRのチェック結果等をステータス信号ST1としてマイクロプロセッサー9や受信フレーム識別回路14へ出力する。受信フレーム識別回路14では、ステータス信号ST1とパラレルデータRD1から受信フレームのコマンド部CMのコードが時刻設定指令であることを認識するとタイマー12へ設定信号ST1出力する。タイマー12では、設定信号ST1が入力されるとデータバスRD1上の時刻設定指令の時刻情報データ(08)を記憶しこの値に通信処理遅れ時間TD(08)を加算した値(0C)をステータス信号ST1により時刻設定指令の通信フレームが異常なく終了したのを確認後、カウント中のタイマー値として設定する。
【0012】
また、マイクロプロセッサー9では、時刻設定指令の通信フレームFTIMEが他局宛のデータであることを識別すると、ステータスST1から受信した時刻設定フレームが正常であることを確認し、かつ他のフレームが送信中でないことを確認後、パラレルシリアル変換器15へ通信開始信号CS1を出力後、受信したデータをデータバスSD1へ順次出力し、さらに通信終了信号CE1を出力する。送信フレーム識別回路11では通信開始信号CS1と切替器10経由のデータバスSD1のデータからフレームデータのコマンド部のコードが時刻設定指令であることを識別すると切替器10へ切替信号SL1を通信終了信号CE1が入力されるまで出力する。これによりタイマー12の時刻データT1(12)が切替器10からパラレルシリアル変換器15へデータバスPD1を通じて出力される。以上により、パラレルシリアル変換器15とドライバー16を通して通信線N2に出力させる時刻設定指令の通信フレームFTIME1は通信線N1の時刻設定指令FTIMEよりも送信が遅れた分だけ時刻設定指令のパラメータ部が修正されて送信されることになる。
【0013】
また、マイクロプロセッサー9では、自局宛の通信フレームFRAM1を受けると平行して切替器10経由でデータバスPD1へモータ25関係の情報をパラレルシリアル変換器15へ出力しドライバー16から通信フレーム11として通信線N2へ送信する。そのほか、他局宛の通信フレームFRAM2,FRAM3、FRAME4のデータもパラレルシリアル変換器15へ出力し、かつ通信開始信号CS1と通信終了信号CE1を制御することによりドライバー16から通信線N2へ送信する中継処理を行う。サーボコントローラ22,23,24でも、サーボコントローラ21と同様な処理が行われ、数値制御システム全体の各装置の制御タイミングを正確に同期させることができる。
【0014】
また、図3のタイムチャートではサーボコントローラが通常時刻設定指令の通信フレームを中継時にたまたま通信フレームFRAM21を送信途中であった場合を示し、このような場合に時刻設定指令の通信フレームFTIME2の送信が通常より遅れても正常に時刻情報パラメータが修正される様子を示している。
なお、実施形態の説明ではタイマー側で時刻設定指令のパラメータの通信処理遅れ時間TDを修正してタイマーに設定したが、送信時に時刻設定指令のパラメータを通信処理遅れ時間TD量だけ予め修正して送信してもよい。
【0015】
【発明の効果】
以上述べたように、本発明の方法によればシリアル通信ネットワークにより接続された機器間のタイミングを正確に合わせることができ、かつ、タイミングを合わすための通信フレーム(時刻設定指令)が任意のタイミングで出力できるためタイミング設計が容易になり、いろいろなシリアル通信ネットワークにより構成される制御または計測システムに柔軟に適用できる。その他、従来システムのように装置ごとに中継遅れを考慮して異なる値を予め設定する必要がなく、そのための通信プロトコル上の手間を必要としない。
【図面の簡単な説明】
【図1】 本発明において数値制御装置に内蔵される通信装置の実施形態を示す図。
【図2】 本発明においてサーボコントローラに内蔵される通信装置の実施形態を示す図。
【図3】 本発明の通信装置の動作を説明するためのタイミングチャート。
【図4】 ネットワーク型数値制御装置の装置間の接続を示す図。
【図5】 従来の数値制御装置に内蔵される通信装置の例を示す図。
【図6】 従来のサーボコントローラに内蔵される通信装置の例を示す図。
【図7】 従来の通信装置の動作を説明するためのタイミングチャート。
【符号の説明】
1 マイクロコンピュータ、2,12 タイマー、3,11 送信フレーム識別回路、4,10 切替器、5,15 パラレルシリアル変換器、6,16 ドライバー、7,17 シリアルパラレル変換器、8,18 レシーバ、9 マイクロプロセッサー、14 受信フレーム識別回路、20 数値制御装置、21,22,23,24 サーボコントローラ、25,26,27,28 モータ。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a serial communication device that can synchronize operation timing between control devices or measurement devices connected by serial communication.
[0002]
[Prior art]
In recent years, with the opening of numerical control devices, a numerical control device and a plurality of devices such as a plurality of servo controllers that control movable axes are connected in a ring shape for the purpose of improving the connectivity between devices constituting the numerical control system. Network-type numerical control systems connected by a bus-like serial communication network have been used. In such a network type system, it is impossible to connect necessary signals using individual wiring as in the previous system, and serial communication is used for the operation timing of the numerical controller and each servo controller. It was necessary to synchronize accurately.
[0003]
FIG. 4 shows an example of a network type numerical control system in which a network is configured in a ring shape. 5 and 6 show a conventional example of a communication device built in these devices, and FIG. 7 shows a case where the conventional communication device of FIGS. 5 and 6 is applied to the network type numerical control system of FIG. T1, T11, T12, T13, T13, T12, T13, T13, T12, T13, T13, T12, T13, It is a timing chart shown by the signal name of T14.
In the conventional network type numerical control system in which the communication device of FIG. 5 and the communication device of FIG. 6 are incorporated in each of the servo controllers 21, 22, 23, and 24 in the numerical control device 20 of FIG. An interrupt request signal INT output by 32 at a constant cycle is output to the microcomputer 31. When the microcomputer 31 receives the interrupt signal INT, the interrupt process for transmitting the control data is started. First, a signal CS for starting communication is sent to the parallel-serial converter 5 and then the system is transmitted through the data bus SD. Are sequentially output to the parallel / serial converter 5. Further, the microcomputer 31 sends a communication end signal CE to the parallel-serial converter 5. The parallel-serial converter 5 encodes parallel data input mainly through the data bus SD, converts it into serial data, and outputs it to the driver 6. The driver 6 amplifies the power of the input signal and transmits a communication frame to the communication line N1. The time setting command communication frame FSYNC includes a start flag portion SF indicating the start of the communication frame, a destination information portion DA indicating the destination of the transmission partner, a code indicating the time setting command as a command portion CM, a frame check data portion CR, and a frame. It is composed of an end flag portion EF indicating the end, and the destination information portion DA is an address code indicating all devices. The start flag section SF, the frame check data section CR, and the end flag section EF are automatically output by the parallel / serial converter 5 using the communication start signal CS and the communication end signal CE as triggers. After transmitting the communication frame for the time setting command, the microcomputer 31 performs the same operation as the transmission of the time setting command, thereby positioning the motors 25, 26, 27, and 28 to the servo controllers 21, 22, 23, and 24, respectively. 4 communication frames FRAM1, FRAM2, FRAM3, and FRAM4 including control information data necessary for the transmission are transmitted.
[0004]
The servo controller 21 receives serial data from the communication line N1 by the receiver 18 and converts the signal level. Then, the serial / parallel converter 17 performs parallel data conversion and decoding of the serial data, and outputs the parallel data to the data bus RD1. In addition, the serial / parallel converter 17 outputs the identification of the start flag part SF and the end flag part EF, the check result of the frame check data part CR, etc. to the microprocessor 19 and the reception frame identification circuit 29 as the status signal ST1. When the reception frame identification circuit 29 recognizes from the status signal ST1 and the data on the data bus RD1 that the command unit CM of the reception frame is a time setting command, it outputs a setting signal ST1 to the timer 30. When the setting signal ST1 is input to the timer 30, the value of the timer being counted is changed to initial timer data (09) set in advance by the microprocessor 19. The received frame identification circuit 29 outputs a switching signal SL1 to the switch 10 if the destination information section DA of the received frame indicates a destination to another station, and converts the data on the data bus RD1 into parallel serial data through the data bus PD1. The communication start signal CS 1 and the communication end signal CE 1 are output to the parallel / serial converter 15. As described above, when the servo controller 19 receives the communication frame FSYNC of the time setting command, the timer 30 is reset to a fixed value (09), and the communication frames of the frames FSYNC, FRAM2, FRAM3, and FRAME4 other than the destination only for the own station. Is transmitted from the driver 16 to the communication line N2. When the servo controller 21 receives the communication frame FRAM1 addressed to its own station, it outputs the communication start signal CS1 to the parallel-serial converter 15 in parallel with the reading of the contents by the microcomputer 19, and then the switch 10 The information data related to the motor 25 is sequentially output via the data buses SD1 and PD1, and the communication end signal CE1 is further output to output from the driver 16 as the communication frame FRAM11. The servo controllers 22, 23, and 24 perform the same processing as the servo controller 21 except that the timer setting value at the time of receiving the time setting command communication frame is different. Thereby, the control timing of each apparatus of the whole numerical control system can be substantially synchronized.
[0005]
[Problems to be solved by the invention]
In the conventional method of matching the timing between each device, it is necessary to transmit a communication frame for a time setting command in a fixed cycle, and since this is performed by interrupt processing, no matter how high the priority level of interrupt processing is, immediately before Since the interrupt process cannot be entered until the executed instruction is completed, there is a problem in that there is a time variation in the timing of sending the communication frame for the time setting command due to the instruction immediately before the interrupt is performed. However, the operation timing between the devices could not be aligned, and the entire system could not be operated accurately at the same timing.
In addition, if the time setting command communication frame is transmitted at a fixed timing in hardware, the data necessary for other control must be adjusted to avoid the time setting command communication. When the device is integrated into an IC and installed in another control or measurement system device, there is a problem that the degree of freedom in designing the timing of communication is restricted.
In addition, in the system connected in the ring shape described in the conventional example, a time delay occurs when relaying the time setting command communication frame, and each servo controller cannot receive the time setting command communication frame at the same time. The value to be set in the timer when receiving the time setting command needs to be set in advance in consideration of the relay delay for each movable axis, which requires time and effort on the communication protocol.
[0006]
The present invention has been made to solve the above-described problems, and an object of the present invention is to accurately match the timing between devices connected by a serial communication network, and by using various serial communication networks. An object of the present invention is to provide a serial communication device that can be flexibly applied to a configured control or measurement system.
[0007]
[Means for Solving the Problems]
The present invention relates to a serial communication device that receives a command code of a time setting command and time information data by serial communication, and relays and transmits the serial data. The serial / parallel conversion means converts serial data into parallel data, and a timer counts time. The time setting command identifying unit 1 for identifying the time setting command from the code output from the serial / parallel converting unit, and the serial / parallel converting unit when the time setting command identifying unit 1 recognizes the time setting command. Automatic time changing means for setting time information data to be set in the timer, parallel serial converting means for converting parallel data to serial data, and receiving data when receiving data addressed to other stations is output to the parallel serial converting means Relay means for input and input to the parallel serial conversion means The time setting command identifying means 2 for identifying the time setting command from the generated code, and when the time setting command identifying means 2 recognizes the time setting command code, the time information data from the relay means is received after the time setting command code. Automatic time information replacing means for replacing the time information data indicated by the timer and automatically sending to the parallel-serial conversion means.
[0008]
[Action]
The present invention adds the time instant of transmission of the communication frame of the time setting command to the communication frame as time information data and transmits it, and the receiving side device sets this time information data in the timer. Even if a time setting command communication frame is transmitted, the time of the timer of the receiving device can be adjusted accurately, so it is not affected by time variations such as interrupt processing, and the transmission procedure can be changed freely. Can be done. In addition, when relaying a time setting command, it is not necessary to consider the relay delay of the communication frame of the time setting command because the time information data is always replaced with the time of relay transmission. There is no need to set the parameters for each device.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 shows a communication apparatus according to the present invention built in a numerical control device or the like on the general numerical control system shown in FIG. FIG. 2 shows a communication apparatus according to the present invention incorporated in the servo controllers 21, 22, 23, 24, etc. of FIG. 3 shows a case where the numerical control device or the like on the numerical control system of FIG. 4 incorporates the communication device of FIG. 1, and the servo controllers 21, 22, 23, and 24 incorporate the communication device of the communication device of FIG. It is a timing chart which shows the value of the timer which the line | wires N1, N2, and N3, the numerical control apparatus 20, and the servo controllers 21 and 22 incorporate in the signal name of T, T1, and T2. In FIG. 1 and FIG. 2, the same elements as those in FIG. 5 and FIG.
[0010]
In the network type numerical control system in which the communication device of the present invention of FIG. 1 is included in the numerical control device 20 of FIG. 4 and the communication device of the present invention of FIG. An interrupt request signal INT output from the timer 2 at a constant period in the apparatus 20 is output to the microcomputer 1. When the microcomputer 1 receives the interrupt signal INT, an interrupt process for transmitting control data is started. First, a signal CS for starting communication is sent to the parallel-serial converter 5 and the transmission frame identification circuit 3, and then The time setting command data for synchronizing the system is sequentially output to the parallel-serial converter 5 and the transmission frame identification circuit 3 through the data buses SD and PD via the switch 4. When the transmission frame identification circuit 3 identifies that the code of the command part CM of the time setting command is the time setting command from the communication start signal CS and the data of the data bus PD, the switching signal SL is input to the switch 4 and the communication end signal CE is input. Output until As a result, the time data T of the timer 2 is output from the switch 4 to the parallel-serial converter 5 through the data bus PD. As described above, the communication frame FTIME of the time setting command is output to the communication line N1 through the parallel-serial converter 5 and the driver 6. This communication frame FTIME includes a start flag portion SF indicating the start of the communication frame, a destination information portion DA, a code indicating a time setting command as a command portion CM, and output data T (04) of timer 2 which is time information data of the time setting command. And a frame check data section CR and an end flag section EF indicating the end of the frame. After transmitting the communication frame FTIME for the time setting command, four communications including control information data necessary for positioning the motors 25, 26, 27, and 28 addressed to the servo controllers 21, 22, 23, and 24, respectively, as in the conventional example. The frames FRAM1, FRAM2, FRAM3, and FRAM4 are transmitted.
[0011]
The servo controller 21 receives serial data from the communication line N1 by the receiver 18 and converts the signal level. Then, the serial / parallel converter 17 performs parallel data conversion and decoding of the serial data, and the parallel data is output to the data bus RD1. In addition, the serial-parallel converter 17 outputs the identification of the start flag SF and the end flag EF, the check result of the frame check data section CR, etc. to the microprocessor 9 and the reception frame identification circuit 14 as the status signal ST1. When the reception frame identification circuit 14 recognizes from the status signal ST1 and the parallel data RD1 that the code of the command portion CM of the reception frame is a time setting command, it outputs the setting signal ST1 to the timer 12. When the setting signal ST1 is input, the timer 12 stores time information data (08) of a time setting command on the data bus RD1, and adds a value (0C) obtained by adding a communication processing delay time TD (08) to this value as a status. After confirming that the communication frame of the time setting command is completed without any abnormality by the signal ST1, it is set as a timer value during counting.
[0012]
When the microprocessor 9 identifies that the time setting command communication frame FTIME is data addressed to another station, the microprocessor 9 confirms that the time setting frame received from the status ST1 is normal, and transmits another frame. After confirming that it is not in the middle, the communication start signal CS1 is output to the parallel-serial converter 15, the received data is sequentially output to the data bus SD1, and the communication end signal CE1 is further output. When the transmission frame identification circuit 11 identifies that the code of the command part of the frame data is a time setting command from the communication start signal CS1 and the data on the data bus SD1 via the switch 10, the switch signal SL1 is sent to the switch 10 as a communication end signal. Output until CE1 is input. As a result, the time data T1 (12) of the timer 12 is output from the switch 10 to the parallel-serial converter 15 through the data bus PD1. As described above, the time setting command communication frame FTIME1 to be output to the communication line N2 through the parallel-serial converter 15 and the driver 16 has the parameter part of the time setting command corrected by the amount delayed from the time setting command FTIME of the communication line N1. Will be sent.
[0013]
In addition, when the microprocessor 9 receives the communication frame FRAM1 addressed to its own station, it outputs the information related to the motor 25 to the data bus PD1 via the switch 10 to the parallel / serial converter 15 and outputs it as the communication frame 11 from the driver 16. Transmit to the communication line N2. In addition, the data of the communication frames FRAM2, FRAM3, and FRAME4 addressed to other stations are also output to the parallel-serial converter 15, and the relay is transmitted from the driver 16 to the communication line N2 by controlling the communication start signal CS1 and the communication end signal CE1. Process. In the servo controllers 22, 23, and 24, the same processing as that of the servo controller 21 is performed, and the control timing of each device of the entire numerical control system can be accurately synchronized.
[0014]
3 shows a case where the servo controller happens to be in the middle of transmitting the communication frame FRAM21 at the time of relaying the communication frame of the normal time setting command. In such a case, the transmission of the communication frame FTIME2 of the time setting command is performed. This shows how the time information parameter is corrected normally even if it is later than normal.
In the description of the embodiment, the communication processing delay time TD of the time setting command parameter is corrected on the timer side and set to the timer. However, the time setting command parameter is corrected in advance by the communication processing delay time TD amount at the time of transmission. You may send it.
[0015]
【The invention's effect】
As described above, according to the method of the present invention, it is possible to accurately match the timing between devices connected by a serial communication network, and the communication frame (time setting command) for matching the timing is an arbitrary timing. Output can be made easy, and timing design becomes easy, and it can be flexibly applied to control or measurement systems composed of various serial communication networks. In addition, unlike the conventional system, it is not necessary to set different values in advance for each device in consideration of the relay delay, and the communication protocol is not required for that purpose.
[Brief description of the drawings]
FIG. 1 is a diagram showing an embodiment of a communication device built in a numerical control device in the present invention.
FIG. 2 is a diagram showing an embodiment of a communication device built in a servo controller in the present invention.
FIG. 3 is a timing chart for explaining the operation of the communication apparatus of the present invention.
FIG. 4 is a diagram showing a connection between devices of a network type numerical control device.
FIG. 5 is a diagram showing an example of a communication device built in a conventional numerical control device.
FIG. 6 is a diagram showing an example of a communication device built in a conventional servo controller.
FIG. 7 is a timing chart for explaining the operation of a conventional communication apparatus.
[Explanation of symbols]
1 microcomputer, 2,12 timer, 3,11 transmission frame identification circuit, 4,10 switcher, 5,15 parallel serial converter, 6,16 driver, 7,17 serial parallel converter, 8,18 receiver, 9 Microprocessor, 14 Received frame identification circuit, 20 Numerical controller, 21, 22, 23, 24 Servo controller, 25, 26, 27, 28 Motor.

Claims (1)

時刻設定指令の指令コードと時刻情報データをシリアル通信により受信し、中継して送信するシリアル通信装置において、シリアルデータをパラレルデータに変換するシリアルパラレル変換手段と、時刻をカウントするタイマーと、前記シリアルパラレル変換手段から出力されるコードから時刻設定指令を識別する時刻設定指令識別手段1と、前記時刻設定指令識別手段1が時刻設定指令を認識した場合に前記シリアルパラレル変換手段から出力される時刻情報データを前記タイマーに設定する自動時刻変更手段と、パラレルデータをシリアルデータに変換するパラレルシリアル変換手段と、他局宛のデータを受信した場合に受信データを前記パラレルシリアル変換手段へ出力する中継手段と、前記パラレルシリアル変換手段に入力されるコードから時刻設定指令を識別する時刻設定指令識別手段2と、前記時刻設定指令識別手段2が時刻設定指令コードを認識した時に、前記時刻設定指令コードの後に中継手段からの時刻情報データを前記タイマーが示す時刻情報データに置換して前記パラレルシリアル変換手段へ自動的に送る自動時刻情報置換手段とを備えたことを特徴とする通信装置。In a serial communication device that receives and relays a time setting command code and time information data by serial communication, serial-parallel conversion means for converting serial data into parallel data, a timer for counting time, and the serial Time setting command identifying means 1 for identifying a time setting command from a code output from the parallel converting means, and time information output from the serial / parallel converting means when the time setting command identifying means 1 recognizes the time setting command Automatic time changing means for setting data in the timer, parallel serial converting means for converting parallel data to serial data, and relay means for outputting received data to the parallel serial converting means when data addressed to another station is received And the input to the parallel-serial conversion means. The time setting command identifying means 2 for identifying the time setting command from the mode, and when the time setting command identifying means 2 recognizes the time setting command code, the time information data from the relay means is added to the timer after the time setting command code. An automatic time information replacing unit that replaces with the time information data indicated by and automatically sends the data to the parallel-serial conversion unit.
JP00713298A 1998-01-19 1998-01-19 Serial communication device Expired - Fee Related JP3878312B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP00713298A JP3878312B2 (en) 1998-01-19 1998-01-19 Serial communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP00713298A JP3878312B2 (en) 1998-01-19 1998-01-19 Serial communication device

Publications (2)

Publication Number Publication Date
JPH11205392A JPH11205392A (en) 1999-07-30
JP3878312B2 true JP3878312B2 (en) 2007-02-07

Family

ID=11657562

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00713298A Expired - Fee Related JP3878312B2 (en) 1998-01-19 1998-01-19 Serial communication device

Country Status (1)

Country Link
JP (1) JP3878312B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5351301B2 (en) 2012-03-19 2013-11-27 ファナック株式会社 Numerical control system that measures time by IO unit
US9811486B2 (en) 2013-06-25 2017-11-07 Mitsubishi Electric Corporation Programmable controller
JP6404975B2 (en) 2017-03-21 2018-10-17 ファナック株式会社 Slave, serial communication system, and communication method of serial communication system

Also Published As

Publication number Publication date
JPH11205392A (en) 1999-07-30

Similar Documents

Publication Publication Date Title
JP3388822B2 (en) Bus system for local operation network
US6011821A (en) Process for synchronization of matching circuits of a communication system with several modules
EP0504907B1 (en) Communication system
EP0413286B1 (en) Data synchronous transfer system using a fiber distributed data exchange interface
US20110223955A1 (en) Communication network system having high-ranking network and low-ranking networks, interchange terminal connecting high-ranking network and low-ranking network, microcomputer controlling connection between transmission line of low-ranking network and transmission line of high-ranking network, and communication transmitter-receiver connected with transmission line of low-ranking network and transmission line of high-ranking network
US9485327B2 (en) Motor vehicle having a vehicle communication bus and method for generating bus messages
CN112567696B (en) Vehicle-mounted communication device and vehicle-mounted system
CN109327365B (en) Method for transmitting data between a rotation angle sensor and an engine control device or evaluation unit
JP3878312B2 (en) Serial communication device
JPH03155241A (en) Multimedia lan system
US4967409A (en) Network system of programmable controllers
JP2001265716A (en) Device and method for transmitting information
JPS5941337B2 (en) Synchronous line connection method
CN112737761B (en) Apparatus and method for acknowledging communications via bus
JP2723281B2 (en) Remote monitoring and control device
JP2006033490A (en) Data communication device, and communication system
JPH06164601A (en) Packet communication system
CN117083573A (en) Automation system and method for operating an automation system
JP2000101615A (en) Synchronous communication system
CN115047830A (en) Bus system of controller and sensor, operation method and machine automation system
JPH086615A (en) Data linking method
JPS62171349A (en) Communication control equipment
JPH09115083A (en) Remote supervisory and control equipment
JPH02196596A (en) Communication control method
JPH06303684A (en) Remote supervisory controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041109

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060727

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060815

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061006

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20061011

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20061031

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061102

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20121110

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20121110

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20151110

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees