JP2016081390A - Programmable logic controller and bus conversion unit - Google Patents

Programmable logic controller and bus conversion unit Download PDF

Info

Publication number
JP2016081390A
JP2016081390A JP2014213959A JP2014213959A JP2016081390A JP 2016081390 A JP2016081390 A JP 2016081390A JP 2014213959 A JP2014213959 A JP 2014213959A JP 2014213959 A JP2014213959 A JP 2014213959A JP 2016081390 A JP2016081390 A JP 2016081390A
Authority
JP
Japan
Prior art keywords
unit
bus
extension
basic
expansion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014213959A
Other languages
Japanese (ja)
Other versions
JP6483998B2 (en
Inventor
理威智 山▲崎▼
Riichi Yamazaki
理威智 山▲崎▼
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.)
Keyence Corp
Original Assignee
Keyence 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 Keyence Corp filed Critical Keyence Corp
Priority to JP2014213959A priority Critical patent/JP6483998B2/en
Publication of JP2016081390A publication Critical patent/JP2016081390A/en
Application granted granted Critical
Publication of JP6483998B2 publication Critical patent/JP6483998B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To allow even units including a coupling face different in a kind to have a sense of integrality as a programmable logic controller.SOLUTION: A coupling unit 15 is configured to function as a conversion unit that has: a lateral face (for example: a female type/male type coupling face) of a basic unit 3a or a first lateral face (for example: a male type/female type coupling face) corresponding to a lateral face of a first extension unit 4a connected to the basic unit 3a; and a second lateral face (for example: a female type/male type coupling face) to be coupled to a lateral face (for example: a male type/female type coupling face) of a second extension unit 4b.SELECTED DRAWING: Figure 9

Description

本発明は、プログラマブル・ロジック・コントローラおよび変換ユニットに関する。   The present invention relates to a programmable logic controller and a conversion unit.

プログラマブル・ロジック・コントローラ(PLC)では基本ユニットに対して複数の拡張ユニットが接続されることがある(特許文献1)。基本ユニットに対して複数の拡張ユニットが接続されるPLCシステムはビルディングタイプと呼ばれる。ビルディングタイプは、さらに金属製のベース上で基本ユニットと複数の拡張ユニットが連結されるベースタイプと、ベースを用いずに基本ユニットと複数の拡張ユニットが相互に連結されるベースレスタイプとに分かれている。ベースタイプではベース上に設けられたバスを介して基本ユニットと複数の拡張ユニットが通信する。一般にベースレスタイプでは基本ユニットと拡張ユニットとの連結面(側面)にそれぞれ設けられた雌雄のコネクタを介してバスが接続され、当該バスを介して基本ユニットと拡張ユニットが通信する。このようにベースレスタイプはベースが不要であるため、省スペース化の点では有利である。   In a programmable logic controller (PLC), a plurality of extension units may be connected to a basic unit (Patent Document 1). A PLC system in which a plurality of extension units are connected to a basic unit is called a building type. The building type is further divided into a base type in which a basic unit and multiple extension units are connected on a metal base, and a baseless type in which the basic unit and multiple extension units are connected to each other without using a base. ing. In the base type, the basic unit communicates with a plurality of expansion units via a bus provided on the base. In general, in the baseless type, a bus is connected via a male and female connector provided on a connecting surface (side surface) of the basic unit and the expansion unit, and the basic unit and the expansion unit communicate via the bus. Thus, the baseless type does not require a base and is advantageous in terms of space saving.

特開2014−052672号公報JP 2014-052672 A

PLCは高速性や応答性が求められるため、バスの高速化も要求される。高速なバスに対応した基本ユニットと拡張ユニットを用いれば、従来の低速なバスに対応した基本ユニットと拡張ユニットとを含むPLCと比較して、高速性や応答性が改善される。ところで、ユーザによっては、既存の資産をできるだけ活用したいという要望がある。たとえば、新規の高速な基本ユニットを購入し、従前の低速なバスを備えた拡張ユニットを制御できれば、既存の資産を有効活用できるであろう。しかし、高速なバスと低速なバスとでは、信号線の数やコネクタの形状だけでなく、通信のプロトコルなどについても互換性がないことが多い。とりわけ、ビルディングタイプでは、バスの変更に伴い基本ユニットと拡張ユニットとの連結面が、従前の基本ユニットと拡張ユニットとの連結面とは異なってしまうことがある。このような連結面の相違から、新規の基本ユニットに対して従前の拡張ユニットを連結することができない。新規の基本ユニットに対して従前の拡張ユニットを連結できれば、既存の資産を有効活用しつつ、コンパクトなビルディングタイプのPLCを実現できるようになろう。   Since the PLC is required to have high speed and responsiveness, the speed of the bus is also required. If a basic unit and an expansion unit corresponding to a high-speed bus are used, high speed and responsiveness are improved as compared with a conventional PLC including a basic unit and an expansion unit compatible with a low-speed bus. By the way, some users have a desire to utilize existing assets as much as possible. For example, if you can purchase a new high-speed basic unit and control an expansion unit with a conventional low-speed bus, you will be able to use existing assets effectively. However, high-speed buses and low-speed buses are often not compatible not only with the number of signal lines and connector shapes, but also with communication protocols. In particular, in the building type, the connection surface between the basic unit and the expansion unit may be different from the previous connection surface between the basic unit and the expansion unit due to the change of the bus. Due to such a difference in connection surface, the conventional extension unit cannot be connected to the new basic unit. If a conventional expansion unit can be connected to a new basic unit, it will be possible to realize a compact building type PLC while effectively utilizing existing assets.

そこで、本発明は、種類の異なる連結面を備えたユニットであってもプログラマブル・ロジック・コントローラとして一体感を持たせることを目的とする。   Therefore, an object of the present invention is to provide a sense of unity as a programmable logic controller even for units having different types of connection surfaces.

本発明は、たとえば、
ユーザプログラムを周期的に繰り返し実行する基本ユニットと、
前記基本ユニットに対して第1バスを介して接続可能であって、他の第1拡張ユニットと接続可能に構成される第1拡張ユニットと、
少なくとも第2バスを介して前記基本ユニットと接続可能であって、他の第2拡張ユニットと接続可能に構成される第2拡張ユニットと、
前記基本ユニットの側面または前記基本ユニットに接続された前記第1拡張ユニットの側面に対応する第1側面と、前記第2拡張ユニットの側面に連結される第2側面とを有する変換ユニットと
を有することを特徴とするプログラマブル・ロジック・コントローラを提供する。
The present invention is, for example,
A basic unit that periodically and repeatedly executes user programs;
A first extension unit connectable to the basic unit via a first bus and configured to be connectable to another first extension unit;
A second extension unit connectable to the basic unit via at least a second bus and configured to be connectable to another second extension unit;
A conversion unit having a first side surface corresponding to a side surface of the basic unit or a side surface of the first extension unit connected to the basic unit, and a second side surface coupled to the side surface of the second extension unit; A programmable logic controller is provided.

本発明によれば、変換ユニットを採用することで種類の異なる連結面を備えたユニットであってもプログラマブル・ロジック・コントローラとして一体感を持たせることが可能になる。   According to the present invention, it is possible to give a sense of unity as a programmable logic controller even if a unit having different types of connection surfaces is employed by adopting a conversion unit.

PLCシステムの一例を示す図Diagram showing an example of a PLC system ユーザプログラムの一例を示す図The figure which shows an example of the user program プログラム作成支援装置の一例を示す図The figure which shows an example of a program creation assistance apparatus PLCの一例を示す図The figure which shows an example of PLC スキャンタイムを説明するための図Diagram for explaining scan time ベースレス・ビルディングタイプのPLCの一例を示す図Diagram showing an example of baseless building type PLC 拡張ユニットの連結面の一例を示す図Diagram showing an example of the connection surface of the expansion unit 連結構造を説明するための図Diagram for explaining the connection structure 異種の拡張ユニットを連結ユニットで連結することが可能なPLCの一例を示す図The figure which shows an example of PLC which can connect a dissimilar extension unit with a connection unit 拡張ユニットおよび連結ユニットの一例を示す図The figure which shows an example of an expansion unit and a connection unit PLC内でのバスの接続関係を示す図The figure which shows the connection relation of the bus in PLC PLC内でのバスの接続関係を示す図The figure which shows the connection relation of the bus in PLC PLC内でのバスの接続関係を示す図The figure which shows the connection relation of the bus in PLC 基本ユニットの一例を示す図Diagram showing an example of the basic unit 拡張ユニットおよび連結ユニットの一例を示す図The figure which shows an example of an expansion unit and a connection unit 基本ユニットの一例を示す図Diagram showing an example of the basic unit 拡張ユニットおよび連結ユニットの一例を示す図The figure which shows an example of an expansion unit and a connection unit 拡張ユニットおよび連結ユニットの一例を示す図The figure which shows an example of an expansion unit and a connection unit 基本ユニットの一例を示す図Diagram showing an example of the basic unit 拡張ユニットおよび連結ユニットの一例を示す図The figure which shows an example of an expansion unit and a connection unit ユニットの管理方法を説明するための図Diagram for explaining how to manage units ユニット管理テーブルを用いたリフレッシュの一例を示す図The figure which shows an example of the refresh using a unit management table ラダープログラムの一例を示す図Diagram showing an example of a ladder program ユニットの管理方法を説明するための図Diagram for explaining how to manage units ユニットの管理方法を説明するための図Diagram for explaining how to manage units ユニットの配置位置を指定するGUIの一例を示す図The figure which shows an example of GUI which designates the arrangement position of a unit. ユニットの配置位置を指定するGUIの一例を示す図The figure which shows an example of GUI which designates the arrangement position of a unit. ユニットの配置位置を指定するGUIの一例を示す図The figure which shows an example of GUI which designates the arrangement position of a unit. ユニットの配置位置を指定するGUIの一例を示す図The figure which shows an example of GUI which designates the arrangement position of a unit. ユニットの配置位置を指定するGUIの一例を示す図The figure which shows an example of GUI which designates the arrangement position of a unit. ユニットの配置位置を指定するGUIの一例を示す図The figure which shows an example of GUI which designates the arrangement position of a unit. ユニットの配置位置を指定するGUIの一例を示す図The figure which shows an example of GUI which designates the arrangement position of a unit. ラダープログラムの一例を示す図Diagram showing an example of a ladder program プログラム作成支援装置の機能を示すブロック図Block diagram showing functions of program creation support device ユニットの配置位置を指定する方法を示すフローチャートFlowchart showing the method for specifying the unit location

以下に本発明の一実施形態を示す。以下で説明される個別の実施形態は、本発明の上位概念、中位概念および下位概念など種々の概念を理解するために役立つであろう。また、本発明の技術的範囲は、特許請求の範囲によって確定されるのであって、以下の個別の実施形態によって限定されるわけではない。   An embodiment of the present invention is shown below. The individual embodiments described below will help to understand various concepts, such as the superordinate concept, intermediate concept and subordinate concept of the present invention. Further, the technical scope of the present invention is determined by the scope of the claims, and is not limited by the following individual embodiments.

はじめにプログラマブル・ロジック・コントローラ(PLC、単にプログラマブルコントローラと呼ばれてもよい)を当業者にとってよりよく理解できるようにするために、一般的なPLCの構成とその動作について説明する。   First, in order to allow a person skilled in the art to better understand a programmable logic controller (PLC, which may be simply referred to as a programmable controller), the configuration and operation of a general PLC will be described.

図1は、本発明の実施の形態によるプログラマブル・ロジック・コントローラシステムの一構成例を示す概念図である。図1に示すように、このシステムは、ラダープログラムなどのユーザプログラムの編集を行うためのプログラム作成支援装置1と、工場等に設置される各種制御装置を統括的に制御するためのPLC(プログラマブル・ロジック・コントローラ)2とを備えている。PLC2は、CPUが内蔵された基本ユニット3と1つないし複数の拡張ユニット4を備えている。複数の拡張ユニット4はそれぞれ基本ユニット3の機能を拡張するユニットである。基本ユニット3に対して1つないし複数の拡張ユニット4が着脱可能となっている。基本ユニット3はCPUユニットと呼ばれることもある。   FIG. 1 is a conceptual diagram showing a configuration example of a programmable logic controller system according to an embodiment of the present invention. As shown in FIG. 1, this system includes a program creation support apparatus 1 for editing a user program such as a ladder program, and a PLC (programmable) for comprehensively controlling various control apparatuses installed in a factory or the like. -Logic controller 2). The PLC 2 includes a basic unit 3 having a built-in CPU and one or more expansion units 4. The plurality of expansion units 4 are units that expand the functions of the basic unit 3. One or a plurality of expansion units 4 can be attached to and detached from the basic unit 3. The basic unit 3 may be called a CPU unit.

基本ユニット3には、表示部5及び操作部6が備えられている。表示部5には、基本ユニット3に取り付けられている各拡張ユニット4の動作状況などを表示することができ、表示部5の表示内容は、操作部6を操作することにより切り替えることができる。表示部5には、通常、PLC2内のデバイスの現在値(デバイス値)やPLC2内で生じたエラー情報などが表示される。なお、デバイスとは、デバイス値を格納するために設けられたメモリ上の領域を指す名称である。デバイス値とは、入力機器からの入力状態、出力機器への出力状態およびユーザプログラム上で設定される内部リレー(補助リレー)、タイマー、カウンタ、データメモリ等の状態を示す情報である。   The basic unit 3 includes a display unit 5 and an operation unit 6. The display unit 5 can display the operation status of each expansion unit 4 attached to the basic unit 3, and the display content of the display unit 5 can be switched by operating the operation unit 6. The display unit 5 normally displays a current value (device value) of a device in the PLC 2 and error information generated in the PLC 2. The device is a name indicating an area on a memory provided for storing a device value. The device value is information indicating the input state from the input device, the output state to the output device, and the state of the internal relay (auxiliary relay), timer, counter, data memory, etc. set on the user program.

拡張ユニット4は、PLC2の機能を拡張するために用意されており、基本ユニット3に対して側方から取り付けられる。1つ目の拡張ユニット4は、基本ユニット3に対して側方から直接的に取り付けられる。2つ目以降の拡張ユニット4は、既に取り付けられている拡張ユニット4に対して、側方から直列的に取り付けられる。たとえば、基本ユニット3の右側面と拡張ユニット4の左側面とが連結面になっている。同様に、1つ目の拡張ユニット4の右側面の形状等は基本ユニット3の右側面とほぼ同じであるため、1つ目の拡張ユニット4の右側面に2つ目の拡張ユニット4の左側面が連結される。このような連結方式は、数珠つなぎ方式とかデイジーチェーン方式と呼ばれてもよい。各連結面にはコネクタが設けられており、通信や電力供給を行うためのバスもコネクタを介して連結される。このようにして、基本ユニット3と複数の拡張ユニット4が直列的に取り付けられると、各拡張ユニット4内に備えられた配線(例:バス)を介して、各拡張ユニット4が基本ユニット3に対して通信可能に接続される。各拡張ユニット4には、その拡張ユニット4の機能に対応する被制御装置16(図4)が接続され、これにより、各被制御装置16が拡張ユニット4を介して基本ユニット3に接続される。被制御装置16には、センサなどの入力装置や、アクチュエータなどの出力装置が含まれる。   The extension unit 4 is prepared for extending the function of the PLC 2 and is attached to the basic unit 3 from the side. The first extension unit 4 is directly attached to the basic unit 3 from the side. The second and subsequent expansion units 4 are attached in series from the side with respect to the expansion units 4 that are already attached. For example, the right side surface of the basic unit 3 and the left side surface of the expansion unit 4 are connection surfaces. Similarly, since the shape and the like of the right side surface of the first extension unit 4 are substantially the same as the right side surface of the basic unit 3, the left side of the second extension unit 4 is placed on the right side surface of the first extension unit 4. The faces are connected. Such a connection method may be called a daisy chain method or a daisy chain method. Each connection surface is provided with a connector, and a bus for performing communication and power supply is also connected through the connector. In this way, when the basic unit 3 and the plurality of expansion units 4 are attached in series, each expansion unit 4 is connected to the basic unit 3 via the wiring (eg, bus) provided in each expansion unit 4. To be communicable with each other. Each expansion unit 4 is connected to a controlled device 16 (FIG. 4) corresponding to the function of the expansion unit 4, whereby each controlled device 16 is connected to the basic unit 3 via the expansion unit 4. . The controlled device 16 includes an input device such as a sensor and an output device such as an actuator.

プログラム作成支援装置1は、たとえば、携帯可能ないわゆるノートタイプやタブレットタイプのパーソナルコンピュータであって、表示部7及び操作部8が備えられている。PLC2を制御するためのユーザプログラムの一例であるラダープログラムは、プログラム作成支援装置1を用いて作成され、その作成されたラダープログラムは、プログラム作成支援装置1内でニモニックコードに変換される。そして、プログラム作成支援装置1を、USB(Universal Serial Bus)などの通信ケーブル9を介してPLC2の基本ユニット3に接続し、ニモニックコードに変換されたラダープログラムをプログラム作成支援装置1から基本ユニット3に送ると、そのラダープログラムが基本ユニット3内でマシンコードに変換され、基本ユニット3に備えられたメモリ内に記憶される。   The program creation support apparatus 1 is, for example, a so-called notebook type or tablet type personal computer that is portable, and includes a display unit 7 and an operation unit 8. A ladder program which is an example of a user program for controlling the PLC 2 is created using the program creation support apparatus 1, and the created ladder program is converted into a mnemonic code in the program creation support apparatus 1. Then, the program creation support apparatus 1 is connected to the basic unit 3 of the PLC 2 via a communication cable 9 such as a USB (Universal Serial Bus), and the ladder program converted into the mnemonic code is transferred from the program creation support apparatus 1 to the basic unit 3. The ladder program is converted into a machine code in the basic unit 3 and stored in a memory provided in the basic unit 3.

なお、図1では示していないが、プログラム作成支援装置1の操作部8には、プログラム作成支援装置1に接続されたマウスなどのポインティングデバイスが含まれていてもよい。また、プログラム作成支援装置1は、USB以外の他の通信ケーブル9を介して、PLC2の基本ユニット3に対して着脱可能に接続されるような構成であってもよい。   Although not shown in FIG. 1, the operation unit 8 of the program creation support apparatus 1 may include a pointing device such as a mouse connected to the program creation support apparatus 1. The program creation support device 1 may be configured to be detachably connected to the basic unit 3 of the PLC 2 via a communication cable 9 other than the USB.

図2は、ラダープログラムの作成時にプログラム作成支援装置1の表示部7に表示されるラダー図17の一例を示す図である。図2に示すように、PLC2を制御するためのラダープログラムは、プログラム作成支援装置1の表示部7にマトリックス状に表示される複数のセル18内に仮想デバイスのシンボル19を適宜配置して、視覚的なリレー回路を表すラダー図17を構築することにより作成される。   FIG. 2 is a diagram illustrating an example of a ladder diagram 17 displayed on the display unit 7 of the program creation support apparatus 1 when creating a ladder program. As shown in FIG. 2, the ladder program for controlling the PLC 2 appropriately arranges virtual device symbols 19 in a plurality of cells 18 displayed in a matrix on the display unit 7 of the program creation support apparatus 1. It is created by constructing a ladder diagram 17 representing a visual relay circuit.

ラダー図17には、たとえば、10列×N行(Nは任意の自然数)のセル18が配置されている。そして、各行のセル18内に、図2に示す左側から右側に向かって、時系列的に仮想デバイスのシンボル19を適宜配置することにより、視覚的なリレー回路を作成することができる。作成されるリレー回路は、1行で表される直列的なリレー回路であってもよいし、複数行に並列的に表されたリレー回路を互いに結合することにより作成された、並列的なリレー回路であってもよい。   In the ladder diagram 17, for example, cells 18 of 10 columns × N rows (N is an arbitrary natural number) are arranged. A visual relay circuit can be created by appropriately arranging the virtual device symbols 19 in time series in the cells 18 of each row from the left side to the right side shown in FIG. The created relay circuit may be a serial relay circuit represented by one row, or a parallel relay created by coupling relay circuits represented in parallel in a plurality of rows to each other. It may be a circuit.

図2に示すリレー回路は、入力装置からの入力信号に基づいてオン/オフされる3つの仮想デバイス(以下、「入力デバイス」と呼ぶ。)のシンボル19a,19b,19cと、出力装置の動作を制御するためにオン/オフされる仮想デバイス(以下、「出力デバイス」と呼ぶ。)のシンボル19dとが適宜結合されることにより構成されている。   The relay circuit shown in FIG. 2 includes three virtual devices (hereinafter referred to as “input devices”) 19a, 19b, and 19c that are turned on / off based on an input signal from the input device, and the operation of the output device. And a symbol 19d of a virtual device (hereinafter referred to as an “output device”) that is turned on / off to control the device.

各入力デバイスのシンボル19a,19b,19cの上方に表示されている文字(「R0001」、「R0002」及び「R0003」)は、その入力デバイスのデバイス名(アドレス名)21を表している。各入力デバイスのシンボル19a,19b,19cの下方に表示されている文字(「フラグ1」、「フラグ2」及び「フラグ3」)は、その入力デバイスに対応付けられたデバイスコメント22を表している。出力デバイスのシンボル19dの上方に表示されている文字(「原点復帰」)は、その出力デバイスの機能を表す文字列からなるラベル23である。   The characters (“R0001”, “R0002”, and “R0003”) displayed above the symbols 19a, 19b, and 19c of each input device represent the device name (address name) 21 of the input device. The characters (“flag 1”, “flag 2”, and “flag 3”) displayed below the symbols 19a, 19b, and 19c of each input device represent a device comment 22 associated with the input device. Yes. A character (“origin return”) displayed above the symbol 19d of the output device is a label 23 composed of a character string representing the function of the output device.

図2に示す例では、デバイス名「R0001」及び「R0002」にそれぞれ対応する2つの入力デバイスのシンボル19a,19bが直列的に結合されることにより、AND回路が構成されている。また、これらの2つの入力デバイスのシンボル19a,19bからなるAND回路に対して、デバイス名「R0003」に対応する入力デバイスのシンボル19cが並列的に結合されることにより、OR回路が構成されている。すなわち、このリレー回路では、2つのシンボル19a,19bに対応する入力デバイスがいずれもオンした場合、又は、シンボル19cに対応する入力デバイスがオンした場合にのみ、シンボル19dに対応する出力デバイスがオンされるようになっている。   In the example shown in FIG. 2, two input device symbols 19a and 19b respectively corresponding to device names “R0001” and “R0002” are coupled in series to form an AND circuit. In addition, an OR circuit is configured by parallelly connecting the input device symbol 19c corresponding to the device name “R0003” to the AND circuit including the symbols 19a and 19b of these two input devices. Yes. That is, in this relay circuit, the output device corresponding to the symbol 19d is turned on only when both of the input devices corresponding to the two symbols 19a and 19b are turned on or when the input device corresponding to the symbol 19c is turned on. It has come to be.

図3は、図1のプログラム作成支援装置1の電気的構成について説明するためのブロック図である。図3に示すように、プログラム作成支援装置1には、CPU24、表示部7、操作部8、メモリ25及び通信部26が備えられている。表示部7、操作部8、メモリ25及び通信部26は、それぞれCPU24に対して電気的に接続されている。メモリ25は、少なくともRAMを含む構成であり、ラダープログラム記憶部25aと、編集ソフト記憶部25bとを備えている。   FIG. 3 is a block diagram for explaining the electrical configuration of the program creation support apparatus 1 of FIG. As shown in FIG. 3, the program creation support apparatus 1 includes a CPU 24, a display unit 7, an operation unit 8, a memory 25, and a communication unit 26. The display unit 7, the operation unit 8, the memory 25, and the communication unit 26 are electrically connected to the CPU 24, respectively. The memory 25 is configured to include at least a RAM, and includes a ladder program storage unit 25a and an editing software storage unit 25b.

ユーザは、編集ソフト記憶部25bに記憶されている編集ソフトをCPU24に実行させて、操作部8を通じてラダープログラムを編集する。ここで、ラダープログラムの編集には、ラダープログラムの作成及び変更が含まれる。編集ソフトを用いて作成されたラダープログラムは、ラダープログラム記憶部25aに記憶される。また、ユーザは、必要に応じてラダープログラム記憶部25aに記憶されているラダープログラムを読み出し、そのラダープログラムを、編集ソフトを用いて変更することができる。通信部26は、通信ケーブル9を介してプログラム作成支援装置1を基本ユニット3に通信可能に接続するためのものである。   The user causes the CPU 24 to execute editing software stored in the editing software storage unit 25 b and edits the ladder program through the operation unit 8. Here, the ladder program editing includes creation and modification of the ladder program. The ladder program created using the editing software is stored in the ladder program storage unit 25a. Further, the user can read out the ladder program stored in the ladder program storage unit 25a as needed, and change the ladder program using editing software. The communication unit 26 is for connecting the program creation support apparatus 1 to the basic unit 3 through the communication cable 9 so as to be communicable.

図4は、PLC2の電気的構成について説明するためのブロック図である。図4に示すように、基本ユニット3には、CPU10、表示部5、操作部6、メモリ12及び通信部14が備えられている。表示部5、操作部6、メモリ12、及び通信部14は、それぞれCPU10に電気的に接続されている。
メモリ12は、RAMやROM、メモリカードなどを含んでもよく、ラダープログラムなどが記憶される。メモリ12には、プログラム作成支援装置1から入力されたラダープログラムやユーザデータが上書きして記憶される。
FIG. 4 is a block diagram for explaining the electrical configuration of the PLC 2. As shown in FIG. 4, the basic unit 3 includes a CPU 10, a display unit 5, an operation unit 6, a memory 12, and a communication unit 14. The display unit 5, the operation unit 6, the memory 12, and the communication unit 14 are each electrically connected to the CPU 10.
The memory 12 may include a RAM, a ROM, a memory card, and the like, and stores a ladder program and the like. In the memory 12, the ladder program and user data input from the program creation support apparatus 1 are overwritten and stored.

図5は、本発明の実施の形態に係るプログラマブルコントローラの基本ユニット3でのスキャンタイムの構成を示す模式図である。図5が示すように1つのスキャンタイムTは、入出力のリフレッシュを行うためのユニット間通信201、プログラム実行202、END処理204により構成されている。ユニット間通信201で、基本ユニット3は、ラダープログラムを実行して得られた出力データを基本ユニット3内のメモリ12から外部機器などに送信するとともに、受信データを含めた入力データを基本ユニット3内のメモリ12に取り込む。プログラム実行202で、基本ユニット3は、更新された入力データを用いてプログラムを実行(演算)する。基本ユニット3はプログラムの実行によりデータを演算処理する。なお、END処理とは、プログラム作成支援装置1や基本ユニット3に接続された表示器(図示せず)等の外部機器とのデータ通信、システムのエラーチェック等の周辺サービスに関する処理全般を意味する。   FIG. 5 is a schematic diagram showing a scan time configuration in the basic unit 3 of the programmable controller according to the embodiment of the present invention. As shown in FIG. 5, one scan time T is composed of inter-unit communication 201 for executing input / output refresh, program execution 202, and END processing 204. In the inter-unit communication 201, the basic unit 3 transmits output data obtained by executing the ladder program from the memory 12 in the basic unit 3 to an external device and the like, and also receives input data including received data as the basic unit 3. The data is taken into the internal memory 12. In the program execution 202, the basic unit 3 executes (calculates) the program using the updated input data. The basic unit 3 computes data by executing a program. The END processing means general processing related to peripheral services such as data communication with an external device such as a display (not shown) connected to the program creation support apparatus 1 or the basic unit 3, and system error checking. .

このように、プログラム作成支援装置1はユーザの操作に応じたラダープログラムを作成し、作成したラダープログラムをPLC2に転送する。PLC2は、入出力リフレッシュ、ラダープログラムの実行およびEND処理を1サイクル(1スキャン)として、このサイクルを周期的、すなわちサイクリックに繰り返し実行する。これにより、各種入力機器(センサ等)からのタイミング信号に基づいて、各種出力機器(モータ等)を制御する。よって、PLC2は汎用のパーソナルコンピュータ(PC)とは全く異なる動きをする。   As described above, the program creation support apparatus 1 creates a ladder program according to the user's operation, and transfers the created ladder program to the PLC 2. The PLC 2 executes the input / output refresh, the execution of the ladder program, and the END process as one cycle (one scan), and periodically and cyclically executes this cycle. Thus, various output devices (motors, etc.) are controlled based on timing signals from various input devices (sensors, etc.). Therefore, the PLC 2 moves completely different from a general-purpose personal computer (PC).

<連結構造>
図6(A)はPLC2を構成する基本ユニット3、拡張ユニット4およびエンドユニット11が連結される前の状態を示している。この例では、基本ユニット3の右方向に1つ以上の拡張ユニット4が連結される。最も右に位置する拡張ユニット4にはエンドユニット11が連結される。エンドユニット11は、最も右に位置する拡張ユニット4の右側面を保護するものであり、バスの終端機能を備えていてもよい。
<Connection structure>
FIG. 6A shows a state before the basic unit 3, the extension unit 4 and the end unit 11 constituting the PLC 2 are connected. In this example, one or more extension units 4 are connected to the right of the basic unit 3. An end unit 11 is coupled to the rightmost extension unit 4. The end unit 11 protects the right side of the rightmost extension unit 4 and may have a bus termination function.

図6(B)はPLC2を構成する基本ユニット3、拡張ユニット4およびエンドユニット11が連結された状態を示している。このPLC2はベースレスのビルディングタイプであるため、ベースを使用せずに、基本ユニット3、拡張ユニット4およびエンドユニット11が連結される。工場において制御盤に設置しやすくするために、PLC2の背面にはDINレールなどの基準レール13が取り付けられるようになっている。なお、基本ユニット3および拡張ユニット4の連結状態を維持するためにロック機構が採用されてもよい。   FIG. 6B shows a state in which the basic unit 3, the extension unit 4 and the end unit 11 constituting the PLC 2 are connected. Since the PLC 2 is a baseless building type, the base unit 3, the extension unit 4, and the end unit 11 are connected without using a base. In order to facilitate installation on the control panel in a factory, a reference rail 13 such as a DIN rail is attached to the back surface of the PLC 2. Note that a lock mechanism may be employed to maintain the connected state of the basic unit 3 and the extension unit 4.

図7、図8(A)および図8(B)はユニット間の連結構造を説明するための図である。図7によれば、拡張ユニット4は略直方体形状の筐体を有している。筐体は、上面4T、底面4B、左側面4L、右側面4R、前面4F、背面4rといった6つの主要な側面を有している。なお、図7では前面4Fが上を向いている。筐体面に関するこれらの呼称は便宜上のものにすぎない。   FIG. 7, FIG. 8 (A) and FIG. 8 (B) are diagrams for explaining a connecting structure between units. According to FIG. 7, the expansion unit 4 has a substantially rectangular parallelepiped housing. The housing has six main side surfaces such as an upper surface 4T, a bottom surface 4B, a left side surface 4L, a right side surface 4R, a front surface 4F, and a back surface 4r. In FIG. 7, the front surface 4F faces upward. These designations for the housing surface are for convenience only.

図8(A)および図8(B)が示すように、筐体内には電気信号を伝達するための基板33が配置され、基準レール13の長手方向の一方端部に雌型コネクタ34が固定されている。雌型コネクタ34の差込口が露出するように右側面4Rに開口部35が設けられる。左側面4Lには、雌型コネクタ34の差込口に挿入可能な突出部32を含む雄型コネクタが設けられている。突出部32を略包囲する包囲部31が筐体に設けられる。このように突出部32と包囲部31とによって雄型コネクタが形成されている。   As shown in FIGS. 8A and 8B, a substrate 33 for transmitting an electrical signal is disposed in the housing, and a female connector 34 is fixed to one end of the reference rail 13 in the longitudinal direction. Has been. An opening 35 is provided in the right side surface 4R so that the insertion port of the female connector 34 is exposed. The left side surface 4L is provided with a male connector including a protrusion 32 that can be inserted into the insertion port of the female connector 34. A surrounding portion 31 that substantially surrounds the protruding portion 32 is provided in the housing. In this way, the male connector is formed by the protruding portion 32 and the surrounding portion 31.

ここでは、第1の拡張ユニット4に対して第2の拡張ユニット4’が連結されるものとする。なお、両者に共通する事項を説明するときは、単に、拡張ユニット4と呼ぶことにする。第1の拡張ユニット4の開口部35に第2の拡張ユニットの包囲部31が嵌合ないしは係合される。第1の拡張ユニット4の雌型コネクタ34の差込口に第2の拡張ユニット4’の突出部32が挿入されることにより第1および第2の拡張ユニット間が構造的に結合されるとともに、バスが電気的に接続される。第1の拡張ユニット4と第2の拡張ユニット4’の雌型コネクタ34と突出部32の関係は、逆になっていても構わない。つまり、右側面4Rに突出部32を含む雄型コネクタが設けられ、左側面4Lに雌型コネクタ34が設けられてもよい。なお、基本ユニット3の右側面も拡張ユニット4の右側面と同一の構造となっており、基本ユニット3の右側面に対して拡張ユニット4の左側面4Lが連結されるようになっている。   Here, it is assumed that the second extension unit 4 ′ is connected to the first extension unit 4. It should be noted that when an item common to both is described, it is simply referred to as an expansion unit 4. The surrounding portion 31 of the second extension unit is fitted or engaged with the opening 35 of the first extension unit 4. By inserting the protrusion 32 of the second extension unit 4 ′ into the insertion port of the female connector 34 of the first extension unit 4, the first and second extension units are structurally coupled to each other. The bus is electrically connected. The relationship between the female connector 34 and the protrusion 32 of the first extension unit 4 and the second extension unit 4 ′ may be reversed. That is, a male connector including the protruding portion 32 may be provided on the right side surface 4R, and a female connector 34 may be provided on the left side surface 4L. The right side surface of the basic unit 3 has the same structure as the right side surface of the expansion unit 4, and the left side surface 4 </ b> L of the expansion unit 4 is connected to the right side surface of the basic unit 3.

第1の拡張ユニット4の側面に一体に形成されている凸部が第2の拡張ユニット4’の側面に形成された係止孔に挿入され、凸部と係止孔とが係合してもよい。さらに、拡張ユニット4の右側面4Rには、左側面4Lのロック孔30のうち幅の広い開口部分に挿入可能な係止部37を備えるロック部材36が図中の上下方向に移動可能な状態で取り付けられていてもよい。より詳しく説明すると、図8(B)に示すように、第1の拡張ユニット4に第2の拡張ユニットB1を当接することで、第1の拡張ユニット4の係止部37が第2の拡張ユニット4’のロック孔30に挿入される。さらに、第1の拡張ユニット4のロック部材36を図中の矢印方向に移動させると、ロック部材36の係止部37が第2の拡張ユニット4’のロック孔30cのうち幅の狭い開口部分に係止される。これにより、第2の拡張ユニット4’が第1の拡張ユニット4に対してロックされる。なお、ロック機構は、上記の例に特に限定されず、他のロック機構が用いられてもよい。また、ロック機構の設置位置も、上記の例に特に限定されず、左側面4L等であってもよい。   The convex part integrally formed on the side surface of the first extension unit 4 is inserted into the locking hole formed on the side surface of the second extension unit 4 ′, and the convex part and the locking hole are engaged. Also good. Further, on the right side surface 4R of the expansion unit 4, a lock member 36 including a locking portion 37 that can be inserted into a wide opening portion of the lock hole 30 of the left side surface 4L is movable in the vertical direction in the figure. May be attached. More specifically, as shown in FIG. 8B, the second extension unit B1 is brought into contact with the first extension unit 4, so that the locking portion 37 of the first extension unit 4 is in the second extension. It is inserted into the lock hole 30 of the unit 4 ′. Further, when the lock member 36 of the first extension unit 4 is moved in the direction of the arrow in the figure, the engaging portion 37 of the lock member 36 has a narrow opening in the lock hole 30c of the second extension unit 4 ′. It is locked to. As a result, the second extension unit 4 ′ is locked with respect to the first extension unit 4. The locking mechanism is not particularly limited to the above example, and other locking mechanisms may be used. The installation position of the locking mechanism is not particularly limited to the above example, and may be the left side surface 4L or the like.

上述したように、拡張ユニット4の右側面にはエンドユニット11が設けられてもよい。エンドユニット11の左側面には、拡張ユニット4の右側面4Rに設けられた開口部35に嵌合する包囲部が設けられる。この包囲部の形状は、包囲部31の形状と類似していてもよいが、開口部35に嵌合する形状であれば異なる形状であってもよい。また、エンドユニット11の包囲部には終端抵抗に接続された突出部が設けられてもよい。これにより、終端が必要なバスをエンドユニット11で終端することができ、不要な定在波の発生を抑制できるようになる。   As described above, the end unit 11 may be provided on the right side surface of the expansion unit 4. On the left side surface of the end unit 11, an enclosure portion that fits into the opening 35 provided on the right side surface 4 </ b> R of the extension unit 4 is provided. The shape of the surrounding portion may be similar to the shape of the surrounding portion 31, but may be a different shape as long as it fits into the opening 35. Further, a projecting portion connected to the terminating resistor may be provided in the surrounding portion of the end unit 11. As a result, a bus that needs to be terminated can be terminated by the end unit 11, and generation of unnecessary standing waves can be suppressed.

<種類の異なるバスを有するユニットの連結>
基板技術の進化に応じて製品を更新することで、旧製品と新製品との連結構造や電気的接続構造の互換性を維持できなくなることがある。たとえば、新製品の基本ユニットと旧製品の拡張ユニットとを通信ケーブルで接続し、新製品の基本ユニットと旧製品の拡張ユニットとの連結(ビルディング)についてはあきらめることも考えられる。しかし、これはでは基本ユニットと拡張ユニットとを一列に連結するビルディングタイプの利点が失われてしまう。そこで、本実施の形態では、連結構造(連結面)の異なる複数種類の製品群であっても連結可能とすることで、ユーザの利便性を向上させる。
<Connection of units with different types of buses>
Updating products according to the evolution of board technology may make it impossible to maintain compatibility of the connection structure and electrical connection structure between the old product and the new product. For example, it is conceivable that the basic unit of the new product and the expansion unit of the old product are connected by a communication cable, and the connection (building) between the basic unit of the new product and the expansion unit of the old product is given up. However, this loses the advantage of the building type that connects the basic unit and the extension unit in a row. Therefore, in the present embodiment, even a plurality of types of product groups having different connection structures (connection surfaces) can be connected to improve user convenience.

図9は連結構造の異なる複数種類の拡張ユニットを、連結ユニット15を介して接続して構成されたPLC2の一例を示す図である。基本ユニット3aの右側面と拡張ユニット4aの左側面はそれぞれ互換性のある連結面を有している。つまり、一方の連結面に設けられた凸形状は他方の連結面に設けられた凹形状と係合し、他方の連結面に設けられた凸形状は一方の連結面に設けられた凹形状と係合する。つまり、凸形状のサイズと高さは、凹形状のサイズと深さとほぼ整合している。また、連結面内での凸形状の位置と凹形状の位置も整合している。一方で、拡張ユニット4bの左側面は、基本ユニット3aの右側面に連結することができない。つまり、基本ユニット3aの連結面と拡張ユニット4bの連結面には互換性がない。そこで、連結ユニット15によって連結面の違いを吸収し、拡張ユニット4bを拡張ユニット4aや基本ユニット3aに対して接続している。連結ユニット15の右側面は拡張ユニット4bの左側面に対して連結面として互換性があるように構成されている。連結ユニット15の左側面は拡張ユニット4aや基本ユニット3aの左側面に対して連結面として互換性があるように構成されている。なお、基本ユニット3aから見て最も遠方にある、すなわち遠端に配置される拡張ユニット4bの右側面にはエンドユニット11bが連結されてもよい。   FIG. 9 is a diagram illustrating an example of the PLC 2 configured by connecting a plurality of types of extension units having different connection structures via the connection unit 15. The right side surface of the basic unit 3a and the left side surface of the extension unit 4a each have compatible connection surfaces. That is, the convex shape provided on one connecting surface is engaged with the concave shape provided on the other connecting surface, and the convex shape provided on the other connecting surface is the concave shape provided on one connecting surface. Engage. That is, the size and height of the convex shape are substantially matched with the size and depth of the concave shape. Further, the position of the convex shape and the position of the concave shape in the connection surface are also aligned. On the other hand, the left side surface of the expansion unit 4b cannot be connected to the right side surface of the basic unit 3a. That is, the connection surface of the basic unit 3a and the connection surface of the expansion unit 4b are not compatible. Therefore, the connection unit 15 absorbs the difference in connection surface, and the extension unit 4b is connected to the extension unit 4a and the basic unit 3a. The right side surface of the connecting unit 15 is configured to be compatible with the left side surface of the extension unit 4b as a connecting surface. The left side surface of the connecting unit 15 is configured to be compatible with the left side surface of the extension unit 4a and the basic unit 3a as a connecting surface. The end unit 11b may be coupled to the right side surface of the extension unit 4b that is farthest away from the basic unit 3a, that is, disposed at the far end.

図10は、拡張ユニット4a、拡張ユニット4bおよび連結ユニット15の各連結面の構造を説明するための図である。拡張ユニット4aの筐体は右側面4aR、左側面4aL、上面4aT、前面4aF、背面4arおよび底面を有している。右側面4aRには、上述したロック孔30aや雌型コネクタ34aなどが設けられている。左側面4aLには、係止部37aや雄型コネクタの突出部32aなどが配置されている。係止部37aはロック孔30aに挿入され、リリース位置(大開口部)からロック位置(小開口部)に移動すると、2つの連結面をロックする。また、雌型コネクタ34aには雄型コネクタの突出部32aが嵌合し、これによりバスが電気的に接続される。背面4arには基準レール13を取り付けるための溝部4agが設けられている。   FIG. 10 is a view for explaining the structure of each connection surface of the extension unit 4a, the extension unit 4b, and the connection unit 15. As shown in FIG. The housing of the expansion unit 4a has a right side surface 4aR, a left side surface 4aL, an upper surface 4aT, a front surface 4aF, a back surface 4ar, and a bottom surface. On the right side surface 4aR, the above-described lock hole 30a, female connector 34a, and the like are provided. On the left side surface 4aL, a locking portion 37a, a protruding portion 32a of a male connector, and the like are arranged. When the locking portion 37a is inserted into the lock hole 30a and moves from the release position (large opening) to the lock position (small opening), the two connecting surfaces are locked. The female connector 34a is fitted with a protruding portion 32a of a male connector, whereby the bus is electrically connected. A groove 4ag for attaching the reference rail 13 is provided on the back surface 4ar.

拡張ユニット4bの筐体は右側面4bR、左側面4bL、上面4bT、前面4bF、背面4brおよび底面を有している。右側面4bRには、上述したロック孔30bや雌型コネクタ34bなどが設けられている。左側面4bLには、係止部37bや雄型コネクタの突出部32bなどが配置されている。係止部37bはロック孔30bに挿入され、リリース位置(大開口部)からロック位置(小開口部)に移動すると、2つの連結面をロックする。また、雌型コネクタ34bには雄型コネクタの突出部32bが嵌合し、これによりバスが電気的に接続される。背面4brには基準レール13を取り付けるための溝部4bgが設けられている。   The housing of the expansion unit 4b has a right side surface 4bR, a left side surface 4bL, an upper surface 4bT, a front surface 4bF, a back surface 4br, and a bottom surface. The right side surface 4bR is provided with the lock hole 30b and the female connector 34b described above. On the left side surface 4bL, a locking portion 37b, a protruding portion 32b of a male connector, and the like are arranged. When the locking portion 37b is inserted into the lock hole 30b and moves from the release position (large opening) to the lock position (small opening), the two connecting surfaces are locked. Further, the male connector protruding portion 32b is fitted into the female connector 34b, whereby the bus is electrically connected. A groove 4bg for attaching the reference rail 13 is provided on the back surface 4br.

連結ユニット15の筐体は右側面15R、左側面15L、上面15T、前面15F、背面15rおよび底面を有している。右側面15Rには、拡張ユニット4bの左側面4bLを連結するために、上述したロック孔30bや雌型コネクタ34bなどが設けられている。左側面15Lには、拡張ユニット4aや基本ユニット3aを連結するために、係止部37aや雄型コネクタの突出部32aなどが配置されている。連結ユニット15の係止部37aは拡張ユニット4aや基本ユニット3aのロック孔30aに挿入され、リリース位置(大開口部)からロック位置(小開口部)に移動すると、2つの連結面をロックする。同様に、連結ユニット15のロック孔30bには、拡張ユニット4bの係止部37bが挿入される。係止部37bがリリース位置(大開口部)からロック位置(小開口部)に移動すると、2つの連結面をロックする。連結ユニット15の雌型コネクタ34bには拡張ユニット4bの突出部32bが嵌合し、これによりバスが電気的に接続される。同様に、連結ユニット15の突出部32aは拡張ユニット4aや基本ユニット3aの雌型コネクタ34aに嵌合し、これによりバスが電気的に接続される。背面15rには基準レール13を取り付けるための溝部15gが設けられている。   The casing of the connection unit 15 has a right side surface 15R, a left side surface 15L, an upper surface 15T, a front surface 15F, a back surface 15r, and a bottom surface. The right side surface 15R is provided with the above-described lock hole 30b, female connector 34b, and the like in order to connect the left side surface 4bL of the expansion unit 4b. On the left side surface 15L, a locking portion 37a, a protruding portion 32a of a male connector, and the like are arranged to connect the expansion unit 4a and the basic unit 3a. The locking portion 37a of the connecting unit 15 is inserted into the lock hole 30a of the expansion unit 4a or the basic unit 3a, and locks the two connecting surfaces when moving from the release position (large opening) to the lock position (small opening). . Similarly, the locking portion 37b of the expansion unit 4b is inserted into the lock hole 30b of the connection unit 15. When the locking portion 37b moves from the release position (large opening) to the lock position (small opening), the two connecting surfaces are locked. The protruding portion 32b of the expansion unit 4b is fitted to the female connector 34b of the connecting unit 15, thereby electrically connecting the bus. Similarly, the protruding portion 32a of the connecting unit 15 is fitted into the female connector 34a of the expansion unit 4a or the basic unit 3a, whereby the bus is electrically connected. A groove 15g for attaching the reference rail 13 is provided on the back surface 15r.

このように、連結ユニット15は、基本ユニット3aの側面または基本ユニット3aに接続された拡張ユニット4aの側面に連結される第1側面(左側面15L)と、拡張ユニット4bの側面に連結される第2側面(右側面15R)とを有する連結面変換ユニットとして機能する。つまり、連結ユニット15の第1側面には基本ユニット3aや拡張ユニット4aが接続され、第2側面には拡張ユニット4bが接続される。これにより、拡張ユニット4aの連結構造と拡張ユニット4bの連結構造に互換性がなくても、連結ユニット15を介在させることで、拡張ユニット4aの連結構造と拡張ユニット4bを一列に連結することが可能となる。つまり、連結構造の異なる複数種類の拡張ユニットであっても一列に連結することが可能となり、ユーザの利便性が向上する。なお、ここでは拡張ユニット4aの側面に第1側面(左側面15L)が連結されるようになっているが、例えば、連結ユニット15と基本ユニット3aをケーブル接続してもよい。この場合、拡張ユニット4aの側面に第1側面(左側面15L)は連結しなくてもよい代わりに、拡張ユニット4aの側面と第1側面(左側面15L)とは対応関係にある。たとえば、拡張ユニット4aの側面と第1側面において、幅方向の大きさ(奥行き)を略同一にしてもよいし、上下方向の大きさを略同一にしてもよいし、これら両方を略同一にしてもよい。要するに、基本ユニット3a、拡張ユニット4a、連結ユニット15、拡張ユニット4bがDINレール等の基準レールに取り付けられたとき、一体的な構成となるような対応関係があればよい。   Thus, the connecting unit 15 is connected to the side surface of the extension unit 4b and the first side surface (the left side surface 15L) connected to the side surface of the basic unit 3a or the side surface of the extension unit 4a connected to the basic unit 3a. It functions as a connection surface conversion unit having the second side surface (right side surface 15R). That is, the basic unit 3a and the extension unit 4a are connected to the first side surface of the connecting unit 15, and the extension unit 4b is connected to the second side surface. Thus, even if the connection structure of the extension unit 4a and the connection structure of the extension unit 4b are not compatible, the connection structure of the extension unit 4a and the extension unit 4b can be connected in a row by interposing the connection unit 15. It becomes possible. In other words, even a plurality of types of extension units having different connection structures can be connected in a row, which improves user convenience. Here, the first side surface (the left side surface 15L) is connected to the side surface of the extension unit 4a. However, for example, the connection unit 15 and the basic unit 3a may be cable-connected. In this case, the first side surface (left side surface 15L) may not be connected to the side surface of the expansion unit 4a, but the side surface of the expansion unit 4a and the first side surface (left side surface 15L) are in a correspondence relationship. For example, the size (depth) in the width direction may be substantially the same on the side surface and the first side surface of the expansion unit 4a, the size in the vertical direction may be approximately the same, or both may be approximately the same. May be. In short, the basic unit 3a, the extension unit 4a, the connecting unit 15, and the extension unit 4b only need to have a corresponding relationship so as to be integrated when mounted on a reference rail such as a DIN rail.

