JP5576913B2 - Communication system having automatic setting function of identification number - Google Patents

Communication system having automatic setting function of identification number Download PDF

Info

Publication number
JP5576913B2
JP5576913B2 JP2012193904A JP2012193904A JP5576913B2 JP 5576913 B2 JP5576913 B2 JP 5576913B2 JP 2012193904 A JP2012193904 A JP 2012193904A JP 2012193904 A JP2012193904 A JP 2012193904A JP 5576913 B2 JP5576913 B2 JP 5576913B2
Authority
JP
Japan
Prior art keywords
communication
unit
connector
bit
branch
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.)
Active
Application number
JP2012193904A
Other languages
Japanese (ja)
Other versions
JP2014050065A (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.)
FANUC Corp
Original Assignee
FANUC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FANUC Corp filed Critical FANUC Corp
Priority to JP2012193904A priority Critical patent/JP5576913B2/en
Priority to CN201310397391.0A priority patent/CN103685595B/en
Publication of JP2014050065A publication Critical patent/JP2014050065A/en
Application granted granted Critical
Publication of JP5576913B2 publication Critical patent/JP5576913B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、ネットワークを構成する複数の通信ユニットの各々に識別場号を自動的に設定する機能を有する通信システムに関する。   The present invention relates to a communication system having a function of automatically setting an identification field number in each of a plurality of communication units constituting a network.

同一通信線路上に複数台の通信ユニットが接続される通信システムでは、各通信ユニットに個別の識別番号(ID)を設定することが要求される場合がある。このような通信システムでは、複数種の通信ユニットが接続される場合もあるし、同じ種類の通信ユニットが複数台接続される場合もある。   In a communication system in which a plurality of communication units are connected on the same communication line, it may be required to set an individual identification number (ID) for each communication unit. In such a communication system, a plurality of types of communication units may be connected, or a plurality of the same type of communication units may be connected.

例えば特許文献1には、LAN機器間で管理情報を交換することによってシステム全体の管理を行うLANシステムにおいて、ネットワーク用データ線とは別に管理用データ線を設け、この管理用データ線を用いてマスタLAN機器からスレーブLAN機器にIDを割り付けるための信号を送出する旨が記載されている。ここでは、管理専用のデータ線を用いて、マスタLAN機器からスレーブLAN機器にID割り付けのための信号を伝送し、スレーブLAN機器ではID未割り付け状態では、下位のスレーブLAN機器につながる管理用データ線に信号を流さないようにしているので、マスタLAN機器に近い順番にスレーブLAN機器にIDが割り付けられる、とされている。   For example, in Patent Document 1, in a LAN system that manages the entire system by exchanging management information between LAN devices, a management data line is provided separately from the network data line, and this management data line is used. It is described that a signal for assigning an ID is transmitted from the master LAN device to the slave LAN device. Here, a data for ID assignment is transmitted from the master LAN device to the slave LAN device using a management-dedicated data line. When the slave LAN device is in an ID unassigned state, the management data connected to the lower slave LAN device Since signals are not allowed to flow through the line, IDs are assigned to slave LAN devices in the order closest to the master LAN device.

特開平08−037538号公報Japanese Patent Laid-Open No. 08-037538

従来の通信システムでは、通信ユニットごとに、ユーザがスイッチ等を用いてIDを手動で設定する場合が多かったが、IDが重複しないように全てのIDの設定を行うことは煩雑である。さらに、防水や防塵が施された機器にそのようなスイッチを設けることは、そのスイッチ部分の防水・防塵を保つための機構を設ける必要があるため、コストアップとなる。   In the conventional communication system, the user often sets the ID manually for each communication unit using a switch or the like, but it is complicated to set all the IDs so that the IDs do not overlap. Furthermore, providing such a switch in a device that is waterproof or dustproof requires a mechanism for keeping the switch portion waterproof and dustproof, which increases costs.

また、シリアル通信規格の1つであるRS−485通信方式を用いたシステムでは、IDの自動割り付け方式が適用可能であり、この方式では、スレーブ機器がIDを要求すると、マスタ機器がIDを発行して自動的に該IDを該スレーブ機器に割り付ける。複数のスレーブ機器からIDの要求があったときは、マスタ機器は乱数等を用いて再送信号を調整し、各スレーブ機器に個別のIDを自動的に割り付けることができる。また、イーサネット(登録商標)では、MACアドレスと呼ばれる固有のIDを工場出荷時に通信ユニットのROMに書込み、それを元に通信を行う。しかしこれらの方式では、同一通信線路上に接続された通信ユニットの位置とIDとを関連付けることができないという欠点がある。   In addition, in a system using the RS-485 communication method, which is one of serial communication standards, an automatic ID assignment method can be applied. In this method, when a slave device requests an ID, the master device issues the ID. Then, the ID is automatically assigned to the slave device. When there is an ID request from a plurality of slave devices, the master device can adjust the retransmission signal using a random number or the like and automatically assign an individual ID to each slave device. In Ethernet (registered trademark), a unique ID called a MAC address is written in a ROM of a communication unit at the time of factory shipment, and communication is performed based on the ID. However, these methods have a drawback that the position of the communication unit connected on the same communication line cannot be associated with the ID.

特許文献1に記載されている方法は、直列に並んだ通信ユニットに対して上流から順次(マスタに近い順に)IDを決定するものである。この方法では、直列に接続された通信ユニットの位置とIDを関連付けることが可能となるが、IDを設定するためのソフト処理と、その処理を実現するための回路が各通信ユニットに必要となる。また、通信ユニットが通信信号を中継するため、システムを動作させた状態で通信ユニットの交換を行おうとした場合に、その上流と下流との通信を中断する必要がある。   In the method described in Patent Document 1, IDs are sequentially determined for communication units arranged in series from upstream (in order of proximity to the master). In this method, it is possible to associate an ID with the position of a communication unit connected in series, but each communication unit requires a software process for setting the ID and a circuit for realizing the process. . Further, since the communication unit relays the communication signal, it is necessary to interrupt communication between the upstream and the downstream when the communication unit is exchanged while the system is operating.

そこで、本発明は、同一通信線路上に複数台の通信ユニットが接続される場合に、上述の課題を解決し、自動で通信ユニットに識別番号(ID)を設定することができる自動設定機能を有する通信システムを提供することを目的とする。   Therefore, the present invention provides an automatic setting function that can solve the above-described problems and can automatically set an identification number (ID) in a communication unit when a plurality of communication units are connected on the same communication line. An object of the present invention is to provide a communication system.

上記目的を達成するために、本願第1の発明は、同一通信線路上に接続された複数の通信ユニットの各々に個別の識別番号を自動的に設定する識別番号自動設定機能を有する通信システムであって、前記通信システムは、短絡コネクタと、該短絡コネクタに直列に接続される複数の分岐ユニットと、該分岐ユニットにそれぞれ接続される複数の通信ユニットとを有し、前記短絡コネクタは、前記通信ユニットに個別の識別番号を設定する際の基礎となるビット列の初期値を出力するビット列出力機能を有し、前記分岐ユニットの各々は、対応する通信ユニットと接続するための第1のコネクタと、前記短絡コネクタ又は上流側の分岐ユニットと接続するための第2のコネクタと、下流側の分岐ユニットと接続するための第3のコネクタと、前記第2のコネクタから入力されるビット列の一部を識別番号設定信号として前記第1のコネクタから出力し、かつ前記ビット列を入れ替えて前記第3のコネクタから出力する配線構造とを有し、前記通信ユニットは、対応する前記分岐ユニットの第1のコネクタから出力された前記識別番号設定信号を自己の識別番号として設定する設定機能を有する、通信システムを提供する。   In order to achieve the above object, a first invention of the present application is a communication system having an identification number automatic setting function for automatically setting an individual identification number for each of a plurality of communication units connected on the same communication line. The communication system includes a short-circuit connector, a plurality of branch units connected in series to the short-circuit connector, and a plurality of communication units respectively connected to the branch unit. A bit string output function for outputting an initial value of a bit string serving as a basis for setting an individual identification number in a communication unit, and each of the branch units includes a first connector for connecting to a corresponding communication unit; A second connector for connecting to the short-circuit connector or the upstream branch unit; a third connector for connecting to the downstream branch unit; A wiring structure in which a part of a bit string input from a second connector is output from the first connector as an identification number setting signal, and the bit string is replaced and output from the third connector, and the communication The unit provides a communication system having a setting function for setting the identification number setting signal output from the first connector of the corresponding branch unit as its own identification number.

第2の発明は、第1の発明において、前記複数の分岐ユニットの各々における前記配線構造は互いに同一である、通信システム提供する。   A second invention provides a communication system according to the first invention, wherein the wiring structures in each of the plurality of branch units are the same.

第3の発明は、第1又は第2の発明において、前記ビット列の列数は前記通信システムに接続可能な通信ユニットの最大数と同数であり、前記配線構造は、ある分岐ユニットにおいて最上位のビットが、1つ下流側の分岐ユニットでは最下位ビットになるとともに他のビットの各々が1つ上位のビットに繰り上がる配線構造、或いは、ある分岐ユニットにおいて最下位のビットが1つ下流側の分岐ユニットでは最上位ビットになるとともに他のビットの各々が1つ下位のビットに繰り下がる配線構造を有する、通信システム提供する。   According to a third invention, in the first or second invention, the number of bit strings is the same as the maximum number of communication units connectable to the communication system, and the wiring structure is the highest in a certain branch unit. A bit structure becomes the least significant bit in one downstream branch unit and each of the other bits moves up to one higher bit, or the lowest bit in one branch unit is one downstream bit Provided is a communication system having a wiring structure in which the branch unit becomes the most significant bit and each of the other bits descends to the next lower bit.

第4の発明は、第1〜第3のいずれか1つの発明において、前記短絡コネクタがマスタユニットであり、前記通信ユニットがスレーブユニットである、通信システム提供する。   A fourth invention provides a communication system according to any one of the first to third inventions, wherein the short-circuit connector is a master unit and the communication unit is a slave unit.

本発明によれば、各通信ユニットに通信信号を分岐するための分岐ユニットを設け、この分岐ユニット内において、IDの設定信号を出力し、さらに下流の分岐ユニットとは、IDの設定信号のビット列を入れ替える配線構造を設けて接続することにより、自動で各通信ユニットに固有の識別番号を設定することが可能となる。設定される識別番号は、分岐ユニットの接続順に決定されるため、識別番号と位置との関係が把握しやすい。   According to the present invention, each communication unit is provided with a branch unit for branching a communication signal, an ID setting signal is output in the branch unit, and the downstream branch unit is a bit string of the ID setting signal. It is possible to automatically set a unique identification number for each communication unit by providing a wiring structure that replaces and connecting them. Since the identification numbers to be set are determined in the order of connection of the branch units, the relationship between the identification number and the position is easy to grasp.

各分岐ユニットにおいて配線構造を同一のものとすることにより、分岐ユニット間のケーブルや通信ユニットは、それぞれ同一種類の機器を使用することが可能となり、ユニット故障時やケーブル断線時等の交換が容易となる。また、通信システムを稼動したままで、ある通信ユニットを取り外したり、交換を行ったりしても、他の通信ユニット間の通信には影響を及ぼさない。   By using the same wiring structure for each branch unit, the same type of equipment can be used for the cables and communication units between the branch units, and replacement is easy when the unit fails or the cable is disconnected. It becomes. Further, even if a certain communication unit is removed or replaced while the communication system is operating, communication between other communication units is not affected.

短絡コネクタをマスタユニットとし、通信ユニットをスレーブユニットとすることにより、各スレーブユニットは、マスタユニットからのリクエスト信号に対して返信を返すだけの単純な構成にでき、複数のマスタが存在する場合と比較して、安価に通信システムを構築できる。   By using the short-circuit connector as the master unit and the communication unit as the slave unit, each slave unit can be simply configured to return a response to the request signal from the master unit. In comparison, a communication system can be constructed at low cost.

本発明の第1の実施形態に係る通信システムの基本構成を示す図である。It is a figure which shows the basic composition of the communication system which concerns on the 1st Embodiment of this invention. 本発明の第2の実施形態に係る通信システムの基本構成を示す図である。It is a figure which shows the basic composition of the communication system which concerns on the 2nd Embodiment of this invention. 通信ユニット数が4台の場合の識別番号の設定手順を説明する図である。It is a figure explaining the setting procedure of the identification number in case the number of communication units is four. 通信ユニット数が8台の場合の識別番号の設定手順を説明する図である。It is a figure explaining the setting procedure of the identification number in case the number of communication units is eight.

図1は、本発明の第1の実施形態に係る通信システム10の基本構成を示す図である。通信システム10は、短絡コネクタ12と、同一の通信線路14(二重線で図示)によって短絡コネクタ12に直列に接続される複数(ここでは4つ)の分岐ユニット16a〜16dと、分岐ユニット16a〜16dにそれぞれ接続される複数の(分岐ユニットと同数の)通信ユニット18a〜18dとを有する。分岐ユニット16a〜16dは、それぞれ第1のコネクタ20a〜20dを有し、第1のコネクタ20a〜20dを介して分岐ユニット16a〜16dと通信ユニット18a〜18dとがそれぞれ接続される。   FIG. 1 is a diagram showing a basic configuration of a communication system 10 according to the first embodiment of the present invention. The communication system 10 includes a short-circuit connector 12, a plurality (four in this case) of branch units 16a to 16d connected in series to the short-circuit connector 12 by the same communication line 14 (shown as a double line), and a branch unit 16a. To a plurality of communication units 18a to 18d (the same number as the branch units) respectively connected to. The branch units 16a to 16d have first connectors 20a to 20d, respectively, and the branch units 16a to 16d and the communication units 18a to 18d are connected via the first connectors 20a to 20d, respectively.

短絡コネクタ12のすぐ下流に位置する分岐ユニット16aは、第2のコネクタ22a及び第3のコネクタ24aを有し、第2のコネクタ22aを介して分岐ユニット16aと短絡コネクタ12とが接続され、第3のコネクタ24aを介して分岐ユニット16aと分岐ユニット16aのすぐ下流に位置する分岐ユニット16bとが接続される。また、分岐ユニット16aのすぐ下流に位置する分岐ユニット16bは、第2のコネクタ22b及び第3のコネクタ24bを有し、第2のコネクタ22bを介して分岐ユニット16bと分岐ユニット16aとが接続され、第3のコネクタ24bを介して分岐ユニット16bと分岐ユニット16bのすぐ下流に位置する分岐ユニット16cとが接続される。このように、各分岐ユニットは上流側の分岐ユニット又は短絡コネクタと接続するための第2のコネクタと、下流側の分岐ユニットと接続するための第3のコネクタとを有する。なお最下流の分岐ユニット(ここでは分岐ユニット16d)は、第3のコネクタ24dを具備しなくともよい。   The branch unit 16a located immediately downstream of the short-circuit connector 12 includes a second connector 22a and a third connector 24a, and the branch unit 16a and the short-circuit connector 12 are connected via the second connector 22a. The branch unit 16a and the branch unit 16b located immediately downstream of the branch unit 16a are connected via the third connector 24a. Further, the branch unit 16b located immediately downstream of the branch unit 16a has a second connector 22b and a third connector 24b, and the branch unit 16b and the branch unit 16a are connected via the second connector 22b. The branch unit 16b and the branch unit 16c located immediately downstream of the branch unit 16b are connected via the third connector 24b. As described above, each branch unit includes the second connector for connecting to the upstream branch unit or the short-circuit connector, and the third connector for connecting to the downstream branch unit. The most downstream branch unit (here, the branch unit 16d) may not include the third connector 24d.

通信システムにおける通信ユニットの最大接続数は予め定められており、各通信ユニットに固有の識別番号(以降、IDとも称する)を設定する際の基礎となるビット列は、通信ユニットの最大接続数と等しくなるように構成される。各通信ユニットに接続される、識別番号設定信号(ID設定信号)を送信する信号線の本数Nについては、識別番号は最大で2のN乗の数を表現できることから、2のN乗が通信ユニットの最大接続数以上となるように設定される。例えば第1の実施形態では、通信ユニットの最大数は4台であり、各通信ユニットに固有の識別番号を設定する際の元となるビット列は4ビットであり、各通信ユニットの分岐ユニットに接続されるID設定信号の信号線の本数は2本である。   The maximum connection number of communication units in the communication system is determined in advance, and the bit string that is the basis for setting a unique identification number (hereinafter also referred to as ID) for each communication unit is equal to the maximum connection number of the communication units. It is comprised so that it may become. For the number N of signal lines connected to each communication unit for transmitting an identification number setting signal (ID setting signal), the identification number can represent a number of 2 N at the maximum. It is set to be equal to or greater than the maximum number of units connected. For example, in the first embodiment, the maximum number of communication units is 4, and the bit string that is the basis for setting a unique identification number for each communication unit is 4 bits, and is connected to the branch unit of each communication unit. The number of signal lines for the ID setting signal to be set is two.

通信ユニットにおける、個別のIDを設定する際の元となるビット列の入れ替え方法としては例えば、ある分岐ユニットにおいて最上位のビットが、次の(1つ下流側の)分岐ユニットでは最下位ビットになるとともに他のビットの各々が1つ上位のビットに繰り上がる配線構造、或いは、ある分岐ユニットにおいて最下位のビットが次の(1つ下流側の)分岐ユニットでは最上位ビットになるとともに他のビットの各々が1つ下位のビットに繰り下がる配線構造を利用した方法が挙げられる。但し、個別のIDを設定する際の基礎となるビット列から、分岐ユニットへのID設定信号を選択する選択方法については、常に決まった位置のビットを選択するようにすれば、特に制限はない。   As a method of exchanging the bit string that is the basis for setting individual IDs in the communication unit, for example, the most significant bit in a certain branch unit becomes the least significant bit in the next (one downstream side) branch unit. In addition, a wiring structure in which each of the other bits is advanced to the next higher bit, or the lowest bit in one branch unit becomes the highest bit in the next (one downstream) branch unit and the other bits. There is a method using a wiring structure in which each of these is carried down to the next lower bit. However, the selection method for selecting the ID setting signal to the branch unit from the bit string that is the basis for setting individual IDs is not particularly limited as long as bits at fixed positions are always selected.

