JP4910604B2 - Slave device - Google Patents

Slave device Download PDF

Info

Publication number
JP4910604B2
JP4910604B2 JP2006265879A JP2006265879A JP4910604B2 JP 4910604 B2 JP4910604 B2 JP 4910604B2 JP 2006265879 A JP2006265879 A JP 2006265879A JP 2006265879 A JP2006265879 A JP 2006265879A JP 4910604 B2 JP4910604 B2 JP 4910604B2
Authority
JP
Japan
Prior art keywords
input
output devices
base board
slave
station number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2006265879A
Other languages
Japanese (ja)
Other versions
JP2008084204A (en
Inventor
淳一 長谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2006265879A priority Critical patent/JP4910604B2/en
Publication of JP2008084204A publication Critical patent/JP2008084204A/en
Application granted granted Critical
Publication of JP4910604B2 publication Critical patent/JP4910604B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、プログラマブルコントローラのスレーブ装置に関し、特に、接続される入出力装置に対して局番を割り当てる機能を有するスレーブ装置に関する。   The present invention relates to a slave device of a programmable controller, and more particularly to a slave device having a function of assigning station numbers to connected input / output devices.

プログラマブルコントローラは、アナログあるいはデジタルの各種の入出力装置を接続してそれらの装置についてシーケンス制御を行うことのできる回路であり、親局(マスタ、プログラマブルコントローラ)および子局(スレーブ)の構成をとるプログラマブルコントローラシステムも一般的に用いられている。かかるシステムにおいては、マスタはそのCPUによりシステムの構成や制御シーケンスの設定やシステム全体の管理等を行い、スレーブは入出力装置を接続してデータの収集等を行う。マスタとスレーブとの間はイーサネット(登録商標)や各種フィールドネットワークを介して通信可能であり、出力装置に対する出力データや入力装置からの入力データ等について、ネットワークを介して通信する。スレーブにおいて収集したデータに基づいて各種制御を行う技術に関しては、複数の温度センサが接続され、それらの温度センサから取り込んだデータに基づいて異常を検出し、結果をプログラマブルコントローラ(PLC)に通知する技術について提供されている(例えば、特許文献1)。   The programmable controller is a circuit capable of connecting various analog or digital input / output devices and performing sequence control on those devices, and has a configuration of a master station (master, programmable controller) and a slave station (slave). Programmable controller systems are also commonly used. In such a system, a master performs system configuration, control sequence setting, overall system management, and the like by its CPU, and a slave connects an input / output device to collect data. The master and the slave can communicate with each other via Ethernet (registered trademark) or various field networks, and communicate data via the network for output data to the output device, input data from the input device, and the like. Regarding technologies that perform various controls based on data collected in the slave, a plurality of temperature sensors are connected, an abnormality is detected based on the data captured from those temperature sensors, and the result is notified to the programmable controller (PLC). It is provided about a technique (for example, patent document 1).

ところで、上記のようなマスタ・スレーブ型のシステムにおいては、ユーザは、入出力装置をスレーブ上に任意に搭載することができる。システムによっては、スレーブは、システム起動時に自装置に実際に装着されている入出力装置の構成を確認し、マスタに装置構成に関わる情報を通知する。この場合、マスタのCPUにおいては、スレーブから受信した情報に基づいてシステム正常と判断された場合に限り、ネットワークの通信動作を開始することを許可する。   By the way, in the master / slave type system as described above, the user can arbitrarily mount the input / output device on the slave. Depending on the system, the slave confirms the configuration of the input / output device actually mounted on the device itself when the system is started, and notifies the master of information related to the device configuration. In this case, the master CPU permits the network communication operation to start only when it is determined that the system is normal based on the information received from the slave.

その一方で、マスタ(のCPU)によっては、システム起動時であってもスレーブ側の装置構成をチェックしない場合もある。
図10は、従来のプログラマブルコントローラシステムの問題点を説明するための図である。図10(a)は、正常状態のシステムを示す。スレーブは、第1のベースボード101には1台の直流入力装置(図10においては「DC入力」と表記)が搭載され、第2のベースボード102には2台の直流出力装置と1台の直流入力装置が搭載されている。一方、図10(b)は、スレーブに異常がある場合のシステムを示す。第2のベースボード102には本来は3台の入出力装置搭載されているべきであるのに対し、2台が故障のためスレーブにおいて認識されていない状態を示している。
特開2005−259077号公報
On the other hand, depending on the master (or its CPU), the device configuration on the slave side may not be checked even when the system is activated.
FIG. 10 is a diagram for explaining problems of a conventional programmable controller system. FIG. 10A shows a system in a normal state. In the slave, one DC input device (denoted as “DC input” in FIG. 10) is mounted on the first base board 101, and two DC output devices and one are mounted on the second base board 102. DC input device is installed. On the other hand, FIG. 10B shows a system when there is an abnormality in the slave. The second base board 102 should originally be equipped with three input / output devices, whereas two are not recognized by the slave due to a failure.
Japanese Patent Laying-Open No. 2005-259077

例えばオープンシステム等では、スレーブが上記の装置構成のチェックをしないマスタとでシステムを構築されることもあり得る。このような仕様のシステムにおいては、図10(b)に示す例のように、スレーブに搭載されるべき入出力装置が故障や脱落により認識されない場合であっても、マスタのCPUにおいてシステム異常を検出しないため、スレーブは、通常通りにマスタとの通信動作を開始させることになる。オープンシステム等においても、各装置が正常な状態にあることを確認した上で動作を開始させられることが好ましい。   For example, in an open system or the like, it is possible that a slave is constructed with a master that does not check the device configuration. In a system with such a specification, even if the input / output device to be mounted on the slave is not recognized due to a failure or a dropout, as shown in the example shown in FIG. Since it is not detected, the slave starts communication operation with the master as usual. Even in an open system or the like, it is preferable to start the operation after confirming that each device is in a normal state.

本発明は、スレーブに搭載されている入出力装置の構成について、簡易な手段を用いてスレーブにおいてチェックすることのできる技術を提供するを目的とする。   An object of the present invention is to provide a technique that allows a slave to check the configuration of an input / output device mounted on a slave using simple means.

上記課題を解決するために、本発明は、プログラマブルコントローラとネットワークを介して通信し、接続されるべき入出力装置に局番を割り当てる機能を有するスレーブ装置であって、前記接続されるべき入出力装置の数を設定する設定手段と、前記設定手段により設定された入出力装置数に基づいて、前記接続されるべき入出力装置に局番を割り当てて配布する配布手段と、前記プログラマブルコントローラを起動するときに、前記局番を読み出すことにより前記スレーブ装置に接続されている入出力装置の数を計測するカウンタ手段と、前記設定手段により設定された入出力装置数と、前記カウンタ手段により計測された入出力装置数とが一致するか否かを判定する判定手段とを備え、前記判定手段により入出力装置数が相互に一致すると判定された場合は、前記プログラマブルコントローラとの通信を開始させる構成とする。   In order to solve the above problems, the present invention is a slave device having a function of communicating with a programmable controller via a network and assigning a station number to an input / output device to be connected, the input / output device to be connected A setting means for setting the number of terminals, a distribution means for assigning and distributing station numbers to the input / output devices to be connected based on the number of input / output devices set by the setting means, and when starting the programmable controller Counter means for measuring the number of input / output devices connected to the slave device by reading out the station number, the number of input / output devices set by the setting means, and the input / output measured by the counter means Determining means for determining whether or not the number of devices match, and the number of input / output devices matches each other by the determining means. If it is determined that, a configuration for starting the communication with the programmable controller.

スイッチ等の設定手段を介してスレーブ装置に接続すべき入出力装置の数を設定すると、その値に基づいて、入出力装置に局番を割り当てる。プログラマブルコントローラを起動する際に局番を読み出して、設定通りの数の入出力装置がスレーブ装置に接続されているか否かをチェックする。プログラマブルコントローラを起動するタイミングでスレーブ装置において適正な数の入出力装置が接続されているか否かを確認した上で、プログラマブルコントローラとの通信を開始することができる。   When the number of input / output devices to be connected to the slave device is set via setting means such as a switch, a station number is assigned to the input / output device based on the value. When starting the programmable controller, the station number is read, and it is checked whether or not the set number of input / output devices are connected to the slave device. Communication with the programmable controller can be started after confirming whether or not an appropriate number of input / output devices are connected in the slave device at the timing of starting the programmable controller.

前記判定手段により入出力装置数が相互に一致しないと判定された場合は、前記スレーブ装置において異常が発生している旨を前記プログラマブルコントローラに通知する通知手段を更に備えることとしてもよい。   When the determination means determines that the number of input / output devices does not match each other, it may further comprise notification means for notifying the programmable controller that an abnormality has occurred in the slave device.

前記配布手段は、前記カウンタ手段によって最初に読み出される入出力装置に対して、前記設定手段により設定された値と等しい値を局番として割り当てるのが好ましい。最初に読み出される局番を参照することにより設定手段により設定されている入出力装置数を認識することができる。   Preferably, the distribution means assigns a value equal to the value set by the setting means to the input / output device that is first read by the counter means as a station number. The number of input / output devices set by the setting means can be recognized by referring to the station number read out first.

更には、前記設定手段は、前記入出力装置を装着可能なスロットの数を設定するための第1の設定手段と、前記スロットに接続されるべき入出力装置の数を設定するための第2の設定手段とを前記スロットを有するベースボードごとに備え、前記判定手段は、前記ベースボードごとに前記第2の設定手段により設定された値と前記カウンタ手段により計測された入出力装置数とが一致するか否かを判定し、前記入出力装置数が相互に一致しないと判定されたベースボードについては、前記判定手段は、前記第1および第2の設定手段によりそれぞれ設定された値に基づいて、エラーが発生しているベースボードを検出することとしてもよい。複数のベースボードを備えた構成のスレーブ装置において、いずれのベースボードにおいてエラーが発生しているかを容易に把握できる。   Furthermore, the setting means has a first setting means for setting the number of slots in which the input / output devices can be mounted, and a second setting means for setting the number of input / output devices to be connected to the slots. For each base board having the slot, and the determination means includes a value set by the second setting means for each base board and a number of input / output devices measured by the counter means. It is determined whether or not they match, and for the base boards that are determined not to match the number of input / output devices, the determination means is based on values set by the first and second setting means, respectively. The base board in which an error has occurred may be detected. In a slave device having a configuration including a plurality of base boards, it is possible to easily grasp which base board has an error.

本発明によれば、スレーブ装置に搭載されている入出力装置の数が適正であるか否かについて、簡易な手段を用いてスレーブ装置においてチェックすることができる。そして、スレーブ装置において入出力装置数をチェックすることにより、スレーブ装置の状態が異常と判断された場合には、プログラマブルコントローラとの通信を開始しないようにスレーブ装置において制御することが可能とされる。   According to the present invention, whether or not the number of input / output devices mounted in the slave device is appropriate can be checked in the slave device using simple means. Then, by checking the number of input / output devices in the slave device, if it is determined that the status of the slave device is abnormal, it is possible to control the slave device so as not to start communication with the programmable controller. .

以下、本発明の好適な実施の形態について、図面を参照しながら詳細に説明する。
図1は、第1の実施形態に係るプログラマブルコントローラシステムの原理図である。図1のプログラマブルコントローラシステム1は、マスタ2およびスレーブ3を含み、相互にネットワーク10を介して接続されている。
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described in detail with reference to the drawings.
FIG. 1 is a principle diagram of a programmable controller system according to the first embodiment. A programmable controller system 1 of FIG. 1 includes a master 2 and a slave 3 and is connected to each other via a network 10.

マスタ(プログラマブルコントローラ)2は、ベースボードに搭載され、直接あるいはスレーブ3を介してプログラマブルコントローラシステム1に接続される各種入出力装置の制御を行う。スレーブ3は、ベースボード4に搭載され、マスタ2とイーサネット(登録商標)や各種フィールドネットワーク等のネットワーク10を介して接続されている。スレーブ3は、マスタ2からの命令を自装置側の入出力装置に通知したり、入出力装置から取得したデータをマスタ2に送信したりする。   The master (programmable controller) 2 is mounted on the base board and controls various input / output devices connected to the programmable controller system 1 directly or via the slave 3. The slave 3 is mounted on the base board 4 and is connected to the master 2 via a network 10 such as Ethernet (registered trademark) or various field networks. The slave 3 notifies the instruction from the master 2 to the input / output device on the own device side, and transmits data acquired from the input / output device to the master 2.

スレーブ3のベースボード4は、図1に示す例においては2枚から構成されており、直接ネットワーク10に接続され、スレーブ3の回路が搭載されている方のベースボードを第1の方のベースボード4Aとし、第1のベースボード4Aを介してネットワーク10に接続されているベースボードを第2のベースボード4Bとする。第1のベースボード4Aは、電源41、スレーブ3、第1のスロット43およびスイッチ5を含み、第2のベースボード4Bは、電源44および第2〜第4のスロット44、45、46を含む。   The base board 4 of the slave 3 is composed of two in the example shown in FIG. 1, and the base board that is directly connected to the network 10 and on which the circuit of the slave 3 is mounted is used as the first base board. The base board connected to the network 10 via the first base board 4A is referred to as a second base board 4B. The first base board 4A includes a power source 41, a slave 3, a first slot 43, and a switch 5, and the second base board 4B includes a power source 44 and second to fourth slots 44, 45, and 46. .

電源41、44は、それぞれのベースボード4(4A、4B)に電力を供給する。第1〜第4のスロット43、45、46、47は、入出力装置を搭載するために設けられる。
スイッチ5は、例えばロータリスイッチや、ピアノスイッチ等から構成され、スレーブ3の4つのスロットのうち、実際に入出力装置を搭載すべきスロット数を設定するために用いる。スイッチ5は、例えばシステムを構築するエンジニアや管理者等のシステムのユーザにより設定される。
The power supplies 41 and 44 supply power to the respective base boards 4 (4A and 4B). The first to fourth slots 43, 45, 46, and 47 are provided for mounting input / output devices.
The switch 5 is composed of, for example, a rotary switch, a piano switch, or the like, and is used to set the number of slots in which the input / output devices are actually mounted among the four slots of the slave 3. The switch 5 is set by a system user such as an engineer or administrator who constructs the system.

図1に示す例では、スイッチに設定された入出力装置数は「4」である。すなわち、第1および第2のベースボード上には4つのスロットが存在するが、全てのスロットに対して入出力装置を搭載する構成が設定されている。そして、第1〜第4のスロットそれぞれに(1)〜(4)の入力/出力装置が搭載されている。スレーブ3は、プログラマブルコントローラシステム1の起動時に自装置に接続されている入出力装置数をカウントし、カウント値とスイッチ5に設定されている値とを比較する。   In the example shown in FIG. 1, the number of input / output devices set in the switch is “4”. That is, although there are four slots on the first and second base boards, a configuration in which an input / output device is mounted on all slots is set. The input / output devices (1) to (4) are mounted in the first to fourth slots, respectively. The slave 3 counts the number of input / output devices connected to its own device when the programmable controller system 1 is activated, and compares the count value with the value set in the switch 5.

図1(a)は正常と判断される場合のシステム構成例である。図1(a)の例においては、スイッチ5に設定されている入出力装置数が4であり、実際に搭載されている入出力装置数が4であるため、相互に値が一致し、スレーブ3の状態は「正常」である旨がマスタ2に対して通知される。マスタ2は、スレーブ3について正常な状態にあることを通知されると、スレーブ3との通信を開始する。   FIG. 1A shows an example of a system configuration when it is determined to be normal. In the example of FIG. 1A, the number of input / output devices set in the switch 5 is 4, and the number of actually mounted input / output devices is 4. The master 2 is notified that the state 3 is “normal”. When the master 2 is notified that the slave 3 is in a normal state, the master 2 starts communication with the slave 3.

これに対し、図1(b)は異常と判断される場合のシステム構成例である。図1(b)に示す例では、第3および第4のスロットに搭載されるべき入出力装置は、故障あるいは脱落しており、検出されない。スレーブ3は、プログラマブルコントローラシステム1を起動するタイミングで、スイッチ5に設定されている入出力装置数「4」と、実際に搭載されている入出力装置数「2」とを比較する。2値が相互に一致しない場合は、スレーブ3の状態は「異常」であると判断する。そして、その旨がマスタ2に対して通知される。マスタ2は、例えば異常の検出されたスレーブ3を動作させないよう制御することができる。   On the other hand, FIG. 1B shows an example of a system configuration when it is determined that there is an abnormality. In the example shown in FIG. 1B, the input / output devices to be mounted in the third and fourth slots are not detected because they have failed or dropped out. The slave 3 compares the number of input / output devices “4” set in the switch 5 with the number of input / output devices actually mounted “2” at the timing of starting the programmable controller system 1. If the two values do not match each other, it is determined that the state of the slave 3 is “abnormal”. Then, the fact is notified to the master 2. For example, the master 2 can perform control so that the slave 3 in which an abnormality is detected is not operated.

なお、図1に示すシステム構成においては、スイッチ5はベースボードに設けられているが、これに限定されるものではない。例えばマスタ3に直接取り付ける構成としてもよい。   In the system configuration shown in FIG. 1, the switch 5 is provided on the base board, but the present invention is not limited to this. For example, it may be configured to be directly attached to the master 3.

図1の本実施形態に係るスレーブ3においては、プログラマブルコントローラシステム1の起動時にスレーブ3側で入出力装置数をチェックするために、入出力装置の局番の値を参照する。そして、局番は、予めスイッチ5において設定した値に基づいて割り当てられている。以下、入出力装置ごとに局番を割り当てる方法について具体的に説明する。   In the slave 3 according to the present embodiment in FIG. 1, the station number value of the input / output device is referred to in order to check the number of input / output devices on the slave 3 side when the programmable controller system 1 is activated. The station number is assigned based on a value set in advance in the switch 5. A method for assigning station numbers for each input / output device will be specifically described below.

図2は、局番の配布方法の概要を説明するための図である。スイッチにおいて設定した値と各入出力装置に割り当てられる局番との関係を説明するために、図1に示す構成とは異なり、各ベースボードにスイッチが2台ずつ設置された構成としている。図2の例においては、局番配布回路7はベースボードごとに設けられている。局番配布回路7は、2つのスイッチにおいてそれぞれ設定された値を読み出し、読み出した値に基づいてそれぞれのパルスを生成する。生成されたパルスは、バスを介して各入出力装置に送信される。   FIG. 2 is a diagram for explaining the outline of the station number distribution method. In order to explain the relationship between the value set in the switch and the station number assigned to each input / output device, unlike the configuration shown in FIG. 1, a configuration is provided in which two switches are installed on each base board. In the example of FIG. 2, the station number distribution circuit 7 is provided for each base board. The station number distribution circuit 7 reads the values set in the two switches, and generates each pulse based on the read values. The generated pulse is transmitted to each input / output device via a bus.

まず、第1のベースボード4Aの局番の割り当て処理について説明する。第1のベースボードには1つのスロットが設けられており、1台の入出力装置を搭載可能である。
図2に示すように、第1のベースボード4A上の2つのスイッチ5A、6Aのうち、スイッチ5Aには「4」、スイッチ6Aには「0」がそれぞれ設定されている。図2において(1)の入力装置の下方に記載されている値のうち、上段がスイッチ6Aに対応させて割り当てられた局番であり、下段がスイッチ5Aに対応させて割り当てられた局番である。スロット43に設置された(1)のモジュールについては、スイッチ5Aの値と同じ「4」を局番として設定する。スイッチ6Aに「0」が設定されている場合は、これに対応する局番も同様に「0」を割り当てる。
First, station number assignment processing of the first base board 4A will be described. The first base board is provided with one slot, and one input / output device can be mounted.
As shown in FIG. 2, among the two switches 5A and 6A on the first base board 4A, “4” is set to the switch 5A and “0” is set to the switch 6A. In FIG. 2, among the values described below the input device (1), the upper row is the station number assigned in association with the switch 6A, and the lower row is the station number assigned in association with the switch 5A. For the module (1) installed in the slot 43, “4”, which is the same as the value of the switch 5A, is set as the station number. When “0” is set in the switch 6A, the station number corresponding to this is similarly assigned “0”.

次に、第2のベースボード4Bの局番の割り当て処理について説明する。第2のベースボード4Bは3つのスロットが設けられており、3台の入出力装置を搭載可能である。
第2のベースボード4Bには、第1のベースボード4Aと同様に2つのスイッチが取り付けられており、スイッチ5Bには「5」、スイッチ6Bには「0」がそれぞれ設定されている。図2中においては(2)から(4)の入出力装置の下方に、それぞれ割り当てられた局番を記載している。各入出力装置のモジュールに割り当てられた局番のうち、上段はスイッチ6Bに対応させて割り当てられた局番であり、下段はスイッチ5Bに対応させて割り当てられた局番である。
Next, the station number assignment process of the second base board 4B will be described. The second base board 4B is provided with three slots, and three input / output devices can be mounted.
As with the first base board 4A, two switches are attached to the second base board 4B. “5” is set to the switch 5B, and “0” is set to the switch 6B. In FIG. 2, the assigned station numbers are shown below the input / output devices (2) to (4). Of the station numbers assigned to the modules of each input / output device, the upper part is the station number assigned in correspondence with the switch 6B, and the lower part is the station number assigned in correspondence with the switch 5B.

第2のベースボード4Bのように、1枚のベースボード上に複数の入出力装置が搭載されている場合は、スイッチ6B、5Bにそれぞれ設定された値に基づいて、(2)から(4)のモジュールの順に局番を割り当てていく。スイッチ5Aに設定されている値は「5」であるので、例えば局番配布回路7に近い(2)のモジュールから順に、それぞれ5、6および7の局番を割り当てる。スイッチ6Bのように「0」が設定されている場合は、複数のモジュールが搭載されている場合であっても、いずれのモジュールの局番に対しても「0」を割り当てる。   When a plurality of input / output devices are mounted on one base board as in the second base board 4B, (2) to (4) based on the values set in the switches 6B and 5B, respectively. ) Assign station numbers in the order of modules. Since the value set in the switch 5A is “5”, for example, the station numbers 5, 6 and 7 are assigned in order from the module (2) close to the station number distribution circuit 7, for example. When “0” is set as in the switch 6B, “0” is assigned to the station number of any module even if a plurality of modules are mounted.