本実施の形態ではベースレスのビルディングタイプを一例として取り上げたが、ベースフレームを用いて連結されるビルディングタイプのPLCに対しても本発明の技術思想を採用できる。つまり、ベースフレームありのビルディングタイプであっても、拡張ユニット4aの連結構造と拡張ユニット4bの連結構造に互換性がないことがあるため、連結ユニット15を採用してもよい。なお、ベースフレームは、たとえば、拡張ユニット4aの底面と拡張ユニット4bの底面とに固定され、ベースフレームによって基本ユニット3a、拡張ユニット4a、拡張ユニット4bおよび連結ユニット15が一体に維持される。   In the present embodiment, the baseless building type is taken as an example, but the technical idea of the present invention can also be applied to a building type PLC connected using a base frame. That is, even in a building type with a base frame, the connection structure of the extension unit 4a and the connection structure of the extension unit 4b may not be compatible, so the connection unit 15 may be employed. The base frame is fixed to, for example, the bottom surface of the extension unit 4a and the bottom surface of the extension unit 4b, and the basic unit 3a, the extension unit 4a, the extension unit 4b, and the connection unit 15 are integrally maintained by the base frame.

連結ユニット15の第1側面には、第1側面に連結された基本ユニット3aまたは拡張ユニット4aを連結ユニット15に固定するためのロック機構が設けられてもよい。このようなロック機構は係止部37aとロック孔30aによって構成されてもよい。同様に、連結ユニット15の第2側面には、第2側面に連結された拡張ユニット4bを連結ユニット15に固定するためのロック機構が設けられてもよい。このようなロック機構は係止部37bとロック孔30bによって構成されてもよい。   A lock mechanism for fixing the basic unit 3 a or the expansion unit 4 a connected to the first side surface to the connection unit 15 may be provided on the first side surface of the connection unit 15. Such a lock mechanism may be configured by the locking portion 37a and the lock hole 30a. Similarly, a lock mechanism for fixing the expansion unit 4 b connected to the second side surface to the connection unit 15 may be provided on the second side surface of the connection unit 15. Such a lock mechanism may be configured by the locking portion 37b and the lock hole 30b.

図9では基本ユニット3aと連結ユニット15との間に2台の拡張ユニット4aが接続されているが、拡張ユニット4aの数は0台であってもよいし、3台以上であってもよい。また、連結ユニット15の右側には1台以上の拡張ユニット4bが接続されうる。   In FIG. 9, two extension units 4a are connected between the basic unit 3a and the connecting unit 15. However, the number of extension units 4a may be zero, or may be three or more. . One or more expansion units 4b can be connected to the right side of the connecting unit 15.

<バス変換ユニット>
上述した実施の形態では主に連結構造の異なるユニットについての構造的な連結手法について説明した。以下では、基本ユニット3aと拡張ユニット4bがどのように通信するかについて説明する。
<Bus conversion unit>
In the above-described embodiments, the structural connection method for units having different connection structures has been mainly described. Hereinafter, how the basic unit 3a and the extension unit 4b communicate will be described.

基本ユニット3aと拡張ユニット4aは連結面に設けられたコネクタを介して接続されたバスを通じて通信する。また、複数の拡張ユニット4bもコネクタを介して接続されたバスを通じて通信する。したがって、基本ユニット3aと拡張ユニット4bとをどのようにバス接続するかが問題となる。たとえば、基本ユニット3aと拡張ユニット4aとがシリアルバスを介して接続され、複数の拡張ユニット4bはパラレルバスを介して接続されている場合、シリアルバスを構成する信号線とパラレルバスを構成する信号線を接続しても通信は不可能である。これは信号線の数が異なるだけでなく、通信プロトコルも異なるからである。   The basic unit 3a and the expansion unit 4a communicate through a bus connected via a connector provided on the coupling surface. The plurality of expansion units 4b also communicate through a bus connected via a connector. Therefore, the problem is how to connect the basic unit 3a and the expansion unit 4b by bus. For example, when the basic unit 3a and the extension unit 4a are connected via a serial bus and the plurality of extension units 4b are connected via a parallel bus, the signal lines constituting the serial bus and the signals constituting the parallel bus Communication is not possible even if the lines are connected. This is because not only the number of signal lines is different, but also the communication protocol is different.

図11(A)は種類の異なる複数のバスの接続形態の一例を示す図である。この例では、基本ユニット3aは第1のタイプのコネクタとして雌型のコネクタC1を有している。拡張ユニット4aの左側面には第2のタイプのコネクタとして雄型のコネクタC1が設けられている。雌雄を成すこれらのコネクタC1は基本ユニット3aと拡張ユニット4aが通信するための第1バスB1を接続する。第1バスB1では、たとえば、ユーザプログラム上で第1拡張ユニット4aの内部処理に関して割り付けられるデバイスの情報が送受信される。同様にコネクタC1は第2バスB2を接続する。第2バスB2は、たとえば、第1バスB1と特性が異なるとともに、ユーザプログラム上で第2拡張ユニット4bの内部処理に関して割り付けられるデバイスの情報を基本ユニット3aと第2拡張ユニット4bの間で通信するために使用される。拡張ユニット4aの右側面には第1のタイプの雌型のコネクタC1が設けられており、他の拡張ユニット4aや連結ユニット15が接続される。連結ユニット15の左側面には雄型のコネクタC1が設けられている。第2バスB2は基本ユニット3、拡張ユニット4a、連結ユニット15および拡張ユニット4bまで延在している。なお、連結ユニット15の右側面と拡張ユニット4bの右側面には第3のタイプのコネクタとして雌型のコネクタC2が設けられている。拡張ユニット4bの左側面には第4のタイプのコネクタとして雄型のコネクタC2が設けられている。このように雌雄のコネクタC2によって第2バスを接続している。コネクタC1については第1バスB1と第2バスB2を接続するため、コネクタC2と比較してより多くのバスラインを接続することになる。なお、基本ユニット3aは、第1バスB1での通信を制御するためのバスマスタと、第2バスB2での通信を制御するためのバスマスタとを有している。   FIG. 11A is a diagram illustrating an example of a connection form of a plurality of different types of buses. In this example, the basic unit 3a has a female connector C1 as a first type connector. On the left side surface of the expansion unit 4a, a male connector C1 is provided as a second type connector. These connectors C1 forming a male and female connect the first bus B1 for communication between the basic unit 3a and the expansion unit 4a. In the first bus B1, for example, information on devices allocated for internal processing of the first extension unit 4a on the user program is transmitted and received. Similarly, the connector C1 connects the second bus B2. The second bus B2, for example, has characteristics different from those of the first bus B1, and communicates device information assigned to the internal processing of the second expansion unit 4b on the user program between the basic unit 3a and the second expansion unit 4b. Used to do. A first type female connector C1 is provided on the right side surface of the expansion unit 4a, and the other expansion unit 4a and the coupling unit 15 are connected to the expansion unit 4a. A male connector C <b> 1 is provided on the left side surface of the connection unit 15. The second bus B2 extends to the basic unit 3, the extension unit 4a, the connection unit 15, and the extension unit 4b. A female connector C2 is provided as a third type connector on the right side surface of the connecting unit 15 and the right side surface of the expansion unit 4b. A male connector C2 is provided on the left side surface of the expansion unit 4b as a fourth type connector. Thus, the second bus is connected by the male and female connectors C2. Since the connector C1 connects the first bus B1 and the second bus B2, more bus lines are connected than the connector C2. The basic unit 3a includes a bus master for controlling communication on the first bus B1 and a bus master for controlling communication on the second bus B2.

図11(B)は種類の異なる複数のバスの接続形態の一例を示す図である。この例では、基本ユニット3aは第5のタイプのコネクタとして雌型のコネクタC3を有している。拡張ユニット4aの左側面には第6のタイプのコネクタとして雄型のコネクタC3が設けられている。この雌雄を成すコネクタC3は基本ユニット3aと拡張ユニット4aが通信するための第1バスを接続するとともに、第3バスB3を接続する。第3バスB3は、第2バスB2を連結ユニット15によってバス変換されたバスである。第3バスB3の通信帯域は、第2バスB2の通信帯域以上であればよく、通信プロトコルはどのようなものであってもよい。拡張ユニット4aの右側面には雌型のコネクタC3が設けられており、他の拡張ユニット4aや連結ユニット15が接続される。連結ユニット15の左側面には雄型のコネクタC3が設けられている。第2バスB2は連結ユニット15から拡張ユニット4bまで延在している。なお、連結ユニット15の右側面と拡張ユニット4bの右側面には雌型のコネクタC2が設けられている。拡張ユニット4bの左側面には雄型のコネクタC2が設けられている。このようにコネクタC2によって第2バスを接続している。コネクタC1については第1バスB1と第3バスB3を接続するため、コネクタC2と比較してより多くのバスラインを接続することになる。なお、基本ユニット3aは、第1バスB1での通信を制御するためのバスマスタと、第3バスB3での通信を制御するためのバスマスタとを有している。連結ユニット15は、第3バスB3と第2バスB2とをバス変換するためのバス変換ユニットを備えている。バス変換ユニットは、第2バスB2での通信を制御するためのバスマスタを有していてもよい。図11(A)では第2バスB2が拡張ユニット4aや基本ユニット3aに延在しているため、コネクタC1が大きくなりやすい。一方で、図11(B)では第2バスB2を変換して得られた第3バスB3が拡張ユニット4aや基本ユニット3aに延在している。第2バスB2のバスラインと比較して第3バスB3のバスラインの数が少なければ、コネクタC3はコネクタC1よりも小さいものを採用できるであろう。   FIG. 11B is a diagram illustrating an example of a connection form of a plurality of different types of buses. In this example, the basic unit 3a has a female connector C3 as a fifth type connector. A male connector C3 is provided as a sixth type connector on the left side surface of the expansion unit 4a. The male and female connectors C3 connect the first bus for communication between the basic unit 3a and the expansion unit 4a, and also connect the third bus B3. The third bus B3 is a bus obtained by converting the second bus B2 by the connecting unit 15. The communication band of the third bus B3 only needs to be equal to or greater than the communication band of the second bus B2, and any communication protocol may be used. A female connector C3 is provided on the right side surface of the extension unit 4a, and the other extension unit 4a and the connecting unit 15 are connected thereto. A male connector C3 is provided on the left side surface of the connecting unit 15. The second bus B2 extends from the connection unit 15 to the expansion unit 4b. A female connector C2 is provided on the right side surface of the connecting unit 15 and the right side surface of the expansion unit 4b. A male connector C2 is provided on the left side surface of the expansion unit 4b. Thus, the second bus is connected by the connector C2. Since the connector C1 connects the first bus B1 and the third bus B3, more bus lines are connected than the connector C2. The basic unit 3a includes a bus master for controlling communication on the first bus B1 and a bus master for controlling communication on the third bus B3. The connection unit 15 includes a bus conversion unit for performing bus conversion between the third bus B3 and the second bus B2. The bus conversion unit may have a bus master for controlling communication on the second bus B2. In FIG. 11A, since the second bus B2 extends to the extension unit 4a and the basic unit 3a, the connector C1 tends to be large. On the other hand, in FIG. 11B, the third bus B3 obtained by converting the second bus B2 extends to the expansion unit 4a and the basic unit 3a. If the number of bus lines of the third bus B3 is smaller than the bus lines of the second bus B2, the connector C3 may be smaller than the connector C1.

図12(A)は上述した連結ユニット15を2つのバス延長ユニットで構成した例である。バス延長ユニット15aは、雄型のコネクタC1、第7タイプのコネクタである雌型のコネクタC4と、ケーブルを接続するための第8のタイプのコネクタC5とを有している。コネクタC1は第1バスB1と第2バスB2を接続している。拡張ユニット4aは、雌型のコネクタC4と雄型のコネクタC4とを有している。雌雄を成すコネクタC4は第1バスB1を接続するためのコネクタである。バス延長ユニット15bは、雄型のコネクタC4と雄型のコネクタC2と、ケーブルを接続するためのコネクタC5とを有している。このケーブルは第2バスB2を接続するためのケーブルである。このようにバス延長ユニット15aは基本ユニット3aまたは拡張ユニット4aと、拡張ユニット4aとを連結するとともに、もう一方のバス延長ユニット15bからの第2バスB2を接続する。バス延長ユニット15bは拡張ユニット4aと拡張ユニット4bとを連結するとともに、延長ユニット15aからの第2バスB2を接続する。このように第2バスB2については拡張ユニット4a内を経由せずに、すなわちその外部を経由して拡張ユニット4bから基本ユニット3aまで接続されてもよい。   FIG. 12A shows an example in which the connecting unit 15 described above is composed of two bus extension units. The bus extension unit 15a has a male connector C1, a female connector C4 which is a seventh type connector, and an eighth type connector C5 for connecting a cable. The connector C1 connects the first bus B1 and the second bus B2. The expansion unit 4a has a female connector C4 and a male connector C4. A male and female connector C4 is a connector for connecting the first bus B1. The bus extension unit 15b includes a male connector C4, a male connector C2, and a connector C5 for connecting a cable. This cable is a cable for connecting the second bus B2. Thus, the bus extension unit 15a connects the basic unit 3a or the extension unit 4a and the extension unit 4a, and connects the second bus B2 from the other bus extension unit 15b. The bus extension unit 15b connects the extension unit 4a and the extension unit 4b and connects the second bus B2 from the extension unit 15a. Thus, the second bus B2 may be connected from the extension unit 4b to the basic unit 3a without going through the extension unit 4a, that is, through the outside.

図12(B)は種類の異なる複数のバスの接続形態の一例を示す図である。この例では、基本ユニット3aは雌型のコネクタC4を有している。拡張ユニット4aの左側面には雄型のコネクタC4が設けられている。これらの雌雄のコネクタC4は基本ユニット3aと拡張ユニット4aが通信するための第1バスB1を接続する。拡張ユニット4aの右側面には雌型のコネクタC4が設けられており、他の拡張ユニット4aや連結ユニット15が接続される。連結ユニット15の左側面には雄型のコネクタC4が設けられており、右側面には雌型のコネクタC2が設けられている。拡張ユニット4bの左側面には雄型のコネクタC2が設けられている。このようにコネクタC2によって第2バスを接続している。連結ユニット15は、第2バスB2と第1バスB1とをバス変換するためのバス変換ユニットを備えている。なお、第1バスB1の通信帯域の一部分が、第2バスB2の送受信データを伝送するために割り当てられる。コネクタC4は第1バスB1を接続すればよいため、コネクタC1と比較して小型化することが可能となる。   FIG. 12B is a diagram illustrating an example of a connection form of a plurality of different types of buses. In this example, the basic unit 3a has a female connector C4. A male connector C4 is provided on the left side surface of the expansion unit 4a. These male and female connectors C4 connect the first bus B1 for communication between the basic unit 3a and the expansion unit 4a. A female connector C4 is provided on the right side surface of the expansion unit 4a, and the other expansion unit 4a and the connecting unit 15 are connected thereto. A male connector C4 is provided on the left side of the connection unit 15, and a female connector C2 is provided on the right side. A male connector C2 is provided on the left side surface of the expansion unit 4b. Thus, the second bus is connected by the connector C2. The connection unit 15 includes a bus conversion unit for performing bus conversion between the second bus B2 and the first bus B1. A part of the communication band of the first bus B1 is allocated for transmitting transmission / reception data of the second bus B2. Since the connector C4 only needs to connect the first bus B1, it can be reduced in size compared to the connector C1.

図13は、基本ユニット3aが連結ユニット15と一体化された例を示す図である。この例では、基本ユニット3aの左側面が拡張ユニット4aの右側面と連結するように構成されている。たとえば、基本ユニット3aの左側面には雄型のコネクタC4が設けられており、拡張ユニット4aの右側面に設けられた雌型のコネクタC4に接続される。一方、基本ユニット3aの右側面が拡張ユニット4bの左側面と連結するように構成されている。たとえば、基本ユニット3aの左側面には雄型のコネクタC2が設けられており、基本ユニット3aの右側面に設けられた雌型のコネクタC2に接続される。この場合、基本ユニット3aが連結ユニット15と一体化されているため、第1バスB1と第2バスB2とを変換するバス変換ユニットが不要となる利点がある。   FIG. 13 is a diagram illustrating an example in which the basic unit 3 a is integrated with the connection unit 15. In this example, the left side surface of the basic unit 3a is configured to be connected to the right side surface of the expansion unit 4a. For example, a male connector C4 is provided on the left side surface of the basic unit 3a, and is connected to a female connector C4 provided on the right side surface of the expansion unit 4a. On the other hand, the right side surface of the basic unit 3a is configured to be connected to the left side surface of the expansion unit 4b. For example, a male connector C2 is provided on the left side surface of the basic unit 3a, and is connected to a female connector C2 provided on the right side surface of the basic unit 3a. In this case, since the basic unit 3a is integrated with the connecting unit 15, there is an advantage that a bus conversion unit for converting the first bus B1 and the second bus B2 is not required.

<各ユニットの構成例>
1.基本ユニット3aに第1バスB1と第2バスB2が接続されているケース(その1)
図14は、図11(A)や図12(A)、図13に示した連結構成における基本ユニット3aの機能を示すブロック図である。ここでは、メモリ12とCPU10によって実現される機能を中心に説明する。
<Configuration example of each unit>
1. Case in which the first bus B1 and the second bus B2 are connected to the basic unit 3a (part 1)
FIG. 14 is a block diagram showing functions of the basic unit 3a in the connection configuration shown in FIG. 11A, FIG. 12A, and FIG. Here, the functions realized by the memory 12 and the CPU 10 will be mainly described.

デバイスメモリ41は上述したメモリ12の一部であり、デバイス情報を記憶する。ラダー実行エンジン42はCPU10の一部であり、ラダープログラムを実行するラダー実行部43を備えている。ユニット制御部44はCPU10の一部であり、拡張ユニット4を制御する。ユニット制御部44は、リフレッシュ情報45を保持する保持部(メモリなど)とスキャンタイムにしたがってラダー実行部43を制御したり、入出力のリフレッシュを実行したりする。拡張バスマスタ47は、CPU10の一部であり、拡張ユニット4と通信するためのバスを制御するユニットである。バスマスタ制御部48は、1つまたは複数のバスを統括的に制御する。ユニット管理テーブル49は、各バスに接続されている拡張ユニット4に関する識別情報やユニークなユニット番号などを保持するテーブルである。第1バス通信部50は第1バスB1を介して実行される通信を制御するバスマスタである。第2バス通信部51は第2バスB2を介して実行される通信を制御するバスマスタである。なお、バスマスタ制御部48は、第1バス通信部50および第2バス通信部51を統括的に制御する上位の制御部である。バスマスタ制御部48は、ラダー実行部43やスキャン部46からいずれかの拡張ユニット4への通信要求を受け付けると、ユニット管理テーブル49を参照して当該拡張ユニット4がどのバスに接続されているかを特定し、特定されたバスを管理しているバスマスタに対して当該拡張ユニット4への通信を要求する。ラダー実行エンジン42、ユニット制御部44および拡張バスマスタ47は内部バス52を介してデバイスメモリ41に対してアクセスし、データの読み書きを実行する。なお、ラダー実行部43、スキャン部46およびバスマスタ制御部48は内部バス52を介して通信するように構成されてもよいし、専用線を介して通信するように構成されてもよい。このように内部バス52や専用線によってラダー実行部43、スキャン部46およびバスマスタ制御部48を接続することで、ラダー実行部43、スキャン部46およびバスマスタ制御部48は高速に第1バスB1や第2バスB2などにアクセスできるようになる。なお、ラダー実行部43、スキャン部46およびバスマスタ制御部48は、第2バスB2にアクセスする場合、第1バスB1を介さずに直接アクセスする。   The device memory 41 is a part of the memory 12 described above and stores device information. The ladder execution engine 42 is a part of the CPU 10 and includes a ladder execution unit 43 that executes a ladder program. The unit controller 44 is a part of the CPU 10 and controls the expansion unit 4. The unit control unit 44 controls the ladder execution unit 43 according to the holding unit (memory or the like) that holds the refresh information 45 and the scan time, and executes input / output refresh. The expansion bus master 47 is a part of the CPU 10 and controls a bus for communicating with the expansion unit 4. The bus master control unit 48 comprehensively controls one or a plurality of buses. The unit management table 49 is a table that holds identification information, a unique unit number, and the like regarding the expansion unit 4 connected to each bus. The first bus communication unit 50 is a bus master that controls communication executed via the first bus B1. The second bus communication unit 51 is a bus master that controls communication executed via the second bus B2. The bus master control unit 48 is a higher-level control unit that comprehensively controls the first bus communication unit 50 and the second bus communication unit 51. When the bus master control unit 48 receives a communication request to any one of the expansion units 4 from the ladder execution unit 43 or the scanning unit 46, the bus master control unit 48 refers to the unit management table 49 to determine which bus the expansion unit 4 is connected to. The bus master managing the specified bus is specified, and communication to the extension unit 4 is requested. The ladder execution engine 42, the unit control unit 44, and the expansion bus master 47 access the device memory 41 via the internal bus 52, and read / write data. Note that the ladder execution unit 43, the scan unit 46, and the bus master control unit 48 may be configured to communicate via the internal bus 52, or may be configured to communicate via a dedicated line. By connecting the ladder execution unit 43, the scan unit 46, and the bus master control unit 48 with the internal bus 52 and the dedicated line in this way, the ladder execution unit 43, the scan unit 46, and the bus master control unit 48 can be connected to the first bus B1 and the bus master control unit 48 at high speed. The second bus B2 and the like can be accessed. Note that the ladder execution unit 43, the scan unit 46, and the bus master control unit 48 directly access the second bus B2 without going through the first bus B1.

図15は、拡張ユニット4a、連結ユニット15および拡張ユニット4bに備えられる通信機能を示す図である。拡張ユニット4aは、第1バスB1を介して基本ユニット3aと通信する第1バス通信部54を有している。第1バス通信部54は第1バスB1においてスレーブとして機能する。拡張ユニット4aは、第2バスB2を介して通信しないため第2バスB2用の通信部を有していないが、第2バスB2を通過させるための配線を備え、さらに増幅回路や信号再生回路などを備えてもよい。連結ユニット15は第1バスB1および第2バスB2の両方に関して通信を実行しないため、通信部を備えていない。ただし、連結ユニット15は、第2バスB2を通過させるために必要となる配線を備え、さらに増幅回路や信号再生回路などを備えてもよい。拡張ユニット4bは、第2バスB2を介して基本ユニット3aと通信する第2バス通信部55を有している。第2バス通信部55は第2バスB2においてスレーブとして機能する。このように、第2バスB2は拡張ユニット4aおよび連結ユニット15を通過するだけにすぎないため、信号の遅延が発生しにくい。   FIG. 15 is a diagram illustrating communication functions provided in the extension unit 4a, the connection unit 15, and the extension unit 4b. The expansion unit 4a includes a first bus communication unit 54 that communicates with the basic unit 3a via the first bus B1. The first bus communication unit 54 functions as a slave in the first bus B1. The expansion unit 4a does not have a communication unit for the second bus B2 because it does not communicate via the second bus B2, but includes a wiring for passing the second bus B2, and further includes an amplifier circuit and a signal regeneration circuit. Etc. may be provided. Since the connection unit 15 does not perform communication with respect to both the first bus B1 and the second bus B2, it does not include a communication unit. However, the connection unit 15 includes wiring necessary for passing the second bus B2, and may further include an amplifier circuit, a signal regeneration circuit, and the like. The expansion unit 4b includes a second bus communication unit 55 that communicates with the basic unit 3a via the second bus B2. The second bus communication unit 55 functions as a slave on the second bus B2. Thus, since the second bus B2 only passes through the expansion unit 4a and the connection unit 15, signal delay hardly occurs.

2.基本ユニット3aに第1バスB1と第3バスB3が接続されているケース
図16は、図11(B)に示した連結構成における基本ユニット3aの機能を示すブロック図である。ここでは、メモリ12とCPU10によって実現される機能を中心に説明する。なお、すでに説明済みの構成については同一の参照番号を付与することで説明の簡明化を図る。
2. Case in which the first bus B1 and the third bus B3 are connected to the basic unit 3a FIG. 16 is a block diagram showing functions of the basic unit 3a in the coupled configuration shown in FIG. Here, the functions realized by the memory 12 and the CPU 10 will be mainly described. In addition, about the structure already demonstrated, the simplification of description is achieved by giving the same reference number.

拡張バスマスタ47は第3バスB3を介して実行される通信を制御する第3バス通信部53を有している。第3バス通信部53は第3バスB3についてのバスマスタとして機能する。ラダー実行部43、スキャン部46およびバスマスタ制御部48は、第1バスB1を介さずに第3バスB3を介して第2バスB2にアクセスできるため、高速アクセスが実現される。   The expansion bus master 47 has a third bus communication unit 53 that controls communication executed via the third bus B3. The third bus communication unit 53 functions as a bus master for the third bus B3. Since the ladder execution unit 43, the scan unit 46, and the bus master control unit 48 can access the second bus B2 via the third bus B3 without going through the first bus B1, high-speed access is realized.

図17は、拡張ユニット4a、連結ユニット15および拡張ユニット4bに備えられる通信機能を示す図である。拡張ユニット4aは、第3バスB3を介して通信しないため第3バスB3用の通信部を有していないが、第3バスB3を通過させるための配線を備え、さらに増幅回路や信号再生回路などを備えてもよい。拡張ユニット4aは第3バスB3を通過させるだけにすぎないため、拡張ユニット4aでは信号の遅延が発生しにくい。連結ユニット15は、第1バスB1を介して基本ユニット3aと通信する第1バス通信部56を有している。第1バス通信部56は第1バスB1においてスレーブとして機能する。連結ユニット15は、第3バスB3を介して基本ユニット3aと通信する第3バス通信部57を有している。第3バス通信部57は第3バスB3においてスレーブとして機能する。連結ユニット15は、第2バスB2を介して拡張ユニット4bと通信する第2バス通信部59を有している。第2バス通信部59は第2バスB2においてバスマスタとして機能する。バス変換部58は、第2バスB2を介して実行されている通信データのフォーマットやプロトコルを、第3バスB3における通信データのフォーマットやプロトコルに変換する。また、バス変換部58は、第3バスB3を介して実行されている通信データのフォーマットやプロトコルを、第2バスB2における通信データのフォーマットやプロトコルに変換する。これにより、基本ユニット3aと拡張ユニット4bは第3バスB3および第2バスB2を介して通信できるようになる。なお、バスマスタ制御部48は、第1バスB1を介してバス変換部58に通信タイムアウトを設定したり、第2バスB2に接続されている拡張ユニット4bの情報を取得したりする。よって、基本ユニット3aはバス変換機能を有する拡張ユニット4aとして連結ユニット15を管理してもよい。このように連結ユニット15は連結面を変換するだけでなく、バスの電気的性質についても変換する。   FIG. 17 is a diagram illustrating communication functions provided in the extension unit 4a, the connection unit 15, and the extension unit 4b. The expansion unit 4a does not have a communication unit for the third bus B3 because it does not communicate via the third bus B3. However, the expansion unit 4a includes wiring for passing the third bus B3, and further includes an amplifier circuit and a signal regeneration circuit. Etc. may be provided. Since the extension unit 4a only passes the third bus B3, the extension unit 4a hardly causes a signal delay. The connection unit 15 includes a first bus communication unit 56 that communicates with the basic unit 3a via the first bus B1. The first bus communication unit 56 functions as a slave in the first bus B1. The connection unit 15 includes a third bus communication unit 57 that communicates with the basic unit 3a via the third bus B3. The third bus communication unit 57 functions as a slave on the third bus B3. The connection unit 15 includes a second bus communication unit 59 that communicates with the expansion unit 4b via the second bus B2. The second bus communication unit 59 functions as a bus master in the second bus B2. The bus conversion unit 58 converts the format and protocol of communication data being executed via the second bus B2 into the format and protocol of communication data on the third bus B3. The bus conversion unit 58 converts the format and protocol of communication data being executed via the third bus B3 into the format and protocol of communication data on the second bus B2. As a result, the basic unit 3a and the expansion unit 4b can communicate via the third bus B3 and the second bus B2. Note that the bus master control unit 48 sets a communication timeout in the bus conversion unit 58 via the first bus B1, and acquires information on the expansion unit 4b connected to the second bus B2. Therefore, the basic unit 3a may manage the connection unit 15 as the expansion unit 4a having a bus conversion function. Thus, the connection unit 15 not only converts the connection surface but also converts the electrical properties of the bus.

3.基本ユニット3aに第1バスB1と第2バスB2が接続されているケース(その2)
図18は、図12(A)に示した連結構成における拡張ユニット4a、連結ユニット15a、15bおよび拡張ユニット4bに備えられる通信機能を示す図である。
3. Case in which the first bus B1 and the second bus B2 are connected to the basic unit 3a (part 2)
FIG. 18 is a diagram illustrating communication functions provided in the extension unit 4a, the connection units 15a and 15b, and the extension unit 4b in the connection configuration illustrated in FIG.

このケースでの基本ユニット3aの構成は図14に示したものと同じである。なぜなら、第2バスB2を、拡張ユニット4aの内部を通過させるのか、拡張ユニット4aの外部を通過させるかの違いでしかないからである。なお、拡張ユニット4aの内部には第2バスB2を通過させるための配線等が必要ないため、拡張ユニット4aのコストを低減できる。   The configuration of the basic unit 3a in this case is the same as that shown in FIG. This is because there is only a difference between passing the second bus B2 through the inside of the extension unit 4a or passing through the outside of the extension unit 4a. In addition, since the wiring for passing 2nd bus | bath B2 etc. are unnecessary inside the expansion unit 4a, the cost of the expansion unit 4a can be reduced.

図18において連結ユニット15aは、基本ユニット3aから延在する第2バスB2のバスラインをケーブル63に接続するための第2バス延長部60を有している。なお、第2バス延長部60は増幅回路や信号再生回路などを備えてもよい。もう一方の連結ユニット15bは、ケーブル63を拡張ユニット4b側の第2バスB2のバスラインに接続するための第2バス延長部61を有している。なお、第2バス延長部61も増幅回路や信号再生回路などを備えてもよい。このように第2バス延長部60および第2バス延長部61は、バス変換部58と同様に、中継手段として機能する。   In FIG. 18, the connecting unit 15a has a second bus extension 60 for connecting the bus line of the second bus B2 extending from the basic unit 3a to the cable 63. The second bus extension 60 may include an amplifier circuit, a signal regeneration circuit, and the like. The other connecting unit 15b has a second bus extension 61 for connecting the cable 63 to the bus line of the second bus B2 on the extension unit 4b side. Note that the second bus extension 61 may also include an amplifier circuit, a signal regeneration circuit, and the like. As described above, the second bus extension portion 60 and the second bus extension portion 61 function as relay means, similarly to the bus conversion portion 58.

4.基本ユニット3aに第1バスB1のみが接続されているケース
図19は、図12(B)に示した連結構成における基本ユニット3aの機能を示すブロック図である。上述した第2バス通信部51や第3バス通信部53が存在しないため、バスマスタ制御部48は第1バスB1を介して第2バスB2のバスマスタを制御することになる。
4). Case where only the first bus B1 is connected to the basic unit 3a FIG. 19 is a block diagram showing the function of the basic unit 3a in the connection configuration shown in FIG. Since the second bus communication unit 51 and the third bus communication unit 53 described above do not exist, the bus master control unit 48 controls the bus master of the second bus B2 via the first bus B1.

図20は、拡張ユニット4a、連結ユニット15および拡張ユニット4bに備えられる通信機能を示す図である。拡張ユニット4aは、第1バスB1を介して通信する機能を有していれば十分であるため、第1バス通信部54を備えている。第1バス通信部54は第1バスB1においてスレーブとして機能する。連結ユニット15は、第1バスB1を介して基本ユニット3aと通信する第1バス通信部56を有している。第1バス通信部56も第1バスB1においてスレーブとして機能する。連結ユニット15は、第2バスB2を介して拡張ユニット4bと通信する第2バス通信部59を有している。第2バス通信部59は第2バスB2においてバスマスタとして機能する。バス変換部58は、第2バスB2を介して実行されている通信データのフォーマットやプロトコルを、第1バスB1における通信データのフォーマットやプロトコルに変換する。また、バス変換部58は、第1バスB1を介して実行されている通信データのフォーマットやプロトコルを、第2バスB2における通信データのフォーマットやプロトコルに変換する。これにより、基本ユニット3aと拡張ユニット4bは第1バスB1および第2バスB2を介して通信できるようになる。なお、バスマスタ制御部48は、第1バスB1を介してバス変換部58に通信タイムアウトを設定したり、第2バスB2に接続されている拡張ユニット4bの情報を取得したりする。また、基本ユニット3aはバス変換機能を有する拡張ユニット4aとして連結ユニット15を管理してもよい。連結ユニット15は連結面を変換するだけでなく、バスの電気的性質についても変換する。   FIG. 20 is a diagram illustrating communication functions provided in the extension unit 4a, the connection unit 15, and the extension unit 4b. Since the expansion unit 4a only needs to have a function of communicating via the first bus B1, the expansion unit 4a includes the first bus communication unit 54. The first bus communication unit 54 functions as a slave in the first bus B1. The connection unit 15 includes a first bus communication unit 56 that communicates with the basic unit 3a via the first bus B1. The first bus communication unit 56 also functions as a slave on the first bus B1. The connection unit 15 includes a second bus communication unit 59 that communicates with the expansion unit 4b via the second bus B2. The second bus communication unit 59 functions as a bus master in the second bus B2. The bus conversion unit 58 converts the format and protocol of communication data being executed via the second bus B2 into the format and protocol of communication data in the first bus B1. The bus conversion unit 58 converts the format and protocol of communication data being executed via the first bus B1 into the format and protocol of communication data on the second bus B2. As a result, the basic unit 3a and the expansion unit 4b can communicate with each other via the first bus B1 and the second bus B2. Note that the bus master control unit 48 sets a communication timeout in the bus conversion unit 58 via the first bus B1, and acquires information on the expansion unit 4b connected to the second bus B2. The basic unit 3a may manage the connection unit 15 as the expansion unit 4a having a bus conversion function. The connection unit 15 not only converts the connection surface but also converts the electrical properties of the bus.

<バス制御>
上述したようにPLC2には複数の通信バスが存在するため、それを統括するバスマスタ制御部48が必要となる。また、各通信バスにもバスマスタが必要となる。よって、基本ユニット3aがいずれかの拡張ユニット4と通信するにはその拡張ユニット4がどの通信バスに接続されているかを特定し、その通信バスを管理しているバスマスタを介して当該拡張ユニット4と通信する必要がある。なお、バスマスタは自己が管理しているバスに対して接続されている複数の拡張ユニットの接続順序を把握して通信を制御する。また、ユーザはラダープログラムを作成する上で複数の拡張ユニットの接続順序を識別するためのユニット番号を把握する必要がある。さらに、基本ユニット3aから見た複数の拡張ユニットの接続順序の情報も必要となることがある。これらの接続情報は基本的に一致しないため、各情報の関係を管理する必要がある。つまり、基本ユニット3aから見た拡張ユニット4の接続順序、バスマスタから見た拡張ユニット4の接続順序およびユーザから見た拡張ユニット4のユニット番号の関係が管理されなければならない。本実施の形態ではユニット管理テーブル49を用いてこれらの関係を管理する。
<Bus control>
As described above, since there are a plurality of communication buses in the PLC 2, a bus master control unit 48 that supervises them is required. Each communication bus also requires a bus master. Therefore, in order for the basic unit 3a to communicate with any one of the extension units 4, it is specified which communication bus the extension unit 4 is connected to, and the extension unit 4 via the bus master that manages the communication bus. Need to communicate with. The bus master grasps the connection order of a plurality of expansion units connected to the bus managed by the bus master and controls communication. Further, the user needs to grasp the unit number for identifying the connection order of the plurality of expansion units when creating the ladder program. Furthermore, information on the connection order of a plurality of expansion units viewed from the basic unit 3a may be required. Since these pieces of connection information basically do not match, it is necessary to manage the relationship between the pieces of information. That is, the relationship among the connection order of the expansion units 4 viewed from the basic unit 3a, the connection order of the expansion units 4 viewed from the bus master, and the unit numbers of the expansion units 4 viewed from the user must be managed. In the present embodiment, these relationships are managed using the unit management table 49.

1.基本ユニット3aに第1バスB1と第2バスB2が接続されているケース(その1)
ここでは、説明の便宜上、図11(A)に示したケースをさらに拡張し、基本ユニット3aと連結ユニット15との間に2つの拡張ユニット4aが接続され、連結ユニット15に対して2つの拡張ユニット4bが接続されている事例を用いることにする。
1. Case in which the first bus B1 and the second bus B2 are connected to the basic unit 3a (part 1)
Here, for convenience of explanation, the case shown in FIG. 11A is further expanded, and two expansion units 4a are connected between the basic unit 3a and the coupling unit 15, and two expansion units are connected to the coupling unit 15. A case where the unit 4b is connected will be used.

図21(A)は、基本ユニットに対する拡張ユニットの接続例と、各ユニット付与される識別情報の一例を示している。図21(A)が示すように、基本ユニット3aに対して拡張ユニット4a1、4a2が接続され、さらに、連結ユニット15を介して拡張ユニット4b1、4b2が接続されている。ここでは、基本ユニット3aに、第1バスB1のバスマスタと機能している第1通信部50(バスマスタAと呼ぶことにする。)と第2バスB2のバスマスタと機能している第2通信部51(バスマスタBと呼ぶことにする。)とが接続されている。なお、連結ユニット15が連結面の違いを吸収する単純なユニットにすぎない場合、連結ユニット15は識別情報が付与されなくてもよい。   FIG. 21A shows an example of connection of an extension unit to a basic unit and an example of identification information given to each unit. As shown in FIG. 21A, the extension units 4a1, 4a2 are connected to the basic unit 3a, and the extension units 4b1, 4b2 are further connected via the connecting unit 15. Here, in the basic unit 3a, a first communication unit 50 (referred to as bus master A) that functions as the bus master of the first bus B1 and a second communication unit that functions as the bus master of the second bus B2. 51 (referred to as bus master B). In addition, when the connection unit 15 is only a simple unit that absorbs the difference in connection surface, the connection unit 15 may not be provided with identification information.

図21(B)は、ユニット管理テーブルの一例を示す図である。ユニット管理テーブル49には、ユニット番号、バスマスタの識別情報およびバスマスタから見た接続順序の情報があれば十分である。しかし、ここでは、説明の便宜上、基本ユニット3aから見た接続順序とユニット名についても追加している。   FIG. 21B is a diagram illustrating an example of the unit management table. It suffices if the unit management table 49 has the unit number, the identification information of the bus master, and the information of the connection order viewed from the bus master. However, here, for convenience of explanation, the connection order and unit name as seen from the basic unit 3a are also added.

図21(A)が示すように基本ユニット3aやそこに内蔵されているバスマスタには0が付与される。基本ユニット3aから見た接続順序では、各ユニットには基本ユニット3aから遠ざかるにつれて順番に1つずつ増加した番号が付与されている。ユニット番号に関して、各ユニットには基本ユニット3aから遠ざかるにつれて順番に1つずつ増加した番号が付与されるが、連結ユニット15はラダープログラムに関与しないため、ユニット番号が付与されない。バスマスタから見た接続順序に関しては、バスマスタを0とし、バスマスタから遠ざかるにつれて順番に1つずつ増加した番号が各拡張ユニットに付与される。なお、連結ユニット15はバス通信を行わないため、バスマスタから見た接続順序としての番号は付与されない。   As shown in FIG. 21A, 0 is given to the basic unit 3a and the bus master incorporated therein. In the connection order as seen from the basic unit 3a, each unit is given a number that increases one by one as the distance from the basic unit 3a increases. As for the unit number, each unit is given a number that increases one by one in order as it moves away from the basic unit 3a. However, since the connecting unit 15 is not involved in the ladder program, no unit number is given. With respect to the connection order as seen from the bus master, the bus master is set to 0, and a number that is incremented by 1 as the distance from the bus master increases. In addition, since the connection unit 15 does not perform bus communication, a number as a connection order viewed from the bus master is not given.

基本ユニット3aから見た接続順序が必要となる理由について説明する。基本ユニット3aから見た接続順序とユニット番号とはよく似た接続情報であるが、ユニット番号はユーザによってラダープログラムを通じて設定され、基本ユニット3aから見た接続順序はスキャン部46またバスマスタ制御部48によって設定される点で異なっている。たとえば、基本ユニット3aにプログラム作成支援装置1を接続し、プログラム作成支援装置1から基本ユニット3aを介して拡張ユニット4のファームウエアを更新する際には、基本ユニット3aから見た接続順序を用いて当該拡張ユニット4が認識される。また、他の通信ネットワークと通信する機能を備えた拡張ユニット4によって更新プログラムを受信し、基本ユニット3aのプログラム(ファームウエア)を更新する際に、基本ユニット3aは、基本ユニット3aから見た接続順序を用いて当該拡張ユニット4を認識する。このように基本ユニット3aから見た接続順序は、ユーザによってユニット番号が指定されていない状態で各ユニットを識別するのに役立つ。   The reason why the connection order viewed from the basic unit 3a is necessary will be described. The connection order and unit number viewed from the basic unit 3a are similar connection information, but the unit number is set by the user through a ladder program, and the connection order viewed from the basic unit 3a is determined by the scanning unit 46 or the bus master control unit 48. It differs in that it is set by. For example, when the program creation support apparatus 1 is connected to the basic unit 3a and the firmware of the expansion unit 4 is updated from the program creation support apparatus 1 via the basic unit 3a, the connection order viewed from the base unit 3a is used. Then, the extension unit 4 is recognized. When the extension unit 4 having the function of communicating with another communication network receives the update program and updates the program (firmware) of the basic unit 3a, the basic unit 3a is connected as viewed from the basic unit 3a. The extension unit 4 is recognized using the order. Thus, the connection order viewed from the basic unit 3a is useful for identifying each unit in a state where no unit number is designated by the user.

図21(C)はリフレッシュ情報45の一例を示す図である。リフレッシュ情報45には、リフレッシュの対象となる拡張ユニットのユニット番号が格納されている。スキャン部46はリフレッシュ情報45を参照することで、リフレッシュの対象となる拡張ユニットを特定する。   FIG. 21C shows an example of the refresh information 45. As shown in FIG. The refresh information 45 stores the unit number of the extension unit to be refreshed. The scanning unit 46 refers to the refresh information 45 to identify the extension unit to be refreshed.

図22はリフレッシュの各工程を示すフローチャートである。スキャン部46はリフレッシュの実行タイミングが到来すると、リフレッシュを開始する。   FIG. 22 is a flowchart showing each refresh process. The scan unit 46 starts the refresh when the refresh execution timing comes.

S1でスキャン部46はリフレッシュの対象となっている拡張ユニットを特定する。たとえば、スキャン部46はリフレッシュ情報45を参照して対象ユニットのユニット番号を取得する。図21(C)に示したリフレッシュ情報45によれば、ユニット番号として1番、2番および4番が取得される。   In S <b> 1, the scanning unit 46 specifies an extension unit that is a refresh target. For example, the scanning unit 46 refers to the refresh information 45 and acquires the unit number of the target unit. According to the refresh information 45 shown in FIG. 21C, unit numbers 1, 2, and 4 are acquired.

S2でスキャン部46は特定した対象ユニットのユニット番号に関連付けられているバスマスタの識別情報と、そのバスマスタから見た接続順序を示す情報をユニット管理テーブル49から取得する。たとえば、図21(B)によれば4番のユニット番号に関して、バスマスタBと接続順序として2番が特定される。   In S <b> 2, the scan unit 46 acquires the identification information of the bus master associated with the unit number of the identified target unit and information indicating the connection order viewed from the bus master from the unit management table 49. For example, according to FIG. 21B, the second unit number is specified as the connection order with the bus master B for the fourth unit number.

S3でスキャン部46は特定したバスマスタに対して、リフレッシュ対象ユニットの接続順序を指定し、リフレッシュの実行を命令する。バスマスタは当該命令に従って、指定された接続順序の拡張ユニットに対してリフレッシュを実行する。図21(A)によれば、4番のユニット番号は拡張ユニット4b2に付与されている。また、バスマスタBは、第2通信部51である。よって、スキャン部46はバスマスタ制御部48を通じて第2通信部51に対してリフレッシュ命令と、拡張ユニット4b2を示す接続順序の情報を送信する。第2通信部51は、接続順序として2番が付与されている拡張ユニット4b2に対してリフレッシュを実行する。   In S <b> 3, the scan unit 46 specifies the connection order of the refresh target units and instructs the specified bus master to execute refresh. In accordance with the instruction, the bus master performs refresh on the extension unit in the designated connection order. According to FIG. 21A, the unit number 4 is assigned to the expansion unit 4b2. The bus master B is the second communication unit 51. Therefore, the scan unit 46 transmits a refresh command and connection order information indicating the expansion unit 4b2 to the second communication unit 51 through the bus master control unit 48. The second communication unit 51 performs refresh on the extension unit 4b2 to which the second connection order is assigned.

なお、S1ないしS3は、すべて対象ユニットについてリフレッシュが完了するまで繰り返し実行される。   Note that S1 to S3 are all repeatedly executed until refresh is completed for the target unit.

このようにユニット管理テーブル49を採用することで、第1バスB1に接続された拡張ユニット4aや第2バスB2に接続された拡張ユニット4bが混在しても、ユーザは、それを意識することなく、ラダープログラムにおいて各ユニットにユニット番号を付与することができる。   By adopting the unit management table 49 in this way, even if the expansion unit 4a connected to the first bus B1 and the expansion unit 4b connected to the second bus B2 are mixed, the user is aware of it. Instead, a unit number can be assigned to each unit in the ladder program.

ユニット管理テーブル49が参照される他の事例について説明する。ラダー実行部43はラダープログラムにしたがっていずれかの拡張ユニット4に対してアクセスし、データを読み出したり、書き込んだりすることがある。つまり、リフレッシュのタイミング以外であっても拡張ユニット4に対してアクセスが発生することがある。これをダイレクト処理と呼ぶことにする。   Another example in which the unit management table 49 is referred will be described. The ladder execution unit 43 may access one of the extension units 4 according to a ladder program, and may read or write data. In other words, access to the expansion unit 4 may occur even at times other than the refresh timing. This is called direct processing.

図23はダイレクト処理を含むラダープログラムの一例を示す図である。ラダープログラムは、たとえば、1ミリ秒など、一定のスキャンタイムごとに繰り返し実行される。つまり、1ミリ秒ごとにリフレッシュが実行されるため、1ミリ秒待たなければ拡張ユニットからデータを取得したり書き込んだりすることができない。しかし、1ミリ秒も待たずに拡張ユニットにアクセスする必要がある場合もある。そこで、ラダー言語にはダイレクト処理を実行するための命令語が用意されている。   FIG. 23 is a diagram illustrating an example of a ladder program including direct processing. The ladder program is repeatedly executed at regular scan times such as 1 millisecond. That is, since refresh is executed every 1 millisecond, data cannot be acquired or written from the expansion unit unless waiting for 1 millisecond. However, it may be necessary to access the expansion unit without waiting for a millisecond. Therefore, an instruction word for executing direct processing is prepared in the ladder language.

図23において、MR1000は、基本ユニット3aに内蔵されているリレーを示している。このラダープログラムによれば、リレーMR1000がオンになると2つの処理を実行することになる。UREADは拡張ユニットからデータを読み出す命令後である。1つ目の処理で、ラダー実行部43は、ユニット番号として1番を付与されている拡張ユニット4のデバイスDM100で示されるアドレスを先頭としてワード分のデータを読み出し、デバイスメモリ41内のDM1000で示されるアドレスを先頭として書き込む。より詳細に説明すると、ラダー実行部43は、ラダープログラムによって指定されているユニット番号に基づきユニット管理テーブル49を参照し、対応するバスマスタと接続順序の情報を取得する。ユニット管理テーブル49によればバスマスタはA、つまり、第1バス通信部50であり、接続順序は1番と判明する。ラダー実行部43は、バスマスタ制御部48を通じて第1バス通信部50に対して接続順序として1番を付与されている拡張ユニット4a1からデバイスD100で示されるアドレスを先頭としてワード分のデータを読み出すよう指示する。   In FIG. 23, MR1000 indicates a relay built in the basic unit 3a. According to this ladder program, when the relay MR1000 is turned on, two processes are executed. UREAD is after an instruction to read data from the expansion unit. In the first process, the ladder execution unit 43 reads data for a word starting from the address indicated by the device DM100 of the expansion unit 4 to which unit number 1 is assigned, and the DM1000 in the device memory 41 reads the data. Write at the indicated address. More specifically, the ladder execution unit 43 refers to the unit management table 49 based on the unit number specified by the ladder program, and acquires the corresponding bus master and connection order information. According to the unit management table 49, the bus master is A, that is, the first bus communication unit 50, and the connection order is determined to be No. 1. The ladder execution unit 43 reads the data for the word from the expansion unit 4a1 assigned the first connection order to the first bus communication unit 50 through the bus master control unit 48, starting from the address indicated by the device D100. Instruct.