個別のID設定信号を生成するためのビット列は、短絡コネクタ12から出力される。具体的には、図1に示す短絡コネクタ12において、4ビットのビット列ID0〜ID3が設定されており、ID0及びID3には0Vが入力されるものとする。一方、ID1及びID2は電圧がないか、0V以外の外部電圧が印加される。ID0〜ID3には信号線26、28、30及び32がそれぞれ関連付けられており、これらの信号線は第2のコネクタ22aを介して第1の分岐ユニット16aに配線される。分岐ユニット16aでは、入力されたビット列ID0〜ID3のうち、予め定めた2つ(ここではID0及びID3)のビットに相当する信号線26及び32(太線で図示)が、第1のコネクタ20aを介して通信ユニット18aに接続される。   A bit string for generating an individual ID setting signal is output from the short-circuit connector 12. Specifically, in the short-circuit connector 12 shown in FIG. 1, 4-bit bit strings ID0 to ID3 are set, and 0V is input to ID0 and ID3. On the other hand, ID1 and ID2 have no voltage or an external voltage other than 0V is applied. Signal lines 26, 28, 30 and 32 are associated with ID0 to ID3, respectively, and these signal lines are wired to the first branch unit 16a through the second connector 22a. In the branch unit 16a, signal lines 26 and 32 (shown by bold lines) corresponding to two predetermined bits (ID0 and ID3 here) of the input bit strings ID0 to ID3 are connected to the first connector 20a. To the communication unit 18a.

各通信ユニットはID設定機能を具備しており、0Vの電圧が入力された場合は「0」、電圧の入力がない場合や0V以外の入力があった場合は「1」を出力する信号変換回路等を備え、各通信ユニットの識別番号を決定する。従って図1の場合、1台目の通信ユニット18aには識別番号「00」が設定される。   Each communication unit has an ID setting function that outputs “0” when a voltage of 0V is input, and outputs “1” when there is no voltage input or when there is an input other than 0V. A circuit or the like is provided, and an identification number of each communication unit is determined. Therefore, in the case of FIG. 1, the identification number “00” is set in the first communication unit 18a.

なお各通信ユニットにおける外部入力信号は、0Vではなく、外部電圧を印加して設定を行ってもよいし、通信信号に電源電圧が含まれる場合にはそれを利用して設定してもよい。いずれの場合も、分岐ケーブルの最上流に接続する短絡コネクタ12に、個別のIDを設定する際の元となるビット列の初期値に対応する所定の電圧が入力されるように配線を行う。   The external input signal in each communication unit may be set by applying an external voltage instead of 0 V, or may be set using a power supply voltage included in the communication signal. In either case, wiring is performed so that a predetermined voltage corresponding to the initial value of the bit string that is the basis for setting individual IDs is input to the short-circuit connector 12 connected to the uppermost stream of the branch cable.

次に信号線26、28、30及び32は2台目の分岐ユニット16bの第2コネクタ22bに接続されるのであるが、その前に信号線の入れ替え、図1の例では分岐ユニット16aの第3のコネクタ24aに至る前或いは第3のコネクタ24aにおいて、最後部の信号線32を最前部に移動させ、他の信号線を1つ繰り下げるような入れ替えを行う。このような入れ替えを行うことにより、分岐ユニット16bでは、分岐ユニット16aと同様の構成でありながら、通信ユニット18bには、ID0〜ID3のうち、ID3及びID2のビットに相当する信号線32及び30が、第1のコネクタ20bを介して接続される。従って図1の場合、2台目の通信ユニット18bには識別番号「10」が設定される。   Next, the signal lines 26, 28, 30 and 32 are connected to the second connector 22b of the second branch unit 16b. Before that, the signal lines are replaced. In the example of FIG. Before the third connector 24a is reached or in the third connector 24a, the rearmost signal line 32 is moved to the frontmost part, and the other signal line is lowered by one. By performing such replacement, the branch unit 16b has the same configuration as that of the branch unit 16a, but the communication unit 18b has signal lines 32 and 30 corresponding to bits ID3 and ID2 among ID0 to ID3. Are connected via the first connector 20b. Accordingly, in the case of FIG. 1, the identification number “10” is set in the second communication unit 18b.

以下、同様の処理を繰り返すことにより、3台目の通信ユニット18cには識別番号「11」が設定され、4台目の通信ユニット18dには識別番号「01」が設定される。このようにして、各通信ユニットは信号線の配線構造に関して互いに同一の構成を具備しつつも、固有の識別番号を取得することができる。また各分岐ユニットにおいて配線構造を同一のものとすることにより、信号線、分岐ユニット間のケーブル及び通信ユニットは、それぞれ同一種類のものを使用することが可能となり、コスト低減や部品管理の容易化が図れる。さらに、ユニット故障時やケーブル断線時等において、通信システムを稼動したままで通信ユニットを取り外したり、交換を行ったりしても、他の通信ユニット間の通信には影響を及ぼさない。   Thereafter, by repeating the same processing, the identification number “11” is set for the third communication unit 18c, and the identification number “01” is set for the fourth communication unit 18d. In this way, each communication unit can obtain a unique identification number while having the same configuration with respect to the wiring structure of the signal lines. Also, by using the same wiring structure for each branch unit, the same type of signal line, cable between the branch units, and communication unit can be used, reducing costs and facilitating parts management. Can be planned. Furthermore, even if a communication unit is removed or replaced while the communication system is operating in the event of a unit failure or cable disconnection, communication between other communication units is not affected.

なお各ユニット間での通信方式に特に制限はないが、マルチポイント接続に対応し双方向の通信が可能なRS−485通信方式が好ましい。また通信信号の規格によっては終端抵抗が必要になる場合があるが、この場合は、端点に相当する分岐ケーブルに、終端抵抗を備えた短絡コネクタを接続するなどして終端を行う。   The communication method between the units is not particularly limited, but the RS-485 communication method capable of bidirectional communication corresponding to multipoint connection is preferable. Depending on the standard of the communication signal, a termination resistor may be required. In this case, termination is performed by connecting a short-circuit connector having a termination resistor to a branch cable corresponding to the end point.

ここで、第1の実施形態において、上流側から数えて1台目の通信ユニット16aがプログラマブルコントローラであり、2台目の通信ユニット16bがデジタルI/Oの入出力装置であり、3台目の通信ユニット16cがロボット制御装置であり、4台目の通信ユニット16dが表示器であるものとして、通信システムの動作を説明する。   Here, in the first embodiment, the first communication unit 16a counted from the upstream side is a programmable controller, the second communication unit 16b is a digital I / O input / output device, and the third unit. The operation of the communication system will be described assuming that the communication unit 16c is a robot control device and the fourth communication unit 16d is a display.

上述のように、プログラマブルコントローラ16aにはID「00」、デジタルI/Oの入出力装置16bにはID「10」、ロボット制御装置16cにはID「11」、表示器16dにはID「01」が割り付けられる。またプログラマブルコントローラ16a、ロボット制御装置16c及び表示器16dはマスタ装置として動作し、デジタルI/Oの入出力装置16bはスレーブ装置として動作する。   As described above, the programmable controller 16a has ID “00”, the digital I / O input / output device 16b has ID “10”, the robot controller 16c has ID “11”, and the display 16d has ID “01”. Is assigned. The programmable controller 16a, the robot controller 16c, and the display 16d operate as a master device, and the digital I / O input / output device 16b operates as a slave device.

マスタ装置は、イーサネット(登録商標)等で用いられるCSMA/CDやその他の調停機能を用いて、通信路のバス権を得たのち、「送信先の識別番号、送信元の識別番号、コマンド、データサイズ、データ、CRC」等にて構成されるパケットを他の機器に送信する。送信先の識別番号に対応する通信ユニットは、そのパケットのコマンドに対応した返信を行う。一方スレーブ装置は、自らはバス権を得ることなく、マスタ装置からのパケットに対する返信のみを行う。   The master device uses the CSMA / CD used in Ethernet (registered trademark) and other arbitration functions to obtain the bus right for the communication path, and then transmits the “transmission destination identification number, transmission source identification number, command, A packet composed of “data size, data, CRC” and the like is transmitted to another device. The communication unit corresponding to the identification number of the transmission destination sends a reply corresponding to the command of the packet. On the other hand, the slave device does not obtain the bus right by itself and only sends a reply to the packet from the master device.

例えば、バス権の取得と開放を順次繰り返すことにより、プログラマブルコントローラ16aがデジタルI/Oの入出力装置16bを制御し、ロボット制御装置16cがプログラマブルコントローラ16aからデータを受け取って所望の動作を行い、また、表示器16dは各通信ユニットの情報を入手して、オペレータが望む情報を表示器16dに表示する、という操作が可能になる。   For example, by sequentially acquiring and releasing the bus right, the programmable controller 16a controls the digital I / O input / output device 16b, and the robot control device 16c receives data from the programmable controller 16a and performs a desired operation. In addition, the display 16d can obtain information on each communication unit and display information desired by the operator on the display 16d.

図2は、本発明の第2の実施形態に係る通信システム110の基本構成を示す図である。通信システム110が第1の実施形態に係る通信システム10と異なる点は、短絡コネクタの機能を有する装置として1つのマスタユニット112を有し、通信ユニット18a〜18dに相当するユニット118a〜118dがいずれもスレーブユニットである点である。その他の構成要素については第1の実施形態と同様でよいので、図2において第1の実施形態と同様の機能を具備する構成要素には100を付して詳細な説明は省略する。   FIG. 2 is a diagram showing a basic configuration of a communication system 110 according to the second embodiment of the present invention. The communication system 110 is different from the communication system 10 according to the first embodiment in that it has one master unit 112 as a device having a function of a short-circuit connector, and any of the units 118a to 118d corresponding to the communication units 18a to 18d. Is also a slave unit. Since other components may be the same as those in the first embodiment, the components having the same functions as those in the first embodiment in FIG.

上述のように第2の実施形態に係る通信システム110は、1つのマスタユニット112及び複数台の分岐ユニット116a〜116dを有する。例として、マスタユニット112はロボット制御装置であり、各分岐ユニットに接続されるスレーブユニット118a〜118dは複数台のデジタルI/Oの入出力装置である。ここでは、上流側から1台目のデジタルI/Oの入出力装置118aにはID「00」、2台目のデジタルI/Oの入出力装置118bにはID「10」、3台目のデジタルI/Oの入出力装置118cにはID「11」、4台目のデジタルI/Oの入出力装置118dにはID「01」が割り付けられる。   As described above, the communication system 110 according to the second embodiment includes one master unit 112 and a plurality of branch units 116a to 116d. As an example, the master unit 112 is a robot control device, and the slave units 118a to 118d connected to each branch unit are a plurality of digital I / O input / output devices. Here, ID “00” is input to the first digital I / O input / output device 118a from the upstream side, and ID “10” is input to the second digital I / O input / output device 118b. ID “11” is assigned to the digital I / O input / output device 118c, and ID “01” is assigned to the fourth digital I / O input / output device 118d.

通信システム110では、ロボット制御装置112が1台目のデジタルI/Oの入出力装置118aにパケットを送信し、それに対して1台目のデジタルI/Oの入出力装置118aが返信を行う。同様にして、各デジタルI/Oの入出力装置との通信を行い、全てのデジタルI/Oの入出力装置との通信が終了する。ロボット制御装置112は、これを定期的に繰り返す、という操作が可能になる。   In the communication system 110, the robot controller 112 transmits a packet to the first digital I / O input / output device 118a, and the first digital I / O input / output device 118a responds to the packet. Similarly, communication with each digital I / O input / output device is performed, and communication with all the digital I / O input / output devices ends. The robot controller 112 can perform an operation of repeating this periodically.