入出力装置ごとに局番を設定する手順について、更に説明する。
図3は、局番をモジュールに配布する処理を示したフローチャートである。図3に示す一連の処理は、ユーザ等によりスイッチ5に値が設定されたことを契機として開始される。なお、ここでは、図2に示す第2のベースボード4Bについて、スイッチ5Bにおいて設定された値に基づいて第2から第4の入出力装置について局番を設定する処理を例に説明することとする。
The procedure for setting the station number for each input / output device will be further described.
FIG. 3 is a flowchart showing processing for distributing station numbers to modules. A series of processes shown in FIG. 3 is started when a value is set in the switch 5 by a user or the like. Here, for the second base board 4B shown in FIG. 2, processing for setting station numbers for the second to fourth input / output devices based on the values set in the switch 5B will be described as an example. .

まず、ステップS1で、局番配布回路7がスイッチで設定された分のパルスを出力する。図4(a)は、ステップS1において出力されるパルスを模式的に示した図である。次に、ステップS2で、第2のLSIは、受信した図4(a)に示すパルスについてそのパルス幅をカウントし、カウント値に基づいて局番を設定する。図4(a)の例においては、第2の入出力装置の局番は「5」と設定される。そして、ステップS3で、第2のLSIはパルス幅を1加算し、次の入出力装置すなわち第3の入出力装置に対してパルスを送信する。   First, in step S1, the station number distribution circuit 7 outputs pulses for the amount set by the switch. FIG. 4A is a diagram schematically showing the pulses output in step S1. Next, in step S2, the second LSI counts the pulse width of the received pulse shown in FIG. 4A, and sets the station number based on the count value. In the example of FIG. 4A, the station number of the second input / output device is set to “5”. In step S3, the second LSI adds 1 to the pulse width and transmits a pulse to the next input / output device, that is, the third input / output device.