2つ目の処理で、ラダー実行部43は、ユニット番号として3番を付与されている拡張ユニット4のデバイスDM200で示されるアドレスを先頭としてワード分のデータを読み出し、デバイスメモリ41内のDM2000で示されるアドレスを先頭として書き込む。より詳細に説明すると、ラダー実行部43は、ラダープログラムによって指定されているユニット番号に基づきユニット管理テーブル49を参照し、対応するバスマスタと接続順序の情報を取得する。バスマスタはB、つまり、第2バス通信部51であり、接続順序は1番と判明する。ラダー実行部43は、バスマスタ制御部48を通じて第2バス通信部51に対して接続順序として1番を付与されている拡張ユニット4b1からデバイスDM200で示されるアドレスを先頭としてワード分のデータを読み出すよう指示する。   In the second process, the ladder execution unit 43 reads data for a word starting from the address indicated by the device DM 200 of the expansion unit 4 that is given unit number 3, and the DM 2000 in the device memory 41 reads the data. Write at the indicated address. More specifically, the ladder execution unit 43 refers to the unit management table 49 based on the unit number specified by the ladder program, and acquires the corresponding bus master and connection order information. The bus master is B, that is, the second bus communication unit 51, and the connection order is determined to be No. 1. The ladder execution unit 43 reads data for words starting from the address indicated by the device DM200 from the expansion unit 4b1 assigned the first connection order to the second bus communication unit 51 through the bus master control unit 48. Instruct.

このようにユニット管理テーブル49はスキャン部46やラダー実行部43、バスマスタ制御部48によって利用される。   Thus, the unit management table 49 is used by the scanning unit 46, the ladder execution unit 43, and the bus master control unit 48.

図24(A)は、基本ユニットに対する拡張ユニットの接続例と、各ユニット付与される識別情報の一例を示している。なお、ここでは、図16および図17を用いて説明した基本ユニット3a、拡張ユニット4a、4bおよび連結ユニット15が採用されているものとする。バスマスタAは第1バス通信部50であり、バスマスタBは第2バス通信部59であり、バスマスタCは第3バス通信部53である。すでに説明した部分については説明を簡明化する。   FIG. 24A shows an example of connection of the extension unit to the basic unit and an example of identification information given to each unit. Here, it is assumed that the basic unit 3a, the extension units 4a and 4b, and the connecting unit 15 described with reference to FIGS. 16 and 17 are employed. The bus master A is the first bus communication unit 50, the bus master B is the second bus communication unit 59, and the bus master C is the third bus communication unit 53. The explanation will be simplified for the parts already explained.

図24(A)が示すように、連結ユニット15にバスマスタBとして第2バス通信部59が搭載されており、第2バス通信部59が第2バスB2を制御している。上述したように、第2バスB2はバス変換部58によって変換され第3バスB3を介して基本ユニット3aに接続されている。つまり、連結ユニット15の第2バス通信部59には、バスマスタCとして機能する第3バス通信部53によって制御されるスレーブとして接続順序が付与されている。連結ユニット15の接続順序は1番である。なお、バスマスタ制御部48は、第3バス通信部53を通じて第3バスB3に接続されている拡張ユニットの問い合わせ、これに対して、連結ユニット15の第2バス通信部59が返答する。第3バス通信部53は、第3バスB3に拡張ユニットとして第2バス通信部59が接続されていることを認識し、バスマスタ制御部48に報告する。これにより、バスマスタ制御部48は、第3バスB3に第2バスB2のバスマスタBである第2バス通信部59が接続されていることを認識する。次に、バスマスタ制御部48は、第3バス通信部53を通じて第2バス通信部59にアクセスし、第2バスB2に接続している拡張ユニットを問い合わせ、報告された拡張ユニットに基本ユニットから見た接続順序を示す番号を付与するともに、ユニット番号を付与する。このようにしてユニット管理テーブル49が作成される。   As shown in FIG. 24A, the second bus communication unit 59 is mounted as the bus master B in the connection unit 15, and the second bus communication unit 59 controls the second bus B2. As described above, the second bus B2 is converted by the bus converter 58 and connected to the basic unit 3a via the third bus B3. That is, the second bus communication unit 59 of the connection unit 15 is given a connection order as a slave controlled by the third bus communication unit 53 that functions as the bus master C. The connection order of the connecting units 15 is No. 1. The bus master control unit 48 inquires about the expansion unit connected to the third bus B3 through the third bus communication unit 53, and the second bus communication unit 59 of the connection unit 15 responds to the inquiry. The third bus communication unit 53 recognizes that the second bus communication unit 59 is connected to the third bus B3 as an expansion unit, and reports to the bus master control unit 48. Thereby, the bus master control unit 48 recognizes that the second bus communication unit 59 which is the bus master B of the second bus B2 is connected to the third bus B3. Next, the bus master control unit 48 accesses the second bus communication unit 59 through the third bus communication unit 53, inquires about the expansion unit connected to the second bus B2, and views the reported expansion unit from the basic unit. A number indicating the connection order and a unit number are assigned. In this way, the unit management table 49 is created.

図24(B)は、ユニット管理テーブルの一例を示す図である。ユニット管理テーブル49によれば連結ユニット15にはユニット番号が付与されていないが、バスマスタCに接続された1番目のユニットであることが示されている。また、バスマスタ制御部48は、第1バスB1を通じて連結ユニット15のバス変換部58と通信し、第2バスB2に接続されている拡張ユニット4b1、4b2の情報を取得する。たとえば、バスマスタ制御部48は、ユニット番号に基づき拡張ユニット4b1に対するアクセスが発生すると、バスマスタCを通じてバスマスタBと通信し、拡張ユニット4b1に対してアクセスする。   FIG. 24B is a diagram illustrating an example of the unit management table. According to the unit management table 49, although the unit number is not given to the connection unit 15, it is shown that it is the first unit connected to the bus master C. In addition, the bus master control unit 48 communicates with the bus conversion unit 58 of the connection unit 15 through the first bus B1, and acquires information on the expansion units 4b1 and 4b2 connected to the second bus B2. For example, when access to the expansion unit 4b1 occurs based on the unit number, the bus master control unit 48 communicates with the bus master B through the bus master C and accesses the expansion unit 4b1.

図25(A)は、基本ユニットに対する拡張ユニットの接続例と、各ユニット付与される識別情報の一例を示している。なお、ここでは、図19および図20を用いて説明した基本ユニット3a、拡張ユニット4a、4bおよび連結ユニット15が採用されているものとする。バスマスタAは第1バス通信部50であり、バスマスタBは第2バス通信部59である。すでに説明した部分については説明を簡明化する。   FIG. 25A shows an example of connection of an extension unit to a basic unit and an example of identification information given to each unit. Here, it is assumed that the basic unit 3a, the extension units 4a and 4b, and the connecting unit 15 described with reference to FIGS. 19 and 20 are employed. The bus master A is the first bus communication unit 50, and the bus master B is the second bus communication unit 59. The explanation will be simplified for the parts already explained.

図25(A)が示すように、連結ユニット15にバスマスタBとして第2バス通信部59が搭載されており、第2バス通信部59が第2バスB2を制御している。上述したように、第2バスB2はバス変換部58によって変換され第1バスB1を介して基本ユニット3aに接続されている。また、連結ユニット15は、バスマスタAとして機能する第1バス通信部50によって制御されるスレーブとして接続順序が付与されている。バスマスタAから見た連結ユニット15の接続順序は3番である。   As shown in FIG. 25A, the second bus communication unit 59 is mounted as the bus master B in the connection unit 15, and the second bus communication unit 59 controls the second bus B2. As described above, the second bus B2 is converted by the bus converter 58 and connected to the basic unit 3a via the first bus B1. The connection unit 15 is given a connection order as a slave controlled by the first bus communication unit 50 functioning as the bus master A. The connection order of the connecting units 15 as viewed from the bus master A is No. 3.

図25(B)は、ユニット管理テーブルの一例を示す図である。ユニット管理テーブル49によれば連結ユニット15にはユニット番号が付与されていないが、バスマスタAに接続された3番目のユニットであることが示されている。また、バスマスタ制御部48は、第1バスB1を通じて連結ユニット15のバス変換部58と通信し、第2バスB2に接続されている拡張ユニット4b1、4b2の情報を取得する。たとえば、バスマスタ制御部48は、ユニット番号に基づき拡張ユニット4b1に対するアクセスが発生すると、バスマスタAである第1バス通信部50を通じてバスマスタBであるバス変換部58および第2バス通信部59と通信し、拡張ユニット4b1に対してアクセスする。なお、バスマスタ制御部48が第2バスB2に接続されている拡張ユニット4bの情報をバス変換部58に問い合わせると、第2バス通信部59を介して拡張ユニット4bの情報を取得して、バスマスタ制御部48に返信する。この処理は、たとえば、第1バス通信部50は、自己に接続されているユニットを列挙する際に実行されうる。   FIG. 25B is a diagram illustrating an example of the unit management table. According to the unit management table 49, although the unit number is not given to the connection unit 15, it is shown that it is the third unit connected to the bus master A. In addition, the bus master control unit 48 communicates with the bus conversion unit 58 of the connection unit 15 through the first bus B1, and acquires information on the expansion units 4b1 and 4b2 connected to the second bus B2. For example, when an access to the expansion unit 4b1 occurs based on the unit number, the bus master control unit 48 communicates with the bus conversion unit 58 and the second bus communication unit 59 that are the bus master B through the first bus communication unit 50 that is the bus master A. The expansion unit 4b1 is accessed. When the bus master control unit 48 inquires of the bus conversion unit 58 about the information on the expansion unit 4b connected to the second bus B2, the bus master control unit 48 acquires the information on the expansion unit 4b via the second bus communication unit 59 to obtain the bus master. It returns to the control unit 48. This process can be executed, for example, when the first bus communication unit 50 lists units connected to itself.

上述した実施の形態では基本ユニット3aの右側に複数の拡張ユニット4を接続する例を主に取り上げたが、基本ユニット3aの左側に複数の拡張ユニット4を接続するPLCや、基本ユニット3aの両側に複数の拡張ユニット4を接続するPLCでもあって上記の技術思想は適用可能である。   In the above-described embodiment, the example in which the plurality of extension units 4 are connected to the right side of the basic unit 3a is mainly taken up. However, the PLC that connects the plurality of extension units 4 to the left side of the basic unit 3a, or both sides of the base unit 3a. The above-described technical idea is also applicable to a PLC that connects a plurality of extension units 4 to each other.

<PLCの設定GUI>
PLC2で実行されるラダープログラムを含むプロジェクトデータはプログラム作成支援装置1によって作成される。ユーザは基本ユニット3aに接続されている拡張ユニット4に対して左から順番に1から始まるユニット番号を付与することで、拡張ユニット4を区別する。この区別はラダープログラム上での区別を意味する。
<PLC setting GUI>
Project data including a ladder program executed by the PLC 2 is created by the program creation support apparatus 1. The user distinguishes the expansion units 4 by assigning unit numbers starting from 1 to the expansion units 4 connected to the basic unit 3a in order from the left. This distinction means distinction on the ladder program.

ところで、プログラム作成支援装置1はユーザのプログラミング作業をアシストするためにGUI(グラフィカルユーザインタフェース)を提供している。たとえば、基本ユニット3aとして使用される基本ユニット(CPUユニット)を選択するためのリストを表示したり、拡張ユニット4のリストを表示したりする。プログラム作成支援装置1は選択された基本ユニットを示すシンボル画像(文字情報であってもよい)を表示部7に表示し、次に選択された拡張ユニットのシンボル画像を、基本ユニットを示すシンボル画像の隣に表示する。また、プログラム作成支援装置1は拡張ユニットの配置位置にしたがってユニット番号を付与する。たとえば、ユーザはGUI上で拡張ユニットのシンボル画像や識別情報をドラッグアンドドロップすることで基本ユニットのシンボル画像に対して拡張ユニットのシンボル画像を連結して行き、プログラム作成支援装置1は拡張ユニットの配置位置にしたがってユニット番号を決定する。これによりユーザは簡単にユニット番号を付与することが可能となる。また、ユーザはGUI上でシンボル画像を移動するだけで複数の拡張ユニットの並びも変更でき、ユニット番号もプログラム作成支援装置1によって更新される。なお、プログラム作成支援装置1の機能のうち、基本ユニット3や第1拡張ユニットおよび第2拡張ユニットの配置に関するユニット構成情報の設定機能を少なくとも有した設定支援装置が提供されてもよい。ここでは、説明の便宜上、プログラム作成支援機能も含むプログラム作成支援装置1としてユニット構成情報の設定支援装置について説明する。ユニット構成情報には、各ユニットを識別するためのユニット番号が含まれることになる。なお、ラダープログラムを作成して基本ユニット3に転送する支援装置と、ユニット構成情報を作成して基本ユニット3に転送する支援装置とはそれぞれ別々に用意されてもよい。   By the way, the program creation support device 1 provides a GUI (Graphical User Interface) to assist the user's programming work. For example, a list for selecting a basic unit (CPU unit) used as the basic unit 3a is displayed, or a list of the expansion units 4 is displayed. The program creation support apparatus 1 displays a symbol image (which may be character information) indicating the selected basic unit on the display unit 7, and then displays the symbol image of the selected extension unit as a symbol image indicating the basic unit. Display next to Further, the program creation support apparatus 1 assigns unit numbers according to the arrangement positions of the extension units. For example, the user drags and drops the symbol image or identification information of the extension unit on the GUI to connect the symbol image of the extension unit to the symbol image of the basic unit. The unit number is determined according to the arrangement position. As a result, the user can easily assign a unit number. In addition, the user can change the arrangement of a plurality of expansion units simply by moving the symbol image on the GUI, and the unit number is also updated by the program creation support apparatus 1. Of the functions of the program creation support apparatus 1, a setting support apparatus having at least a function for setting unit configuration information related to the arrangement of the basic unit 3, the first extension unit, and the second extension unit may be provided. Here, for convenience of explanation, a unit configuration information setting support device will be described as the program creation support device 1 including a program creation support function. The unit configuration information includes a unit number for identifying each unit. The support device that creates the ladder program and transfers it to the basic unit 3 and the support device that creates the unit configuration information and transfers it to the basic unit 3 may be prepared separately.

上述したように種類の異なる拡張ユニット4a、4bが混在する場合は、拡張ユニット4a、4bの物理的な配置位置は制限される。たとえば、拡張ユニット4bは連結ユニット15の右側にしか配置できないし、拡張ユニット4aは連結ユニット15の左側にしか配置できない。よって、拡張ユニットの配置位置を指定してユニット番号を付与するGUIにおいても拡張ユニット4a、4bの配置位置は制限されなければならない。   As described above, when different types of expansion units 4a and 4b are mixed, the physical arrangement positions of the expansion units 4a and 4b are limited. For example, the expansion unit 4 b can be arranged only on the right side of the connection unit 15, and the expansion unit 4 a can be arranged only on the left side of the connection unit 15. Therefore, the arrangement positions of the expansion units 4a and 4b must be limited even in the GUI that designates the arrangement positions of the expansion units and assigns unit numbers.

図26はGUIの一例を示す図である。CPU24は表示部7にGUIを表示する。この例では、CPU機種リスト65に列挙されているいずれかの基本ユニットが操作部8の操作に連動して移動するポインタ64により選択される。この例では基本ユニットA1という機種名の基本ユニットが選択されている。機種名に代えて型番が表示されてもよいし、機種名と型番が同時に表示されてもよいし、その機種についての説明なども表示されてもよい。選択された基本ユニットがポインタ64によりドラッグされてレイアウトエリア67内でドロップされると、基本ユニットの配置位置が決定され、レイアウトエリア67の左端に基本ユニットのシンボル画像が表示される。CPU機種リスト65にはシンボル画像が表示されてもよいし、機種名が表示されてもよい。シンボル画像は、機種名を示す文字情報とともに、ユニットの画像が含まれていてもよい。シンボル画像は、実際のユニットの正面の画像であってもよい。   FIG. 26 is a diagram illustrating an example of a GUI. The CPU 24 displays a GUI on the display unit 7. In this example, one of the basic units listed in the CPU model list 65 is selected by the pointer 64 that moves in conjunction with the operation of the operation unit 8. In this example, a basic unit having a model name of basic unit A1 is selected. The model number may be displayed instead of the model name, the model name and the model number may be displayed at the same time, or an explanation about the model may be displayed. When the selected basic unit is dragged by the pointer 64 and dropped in the layout area 67, the arrangement position of the basic unit is determined, and a symbol image of the basic unit is displayed at the left end of the layout area 67. The CPU model list 65 may display a symbol image or a model name. The symbol image may include a unit image together with character information indicating the model name. The symbol image may be an image in front of an actual unit.

図27はGUIの一例を示す図である。基本ユニットの配置が完了すると、次は、拡張ユニットの選択が実行される。CPU24は選択された基本ユニットに接続可能な拡張ユニットを列挙した拡張ユニットリスト66を表示部7に表示する。拡張ユニットリスト66に列挙されているいずれかの拡張ユニットがポインタ64により選択され、CPU24は選択された拡張ユニットを認識する。この例では、基本ユニットA1に対して直接接続可能な拡張ユニットa1が選択されている。選択された拡張ユニットがポインタ64によりドラッグされてレイアウトエリア67内でドロップされると、CPU24は、ドロップされた位置に最も近い配置可能な位置を拡張ユニットの配置位置として決定し、レイアウトエリア67に拡張ユニットのシンボル画像を表示する。なお、CPU24は拡張ユニットを左詰めで配置してゆく。なぜなら、左端に基本ユニットが配置されるからである。ただし、2つ以上の同種の拡張ユニットがすでにレイアウトエリア67に表示されている場合、CPU24は、ドロップ位置に応じて2つの拡張ユニットの間に他の同種の拡張ユニットを挿入してもよい。この場合、すでに配置されていた拡張ユニットの接続順序やユニット番号等が、新しい接続順序に応じて更新される。   FIG. 27 is a diagram illustrating an example of a GUI. When the arrangement of the basic unit is completed, the extension unit is selected next. The CPU 24 displays an expansion unit list 66 listing the expansion units connectable to the selected basic unit on the display unit 7. Any expansion unit listed in the expansion unit list 66 is selected by the pointer 64, and the CPU 24 recognizes the selected expansion unit. In this example, the expansion unit a1 that can be directly connected to the basic unit A1 is selected. When the selected extension unit is dragged by the pointer 64 and dropped in the layout area 67, the CPU 24 determines the position where the extension unit can be arranged closest to the dropped position as the arrangement position of the extension unit. Displays the symbol image of the expansion unit. The CPU 24 arranges the expansion units left justified. This is because the basic unit is arranged at the left end. However, when two or more same-type extension units are already displayed in the layout area 67, the CPU 24 may insert another same-type extension unit between the two extension units according to the drop position. In this case, the connection order, unit number, and the like of the expansion units that have already been arranged are updated according to the new connection order.

図28はGUIの一例を示す図である。この例では、基本ユニットA1に対しては直接接続できない拡張ユニットb1がポインタ64により選択され、レイアウトエリア67内でドロップされている。選択された拡張ユニットb1が基本ユニットA1に対して直接接続できないため、CPU24は、基本ユニットA1に接続されている複数の拡張ユニットのうち最も右端に位置している拡張ユニットa1の右に連結ユニットを追加し、連結ユニットの右隣り位置するように拡張ユニットb1の配置位置を決定している。なお、拡張ユニットa1、a2など、基本ユニットA1に対して直接接続可能な拡張ユニットであれば、基本ユニットA1と連結ユニットとの間であればどこにでも追加で配置可能である。ただし、CPU24は、連結ユニットの右側には拡張ユニットa1、a2を配置できないように制限する。また、拡張ユニットb1、b2など、基本ユニットA1に対して直接接続できない拡張ユニットであれば、連結ユニットの右側であればどこにでも追加で配置可能である。ただし、CPU24は、連結ユニットの左には拡張ユニットb1、b2を配置できないように制限する。   FIG. 28 is a diagram illustrating an example of a GUI. In this example, the extension unit b 1 that cannot be directly connected to the basic unit A 1 is selected by the pointer 64 and dropped in the layout area 67. Since the selected expansion unit b1 cannot be directly connected to the basic unit A1, the CPU 24 is connected to the right of the expansion unit a1 positioned at the rightmost among the plurality of expansion units connected to the basic unit A1. Is added, and the arrangement position of the expansion unit b1 is determined so as to be located right next to the connecting unit. In addition, as long as it is an expansion unit that can be directly connected to the basic unit A1, such as the expansion units a1 and a2, it can be additionally arranged anywhere between the basic unit A1 and the connecting unit. However, the CPU 24 restricts the expansion units a1 and a2 from being arranged on the right side of the connection unit. In addition, if the extension unit cannot be directly connected to the basic unit A1, such as the extension units b1 and b2, it can be additionally arranged anywhere on the right side of the connecting unit. However, the CPU 24 restricts the expansion units b1 and b2 from being arranged on the left side of the connection unit.

図29はGUIの一例を示す図である。この例では、基本ユニットA1に対して拡張ユニットa1、a2などが配置されていない状態で拡張ユニットb2がポインタ64によって選択され、レイアウトエリア67内にドロップされている。選択された拡張ユニットb1が基本ユニットA1に対して直接接続できないため、CPU24は、基本ユニットA1の右に連結ユニットを追加し、さらに連結ユニットの右となるように拡張ユニットb1の配置位置を決定している。このように連結ユニットが必要となる拡張ユニットをユーザがレイアウトエリア67に配置しようとすると、CPU24は連結ユニットを自動で追加する。よって、ユーザは、連結ユニットをどこに配置すればよいかを悩む必要はなく、手動での連結ユニットの追加作業も必要ない。   FIG. 29 is a diagram illustrating an example of a GUI. In this example, the extension unit b2 is selected by the pointer 64 in a state where the extension units a1, a2, etc. are not arranged with respect to the basic unit A1, and is dropped in the layout area 67. Since the selected extension unit b1 cannot be directly connected to the basic unit A1, the CPU 24 adds a connecting unit to the right of the basic unit A1, and further determines the arrangement position of the extension unit b1 to be to the right of the connecting unit. doing. When the user attempts to place an expansion unit that requires a connection unit in the layout area 67, the CPU 24 automatically adds the connection unit. Therefore, the user does not need to worry about where to place the connecting unit, and does not need to add the connecting unit manually.

図30はGUIの一例を示す図である。この例では、基本ユニットA1に対して拡張ユニットa1、連結ユニットおよび拡張ユニットb1などが配置されている状態で、拡張ユニットb2がポインタ64によって選択され、レイアウトエリア67内にドロップされている。ドロップされた位置は、拡張ユニットa1と連結ユニットとの間付近である。CPU24は、ドロップ位置がどのユニットの連結面に近いかを、連結面の座標とドロップ位置の座標とを比較することで認識する。連結面の座標は、レイアウトエリア67に表示されているオブジェクト(ユニットのシンボル画像)の座標を参照することで、得られる。上述したように拡張ユニットb1、b2は連結ユニットの右側にしか配置できない。よって、CPU24は、ドロップ位置には拡張ユニットb2を配置できないと判定し、警告メッセージ69を出力する。ここでは、警告メッセージ69が表示部7に表示されるが、音声等で出力されてもよい。   FIG. 30 is a diagram illustrating an example of a GUI. In this example, the expansion unit b2 is selected by the pointer 64 and dropped in the layout area 67 in a state where the expansion unit a1, the connection unit, the expansion unit b1, and the like are arranged with respect to the basic unit A1. The dropped position is in the vicinity between the expansion unit a1 and the connection unit. The CPU 24 recognizes which unit's connection surface is close to the drop position by comparing the coordinates of the connection surface with the coordinates of the drop position. The coordinates of the connecting plane can be obtained by referring to the coordinates of the object (unit symbol image) displayed in the layout area 67. As described above, the expansion units b1 and b2 can be arranged only on the right side of the connection unit. Therefore, the CPU 24 determines that the extension unit b2 cannot be placed at the drop position, and outputs a warning message 69. Here, the warning message 69 is displayed on the display unit 7, but it may be output by voice or the like.

図31はGUIの一例を示す図である。上述したレイアウトエリア67はシンボル画像を伴うグラフィカルなものであったが、シンボル画像に代えてテキストを用いて各ユニットの配置が示されてもよい。図30によれば、レイアウトエリア67はリスト状のGUIであり、ユニット番号とともに機種名が示されている。機種名に代えて英数字等からなる型番が表示されてもよい。この例では、リストの上方向が基本ユニットに近い方向を示し、下方向が基本ユニットから遠ざかる方向を示している。CPU24は基本ユニットを基準としてユニット番号を付与して行く。この例では連結ユニットにはユニット番号が付与されていないが、付与されるようにしてもよい。ただし、後述するようにラダープログラムにおいてユニット番号を変更しないようにするためには、連結ユニットにはユニット番号を付与しないことが望ましい。   FIG. 31 is a diagram illustrating an example of a GUI. The layout area 67 described above is graphical with a symbol image, but the arrangement of each unit may be indicated using text instead of the symbol image. According to FIG. 30, the layout area 67 is a list-like GUI, and the model name is shown together with the unit number. A model number composed of alphanumeric characters or the like may be displayed instead of the model name. In this example, the upper direction of the list indicates the direction closer to the basic unit, and the lower direction indicates the direction away from the basic unit. The CPU 24 assigns unit numbers based on the basic unit. In this example, unit numbers are not assigned to the connected units, but they may be assigned. However, as will be described later, in order not to change the unit number in the ladder program, it is desirable not to give the unit number to the connected unit.

図32はGUIの一例を示す図である。この例は、第2バスB2のみに対応している旧型の基本ユニットB1、拡張ユニットb1および拡張ユニットb2を含むPLC2について、基本ユニットのみを新型の基本ユニットA1に交換する例を示している。ポインタによって基本ユニットB1が選択されると、CPU24は、基本ユニットB1と置換可能な基本ユニットの一覧であるCPU機種リスト65を表示部7に表示させる。CPU機種リスト65から基本ユニットA1が選択され、レイアウトエリア67にドロップされると、CPU24は、基本ユニットB1を基本ユニットA1に置換する。さらに、CPU24は、基本ユニットA1と拡張ユニットb1とを連結するための連結ユニットを、基本ユニットA1と拡張ユニットb1との間に配置する。   FIG. 32 is a diagram illustrating an example of a GUI. This example shows an example in which only the basic unit is replaced with the new basic unit A1 with respect to the PLC 2 including the old basic unit B1, the expansion unit b1, and the expansion unit b2 that are compatible only with the second bus B2. When the basic unit B1 is selected by the pointer, the CPU 24 causes the display unit 7 to display a CPU model list 65 that is a list of basic units that can be replaced with the basic unit B1. When the basic unit A1 is selected from the CPU model list 65 and dropped in the layout area 67, the CPU 24 replaces the basic unit B1 with the basic unit A1. Further, the CPU 24 arranges a connection unit for connecting the basic unit A1 and the expansion unit b1 between the basic unit A1 and the expansion unit b1.

基本ユニットB1に対して拡張ユニットb1および拡張ユニットb2が接続されているときは、拡張ユニットb1にユニット番号として1番が付与され、拡張ユニットb2には2番が付与される。基本ユニットB1が基本ユニットA1に変更されても、CPU24は、連結ユニットにはユニット番号を付与しないことで、拡張ユニットb1のユニット番号と拡張ユニットb2のユニット番号をそのまま維持する。   When the extension unit b1 and the extension unit b2 are connected to the basic unit B1, the extension unit b1 is assigned unit number 1 and the extension unit b2 is assigned number 2. Even if the basic unit B1 is changed to the basic unit A1, the CPU 24 maintains the unit number of the expansion unit b1 and the unit number of the expansion unit b2 by not assigning the unit number to the connection unit.

図33は図32のレイアウトに対応したラダープログラムの一例を示している。このラダープログラムは、基本ユニットB1、拡張ユニットb1および拡張ユニットb2を含む旧型のPLC2用のものであるが、基本ユニットB1が基本ユニットA1に置換された新型のPLC2にも使用できる。CPU24は、拡張ユニットに付与されているユニット番号をそのまま維持するため、ユーザは、ラダープログラムにおけるユニット番号(図中の#2や#1)を変更せずに済む。さらに、CPU24は、ラダープログラム中のリレー番号もそのまま維持する。これは、CPU24が拡張ユニットにはリレーを割り付ける(リレー番号を付与する)が、連結ユニットにはリレーを割り付けないためである。よって、基本ユニットを交換しても、ユーザは、交換前のPLC用に作成したラダープログラムにおけるユニット番号やリレー番号を変更せずに済むようになる。   FIG. 33 shows an example of a ladder program corresponding to the layout of FIG. This ladder program is for the old PLC 2 including the basic unit B1, the expansion unit b1, and the expansion unit b2, but can also be used for the new PLC 2 in which the basic unit B1 is replaced with the basic unit A1. Since the CPU 24 maintains the unit number assigned to the extension unit as it is, the user does not need to change the unit number (# 2 or # 1 in the figure) in the ladder program. Further, the CPU 24 maintains the relay number in the ladder program as it is. This is because the CPU 24 assigns a relay to the extension unit (assigns a relay number), but does not assign a relay to the connection unit. Therefore, even if the basic unit is replaced, the user does not have to change the unit number or the relay number in the ladder program created for the PLC before replacement.

図34はプログラム作成支援装置1によって実現される機能を示すブロック図である。CPU24はROMなどの記憶装置に記憶されているプログラムを実行することで以下の機能を実現する。   FIG. 34 is a block diagram showing functions realized by the program creation support apparatus 1. The CPU 24 implements the following functions by executing programs stored in a storage device such as a ROM.

メモリ25には上述したCPU機種リスト65と拡張ユニットリスト66とが記憶されている。CPU機種リスト65には、基本ユニットの機種名、型名、説明、バスの種別、関連付けられている拡張ユニットリストの識別情報などが記憶されている。拡張ユニットリスト66は、拡張ユニットの機種名、型名、説明、バスの種別などが記載されている。   The memory 25 stores the CPU model list 65 and the expansion unit list 66 described above. The CPU model list 65 stores the model name, model name, description, bus type, identification information of the associated expansion unit list, and the like. The extension unit list 66 describes the model name, model name, description, bus type, and the like of the extension unit.

図35はユニットレイアウト処理の一例を示すフローチャートである。このフローチャートを参照しながら、CPU24によって実現される機能について説明する。   FIG. 35 is a flowchart showing an example of unit layout processing. The functions realized by the CPU 24 will be described with reference to this flowchart.

S10でCPU24は表示部7にユーザインタフェースを表示する。たとえば、識別情報表示部71は、CPU機種リスト65を読み出して表示部7に表示する。なお、メモリ25に記憶されているCPU機種リスト65の情報をすべて表示してもよいが、機種名など、ユーザがその機種を観念しやすいような情報が表示されれば十分であろう。   In S <b> 10, the CPU 24 displays a user interface on the display unit 7. For example, the identification information display unit 71 reads out the CPU model list 65 and displays it on the display unit 7. It should be noted that all the information in the CPU model list 65 stored in the memory 25 may be displayed, but it would be sufficient if information that makes it easy for the user to think of the model, such as the model name, is displayed.

S11で、CPU24はCPU機種リスト65から基本ユニットを選択してレイアウトエリア67に配置する。たとえば、選択部72は操作部8を通じて選択が指示されたとき(表示部7のCPU機種リスト65においていずれかの基本ユニットに対してクリックされたとき)のポインタ64の表示位置に対して、CPU機種リスト65における基本ユニットの表示位置のうち最も近いものを選択する。指定部75はポインタ64によるドラッグアンドドロップ操作に応じて、選択部72により選択された基本ユニットの配置位置を指定する。決定部73は、指定部75により指定された配置位置の情報に基づき、レイアウトエリア67における基本ユニットの配置位置を指定する。通常、決定部73は、レイアウトエリア67の左端に基本ユニットが配置されるよう配置位置を決定する。なお、基本ユニットに電力を供給する電源ユニットがレイアウトエリア67に配置されるときは、決定部73は、電源ユニットの右隣りに基本ユニットの配置位置を決定する。このように、基本ユニットの右隣りに拡張ユニットが配置されるPLCではレイアウトエリア67の左端に基本ユニットが配置される。また、基本ユニットの左隣りに拡張ユニットが配置されるPLCではレイアウトエリア67の右端に基本ユニットが配置される。基本ユニットの両隣りに拡張ユニットが配置されるPLCではレイアウトエリア67の中央に基本ユニットが配置されてもよい。配置位置表示部74は、決定部73により決定された配置位置にしたがって、基本ユニットの配置位置を、シンボル画像などを用いて表示する。なお、決定部73は、レイアウト情報80を作成し、レイアウト情報80にどのユニットがどの配置位置に配置されているかを管理する。   In S <b> 11, the CPU 24 selects a basic unit from the CPU model list 65 and arranges it in the layout area 67. For example, when the selection unit 72 is instructed to select through the operation unit 8 (when it is clicked on any of the basic units in the CPU model list 65 of the display unit 7), the CPU 72 performs the CPU relative to the display position of the pointer 64. The closest unit display position in the model list 65 is selected. The designation unit 75 designates the arrangement position of the basic unit selected by the selection unit 72 in response to a drag and drop operation with the pointer 64. The determination unit 73 designates the arrangement position of the basic unit in the layout area 67 based on the arrangement position information designated by the designation unit 75. Usually, the determination unit 73 determines the arrangement position so that the basic unit is arranged at the left end of the layout area 67. When a power supply unit that supplies power to the basic unit is arranged in the layout area 67, the determining unit 73 determines the arrangement position of the basic unit on the right side of the power supply unit. As described above, in the PLC in which the extension unit is arranged on the right side of the basic unit, the basic unit is arranged at the left end of the layout area 67. In the PLC in which the extension unit is arranged on the left side of the basic unit, the basic unit is arranged at the right end of the layout area 67. In a PLC in which expansion units are arranged on both sides of the basic unit, the basic unit may be arranged in the center of the layout area 67. The arrangement position display unit 74 displays the arrangement position of the basic unit using a symbol image or the like according to the arrangement position determined by the determination unit 73. The determination unit 73 creates layout information 80 and manages which units are arranged at which arrangement positions in the layout information 80.

S12でCPU24は選択された基本ユニットに関連付けられている拡張ユニットリスト66をメモリ25から読み出して表示部7に表示する。たとえば、識別情報表示部71は、第1バスB1に接続可能な1つ以上の第1拡張ユニットの識別情報と、第2バスに接続可能な1つ以上の第2拡張ユニットの識別情報とを含む拡張ユニットリスト66を表示部7に表示する。   In S <b> 12, the CPU 24 reads the expansion unit list 66 associated with the selected basic unit from the memory 25 and displays it on the display unit 7. For example, the identification information display unit 71 displays identification information of one or more first extension units connectable to the first bus B1 and identification information of one or more second extension units connectable to the second bus. The extended unit list 66 including the information is displayed on the display unit 7.

S13でCPU24は拡張ユニットを選択し、その配置位置を指定する。たとえば、選択部72は、識別情報表示部71によって表示された拡張ユニットリスト66から操作部8の選択操作(例:左クリックなど)にしたがって拡張ユニットの識別情報を選択する。指定部75はポインタ64によるドラッグアンドドロップ操作に応じて、選択部72により選択された拡張ユニットの配置位置を指定する。   In S13, the CPU 24 selects an expansion unit and designates its arrangement position. For example, the selection unit 72 selects the identification information of the expansion unit from the expansion unit list 66 displayed by the identification information display unit 71 according to the selection operation (for example, left click) of the operation unit 8. The designation unit 75 designates the arrangement position of the extension unit selected by the selection unit 72 in response to a drag and drop operation with the pointer 64.

S13でCPU24は指定された配置位置に、選択部72により選択された拡張ユニットを配置可能かどうかを判定する。決定部73は、ドロップ位置の近傍にすでに配置されているユニットの種別を判別し、選択部72により選択された拡張ユニットを配置可能かどうかを判定する。たとえば、決定部73は、レイアウトエリア67において第1拡張ユニット(例:拡張ユニットa1、a2)の配置位置を連結ユニットよりも基本ユニットA1に対して近い側(例:連結ユニットの左側)に制限したり、第2拡張ユニット(例:拡張ユニットb1、b2)の配置位置を連結ユニットよりも基本ユニットに対して遠い側(例:連結ユニットの右側)に制限したりしてもよい。図31に示したようなレイアウトエリア67では、基本ユニットが上端に表示される。そのため、決定部73は、レイアウトエリア67における第1拡張ユニットの配置位置を連結ユニットよりも上側に制限したり、第2拡張ユニットの配置位置を連結ユニットよりも下側に制限したりしてもよい。このように決定部73は基本ユニットや拡張ユニットの種別に応じて配置位置を制限する。決定部73は、拡張ユニットのドロップ位置がその拡張ユニットの配置を禁止された位置であると判定すると、S15に進む。   In S13, the CPU 24 determines whether or not the extension unit selected by the selection unit 72 can be placed at the designated placement position. The determination unit 73 determines the type of a unit already arranged in the vicinity of the drop position, and determines whether or not the extension unit selected by the selection unit 72 can be arranged. For example, the determination unit 73 restricts the arrangement position of the first extension unit (eg, extension units a1, a2) in the layout area 67 to the side closer to the basic unit A1 than the connection unit (eg, the left side of the connection unit). Alternatively, the arrangement position of the second extension unit (eg, extension units b1, b2) may be limited to a side farther from the basic unit than the connection unit (eg, right side of the connection unit). In the layout area 67 as shown in FIG. 31, the basic unit is displayed at the upper end. Therefore, the determination unit 73 may restrict the arrangement position of the first extension unit in the layout area 67 to the upper side of the connection unit, or restrict the arrangement position of the second extension unit to the lower side of the connection unit. Good. Thus, the determination unit 73 restricts the arrangement position according to the type of the basic unit or the extension unit. If the determination unit 73 determines that the drop position of the extension unit is a position where the extension unit is prohibited from being placed, the process proceeds to S15.

S15でCPU24(警告出力部76)は、警告を出力する。この警告は、配置が制限ないしは禁止されていることを示す音、視覚情報(例:警告メッセージ69)などである。その後、S13に戻る。   In S15, the CPU 24 (warning output unit 76) outputs a warning. This warning is a sound indicating that the arrangement is restricted or prohibited, visual information (eg, warning message 69), and the like. Thereafter, the process returns to S13.

一方で、S14で決定部73は、拡張ユニットのドロップ位置がその拡張ユニットの配置を制限されていない位置であると判定すると、S16に進む。   On the other hand, if the determination unit 73 determines in S14 that the drop position of the extension unit is a position where the arrangement of the extension unit is not restricted, the process proceeds to S16.

S16でCPU24は選択された拡張ユニットが連結ユニットを必要とする拡張ユニットかどうかを判定する。決定部73は、選択された拡張ユニットの識別情報や種別に基づき、連結ユニットを必要かどうかを判定する。連結ユニットが不要であればS19に進む。S19で、決定部73は、ドロップ位置に最も近い配置可能な位置を拡張ユニットの配置位置として決定する。配置位置表示部74はレイアウトエリア67において決定された配置位置に拡張ユニットのシンボル画像を表示する。決定部73は、拡張ユニットの識別情報と、その配置位置をレイアウト情報80に追加する。一方で、連結ユニットが必要と判定すると、S17に進む。   In S16, the CPU 24 determines whether or not the selected extension unit is an extension unit that requires a connection unit. The determination unit 73 determines whether a connected unit is necessary based on the identification information and type of the selected extension unit. If the connecting unit is unnecessary, the process proceeds to S19. In S <b> 19, the determination unit 73 determines a position that can be placed closest to the drop position as the placement position of the extension unit. The arrangement position display unit 74 displays the symbol image of the extension unit at the arrangement position determined in the layout area 67. The determination unit 73 adds the expansion unit identification information and the arrangement position thereof to the layout information 80. On the other hand, if it determines with a connection unit being required, it will progress to S17.

S17でCPU24(決定部73)は、レイアウト情報80を参照し、レイアウトエリア67に連結ユニットがすでに配置されて表示されているかどうかを判定する。連結ユニットがすでに配置されていれば、レイアウトエリア67に連結ユニットを追加する必要はない。この場合は、S19に進む。S19で決定部73は、決定部73は、ドロップ位置に最も近い配置可能な位置を拡張ユニットの配置位置として決定する。配置位置表示部74はレイアウトエリア67において決定された配置位置に拡張ユニットのシンボル画像を表示する。   In S <b> 17, the CPU 24 (decision unit 73) refers to the layout information 80 and determines whether or not the connected unit is already arranged and displayed in the layout area 67. If the connection unit is already arranged, it is not necessary to add the connection unit to the layout area 67. In this case, the process proceeds to S19. In S <b> 19, the determination unit 73 determines the position where the disposition is closest to the drop position as the expansion unit disposition position. The arrangement position display unit 74 displays the symbol image of the extension unit at the arrangement position determined in the layout area 67.

S18でCPU24(決定部73)は、レイアウトエリア67に連結ユニットを追加する。図29に示したように、基本ユニットA1に対してまだ何も接続されていない状態で拡張ユニットb1が選択されると、決定部73は、基本ユニットA1の隣に連結ユニットが配置されるよう連結ユニットの配置位置を決定し、レイアウト情報80に登録する。図28に示したように、基本ユニットA1に対して拡張ユニットa1が接続されている状態で拡張ユニットb1が選択されると、決定部73は、拡張ユニットb1の隣であって基本ユニットA1に対して近い側の隣に連結ユニットが配置され、かつ、最も右に位置する拡張ユニットa1の右隣りに連結ユニットが配置されるよう連結ユニットの配置位置を決定し、レイアウト情報80に登録する。つまり、選択された拡張ユニットb1と最も右に位置する拡張ユニットa1の間に連結ユニットが配置されるよう連結ユニットの配置位置が決定される。このように、配置位置表示部74は、連結ユニットがレイアウトエリア67に表示されていないときに第2拡張ユニット(拡張ユニットb1)の識別情報が選択されると、当該第2拡張ユニットの隣であって基本ユニットに対して近い側の隣に連結ユニットを表示する。S19でCPU24(決定部73)は、連結ユニットの右隣り拡張ユニットが配置されるよう拡張ユニットの配置位置を決定し、レイアウト情報80を更新する。配置位置表示部74は、決定部73により決定された拡張ユニット(拡張ユニットb1)の配置位置にしたがって、拡張ユニットのシンボル画像をレイアウトエリア67に表示する。   In S <b> 18, the CPU 24 (decision unit 73) adds a connected unit to the layout area 67. As shown in FIG. 29, when the expansion unit b1 is selected in a state where nothing is connected to the basic unit A1, the determination unit 73 causes the connection unit to be arranged next to the basic unit A1. The arrangement position of the connected unit is determined and registered in the layout information 80. As shown in FIG. 28, when the expansion unit b1 is selected in a state where the expansion unit a1 is connected to the basic unit A1, the determination unit 73 is next to the expansion unit b1 and moves to the basic unit A1. The arrangement position of the connection unit is determined so that the connection unit is arranged next to the closest side and the connection unit is arranged right next to the rightmost extension unit a1, and is registered in the layout information 80. That is, the arrangement position of the connection unit is determined so that the connection unit is arranged between the selected extension unit b1 and the rightmost extension unit a1. Thus, when the identification information of the second extension unit (extension unit b1) is selected when the connected unit is not displayed in the layout area 67, the arrangement position display unit 74 is next to the second extension unit. The connected unit is displayed next to the side closer to the basic unit. In S <b> 19, the CPU 24 (decision unit 73) determines the arrangement position of the extension unit so that the right adjacent extension unit of the connected unit is arranged, and updates the layout information 80. The arrangement position display unit 74 displays the symbol image of the extension unit in the layout area 67 according to the arrangement position of the extension unit (extension unit b1) determined by the determination unit 73.

ところで、ユニット番号付与部77は、ユーザプログラム(ラダープログラム)上で拡張ユニットの配置位置を識別するためのユニット番号を、配置位置表示部74によりレイアウトエリア67に表示された拡張ユニットの配置位置に応じて付与する。図32を用いて説明したように、基本ユニットのみを更新するときは、拡張ユニットのユニット番号を変更せずにそのまま維持する。これは、連結ユニットに対してはユニット番号を付与せず、拡張ユニットにユニット番号を付与することで実現される。   Incidentally, the unit number assigning unit 77 sets the unit number for identifying the arrangement position of the extension unit on the user program (ladder program) to the arrangement position of the extension unit displayed in the layout area 67 by the arrangement position display unit 74. Granted accordingly. As described with reference to FIG. 32, when only the basic unit is updated, the unit number of the expansion unit is maintained as it is without being changed. This is realized by assigning a unit number to the extension unit without assigning a unit number to the connection unit.

なお、ユニット番号付与部77は、基本ユニットと第2拡張ユニットとの間に第1拡張ユニットが挿入されたり、基本ユニットと第2拡張ユニットとの間に連結されていた第1拡張ユニットが削除されたりしても第2拡張ユニットのユニット番号を変更せずに維持してもよい。   The unit number assigning unit 77 deletes the first extension unit inserted between the basic unit and the second extension unit or the first extension unit connected between the base unit and the second extension unit. The unit number of the second extension unit may be maintained without being changed.

リレー割り付け部78は、第1拡張ユニットおよび第2拡張ユニットにはユーザプログラム上でリレーを割り付け、連結ユニットにはリレーを割り付けないように動作してもよい。図33を用いて説明したように、基本ユニットが更新されるときに、リレー割り付け部78は、第2拡張ユニットに関連したリレーに割り付けられるリレー番号を変更せずに維持してもよい。これにより、基本ユニットを変更しても、それまで使用していたラダープログラムにおけるユニット番号やリレー番号を変更せずに済むといった利点が得られる。   The relay allocating unit 78 may operate so that a relay is allocated to the first expansion unit and the second expansion unit on the user program, and no relay is allocated to the connection unit. As described with reference to FIG. 33, when the basic unit is updated, the relay assigning unit 78 may maintain the relay number assigned to the relay associated with the second expansion unit without being changed. As a result, there is an advantage that even if the basic unit is changed, it is not necessary to change the unit number and the relay number in the ladder program used so far.

<まとめ>
以上説明したように、PLC2は、基本ユニット3の機能を拡張するための第1拡張ユニット4aおよび第2拡張ユニット4bと、ユーザプログラム上で第1拡張ユニット4aの内部処理に関して割り付けられるデバイスの情報を基本ユニット3と第1拡張ユニット4aの間で通信するための第1バス(例:B1またはB3)と、第1バスと特性が異なるとともに、ユーザプログラム上で第2拡張ユニット4bの内部処理に関して割り付けられるデバイスの情報を基本ユニット3と第2拡張ユニット4bの間で通信するための第2バスB2と、第1バスの通信信号と第2バスの通信信号とを相互に変換するバス変換ユニット(例:連結ユニット15)とを有している。なお、また、第1バス(例:B1またはB3)は、基本ユニット3aに対して1つ以上の第1拡張ユニット4aを接続するかまたは当該第1拡張ユニット4aを通過するバスであってもよい。第2バスB2は、第1拡張ユニット4aとは異なる1つ以上の第2拡張ユニット4bが接続されるバスであってもよい。なお、バス変換ユニット(例:連結ユニット15)は、第1バスと第2バスとの間に直接的に接続されていなくてもよい。基本ユニット3は、第1バス、バス変換ユニットおよび第2バスを介して第2拡張ユニットと通信する。このように、バス変換ユニットを設けることで、種類の異なるバスを備えた基本ユニットと拡張ユニットであっても接続可能となる。
<Summary>
As described above, the PLC 2 has information about the first extension unit 4a and the second extension unit 4b for extending the function of the basic unit 3, and the devices assigned to the internal processing of the first extension unit 4a on the user program. The first bus (e.g., B1 or B3) for communicating between the basic unit 3 and the first extension unit 4a is different in characteristics from the first bus, and the internal processing of the second extension unit 4b on the user program The second bus B2 for communicating the information of the device assigned with respect to the basic unit 3 and the second expansion unit 4b, and the bus conversion for mutually converting the communication signal of the first bus and the communication signal of the second bus Unit (example: connecting unit 15). The first bus (eg, B1 or B3) may be a bus that connects one or more first extension units 4a to the basic unit 3a or passes through the first extension unit 4a. Good. The second bus B2 may be a bus to which one or more second expansion units 4b different from the first expansion unit 4a are connected. Note that the bus conversion unit (eg, the connecting unit 15) may not be directly connected between the first bus and the second bus. The basic unit 3 communicates with the second expansion unit via the first bus, the bus conversion unit, and the second bus. Thus, by providing the bus conversion unit, it is possible to connect even a basic unit and an expansion unit having different types of buses.

図9などを用いて説明したように、バス変換ユニットである連結ユニット15の第一側面側(例:左側)に基本ユニット3aおよび第1拡張ユニット4aが配置される。また、バス変換ユニットの第二側面側(例:右側)に第2拡張ユニット4bが配置されてもよい。これにより基本ユニット3aを端部に配置して第1拡張ユニット4aや第2拡張ユニット4bをシリーズ接続することが可能となる。上述したように、基本ユニットの左側に種類の異なる複数の拡張ユニットがシリーズに接続されてもよい。   As described with reference to FIG. 9 and the like, the basic unit 3a and the first extension unit 4a are arranged on the first side surface (eg, left side) of the connecting unit 15 that is a bus conversion unit. Further, the second extension unit 4b may be arranged on the second side surface side (eg, right side) of the bus conversion unit. As a result, it is possible to connect the first extension unit 4a and the second extension unit 4b in series by disposing the basic unit 3a at the end. As described above, a plurality of different types of expansion units may be connected to the left side of the basic unit.

図9などに示したように、基本ユニット3aには第1拡張ユニット4aが連結され、基本ユニット3aに連結された第1拡張ユニット4aまたは当該第1拡張ユニット4aに連結された他の第1拡張ユニット4aにはバス変換ユニットである連結ユニット15が連結されてもよい。さらに、連結ユニット15には第2拡張ユニット4bが連結される。   As shown in FIG. 9 and the like, the first extension unit 4a is connected to the basic unit 3a, and the first extension unit 4a connected to the basic unit 3a or another first extension unit connected to the first extension unit 4a. A connection unit 15 that is a bus conversion unit may be connected to the expansion unit 4a. Further, the second extension unit 4 b is connected to the connection unit 15.

図10ないし図13などを用いて説明したように、基本ユニット3aの側面には第1のタイプのコネクタ(例:雌型のコネクタC1)が設けられており、第1拡張ユニット4aおよび連結ユニット15の一方の側面には第1のタイプのコネクタと雌雄をなす第2のタイプのコネクタ(例:雄型のコネクタC1)が設けられてもよい。また、第1拡張ユニット4aの他方の側面には第1のタイプのコネクタ(例:雌型のコネクタC1)が設けられてもよい。連結ユニット15の他方の側面には第3のタイプのコネクタ(例:雌型のコネクタC2)が設けられてもよい。第2拡張ユニット4bの一方の側面には第3のタイプのコネクタと雌雄をなす第4のタイプのコネクタ(例:雄型のコネクタC2)が設けられてもよい。同様に、第2拡張ユニット4bの他方の側面には第3のタイプのコネクタ(例:雌型のコネクタC2)が設けられてもよい。とりわけ、第1バスB1は雌型のコネクタC1および雄型のコネクタC1を介して基本ユニット3aから連結ユニット15まで延在している。同様に、第2バスB2は雌型のコネクタC2および雄型のコネクタC2を介して連結ユニット15から第2拡張ユニット4bまで延在している。このように連結ユニット15は、第1バス用のコネクタC1を有するとともに、第2バス用のコネクタC2を有するため、連結ユニット15において第1バスと第2バスとを変換してもよい。   As described with reference to FIGS. 10 to 13 and the like, the first type connector (eg, female connector C1) is provided on the side surface of the basic unit 3a, and the first extension unit 4a and the connecting unit are provided. A first type connector and a second type connector (eg, male connector C1) may be provided on one side surface of the connector 15. Also, a first type connector (eg, female connector C1) may be provided on the other side surface of the first extension unit 4a. A third type connector (eg, female connector C2) may be provided on the other side surface of the coupling unit 15. A fourth type connector (eg, male connector C2) that forms a sex with the third type connector may be provided on one side surface of the second extension unit 4b. Similarly, a third type connector (eg, female connector C2) may be provided on the other side surface of the second extension unit 4b. In particular, the first bus B1 extends from the basic unit 3a to the connecting unit 15 via the female connector C1 and the male connector C1. Similarly, the second bus B2 extends from the connection unit 15 to the second expansion unit 4b via the female connector C2 and the male connector C2. Thus, since the connection unit 15 has the connector C1 for the first bus and the connector C2 for the second bus, the connection unit 15 may convert the first bus and the second bus.

上述したように、PLC2は、ベースフレームを有しないベースレスかつビルディングタイプのシステムであるが、基本ユニット3a、第1拡張ユニット4a、連結ユニット15および第2拡張ユニット4bなどを固定するベースフレームをさらに有していてもよい。ベースフレームタイプのシステムであってもユニット間の連結が必要となることがあり、本発明は有用であろう。   As described above, the PLC 2 is a baseless and building type system that does not have a base frame, but a base frame that fixes the basic unit 3a, the first extension unit 4a, the connecting unit 15, the second extension unit 4b, and the like. Furthermore, you may have. Even in a base frame type system, connection between units may be required, and the present invention will be useful.

図6(B)や図10などを用いて説明したように、基本ユニット3a、第1拡張ユニット4a、連結ユニット15および第2拡張ユニット4bの各背面には、基準レール13に取り付けるための取付け部(4ag、4bg、15g)が設けられていてもよい。これにより、基本ユニット3a、第1拡張ユニット4a、連結ユニット15および第2拡張ユニット4bが連結された状態で、基準レール13を取り付けることが可能となる。また、これにより、工場等の制御盤にPLC2を固定しやすくなる。   As described with reference to FIG. 6B, FIG. 10 and the like, attachment for attachment to the reference rail 13 is provided on the back of each of the basic unit 3a, the first extension unit 4a, the connecting unit 15 and the second extension unit 4b. Parts (4ag, 4bg, 15g) may be provided. Thereby, it becomes possible to attach the reference rail 13 in a state where the basic unit 3a, the first extension unit 4a, the connecting unit 15 and the second extension unit 4b are connected. This also makes it easier to fix the PLC 2 to a control panel such as a factory.

第1バスB1の信号転送速度は第2バスB2の信号転送速度よりも高速であってもよい。バスの通信速度は年々高速になっており、高速バスに対応した新しいPLCの需要がある。その一方で、旧型の低速バスに対応した拡張ユニットも新しいPLCに接続できれば、過渡期におけるユーザの負担を軽減できるであろう。本実施の形態ではバス変換ユニットである連結ユニット15を提供することで、基本ユニット3aや拡張ユニット4aの高速化を実現しつつ、拡張ユニット4bもこれらに連結できるため、ユーザは既存の資産を有効に活用できるであろう。   The signal transfer speed of the first bus B1 may be higher than the signal transfer speed of the second bus B2. The communication speed of the bus is increasing year by year, and there is a demand for a new PLC corresponding to the high speed bus. On the other hand, if the expansion unit corresponding to the old low-speed bus can also be connected to the new PLC, the burden on the user in the transition period will be reduced. In this embodiment, by providing the connecting unit 15 which is a bus conversion unit, the basic unit 3a and the expansion unit 4a can be speeded up, and the expansion unit 4b can also be connected to them. It can be used effectively.

第1バスB1(第3バスB3)は、たとえば、シリアル転送を実行するバスであってもよい。第2バスB2はパラレル転送を実行するバスであってもよい。この場合、バス変換ユニットはシリアル/パラレル変換を実行することになろう。このように、連結ユニット15は、連結面の違いを吸収するだけでなく、通信方式の違いを吸収することで、異種のバスを有する複数の拡張ユニットの混在を可能としている。   The first bus B1 (third bus B3) may be a bus that executes serial transfer, for example. The second bus B2 may be a bus that executes parallel transfer. In this case, the bus conversion unit will perform serial / parallel conversion. As described above, the connection unit 15 not only absorbs the difference in connection surface but also absorbs the difference in communication method, thereby allowing a plurality of expansion units having different types of buses to be mixed.

図17や図20などを用いて説明したように、連結ユニット15は、第2バスB2の通信を制御するバスマスタ(例:第2バス通信部59)を有していてもよい。これにより、基本ユニット3aには、第2バスB2用のバスマスタを搭載する必要がない。また、バス変換部58によってプロトコル変換等を実装しやすくなる。   As described with reference to FIGS. 17 and 20, the connection unit 15 may include a bus master (for example, the second bus communication unit 59) that controls communication of the second bus B <b> 2. Thereby, it is not necessary to mount the bus master for the second bus B2 in the basic unit 3a. In addition, protocol conversion or the like can be easily implemented by the bus conversion unit 58.

図10などを用いて説明したように、連結ユニット15の第一側面には、当該第一側面に係合する基本ユニット3aまたは第1拡張ユニット4aを固定するロック機構が設けられてもよい。また、連結ユニット15の第二側面には、当該第二側面に係合する第2拡張ユニット4bを固定するロック機構が設けられてもよい。これにより連結ユニット15に対する拡張ユニットの固定をより強固にすることが可能となる。   As described with reference to FIG. 10 and the like, the first side surface of the connecting unit 15 may be provided with a lock mechanism that fixes the basic unit 3a or the first extension unit 4a that engages with the first side surface. Further, a lock mechanism for fixing the second expansion unit 4b that engages with the second side surface may be provided on the second side surface of the connecting unit 15. As a result, the expansion unit can be more firmly fixed to the connecting unit 15.

図16や図19などを用いて説明したように、基本ユニット3aには、第1バスB1で実行される通信を制御する第1バス制御手段(例:第1バス通信部50)が設けられてもよい。連結ユニット15は、第2バスB2で実行される通信を制御する第2バス制御手段(例:第2バス通信部59)が設けられてもよい。さらに、第1バスB1に接続されている第1拡張ユニット4aと第2バスB2に接続されている第2拡張ユニット4bとの接続情報を管理する管理手段として、ユニット管理テーブル49が設けられてもよい。さらに、管理手段により管理されている接続情報にしたがって第1バス制御手段または第2バス制御手段を通じて制御対象となっている拡張ユニットと通信する第3制御手段として、バスマスタ制御部48が設けられてもよい。上述したように、第2バスB2が基本ユニット3aに対して接続されていない場合、基本ユニット3aは、何からの手段を通じて第2バスB2に接続されている拡張ユニット4bを管理して通信しなければならない。本実施の形態では、ユニット管理テーブル49を用いて、拡張ユニット4bの接続情報を管理することができ、ユニット管理テーブル49を参照することで拡張ユニット4bと通信することが可能となる。   As described with reference to FIGS. 16 and 19, the basic unit 3 a is provided with the first bus control means (for example, the first bus communication unit 50) that controls communication performed on the first bus B <b> 1. May be. The connection unit 15 may be provided with second bus control means (for example, the second bus communication unit 59) that controls communication performed on the second bus B2. Further, a unit management table 49 is provided as management means for managing connection information between the first extension unit 4a connected to the first bus B1 and the second extension unit 4b connected to the second bus B2. Also good. Further, a bus master control unit 48 is provided as third control means for communicating with the expansion unit to be controlled through the first bus control means or the second bus control means according to the connection information managed by the management means. Also good. As described above, when the second bus B2 is not connected to the basic unit 3a, the basic unit 3a manages and communicates with the expansion unit 4b connected to the second bus B2 through any means. There must be. In the present embodiment, the connection information of the extension unit 4b can be managed using the unit management table 49, and communication with the extension unit 4b can be performed by referring to the unit management table 49.

また、連結ユニット15は、第1バス(B1またはB3)、第2バスB2、第1バスと第2バスとの間に接続され、第1バスの通信信号と第2バスの通信信号とを相互に変換する変換手段(例:バス変換部58)を有してもよい。上述したように、バス変換部58は、基本ユニット3aから第1バスを介して受信した信号を変換して第2バスを介して第2拡張ユニット4bへ転送し、第2拡張ユニット4bから第2バスB2を介して受信した信号を変換して第1バスを介して基本ユニット3aに転送してもよい。このような連結ユニット15を提供することで、異種のバスを必要とする複数の拡張ユニットを接続できるようになる。   The connecting unit 15 is connected between the first bus (B1 or B3), the second bus B2, and the first bus and the second bus, and transmits the communication signal of the first bus and the communication signal of the second bus. You may have the conversion means (for example: bus conversion part 58) which converts mutually. As described above, the bus conversion unit 58 converts the signal received from the basic unit 3a via the first bus, transfers the signal to the second expansion unit 4b via the second bus, and transfers the signal from the second expansion unit 4b to the second expansion unit 4b. A signal received via the two bus B2 may be converted and transferred to the basic unit 3a via the first bus. By providing such a connecting unit 15, a plurality of expansion units that require different types of buses can be connected.

図11(B)や図16、図17を用いて説明したように、PLC2は、基本ユニット3a、第1バスB1、第2バスB2、基本ユニット3aから第1拡張ユニット4aを介して延在する第3バスB3、および、第3バスB3と第2バスB2との間に接続され、第3バスB3の通信信号と第2バスB2の通信信号とを相互に変換するバス変換ユニット(例:連結ユニット15)を有していてもよい。この場合、基本ユニット3aは、第3バスB3、連結ユニット15および第2バスB2を介して第2拡張ユニット4bと通信してもよい。この場合、第1バスB1は、第2バスB2を中継する必要がないため、第2バスB2の影響を受けないようになろう。つまり、拡張ユニット4aは、拡張ユニット4bの影響を受けずに、第1バスB1の通信帯域を享受できるようになろう。   As described with reference to FIG. 11B, FIG. 16, and FIG. 17, the PLC 2 extends from the basic unit 3a, the first bus B1, the second bus B2, and the basic unit 3a via the first extension unit 4a. And a bus conversion unit (for example, connected between the third bus B3 and the second bus B2) that mutually converts the communication signal of the third bus B3 and the communication signal of the second bus B2. : A connecting unit 15) may be included. In this case, the basic unit 3a may communicate with the second expansion unit 4b via the third bus B3, the connecting unit 15, and the second bus B2. In this case, since the first bus B1 does not need to relay the second bus B2, it will not be affected by the second bus B2. That is, the expansion unit 4a will be able to enjoy the communication band of the first bus B1 without being affected by the expansion unit 4b.