なお通信システム110では、スレーブユニットからのデータを受信するのはマスタユニットのみなので、パケットに「送信元の識別番号」の情報は不要である。従って第2の実施形態では、マスタユニットに識別番号を設定する必要はない。また各スレーブユニットは、マスタユニットからのリクエスト信号に対して返信を返すだけの単純な構成にできるので、複数のマスタユニットが存在する場合と比較して、安価に通信システムを構築できる。   In the communication system 110, since only the master unit receives data from the slave unit, the information of “transmission source identification number” is not necessary in the packet. Therefore, in the second embodiment, it is not necessary to set an identification number for the master unit. Further, each slave unit can be configured simply by returning a response to the request signal from the master unit, so that a communication system can be constructed at a lower cost than when a plurality of master units exist.

以上、2つの実施形態を説明したが、各実施形態において個別のIDを設定する際の元となるビット列の初期値については、適切な値を初期値として設定する必要がある。以下、本発明におけるID設定信号の生成用ビット列を構成する方法を説明する。要するにID設定信号は、通信ユニットを通過するごとに、いわゆるシフトレジスタのように値が変化する。   Although two embodiments have been described above, it is necessary to set an appropriate value as an initial value for an initial value of a bit string that is a base when setting an individual ID in each embodiment. Hereinafter, a method for constructing a bit string for generating an ID setting signal in the present invention will be described. In short, each time the ID setting signal passes through the communication unit, the value changes like a so-called shift register.

(1)ID設定信号の初期値を全てゼロ(ALL0)とする。
例えば最大通信ユニット数が4の場合、2N≧4を満たす最小のNは2であるから、初期値として2ビット列「00」が生成される。当該初期値は、1台目の通信ユニットの識別番号に相当する。同様に、最大通信ユニット数が8、16又は32の場合、初期値として3ビット列「000」、「0000」又は「00000」がそれぞれ生成される。
(1) All initial values of the ID setting signal are set to zero (ALL0).
For example, when the maximum number of communication units is 4, since the minimum N satisfying 2 N ≧ 4 is 2, a 2-bit string “00” is generated as an initial value. The initial value corresponds to the identification number of the first communication unit. Similarly, when the maximum number of communication units is 8, 16, or 32, a 3-bit string “000”, “0000”, or “00000” is generated as an initial value.

(2)(1)で得られた初期値に対し、次段の最下位ビットを1にした場合に、そのビット列が、上流のID設定信号としてまだ設定されていないビット列であるならば、それを次段のID設定信号に決定する。
最大通信ユニット数が4の場合、「00」に続く3列目のビット列を「1」とした場合、次の2ビット列は「01」となる。これは既出の「00」とは異なるので、3列目のビット列は「1」に決定される。続いて、「001」に続く4列目のビット列を「1」とした場合、次の2ビット列は「11」となる。これも既出の「00」及び「01」とは異なるので、4列目のビット列は「1」に決定される。このようにして得られた2番目及び3番目のビット列「01」及び「11」が、それぞれ2台目及び3台目の通信ユニットの識別番号となる。
(2) If the least significant bit of the next stage is set to 1 with respect to the initial value obtained in (1), if the bit string is a bit string not yet set as an upstream ID setting signal, Is determined as the ID setting signal of the next stage.
When the maximum number of communication units is 4, when the third bit string following “00” is “1”, the next two bit strings are “01”. Since this is different from the above-mentioned “00”, the third bit string is determined to be “1”. Subsequently, when the fourth bit string following “001” is “1”, the next 2-bit string is “11”. Since this is also different from the previously described “00” and “01”, the fourth bit string is determined to be “1”. The second and third bit strings “01” and “11” obtained in this way are the identification numbers of the second and third communication units, respectively.

(3)一方、そのビット列が、上流のID設定信号として既に設定されたビット列であるならば、最下位ビットの値を0として、それを次段のID設定信号に決定する。
例えば上記(2)において、「0011」に続く5列目のビット列を「1」とした場合、次の(4番目の)2ビット列は「11」となる。これは3番目の「11」と重複するので、5列目のビット列は「1」ではなく「0」に決定される。これにより、4番目のビット列は「10」となり、これが4台目の通信ユニットの識別番号となる。
(3) On the other hand, if the bit string is a bit string that has already been set as an upstream ID setting signal, the value of the least significant bit is set to 0 and it is determined as the ID setting signal of the next stage.
For example, in (2) above, if the fifth bit string following “0011” is “1”, the next (fourth) 2 bit string is “11”. Since this overlaps with the third “11”, the fifth bit string is determined to be “0” instead of “1”. As a result, the fourth bit string is “10”, which is the identification number of the fourth communication unit.

(4)上記(2)〜(3)の処理を繰り返すことで、最大通信ユニット数に応じたID設定信号の生成ビット列が得られる。
なお上述の処理によれば、最大通信ユニット数が4の場合のID設定信号の生成ビット列は「00110」となるが、図1を用いて説明したように最上位のビットは次段では最下位ビットとするような配線が可能なので、該生成ビット列は「0011」とすることができる。
(4) By repeating the processes (2) to (3), an ID setting signal generation bit string corresponding to the maximum number of communication units is obtained.
According to the above processing, the ID setting signal generation bit string when the maximum number of communication units is 4 is “00110”, but as described with reference to FIG. 1, the most significant bit is the least significant bit in the next stage. Since the wiring for forming the bit is possible, the generated bit string can be “0011”.

また上記(1)〜(4)の処理は、第1の符号を「0」とし、第2の符号を「1」とした場合を説明したが、両符号を置換して行うことも可能である。すなわち、(1)においてID設定信号の初期値を全て1(ALL1)とし、(2)において次段の最下位ビットを0にした場合に、そのビット列が、上流のID設定信号としてまだ設定されていないビット列であるならば、それを次段のID設定信号に決定し、一方、(3)においてそのビット列が、上流のID設定信号として既に設定されたビット列であるならば、最下位ビットの値を1として、それを次段のID設定信号に決定し、(2)及び(3)を繰り返す、という処理も可能である。   In addition, the above processes (1) to (4) have been described in the case where the first code is set to “0” and the second code is set to “1”. However, both codes can be replaced. is there. That is, when the initial values of the ID setting signal are all 1 (ALL1) in (1) and the least significant bit of the next stage is 0 in (2), the bit string is still set as the upstream ID setting signal. If it is not a bit string, it is determined as the ID setting signal of the next stage. On the other hand, if the bit string is a bit string already set as the upstream ID setting signal in (3), the least significant bit of It is also possible to set the value to 1, determine it as the next stage ID setting signal, and repeat (2) and (3).

表1は、上記処理を用いて最大通信ユニット数が4、8、16又は32の場合の生成ビット列をそれぞれ求めた結果である。なお生成ビット列に付された下線部(ALL0)は、ID設定信号の初期値を表す。いずれの場合も、ビット列数は最大通信ユニット数に等しい。   Table 1 shows the results of obtaining the generated bit strings when the maximum number of communication units is 4, 8, 16, or 32 using the above processing. The underlined part (ALL0) attached to the generated bit string represents the initial value of the ID setting signal. In either case, the number of bit strings is equal to the maximum number of communication units.

Figure 0005576913
Figure 0005576913

なお表1は最大通信ユニット数が2のN乗(Nは自然数)に相当しない場合(例えば6台や7台の場合)も併せて表示している。このような場合では、上記(1)〜(4)を適用して生成ビット列を求めてもよいし、作業者が試行錯誤によってビット列を求めることもできる。   Table 1 also shows a case where the maximum number of communication units does not correspond to 2 to the Nth power (where N is a natural number) (for example, six or seven). In such a case, the generated bit string may be obtained by applying the above (1) to (4), or the operator can obtain the bit string by trial and error.

図3及び図4は、表1に示した生成ビット列を用いて各通信ユニットのIDを決定する処理を説明する図である。先ず最大通信ユニット数が4の場合(図3)、1台目の通信ユニットのIDとして、2ビットの初期値「00」(枠線内)が設定される。次に2台目の通信ユニットのIDとして、生成ビット列「0011」において1列目のビットをビット列の最後尾に移動させ、他のビットを1つ繰り上げて得られたビット列の最初の2ビットすなわち「01」が設定される。以下、同様の処理を繰り返すことにより、3台目及び4台目の通信ユニットのIDとして、それぞれ「11」及び「10」が設定される。これらのIDに重複はない。   3 and 4 are diagrams for explaining processing for determining the ID of each communication unit using the generated bit string shown in Table 1. FIG. First, when the maximum number of communication units is 4 (FIG. 3), a 2-bit initial value “00” (inside the frame) is set as the ID of the first communication unit. Next, as the ID of the second communication unit, the first two bits of the bit string obtained by moving the first bit in the generated bit string “0011” to the end of the bit string and moving the other bit up by one, that is, “01” is set. Thereafter, by repeating the same processing, “11” and “10” are set as the IDs of the third and fourth communication units, respectively. There is no overlap in these IDs.

また最大通信ユニット数が8の場合(図4)、1台目の通信ユニットのIDとして、3ビットの初期値「000」(枠線内)が設定される。次に2台目の通信ユニットのIDとして、生成ビット列「00011101」において1列目のビットをビット列の最後尾に移動させ、他のビットを1つ繰り上げて得られたビット列の最初の3ビットすなわち「001」が設定される。以下、同様の処理を繰り返すことにより、3台目〜8台目の通信ユニットのIDとして、それぞれ「011」、「111」、「110」、「101」、「010」及び「100」が設定される。これらのIDにも重複はない。   When the maximum number of communication units is 8 (FIG. 4), a 3-bit initial value “000” (inside the frame) is set as the ID of the first communication unit. Next, as the ID of the second communication unit, in the generated bit string “00011101”, the first bit is moved to the tail of the bit string and the other three bits are moved up one bit, that is, the first three bits of the bit string obtained by “001” is set. Thereafter, by repeating the same processing, “011”, “111”, “110”, “101”, “010”, and “100” are set as the IDs of the third to eighth communication units, respectively. Is done. There is no overlap in these IDs.

10、110 通信システム
12、112 短絡コネクタ
14、114 通信線路
16a〜16d、116a〜116d 分岐ユニット
18a〜18d、118a〜118d 通信ユニット
20a〜20d、120a〜120d 第1コネクタ
22a〜22d、122a〜122d 第2コネクタ
24a〜24d、124a〜124d 第3コネクタ
26、28、30、32、126、128、130、132 信号線
10, 110 Communication system 12, 112 Short-circuit connector 14, 114 Communication line 16a-16d, 116a-116d Branch unit 18a-18d, 118a-118d Communication unit 20a-20d, 120a-120d First connector 22a-22d, 122a-122d Second connector 24a to 24d, 124a to 124d Third connector 26, 28, 30, 32, 126, 128, 130, 132 Signal line

Claims (3)