ステップS4で、第3のLSIは、第2のLSIと同様に、受信したパルスのパルス幅をカウントし、局番を設定する。図4(b)は、第3のLSIが受信したパルスを模式的に示した図である。第3のLSIは、第2のLSIについて設定された局番の値に1を加算した「6」を自己の局番として設定する。そして、ステップS5で、第3のLSIはパルス幅を1加算して次の入出力装置である第4の入出力装置に対してパルスを送信する。ステップS5で、第4のLSIは、第2および第3のLSIと同様に、受信したパルスのパルス幅をカウントして自己の局番として設定する。図4(c)は、第4のLSIが受信したパルスを模式的に示した図である。図4(c)に示すように、第4のLSIは、値「7」を自己の局番として設定し、処理を終了する。   In step S4, the third LSI counts the pulse width of the received pulse and sets the station number in the same manner as the second LSI. FIG. 4B is a diagram schematically showing a pulse received by the third LSI. The third LSI sets “6” obtained by adding 1 to the value of the station number set for the second LSI as its own station number. In step S5, the third LSI adds 1 to the pulse width and transmits a pulse to the fourth input / output device as the next input / output device. In step S5, the fourth LSI counts the pulse width of the received pulse and sets it as its own station number, as in the second and third LSIs. FIG. 4C is a diagram schematically showing pulses received by the fourth LSI. As shown in FIG. 4C, the fourth LSI sets the value “7” as its own station number and ends the process.