なお、バス変換部58は、基本ユニット3aから第3バスB3を介して受信した信号を変換して第2バスB2を介して第2拡張ユニット4bへ転送してもよい。同様に、バス変換部58は、第2拡張ユニット4bから第2バスB2を介して受信した信号を変換して第3バスB3を介して基本ユニット3aに転送してもよい。これにより、基本ユニット3aと拡張ユニット4bは、第2バスB2および第3バスB3を介して通信することが可能となる。   The bus conversion unit 58 may convert the signal received from the basic unit 3a via the third bus B3 and transfer the signal to the second expansion unit 4b via the second bus B2. Similarly, the bus conversion unit 58 may convert a signal received from the second extension unit 4b via the second bus B2 and transfer the signal to the basic unit 3a via the third bus B3. As a result, the basic unit 3a and the expansion unit 4b can communicate via the second bus B2 and the third bus B3.

図15や図18などを用いて説明したように、連結ユニット15は、電気的なバス変換ユニットを備えなくてもよい。基本ユニット3aに対して第1バスを介して接続可能であって、他の第1拡張ユニットと接続可能に構成される第1拡張ユニット4aと、少なくとも第2バスを介して基本ユニット3aと接続可能であって、他の第2拡張ユニットと接続可能に構成される第2拡張ユニット4bとを有するPLCにおいて、連結ユニット15は、基本ユニット3aの側面または基本ユニット3aに接続された第1拡張ユニットの側面に対応する第1側面と、第2拡張ユニット4bの側面に連結される第2側面とを有する変換ユニットとして機能する。このような変換ユニットを採用することで、種類の異なる連結面を備えたユニットであってもプログラマブル・ロジック・コントローラとして一体感を持たせることが可能となる。なお、連結ユニット15の第1側面は第1拡張ユニットの側面に対応していれば十分であり、これらは必ずしも連結されていなくてもよい。図12(A)に示すように、連結ユニット15の一種であるバス延長ユニット15a、15bを用いる場合、第1拡張ユニット4aと延長ユニット15bとは連結されていてもよいし、連結されてなくてもよい。バス延長ユニット15a、15bを用いることで、基本ユニット3aと第2拡張ユニット4bが通信可能となり、プログラマブル・ロジック・コントローラとして一体感を持たせることが可能となるからである。拡張ユニット4aの側面と第1側面(左側面15L)とは対応関係にある。たとえば、拡張ユニット4aの側面と第1側面において、幅方向の大きさ(奥行き)を略同一にしてもよいし、上下方向の大きさを略同一にしてもよいし、これら両方を略同一にしてもよい。要するに、基本ユニット3a、拡張ユニット4a、連結ユニット15、拡張ユニット4bがDINレール等の基準レールに取り付けられたとき、一体的な構成となるような対応関係があればよい。   As described with reference to FIGS. 15 and 18, the connecting unit 15 does not have to include an electrical bus conversion unit. Connectable to the basic unit 3a via the first bus and connected to the first extension unit 4a configured to be connectable to another first extension unit, and at least connected to the basic unit 3a via the second bus In the PLC having the second extension unit 4b that can be connected to another second extension unit, the connecting unit 15 is connected to the side surface of the basic unit 3a or the first extension unit 3a. It functions as a conversion unit having a first side corresponding to the side of the unit and a second side connected to the side of the second extension unit 4b. By adopting such a conversion unit, it is possible to provide a sense of unity as a programmable logic controller even for units having different types of connection surfaces. It is sufficient that the first side surface of the connecting unit 15 corresponds to the side surface of the first extension unit, and these need not necessarily be connected. As shown in FIG. 12A, when the bus extension units 15a and 15b which are a kind of the connection unit 15 are used, the first extension unit 4a and the extension unit 15b may or may not be connected. May be. This is because, by using the bus extension units 15a and 15b, the basic unit 3a and the second extension unit 4b can communicate with each other, and can have a sense of unity as a programmable logic controller. The side surface of the expansion unit 4a and the first side surface (left side surface 15L) are in a correspondence relationship. For example, the size (depth) in the width direction may be substantially the same on the side surface and the first side surface of the expansion unit 4a, the size in the vertical direction may be approximately the same, or both may be approximately the same. May be. In short, the basic unit 3a, the extension unit 4a, the connecting unit 15, and the extension unit 4b only need to have a corresponding relationship so as to be integrated when mounted on a reference rail such as a DIN rail.

また、連結ユニット15は、基本ユニット3aの側面(例:雌型/雄型の連結面)または基本ユニット3aに接続された第1拡張ユニット4aの側面(例:雌型/雄型の連結面)に連結される第1側面(例:雄型/雌型の連結面)と、第2拡張ユニット4bの側面(例:雄型/雌型の連結面)とに連結される第2側面(例:雌型/雄型の連結面)とを有する連結面変換ユニットとして機能してもよい。これにより、連結面の異なる異種のユニットであっても相互に連結することが可能となる。さらには、種類の異なる連結面を備えたユニットであっても相互に連結して、ビルディングタイプのPLCを実現でき、省スペース化の点で有利なPLCを実現できる。また、連結面の異なる既存のユニットと新規のユニットとを連結できるようになるため、既存の資産の有効活用も図れるであろう。   In addition, the connecting unit 15 includes a side surface of the basic unit 3a (eg, female / male connecting surface) or a side surface of the first extension unit 4a connected to the basic unit 3a (eg, female / male connecting surface). ) Connected to the first side surface (for example, male / female connection surface) and the second side surface (for example, male / female connection surface) of the second extension unit 4b. (Example: female / male connecting surface). As a result, even different types of units having different connection surfaces can be connected to each other. Furthermore, even if units having different types of connection surfaces are connected to each other, a building type PLC can be realized, and a PLC advantageous in terms of space saving can be realized. In addition, since existing units with different connection surfaces can be connected to new units, existing assets can be used effectively.

図10などを用いて説明したように、連結ユニット15の第1側面の凹凸形状は、基本ユニット3aおよび第1拡張ユニット4aの側面の凹凸形状に対応した形状である。また、連結ユニット15の第2側面の凹凸形状は、第2拡張ユニット4bの側面の凹凸形状に対応した形状である。これにより、基本ユニット3aおよび第1拡張ユニット4aの側面の凹凸形状と、第2拡張ユニット4bの側面の凹凸形状との違いを吸収して、両者を連結してもよい。   As described with reference to FIG. 10 and the like, the uneven shape of the first side surface of the connecting unit 15 is a shape corresponding to the uneven shape of the side surfaces of the basic unit 3a and the first extension unit 4a. Further, the uneven shape on the second side surface of the connecting unit 15 is a shape corresponding to the uneven shape on the side surface of the second expansion unit 4b. Thereby, the difference between the uneven shape on the side surface of the basic unit 3a and the first extension unit 4a and the uneven shape on the side surface of the second extension unit 4b may be absorbed to connect the two.

図15や図18などを用いて説明したように、連結ユニット15は、第2バスB2に接続され、基本ユニット3aと第2拡張ユニット4bとの間で送受信される通信信号を中継する中継手段(例:配線、第2バス延長部60、61、通信ケーブル63など)を有していてもよい。この場合、基本ユニット3aは、中継手段および第2バスB2を介して第2拡張ユニット4bと通信することが可能となる。   As described with reference to FIGS. 15 and 18, the connecting unit 15 is connected to the second bus B <b> 2 and relays a communication signal transmitted and received between the basic unit 3 a and the second extension unit 4 b. (Example: Wiring, second bus extension 60, 61, communication cable 63, etc.) may be included. In this case, the basic unit 3a can communicate with the second extension unit 4b via the relay unit and the second bus B2.

もちろん、図17や図20を用いて説明したように、第1バスの通信信号と第2バスの通信信号とを相互に変換するバス変換部58も中継手段の一例である。このようにバス変換部58を採用すれば、第2バス延長部60、61、通信ケーブル63などを省略できるようになる。通信ケーブル63がPLC2の外部に配線される場合、通信ケーブル63の損傷や抜けの可能性があり、新たなエラー要因となる。よって、PLC2の外部に配線されるケーブルの数を削減することは、エラー要因を少なくすることにつながり、PLC2の動作の安定性をもたらすであろう。   Of course, as described with reference to FIGS. 17 and 20, the bus conversion unit 58 that mutually converts the communication signal of the first bus and the communication signal of the second bus is also an example of the relay unit. If the bus conversion unit 58 is employed in this way, the second bus extension units 60 and 61, the communication cable 63, and the like can be omitted. When the communication cable 63 is wired outside the PLC 2, the communication cable 63 may be damaged or disconnected, which becomes a new error factor. Therefore, reducing the number of cables wired outside the PLC 2 will lead to fewer error factors and will lead to stability of the operation of the PLC 2.

通信ケーブル63は、第2バスB2の通信信号を基本ユニット3aへ中継するための中継手段として機能してもよい。この場合、拡張ユニット4aには、第2バスB2を中継するための配線等が不要となるため、拡張ユニット4aのコストを削減できるようになろう。   The communication cable 63 may function as a relay unit for relaying the communication signal of the second bus B2 to the basic unit 3a. In this case, since the expansion unit 4a does not require wiring for relaying the second bus B2, the cost of the expansion unit 4a can be reduced.

図15を用いて説明したように、第2バスB2は連結ユニット15および第1拡張ユニット4aを通過して基本ユニット3aまで延在していてもよい。この場合、連結ユニット15は、バス変換機能やコネクタC5などを備える必要がないため、連結ユニット15のコストを削減できるようになる。   As described with reference to FIG. 15, the second bus B2 may extend through the connecting unit 15 and the first extension unit 4a to the basic unit 3a. In this case, since the connection unit 15 does not need to have a bus conversion function, a connector C5, or the like, the cost of the connection unit 15 can be reduced.

上述したように連結ユニット15は、基本ユニット3aの側面または基本ユニット3aに対して第1バスB1を介して接続される第1拡張ユニット4aの側面に連結される第1側面と、少なくとも第2バスB2を介して基本ユニット3aと接続される第2拡張ユニット4bの側面に連結される第2側面とを有していればよい。これにより、連結面の互換性がない複数のユニットであっても連結できるようになる。   As described above, the connecting unit 15 includes at least a second side surface connected to the side surface of the basic unit 3a or the side surface of the first extension unit 4a connected to the basic unit 3a via the first bus B1. What is necessary is just to have the 2nd side surface connected with the side surface of the 2nd expansion unit 4b connected with the basic unit 3a via bus | bath B2. As a result, even a plurality of units having incompatible connection surfaces can be connected.