同一通信線路上に接続された複数の通信ユニットの各々に個別の識別番号を自動的に設定する識別番号自動設定機能を有する通信システムであって、
前記通信システムは、短絡コネクタと、該短絡コネクタに直列に接続される複数の分岐ユニットと、該分岐ユニットにそれぞれ接続される複数の通信ユニットとを有し、
前記短絡コネクタは、前記複数の通信ユニットに個別の識別番号を設定するために、前記分岐ユニットの配線構造に基づき予め定めたビット列の初期値を出力するビット列出力機能を有し、前記ビット列の列数は前記通信システムに接続可能な通信ユニットの最大数と同数であり、
前記分岐ユニットの各々は、対応する通信ユニットと接続するための第1のコネクタと、前記短絡コネクタ又は上流側の分岐ユニットと接続するための第2のコネクタと、下流側の分岐ユニットと接続するための第3のコネクタと、前記第2のコネクタから入力される、前記通信システムに接続可能な通信ユニットの最大数を列数とするビット列のうち、2のN乗が前記最大数以上となる最小の自然数Nを列数とするビット列を識別番号設定信号として前記第1のコネクタから出力し、かつ前記最大数を列数とするビット列を入れ替えて前記第3のコネクタから出力する配線構造とを有し、
前記複数の分岐ユニットの各々における前記配線構造は互いに同一であり、
前記通信ユニットは、対応する前記分岐ユニットの第1のコネクタから出力された前記識別番号設定信号を自己の識別番号として設定する設定機能を有する、
通信システム。
A communication system having an identification number automatic setting function for automatically setting an individual identification number for each of a plurality of communication units connected on the same communication line,
The communication system includes a short-circuit connector, a plurality of branch units connected in series to the short-circuit connector, and a plurality of communication units respectively connected to the branch unit;
The short connector, said to set the unique identification number to the plurality of communication units, it has a bit sequence output function for outputting the initial value of the predetermined bit sequence based on the wiring structure of the branch unit, the column of the bit string The number is the same as the maximum number of communication units connectable to the communication system,
Each of the branch units is connected to a first connector for connecting to a corresponding communication unit, a second connector for connecting to the short-circuit connector or the upstream branch unit, and a downstream branch unit. Of the third connector and the bit string input from the second connector and having the maximum number of communication units connectable to the communication system as the column number, 2 to the Nth power is equal to or greater than the maximum number A wiring structure in which a bit string having the smallest natural number N as the number of columns is output from the first connector as an identification number setting signal, and a bit string having the maximum number as the number of columns is replaced and output from the third connector. Have
The wiring structures in each of the plurality of branch units are the same as each other,
The communication unit has a setting function of setting the identification number setting signal output from the first connector of the corresponding branch unit as its own identification number.
Communications system.
記配線構造は、ある分岐ユニットにおいて最上位のビットが、1つ下流側の分岐ユニットでは最下位ビットになるとともに他のビットの各々が1つ上位のビットに繰り上がる配線構造、或いは、ある分岐ユニットにおいて最下位のビットが1つ下流側の分岐ユニットでは最上位ビットになるとともに他のビットの各々が1つ下位のビットに繰り下がる配線構造を有する、請求項に記載の通信システム。 Before SL wiring structure, the most significant bit in the branch unit that is repeated up wiring structure to another, each bit of the one upper bits with becomes the least significant bit in the branch unit of one downstream, or it 2. The communication system according to claim 1 , wherein the communication system has a wiring structure in which the least significant bit in the branch unit is one most significant bit in the downstream branch unit and each of the other bits is carried down to the next lower bit. 前記短絡コネクタがマスタユニットであり、前記通信ユニットがスレーブユニットである、請求項1又は2に記載の通信システム。 The communication system according to claim 1 or 2 , wherein the short-circuit connector is a master unit, and the communication unit is a slave unit.
JP2012193904A 2012-09-04 2012-09-04 Communication system having automatic setting function of identification number Active JP5576913B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2012193904A JP5576913B2 (en) 2012-09-04 2012-09-04 Communication system having automatic setting function of identification number
CN201310397391.0A CN103685595B (en) 2012-09-04 2013-09-04 Communication system with automatic setting function for recognizing number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012193904A JP5576913B2 (en) 2012-09-04 2012-09-04 Communication system having automatic setting function of identification number

Publications (2)

Publication Number Publication Date
JP2014050065A JP2014050065A (en) 2014-03-17
JP5576913B2 true JP5576913B2 (en) 2014-08-20

Family

ID=50321865

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012193904A Active JP5576913B2 (en) 2012-09-04 2012-09-04 Communication system having automatic setting function of identification number

Country Status (2)

Country Link
JP (1) JP5576913B2 (en)
CN (1) CN103685595B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014108695A (en) * 2012-11-30 2014-06-12 Denso Corp Network system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005159791A (en) * 2003-11-27 2005-06-16 Fujikura Ltd Connector and network system
CN1941787A (en) * 2005-09-30 2007-04-04 乐金电子(昆山)电脑有限公司 Method for setting tag in A/V network apparatus
US7680961B2 (en) * 2005-10-25 2010-03-16 Hewlett-Packard Development Company, L.P. Device recognition system and method
KR100720145B1 (en) * 2005-12-27 2007-05-18 삼성전자주식회사 Master module, function module, electronic device comprising the same and identification data setting method thereof

Also Published As

Publication number Publication date
JP2014050065A (en) 2014-03-17
CN103685595A (en) 2014-03-26
CN103685595B (en) 2015-07-01

Similar Documents

Publication Publication Date Title
US11233674B2 (en) Processing of process data
CN106131240A (en) A kind of CAN address distribution method based on daisy chaining and communication system
WO2015136960A1 (en) Controller
JP5570556B2 (en) Numerical control device that communicates with IO unit
JP5576913B2 (en) Communication system having automatic setting function of identification number
CN106610911B (en) Master control electronic device and communication method thereof
TWI709307B (en) Control system comprising multiple functional modules and addressing method for functional modules thereof
JP6596239B2 (en) Multiplexing communication device
US10667369B2 (en) Device, system, and method for determining an address of a component arranged in a structure
KR20090005890A (en) Robot integrated welding control sustem
DE102018005776A1 (en) Coupler / Fieldbus Module
CN110673511B (en) Control system
JP2013214754A (en) Component mounting device and display device
JP2011045029A (en) Optical matrix switch, and system for verification of operation in optical transmission device
RU126855U1 (en) SOFTWARE AND HARDWARE COMPLEX FOR CONTROL OF TECHNOLOGICAL EQUIPMENT WITH CNC
US9971326B2 (en) Sequencer system and address setting method
KR101308038B1 (en) Integrated module device for industrial network protocol and method for controlling thereof
JP5153469B2 (en) Elevator call registration device and elevator device
JP2015060370A (en) Numerical control device with built-in robot controller
CN205141334U (en) Polymorphic type interface converter
JP6764688B2 (en) How to update the controller
JP2006040148A (en) Safety controller, safety control system and communication error detection method
US11736318B2 (en) Initialization of data bus subscribers
US11184194B2 (en) Distributed processing of process data
JP2013085251A (en) Field bus network adapter and field bus network subscriber device

Legal Events

Date Code Title Description
A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20140131

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20140212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140218

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140408

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: 20140610

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140704

R150 Certificate of patent or registration of utility model

Ref document number: 5576913

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150