上記の局番の配布方法によれば、図1に示す構成においては、第1の入出力装置はスイッチの接続された第1のベースボード4Aに搭載されるため、スイッチ5に設定された値に基づいて局番が割り当てられ、その値は0x04となる。他方で、第2から第4の入出力装置については、第2のベースボードにはスイッチが接続されていない。この場合は、第2から第4の入出力装置に割り当てられる局番は、例えば昇順に設定され、それぞれ0x01、0x02および0x03となる。   According to the station number distribution method described above, in the configuration shown in FIG. 1, the first input / output device is mounted on the first base board 4A to which the switch is connected. A station number is assigned based on the value, and the value is 0x04. On the other hand, for the second to fourth input / output devices, no switch is connected to the second base board. In this case, the station numbers assigned to the second to fourth input / output devices are set in ascending order, for example, and are 0x01, 0x02, and 0x03, respectively.

上記の方法によれば、入出力装置のモジュールに割り当てられる局番は、スイッチ5の値に基づいて設定される。これにより、システムを起動する際にモジュールの局番をチェックすることで、実際にこれから起動しようとしているスレーブ3が設定通りの構成であるか否かについて確認することができる。以下、局番をチェックする方法について、具体的に説明する。   According to the above method, the station number assigned to the module of the input / output device is set based on the value of the switch 5. Thus, by checking the module station number when starting up the system, it is possible to confirm whether or not the slave 3 that is actually going to start up has the configuration as set. The method for checking the station number will be specifically described below.

図5は、局番をチェックする処理を示したフローチャートである。上述の通り、図5に示す一連の処理は、プログラマブルコントローラシステム1の起動のタイミングでスレーブ3のマイコンにおいて実行される。   FIG. 5 is a flowchart showing a process for checking the station number. As described above, the series of processing shown in FIG. 5 is executed in the microcomputer of the slave 3 at the start timing of the programmable controller system 1.

まず、ステップS11で、実際に搭載されている装置数を示す情報である「実際の機器数」として「0(搭載機器なし)」を設定して初期化し、次に、ステップS12で、各入出力装置のモジュールから局番を読み出す。   First, in step S11, "0 (no installed device)" is set and initialized as "actual device number" that is information indicating the number of devices actually mounted. Next, in step S12, each input is entered. Read the station number from the module of the output device.

続いて、ステップS13で、読み出し処理の完了した機器数を示す情報Nを初期化し、N=1とする。そして、ステップS14で、最初に読み出した入出力装置の局番を、スイッチにより設定されている入出力装置数を表す「構成の機器数」情報として設定し、ステップS15に進む。   Subsequently, in step S13, information N indicating the number of devices for which the reading process has been completed is initialized, and N = 1 is set. In step S14, the station number of the input / output device read first is set as “number of devices in configuration” information indicating the number of input / output devices set by the switch, and the process proceeds to step S15.

ステップS15で、上記N番目の入出力装置のモジュールに設定されている局番を読み出し、その局番がゼロでないか判定する。ゼロでない場合は、更にステップS16に進み、上記「実際の機器数」情報に1を加算する。ステップS17で、Nに1を加算し、ステップS15に戻る。ステップS15においてN番目に読み出した局番がゼロと判定されるまで、ステップS15からステップS17の処理を繰り返す。
In step S15, the station number set in the module of the Nth input / output device is read, and it is determined whether the station number is not zero. If it is not zero, the process further proceeds to step S16, and 1 is added to the “actual device number” information. In step S17, 1 is added to N, and the process returns to step S15. The processing from step S15 to step S17 is repeated until it is determined that the Nth read station number is zero in step S15.

ステップS15において読み出した局番がゼロと判定されると、ステップS18に進み、上記「構成の機器数」情報の値と「実際の機器数」情報の値とが一致するか否かを更に判定する。値が相互に一致する場合は、ステップS19に進み、スレーブ3の入出力装置の状態について「正常」との判断をマスタ2に送信し、処理を終了する。一方、値が相互に一致しない場合は、ステップS20に進み、スレーブ3の入出力装置の状態について「異常」との判断をマスタ2に送信し、処理を終了する。   If the station number read in step S15 is determined to be zero, the process proceeds to step S18, and it is further determined whether or not the value of the “number of configured devices” information matches the value of the “number of actual devices” information. . If the values match each other, the process proceeds to step S19, and a determination that the state of the input / output device of the slave 3 is “normal” is transmitted to the master 2, and the process ends. On the other hand, if the values do not match each other, the process proceeds to step S20, a determination that the state of the input / output device of the slave 3 is “abnormal” is transmitted to the master 2, and the process is terminated.

