JP7629197B2 - Relay device, method and program - Google Patents
Relay device, method and program Download PDFInfo
- Publication number
- JP7629197B2 JP7629197B2 JP2021177873A JP2021177873A JP7629197B2 JP 7629197 B2 JP7629197 B2 JP 7629197B2 JP 2021177873 A JP2021177873 A JP 2021177873A JP 2021177873 A JP2021177873 A JP 2021177873A JP 7629197 B2 JP7629197 B2 JP 7629197B2
- Authority
- JP
- Japan
- Prior art keywords
- industrial machine
- data
- communication
- address range
- machine
- 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
Links
- 238000000034 method Methods 0.000 title claims description 9
- 238000004891 communication Methods 0.000 claims description 97
- 230000004044 response Effects 0.000 claims description 48
- 238000010586 diagram Methods 0.000 description 10
- 239000000284 extract Substances 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000003754 machining Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Description
本発明は、中継装置、および、機械から情報を取得する方法、ならびにプログラムに関連する。 The present invention relates to a relay device, a method for acquiring information from a machine, and a program.
Modbus(登録商標)TCPプロトコルは、Modicon社が同社のPLC(Programmable Logic Controller)向けに策定したシリアル通信プロトコルを、TCP/IP上で用いるための通信プロトコルである。 The Modbus (registered trademark) TCP protocol is a communications protocol that uses a serial communications protocol developed by Modicon for its PLCs (Programmable Logic Controllers) on TCP/IP.
工場等で稼働するCNC,旋盤、レーザー加工機といった産業機械から情報を収集し、当該収集情報をModbus TCPプロトコルを用いてユーザが所望するタイミングにおいて配信する中継装置が知られている。具体的には、特許文献1では、クライアント装置は、中継装置に要求情報を送信し、中継装置は当該要求情報に対する応答として、中継装置の記憶部に格納されている取得データを、クライアント装置に送信する。これにより、クライアント装置は、中継装置からの取得データを記憶部に保持する。 There is known a relay device that collects information from industrial machines such as CNCs, lathes, and laser processing machines operating in factories and distributes the collected information at a time desired by the user using the Modbus TCP protocol. Specifically, in Patent Document 1, a client device transmits request information to the relay device, and the relay device transmits acquired data stored in the memory unit of the relay device to the client device in response to the request information. As a result, the client device holds the acquired data from the relay device in the memory unit.
しかしながら、ユーザは、クライアントデバイスを操作し中継装置を通じて産業機械より稼働状況等の情報を収集する場合に、例えば産業機械と中継装置の通信ができない状態であっても、その旨を知ることができない。 However, when a user operates a client device to collect information such as the operating status of industrial machinery through a relay device, even if the industrial machinery is unable to communicate with the relay device, the user is unable to know this.
また、ユーザは、クライアントデバイスを操作して中継装置を通じて取得を試みる産業機械の情報を特定するための、メモリ上の位置情報であるアドレスが、中継装置側で管理するアドレスの範囲で特定される産業機械の情報と異なって指定がなされたとしてもその旨を知ることができない。 In addition, even if the address, which is the location information in memory used to identify the industrial machine information that is being attempted to be obtained through the relay device by operating the client device, is specified as different from the industrial machine information identified within the address range managed by the relay device, the user cannot know this.
さらに上記Modbusプロトコルでは、中継装置を通じて産業機械の情報を取得する際にクライアントデバイスが送信する要求情報には、ユーザが所望する産業機械を直接指定するパラメータが存在しないため、ユーザが所望する情報とは異なる情報を取得し得る問題もある。 Furthermore, in the above-mentioned Modbus protocol, the request information sent by the client device when obtaining information on industrial machines through a relay device does not include a parameter that directly specifies the industrial machine desired by the user, which creates the problem that the information obtained may differ from the information desired by the user.
本発明は、上記問題を鑑みてなされたものであり、Modbusプロトコルを用いる中継装置を用いて産業機械より情報を取得する際に、産業機械との通信可否の情報をユーザに通知すること、およびユーザが無効なアドレスの範囲を指定して産業機械より情報取得を試みたことを通知することを目的とする。 The present invention was made in consideration of the above problems, and aims to notify a user of whether communication with an industrial machine is possible when acquiring information from the industrial machine using a relay device that uses the Modbus protocol, and to notify the user that an attempt has been made to acquire information from the industrial machine by specifying an invalid address range.
上記目的を達成するために、本発明の一態様に係る中継装置は、Modbus(登録商標)プロトコルに従って、産業機械と、クライアントデバイスとの通信を中継する中継装置であって、前記産業機械に関するデータを取得する取得部と、前記取得部が取得した取得データおよび産業機械の系統番号と当該取得データが格納されているアドレスの範囲とを対応付けた産業機械系統対応テーブルを記憶する記憶部と、前記クライアントデバイスから機械データ取得要求を受信する通信部と、判定部であって、前記産業機械との通信が可能か否か、および、前記機械データ取得要求に含まれるアドレスの範囲が、前記産業機械系統対応テーブルに定義されるアドレスの範囲内か否かを判定する判定部と、生成部であって、前記判定部の判定結果の通知に従って、(a)前記産業機械との通信が不可能であるとの判定結果である場合に、例外コードを含む応答データを生成し、(b)前記産業機械との通信が可能であるとの判定結果である場合に、(ア)前記機械データ取得要求に含まれるアドレスの範囲が前記産業機械系統対応テーブルに定義されるアドレスの範囲内であるとの判定結果である場合に、当該アドレスが特定する前記取得データを含む応答データを生成し、(イ)前記機械データ取得要求に含まれるアドレスの範囲が前記産業機械系統対応テーブルに定義されるアドレスの範囲外であるとの判定結果である場合に、前記例外コードを含む応答データを生成する生成部と、を備え、前記通信部は、さらに前記生成部が生成した応答データを前記クライアントデバイスに向けて送信する。
In order to achieve the above object, a relay device according to one aspect of the present invention is a relay device that relays communication between an industrial machine and a client device in accordance with a Modbus (registered trademark) protocol, and includes an acquisition unit that acquires data related to the industrial machine, a memory unit that stores an industrial machine system correspondence table in which the acquired data acquired by the acquisition unit and the system number of the industrial machine correspond to the address range in which the acquired data is stored, a communication unit that receives a machine data acquisition request from the client device, a determination unit that determines whether communication with the industrial machine is possible and whether the address range included in the machine data acquisition request is within the address range defined in the industrial machine system correspondence table , and a generation unit that notifies the determination result of the determination unit. and a generation unit that (a) generates response data including an exception code when it is determined that communication with the industrial machine is not possible, and (b) when it is determined that communication with the industrial machine is possible, (a) generates response data including the acquisition data identified by the address when it is determined that the address range included in the machine data acquisition request is within the address range defined in the industrial machine system correspondence table, and (b) generates response data including the exception code when it is determined that the address range included in the machine data acquisition request is outside the address range defined in the industrial machine system correspondence table, and the communication unit further transmits the response data generated by the generation unit to the client device.
これによれば、ユーザは、クライアントデバイスに所望する産業機械系統の機械データの取得に関して誤ったアドレスの範囲を設定したことにより、中継装置よりデータの取得に失敗した旨を、例外コードを含む応答データの受信をすることにより知ることができる。また、ユーザは、中継装置が産業機械との通信を確立できない場合にも、データの取得に失敗した旨を例外コードを含む応答データの受信をすることにより知ることができる。なお、ここに言う「アドレスの範囲」とは、[発明を実施するための形態]における、図3などを用いて例示されるデータ開始アドレスおよびアドレス範囲の組み合わせを含む上位概念である。 According to this, the user can know that data acquisition from the relay device has failed due to setting an incorrect address range in the client device for acquiring the desired machine data of the industrial machinery system, by receiving response data including an exception code. Also, if the relay device cannot establish communication with the industrial machinery, the user can know that data acquisition has failed by receiving response data including an exception code. Note that the "address range" referred to here is a higher-level concept that includes the combination of the data start address and address range exemplified using Figure 3 etc. in the [Mode for implementing the invention].
また、前記中継装置は、複数の産業機械と接続されると共に、当該複数の産業機械の各々に対応する複数の通信ポートを備え、前記記憶部は、さらに前記複数の産業機械の各々に紐付く通信ポート番号を記憶し、前記機械データ取得要求は、さらに前記通信ポート番号を含み、前記判定部は、さらに前記機械データ取得要求に含まれた前記通信ポート番号に紐付く産業機械が前記中継装置に接続されているか否かを判定し、(i)前記通信ポート番号に紐付く産業機械が前記中継装置に接続されていないと判定した場合に、前記生成部に前記産業機械との通信が不可能である旨の判定結果を通知し、(ii)前記通信ポート番号に紐付く産業機械が前記中継装置に接続されていると判定した場合に、前記生成部に前記産業機械との通信が可能である旨の判定結果を通知してもよい。 The relay device may be connected to a plurality of industrial machines and may have a plurality of communication ports corresponding to each of the plurality of industrial machines, the storage unit may further store a communication port number associated with each of the plurality of industrial machines, the machine data acquisition request may further include the communication port number, the determination unit may further determine whether or not the industrial machine associated with the communication port number included in the machine data acquisition request is connected to the relay device, (i) when it is determined that the industrial machine associated with the communication port number is not connected to the relay device, the determination unit may notify the generation unit of the determination result that communication with the industrial machine is not possible, and (ii) when it is determined that the industrial machine associated with the communication port number is connected to the relay device, the determination unit may notify the generation unit of the determination result that communication with the industrial machine is possible.
これによれば、1つの中継装置に複数の産業機械が接続されている構成において、中継装置は、ユーザがクライアントデバイスを介して、どの産業機械に備わる産業機械系統に係る取得データを所望するのかを特定することができ、適切な取得データを含む応答データをクライアントデバイスに向けて送信することができる。これにより、ユーザは、適切な取得データを知ることができる。 According to this, in a configuration in which multiple industrial machines are connected to one relay device, the relay device can identify, via a client device, which industrial machine's industrial machine system the user desires acquired data for, and can transmit response data including the appropriate acquired data to the client device. This allows the user to know the appropriate acquired data.
また、本発明の一態様に係るModbusプロトコルに従って、クライアントデバイスに産業機械からの情報を提供する方法は、前記産業機械に関するデータを取得する取得ステップと、前記取得ステップにより取得した取得データおよび産業機械の系統番号と前記取得データが格納されているアドレスの範囲とを対応付けた産業機械系統対応テーブルを記憶するステップと、前記クライアントデバイスから機械データ取得要求を受信する受信ステップと、前記産業機械との通信が可能か否か、および、前記クライアントデバイスが送信した前記機械データ取得要求に含まれるアドレスの範囲が、前記記憶部が記憶する前記産業機械系統対応テーブルに定義されるアドレスの範囲内か否かを判定する判定ステップと生成ステップであって、前記判定ステップの判定結果の通知に従って、(a)前記判定ステップにおいて、前記産業機械との通信が不可能との判定結果である場合に、例外コードを含む応答データを生成し、(b)前記判定ステップにおいて、前記産業機械との通信が可能との判定結果であって、(ア)前記機械データ取得要求に含まれるアドレスの範囲が前記産業機械系統対応テーブルに定義されるアドレスの範囲内との判定結果である場合に、当該アドレスが特定する前記取得データを含む応答データを生成し、(イ)前記機械データ取得要求に含まれるアドレスの範囲が前記産業機械系統対応テーブルに定義されるアドレスの範囲外との判定結果である場合に、前記例外コードを含む応答データを生成する生成ステップと、前記生成ステップで生成した応答データを前記クライアントデバイスに送信する送信ステップと、を含む。
Further, a method for providing a client device with information from an industrial machine according to a Modbus protocol according to one aspect of the present invention includes an acquisition step of acquiring data related to the industrial machine, a step of storing an industrial machine system correspondence table in which the acquired data acquired by the acquisition step , the system number of the industrial machine, and an address range in which the acquired data is stored are associated with each other, a receiving step of receiving a machine data acquisition request from the client device, a determination step of determining whether communication with the industrial machine is possible and whether the address range included in the machine data acquisition request transmitted by the client device is within the address range defined in the industrial machine system correspondence table stored in the storage unit, and a generating step, in accordance with a notification of the determination result of the determination step: (a) when the determination step determines that communication with the industrial machine is not possible, generating response data including an exception code; (b) when the determination step determines that communication with the industrial machine is possible, and (a) when the determination result is that the address range included in the machine data acquisition request is within the address range defined in the industrial machine system correspondence table, generating response data including the acquisition data identified by the address ; and (b) when the determination result is that the address range included in the machine data acquisition request is outside the address range defined in the industrial machine system correspondence table, generating response data including the exception code; and a transmitting step of transmitting the response data generated in the generating step to the client device.
これによれば、ユーザは、クライアントデバイスに所望する産業機械系統の機械データの取得に関して誤ったアドレス範囲を設定したことにより、中継装置よりデータの取得に失敗した旨を、例外コードを含む応答データの受信をすることにより知ることができる。また、ユーザは、中継装置が産業機械との通信を確立できない場合にも、データの取得に失敗した旨を例外コードを含む応答データの受信をすることにより知ることができる。 With this, the user can learn that data acquisition from the relay device has failed due to an incorrect address range being set in the client device for acquiring machine data of the desired industrial machinery system, by receiving response data including an exception code. Also, if the relay device cannot establish communication with the industrial machinery, the user can learn that data acquisition has failed by receiving response data including an exception code.
また、本発明の別の一態様は、前記記載の方法をコンピュータに実行させるプログラムである。 Another aspect of the present invention is a program for causing a computer to execute the above-described method.
本発明によれば、ユーザはModbusプロトコルを用いる中継装置を通じて、産業機械の情報を適切に取得することができ、中継装置の利便性が向上する。 According to the present invention, a user can properly obtain information about industrial machinery through a relay device that uses the Modbus protocol, improving the convenience of the relay device.
以下、実施の形態について、図面を参照しながら具体的に説明する。
以下で説明する実施の形態は、いずれも本発明の好ましい一具体例を示すものである。以下の実施の形態で示される数値、形状、材料、構成要素、構成要素の配置位置および接続形態、ステップ、ステップの順序等は、一例であり、本発明を限定する主旨ではない。また、以下の実施の形態における構成要素のうち、本発明の最上位概念を示す独立請求項に記載されていない構成要素については、より好ましい形態を構成する任意の構成要素として説明される。なお、同一の構成要素には同一の符号を付し、説明を省略する場合がある。
Hereinafter, the embodiment will be specifically described with reference to the drawings.
The embodiments described below each show a preferred specific example of the present invention. The numerical values, shapes, materials, components, the arrangement and connection of the components, steps, and the order of steps shown in the following embodiments are merely examples and are not intended to limit the present invention. Furthermore, among the components in the following embodiments, those components that are not described in the independent claims showing the highest concept of the present invention are described as any components that constitute a more preferred embodiment. Note that the same components are given the same reference numerals and descriptions may be omitted.
(実施の形態)
本実施の形態において、産業用通信プロトコルを用いる産業機械の情報を特定するためのメモリ上の位置情報であるアドレス範囲を指定して、産業機械のデータの取得を行う通信システムについて説明する。
(Embodiment)
In this embodiment, a communication system will be described which acquires data of an industrial machine by specifying an address range, which is location information in a memory for identifying information of the industrial machine that uses an industrial communication protocol.
図1は、本発明の実施の形態に係る通信システム100の概要を示す模式図である。
図1に示すように、通信システム100は、産業機械101、中継装置102、ネットワーク103、およびクライアントデバイス104を備えている。通信システム100は、例えば工場内に構築された通信システムである。
FIG. 1 is a schematic diagram showing an overview of a communication system 100 according to an embodiment of the present invention.
1, the communication system 100 includes an industrial machine 101, a relay device 102, a network 103, and a client device 104. The communication system 100 is, for example, a communication system established in a factory.
なお、本実施の形態では、通信システム100は1つの産業機械101を備えているが、これに限定されず、複数の産業機械101を備えていてもよい。また、本実施の形態では、1つのクライアントデバイス104を備えているが、これに限定されず、複数のクライアントデバイスを備えていてもよい。 In this embodiment, the communication system 100 includes one industrial machine 101, but is not limited to this and may include multiple industrial machines 101. In this embodiment, the communication system 100 includes one client device 104, but is not limited to this and may include multiple client devices.
産業機械101は、具体的には、CNC(数値制御装置)や、切削機械などで構成される。産業機械101は、通信リンク106を介して中継装置102と接続される。通信リンク106は、例えばRS-232C、IEEE802.3規格等に適合する有線通信、または、IEEE802.11n、ac規格等に適合する無線通信により実現され、産業機械101と中継装置102との間の通信経路である。なお、通信リンク106は、複数の産業機械101と中継装置102との間で通信される場合には有線、または、無線ネットワークで構成されていてもよい。 Specifically, the industrial machine 101 is composed of a CNC (numerical control device) or a cutting machine. The industrial machine 101 is connected to the relay device 102 via a communication link 106. The communication link 106 is realized by wired communication conforming to the RS-232C or IEEE802.3 standard, or wireless communication conforming to the IEEE802.11n or ac standard, and is a communication path between the industrial machine 101 and the relay device 102. Note that the communication link 106 may be composed of a wired or wireless network when communication is performed between multiple industrial machines 101 and the relay device 102.
中継装置102は、ネットワーク103を介してクライアントデバイス104と接続される。中継装置102は、通信リンク106を介して産業機械101に関するデータを取得する。また、中継装置102は、この取得した産業機械101に関するデータをネットワーク103を介してクライアントデバイス104に送信する。 The relay device 102 is connected to the client device 104 via the network 103. The relay device 102 acquires data related to the industrial machine 101 via the communication link 106. The relay device 102 also transmits the acquired data related to the industrial machine 101 to the client device 104 via the network 103.
ネットワーク103は、例えばTCP(Transport Control Protocol)を用いて通信が行われるネットワークである。ネットワーク103は、例えばIEEE802.3の規格等に適合する有線通信、または、IEEE802.11n、acの規格等に適合する無線通信により実現される。また、ネットワーク103は、産業機械101および中継装置102の接続のみに限定されず、当該規格に準拠したあらゆるデバイスが接続され、通信が行われ得る汎用的なネットワークである。 The network 103 is a network in which communication is performed using, for example, TCP (Transport Control Protocol). The network 103 is realized by wired communication conforming to, for example, the IEEE 802.3 standard, or wireless communication conforming to, for example, the IEEE 802.11n or ac standard. Furthermore, the network 103 is not limited to the connection only between the industrial machine 101 and the relay device 102, but is a general-purpose network to which any device conforming to the standard can be connected and communication can be performed.
クライアントデバイス104は、ネットワーク103を介して中継装置102に接続される。クライアントデバイス104は、ユーザ105の操作等によって、ネットワーク103を介し、中継装置102に対して産業機械101に関するデータの要求を送信する。また、中継装置102が収集した産業機械101に関するデータをネットワーク103を介して受信し、自装置の表示部(図示しない)に表示する端末装置である。具体的には、クライアントデバイス104は、パーソナルコンピュータ、タブレット型コンピュータ、およびスマートフォンなどである。 The client device 104 is connected to the relay device 102 via the network 103. The client device 104 transmits a request for data related to the industrial machine 101 to the relay device 102 via the network 103 in response to an operation by the user 105 or the like. The client device 104 is also a terminal device that receives data related to the industrial machine 101 collected by the relay device 102 via the network 103 and displays the data on a display unit (not shown) of the device itself. Specifically, the client device 104 is a personal computer, a tablet computer, a smartphone, or the like.
図2は本実施の形態に係る中継装置102の機能構成を表すブロック図である。中継装置102は、取得部201、判定部202、記憶部203、生成部204、および通信部205を備える。 FIG. 2 is a block diagram showing the functional configuration of the relay device 102 according to this embodiment. The relay device 102 includes an acquisition unit 201, a determination unit 202, a storage unit 203, a generation unit 204, and a communication unit 205.
取得部201は、産業機械101に関する情報を取得する。取得部201は、産業機械101より情報を収集し、記憶部203に記憶させる。産業機械101より収集され得る情報は、例えば、産業機械の型式番号、産業機械系統番号、産業機械101に係る基本的な情報、および、産業機械に内蔵されるセンサ等により取得され得るデータなどである。また、当該収集され得る情報には、CNCの運転状態、加工軸の回転速度、および、加工軸の回転負荷といった産業機械101の稼働に係る情報等も含まれるが、これらに限定されず、中継装置102と産業機械101間の通信状態の情報をも含む。 The acquisition unit 201 acquires information about the industrial machine 101. The acquisition unit 201 collects information from the industrial machine 101 and stores it in the memory unit 203. Information that can be collected from the industrial machine 101 includes, for example, the model number of the industrial machine, the industrial machine system number, basic information about the industrial machine 101, and data that can be acquired by sensors built into the industrial machine. The collected information also includes, but is not limited to, information about the operation of the industrial machine 101, such as the operating state of the CNC, the rotation speed of the machining shaft, and the rotation load of the machining shaft, and also includes information about the communication state between the relay device 102 and the industrial machine 101.
判定部202は、通信部205がクライアントデバイス104より取得した、アドレスの範囲の情報を含む要求情報(以後、機械データ取得要求とも呼ぶ)を基に、記憶部203に記憶されている取得部201が産業機械101から取得した情報(以後、取得データとも呼ぶ)のアドレスの範囲内であるか否かを判定する。また、判定部202は、中継装置102に接続される産業機器101と通信が可能か否かも判定する。判定部202は、判定の結果を生成部204に通知する。なお、機械データ取得要求には、アドレスの範囲以外に、中継装置102を特定するためのデバイスアドレス、中継装置102の動作を制御するファンクションコード(例えば04(Read input registers)など)、の情報も含まれる。アドレスの範囲は、例えば後述する図3におけるデータ開始アドレス302およびアドレス範囲303の組み合わせであるが、これに限らず、例えばデータ開始アドレスとデータ末尾アドレスの組み合わせでもよい。 Based on the request information (hereinafter also referred to as a machine data acquisition request) including address range information acquired by the communication unit 205 from the client device 104, the determination unit 202 determines whether the information (hereinafter also referred to as acquired data) acquired by the acquisition unit 201 stored in the storage unit 203 from the industrial machine 101 is within the address range. The determination unit 202 also determines whether communication with the industrial machine 101 connected to the relay device 102 is possible. The determination unit 202 notifies the generation unit 204 of the determination result. In addition to the address range, the machine data acquisition request also includes information on a device address for identifying the relay device 102 and a function code (e.g., 04 (Read input registers)) for controlling the operation of the relay device 102. The address range is, for example, a combination of the data start address 302 and the address range 303 in FIG. 3 described later, but is not limited thereto, and may be, for example, a combination of the data start address and the data end address.
記憶部203は、取得部201が産業機械101より取得したデータ、産業機械101が所属する系統番号、および、産業機械101が所属する系統に紐づけたアドレスの範囲を記憶する。また、記憶部203は、クライアントデバイス104の要求に対し、当該要求が無効の際に応答する例外コードを記憶している。なお、例外コードは、ユーザ105(管理者)が設定ツール(図示しない)などにより設定し記憶部203に記憶させてもよいし、工場出荷時に予め記憶されていてもよい。例外コードの具体的な一例は、「02(Illegal Data Address)」などである。記憶部203は、eMMC(Embedded MultiMediaCard)(登録商標)や、SSD(Solid State Drive)等の不揮発性メモリにより実現される。また、本実施の形態では、記憶部203は不揮発性メモリとして説明するが、一部機能はRAM(揮発性メモリ)によって構成されてもよい。 The storage unit 203 stores the data acquired by the acquisition unit 201 from the industrial machine 101, the system number to which the industrial machine 101 belongs, and the address range linked to the system to which the industrial machine 101 belongs. The storage unit 203 also stores an exception code that responds to a request from the client device 104 when the request is invalid. The exception code may be set by the user 105 (administrator) using a setting tool (not shown) or the like and stored in the storage unit 203, or may be stored in advance at the time of shipment from the factory. A specific example of the exception code is "02 (Illegal Data Address)". The storage unit 203 is realized by a non-volatile memory such as an eMMC (Embedded MultiMediaCard) (registered trademark) or an SSD (Solid State Drive). In addition, in this embodiment, the storage unit 203 is described as a non-volatile memory, but some of its functions may be configured using RAM (volatile memory).
生成部204は、判定部202の判定を基に、取得部201が産業機械101より取得したデータ、または、例外コードのいずれかを含む応答データを生成する。生成部204は、判定部202より産業機械101より取得したデータに関するアドレスの範囲の妥当性の判定結果の通知を受け、応答データを生成する。具体的には、データ開始アドレスが妥当である場合は、当該アドレスにより特定される取得データを含む応答データを生成し、データ開始アドレスが妥当ではない場合は、例外コードを含む応答データを生成する。また、生成部204は、判定部202より産業機械との通信が不可能であるとの判定結果の通知を受けた場合、例外コードを含む応答データを生成する。 The generation unit 204 generates response data including either the data acquired by the acquisition unit 201 from the industrial machine 101 or an exception code based on the judgment of the judgment unit 202. The generation unit 204 receives notification of the judgment result of the validity of the address range related to the data acquired from the industrial machine 101 from the judgment unit 202, and generates response data. Specifically, if the data start address is valid, the generation unit 204 generates response data including the acquired data specified by the address, and if the data start address is invalid, the generation unit 204 generates response data including an exception code. Furthermore, if the generation unit 204 receives notification of the judgment result from the judgment unit 202 that communication with the industrial machine is impossible, the generation unit 204 generates response data including an exception code.
通信部205は、クライアントデバイス104が送信する機械データ取得要求を受信する。また、クライアントデバイス104の要求に対して生成部204が生成した、産業機械101より取得したデータ、または、例外コードのいずれかを含む応答データをクライアントデバイス104に向けて送信する。 The communication unit 205 receives a machine data acquisition request sent by the client device 104. In addition, the communication unit 205 transmits to the client device 104 response data that includes either the data acquired from the industrial machine 101 or an exception code, which is generated by the generation unit 204 in response to the request from the client device 104.
図3は、中継装置102の記憶部203が予め記憶する各産業機械の系統番号(例えば、CNCごとの番号)と産業機械の情報が格納されているアドレスの範囲とを対応付けた、産業機械系統対応テーブル300の一例である。産業機械系統対応テーブル300は、産業機械系統301、データ開始アドレス302、および、アドレス範囲303を含むデータにより構成される。より具体的には、図3に示す先頭行においては、産業機械系統301は「産業機械系統1」を示し、データ開始アドレス302が開始位置「100」からアドレス範囲303の範囲「100」まで(すなわち、アドレスが100の位置から199の位置まで)に産業機械より取得可能なデータが格納されることになる。本実施の形態では、産業機械系統1および産業機械系統2を記憶しているが、これに限定するものではない。なお、産業機械系統301とは、1つの産業機械101に含まれ得る複数のCNCを個別に識別するための情報である。 3 is an example of an industrial machine system correspondence table 300 in which the system number (e.g., the number for each CNC) of each industrial machine stored in advance in the memory unit 203 of the relay device 102 corresponds to the address range in which the information of the industrial machine is stored. The industrial machine system correspondence table 300 is composed of data including an industrial machine system 301, a data start address 302, and an address range 303. More specifically, in the first row shown in FIG. 3, the industrial machine system 301 indicates "industrial machine system 1", and data that can be obtained from the industrial machine is stored from the start position "100" of the data start address 302 to the range "100" of the address range 303 (i.e., from the address position 100 to the address position 199). In this embodiment, the industrial machine system 1 and the industrial machine system 2 are stored, but this is not limited to this. Note that the industrial machine system 301 is information for individually identifying multiple CNCs that may be included in one industrial machine 101.
図4は、中継装置102が予め記憶する、産業機械より取得可能な各々のデータ(取得データ)に対し各々のアドレス(アドレス開始位置)と当該アドレス範囲とを対応付けた、取得データ対応テーブル400の一例である。なお、図4では、産業機械系統1の各データに関するアドレスとその範囲が格納された場合を示した例である。取得データ対応テーブル400は、取得データ401、データ開始アドレス402、アドレス範囲403を含むデータにより構成される。データ開始アドレス402は取得データ401に示される、各々の取得データ情報の開始位置を示している。アドレス範囲403は、データ開始アドレス402に対応するデータが格納される範囲を指定する、例えばバイト数等の情報が格納されるが、これに限定するものではない。より具体的には、図4に示す先頭行においては、取得データ401は「非常停止の状態」を示すデータであり、データ開始アドレス402が開始位置「100」からアドレス範囲403の範囲「8」まで(すなわち、アドレスが100から107の位置まで)産業機械より取得したデータ(非常停止の状態を示すデータ)が格納されることになる。 Figure 4 shows an example of an acquired data correspondence table 400, which is stored in advance by the relay device 102 and which associates each address (address start position) and the address range for each piece of data (acquired data) that can be acquired from an industrial machine. Note that Figure 4 shows an example in which the address and its range for each piece of data in the industrial machinery system 1 are stored. The acquired data correspondence table 400 is composed of data including acquired data 401, a data start address 402, and an address range 403. The data start address 402 indicates the start position of each piece of acquired data information shown in the acquired data 401. The address range 403 stores information such as the number of bytes that specifies the range in which the data corresponding to the data start address 402 is stored, but is not limited to this. More specifically, in the first row shown in FIG. 4, acquired data 401 is data indicating an "emergency stop state," and data start address 402 stores data acquired from the industrial machine (data indicating an emergency stop state) from start position "100" to address range 403 range "8" (i.e., addresses from 100 to 107).
図5は、図4の取得データ対応テーブルの別の一例である。取得データ対応テーブル500は、産業機械系統2の各データに関するアドレスとその範囲が格納された場合を示している。このように、取得データ対応テーブル400は、複数の産業機械系統ごとに、産業機械より取得された各々のデータ(取得データ)に対する各々のデータ開始アドレスとデータのアドレス範囲とを対応付けて格納され得る。 Figure 5 is another example of the acquired data correspondence table of Figure 4. The acquired data correspondence table 500 shows a case where the addresses and ranges for each data of the industrial machinery system 2 are stored. In this way, the acquired data correspondence table 400 can store, for each of multiple industrial machinery systems, the data start address and the address range of each data (acquired data) acquired from the industrial machinery in correspondence with each other.
[産業機械と中継装置とが1つの産業機械系統のもとで制御されている形態]
以下、まず産業機械101は1つの産業機械系統のみ(産業機械系統1)備えており、中継装置102は産業機械系統1に係るデータを産業機械101から取得して図4のとおりに記憶部203に記憶する形態における動きを説明する。
[Mode in which the industrial machinery and the relay device are controlled under one industrial machinery system]
Below, we will first explain the operation in a case where the industrial machine 101 has only one industrial machine system (industrial machine system 1), and the relay device 102 acquires data related to the industrial machine system 1 from the industrial machine 101 and stores it in the memory unit 203 as shown in Figure 4.
図6は、当該形態に係る中継装置102の動作を示すフローチャートである。
ステップS601は、クライアントデバイス104が産業機械101より所望する取得データの取得を試みる際に、クライアントデバイス104が中継装置102に対して送信する機械データ取得要求を受信するステップである。
FIG. 6 is a flowchart showing the operation of the relay device 102 according to this embodiment.
Step S601 is a step of receiving a machine data acquisition request transmitted by the client device 104 to the relay device 102 when the client device 104 attempts to acquire desired acquisition data from the industrial machine 101.
ステップS602は、中継装置102が産業機械101と通信リンク106を介して通信が可能か否かを判断するステップである。 Step S602 is a step in which the relay device 102 determines whether communication with the industrial machine 101 is possible via the communication link 106.
ステップS603は、ステップS601で受信した機械データ取得要求に含まれるアドレスの範囲の情報を抽出するステップである。 Step S603 is a step for extracting information about the address range contained in the machine data acquisition request received in step S601.
ステップS604は、ステップS603で抽出されたデータ開始アドレスの情報と記憶部203が記憶する産業機械系統対応テーブル300とを比較し、抽出されたアドレスの範囲が産業機械系統対応テーブル300に定義されているデータ開始アドレス302およびアドレス範囲303により規定されるアドレスの範囲内か否かを判断するステップである。判定部202は、クライアントデバイス104からの機械データ取得要求に対して、有効なアドレス範囲(データ開始アドレス302およびアドレス範囲303)が指定されたか否かを判定する。判定部202は、有効なアドレス範囲が指定されたと判定した場合には、生成部204にその旨を通知する(ステップS604のYes)。具体的には、例えば、中継装置102は、取得部201により、産業機械101から当該産業機械に備わる産業機械系統1に係る情報が取得された場合に、自機が産業機械系統1に所属する産業機械に接続されていると認識する。図3の産業機械系統対応テーブル300に示すテーブルの例によれば、「産業機械系統1」に対してデータ開始アドレス「100」およびアドレス範囲「100」が組み合わせとして定義されており、中継装置102はこの情報を予め記憶部203に記憶しているので、前述のステップS603で抽出されたデータ開始アドレスの値が当該組合せの範囲に収まる値(例えば132など)であれば、有効なアドレスの範囲であると判定する。一方、判定部202は、有効なアドレス範囲が指定されていないと判定した場合には、生成部204にその旨を通知する(ステップS604のNo)。 Step S604 is a step of comparing the information of the data start address extracted in step S603 with the industrial machine system correspondence table 300 stored in the storage unit 203, and judging whether the range of the extracted address is within the address range defined by the data start address 302 and the address range 303 defined in the industrial machine system correspondence table 300. The judgment unit 202 judges whether a valid address range (data start address 302 and address range 303) is specified in response to the machine data acquisition request from the client device 104. If the judgment unit 202 judges that a valid address range is specified, it notifies the generation unit 204 of that fact (Yes in step S604). Specifically, for example, when the acquisition unit 201 acquires information related to the industrial machine system 1 equipped with the industrial machine from the industrial machine 101, the relay device 102 recognizes that the own machine is connected to the industrial machine belonging to the industrial machine system 1. According to the example of the table shown in the industrial machinery system correspondence table 300 in FIG. 3, the data start address "100" and the address range "100" are defined as a combination for "industrial machinery system 1", and the relay device 102 stores this information in advance in the storage unit 203. Therefore, if the value of the data start address extracted in the above-mentioned step S603 is a value that falls within the range of the combination (e.g., 132), it is determined that it is within a valid address range. On the other hand, if the determination unit 202 determines that a valid address range has not been specified, it notifies the generation unit 204 of that effect (No in step S604).
ステップS605は、生成部204が判定部202の通知(ステップS604のYes)を基に、ステップS603で抽出されたデータ開始アドレスおよびアドレスの範囲を基に対応する取得データを含む応答データを生成するステップである。 Step S605 is a step in which the generation unit 204 generates response data including the corresponding acquisition data based on the data start address and address range extracted in step S603, based on the notification from the determination unit 202 (Yes in step S604).
ステップS606は、生成部204が判定部202の通知(ステップS604のNo)を基に、例外コードを含む応答データを生成するステップである。 Step S606 is a step in which the generation unit 204 generates response data including an exception code based on the notification from the determination unit 202 (No in step S604).
ステップS607は、通信部205が、ステップS605またはステップS606において生成部204が生成した、取得データまたは例外コードのいずれかを含む応答データをクライアントデバイス104に向けて送信するステップである。 Step S607 is a step in which the communication unit 205 transmits response data including either the acquired data or the exception code generated by the generation unit 204 in step S605 or step S606 to the client device 104.
[クライアントデバイスが有効なアドレス範囲を指定した場合の中継装置の動作]
次に、中継装置102がクライアントデバイス104より有効なアドレスの範囲を指定する機械データ取得要求を受信した場合の動作について、図6、および本実施の形態における通信システム100の動作の一例を示すシーケンス図である図7を用いて説明する。
[Relay device behavior when a client device specifies a valid address range]
Next, the operation when the relay device 102 receives a machine data acquisition request specifying a valid address range from the client device 104 will be described with reference to FIG. 6 and FIG. 7, which is a sequence diagram showing an example of the operation of the communication system 100 in this embodiment.
なお、本実施の形態に示す例は、産業機械101および中継装置102がそれぞれ1対1の関係で通信リンク106により接続される構成である。本構成において中継装置102は、予め産業機械系統対応テーブル300を記憶することにより、産業機械101に備え得る複数の産業機械系統および当該産業機械系統に対応する取得データのアドレスの範囲(データ開始アドレス302およびアドレス範囲303)を把握することができる。また、産業機械系統は、中継装置101に1対1で認識され、取得部201によりその機械のデータ開始アドレスおよびアドレス範囲は予め記憶部203に記憶されているため、クライアントデバイス104は、機械データ取得要求に産業機械系統番号を含める必要がなく、少なくともデータ開始アドレス402の情報およびアドレス範囲403の情報が機械データ取得要求に含まれていれば、クライアントデバイス104が所望する取得データを中継装置102は前述の情報を用いて特定することが可能な構成である。
In the example shown in the present embodiment, the industrial machine 101 and the relay device 102 are connected in a one-to-one relationship by the communication link 106. In this configuration, the relay device 102 can grasp a plurality of industrial machine systems that may be provided in the industrial machine 101 and the address range of the acquired data corresponding to the industrial machine system (data start address 302 and address range 303) by storing the industrial machine system correspondence table 300 in advance. In addition, since the industrial machine system is recognized one-to-one by the relay device 101 and the data start address and address range of the machine are stored in advance in the storage unit 203 by the acquisition unit 201, the client device 104 does not need to include the industrial machine system number in the machine data acquisition request. As long as at least the information on the data start address 402 and the information on the address range 403 are included in the machine data acquisition request, the relay device 102 can specify the acquired data desired by the client device 104 using the above-mentioned information.
まず、図7に示すように、クライアントデバイス104は、産業機械101に備わる産業機械系統1のデータを取得する場合に、アドレスの範囲が100~199を指定する機械データ取得要求を中継装置102に対して送信する(ステップS701)。例えば、図4の取得データ対応テーブル400を例に説明すると、クライアントデバイス104が「非常停止の状態」を示す取得データを取得するために、データ開始アドレス「100」、および所望するデータのアドレス範囲「8」を機械データ取得要求に指定している状況である。 First, as shown in FIG. 7, when the client device 104 acquires data of the industrial machinery system 1 equipped in the industrial machinery 101, the client device 104 transmits a machine data acquisition request specifying an address range of 100 to 199 to the relay device 102 (step S701). For example, taking the acquired data correspondence table 400 in FIG. 4 as an example, the client device 104 specifies the data start address "100" and the address range of the desired data "8" in the machine data acquisition request to acquire acquired data indicating an "emergency stop state."
次に、中継装置102は当該機械データ取得要求を受信(ステップS601)し、機械データ取得要求に含まれるデータ開始アドレスおよびアドレス範囲の情報を抽出する(ステップS603)。 Next, the relay device 102 receives the machine data acquisition request (step S601) and extracts the data start address and address range information contained in the machine data acquisition request (step S603).
続いて、中継装置102は、取得部201が産業機械101より取得し、記憶部203に予め記憶した産業機械101に備わる産業機械系統番号1と、これに対するアドレスの範囲(データ開始アドレス302およびアドレス範囲303)に基づいて、ステップS603で抽出された機械データ取得要求に含まれるアドレスが、予め記憶した産業機械系統番号と対応するアドレスの範囲内であると判定する(図6のステップS604のYes、すなわち図7のステップS7604)。 Then, based on the industrial machine lineage number 1 of the industrial machine 101 acquired by the acquisition unit 201 from the industrial machine 101 and pre-stored in the memory unit 203, and the corresponding address range (data start address 302 and address range 303), the relay device 102 determines that the address included in the machine data acquisition request extracted in step S603 is within the address range corresponding to the pre-stored industrial machine lineage number (Yes in step S604 in Figure 6, i.e. step S7604 in Figure 7).
次に、中継装置102は、クライアントデバイス104により指定されたアドレスに該当する取得データを取得後、応答データを生成し(ステップS605)、その応答データをクライアントデバイス104に対して送信する(ステップS607)。例えば、図4に示すデータを例に説明すると、クライアントデバイス104がアドレスの範囲として100から108までの範囲を指定した場合は、「非常停止の状態」が当該アドレスの範囲に該当するデータである。最後に、クライアントデバイス104は応答データを受信する(図示しない)。 Next, the relay device 102 acquires the acquisition data corresponding to the address specified by the client device 104, generates response data (step S605), and transmits the response data to the client device 104 (step S607). For example, taking the data shown in FIG. 4 as an example, if the client device 104 has specified the address range from 100 to 108, the data corresponding to that address range is "emergency stop status." Finally, the client device 104 receives the response data (not shown).
[クライアントデバイスが無効なアドレスの範囲を指定した場合の中継装置の動作]
次に、中継装置102がクライアントデバイス104より無効なアドレスの範囲を指定する機械データ取得要求を受信した場合の動作について、図6および図8を用いて説明する。
[Relay device behavior when a client device specifies an invalid address range]
Next, the operation of the relay device 102 when the relay device 102 receives a machine data acquisition request specifying an invalid address range from the client device 104 will be described with reference to FIGS.
まず、図8に示すように、クライアントデバイス104は中継装置102が接続されている産業機械101が備える産業機械系統が産業機械系統1の場合に、例えば、クライアントデバイス104がアドレスの範囲を200~299に指定する機械データ取得要求を中継装置102に対して送信したとする(ステップS801)。例えば、図4のテーブルを例に説明すると、クライアントデバイス104が「非常停止の状態」を示す取得データを取得するために、アドレス「200」、および所望するデータの範囲「8」を機械データ取得要求に指定している状況である。 First, as shown in Fig. 8, when the industrial machine system of the industrial machine 101 to which the relay device 102 is connected is the industrial machine system 1, for example, the client device 104 transmits a machine data acquisition request specifying an address range of 200 to 299 to the relay device 102 (step S801). For example, taking the table in Fig. 4 as an example, the client device 104 specifies the address "200" and the desired data range "8" in the machine data acquisition request to acquire acquisition data indicating an "emergency stop state".
次に、中継装置102は当該機械データ取得要求を受信(ステップS601)し、機械データ取得要求に含まれるデータ開始アドレスおよびアドレス範囲の情報を抽出する(ステップS603)。 Next, the relay device 102 receives the machine data acquisition request (step S601) and extracts the data start address and address range information contained in the machine data acquisition request (step S603).
続いて、中継装置102は、予め記憶した産業機械系統番号と対応するアドレスの範囲の情報および取得部201が取得した産業機械101が備える産業機械系統番号から、ステップS603で取得されたアドレスの範囲(データ開始アドレスおよびアドレス範囲に相当)の情報が、予め記憶された産業機械系統1のアドレスの範囲外であると判定する。(図6のステップS604のNo、すなわち図8のステップS8604)。 Then, the relay device 102 determines, from the address range information corresponding to the pre-stored industrial machine system number and the industrial machine system number of the industrial machine 101 acquired by the acquisition unit 201, that the address range information acquired in step S603 (corresponding to the data start address and address range) is outside the pre-stored address range of the industrial machine system 1. (No in step S604 in FIG. 6, i.e. step S8604 in FIG. 8).
最後に、中継装置102は例外コード含む応答データを生成(ステップS606)し、当該応答データをクライアントデバイス104に対して送信する(ステップS607)。 Finally, the relay device 102 generates response data including the exception code (step S606) and transmits the response data to the client device 104 (step S607).
これによれば、ユーザ105は、クライアントデバイス104に所望する産業機械系統の産業機械101の取得情報に対して誤ったアドレス範囲を設定したことにより、中継装置102よりデータの取得に失敗した旨を、例外コードを含む応答データを受信することで知ることができる。 As a result, the user 105 can learn by receiving response data including an exception code from the relay device 102 that data acquisition has failed due to an incorrect address range being set in the client device 104 for the acquisition information of the industrial machine 101 in the desired industrial machinery system.
[産業機械との通信ができない場合の中継装置の動作]
次に、中継装置102が産業機械101と通信ができない場合の動作について図6、および図9を用いて説明する。
[Operation of relay device when communication with industrial machinery is not possible]
Next, the operation when the relay device 102 cannot communicate with the industrial machine 101 will be described with reference to FIGS. 6 and 9. FIG.
まず、図9に示すように、クライアントデバイス104は、中継装置102が接続されている産業機械101が備える産業系統番号が産業機械系統1の場合に、例えば、アドレスの範囲100~199を指定する機械データ取得要求を中継装置102に対して送信する(ステップS901)。例えば、図4のテーブルを例に説明すると、クライアントデバイス104が「非常停止の状態」を示す取得データを取得するために、データ開始アドレス「100」、および所望するデータのアドレス範囲「8」を機械データ取得要求に指定している状況である。 First, as shown in FIG. 9, when the industrial system number of the industrial machine 101 to which the relay device 102 is connected is industrial machine system 1, the client device 104 transmits a machine data acquisition request specifying, for example, an address range of 100 to 199 to the relay device 102 (step S901). For example, using the table in FIG. 4 as an example, the client device 104 specifies the data start address "100" and the address range of the desired data "8" in the machine data acquisition request to acquire acquisition data indicating an "emergency stop state."
次に、中継装置102は機械データ取得要求を受信する(ステップS601)。 Next, the relay device 102 receives a machine data acquisition request (step S601).
続いて、例えば、産業機械101の電源が切れている場合や、通信リンク106の経路が利用できない場合等により、中継装置102は産業機械101と通信が不可能であると判定する(図6のステップS602のNo、すなわち図9のステップS9602)。なお、産業機械101との通信可否の判定方法としては、例えば、PINGプロトコルによる応答の確認や、独自に定めるプロトコルにより行われても良い。 Next, for example, if the power supply of the industrial machine 101 is turned off or the path of the communication link 106 is unavailable, the relay device 102 determines that communication with the industrial machine 101 is not possible (No in step S602 in FIG. 6, i.e., step S9602 in FIG. 9). Note that the method of determining whether communication with the industrial machine 101 is possible may be, for example, by checking a response using a PING protocol or by using a uniquely defined protocol.
最後に、中継装置102は例外コードを含む応答データを生成し(ステップS606)、クライアントデバイス104に対して当該応答データを送信する(ステップS607)。 Finally, the relay device 102 generates response data including the exception code (step S606) and transmits the response data to the client device 104 (step S607).
これによれば、ユーザ105は、中継装置102が産業機械101との通信を確立できない場合に、データの取得に失敗した旨を、例外コードを含む応答データを受信することで知ることができる。 Accordingly, if the relay device 102 cannot establish communication with the industrial machine 101, the user 105 can know that data acquisition has failed by receiving response data that includes an exception code.
[実施の形態の変形例]
以上、本発明の実施の形態について説明したが、これに限定されるものではない。
なお、以下の説明では、前述の実施の形態において説明した、構成要素および符号を用いることで、本変形例の各構成要素の説明を省略する。
本変形例は、通信システム100において複数の産業機械101の複数の系統について中継装置102によりデータ取得が行われる点で、前述の実施の形態と異なる。具体的には複数の産業機械101が通信リンク106を介して中継装置102に接続されている、または、一つの産業機械が複数の産業機械系統を備える場合などが考えられる。この場合、中継装置102は、自機に接続される複数の産業機械101に対してそれぞれ任意のポート番号を割り当てて通信を行う。さらに、中継装置102は、例えばポート番号ごとに紐づく産業機械系統対応テーブル300および取得データ対応テーブル400を備える。
[Modification of the embodiment]
Although the embodiment of the present invention has been described above, the present invention is not limited to this.
In the following description, the components and symbols described in the above embodiment will be used, and a description of each component of this modified example will be omitted.
This modification differs from the above embodiment in that data is acquired by the relay device 102 for multiple systems of multiple industrial machines 101 in the communication system 100. Specifically, multiple industrial machines 101 may be connected to the relay device 102 via communication links 106, or one industrial machine may have multiple industrial machine systems. In this case, the relay device 102 assigns an arbitrary port number to each of the multiple industrial machines 101 connected to the relay device 102 and communicates with them. Furthermore, the relay device 102 includes an industrial machine system correspondence table 300 and an acquired data correspondence table 400 that are linked to each port number, for example.
クライアントデバイス104は、所望する産業機械101が接続されるポート番号を指定して、所望するアドレスの範囲(データ開始アドレスおよびアドレス範囲)の情報を機械データ取得要求に含めて中継装置102に送信することで、所望する産業機械101に係る情報を取得する。 The client device 104 acquires information related to the desired industrial machine 101 by specifying the port number to which the desired industrial machine 101 is connected and including information on the desired address range (data start address and address range) in a machine data acquisition request and sending it to the relay device 102.
以下、中継装置102が複数の産業機械101より取得データを取得する場合について説明する。 The following describes the case where the relay device 102 acquires data from multiple industrial machines 101.
クライアントデバイス104は、中継装置102に向けて機械データ取得要求にデータ開始アドレスおよびアドレス範囲の情報を含めて送信する。 The client device 104 sends a machine data acquisition request to the relay device 102, including information on the data start address and address range.
中継装置102は、指定されたポート番号に紐付く産業機械系統対応テーブル300と当該機械データ取得要求に含まれるアドレスの範囲(データ開始アドレスおよびアドレス範囲)を比較する。 The relay device 102 compares the industrial machine system correspondence table 300 associated with the specified port number with the address range (data start address and address range) included in the machine data acquisition request.
具体的には、例えば、通信システム100の構成のうち、中継装置102に対して2つの産業機械101が接続される場合においては、中継装置102が通信リンク106を介してデータを取得する産業機械系統が複数存在することになる。クライアントデバイス104は、所望する取得データが存在する産業機械系統のいずれのデータかを特定するために当該産業機械101のポート番号を指定した機械データ取得要求に、データ開始アドレス、アドレス範囲の情報を含めて送信する。中継装置102は、当該機械データ取得要求を受信すると、自機にクライアントデバイス104が指定したポート番号で接続される産業機械101が存在するか否かを判定する。中継装置102に接続された産業機械101が存在する場合には、中継装置102は機械データ取得要求に含まれるデータ開始アドレスおよびアドレス範囲の情報を抽出する。 Specifically, for example, in the configuration of the communication system 100, when two industrial machines 101 are connected to the relay device 102, there will be multiple industrial machine systems from which the relay device 102 acquires data via the communication link 106. The client device 104 transmits a machine data acquisition request specifying the port number of the industrial machine 101 in order to identify which of the industrial machine systems contains the desired acquired data, including information on the data start address and address range. When the relay device 102 receives the machine data acquisition request, it determines whether or not there is an industrial machine 101 connected to it via the port number specified by the client device 104. If there is an industrial machine 101 connected to the relay device 102, the relay device 102 extracts the data start address and address range information included in the machine data acquisition request.
そして、中継装置102は予め記憶した産業機械101が備える産業機械系統番号と、これに対応するアドレスの範囲(データ開始アドレス302およびアドレス範囲303)の組み合わせに基づいて、抽出された機械データ取得要求に含まれるアドレスが、予め記憶した産業機械系統番号に対応するアドレスの範囲内であるか否かを判定する。予め記憶した産業機械系統番号に対応するアドレスの範囲内であると判定した場合は、機械データ取得要求に含まれるアドレスに対応する取得データを含む応答データをクライアントデバイス104に対して送信する。一方、中継装置102は予め記憶した産業機械系統番号に対応するアドレスの範囲外であると判定した場合は、クライアントデバイス104に対して例外コードを含む応答データをクライアントデバイス104に向けて送信する。 Then, the relay device 102 determines whether the address included in the extracted machine data acquisition request is within the address range corresponding to the pre-stored industrial machine lineage number based on the combination of the pre-stored industrial machine lineage number of the industrial machine 101 and the corresponding address range (data start address 302 and address range 303). If it is determined that the address is within the address range corresponding to the pre-stored industrial machine lineage number, it transmits response data including the acquisition data corresponding to the address included in the machine data acquisition request to the client device 104. On the other hand, if the relay device 102 determines that the address is outside the address range corresponding to the pre-stored industrial machine lineage number, it transmits response data including an exception code to the client device 104.
また、中継装置102は、機械データ取得要求に指定されたポート番号に対応する産業機械101が自機に接続していない(産業機械101を認識できないことを含む)場合に、中継装置102は例外コードを含む応答データをクライアントデバイス104に向けて送信する。 In addition, if the industrial machine 101 corresponding to the port number specified in the machine data acquisition request is not connected to the relay device 102 (including the case where the industrial machine 101 cannot be recognized), the relay device 102 transmits response data including an exception code to the client device 104.
本変形例によれば、1つの中継装置102に対して通信リンク106を介して複数の産業機械101が接続される構成において、中継装置102は、ユーザ105がクライアントデバイス104を介して所望する産業機械101に備わる産業機械系統に係る取得データを特定することができ、適切な取得データを含む応答データをクライアントデバイス104に向けて送信することができる。これにより、ユーザ105は、適切な取得データを知ることができる。 According to this modified example, in a configuration in which multiple industrial machines 101 are connected to one relay device 102 via communication links 106, the relay device 102 can identify acquired data related to the industrial machine system of the industrial machine 101 desired by the user 105 via the client device 104, and can transmit response data including the appropriate acquired data to the client device 104. This allows the user 105 to know the appropriate acquired data.
なお、上記実施の形態において、各構成要素は、専用のハードウェアで構成されるか、各構成要素に適したソフトウェアプログラムを実行することによって実現されてもよい。各構成要素は、CPUまたはプロセッサ等のプログラム実行部が、ハードディスクまたは半導体メモリ等の記録媒体に記録されたソフトウェアプログラムを読み出して実行することによって実現されてもよい。 In the above embodiment, each component may be configured with dedicated hardware, or may be realized by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or processor reading and executing a software program recorded on a recording medium such as a hard disk or semiconductor memory.
本発明は、例えばModbus通信プロトコルに従って、産業機械およびクライアントデバイスの各々と通信する中継装置等に適用することができる。 The present invention can be applied to relay devices that communicate with industrial machines and client devices, for example, according to the Modbus communication protocol.
100 通信システム
101 産業機械
102 中継装置
103 ネットワーク
104 クライアントデバイス
105 ユーザ
106 通信リンク
201 取得部
202 判定部
203 記憶部
204 生成部
205 通信部
300 産業機械系統対応テーブル
301 産業機械系統
302 データ開始アドレス
303 アドレス範囲
400 取得データ対応テーブル
401 取得データ
402 データ開始アドレス
403 アドレス範囲
500 取得データ対応テーブル
REFERENCE SIGNS LIST 100 Communication system 101 Industrial machine 102 Relay device 103 Network 104 Client device 105 User 106 Communication link 201 Acquisition unit 202 Determination unit 203 Storage unit 204 Generation unit 205 Communication unit 300 Industrial machine system correspondence table 301 Industrial machine system 302 Data start address 303 Address range 400 Acquired data correspondence table 401 Acquired data 402 Data start address 403 Address range 500 Acquired data correspondence table
Claims (3)
前記産業機械に関するデータを取得する取得部と、
前記取得部が取得した取得データと当該取得データが格納されているアドレスの範囲とを対応付けた取得データ対応テーブル、および、産業機械の系統番号と前記アドレスの範囲とを対応付けた産業機械系統対応テーブルを記憶する記憶部と、
前記クライアントデバイスから機械データ取得要求を受信する通信部と、
判定部であって、
前記産業機械との通信が可能か否か、および、前記機械データ取得要求に含まれるアドレスの範囲が、前記産業機械系統対応テーブルに定義されるアドレスの範囲内か否かを判定する判定部と、
生成部であって、
前記判定部の判定結果の通知に従って、
(a)前記産業機械との通信が不可能であるとの判定結果である場合に、例外コードを含む応答データを生成し、
(b)前記産業機械との通信が可能であるとの判定結果である場合に、
(ア)前記機械データ取得要求に含まれるアドレスの範囲が前記産業機械系統対応テーブルに定義されるアドレスの範囲内であるとの判定結果である場合に、当該アドレスが特定する前記取得データを含む応答データを生成し、
(イ)前記機械データ取得要求に含まれるアドレスの範囲が前記産業機械系統対応テーブルに定義されるアドレスの範囲外であるとの判定結果である場合に、前記例外コードを含む応答データを生成する生成部と、
複数の産業機械と接続されると共に、当該複数の産業機械の各々に対応する複数の通信ポートと、
を備え、
さらに、前記記憶部は、前記複数の産業機械の各々に紐付く通信ポート番号を記憶し、
前記機械データ取得要求は、さらに前記通信ポート番号を含み、
前記判定部は、さらに前記機械データ取得要求に含まれた前記通信ポート番号に紐付く産業機械が前記中継装置に接続されているか否かを判定し、
(i)前記通信ポート番号に紐付く産業機械が前記中継装置に接続されていないと判定した場合に、前記生成部に前記産業機械との通信が不可能である旨の判定結果を通知し、
(ii)前記通信ポート番号に紐付く産業機械が前記中継装置に接続されていると判定した場合に、前記生成部に前記産業機械との通信が可能である旨の判定結果を通知し、
前記通信部は、前記生成部が生成した応答データを前記クライアントデバイスに向けて送信する、
中継装置。 A relay device that relays communication between an industrial machine and a client device in accordance with a Modbus (registered trademark) protocol,
An acquisition unit that acquires data related to the industrial machine;
a storage unit that stores an acquired data correspondence table that associates the acquired data acquired by the acquisition unit with an address range in which the acquired data is stored, and an industrial machine system correspondence table that associates the system number of the industrial machine with the address range;
A communication unit for receiving a machine data acquisition request from the client device;
A determination unit,
a determination unit that determines whether communication with the industrial machine is possible and whether an address range included in the machine data acquisition request is within an address range defined in the industrial machine system correspondence table;
A generation unit,
According to the notification of the judgment result of the judgment unit,
(a) generating response data including an exception code when a determination result indicates that communication with the industrial machine is impossible;
(b) when the determination result indicates that communication with the industrial machine is possible,
(A) when it is determined that the address range included in the machine data acquisition request is within the address range defined in the industrial machine system correspondence table, generating response data including the acquisition data identified by the address;
(i) a generating unit that generates response data including the exception code when it is determined that the address range included in the machine data acquisition request is outside the address range defined in the industrial machine system correspondence table; and
a plurality of communication ports connected to a plurality of industrial machines and corresponding to each of the plurality of industrial machines;
Equipped with
Further, the storage unit stores a communication port number associated with each of the plurality of industrial machines,
The machine data acquisition request further includes the communication port number.
The determination unit further determines whether an industrial machine associated with the communication port number included in the machine data acquisition request is connected to the relay device,
(i) when it is determined that an industrial machine associated with the communication port number is not connected to the relay device, notifying the generation unit of a determination result that communication with the industrial machine is impossible;
(ii) when it is determined that an industrial machine associated with the communication port number is connected to the relay device, notifying the generation unit of a determination result that communication with the industrial machine is possible;
The communication unit transmits the response data generated by the generation unit to the client device.
Relay device.
前記産業機械に関するデータを取得する取得ステップと、
前記取得ステップにより取得した取得データと当該取得データが格納されているアドレスの範囲とを対応付けた取得データ対応テーブル、および、産業機械の系統番号と前記アドレスの範囲とを対応付けた産業機械系統対応テーブルを記憶する記憶ステップと、
前記クライアントデバイスから機械データ取得要求を受信する受信ステップと、
前記産業機械との通信が可能か否か、および、前記クライアントデバイスが送信した前記機械データ取得要求に含まれるアドレスの範囲が、前記記憶ステップにより記憶する前記産業機械系統対応テーブルに定義されるアドレスの範囲内か否かを判定する判定ステップと、
さらに、前記記憶ステップでは、前記複数の産業機械の各々に紐付く通信ポート番号を記憶し、
前記機械データ取得要求は、さらに前記通信ポート番号を含み、
前記判定ステップでは、さらに前記機械データ取得要求に含まれた前記通信ポート番号に紐付く産業機械が前記中継装置に接続されているか否かを判定し、
(i)前記通信ポート番号に紐付く産業機械が前記中継装置に接続されていないと判定した場合に、前記産業機械との通信が不可能である旨の判定結果を通知し、
(ii)前記通信ポート番号に紐付く産業機械が前記中継装置に接続されていると判定した場合に、前記産業機械との通信が可能である旨の判定結果を通知することを含み、
生成ステップであって、
前記判定ステップの判定結果の通知に従って、
(a)前記判定ステップにおいて、前記産業機械との通信が不可能との判定結果である場合に、例外コードを含む応答データを生成し、
(b)前記判定ステップにおいて、前記産業機械との通信が可能との判定結果であって、
(ア)前記機械データ取得要求に含まれるアドレスの範囲が前記産業機械系統対応テーブルに定義されるアドレスの範囲内との判定結果である場合に、当該アドレスが特定する前記取得データを含む応答データを生成し、
(イ)前記機械データ取得要求に含まれるアドレスの範囲が前記産業機械系統対応テーブルに定義されるアドレスの範囲外との判定結果である場合に、前記例外コードを含む応答データを生成する生成ステップと、
前記生成ステップで生成した応答データを前記クライアントデバイスに向けて送信する送信ステップと、を含む、
方法。 A method for providing information from an industrial machine to a client device according to a Modbus protocol by a relay device that relays communication between the industrial machine and the client device, the method comprising the steps of :
acquiring data relating to the industrial machine;
a storage step of storing an acquired data correspondence table in which the acquired data acquired by the acquiring step corresponds to an address range in which the acquired data is stored, and an industrial machine system correspondence table in which an industrial machine system number corresponds to the address range;
receiving a request to obtain machine data from the client device;
a determination step of determining whether communication with the industrial machine is possible and whether an address range included in the machine data acquisition request transmitted by the client device is within an address range defined in the industrial machine system correspondence table stored in the storage step;
Furthermore, in the storing step, a communication port number associated with each of the plurality of industrial machines is stored,
The machine data acquisition request further includes the communication port number.
In the determination step, it is further determined whether or not an industrial machine associated with the communication port number included in the machine data acquisition request is connected to the relay device;
(i) when it is determined that the industrial machine associated with the communication port number is not connected to the relay device, notifying a determination result that communication with the industrial machine is impossible;
(ii) when it is determined that an industrial machine associated with the communication port number is connected to the relay device, notifying a determination result that communication with the industrial machine is possible;
A generating step,
According to the notification of the judgment result of the judgment step,
(a) generating response data including an exception code when a determination result indicates that communication with the industrial machine is impossible in the determining step;
(b) a determination result that communication with the industrial machine is possible in the determination step,
(A) when it is determined that the address range included in the machine data acquisition request is within the address range defined in the industrial machine system correspondence table, generating response data including the acquisition data identified by the address;
(i) generating response data including the exception code when it is determined that the address range included in the machine data acquisition request is outside the address range defined in the industrial machine system correspondence table;
a transmitting step of transmitting the response data generated in the generating step to the client device.
method.
A program causing a computer to execute the method according to claim 2.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021177873A JP7629197B2 (en) | 2021-10-29 | 2021-10-29 | Relay device, method and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021177873A JP7629197B2 (en) | 2021-10-29 | 2021-10-29 | Relay device, method and program |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2023066974A JP2023066974A (en) | 2023-05-16 |
| JP2023066974A5 JP2023066974A5 (en) | 2024-06-17 |
| JP7629197B2 true JP7629197B2 (en) | 2025-02-13 |
Family
ID=86326741
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021177873A Active JP7629197B2 (en) | 2021-10-29 | 2021-10-29 | Relay device, method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7629197B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2025071397A (en) * | 2023-10-23 | 2025-05-08 | 株式会社日立製作所 | CONTROL DEVICE, CONTROL SYSTEM, AND CONTROL METHOD |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2017034433A (en) | 2015-07-31 | 2017-02-09 | アズビル株式会社 | Communication control device and method |
| JP2017098762A (en) | 2015-11-25 | 2017-06-01 | 渡辺電機工業株式会社 | Relay communication system, relay station, and relay method |
| JP2017123603A (en) | 2016-01-08 | 2017-07-13 | 株式会社制御システム研究所 | Data diode device with specific packet relay function and setting method thereof |
| CN111240289A (en) | 2020-01-19 | 2020-06-05 | 宁波中国科学院信息技术应用研究院 | Data item acquisition scheduling method for acquiring data of programmable logic controller |
-
2021
- 2021-10-29 JP JP2021177873A patent/JP7629197B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2017034433A (en) | 2015-07-31 | 2017-02-09 | アズビル株式会社 | Communication control device and method |
| JP2017098762A (en) | 2015-11-25 | 2017-06-01 | 渡辺電機工業株式会社 | Relay communication system, relay station, and relay method |
| JP2017123603A (en) | 2016-01-08 | 2017-07-13 | 株式会社制御システム研究所 | Data diode device with specific packet relay function and setting method thereof |
| CN111240289A (en) | 2020-01-19 | 2020-06-05 | 宁波中国科学院信息技术应用研究院 | Data item acquisition scheduling method for acquiring data of programmable logic controller |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2023066974A (en) | 2023-05-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6870568B2 (en) | Communication system, control device, setting device, setting method and program | |
| JP7055813B2 (en) | Data interface equipment used in numerical control machine tools | |
| JP4769808B2 (en) | Interface modules used in Fieldbus device networks and Internet-based and non-Internet-based process control networks | |
| JP5154875B2 (en) | Process control system including flexible input / output device, method, and machine accessible medium storing program | |
| CN101405666B (en) | Method and control and data transmission system for verifying the installation location of a secure communications component | |
| JP2003099102A (en) | Input/output device having setting functional property, failure separating functional property and redundant failure supporting functional property | |
| EP3333657B1 (en) | Communication system, communication device, and communication program | |
| US8352536B2 (en) | Interface between a production management system and an automation system | |
| EP1836594A2 (en) | Message management facility for an industrial process control environment | |
| KR102204906B1 (en) | System for Remote Controlling Machine Tools by Using OPC UA | |
| JP6477555B2 (en) | RELAY DEVICE, RELAY DEVICE CONTROL METHOD, CONTROL PROGRAM, AND RECORDING MEDIUM | |
| CN106170738B (en) | Fieldbus module, machine control and method for parameterizing, in particular, safety-oriented fieldbus modules | |
| JP2009266047A (en) | Apparatus management device, apparatus management method and program | |
| JP6460137B2 (en) | Control device, control method, and program | |
| JPWO2005084916A1 (en) | Molding machine | |
| EP3594768B1 (en) | Management device, relay device, field wireless system, setting method, program, and recording medium | |
| JP6812737B2 (en) | Arithmetic logic unit and control unit | |
| JP7629197B2 (en) | Relay device, method and program | |
| JP6408277B2 (en) | Data collection device and industrial network system | |
| US10715396B2 (en) | Support apparatus, non-transitory computer readable recording medium and setting method | |
| CN119094268A (en) | A network communication method, system and Modbus master station device | |
| JP7745241B2 (en) | Slave device, communication system, and control method and program for slave device | |
| US11907055B2 (en) | Controller, diagnosis method, and diagnosis program | |
| JP2011120056A (en) | Communication system | |
| CN112655175B (en) | Control device, support device, and communication system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240607 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240607 |
|
| A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20240607 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240618 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240809 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20241010 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20241125 |
|
| 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: 20250123 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250124 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7629197 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |