JP5473817B2 - Programmable controller and bus converter - Google Patents

Programmable controller and bus converter Download PDF

Info

Publication number
JP5473817B2
JP5473817B2 JP2010166405A JP2010166405A JP5473817B2 JP 5473817 B2 JP5473817 B2 JP 5473817B2 JP 2010166405 A JP2010166405 A JP 2010166405A JP 2010166405 A JP2010166405 A JP 2010166405A JP 5473817 B2 JP5473817 B2 JP 5473817B2
Authority
JP
Japan
Prior art keywords
bus
unit
request
cpu unit
converter
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
JP2010166405A
Other languages
Japanese (ja)
Other versions
JP2012027728A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2010166405A priority Critical patent/JP5473817B2/en
Priority to CN201110070251.3A priority patent/CN102346454B/en
Publication of JP2012027728A publication Critical patent/JP2012027728A/en
Application granted granted Critical
Publication of JP5473817B2 publication Critical patent/JP5473817B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

本発明は、産業用機器などの被制御装置を制御するプログラマブルコントローラおよびバス変換器に関する。   The present invention relates to a programmable controller and a bus converter that control a controlled device such as an industrial device.

従来、プログラマブルコントローラ(以下、単にPLC)には、ベースユニットに1以上の機能ユニットを装着して構成されるものがある。機能ユニットには、PLC全体の制御を行うCPUユニットのほか、PLCの制御目的に合わせて選択されるアナログ入力ユニット、アナログ出力ユニット、温度制御ユニット、およびモーションコントローラユニットなどがある。これらのCPUユニット以外の機能ユニットを総称して補助ユニットということとする。CPUユニットは、ベースユニットが備えるバスを介して補助ユニットとの間で通信を行い、補助ユニットの制御を実行する。   2. Description of the Related Art Conventionally, there are programmable controllers (hereinafter simply referred to as PLCs) that are configured by mounting one or more functional units on a base unit. In addition to the CPU unit that controls the entire PLC, the functional unit includes an analog input unit, an analog output unit, a temperature control unit, a motion controller unit, and the like that are selected according to the control purpose of the PLC. Functional units other than these CPU units are collectively referred to as auxiliary units. The CPU unit communicates with the auxiliary unit via a bus provided in the base unit, and executes control of the auxiliary unit.

また、ベースユニットは、増設することが可能となっており(例えば特許文献1、特許文献2、特許文献3、特許文献4参照)、ベースユニットを増設することによって補助ユニットを装着するスロットの不足や、ベースユニット間の距離を離すことによって離れた位置に設置された被制御装置の制御に対応することができるようになっている。以降、ベースユニットを複数有するPLCにおいて、CPUユニットが装着されたベースユニットを基本ベース、基本ベースに増設され、基本ベースに対してスレーブとして動作するベースユニットを増設ベースということとする。   In addition, the base unit can be added (see, for example, Patent Document 1, Patent Document 2, Patent Document 3, and Patent Document 4), and there is a shortage of slots for mounting the auxiliary unit by adding the base unit. In addition, by controlling the distance between the base units, it is possible to cope with the control of the controlled device installed at a distant position. Hereinafter, in a PLC having a plurality of base units, a base unit to which a CPU unit is attached is added to a basic base and a basic base, and a base unit that operates as a slave with respect to the basic base is referred to as an extended base.

特開2000−47766号公報JP 2000-47766 A 特開平6−124103号公報JP-A-6-124103 特開平7−311605号公報Japanese Patent Laid-Open No. 7-311605 特開平4−373002号公報JP-A-4-373002

さて、CPUユニットの処理速度が高速でかつバスが高速であるほど、より高速な制御を行うことができる。したがって、PLCメーカは、より良い性能の製品を提供するために、より高速なバスを備えたベースユニットを開発する。一方、より高速なバスを備えたベースユニットが発売される毎にPLCを構成する補助ユニットを高速バス対応のものに買い換えることはユーザにとって負担が大きい。そこで、高速バスに対応していない既存の補助ユニットを使用することができるように、高速バスを備えた基本ベースと、既存の補助ユニットのための基本ベースよりもバス速度が遅い増設ベースと、を接続して用いることができると便利である。   Now, the higher the processing speed of the CPU unit and the faster the bus, the faster the control can be performed. Therefore, PLC manufacturers develop base units with faster buses in order to provide better performance products. On the other hand, every time a base unit having a higher speed bus is released, it is burdensome for the user to replace the auxiliary unit constituting the PLC with one corresponding to the high speed bus. Therefore, in order to be able to use an existing auxiliary unit that does not support the high-speed bus, a basic base equipped with a high-speed bus, an extension base having a lower bus speed than the basic base for the existing auxiliary unit, It is convenient to be able to connect and use.

しかしながら、単純に高速バスと低速バスとを接続すると、PLC全体の性能が低速バスの性能まで低下してしまうという問題があった。例えば特許文献4に開示されている技術によれば、基本ベース上のCPUユニットは、低速バスにアクセスする場合、バスクロックを落としてアクセスする。   However, when the high-speed bus and the low-speed bus are simply connected, there is a problem that the performance of the entire PLC is reduced to the performance of the low-speed bus. For example, according to the technique disclosed in Patent Document 4, the CPU unit on the basic base accesses the low speed bus by dropping the bus clock.

本発明は、上記に鑑みてなされたものであって、速度が異なるバスを介して機能ユニット間で効率的な通信を行うことができるPLCおよびバス変換器を得ることを目的とする。   The present invention has been made in view of the above, and an object of the present invention is to obtain a PLC and a bus converter that can perform efficient communication between functional units via buses having different speeds.

上述した課題を解決し、目的を達成するために、本発明は、CPUユニットと、前記CPUユニットにより制御される補助ユニットと、第1のバスを備え、前記第1のバスに前記補助ユニットが装着される第1のベースユニットと、前記第1のバスよりも高速な第2のバスを備え、前記第2のバスは内部バスおよび外部バスを備え、前記内部バスに前記CPUユニットが装着される第2のベースユニットと、前記第1のバスと前記外部バスとに接続され、前記CPUユニットと前記補助ユニットとの間で送受信される制御データの転送を行うバス変換器とを備え、前記バス変換器は、前記CPUユニットが送信した前記補助ユニットに対する要求を受信したとき、要求毎のIDを生成して前記生成したIDを前記CPUユニットに返信し、前記CPUユニットは、前記IDを受信すると、前記送信済みの要求に対応する前記補助ユニットからの応答の受信を待つことなく前記第2のバスを介した次の要求の送信を実行する、ことを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention includes a CPU unit, an auxiliary unit controlled by the CPU unit, and a first bus, and the auxiliary unit is included in the first bus. A first base unit to be mounted; and a second bus that is faster than the first bus. The second bus includes an internal bus and an external bus, and the CPU unit is mounted on the internal bus. A second base unit, and a bus converter connected to the first bus and the external bus and transferring control data transmitted and received between the CPU unit and the auxiliary unit, When the bus converter receives a request for the auxiliary unit transmitted by the CPU unit, the bus converter generates an ID for each request and returns the generated ID to the CPU unit. When receiving the ID, the CPU unit executes transmission of the next request via the second bus without waiting for reception of a response from the auxiliary unit corresponding to the transmitted request. And

本発明によれば、バス変換器は、第2のバスを介して要求を受信完了した後、応答の転送を待つことなくIDを返信し、CPUユニットは、IDを受信した後、第2のバスよりも低速な第1のバスを用いた応答の受信を待つことなく第2のバスを利用できるので、速度が異なるバスを介して機能ユニット間で効率的な通信を行うことができる、という効果を奏する。   According to the present invention, after completing the reception of the request via the second bus, the bus converter returns the ID without waiting for the response to be transferred, and the CPU unit receives the ID, Since the second bus can be used without waiting for a response to be received using the first bus, which is slower than the bus, efficient communication can be performed between functional units via buses with different speeds. There is an effect.