なお、図5のフローチャートに示すように、入出力装置数は、最初にモジュールから読み出した局番の値に基づいて判断しているため、第1の入出力装置については「構成の機器数」と一致するように局番を設定する必要がある。しかし、他の入出力装置については、ステップS15で値がゼロであるか否かを判定して全モジュールについて局番読み出し処理が完了したか否かを判断する目的にのみ用いている。このため、最初に局番読み出しがなされる入出力装置以外の入出力装置の局番については、先述の局番以外の値を割り当てることとしてもよい。すなわち、2番目以降に読み出される入出力装置については0x00以外を割り当てておくことにより、上記の局番チェック処理により入出力装置数が適正であるか否かを確認することは可能である。   As shown in the flowchart of FIG. 5, the number of input / output devices is determined based on the station number value read from the module first. The station number must be set to match. However, the other input / output devices are used only for the purpose of determining whether or not the value is zero in step S15 and determining whether or not the station number reading process has been completed for all modules. For this reason, a value other than the above-described station number may be assigned to the station number of the input / output device other than the input / output device from which the station number is read first. That is, it is possible to confirm whether the number of input / output devices is appropriate or not by assigning a value other than 0x00 to the input / output devices read after the second, by the above station number check process.

図6は、スレーブ3のマイコンに内蔵されるメモリに保持されるデータの構造を示す図である。図6を参照して、図5に示す局番チェック処理を実行する際に、スレーブ3のマイコンにより参照されるデータについて説明する。   FIG. 6 is a diagram showing a structure of data held in a memory built in the microcomputer of the slave 3. With reference to FIG. 6, the data referred to by the microcomputer of the slave 3 when executing the station number check process shown in FIG. 5 will be described.

図6(a)は、局番チェック処理において使用されるデータを示す。構成の機器数情報については、上記ステップS14において最初に読み出した局番が格納される。実際の機器数情報については、上記ステップS15からステップS17のループ処理を抜けるまで、ステップS16において1を加算されるごとに更新されていく。   FIG. 6A shows data used in the station number check process. For the device number information of the configuration, the station number read first in step S14 is stored. The actual number-of-devices information is updated each time 1 is added in step S16 until the loop processing from step S15 to step S17 is exited.

図6(b)は、局番チェック処理において参照される情報についてのデータ構造を示す図である。図6(b)に示すように、ヘッダに続いて、全データサイズ情報およびモジュールごとの情報が格納されている。モジュールの情報には、データサイズ情報、局番情報、およびスロット番号情報を含んで構成される。   FIG. 6B is a diagram illustrating a data structure of information referred to in the station number check process. As shown in FIG. 6B, following the header, all data size information and information for each module are stored. The module information includes data size information, station number information, and slot number information.

データサイズ情報は、例えばモジュールの情報ごとのデータサイズを示すバイト数でからなる。局番情報は、そのモジュールに局番配布回路7から割り当てられた局番についての情報が格納されている。スロット番号情報は、ベースボードのスロット番号を示す情報が格納される。   The data size information is composed of, for example, the number of bytes indicating the data size for each module information. In the station number information, information on the station number assigned to the module from the station number distribution circuit 7 is stored. The slot number information stores information indicating the slot number of the base board.

局番配布回路7から各モジュールに対して配布された局番情報は、スレーブ3のメモリにおいて保持される図6(b)に示すデータのうち、モジュールごとにそれぞれ対応する局番情報に格納される。プログラマブルコントローラシステム1を起動するタイミングで、図6(b)に示す構造のデータから各モジュールについての局番情報が読み出され、上記の局番チェック処理が実行される。   The station number information distributed to each module from the station number distribution circuit 7 is stored in the corresponding station number information for each module in the data shown in FIG. 6B held in the memory of the slave 3. At the timing of starting the programmable controller system 1, the station number information for each module is read from the data having the structure shown in FIG. 6B, and the above-described station number check process is executed.

以上説明したように、本実施形態に係るスレーブ3によれば、搭載されるべき入出力装置数を設定するためのスイッチ5は、簡易にベースボード4あるいはスレーブ3に取り付けられる。また、スイッチ5はロータリスイッチやピアノスイッチ等から構成されているので、ユーザは設定した数値を容易に視認できる。そして、スレーブ3側においては、スイッチ5により設定した値に基づいて最初に読み出す入出力装置のモジュールの局番を設定するので、システム起動時に局番を順次読み出す際に、実際に装着されている入出力装置数をチェックすることができる。このように、スレーブ3において入出力装置の装着状態をチェックすることで、マスタ(プログラマブルコントローラ)がスレーブの入出力装置の装着状態を確認しない仕様のプログラマブルコントローラシステムにおいても、入出力装置の故障や脱落等が生じている場合は、そのスレーブ3については異常と判断し、そのスレーブ3と通信を行わないようにする等の処置を取ることが可能となる。   As described above, according to the slave 3 according to the present embodiment, the switch 5 for setting the number of input / output devices to be mounted is simply attached to the base board 4 or the slave 3. Further, since the switch 5 is composed of a rotary switch, a piano switch or the like, the user can easily visually recognize the set numerical value. On the slave 3 side, since the station number of the module of the input / output device to be read first is set based on the value set by the switch 5, the input / output actually mounted when the station number is sequentially read at system startup. The number of devices can be checked. In this way, by checking the mounting state of the input / output device in the slave 3, even in a programmable controller system in which the master (programmable controller) does not check the mounting state of the slave input / output device, When dropout or the like has occurred, it is possible to determine that the slave 3 is abnormal and take measures such as not communicating with the slave 3.

上記の実施形態においては、第1のベースボード4Aあるいはスレーブ3にスイッチを設けることにより、搭載すべき入出力装置の数に異常がないかについてのチェックをスレーブ全体として行っているが、搭載されている入出力装置の数のチェック方法は、これに限らない。例えば、ベースボードごとにスイッチを設け、ベースボード単位で異常の有無をチェックすることとしてもよい。   In the above embodiment, the first base board 4A or the slave 3 is provided with a switch to check whether there is an abnormality in the number of input / output devices to be mounted as a whole slave. The method for checking the number of input / output devices is not limited to this. For example, a switch may be provided for each base board and the presence / absence of an abnormality may be checked for each base board.

更には、複数のスイッチを用いて、スイッチに入出力装置数に加え、ベースボードに備えるスロット数の情報を持たせることもできる。以下、かかる構成を備えたスレーブについて説明する。   Further, by using a plurality of switches, it is possible to provide the switch with information on the number of slots provided in the base board in addition to the number of input / output devices. Hereinafter, a slave having such a configuration will be described.

図7は、第2の実施形態に係るプログラマブルコントローラシステムの原理図である。マスタ2とスレーブ3とから構成され、互いにネットワーク10を介して接続されている点については上記第1の実施形態と同様であり、ここではその説明については割愛する。ここでは、図1に示すスレーブと異なる点を中心に説明する。   FIG. 7 is a principle diagram of a programmable controller system according to the second embodiment. The configuration of the master 2 and the slave 3 and the mutual connection via the network 10 are the same as in the first embodiment, and the description thereof is omitted here. Here, it demonstrates centering on a different point from the slave shown in FIG.

図7に示すスレーブ3は、各ベースボードにスイッチを2つずつ備えている。1枚のベースボード4に設けられた2つのスイッチのうち、一方は搭載すべき入出力装置数を設定するためのスイッチ5であり、他方はそのベースボードに設けられたスロット数を示すスイッチ6である。   The slave 3 shown in FIG. 7 includes two switches on each base board. Of the two switches provided on one base board 4, one is a switch 5 for setting the number of input / output devices to be mounted, and the other is a switch 6 indicating the number of slots provided on the base board. It is.

各スイッチ5、6に設定した値に基づいて、図7においては不図示の局番配布回路7が各入出力装置のモジュールに局番を配布する。ここでは、1枚のベースボードに2つのスイッチ5、6が配置されているので、局番については2桁で表している。局番の各桁の値は、先に図2を参照して説明した方法と同様の方法で設定する。そして、以下に説明する例においては、入出力装置のモジュールに対して配布される局番は、2桁の数字のうち上位の桁はスイッチ5A、5Bにより設定される値に対応させ、下位の桁はスイッチ6A、6Bにより設定される値に対応させるものとする。   Based on the values set in the switches 5 and 6, a station number distribution circuit 7 (not shown in FIG. 7) distributes the station numbers to the modules of the input / output devices. Here, since two switches 5 and 6 are arranged on one base board, the station number is represented by two digits. The value of each digit of the station number is set by a method similar to the method described above with reference to FIG. In the example described below, the station number distributed to the module of the input / output device is such that the upper digit among the two digits corresponds to the value set by the switches 5A and 5B, and the lower digit. Corresponds to the values set by the switches 6A and 6B.