図27などを用いて説明したように、本実施形態によれば、基本ユニット3a、第1拡張ユニット4aおよび第2拡張ユニット4bの配置に関するユニット構成情報を設定する設定支援装置が提供される。拡張ユニットリスト66や識別情報表示部71は、第1バスB1に接続可能な1つ以上の第1拡張ユニット4aの識別情報と、第2バスB2に接続可能な1つ以上の第2拡張ユニット4bの識別情報とを表示する識別情報表示手段として機能する。また、ポインタ64や選択部72は、拡張ユニットリスト66に表示された識別情報を選択する選択手段として機能する。決定部73は、第1拡張ユニット4aと第2拡張ユニット4bとのうちポインタ64や選択部72により選択された識別情報に対応する拡張ユニット4の配置位置を決定する。レイアウトエリア67や配置位置表示部74は、決定された配置位置にしたがって、基本ユニット3を基準として第1拡張ユニット4aと第2拡張ユニット4bとの配置位置を表示する配置位置表示手段として機能する。図30などを用いて説明したように、決定部73は、選択された識別情報に応じて、この識別情報に対応する拡張ユニット4の配置位置を制限する。これにより、ユーザが拡張ユニットを適切な位置に配置する作業を容易に実行できるようになろう。   As described with reference to FIG. 27 and the like, according to the present embodiment, a setting support apparatus for setting unit configuration information regarding the arrangement of the basic unit 3a, the first extension unit 4a, and the second extension unit 4b is provided. The extension unit list 66 and the identification information display unit 71 include identification information of one or more first extension units 4a connectable to the first bus B1, and one or more second extension units connectable to the second bus B2. It functions as identification information display means for displaying the identification information of 4b. The pointer 64 and the selection unit 72 function as a selection unit that selects identification information displayed in the extension unit list 66. The determination unit 73 determines the arrangement position of the expansion unit 4 corresponding to the identification information selected by the pointer 64 or the selection unit 72 among the first expansion unit 4a and the second expansion unit 4b. The layout area 67 and the arrangement position display unit 74 function as arrangement position display means for displaying the arrangement positions of the first extension unit 4a and the second extension unit 4b with reference to the basic unit 3 according to the decided arrangement position. . As described with reference to FIG. 30 and the like, the determination unit 73 restricts the arrangement position of the extension unit 4 corresponding to the identification information according to the selected identification information. As a result, the user can easily perform the operation of arranging the expansion unit at an appropriate position.

図30などを用いて説明したように、決定部73は、レイアウトエリア67における第1拡張ユニット4aの配置位置を連結ユニット15よりも基本ユニット3aに対して近い側に制限してもよい。上述したように、第1拡張ユニット4aは基本ユニット3aや第1の拡張ユニット4aには接続できるが、第2拡張ユニット4bには接続できない。これは連結面が異なるからである。また、決定部73は、第2拡張ユニット4bの配置位置を連結ユニット15よりも基本ユニット3aに対して遠い側に制限してもよい。これは、第2拡張ユニット4bは第1拡張ユニット4aや基本ユニット3aに直接接続できず、連結ユニット15を介してしかこれらに接続できないからである。よって、連結面の制約に応じて、レイアウトエリア67においてもシンボル画像の配置を制限することで、連結面の制約に適合した状態でレイアウトエリア67に各ユニットを配置できるようになる。   As described with reference to FIG. 30 and the like, the determination unit 73 may limit the arrangement position of the first extension unit 4a in the layout area 67 to the side closer to the basic unit 3a than the connection unit 15. As described above, the first extension unit 4a can be connected to the basic unit 3a and the first extension unit 4a, but cannot be connected to the second extension unit 4b. This is because the connecting surfaces are different. Further, the determination unit 73 may limit the arrangement position of the second extension unit 4b to the side farther from the basic unit 3a than the connection unit 15. This is because the second extension unit 4b cannot be directly connected to the first extension unit 4a or the basic unit 3a, and can only be connected to these via the connecting unit 15. Therefore, by restricting the arrangement of the symbol images in the layout area 67 in accordance with the connection plane restriction, the units can be arranged in the layout area 67 in a state of conforming to the connection plane restriction.

配置位置表示部74は基本ユニット3aをレイアウトエリア67の左端に表示してもよい。決定部73は、配置位置表示部74における第1拡張ユニット4aの配置位置を連結ユニット15よりも左側に制限してもよい。また、決定部73は、第2拡張ユニット4bの配置位置を連結ユニット15よりも右側に制限してもよい。このように基本ユニット3aの右側に拡張ユニット4a、4bをシリーズ接続する場合には、レイアウトエリア67において同様の制約を課すことで、ユーザにとって容易かつ適切に拡張ユニット4a、4bを配置できるようになろう。   The arrangement position display unit 74 may display the basic unit 3 a at the left end of the layout area 67. The determination unit 73 may limit the arrangement position of the first extension unit 4 a in the arrangement position display unit 74 to the left side of the connection unit 15. Further, the determination unit 73 may limit the arrangement position of the second extension unit 4 b to the right side of the connection unit 15. Thus, when the expansion units 4a and 4b are connected in series on the right side of the basic unit 3a, the expansion units 4a and 4b can be arranged easily and appropriately for the user by imposing the same restrictions on the layout area 67. Become.

図31を用いて説明したように、配置位置表示部74は、基本ユニットを上端に表示してもよい。この場合、決定部73は、レイアウトエリア67における第1拡張ユニット4aの配置位置を連結ユニット15よりも上側に制限するとともに、第2拡張ユニット4bの配置位置を連結ユニット15よりも下側に制限してもよい。このように実際の連結方向と、レイアウトエリア67における連結方向とは必ずしも一致する必要はない。これにより、レイアウトエリア67を含むGUIをより簡素なものにすることが可能となる。   As described with reference to FIG. 31, the arrangement position display unit 74 may display the basic unit at the upper end. In this case, the determination unit 73 restricts the arrangement position of the first extension unit 4 a in the layout area 67 to the upper side of the connection unit 15 and restricts the arrangement position of the second extension unit 4 b to the lower side of the connection unit 15. May be. Thus, the actual connection direction and the connection direction in the layout area 67 do not necessarily need to match. As a result, the GUI including the layout area 67 can be simplified.

図32を用いて説明したように、配置位置表示部74は、連結ユニット15がレイアウトエリア67に表示されていないときに第2拡張ユニット4bの識別情報が選択されると、第2拡張ユニット4bの隣であって基本ユニット3aに対して近い側の隣に連結ユニット15を表示してもよい。このように、連結ユニット15を自動で挿入することで、ユーザが自ら連結ユニット15を挿入する手間を省けるようになる。   As described with reference to FIG. 32, when the identification information of the second extension unit 4b is selected when the connection unit 15 is not displayed in the layout area 67, the arrangement position display unit 74 displays the second extension unit 4b. The connecting unit 15 may be displayed next to the base unit 3a. Thus, by automatically inserting the connecting unit 15, it is possible to save the user from having to insert the connecting unit 15 himself.

ポインタ64や指定部75は、レイアウトエリア67において、選択された識別情報に対応する拡張ユニットの配置位置を指定する指定手段として機能する。また、警告出力部76や表示部7は、指定された拡張ユニットの配置位置が配置を禁止された位置である場合に、警告を出力してもよい。これにより、ユーザは、各拡張ユニットごとの配置位置の制限を認識しやすくなるであろう。   The pointer 64 and the designation unit 75 function as designation means for designating the arrangement position of the extension unit corresponding to the selected identification information in the layout area 67. Further, the warning output unit 76 and the display unit 7 may output a warning when the arrangement position of the designated extension unit is a position where the arrangement is prohibited. This will make it easier for the user to recognize the restrictions on the arrangement position for each expansion unit.

図33を用いて説明したように、ユニット番号付与部77は、ユーザプログラム上で第2拡張ユニット4bの配置位置を識別するためのユニット番号を、レイアウトエリア67に表示された第2拡張ユニットの配置位置に応じて付与する付与手段として機能する。ユニット番号付与部77は、基本ユニット3aと第2拡張ユニット4bとの間に追加される連結ユニット15にはユニット番号を付与しないことで、ユーザプログラム上での第2拡張ユニット4bのユニット番号を維持する。これにより、ユーザは、従前の基本ユニット用に作成されたラダープログラムを別の基本ユニットにおいても流用しやすくなろう。   As described with reference to FIG. 33, the unit number assigning unit 77 sets the unit number for identifying the arrangement position of the second extension unit 4 b on the user program in the second extension unit displayed in the layout area 67. It functions as an applying means for applying according to the arrangement position. The unit number assigning unit 77 does not assign a unit number to the connecting unit 15 added between the basic unit 3a and the second extension unit 4b, thereby giving the unit number of the second extension unit 4b on the user program. maintain. This makes it easy for the user to divert the ladder program created for the previous basic unit to another basic unit.

図33を用いて説明したように、割り付け部78は、第2拡張ユニット4bにはユーザプログラム上でリレーを割り付け、連結ユニット15にはリレーを割り付けないリレー割り付け手段として機能してもよい。これにより、ユーザは、従前の基本ユニット用に作成されたラダープログラムを別の基本ユニットにおいても流用しやすくなろう。   As described with reference to FIG. 33, the allocating unit 78 may function as a relay allocating unit that allocates a relay to the second extension unit 4 b on the user program and does not allocate a relay to the connecting unit 15. This makes it easy for the user to divert the ladder program created for the previous basic unit to another basic unit.

図26ないし図32を用いて説明したように、配置位置表示部74は、基本ユニット3、第1拡張ユニット4aおよび第2拡張ユニット4bをシンボル画像または文字情報で表示してもよい。シンボル画像を視認することで、ユーザは、実際のユニットを視覚的に理解しやすくなろう。図31に示したように、ユニットを文字情報で表示することで、GUIをシンプルにすることが可能となろう。   As described with reference to FIGS. 26 to 32, the arrangement position display unit 74 may display the basic unit 3, the first extension unit 4a, and the second extension unit 4b as symbol images or character information. By visually recognizing the symbol image, the user can easily understand the actual unit visually. As shown in FIG. 31, it is possible to simplify the GUI by displaying units as character information.

Claims (19)

ユーザプログラムを周期的に繰り返し実行する基本ユニットと、
前記基本ユニットに対して第1バスを介して接続可能であって、他の第1拡張ユニットと接続可能に構成される第1拡張ユニットと、
少なくとも第2バスを介して前記基本ユニットと接続可能であって、他の第2拡張ユニットと接続可能に構成される第2拡張ユニットと、
前記基本ユニットの側面または前記基本ユニットに接続された前記第1拡張ユニットの側面に対応する第1側面と、前記第2拡張ユニットの側面に連結される第2側面とを有する変換ユニットと
を有することを特徴とするプログラマブル・ロジック・コントローラ。
A basic unit that periodically and repeatedly executes user programs;
A first extension unit connectable to the basic unit via a first bus and configured to be connectable to another first extension unit;
A second extension unit connectable to the basic unit via at least a second bus and configured to be connectable to another second extension unit;
A conversion unit having a first side surface corresponding to a side surface of the basic unit or a side surface of the first extension unit connected to the basic unit, and a second side surface coupled to the side surface of the second extension unit; Programmable logic controller.
前記変換ユニットの前記第1側面の凹凸形状は、前記基本ユニットおよび前記第1拡張ユニットの側面の凹凸形状に対応した形状であり、
前記変換ユニットの前記第2側面の凹凸形状は、前記第2拡張ユニットの側面の凹凸形状に対応した形状であることを特徴とする請求項1に記載のプログラマブル・ロジック・コントローラ。
The uneven shape on the first side surface of the conversion unit is a shape corresponding to the uneven shape on the side surface of the basic unit and the first extension unit,
2. The programmable logic controller according to claim 1, wherein the uneven shape of the second side surface of the conversion unit is a shape corresponding to the uneven shape of the side surface of the second extension unit.
前記変換ユニットは、前記第2バスに接続され、前記基本ユニットと前記第2拡張ユニットとの間で送受信される通信信号を中継する中継手段を有し、
前記基本ユニットは、前記中継手段および前記第2バスを介して前記第2拡張ユニットと通信することを特徴とする請求項1または2に記載のプログラマブル・ロジック・コントローラ。
The conversion unit includes a relay unit that is connected to the second bus and relays communication signals transmitted and received between the basic unit and the second expansion unit.
3. The programmable logic controller according to claim 1, wherein the basic unit communicates with the second expansion unit via the relay unit and the second bus.
前記中継手段は、前記第1バスの通信信号と前記第2バスの通信信号とを相互に変換するバス変換手段であり、
前記基本ユニットは、前記第1バス、前記バス変換手段および前記第2バスを介して前記第2拡張ユニットと通信することを特徴とする請求項3に記載のプログラマブル・ロジック・コントローラ。
The relay means is a bus conversion means for mutually converting the communication signal of the first bus and the communication signal of the second bus,
4. The programmable logic controller according to claim 3, wherein the basic unit communicates with the second expansion unit via the first bus, the bus conversion unit, and the second bus.
前記中継手段は、前記第2バスの通信信号を前記基本ユニットへ中継するための通信ケーブルをさらに有することを特徴とする請求項3に記載のプログラマブル・ロジック・コントローラ。   4. The programmable logic controller according to claim 3, wherein the relay unit further includes a communication cable for relaying the communication signal of the second bus to the basic unit. 前記基本ユニットの側面には第1のタイプのコネクタが設けられており、
前記第1拡張ユニットの一方の側面および前記変換ユニットの前記第1側面には前記第1のタイプのコネクタに接続する第2のタイプのコネクタが設けられており、
前記第1拡張ユニットの他方の側面には前記第1のタイプのコネクタが設けられており、
前記変換ユニットの前記第2側面には第3のタイプのコネクタが設けられており、
前記第2拡張ユニットの一方の側面には前記第3のタイプのコネクタに接続する第4のタイプのコネクタが設けられており、
前記第2拡張ユニットの他方の側面には前記第3のタイプのコネクタが設けられていることを特徴とする請求項1ないし5のいずれか1項に記載のプログラマブル・ロジック・コントローラ。
A first type connector is provided on a side surface of the basic unit,
A second type connector connected to the first type connector is provided on one side surface of the first extension unit and the first side surface of the conversion unit,
The first type connector is provided on the other side of the first extension unit,
A third type connector is provided on the second side surface of the conversion unit,
A fourth type connector connected to the third type connector is provided on one side surface of the second extension unit,
6. The programmable logic controller according to claim 1, wherein the third type connector is provided on the other side surface of the second expansion unit. 7.
前記第1バスは前記第1のタイプのコネクタおよび前記第2のタイプのコネクタを介して前記基本ユニットから前記変換ユニットまで延在しており、
前記第2バスは前記第3のタイプのコネクタおよび前記第4のタイプのコネクタを介して前記変換ユニットから前記第2拡張ユニットまで延在していることを特徴とする請求項6に記載のプログラマブル・ロジック・コントローラ。
The first bus extends from the basic unit to the conversion unit via the first type connector and the second type connector;
7. The programmable device of claim 6, wherein the second bus extends from the conversion unit to the second expansion unit via the third type connector and the fourth type connector. -Logic controller.
前記基本ユニット、前記第1拡張ユニット、前記変換ユニットおよび前記第2拡張ユニットを固定するベースフレームをさらに有することを特徴とする請求項1ないし7のいずれか1項に記載のプログラマブル・ロジック・コントローラ。   The programmable logic controller according to any one of claims 1 to 7, further comprising a base frame for fixing the basic unit, the first extension unit, the conversion unit, and the second extension unit. . 前記プログラマブル・ロジック・コントローラは、ベースフレームを有しないベースレスかつビルディングタイプのシステムであることを特徴とする請求項1ないし7のいずれか1項に記載のプログラマブル・ロジック・コントローラ。   The programmable logic controller according to any one of claims 1 to 7, wherein the programmable logic controller is a baseless and building-type system having no base frame. 前記基本ユニット、前記第1拡張ユニット、前記変換ユニットおよび前記第2拡張ユニットの各背面には、基準レールに取り付けるための取付け部が設けられていることを特徴とする請求項9に記載のプログラマブル・ロジック・コントローラ。   The programmable unit according to claim 9, wherein an attachment portion for attachment to a reference rail is provided on each back surface of the basic unit, the first extension unit, the conversion unit, and the second extension unit. -Logic controller. 前記第1バスの信号転送速度は前記第2バスの信号転送速度よりも高速であることを特徴とする請求項1ないし10のいずれか1項に記載のプログラマブル・ロジック・コントローラ。   11. The programmable logic controller according to claim 1, wherein a signal transfer rate of the first bus is higher than a signal transfer rate of the second bus. 前記第1バスはシリアル転送を実行するバスであり、
前記第2バスはパラレル転送を実行するバスであり、
前記変換ユニットはシリアル/パラレル変換を実行することを特徴とする請求項1ないし11のいずれか1項に記載のプログラマブル・ロジック・コントローラ。
The first bus is a bus that performs serial transfer;
The second bus is a bus that performs parallel transfer;
12. The programmable logic controller according to claim 1, wherein the conversion unit performs serial / parallel conversion.
前記変換ユニットは、前記第2バスの通信を制御するバスマスタを有していることを特徴とする請求項12に記載のプログラマブル・ロジック・コントローラ。   The programmable logic controller according to claim 12, wherein the conversion unit includes a bus master that controls communication of the second bus. 前記変換ユニットの前記第1側面には、当該第1側面に連結された前記基本ユニットまたは前記第1拡張ユニットを固定するロック機構が設けられており、
前記変換ユニットの前記第2側面には、当該第2側面に連結された前記第2拡張ユニットを固定するロック機構が設けられていることを特徴とする請求項1ないし13のいずれか1項に記載のプログラマブル・ロジック・コントローラ。
The first side surface of the conversion unit is provided with a lock mechanism for fixing the basic unit or the first extension unit connected to the first side surface,
14. The lock mechanism for fixing the second extension unit connected to the second side surface is provided on the second side surface of the conversion unit. Programmable logic controller as described.
前記基本ユニットから延在し、前記第2バスの通信信号を前記基本ユニットへ中継する第3バスをさらに備えることを特徴とする請求項1に記載のプログラマブル・ロジック・コントローラ。   The programmable logic controller according to claim 1, further comprising a third bus extending from the basic unit and relaying a communication signal of the second bus to the basic unit. 前記第3バスは前記第1拡張ユニットを通過するように配線されていることを特徴とする請求項15に記載のプログラマブル・ロジック・コントローラ。   The programmable logic controller of claim 15, wherein the third bus is wired to pass through the first expansion unit. 前記第2バスは前記変換ユニットおよび前記第1拡張ユニットを通過して前記基本ユニットまで延在していることを特徴とする請求項1に記載のプログラマブル・ロジック・コントローラ。   The programmable logic controller of claim 1, wherein the second bus extends through the conversion unit and the first expansion unit to the basic unit. 前記基本ユニットに設けられ、前記第1バスで実行される通信を制御する第1バス制御手段と、
前記バス変換ユニットに設けられ、前記第2バスで実行される通信を制御する第2バス制御手段と、
前記第1バスに接続されている前記第1拡張ユニットと前記第2バスに接続されている前記第2拡張ユニットとの接続情報を管理する管理手段と、
前記管理手段により管理されている前記接続情報にしたがって前記第1バス制御手段または前記第2バス制御手段を通じて制御対象となっている拡張ユニットと通信する第3制御手段と
を有することを特徴とする請求項1ないし17のいずれか1項に記載のプログラマブル・ロジック・コントローラ。
A first bus control means provided in the basic unit for controlling communication executed on the first bus;
Second bus control means provided in the bus conversion unit for controlling communication executed by the second bus;
Management means for managing connection information between the first extension unit connected to the first bus and the second extension unit connected to the second bus;
And third control means for communicating with the extension unit to be controlled through the first bus control means or the second bus control means in accordance with the connection information managed by the management means. The programmable logic controller according to any one of claims 1 to 17.
ユーザプログラムを周期的に繰り返し実行する基本ユニットの側面、または、当該基本ユニットに対して第1バスを介して接続される第1拡張ユニットの側面に連結される第1側面と、
少なくとも第2バスを介して前記基本ユニットと接続される第2拡張ユニットの側面に連結される第2側面とを有する、プログラマブル・ロジック・コントローラ用の変換ユニット。
A side surface of a basic unit that periodically and repeatedly executes a user program, or a first side surface coupled to a side surface of a first expansion unit connected to the basic unit via a first bus;
A conversion unit for a programmable logic controller having at least a second side surface coupled to a side surface of a second expansion unit connected to the basic unit via a second bus.
JP2014213959A 2014-10-20 2014-10-20 Programmable logic controller and conversion unit Active JP6483998B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014213959A JP6483998B2 (en) 2014-10-20 2014-10-20 Programmable logic controller and conversion unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014213959A JP6483998B2 (en) 2014-10-20 2014-10-20 Programmable logic controller and conversion unit

Publications (2)

Publication Number Publication Date
JP2016081390A true JP2016081390A (en) 2016-05-16
JP6483998B2 JP6483998B2 (en) 2019-03-13

Family

ID=55958875

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014213959A Active JP6483998B2 (en) 2014-10-20 2014-10-20 Programmable logic controller and conversion unit

Country Status (1)

Country Link
JP (1) JP6483998B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0792900A (en) * 1993-09-20 1995-04-07 Omron Corp Programmable controller
JP2004072905A (en) * 2002-08-06 2004-03-04 Toshiba Corp Digital protecting and controlling device
JP2006039831A (en) * 2004-07-26 2006-02-09 Koyo Electronics Ind Co Ltd Plc
JP2006195626A (en) * 2005-01-12 2006-07-27 Mitsubishi Electric Corp Apparatus for controlling plant
JP2006330805A (en) * 2005-05-23 2006-12-07 Mitsubishi Electric Corp Unit type programmable controller
JP2013162117A (en) * 2012-02-01 2013-08-19 M-System Co Ltd Extension unit and electronic apparatus including the same

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0792900A (en) * 1993-09-20 1995-04-07 Omron Corp Programmable controller
JP2004072905A (en) * 2002-08-06 2004-03-04 Toshiba Corp Digital protecting and controlling device
JP2006039831A (en) * 2004-07-26 2006-02-09 Koyo Electronics Ind Co Ltd Plc
JP2006195626A (en) * 2005-01-12 2006-07-27 Mitsubishi Electric Corp Apparatus for controlling plant
JP2006330805A (en) * 2005-05-23 2006-12-07 Mitsubishi Electric Corp Unit type programmable controller
JP2013162117A (en) * 2012-02-01 2013-08-19 M-System Co Ltd Extension unit and electronic apparatus including the same

Also Published As

Publication number Publication date
JP6483998B2 (en) 2019-03-13

Similar Documents

Publication Publication Date Title
US8612631B2 (en) Control apparatus including detachable keypad with communication port connecting personal computer to the keypad
EP2148259A1 (en) Field device management apparatus and field device management system
EP3146674B1 (en) Configuring terminal devices
US9898925B2 (en) Method for operating a field device
CN103516961B (en) Image processor and preparation method thereof and master card
CN105704972A (en) Automation device, connection module for an automation device and method for operating an automation device
JP2007219711A (en) Remote device control program
KR20130127527A (en) Programmable display apparatus and image data creation method
JP6483999B2 (en) Setting support apparatus, setting support method, program, and programmable logic controller system
JP2016081389A (en) Programmable logic controller and bus conversion unit
JP6828600B2 (en) Information processing system, operation device, information processing method and information processing program
CN107645572B (en) System, method and apparatus for supporting multiple network addressing modes
CN102571993A (en) Communication system, communication device, server system and recording medium
JP6483998B2 (en) Programmable logic controller and conversion unit
JP5486378B2 (en) External device characteristic display system, display device, and external device characteristic display method
JP2011186607A (en) Field device, setting method for the same, field device management method and program
JP2007066584A (en) Illumination facility support system and program therefor
JP2007011936A (en) Programmable display unit
JP2019152949A (en) Display device, screen generation method, and screen generation program
JP4567982B2 (en) Link setting device for control equipment
CN103733150B (en) Program creating device and programmable logic controller (PLC)
JP2019179475A (en) Support apparatus, support program, and setting method
JP5565624B2 (en) Parameter setting tool
JP6484015B2 (en) Programmable logic controller and control method thereof
JP2016110221A (en) Programmable logic controller, basic unit, control method and control program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170831

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180625

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180620

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180822

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190215

R150 Certificate of patent or registration of utility model

Ref document number: 6483998

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250