図1は、実施の形態1のPLCの構成を示す図である。FIG. 1 is a diagram showing a configuration of the PLC according to the first embodiment. 図2は、実施の形態1のバス変換器の構成を説明する図である。FIG. 2 is a diagram illustrating the configuration of the bus converter according to the first embodiment. 図3は、CPUユニットの外部バスを介した通信にかかる動作を説明するフローチャートである。FIG. 3 is a flowchart for explaining the operation related to communication via the external bus of the CPU unit. 図4は、バス変換器による転送動作を説明するフローチャートである。FIG. 4 is a flowchart for explaining the transfer operation by the bus converter. 図5は、バス変換器による転送動作のうちの要求を転送する動作を説明するブロック図である。FIG. 5 is a block diagram for explaining an operation of transferring a request among the transfer operations by the bus converter. 図6は、バス変換器による転送動作のうちの結果データを転送する動作を説明するブロック図である。FIG. 6 is a block diagram for explaining the operation of transferring the result data in the transfer operation by the bus converter. 図7は、結果データ転送処理を詳しく説明するフローチャートである。FIG. 7 is a flowchart for explaining the result data transfer process in detail. 図8は、実施の形態1のPLCの効果を説明するためのタイミングチャートである。FIG. 8 is a timing chart for explaining the effect of the PLC according to the first embodiment. 図9は、実施の形態2のPLCの構成を示す図である。FIG. 9 is a diagram illustrating a configuration of the PLC according to the second embodiment. 図10は、実施の形態2のバス変換器の構成を説明する図である。FIG. 10 is a diagram for explaining the configuration of the bus converter according to the second embodiment. 図11は、実施の形態2のバス変換器による結果データ転送処理を説明するフローチャートである。FIG. 11 is a flowchart for explaining result data transfer processing by the bus converter according to the second embodiment. 図12は、実施の形態3のPLCの構成を示す図である。FIG. 12 is a diagram illustrating a configuration of the PLC according to the third embodiment. 図13は、実施の形態3のバス変換器の構成を説明する図である。FIG. 13 is a diagram illustrating the configuration of the bus converter according to the third embodiment. 図14は、CPUユニットの外部バスを介した通信にかかる動作を説明するフローチャートである。FIG. 14 is a flowchart for explaining an operation related to communication via the external bus of the CPU unit. 図15は、結果データ転送処理を説明するフローチャートである。FIG. 15 is a flowchart for explaining the result data transfer process. 図16は、ベース間の接続とバス変換器が備える第1バスI/Fの構成とを説明する図である。FIG. 16 is a diagram for explaining the connection between the bases and the configuration of the first bus I / F included in the bus converter. 図17は、第1バスI/Fの要求受信時の動作を説明するフローチャートである。FIG. 17 is a flowchart for explaining the operation when receiving a request for the first bus I / F. 図18は、実施の形態5のPLCの構成を説明する図である。FIG. 18 is a diagram illustrating the configuration of the PLC according to the fifth embodiment.

以下に、本発明にかかるプログラマブルコントローラ(PLC)およびバス変換器の実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。   Embodiments of a programmable controller (PLC) and a bus converter according to the present invention will be described below in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.

実施の形態1.
図1は、本発明にかかる実施の形態1のPLCの構成を示す図である。
Embodiment 1 FIG.
FIG. 1 is a diagram showing the configuration of the PLC according to the first embodiment of the present invention.

図示するように、PLC100は、基本ベース1と、増設ベース2a、2bとが外部バス3で接続されて構成されている。基本ベース1は、CPUユニット13と、4つの補助ユニット12と、増設バスインタフェース(I/F)14と、を備えており、前記夫々の構成要素は内部バス11で夫々接続されている。 As shown in the figure, the PLC 100 is configured by connecting a basic base 1 and expansion bases 2 a and 2 b via an external bus 3. The basic base 1 includes a CPU unit 13, four auxiliary units 12, and an expansion bus interface (I / F) 14, and the respective constituent elements are connected by an internal bus 11.

増設ベース2aは、4つの補助ユニット22aとバス変換器23aとを備え、前記夫々の構成要素は内部バス21aで夫々接続されている。同様に、増設ベース2bは、4つの補助ユニット22bとバス変換器23bとを備え、前記夫々の構成要素は内部バス21bで夫々接続されている。   The extension base 2a includes four auxiliary units 22a and a bus converter 23a, and the respective components are connected by an internal bus 21a. Similarly, the extension base 2b includes four auxiliary units 22b and a bus converter 23b, and the respective components are connected to each other by an internal bus 21b.

なお、基本ベース1に接続される増設ベースの数は、1以上であればいくつであってもよい。また、ベース1、2a、2bの夫々が備える補助ユニット12、22a、22bの数は1以上であればいくつであっても構わない。なお、増設ベース2aおよび増設ベース2bは同様の構成となっているので、以降、増設ベースに関する説明を行うときは代表として増設ベース2aについてのみ説明する場合がある。   The number of extension bases connected to the basic base 1 may be any number as long as it is one or more. Further, the number of auxiliary units 12, 22a, and 22b included in each of the bases 1, 2a, and 2b may be any number as long as it is one or more. Since the extension base 2a and the extension base 2b have the same configuration, hereinafter, only the extension base 2a may be described as a representative when explaining the extension base.

増設バスI/F14は、内部バス11と外部バス3とを接続するためのインタフェースである。バス変換器23aは、外部バス3と内部バス21aとを接続するためのインタフェースである。   The expansion bus I / F 14 is an interface for connecting the internal bus 11 and the external bus 3. The bus converter 23a is an interface for connecting the external bus 3 and the internal bus 21a.

CPUユニット13は、PLC100が備える補助ユニット12、22a、22bとの間で制御データを送受信することによって補助ユニット12、22a、22bを制御する。具体的には、CPUユニット13は、内部バス11を介して補助ユニット12に要求を送信する。CPUユニット13から要求を受信した補助ユニット12は要求された動作を実行後、要求に対応する結果データ(応答)を内部バス11を介してCPUユニット13へ送信する。例えば、要求としては、補助ユニット12が温度制御ユニットである場合、被制御装置の温度を設定する要求がある。該要求を受信した温度制御ユニットは、目標温度を要求された温度に設定すると、設定完了を通知する旨の結果データを送信する。また、要求の別の例としては、補助ユニット12がアナログ入力ユニットである場合、入力値を読み出す要求がある。該要求を受信したアナログ入力ユニットは、入力値を読み出し、読み出した入力値を結果データとして送信する。同様に、CPUユニット13は、増設バスI/F14、外部バス3、バス変換器23a、および内部バス21aを介して補助ユニット22aに要求を送信する。補助ユニット22aは、要求に対応する結果データをCPUユニット13へ送信する。   The CPU unit 13 controls the auxiliary units 12, 22a and 22b by transmitting and receiving control data to and from the auxiliary units 12, 22a and 22b included in the PLC 100. Specifically, the CPU unit 13 transmits a request to the auxiliary unit 12 via the internal bus 11. The auxiliary unit 12 that has received the request from the CPU unit 13 performs the requested operation, and then transmits the result data (response) corresponding to the request to the CPU unit 13 via the internal bus 11. For example, as a request, when the auxiliary unit 12 is a temperature control unit, there is a request for setting the temperature of the controlled device. The temperature control unit that has received the request, when setting the target temperature to the requested temperature, transmits result data to notify the completion of the setting. As another example of the request, there is a request for reading an input value when the auxiliary unit 12 is an analog input unit. The analog input unit that has received the request reads the input value and transmits the read input value as result data. Similarly, the CPU unit 13 transmits a request to the auxiliary unit 22a via the expansion bus I / F 14, the external bus 3, the bus converter 23a, and the internal bus 21a. The auxiliary unit 22 a transmits result data corresponding to the request to the CPU unit 13.

内部バス11には、内部バス21aおよび内部バス21bよりも高速なものが採用されている。そして、外部バス3は、内部バス11と同じ速度でかつ同じ伝送方式を採用したものであるとする。   The internal bus 11 is faster than the internal bus 21a and the internal bus 21b. The external bus 3 is assumed to have the same speed as the internal bus 11 and the same transmission method.

ここで、要求と結果データとでトランザクションを構成するようにすると、内部バス21aの性能がボトルネックとなり、効率的な通信を行うことができないという問題が生じる。すなわち、CPUユニット13および補助ユニット12は、増設ベース2aより高速な動作が可能にも関わらず、増設ベース2aへのアクセスを行っている間、該アクセスが終わるまで待機を余儀なくされるのである。そこで、実施の形態1では、バス変換器23aが外部バス3を介して要求を受信完了した後、結果データの転送を待つことなく外部バス3を解放するようにした。これにより、CPUユニット13は結果データを受信するまで待つことなく次の通信を行うことができ、効率的な通信を行うことができる。   Here, if a transaction is constituted by the request and the result data, the performance of the internal bus 21a becomes a bottleneck, which causes a problem that efficient communication cannot be performed. That is, while the CPU unit 13 and the auxiliary unit 12 can operate at a higher speed than the expansion base 2a, the CPU unit 13 and the auxiliary unit 12 are forced to wait until the access is completed while accessing the expansion base 2a. Therefore, in the first embodiment, after the bus converter 23a has received the request via the external bus 3, the external bus 3 is released without waiting for the transfer of the result data. Thereby, the CPU unit 13 can perform the next communication without waiting until the result data is received, and can perform efficient communication.

具体的には、バス変換器23aは、要求を受信する毎にIDを発行し、発行したIDを返信する。そして、要求とIDとでトランザクションを構成する。ID発行はアクセス先の補助ユニット22aが結果データを送信するよりも高速に実行され、さらに、発行されたIDは低速な内部バス21aを介することなく伝送されるので、CPUユニット13は、結果データを受信するよりも早くIDを受信することができる。その結果、外部バス3の占有時間、言い換えるとCPUユニット13の待機時間が短縮される。   Specifically, the bus converter 23a issues an ID every time a request is received, and returns the issued ID. A transaction is composed of the request and the ID. The ID issuance is executed at a higher speed than the auxiliary unit 22a that is the access destination transmits the result data, and the issued ID is transmitted without passing through the low-speed internal bus 21a. ID can be received earlier than receiving. As a result, the occupation time of the external bus 3, in other words, the waiting time of the CPU unit 13 is shortened.

図2は、実施の形態1のバス変換器23aの構成を説明する図である。図示するように、バス変換器23aは、制御部24、第1バスI/F25、第2バスI/F26、バス変換部27、ID管理部28、およびバッファ29を備えている。   FIG. 2 is a diagram illustrating the configuration of the bus converter 23a according to the first embodiment. As illustrated, the bus converter 23 a includes a control unit 24, a first bus I / F 25, a second bus I / F 26, a bus conversion unit 27, an ID management unit 28, and a buffer 29.

第1バスI/F25は、外部バス3を介して基本ベース1と通信を行うためのインタフェースである。第2バスI/F26は、内部バス21aを介して補助ユニット22aと通信を行うためのインタフェースである。バス変換部27は、外部バス3と内部バス21aとの間の伝送方式の変換を行う。例えば、外部バス3をシリアル伝送方式、内部バス21aをパラレル伝送方式であるものとすると、バス変換部27は、内部バス21aから受信したパラレルデータをシリアルデータに変換して制御部24へ渡す。また、バス変換部27は、制御部24から受信したシリアルデータをパラレルデータに変換して第2バスI/F26へ渡す。   The first bus I / F 25 is an interface for communicating with the basic base 1 via the external bus 3. The second bus I / F 26 is an interface for communicating with the auxiliary unit 22a via the internal bus 21a. The bus conversion unit 27 converts the transmission method between the external bus 3 and the internal bus 21a. For example, assuming that the external bus 3 is a serial transmission method and the internal bus 21a is a parallel transmission method, the bus conversion unit 27 converts the parallel data received from the internal bus 21a into serial data and passes it to the control unit 24. In addition, the bus conversion unit 27 converts the serial data received from the control unit 24 into parallel data and passes it to the second bus I / F 26.

制御部24は、ID管理部28およびバッファ29を用いて、第1バスI/F25を介して受信する要求および第2バスI/F26およびバス変換部27を介して受信する結果データの転送を実行する。   The control unit 24 uses the ID management unit 28 and the buffer 29 to transfer a request received via the first bus I / F 25 and a result data received via the second bus I / F 26 and the bus conversion unit 27. Run.

ID管理部28は、バス変換器23aが受信した要求毎にIDを発行する。なお、IDは、CPUユニット13が発行済みの要求を互いに識別することが可能な識別子であるものとする。   The ID management unit 28 issues an ID for each request received by the bus converter 23a. The ID is an identifier that allows the CPU unit 13 to identify requests that have already been issued.

バッファ29には、要求格納領域29−1と結果格納領域29−2とが確保されている。要求格納領域29−1には外部バス3を介して受信した要求が、結果格納領域29−2には内部バス21aを介して受信した結果データが、夫々IDと対応付けられてFIFO方式に従って一時格納される。要求格納領域29−1に格納された要求は、順次補助ユニット22aへ送信され、結果格納領域29−2に格納された結果データは、制御部24によって順次CPUユニット13へ送信される。   In the buffer 29, a request storage area 29-1 and a result storage area 29-2 are secured. In the request storage area 29-1, a request received via the external bus 3 is stored, and in the result storage area 29-2, result data received via the internal bus 21a is temporarily associated with the ID according to the FIFO method. Stored. The requests stored in the request storage area 29-1 are sequentially transmitted to the auxiliary unit 22a, and the result data stored in the result storage area 29-2 are sequentially transmitted to the CPU unit 13 by the control unit 24.

次に、実施の形態1のPLC100の通信にかかる動作を説明する。図3は、CPUユニット13の外部バス3を介した通信にかかる動作を説明するフローチャートである。図示するように、CPUユニット13は、外部バス3を介してアクセス先の補助ユニット22(補助ユニット22a、補助ユニット22b)に要求を送信する(ステップS1)。アクセス先の補助ユニット22が備えるバス変換器23(バス変換器23a、バス変換器23b)からIDが返信され、CPUユニット13は、該IDを受信する(ステップS2)。そして、CPUユニット13は、結果データの受信を監視し(ステップS3)、結果データの受信がない場合(ステップS3、No)、ステップS1へ移行して別のアクセスにかかる補助ユニット22への要求を送信する。結果データの受信があった場合(ステップS3、Yes)、CPUユニット13は、受信した結果データに付加されたIDに基づいて送信済みの要求との対応付けを行い、結果データの処理を行う(ステップS4)。ステップS4の後、ステップS1へ移行して、CPUユニット13は、別のアクセスにかかる補助ユニット22への要求を送信する。 Next, the operation | movement concerning communication of PLC100 of Embodiment 1 is demonstrated. FIG. 3 is a flowchart for explaining the operation of the CPU unit 13 related to the communication via the external bus 3. As shown in the drawing, the CPU unit 13 transmits a request to the auxiliary unit 22 (auxiliary unit 22a, auxiliary unit 22b) to be accessed via the external bus 3 (step S1). Bus converter 23 to the access destination of the auxiliary unit 22 is provided (bus converter 23a, a bus converter 23 b) ID is sent back from, CPU unit 13 receives the ID (Step S2). Then, the CPU unit 13 monitors the reception of the result data (step S3). When the result data is not received (step S3, No), the CPU unit 13 proceeds to step S1 and requests to the auxiliary unit 22 for another access Send. When the result data is received (step S3, Yes), the CPU unit 13 associates the request with the transmitted request based on the ID added to the received result data, and processes the result data ( Step S4). After step S4, the process proceeds to step S1, and the CPU unit 13 transmits a request to the auxiliary unit 22 related to another access.

図4は、バス変換器23aによる転送動作を説明するフローチャートであり、図5は、前記転送動作のうちの要求を転送する動作を説明するブロック図であり、図6は、前記転送動作のうちの結果データを転送する動作を説明するブロック図である。   FIG. 4 is a flowchart for explaining the transfer operation by the bus converter 23a, FIG. 5 is a block diagram for explaining an operation of transferring a request among the transfer operations, and FIG. 6 is a diagram of the transfer operation. It is a block diagram explaining the operation | movement which transfers the result data.

まず、制御部24が外部バス3から受信する要求を認識すると(ステップS11)、制御部24はID管理部28にID発行を要求する(ステップS12)。そして、IDが発行されると、制御部24は、発行されたIDを外部バス3を介してCPUユニット13へ返信し(ステップS13)、制御部24は、受信した要求の内容をIDと対応づけて要求格納領域29−1に格納する(ステップS14)。なお、外部バス3から連続して要求を受信した場合、制御部24は、要求を受信する毎にステップS11〜ステップS14の動作を繰り返し、受信した要求を要求格納領域29−1に蓄積する。   First, when the control unit 24 recognizes a request received from the external bus 3 (step S11), the control unit 24 requests the ID management unit 28 to issue an ID (step S12). When the ID is issued, the control unit 24 returns the issued ID to the CPU unit 13 via the external bus 3 (step S13), and the control unit 24 corresponds the content of the received request to the ID. Then, it is stored in the request storage area 29-1 (step S14). When the requests are received continuously from the external bus 3, the control unit 24 repeats the operations in steps S11 to S14 every time a request is received, and accumulates the received requests in the request storage area 29-1.

続いて、制御部24は、要求格納領域29−1に格納されている要求を内部バス21aを介して補助ユニット22aへ送信する(ステップS15)。そして、制御部24は、補助ユニット22aから返ってくる結果データをIDと対応づけて結果格納領域29−2に格納する(ステップS16)。そして、制御部24は、結果格納領域29−2に格納されている結果データを対応するIDとともにCPUユニット13へ送信する結果データ転送処理を実行し(ステップS17)、転送動作を終了する。 Subsequently, the control unit 24 transmits the request stored in the request storage area 29-1 to the auxiliary unit 22a via the internal bus 21a (step S15). Then, the control unit 24 stores the result data returned from the auxiliary unit 22a in the result storage area 29-2 in association with the ID (step S16). And the control part 24 performs the result data transfer process which transmits the result data stored in the result storage area 29-2 to CPU unit 13 with corresponding ID (step S17), and complete | finishes transfer operation.

図7は、結果データ転送処理を詳しく説明するフローチャートである。なお、実施の形態1では、バス変換器23aは、外部バス3に対してCSMA/CD(Carrier Sense Multiple Access with Collision Detection)方式に基づいて結果データを送信するものとする。CSMA/CD方式はバス調停方式の中では比較的簡単に実装することができる。   FIG. 7 is a flowchart for explaining the result data transfer process in detail. In the first embodiment, it is assumed that the bus converter 23a transmits the result data to the external bus 3 based on the CSMA / CD (Carrier Sense Multiple Access with Collision Detection) method. The CSMA / CD method can be implemented relatively easily in the bus arbitration method.

図7に示すように、まず、制御部24は、外部バス3が空いているか否かを判断する(ステップS21)。外部バス3が空いていない場合とは、CPUユニット13が要求送信、ID受信、結果データ受信を実行中である場合を含む。外部バス3が空いていない場合(ステップS21、No)、ステップS21を繰り返すことによって外部バス3が空くまで待機する。外部バス3が空いている場合(ステップS21、Yes)、制御部24は、結果格納領域29−2に格納されている結果データを対応するIDとともにCPUユニット13へ送信開始する(ステップS22)。制御部24は、結果データの送信中も外部バス3が他のアクセスと衝突しているか否かを監視し(ステップS23)、アクセスの衝突を検知したとき(ステップS23、Yes)、ステップS21へ移行して衝突が解消するまで待機する。なお、制御部24は、アクセスの衝突により送信が中断された場合、衝突が解消すると(ステップS21、Yes)、1個の結果データの中断された部分からではなく、1個の結果データの最初から送信する。   As shown in FIG. 7, first, the control unit 24 determines whether or not the external bus 3 is free (step S21). The case where the external bus 3 is not free includes the case where the CPU unit 13 is executing request transmission, ID reception, and result data reception. If the external bus 3 is not free (No in step S21), the process waits until the external bus 3 is free by repeating step S21. When the external bus 3 is free (step S21, Yes), the control unit 24 starts transmitting the result data stored in the result storage area 29-2 to the CPU unit 13 together with the corresponding ID (step S22). The control unit 24 monitors whether or not the external bus 3 collides with another access during transmission of the result data (step S23), and when an access collision is detected (step S23, Yes), the process proceeds to step S21. Wait until the collision is resolved. Note that if the transmission is interrupted due to access collision and the collision is resolved (Yes in step S21), the control unit 24 does not start from the interrupted portion of one result data, but first of one result data. Send from.

外部バス3においてアクセスの衝突が検知されず(ステップS23、No)、1個の結果データを送信完了すると(ステップS24)、制御部24は、ステップS21へ移行して、結果格納領域29−2に格納されている次の結果データの送信のために外部バス3が空いているか否かを判断する。   When an access collision is not detected in the external bus 3 (No at Step S23), when transmission of one result data is completed (Step S24), the control unit 24 proceeds to Step S21 and results storage area 29-2 It is determined whether the external bus 3 is free for transmission of the next result data stored in.

このように、受信した結果データを結果格納領域29−2に一時格納しておき、CPUユニット13による外部バス3の使用を妨げないように、外部バス3が空いたときを見計らって結果格納領域29−2に一時格納されている結果データを順次送信する。   In this way, the received result data is temporarily stored in the result storage area 29-2, and the result storage area is estimated in case the external bus 3 is free so as not to prevent the CPU unit 13 from using the external bus 3. The result data temporarily stored in 29-2 is sequentially transmitted.

次に、このように動作を行うPLC100の効果を説明する。図8は、実施の形態1のPLC100の効果を説明するためのタイミングチャートである。図8において、上段から順番に、外部バス3、バス変換器23a、内部バス21a、バス変換器23b、内部バス21bの通信状態を示している。図示するように、基本ベース1と増設ベース2aとの間の要求の送信とIDの返信とが完了した後、外部バス3が解放され、基本ベース1の要求の送信と増設ベース2bのIDの返信とが実行されている。この間、外部バス3よりも低速な内部バス21aのアクセスが行われている。増設ベース2bからのIDを受信してから増設ベース2aからの結果データを受信するまでの間、さらに別のアクセスが可能となっている。このように、本実施の形態1によれば、要求とIDとがトランザクションを構成し、CPUユニット13は、低速なバスアクセスの完了まで待機することなく高速な外部バス3および内部バス11を利用して別のアクセスを実行することができる。   Next, the effect of the PLC 100 that operates in this way will be described. FIG. 8 is a timing chart for explaining the effect of the PLC 100 of the first embodiment. In FIG. 8, the communication states of the external bus 3, the bus converter 23a, the internal bus 21a, the bus converter 23b, and the internal bus 21b are shown in order from the top. As shown in the figure, after the transmission of the request between the basic base 1 and the expansion base 2a and the return of the ID are completed, the external bus 3 is released, and the transmission of the basic base 1 request and the ID of the expansion base 2b Reply and are executed. During this time, the internal bus 21a, which is slower than the external bus 3, is accessed. Further access is possible after receiving the ID from the extension base 2b until receiving the result data from the extension base 2a. As described above, according to the first embodiment, the request and the ID constitute a transaction, and the CPU unit 13 uses the high-speed external bus 3 and the internal bus 11 without waiting for the completion of the low-speed bus access. And another access can be performed.

以上説明したように、本発明の実施の形態1によれば、バス変換器23は、CPUユニット13が送信した補助ユニット22に対する要求を受信したとき、要求毎のIDを生成し、生成したIDをCPUユニット13に返信し、CPUユニットは、IDを受信すると、送信済みの要求に対応する補助ユニットからの結果データの受信を待つことなく内部バス11(または、内部バス11および外部バス3)を介した次の要求の送信を実行する、ように構成したので、速度が異なるバスを介して機能ユニット間で効率的な通信を行うことができるようになる。   As described above, according to the first embodiment of the present invention, when the bus converter 23 receives a request for the auxiliary unit 22 transmitted by the CPU unit 13, the bus converter 23 generates an ID for each request and generates the generated ID. When the CPU unit 13 receives the ID, the CPU unit 13 does not wait for reception of the result data from the auxiliary unit corresponding to the transmitted request, or the internal bus 11 (or the internal bus 11 and the external bus 3). Since the transmission of the next request is performed through the network, efficient communication can be performed between the functional units via the buses having different speeds.

また、バス変換器23は、補助ユニット22が送信した結果データを一時格納する結果格納領域29−2を備え、結果格納領域29−2に一時格納されている結果データをCPUユニット13へ送信するように構成したので、外部バス3が空くまで結果格納領域29−2に結果データを一時格納しておくことができるので、バス変換器23はCPUユニット13による外部バス3および内部バス11の使用を妨げることなく結果データを送信することができる。   The bus converter 23 includes a result storage area 29-2 for temporarily storing the result data transmitted from the auxiliary unit 22, and transmits the result data temporarily stored in the result storage area 29-2 to the CPU unit 13. Since the result data can be temporarily stored in the result storage area 29-2 until the external bus 3 becomes empty, the bus converter 23 uses the external bus 3 and the internal bus 11 by the CPU unit 13. The result data can be transmitted without disturbing.

また、バス変換器23は、結果格納領域29−2に一時格納されている結果データをCSMA/CD方式に基づいてCPUユニット13へ送信するように構成したので、バス変換器23はCPUユニット13による外部バス3および内部バス11の使用を妨げることなく結果データを送信することができる。また、CSMA/CD方式はバス調停方式の中でも比較的実装が容易な方式であるので、簡単な構成で外部バス3および内部バス11のバス調停を行うことができる。   In addition, the bus converter 23 is configured to transmit the result data temporarily stored in the result storage area 29-2 to the CPU unit 13 based on the CSMA / CD method. The result data can be transmitted without hindering the use of the external bus 3 and the internal bus 11. Further, since the CSMA / CD method is a method that is relatively easy to implement among the bus arbitration methods, the bus arbitration of the external bus 3 and the internal bus 11 can be performed with a simple configuration.

実施の形態2.
実施の形態1では、バス変換器はCSMA/CD方式に基づいて結果データの転送タイミング調整を行った。実施の形態2では、外部バスおよび基本ベース内の内部バスのバス調停を行うアービタ(バス調停部)を備える。
Embodiment 2. FIG.
In the first embodiment, the bus converter adjusts the transfer timing of the result data based on the CSMA / CD method. In the second embodiment, an arbiter (bus arbitration unit) that performs bus arbitration for the external bus and the internal bus in the basic base is provided.

図9は、本発明にかかる実施の形態2のPLCの構成を示す図である。図示するように、PLC200は、基本ベース1と増設ベース2aおよび2bとが外部バス3で接続されて構成されている。基本ベース1は、補助ユニット12、CPUユニット13、増設バスI/F14のほか、外部バス3のバス調停を行うアービタ41を備えている。補助ユニット12、CPUユニット13、増設バスI/F14、およびアービタ41は内部バス11で互いに接続されている。   FIG. 9 is a diagram showing a configuration of the PLC according to the second embodiment of the present invention. As shown in the figure, the PLC 200 is configured by connecting a basic base 1 and additional bases 2 a and 2 b via an external bus 3. The basic base 1 includes an auxiliary unit 12, a CPU unit 13, an expansion bus I / F 14, and an arbiter 41 that performs bus arbitration for the external bus 3. The auxiliary unit 12, the CPU unit 13, the extension bus I / F 14, and the arbiter 41 are connected to each other via the internal bus 11.

一方、増設ベース2aは、補助ユニット22aとバス変換器42aとを備えている。また、増設ベース2bは、補助ユニット22bとバス変換器42bとを備えている。   On the other hand, the extension base 2a includes an auxiliary unit 22a and a bus converter 42a. The extension base 2b includes an auxiliary unit 22b and a bus converter 42b.

増設ベース2aが備えるバス変換器42aは、REQUEST信号およびGRANT信号でアービタ41と接続されている。バス変換器42aは、REQUEST信号をアービタ41に出力してバス使用権を要求する。アービタ41は、バス調停の結果、バス使用権をバス変換器42aに与える場合、バス変換器42aに対してGRANT信号を出力する。   The bus converter 42a included in the extension base 2a is connected to the arbiter 41 by a REQUEST signal and a GRANT signal. The bus converter 42a outputs a REQUEST signal to the arbiter 41 to request a bus use right. The arbiter 41 outputs a GRANT signal to the bus converter 42a when giving the bus use right to the bus converter 42a as a result of the bus arbitration.

同様に、増設ベース2bが備えるバス変換器42bは、REQUEST信号およびGRANT信号でアービタ41と接続されている。バス変換器42bは、REQUEST信号をアービタ41に出力してバス使用権を要求する。アービタ41は、バス調停の結果、バス使用権をバス変換器42bに与える場合、バス変換器42bに対してGRANT信号を出力する。   Similarly, the bus converter 42b included in the extension base 2b is connected to the arbiter 41 by a REQUEST signal and a GRANT signal. The bus converter 42b outputs a REQUEST signal to the arbiter 41 to request a bus use right. When the arbiter 41 gives the bus use right to the bus converter 42b as a result of the bus arbitration, the arbiter 41 outputs a GRANT signal to the bus converter 42b.

以降、増設ベースに関し、代表として増設ベース2aについてのみ説明する。   Hereinafter, only the expansion base 2a will be described as a representative regarding the expansion base.

図10は、実施の形態2のバス変換器42aの構成を説明する図である。図示するように、バス変換器42aは、制御部43、第1バスI/F25、第2バスI/F26、バス変換部27、ID管理部28、およびバッファ29を備えている。図示するように、制御部43は、REQUEST信号およびGRANT信号が接続されており、結果データをCPUユニット13に送信する場合、REQUEST信号およびGRANT信号を用いてバス使用権を確保した後、前記結果データを送信開始する。その他の実施の形態1と同名でかつ同一の符号を付した構成要素は、実施の形態1と同様の動作を行うので、ここでは詳細な説明を省略する。   FIG. 10 is a diagram illustrating the configuration of the bus converter 42a according to the second embodiment. As illustrated, the bus converter 42 a includes a control unit 43, a first bus I / F 25, a second bus I / F 26, a bus conversion unit 27, an ID management unit 28, and a buffer 29. As shown in the figure, when the REQUEST signal and the GRANT signal are connected to the control unit 43 and the result data is transmitted to the CPU unit 13, the result is obtained after securing the bus use right using the REQUEST signal and the GRANT signal. Start sending data. The other components having the same names and the same reference numerals as those of the first embodiment perform the same operations as those of the first embodiment, and thus detailed description thereof is omitted here.

図11は、実施の形態2のバス変換器42aによる結果データ転送処理を説明するフローチャートである。図示するように、制御部43は、まず、REQUEST信号を出力する(ステップS31)。そして、制御部43は、アービタ41からのGRANT信号を受信したか否かを判定する(ステップS32)。GRANT信号の出力がない場合(ステップS32、No)、制御部43は、ステップS32の判定を繰り返す。   FIG. 11 is a flowchart for explaining result data transfer processing by the bus converter 42a of the second embodiment. As illustrated, the control unit 43 first outputs a REQUEST signal (step S31). And the control part 43 determines whether the GRANT signal from the arbiter 41 was received (step S32). When there is no GRANT signal output (step S32, No), the control unit 43 repeats the determination of step S32.

GRANT信号を受信すると(ステップS32、Yes)、結果データを対応するIDとともにCPUユニット13へ送信し(ステップS33)、ステップS31へ移行して次の結果データの送信のためのREQUEST信号を出力する。   When the GRANT signal is received (step S32, Yes), the result data is transmitted to the CPU unit 13 together with the corresponding ID (step S33), and the process proceeds to step S31 to output a REQUEST signal for transmission of the next result data. .

以上述べたように、本発明の実施の形態2によれば、バス変換器23は、アービタ41にREQUEST信号を出力し、アービタ41がGRANT信号を出力した後、結果データをCPUユニット13へ送信するように構成したので、実施の形態1とは異なるバス調停方式でバス変換器23はCPUユニット13による外部バス3および内部バス11の使用を妨げることなく結果データを送信することができる。   As described above, according to the second embodiment of the present invention, the bus converter 23 outputs the REQUEST signal to the arbiter 41, and after the arbiter 41 outputs the GRANT signal, the result data is transmitted to the CPU unit 13. Thus, the bus converter 23 can transmit the result data without interfering with the use of the external bus 3 and the internal bus 11 by the CPU unit 13 by a bus arbitration method different from that of the first embodiment.

実施の形態3.
実施の形態1および実施の形態2では、バス変換器は外部バス3に対してバスマスタとして動作する。実施の形態3では、外部バス3に対してバススレーブとして動作する場合の構成例を説明する。
Embodiment 3 FIG.
In the first embodiment and the second embodiment, the bus converter operates as a bus master for the external bus 3. In the third embodiment, a configuration example in the case where the external bus 3 operates as a bus slave will be described.

図12は、実施の形態3のPLCの構成を示す図である。図示するように、PLC300は、基本ベース1と増設ベース2aおよび2bとが外部バス3で接続されて構成されている。基本ベース1は、補助ユニット12、CPUユニット51および増設バスI/F14を備えている。補助ユニット12、CPUユニット51、および増設バスI/F14は内部バス11で互いに接続されている。   FIG. 12 is a diagram illustrating a configuration of the PLC according to the third embodiment. As shown in the figure, the PLC 300 is configured by connecting a basic base 1 and additional bases 2 a and 2 b via an external bus 3. The basic base 1 includes an auxiliary unit 12, a CPU unit 51, and an expansion bus I / F 14. The auxiliary unit 12, the CPU unit 51, and the expansion bus I / F 14 are connected to each other via the internal bus 11.

一方、増設ベース2aは、補助ユニット22aとバス変換器52aとを備えている。また、増設ベース2bは、補助ユニット22bとバス変換器52bとを備えている。以降、増設ベースに関し、代表として増設ベース2aについてのみ説明する。   On the other hand, the extension base 2a includes an auxiliary unit 22a and a bus converter 52a. The extension base 2b includes an auxiliary unit 22b and a bus converter 52b. Hereinafter, only the expansion base 2a will be described as a representative regarding the expansion base.

CPUユニット51は、要求を発行し、該要求に対応するIDを受信した後、所望のタイミングで要求発行先の増設ベースが備えるバス変換器52(バス変換器52aまたはバス変換器52b)に結果データ確認を送信することによって対象のバス変換器52から結果データを読み出す。なお、結果データ確認は、読み出し対象の結果データのIDを付加したものとする。   After issuing the request and receiving the ID corresponding to the request, the CPU unit 51 sends the result to the bus converter 52 (the bus converter 52a or the bus converter 52b) provided in the request issue destination extension base at a desired timing. The result data is read from the target bus converter 52 by sending a data confirmation. In the result data confirmation, it is assumed that the ID of the result data to be read is added.

図13は、実施の形態3のバス変換器52aの構成を説明する図である。図示するように、バス変換器52aは、制御部53、第1バスI/F25、第2バスI/F26、バス変換部27、ID管理部28、およびバッファ54を備えている。バッファ54には、要求格納領域29−1および結果格納領域54−2が確保されている。制御部53は、CPUユニット51から結果データ確認を受信すると、付加されているIDに対応する結果データを結果格納領域54−2から読み出して、読み出した結果データをIDとともにCPUユニット51へ送信する。なお、実施の形態1および実施の形態2では結果格納領域29−2はFIFOの方式に従って結果データを格納するものとしているが、本実施の形態3の結果格納領域54−2は、FIFO方式に基づいて読み出しが行われるのではなく、所望のデータを読み出すことができるようになっている。   FIG. 13 is a diagram illustrating the configuration of the bus converter 52a according to the third embodiment. As illustrated, the bus converter 52a includes a control unit 53, a first bus I / F 25, a second bus I / F 26, a bus conversion unit 27, an ID management unit 28, and a buffer 54. In the buffer 54, a request storage area 29-1 and a result storage area 54-2 are secured. When receiving the result data confirmation from the CPU unit 51, the control unit 53 reads the result data corresponding to the added ID from the result storage area 54-2, and transmits the read result data to the CPU unit 51 together with the ID. . In the first and second embodiments, the result storage area 29-2 stores the result data in accordance with the FIFO method. However, the result storage area 54-2 of the third embodiment uses the FIFO method. The desired data can be read instead of being read based on this.

図14は、CPUユニット51の外部バス3を介した通信にかかる動作を説明するフローチャートである。図示するように、CPUユニット51は、外部バス3を介してアクセス先の補助ユニット22(補助ユニット22aあるいは補助ユニット22b)に要求を送信する(ステップS41)。アクセス先の補助ユニット22が備えるバス変換器52からIDが返信され、CPUユニット51は、該IDを受信する(ステップS42)。その後、CPUユニット51は、結果データ確認を送信する(ステップS43)。そして、CPUユニット51は該結果データを受信し、受信した結果データをデータ処理する(ステップS44)。ステップS44の後、CPUユニット51は、ステップS41へ移行して次のアクセスを行う。なお、CPUユニット51は、ステップS41およびステップS42の動作を複数アクセスにかかる分だけ続けて実行し、ステップS43およびステップS44の動作を前記ステップS41およびステップS42の繰り返し動作を終了した後で実行することも可能である。   FIG. 14 is a flowchart illustrating an operation related to communication via the external bus 3 of the CPU unit 51. As shown in the figure, the CPU unit 51 transmits a request to the access destination auxiliary unit 22 (auxiliary unit 22a or auxiliary unit 22b) via the external bus 3 (step S41). An ID is returned from the bus converter 52 provided in the auxiliary unit 22 to be accessed, and the CPU unit 51 receives the ID (step S42). Thereafter, the CPU unit 51 transmits a result data confirmation (step S43). The CPU unit 51 receives the result data and processes the received result data (step S44). After step S44, the CPU unit 51 proceeds to step S41 and performs the next access. Note that the CPU unit 51 continuously executes the operations of step S41 and step S42 for the number of accesses, and executes the operations of step S43 and step S44 after completing the repeated operations of step S41 and step S42. It is also possible.

図15は、結果データ転送処理を説明するフローチャートである。図示するように、制御部53は、結果データ確認を受信すると(ステップS51)、結果格納領域54−2から対応する結果データを読み出して、読み出した結果データをIDとともにCPUユニット51へ送信する(ステップS52)。そして、CPUユニット51は、新たな結果データ確認の受信を待ちうけ、ステップS51へ移行する。   FIG. 15 is a flowchart for explaining the result data transfer process. As shown in the figure, when receiving the result data confirmation (Step S51), the control unit 53 reads the corresponding result data from the result storage area 54-2, and transmits the read result data to the CPU unit 51 together with the ID ( Step S52). Then, the CPU unit 51 waits for reception of new result data confirmation, and proceeds to step S51.

以上述べたように、本発明の実施の形態3によれば、CPUユニット51は、結果格納領域54−2に一時格納されている結果データを任意のタイミングで読み出すように構成したので、バス変換器52をバススレーブとして動作するように構成することも可能となる。   As described above, according to the third embodiment of the present invention, the CPU unit 51 is configured to read the result data temporarily stored in the result storage area 54-2 at an arbitrary timing. It is also possible to configure the device 52 to operate as a bus slave.

実施の形態4.
実施の形態1〜3の外部バス3は、増設ベース間でデイジーチェーン状に接続できるように構成するようにしてもよい。実施の形態4では、一例として実施の形態1の外部バス3をデイジーチェーン状に接続できるようにした構成について説明する。
Embodiment 4 FIG.
The external bus 3 according to the first to third embodiments may be configured so that it can be connected in a daisy chain between expansion bases. In the fourth embodiment, a configuration in which the external bus 3 of the first embodiment can be connected in a daisy chain as an example will be described.

図16は、ベース間の接続とバス変換器23が備える第1バスI/F25の構成とを説明する図である。図示するように、実施の形態4のPLC400は、基本ベース1と増設ベース2aとが増設バスI/F14およびバス変換器23aが備える第1バスI/F25を介して一対一で外部バス3で接続され、増設ベース2aと増設ベース2bとがバス変換器23aが備える第1バスI/F25およびバス変換器23bが備える第1バスI/F25を介して一対一で外部バス3で接続されている。すなわち、増設ベース2a、2bは基本ベース1にデイジーチェーン状に接続されている。   FIG. 16 is a diagram for explaining the connection between the bases and the configuration of the first bus I / F 25 provided in the bus converter 23. As shown in the figure, in the PLC 400 of the fourth embodiment, the basic base 1 and the extension base 2a are one-to-one via the external bus 3 via the first bus I / F 25 provided in the extension bus I / F 14 and the bus converter 23a. The extension base 2a and the extension base 2b are connected by the external bus 3 on a one-to-one basis via the first bus I / F 25 provided in the bus converter 23a and the first bus I / F 25 provided in the bus converter 23b. Yes. That is, the expansion bases 2a and 2b are connected to the basic base 1 in a daisy chain shape.

さらに、各増設ベースが備える第1バスI/F25は、要求転送部61をさらに備えている。要求転送部61は、外部バス3を介して受信した要求の送信先が自増設ベース2に内部バス21を介して接続されている補助ユニット22であるか否かに基づいて、後段の増設ベースに転送するか否かを決定する。   Further, the first bus I / F 25 provided in each extension base further includes a request transfer unit 61. The request transfer unit 61 determines whether or not the transmission destination of the request received via the external bus 3 is the auxiliary unit 22 connected to the own expansion base 2 via the internal bus 21. Decide whether to forward to.

一般に、CPUユニット13は、PLC400の立ち上げ時などにおいて、接続されている増設ベース2の接続関係を検出し、増設ベース2毎に固有の識別番号をCPUユニット13内の管理テーブルに登録する。増設ベース2毎の識別番号は、例えば増設ベース2に備えられる設定ピンなどにより与えられる。CPUユニット13は、外部バス3を介して要求を送信するとき、該要求にアクセス先の補助ユニット22が属する増設ベース2の識別番号を付す。要求転送部61は、自増設ベース2の識別番号と受信した要求に付された識別番号とを比較することによって、自増設ベース2に接続されている補助ユニット22がアクセス対象であるか否かを判定する。   In general, the CPU unit 13 detects the connection relationship of the connected extension bases 2 when the PLC 400 is started up and registers a unique identification number for each extension base 2 in the management table in the CPU unit 13. The identification number for each extension base 2 is given by, for example, a setting pin provided in the extension base 2. When the CPU unit 13 transmits a request via the external bus 3, the CPU unit 13 attaches the identification number of the extension base 2 to which the auxiliary unit 22 to be accessed belongs to the request. The request transfer unit 61 compares the identification number of the own extension base 2 with the identification number attached to the received request to determine whether or not the auxiliary unit 22 connected to the own extension base 2 is an access target. Determine.

なお、後段の増設ベースとは、増設ベース2が複数接続されている場合において、自増設ベース2に接続され、基本ベース1から遠い側に接続されている増設ベース2を指す。例えば増設ベース2aを基準とすると、増設ベース2bが増設ベース2aに接続され、基本ベース1よりも遠い側に接続されているので、増設ベース2bが後段の増設ベースということになる。   The extension base at the rear stage refers to the extension base 2 connected to the base extension base 2 and connected to the side far from the base base 1 when a plurality of extension bases 2 are connected. For example, when the extension base 2a is used as a reference, the extension base 2b is connected to the extension base 2a and is connected to the side farther than the basic base 1, so that the extension base 2b is the subsequent extension base.

図17は、第1バスI/F25の要求受信時の動作を説明するフローチャートである。図示するように、まず、第1バスI/F25は、要求を受信すると(ステップS61)、要求転送部61は、自増設ベース2(より正確には自増設ベース2に内部バス21を介して接続されている補助ユニット22)がアクセス対象であるか否かを判定する(ステップS62)。自増設ベース2がアクセス対象であった場合(ステップS62、Yes)、要求転送部61は、制御部24へ受信した要求を送信し(ステップS63)、要求受信時の動作が終了となる。自増設ベース2がアクセス対象ではなかった場合(ステップS62、No)、要求転送部61は、後段の増設ベース2へ受信した要求を転送し(ステップS64)、要求受信時の動作を終了する。   FIG. 17 is a flowchart for explaining the operation at the time of request reception of the first bus I / F 25. As shown in the figure, first, when the first bus I / F 25 receives a request (step S61), the request transfer unit 61 sends the own extension base 2 (more precisely, the own extension base 2 via the internal bus 21). It is determined whether or not the connected auxiliary unit 22) is an access target (step S62). When the own extension base 2 is an access target (step S62, Yes), the request transfer unit 61 transmits the received request to the control unit 24 (step S63), and the operation at the time of receiving the request ends. When the own extension base 2 is not an access target (No at Step S62), the request transfer unit 61 transfers the received request to the subsequent extension base 2 (Step S64), and ends the operation when the request is received.