まず、スイッチの値の設定方法について説明する。第n(nは整数とする)のベースボードのスイッチに設定する値は、入出力装置数およびスロット数のいずれについても、第1から第nのベースボードについての合計を設定するものとする。   First, a method for setting a switch value will be described. The value set for the switch of the n-th base board (n is an integer) is set to the sum of the first to n-th base boards for both the number of input / output devices and the number of slots.

図7(a)の例では、第1のベースボード4Aについては搭載する入出力装置数が1であり、設けられているスロット数が1である。このため、第1のベースボード4Aのスイッチ5Aおよびスイッチ6Aには、いずれも1が設定される。第2のベースボード4Bについては、搭載する入出力装置数および設けられているスロット数がいずれも3である。第1のベースボードの入出力装置数およびスロット数と加算して、第2のベースボード4Bのスイッチ5Bおよびスイッチ6Bには、それぞれ(1+3)=4が設定される。   In the example of FIG. 7A, the number of input / output devices mounted on the first base board 4A is 1, and the number of slots provided is 1. For this reason, 1 is set to both the switch 5A and the switch 6A of the first base board 4A. Regarding the second base board 4B, the number of installed input / output devices and the number of slots provided are both three. In addition to the number of input / output devices and the number of slots of the first base board, (1 + 3) = 4 is set in the switches 5B and 6B of the second base board 4B.

上記の通り、局番は、スイッチ5により割り当てられる値とスイッチ6により割り当てられる値とを組み合わせて設定される。これにより、第1から第4の入出力装置のモジュールに配布される局番の値は、それぞれ0x11、0x44、0x45および0x46となる。   As described above, the station number is set by combining the value assigned by the switch 5 and the value assigned by the switch 6. Thus, the station number values distributed to the modules of the first to fourth input / output devices are 0x11, 0x44, 0x45, and 0x46, respectively.

図7(b)の例では、第1のベースボード4Aには1つのスロット43が設けられているけれども入出力装置は接続せず、第2のベースボード4Bには3つのスロット45、46、47が設けられているが、このうち2つのスロット45、46に入出力装置を接続する構成である。この場合は、第1のベースボードのスイッチ5Aおよびスイッチ6Aに設定すべき値は、それぞれ「0」および「1」であり、第2のベースボード4Bのスイッチ5Bおよびスイッチ6Bに設定すべき値は、それぞれ「(0+2=)2」および「(1+3=)3」である。図7(b)の構成では、第2および第3の入出力装置のモジュールに配布される局番の値は、図7(a)の場合と同様の方法で設定され、それぞれ0x42および0x43となる。   In the example of FIG. 7B, although the first base board 4A has one slot 43, no input / output device is connected, and the second base board 4B has three slots 45, 46, 47 is provided, and an input / output device is connected to two slots 45 and 46 among them. In this case, the values to be set to the switches 5A and 6A of the first base board are “0” and “1”, respectively, and the values to be set to the switches 5B and 6B of the second base board 4B. Are “(0 + 2 =) 2” and “(1 + 3 =) 3”, respectively. In the configuration of FIG. 7B, the station number values distributed to the modules of the second and third input / output devices are set in the same manner as in FIG. 7A, and are 0x42 and 0x43, respectively. .

図8は、本実施形態に係るスレーブ3において局番をチェックする処理を示したフローチャートである。図5の場合と同様に、図8に示す一連の処理は、プログラマブルコントローラシステム1を起動するタイミングで、スレーブ3のマイコンにおいて実行される。   FIG. 8 is a flowchart showing processing for checking the station number in the slave 3 according to the present embodiment. As in the case of FIG. 5, the series of processing shown in FIG. 8 is executed in the microcomputer of the slave 3 at the timing of starting the programmable controller system 1.

まず、ステップS31およびステップS32の処理は、上記のステップS11およびステップS12の処理と同様に、実際にスレーブ3に搭載されている入出力装置数を表す「実際の機器数」情報として「0(搭載機器なし)」を設定して初期化し、各モジュールから局番を読み出す。ステップS33で、ベースボードを識別するための値Mおよびあるベースボード上においてモジュールを識別するための値Pにそれぞれ1を設定し、ステップS34で、スレーブ3全体でモジュールを識別するための値Nに1を設定してから第1の入出力装置のモジュールの局番を読み出し、ステップS35に進む。   First, similarly to the processing of step S11 and step S12, the processing of step S31 and step S32 is “0 (actual device number) information indicating the number of input / output devices actually mounted on the slave 3”. "No device installed)" is set and initialized, and the station number is read from each module. In step S33, 1 is set to each of the value M for identifying the baseboard and the value P for identifying the module on a certain baseboard. In step S34, the value N for identifying the module in the entire slave 3 is set. Is set to 1, the station number of the module of the first input / output device is read, and the process proceeds to step S35.

ステップS35で、先に読み出した局番と「0xF0」とで論理積をとり、第M番目のベースボードに設けられたスロット数を示す「Mベースのスロット数」情報として演算結果を保存する。続いて、ステップS36では、先に読み出した局番と「0x0F」とで論理積を取り、第M番目のベースボードに搭載されるべき入出力装置数を示す「Mベースの装着数」情報として演算結果を保存し、ステップS37に進む。   In step S35, a logical product of the previously read station number and “0xF0” is calculated, and the calculation result is stored as “M base slot number” information indicating the number of slots provided in the Mth base board. Subsequently, in step S36, a logical product of the previously read station number and “0x0F” is calculated and calculated as “number of M bases mounted” information indicating the number of input / output devices to be mounted on the Mth base board. The result is saved and the process proceeds to step S37.

ステップS37で、N局目の局番を読み出し、その値がゼロでないか判定する。ゼロでない場合は、ステップS38に進み、Nに1を加算して、ステップS39で、「実際の機器数」情報に1を加算し、ステップS40に進む。そして、ステップS40で、Mベース上でモジュールを識別するための値Pについて、Pが1より大きい場合は、(ステップS37で読み出した最新の局番)から(P−1)局目の局番を減算した結果が1であるか否かを判定する。すなわち、P番目のモジュールは、(P−1)番目のモジュールと同一のベースボード上に搭載されているか否かを判定する。上記減算結果が1の場合は同一のベースボード上に搭載されているとしてステップS41に進み、減算結果が1以外である場合は、P番目のモジュールと(P−1)番目のモジュールとは互いに異なるベースボードに搭載されているとして、ステップS43に進む。なお、P=1の場合は上記の判定は行わず、ステップS41に進む。   In step S37, the Nth station number is read and it is determined whether the value is not zero. If it is not zero, the process proceeds to step S38, 1 is added to N, 1 is added to the “actual device number” information in step S39, and the process proceeds to step S40. In step S40, if the value P for identifying the module on the M base is greater than 1, the station number of (P-1) is subtracted from (the latest station number read in step S37). It is determined whether or not the result obtained is 1. That is, it is determined whether the Pth module is mounted on the same base board as the (P-1) th module. If the subtraction result is 1, the process proceeds to step S41 assuming that they are mounted on the same base board. If the subtraction result is other than 1, the Pth module and the (P-1) th module are mutually connected. Assuming that it is mounted on a different base board, the process proceeds to step S43. When P = 1, the above determination is not performed and the process proceeds to step S41.

ステップS41で、ステップS37で読み出した局番を、M番目のベースボード上でP番目のモジュールの局番であることを示す「M枚目のベースデータのP局面の局番」情報として保存する。そして、ステップS42で値Pに1を加算し、ステップS37に戻る。   In step S41, the station number read in step S37 is stored as “station number of the P aspect of the M-th base data” information indicating the station number of the P-th module on the M-th base board. In step S42, 1 is added to the value P, and the process returns to step S37.

一方、ステップS41でM番目のベースボード上に搭載されているモジュールは(P−1)番目のモジュールまでであると判定されると、ステップS43に進み、上記「Mベースの装着数」情報と、上記「実際の機器数」情報から1を減算した結果とを比較し、2つの値が相互に一致するか否かを判定する。2つの値が相互に一致する場合は、M番目のベースボードには設定通りの数のモジュールが搭載されているとして、ステップS44に進み、更に「Mベースのスロット数」が(「実際の機器数」−1)よりも小さいか否かを判定する。2値を比較した結果、「Mベースのスロット数」の方が小さい場合は、M番目のベースボードについて、スロット数のチェック結果はOKであるとして、ステップS45に進む。そして、ステップS45で、Mに1を加算し、Pについては初期化して1を設定し、ステップS35に戻る。   On the other hand, if it is determined in step S41 that the modules mounted on the Mth base board are up to the (P-1) th module, the process proceeds to step S43, and the “number of M bases installed” information and The result obtained by subtracting 1 from the “actual device count” information is compared to determine whether the two values match each other. If the two values coincide with each other, it is determined that the M-th base board has the same number of modules as set, and the process proceeds to step S44. It is determined whether or not it is smaller than "number" -1). As a result of comparing the two values, if the “number of M-based slots” is smaller, the check result of the number of slots is OK for the M-th base board, and the process proceeds to step S45. In step S45, 1 is added to M, P is initialized and set to 1, and the process returns to step S35.

ステップS43でM番目のベースボードに搭載されているモジュールの数が適正でないと判定された場合や、ステップS44でM番目のベースボードのスロット数が適正でないと判定された場合は、それぞれステップS46に進み、「M番目のベースボードに異常あり」と判断してマスタ2にその旨を通知し、処理を終了する。   If it is determined in step S43 that the number of modules mounted on the Mth base board is not appropriate, or if it is determined in step S44 that the number of slots in the Mth baseboard is not appropriate, step S46 is performed. Then, it is determined that “the Mth base board is abnormal”, the master 2 is notified of this, and the process is terminated.

同様に、上記の通りM、NおよびPの値を変えてステップS35以降の処理を繰り返し、ベースボードごとのチェックを行う。そして、上記ステップS37で、N局目の局番を読み出した結果その局番の値がゼロである場合は、ループを抜けてステップS47に進む。   Similarly, as described above, the values of M, N, and P are changed, and the processing after step S35 is repeated to check each base board. If the station number is zero as a result of reading the station number of the Nth station in step S37, the process exits the loop and proceeds to step S47.

ステップS47で、上記「Mベースの装着数」と「実際の機器数」とを比較し、相互に値が一致する場合は、ステップS48に進み、M番目のベースボードの状態は正常であると判断してマスタ2にその旨を通知し、処理を終了する。ステップS47で2値が相互に一致しない場合は、ステップS49に進み、M番目のベースボードの状態は異常と判断してマスタ2にその旨を通知し、処理を終了する。   In step S47, the “number of M bases mounted” and the “number of actual devices” are compared. If the values match each other, the process proceeds to step S48, and the state of the Mth base board is normal. Judgment is made and the fact is notified to the master 2, and the process is terminated. If the two values do not coincide with each other in step S47, the process proceeds to step S49, the state of the Mth base board is determined to be abnormal, the master 2 is notified of this, and the process is terminated.

図9は、スレーブ3のメモリに保持されるデータの構造を示す図である。図9を参照して、局番チェック処理を実行する際にスレーブ3のマイコンにより参照されるデータについて説明する。なお、入出力装置のモジュールに割り当てられた局番については、局番チェック処理が開始されるよりも先に予め図6(b)に示す構成を備えたデータがメモリに格納されており、図8の局番チェック処理を実行する際に適宜読み出されるものとする。   FIG. 9 is a diagram illustrating the structure of data held in the memory of the slave 3. With reference to FIG. 9, data referred to by the microcomputer of the slave 3 when executing the station number check process will be described. As for the station numbers assigned to the modules of the input / output device, data having the configuration shown in FIG. 6B is stored in the memory in advance before the station number check process is started. It is assumed that it is appropriately read when the station number check process is executed.

図9(a)は、スレーブ3から読み出すことのできた入出力装置数を表す「実際の機器数」情報である。第1の実施形態とは異なり、搭載されるべき入出力装置数を表す「構成の機器数」情報については領域の確保が不要である。   FIG. 9A shows “actual device number” information indicating the number of input / output devices that can be read from the slave 3. Unlike the first embodiment, it is not necessary to secure an area for the “number of configured devices” information indicating the number of input / output devices to be mounted.

図9(b)は、各ベースボードの局番をチェックするために確保される領域を示す図である。各ベースボードについてのベースボードデータは、スロット数情報、装着数情報および各モジュールの局番情報から構成される。図8のフローチャート中でも述べたように、M枚目のベースボードについてのスロット数情報が「Mベースのスロット数」、実際に装着されているモジュール数すなわち入出力装置数を「Mベースの装着数」であり、そして、M枚目のベースボードの中でP番目の局番を「P局目の局番」である。   FIG. 9B is a diagram showing an area reserved for checking the station number of each base board. Baseboard data for each baseboard is composed of slot number information, mounting number information, and station number information of each module. As described in the flowchart of FIG. 8, the number-of-slots information for the M-th base board is “number of M-base slots”, and the number of modules actually installed, that is, the number of input / output devices And the P-th station number in the M-th base board is the “P-th station number”.

以上説明したように、本実施形態に係るスレーブ3によれば、ベースボードごとにスイッチを2つずつ設けてそれぞれにスロット数および搭載される入出力装置数を表すこととすることにより、チェック処理において異常が検出された場合には、いずれのベースボードに異常が発生しているかについての情報をも得ることができる。これにより、第1の実施形態に係るスレーブ3が有する効果に加えて、プログラマブルコントローラシステム1の管理がより容易にされるという更なる効果を有する。   As described above, according to the slave 3 according to the present embodiment, two switches are provided for each base board, and the number of slots and the number of input / output devices to be mounted are respectively represented. If an abnormality is detected in step 1, information on which base board has an abnormality can be obtained. Thereby, in addition to the effect which the slave 3 which concerns on 1st Embodiment has, it has the further effect that management of the programmable controller system 1 is made easier.

第1の実施形態に係るプログラマブルコントローラシステムの原理図である。1 is a principle diagram of a programmable controller system according to a first embodiment. 局番の配布方法の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the distribution method of a station number. 局番をモジュールに配布する処理を示したフローチャートである。It is the flowchart which showed the process which distributes a station number to a module. 出力されるパルスを模式的に示した図である。It is the figure which showed the output pulse typically. 第1の実施形態における局番をチェックする処理を示したフローチャートである。It is the flowchart which showed the process which checks the station number in 1st Embodiment. 第1の実施形態においてメモリに保持されるデータの構造を示す図であるIt is a figure which shows the structure of the data hold | maintained at memory in 1st Embodiment 第2の実施形態に係るプログラマブルコントローラシステムの原理図である。It is a principle figure of the programmable controller system which concerns on 2nd Embodiment. 第2の実施形態における局番をチェックする処理を示したフローチャートである。It is the flowchart which showed the process which checks the station number in 2nd Embodiment. 第2の実施形態においてメモリに保持されるデータの構造を示す図である。It is a figure which shows the structure of the data hold | maintained at memory in 2nd Embodiment. 従来のプログラマブルコントローラシステムの問題点を説明するための図である。It is a figure for demonstrating the problem of the conventional programmable controller system.