以上述べたように、本発明の実施の形態4によれば、バス変換器23は外部バス3でデイジーチェーン状に接続され、バス変換器23の夫々は、CPUユニット13から要求を受信したとき、受信した要求の送信先が自バス変換器23に内部バス21を介して接続されている補助ユニット22でない場合、受信した要求を後段のバス変換器23に転送し、受信した要求の送信先が自バス変換器23に内部バス21を介して接続されている補助ユニット22である場合、受信した要求を後段のバス変換器23に転送しない、ように構成したので、要求の不要な転送を防止するとともに、後段のバス変換器23に不要な動作を実行させることを防止することができるようになる。   As described above, according to the fourth embodiment of the present invention, the bus converters 23 are connected in a daisy chain by the external bus 3, and each of the bus converters 23 receives a request from the CPU unit 13. If the transmission destination of the received request is not the auxiliary unit 22 connected to the own bus converter 23 via the internal bus 21, the received request is transferred to the subsequent bus converter 23, and the transmission destination of the received request Is an auxiliary unit 22 connected to the own bus converter 23 via the internal bus 21, the received request is not transferred to the subsequent bus converter 23. In addition to preventing this, it is possible to prevent the subsequent bus converter 23 from performing unnecessary operations.

実施の形態5.
実施の形態1〜4の説明においては、バス変換器は増設ベースに備えられるものとして説明したが、バス変換器と増設ベースとを別々のユニットとして構成することも可能である。
Embodiment 5 FIG.
In the description of the first to fourth embodiments, the bus converter has been described as being provided in the extension base. However, the bus converter and the extension base may be configured as separate units.

図18は、実施の形態5のPLCの構成を説明する図である。図示するように、PLC500は、基本ベース1、複数の増設ベース4(ここでは増設ベース4a、増設ベース4b)、およびバス変換器71を備えて構成されている。バス変換器71は基本ベース1と外部バス3で接続されている。また、バス変換器71は、増設ベース4aおよび増設ベース4bと外部バス5で接続されている。   FIG. 18 is a diagram illustrating the configuration of the PLC according to the fifth embodiment. As shown in the figure, the PLC 500 includes a basic base 1, a plurality of extension bases 4 (here, an extension base 4 a and an extension base 4 b), and a bus converter 71. The bus converter 71 is connected to the basic base 1 and the external bus 3. The bus converter 71 is connected to the extension base 4 a and the extension base 4 b by the external bus 5.

増設ベース4aは、複数の補助ユニット22aが接続される内部バス21aと、内部バス21aと外部バス5とを接続するための増設バスI/F72aを備えている。同様に、増設ベース4bは、複数の補助ユニット22bが接続される内部バス21bと、内部バス21bと外部バス5とを接続するための増設バスI/F72bを備えている。外部バス5は、外部バス3よりもバス速度が低速なものとなっており、例えば内部バス21aや内部バス21bと同一のバス速度、伝送方式のものが採用されている。バス変換器71は、外部バス3と外部バス5とを接続し、基本ベース1に装着されているCPUユニット13と増設ベース4(増設ベース4a、増設ベース4b)に装着されている補助ユニット22(補助ユニット22a、補助ユニット22b)との間のデータの転送を実行する。   The expansion base 4a includes an internal bus 21a to which a plurality of auxiliary units 22a are connected, and an expansion bus I / F 72a for connecting the internal bus 21a and the external bus 5. Similarly, the expansion base 4b includes an internal bus 21b to which a plurality of auxiliary units 22b are connected, and an expansion bus I / F 72b for connecting the internal bus 21b and the external bus 5. The external bus 5 has a lower bus speed than the external bus 3, and for example, the same bus speed and transmission method as the internal bus 21a and the internal bus 21b are adopted. The bus converter 71 connects the external bus 3 and the external bus 5, and connects the CPU unit 13 mounted on the basic base 1 and the auxiliary unit 22 mounted on the expansion base 4 (extension base 4a, expansion base 4b). Data transfer to (auxiliary unit 22a, auxiliary unit 22b) is executed.

なお、バス変換器71には、実施の形態1〜4に説明した何れの構成を採用することもできる。外部バス5は第2バスI/F26に接続される。   The bus converter 71 may employ any of the configurations described in the first to fourth embodiments. The external bus 5 is connected to the second bus I / F 26.

このように、バス変換器と増設ベースとを別々のユニットとして構成することができる。バス変換器と増設ベースとを別々のユニットとして構成すると、ユーザは、バス速度が高速な基本ベース1や外部バス3を導入した後であっても、増設ベース4a、増設ベース4b、および外部バス5として、ユーザが既に所有しているハードウェア資産を活用することができるようになるため、ユーザにっての利便性が向上する。 Thus, the bus converter and the extension base can be configured as separate units. When the bus converter and the extension base are configured as separate units, the user can install the extension base 4a, the extension base 4b, and the external bus even after installing the basic base 1 or the external bus 3 with a high bus speed. as 5, since it is possible to utilize hardware asset that the user already has, convenience is improved I bets the user.

なお、実施の形態1〜5においては、CPUユニットが要求の送信元であるものとして説明したが、基本ベース1が備える補助ユニット12としてモーションCPUユニットを含む場合、該モーションCPUユニットも要求の送信元となるように構成するようにしてもよい。   In the first to fifth embodiments, the CPU unit is described as a request transmission source. However, when a motion CPU unit is included as the auxiliary unit 12 included in the basic base 1, the motion CPU unit also transmits a request. You may make it comprise so that it may become the origin.

以上のように、本発明にかかるプログラマブルコントローラおよびバス変換器は、産業用機器などの被制御装置を制御するプログラマブルコントローラおよびバス変換器に適用して好適である。   As described above, the programmable controller and the bus converter according to the present invention are suitable for application to a programmable controller and a bus converter that control a controlled device such as an industrial device.

1 基本ベース、2,2a,2b,4,4a,4b 増設ベース、3 外部バス、5 外部バス、11 内部バス、12,22,22a,22b 補助ユニット、13,51 CPUユニット、21,21a,21b 内部バス、23,23a,23b,42a,42b,52,52a,52b,71 バス変換器、24,43,53 制御部、25 第1バスI/F、26 第2バスI/F、27 バス変換部、28 ID管理部、29,54 バッファ、29−1 要求格納領域、29−2,54−2 結果格納領域、41 アービタ、61 要求転送部、71 バス変換器。 1 Basic base , 2, 2a, 2b, 4, 4a, 4b Extension base, 3 External bus, 5 External bus, 11 Internal bus, 12, 22, 22a, 22b Auxiliary unit, 13, 51 CPU unit, 21, 21a, 21b Internal bus, 23, 23a, 23b, 42a, 42b, 52, 52a, 52b, 71 Bus converter, 24, 43, 53 Control unit, 25 First bus I / F, 26 Second bus I / F, 27 Bus conversion unit, 28 ID management unit, 29, 54 buffer, 29-1 request storage area, 29-2, 54-2 result storage area, 41 arbiter, 61 request transfer unit, 71 bus converter.

Claims (8)

CPUユニットと、
前記CPUユニットにより制御される補助ユニットと、
第1のバスを備え、前記第1のバスに前記補助ユニットが装着される第1のベースユニットと、
前記第1のバスよりも高速な第2のバスを備え、前記第2のバスは内部バスおよび外部バスを備え、前記内部バスに前記CPUユニットが装着される第2のベースユニットと、
前記第1のバスと前記外部バスとに接続され、前記CPUユニットと前記補助ユニットとの間で送受信される制御データの転送を行うバス変換器と
を備え、
前記バス変換器は、前記CPUユニットが送信した前記補助ユニットに対する要求を受信したとき、要求毎のIDを生成して前記生成したIDを前記CPUユニットに返信し、
前記CPUユニットは、前記IDを受信すると、前記送信済みの要求に対応する前記補助ユニットからの応答の受信を待つことなく前記第2のバスを介した次の要求の送信を実行する、
ことを特徴とするプログラマブルコントローラ。
A CPU unit;
An auxiliary unit controlled by the CPU unit;
A first base unit comprising a first bus, the auxiliary unit being mounted on the first bus;
A second base unit that includes a second bus that is faster than the first bus, the second bus includes an internal bus and an external bus, and the CPU unit is mounted on the internal bus;
A bus converter connected to the first bus and the external bus for transferring control data transmitted and received between the CPU unit and the auxiliary unit;
When the bus converter receives a request for the auxiliary unit transmitted by the CPU unit, it generates an ID for each request and returns the generated ID to the CPU unit.
When the CPU unit receives the ID, it executes transmission of the next request via the second bus without waiting for reception of a response from the auxiliary unit corresponding to the transmitted request.
A programmable controller characterized by that.
前記バス変換器は、前記補助ユニットが前記CPUユニットに対して送信した応答を受信すると、前記受信した応答を前記受信した応答に対応する要求のIDとともに前記CPUユニットに転送し、
前記CPUユニットは、前記補助ユニットが送信した応答を受信すると、前記応答とともに受信したIDに基づいて前記送信済みの要求との対応付けを行う、
ことを特徴とする請求項1に記載のプログラマブルコントローラ。
When the bus converter receives a response transmitted from the auxiliary unit to the CPU unit, the bus converter transfers the received response to the CPU unit together with an ID of a request corresponding to the received response.
When the CPU unit receives the response transmitted by the auxiliary unit, the CPU unit associates the request with the transmitted request based on the ID received together with the response.
The programmable controller according to claim 1.
前記バス変換器は、前記補助ユニットが送信した応答を一時格納する応答格納領域を備え、前記応答格納領域に一時格納されている応答を前記CPUユニットへ送信する、
ことを特徴とする請求項2に記載のプログラマブルコントローラ。
The bus converter includes a response storage area for temporarily storing the response transmitted by the auxiliary unit, and transmits the response temporarily stored in the response storage area to the CPU unit.
The programmable controller according to claim 2.
前記バス変換器は、前記応答格納領域に一時格納されている応答をCSMA/CD方式に基づいて前記CPUユニットへ送信する、
ことを特徴とする請求項3に記載のプログラマブルコントローラ。
The bus converter transmits a response temporarily stored in the response storage area to the CPU unit based on the CSMA / CD method.
The programmable controller according to claim 3.
前記第2のバスをバス調停するバス調停部をさらに備え、
前記バス変換器は、前記バス調停部にアクセス許可を要求し、前記アクセス許可を取得した後、前記応答格納領域に一時格納されている応答を前記CPUユニットへ送信する、
ことを特徴とする請求項3に記載のプログラマブルコントローラ。
A bus arbitration unit for arbitrating the second bus;
The bus converter requests access permission from the bus arbitration unit, and after obtaining the access permission, transmits a response temporarily stored in the response storage area to the CPU unit.
The programmable controller according to claim 3.
前記バス変換器は、前記補助ユニットが送信した応答を一時格納する応答格納領域を備え、
前記CPUユニットは、前記応答格納領域に一時格納されている応答を任意のタイミングで読み出す、
ことを特徴とする請求項1に記載のプログラマブルコントローラ。
The bus converter includes a response storage area for temporarily storing a response transmitted by the auxiliary unit,
The CPU unit reads a response temporarily stored in the response storage area at an arbitrary timing.
The programmable controller according to claim 1.
前記バス変換器を複数備えるとともに、前記複数のバス変換器は前記外部バスでデイジーチェーン状に接続され、
前記夫々のバス変換器は、前記CPUユニットから前記外部バスを介して要求を受信したとき、前記受信した要求の送信先が自バス変換器に前記第1のバスを介して接続されている補助ユニットでない場合、前記受信した要求を後段のバス変換器に転送し、前記受信した要求の送信先が自バス変換器に前記第1のバスを介して接続されている補助ユニットである場合、前記受信した要求を前記後段のバス変換器に転送しない、
ことを特徴とする請求項1〜6のいずれか1つに記載のプログラマブルコントローラ。
A plurality of the bus converters, and the plurality of bus converters are connected in a daisy chain with the external bus,
When each of the bus converters receives a request from the CPU unit via the external bus, the transmission destination of the received request is connected to the own bus converter via the first bus. If it is not a unit, the received request is transferred to a subsequent bus converter, and when the destination of the received request is an auxiliary unit connected to the own bus converter via the first bus, Do not forward the received request to the subsequent bus converter,
The programmable controller according to any one of claims 1 to 6.
第1のバスを備え、前記第1のバスに補助ユニットが装着される第1のベースユニットの前記第1のバスと、前記第1のバスよりも高速な第2のバスを備え、前記第2のバスは内部バスおよび外部バスを備え、前記内部バスに前記補助ユニットを制御するCPUユニットが装着される第2のベースユニットの前記外部バスと、に接続され、前記CPUユニットと前記補助ユニットとの間で送受信される制御データの転送を行うバス変換器であって、
前記CPUユニットが送信した前記補助ユニットに対する要求を受信したとき、前記CPUユニットが送信した要求毎のIDを生成して前記生成したIDを前記CPUユニットに返信し、前記CPUユニットに、前記IDを受信後、前記送信済みの要求に対応する前記補助ユニットからの応答の受信を待つことなく前記第2のバスを介した次の要求の送信を実行することを可能とする、
ことを特徴とするバス変換器。
Comprising a first bus, comprising: a first bus of a first base unit the auxiliary unit is mounted to said first bus, said first high speed second bus than the bus, the second The second bus includes an internal bus and an external bus, and is connected to the external bus of the second base unit to which the CPU unit for controlling the auxiliary unit is mounted. The CPU unit and the auxiliary unit A bus converter that transfers control data sent to and received from
When a request for the auxiliary unit transmitted by the CPU unit is received, an ID for each request transmitted by the CPU unit is generated and the generated ID is returned to the CPU unit, and the ID is transmitted to the CPU unit. After receiving, it is possible to execute transmission of the next request through the second bus without waiting for reception of a response from the auxiliary unit corresponding to the transmitted request.
A bus converter characterized by that.
JP2010166405A 2010-07-23 2010-07-23 Programmable controller and bus converter Active JP5473817B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2010166405A JP5473817B2 (en) 2010-07-23 2010-07-23 Programmable controller and bus converter
CN201110070251.3A CN102346454B (en) 2010-07-23 2011-03-18 Programmable controller and bus converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010166405A JP5473817B2 (en) 2010-07-23 2010-07-23 Programmable controller and bus converter

Publications (2)

Publication Number Publication Date
JP2012027728A JP2012027728A (en) 2012-02-09
JP5473817B2 true JP5473817B2 (en) 2014-04-16

Family

ID=45545209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010166405A Active JP5473817B2 (en) 2010-07-23 2010-07-23 Programmable controller and bus converter

Country Status (2)

Country Link
JP (1) JP5473817B2 (en)
CN (1) CN102346454B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6803262B2 (en) * 2017-02-27 2020-12-23 川崎重工業株式会社 Control device
JP7036069B2 (en) * 2019-03-15 2022-03-15 オムロン株式会社 Control systems, relay devices, and relay programs
US11782857B2 (en) * 2020-05-19 2023-10-10 Mitsubishi Electric Corporation Expansion base unit, control device, control system, and control method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04373002A (en) * 1991-06-24 1992-12-25 Toshiba Corp Programmable controller
KR950009687B1 (en) * 1992-06-30 1995-08-26 삼성항공산업주식회사 High speed ladder instruction processing apparatus for programnable logic controller
JP3393434B2 (en) * 1992-10-12 2003-04-07 オムロン株式会社 Programmable controller
JP3222010B2 (en) * 1994-05-19 2001-10-22 株式会社東芝 Programmable controller
US5933651A (en) * 1995-09-29 1999-08-03 Matsushita Electric Works, Ltd. Programmable controller
JP3962969B2 (en) * 1998-05-29 2007-08-22 オムロン株式会社 Parallel data transmission method and apparatus, and collision prevention method and apparatus in parallel bus system
EP1703347B1 (en) * 2005-03-15 2018-10-17 Omron Corporation Programmable logic controller device and programmable logic controller system
CN101105691B (en) * 2007-05-23 2010-12-01 深圳市合信自动化技术有限公司 Input and output enlargement module and programmable controller system
JP4978373B2 (en) * 2007-08-27 2012-07-18 富士電機株式会社 Programmable controller and its CPU module

Also Published As

Publication number Publication date
CN102346454B (en) 2014-12-17
CN102346454A (en) 2012-02-08
JP2012027728A (en) 2012-02-09

Similar Documents

Publication Publication Date Title
US8719476B2 (en) Communication system, master device and slave device, and communication method, configured to handle plural concurrent requests
JP6922417B2 (en) Concurrent processing device and parallel processing program
KR101720134B1 (en) Bus bridge apparatus
JP4845522B2 (en) System bus control device, integrated circuit and data processing system
US20050102456A1 (en) Command transmission method and command transmission apparatus in pipeline bus system
JP2010282405A (en) Data processing system
JP4182801B2 (en) Multi-processor system
JP2011150397A (en) Bus arbitration device
KR20070104929A (en) Flow control method to improve data transfer via a switch matrix
JP2009025866A (en) Memory controller, bus system, integrated circuit and control method for integrated circuit
JP5473817B2 (en) Programmable controller and bus converter
KR20080074545A (en) Bus system and control method thereof
US7913013B2 (en) Semiconductor integrated circuit
US7203781B2 (en) Bus architecture with primary bus and secondary or slave bus wherein transfer via DMA is in single transfer phase engagement of primary bus
CN100356355C (en) Arbitration device and arbitration method thereof
KR102360214B1 (en) Scheduling method of system on chip including real-time shared interface
JP2000305893A (en) Method for arbitration between master and arbiter having pci bus compatibility
JP2009003633A (en) Information processor
JP2011070701A (en) Processing system and method for transmitting data
JP4151362B2 (en) Bus arbitration method, data transfer device, and bus arbitration method
US20060031619A1 (en) Asynchronous system bus adapter for a computer system having a hierarchical bus structure
JP2004152156A (en) Interface conversion device
US20090307401A1 (en) Circuit and method for bridging multiple source ahb slaves to a target ahb slave
JP2002342295A (en) Multiprocessor system
KR20000033265A (en) Device and method for interfacing chip embedded bus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120726

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130813

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130814

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131008

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140204

R150 Certificate of patent or registration of utility model

Ref document number: 5473817

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250