符号の説明Explanation of symbols

1 プログラマブルコントローラシステム
2 マスタ(プログラマブルコントローラ、PLC)
3 スレーブ
5、6 スイッチ
41、44 電源
43、45、46、47 スロット
1 Programmable controller system 2 Master (programmable controller, PLC)
3 Slave 5, 6 Switch 41, 44 Power supply 43, 45, 46, 47 Slot

Claims (3)

プログラマブルコントローラとネットワークを介して通信し、接続されるべき入出力装置に局番を割り当てる機能を有するスレーブ装置であって、
前記接続されるべき入出力装置の数を設定する設定手段と、
前記設定手段により設定された入出力装置数に基づいて、前記接続されるべき入出力装置に局番を割り当てて配布する配布手段と、
前記プログラマブルコントローラを起動するときに、前記局番を読み出すことにより前記スレーブ装置に接続されている入出力装置の数を計測するカウンタ手段と、
前記設定手段により設定された入出力装置数と、前記カウンタ手段により計測された入出力装置数とが一致するか否かを判定する判定手段と
を備え、
前記配布手段は、前記カウンタ手段によって最初に読み出される入出力装置に対して、前記設定手段により設定された値と等しい値を局番として割り当て、
前記判定手段により入出力装置数が相互に一致すると判定された場合は、前記プログラマブルコントローラとの通信を開始させる
ことを特徴とするスレーブ装置。
A slave device having a function of communicating with a programmable controller via a network and assigning a station number to an input / output device to be connected,
Setting means for setting the number of input / output devices to be connected;
Based on the number of input / output devices set by the setting means, distribution means for assigning and distributing station numbers to the input / output devices to be connected;
Counter means for measuring the number of input / output devices connected to the slave device by reading the station number when starting the programmable controller;
Determination means for determining whether or not the number of input / output devices set by the setting means and the number of input / output devices measured by the counter means match,
The distribution means assigns a value equal to the value set by the setting means to the input / output device that is first read by the counter means as a station number,
A slave device, wherein communication with the programmable controller is started when the determination means determines that the number of input / output devices match each other.
前記判定手段により入出力装置数が相互に一致しないと判定された場合は、前記スレーブ装置において異常が発生している旨を前記プログラマブルコントローラに通知する通知手段
を更に備えたことを特徴とする請求項1記載のスレーブ装置。
When the determination means determines that the number of input / output devices does not match each other, it further comprises notification means for notifying the programmable controller that an abnormality has occurred in the slave device. Item 2. The slave device according to Item 1.
前記設定手段は、
前記入出力装置を装着可能なスロットの数を設定するための第1の設定手段と、
前記スロットに接続されるべき入出力装置の数を設定するための第2の設定手段と
を前記スロットを有するベースボードごとに備え、
前記判定手段は、
前記ベースボードごとに前記第2の設定手段により設定された値と、前記カウンタ手段により計測された入出力装置数より求まる各ベースボードに接続されている入出力装置数とが一致するか否かを判定し、
各ベースボードに接続されている入出力装置数が前記第1の設定手段により設定されている値を超えるか否かをそれぞれ判定し、
前記第2の設定手段により設定されている値と前記ベースボードに接続されている入出力装置数とが一致しない場合は、該ベースボードにエラーが発生していることを検出し、および前記ベースボードに接続されている入力装置数が前記第1の設定手段により設定されている値を超える場合も、該ベースボードにエラーが発生していることを検出する
ことを特徴とする請求項2記載のスレーブ装置。
The setting means includes
First setting means for setting the number of slots in which the input / output device can be mounted;
A second setting means for setting the number of input / output devices to be connected to the slot for each base board having the slot;
The determination means includes
Whether the value set by the second setting means for each base board matches the number of input / output devices connected to each base board determined from the number of input / output devices measured by the counter means And
Determining whether the number of input / output devices connected to each base board exceeds the value set by the first setting means, respectively;
If the value set by the second setting means and the number of input / output devices connected to the base board do not match, it is detected that an error has occurred in the base board, and the base The detection of an error in the base board is also made when the number of input devices connected to the board exceeds a value set by the first setting means. Slave device.
JP2006265879A 2006-09-28 2006-09-28 Slave device Active JP4910604B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006265879A JP4910604B2 (en) 2006-09-28 2006-09-28 Slave device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006265879A JP4910604B2 (en) 2006-09-28 2006-09-28 Slave device

Publications (2)

Publication Number Publication Date
JP2008084204A JP2008084204A (en) 2008-04-10
JP4910604B2 true JP4910604B2 (en) 2012-04-04

Family

ID=39354983

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006265879A Active JP4910604B2 (en) 2006-09-28 2006-09-28 Slave device

Country Status (1)

Country Link
JP (1) JP4910604B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9577882B2 (en) 2014-04-24 2017-02-21 Mitsubishi Electric Corporation Control system, master station, and remote station

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5843932B1 (en) * 2014-09-12 2016-01-13 三菱電機株式会社 Programmable controller

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001265411A (en) * 2000-03-22 2001-09-28 Fuji Electric Co Ltd Operation system using substitute module
JP2004094966A (en) * 2003-10-17 2004-03-25 Mitsubishi Electric Corp Computer and computer system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9577882B2 (en) 2014-04-24 2017-02-21 Mitsubishi Electric Corporation Control system, master station, and remote station

Also Published As

Publication number Publication date
JP2008084204A (en) 2008-04-10

Similar Documents

Publication Publication Date Title
JP6796598B2 (en) How to replace the control unit in the transport device
CN106020136B (en) Method and system for defining slot bit address
US8769158B2 (en) High availability device level ring backplane
CN107450486A (en) Method and apparatus for field apparatus to be communicably coupled to remote-terminal unit
US20170366397A1 (en) Method for automated configuration of an ied
US8604926B2 (en) Automatic verification of network cable connections
CN109071164A (en) The transport equipment for persons of field device including central control unit and multiple fault recognition methods with optimization
JP4910604B2 (en) Slave device
CN105094002B (en) The method and apparatus for tracking the change in industrial control unit (ICU)
JP4758276B2 (en) Power supply system and system power supply
EP4002809A1 (en) Fault tolerant backplane slot assignment
US10467073B2 (en) Electronic system comprising electronic devices, circuit breaker comprising such a system, method for generating a deviation indicator in the event of incompatibility between devices and associated computer program product
JP5638045B2 (en) Numerical control system with detachable filter circuit
JP4061153B2 (en) Loop type transmission line fault monitoring system
CN103580974A (en) Storage of a desired address in a device of a control system
US11669391B2 (en) Data processing procedure for safety instrumentation and control (IandC) systems, IandC system platform, and design procedure for IandC system computing facilities
IT201600127390A1 (en) FIRE-FIGHTING CENTRAL
JP4025078B2 (en) Incorrect connection monitoring system
JP4574516B2 (en) ATM device and device identification code setting method
JP3272195B2 (en) Redundant system switching monitoring control device
RU2574837C2 (en) Logic control system (versions)
CN106789441A (en) A kind of condition detection method and device of high-end fault-tolerant server administrative unit
JP2020048305A (en) Derivation device, derivation method, and derivation program
JP2020046746A (en) Field device information displaying system and field device
JPH06332753A (en) Classification change detection system for mounted package

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20081117

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20081118

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20081118

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081215

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090817

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20100310

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20100310

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20100310

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20100310

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110301

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110412

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20110422

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111004

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111130

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120102

R150 Certificate of patent or registration of utility model

Ref document number: 4910604

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150127

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250