JP6767896B2 - Programmable logic controller system, programmable logic controller, communication test support device, communication test support method, and computer program that can be executed by the communication test support device. - Google Patents

Programmable logic controller system, programmable logic controller, communication test support device, communication test support method, and computer program that can be executed by the communication test support device. Download PDF

Info

Publication number
JP6767896B2
JP6767896B2 JP2017024999A JP2017024999A JP6767896B2 JP 6767896 B2 JP6767896 B2 JP 6767896B2 JP 2017024999 A JP2017024999 A JP 2017024999A JP 2017024999 A JP2017024999 A JP 2017024999A JP 6767896 B2 JP6767896 B2 JP 6767896B2
Authority
JP
Japan
Prior art keywords
command
unit
communication
external device
communication test
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
JP2017024999A
Other languages
Japanese (ja)
Other versions
JP2018132875A (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.)
Keyence Corp
Original Assignee
Keyence Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Keyence Corp filed Critical Keyence Corp
Priority to JP2017024999A priority Critical patent/JP6767896B2/en
Publication of JP2018132875A publication Critical patent/JP2018132875A/en
Application granted granted Critical
Publication of JP6767896B2 publication Critical patent/JP6767896B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、通信テスト用のラダープログラムをプログラマブルコントローラ(以下、PLC)に転送することなく通信テストを実行することが可能なプログラマブルロジックコントローラシステム、プログラマブルロジックコントローラ、通信テスト支援装置、通信テスト支援方法、及び通信テスト支援装置で実行することが可能なコンピュータプログラムに関する。 The present invention is a programmable logic controller system, a programmable logic controller, a communication test support device, and a communication test support method capable of executing a communication test without transferring a ladder program for communication test to a programmable controller (hereinafter referred to as PLC). , And computer programs that can be executed by the communication test support device.

PLCは、FA(Factory Automation)制御システムにおいて広く使用されているシーケンス制御装置であり、ラダープログラムと呼ばれる専用プログラムに従って動作する。実装時には、PLCに接続された汎用のシリアルデバイスに対して、データ読出しの動作確認等を行う必要がある。 The PLC is a sequence control device widely used in an FA (Factory Automation) control system, and operates according to a dedicated program called a ladder program. At the time of mounting, it is necessary to confirm the operation of data reading for a general-purpose serial device connected to the PLC.

具体的には、PLCを介して接続先設定処理、オープン処理、コマンド送信処理、レスポンス受信処理、クローズ処理等の各種の処理を記述したラダープログラムを作成し、支援装置からPLCに転送してラダープログラムを実行することにより、通信テストを行っている。 Specifically, a ladder program is created that describes various processes such as connection destination setting process, open process, command transmission process, response reception process, and close process via PLC, and the program is transferred from the support device to PLC to ladder. The communication test is performed by executing the program.

例えば特許文献1では、事前に準備されている宛先アドレス情報と通信条件との組み合わせとして規定されている複数の通信仕様を順次切り換えることが可能なプログラマブル・コントローラ・システムが開示されている。特許文献1では、PLCと汎用シリアルデバイスとの通信条件を意識することなく通信テストを行うことができる。 For example, Patent Document 1 discloses a programmable controller system capable of sequentially switching a plurality of communication specifications defined as a combination of a destination address information prepared in advance and communication conditions. In Patent Document 1, a communication test can be performed without being aware of the communication conditions between the PLC and the general-purpose serial device.

特開2006−277733号公報Japanese Unexamined Patent Publication No. 2006-277733

上述したように、通信テストを行うためには、通信テスト専用のラダープログラムを作成することが必須となる。しかし、ラダープログラムの作成には多くの時間と手間が掛かるという問題点があった。また、ラダープログラムを支援装置から転送しなければならないので、プログラムの変更等を動的に行うことができず、エラーが生じた場合に、機器(汎用シリアルデバイス等)の不具合で生じたのか、プログラムの不具合で生じたのか、原因の切り分けが困難になるという問題点もあった。 As described above, in order to perform the communication test, it is essential to create a ladder program dedicated to the communication test. However, there is a problem that it takes a lot of time and effort to create a ladder program. Also, since the ladder program must be transferred from the support device, it is not possible to change the program dynamically, and if an error occurs, is it caused by a malfunction of the device (general-purpose serial device, etc.)? There was also a problem that it was difficult to isolate the cause, probably because of a program defect.

本発明は斯かる事情に鑑みてなされたものであり、通信テスト用のラダープログラムをPLCに転送することなく通信テストを実行することが可能なプログラマブルロジックコントローラシステム、プログラマブルロジックコントローラ、通信テスト支援装置、通信テスト支援方法、及び通信テスト支援装置で実行することが可能なコンピュータプログラムを提供することを目的とする。 The present invention has been made in view of such circumstances, and is a programmable logic controller system, a programmable logic controller, and a communication test support device capable of executing a communication test without transferring a ladder program for a communication test to a PLC. , A communication test support method, and a computer program that can be executed by a communication test support device.

上記目的を達成するために第1発明に係るプログラマブルロジックコントローラシステムは、ユーザプログラムを記憶するプログラム記憶部と、前記ユーザプログラムを繰り返し実行するプログラム実行部と、前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、外部機器とデータ通信することが可能に接続する通信部と、該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部とを備えるプログラマブルロジックコントローラと、該プログラマブルロジックコントローラとデータ通信することが可能に接続されており、前記外部機器に対する通信テストを支援する通信テスト支援装置とで構成されたプログラマブルロジックコントローラシステムにおいて、前記通信テスト支援装置は、前記外部機器との接続条件を表示する表示部と、前記外部機器に対するコマンドに含まれる文字列の入力を受け付ける入力受付部と、前記コマンドの発行トリガを受け付けるトリガ発行受付部と、入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記コマンドの発行トリガを受け付けた場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第二のコマンド発行部とを備えることを特徴とする。 In order to achieve the above object, the programmable logic controller system according to the first invention is assigned a program storage unit that stores a user program, a program execution unit that repeatedly executes the user program, and a device described in the user program. A device is assigned to a device storage unit having a designated device area, a communication unit that is connected to enable data communication with an external device, a frame definition of a command for the external device, and an element included in the frame definition. A command for the external device is generated based on the setting data storage unit that stores the assigned allocation information as setting data, the device value of the device, and the setting data stored in the setting data storage unit, and the program is executed. A first command issuing unit that issues a generated command to the external device connected to the communication unit when the device corresponding to the command issuance trigger to the external device is turned on by the unit. In a programmable logic controller system including a programmable logic controller including the above, and a communication test support device that is connected to the programmable logic controller so as to be capable of data communication and supports a communication test for the external device, the communication. The test support device includes a display unit that displays connection conditions with the external device, an input reception unit that accepts input of a character string included in a command for the external device, and a trigger issuance reception unit that accepts an issuance trigger of the command. , A command for the external device is generated based on the character string for which the input is accepted, and when the issue trigger of the command is received, the generated command is issued for the external device connected to the communication unit. It is characterized by having a second command issuing unit.

また、第2発明に係るプログラマブルロジックコントローラシステムは、第1発明において、前記第二のコマンド発行部は、入力を受け付けた文字列と前記設定データ記憶部に予め記憶されている設定データとに基づいて、前記外部機器に対するコマンドを生成することが好ましい。 Further, in the programmable logic controller system according to the second invention, in the first invention, the second command issuing unit is based on a character string that receives input and setting data stored in advance in the setting data storage unit. It is preferable to generate a command for the external device.

また、第3発明に係るプログラマブルロジックコントローラシステムは、第1発明において、前記通信テスト支援装置は、前記外部機器との接続条件を設定する接続条件設定部を備え、前記第二のコマンド発行部は、入力を受け付けた文字列と前記接続条件設定部により設定された接続条件とに基づいて、前記外部機器に対するコマンドを生成することが好ましい。 Further, in the programmable logic controller system according to the third invention, in the first invention, the communication test support device includes a connection condition setting unit for setting connection conditions with the external device, and the second command issuing unit is , It is preferable to generate a command for the external device based on the character string for which the input is received and the connection condition set by the connection condition setting unit.

また、第4発明に係るプログラマブルロジックコントローラシステムは、第2発明において、前記通信テスト支援装置も、前記設定データ記憶部を備えており、前記第二のコマンド発行部は、前記通信テスト支援装置の前記設定データ記憶部に記憶されている設定データに基づいて前記外部機器に対するコマンドを生成することが好ましい。 Further, in the programmable logic controller system according to the fourth invention, in the second invention, the communication test support device also includes the setting data storage unit, and the second command issuing unit is the communication test support device. It is preferable to generate a command for the external device based on the setting data stored in the setting data storage unit.

また、第5発明に係るプログラマブルロジックコントローラシステムは、第1乃至第4発明のいずれか1つにおいて、前記通信テスト支援装置は、生成されたコマンドを発行した後に、対応するラダープログラムを出力することが好ましい。 Further, in the programmable logic controller system according to the fifth invention, in any one of the first to fourth inventions, the communication test support device outputs a corresponding ladder program after issuing a generated command. Is preferable.

また、第6発明に係るプログラマブルロジックコントローラシステムは、第1乃至第5発明のいずれか1つにおいて、前記プログラマブルロジックコントローラは、少なくともCPUユニットと通信ユニットとを含むことが好ましい。 Further, in any one of the first to fifth inventions, the programmable logic controller system according to the sixth invention preferably includes at least a CPU unit and a communication unit.

次に、上記目的を達成するために第7発明に係るプログラマブルロジックコントローラは、ユーザプログラムを記憶するプログラム記憶部と、前記ユーザプログラムを繰り返し実行するプログラム実行部と、前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、外部機器とデータ通信することが可能に接続する通信部と、該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部とを備え、前記外部機器に対する通信テストを支援する通信テスト支援装置とデータ通信することが可能に接続されており、前記通信テスト支援装置において、前記外部機器に対するコマンドに含まれる文字列の入力を受け付け、入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記コマンドの発行トリガを受け付けた場合に発行されたコマンドを受信することを特徴とする。 Next, in order to achieve the above object, the programmable logic controller according to the seventh invention includes a program storage unit that stores a user program, a program execution unit that repeatedly executes the user program, and a device described in the user program. A device storage unit having a device area allocated to the device, a communication unit connected to enable data communication with an external device, a frame definition of a command for the external device, and a device for elements included in the frame definition. Generates a command for the external device based on the setting data storage unit that stores the allocation information assigned to the device as setting data, the device value of the device, and the setting data stored in the setting data storage unit. Issuance of a command to the external device by the program execution unit When the device corresponding to the trigger is turned on, the first command issuance to issue the generated command to the external device connected to the communication unit. It is provided with a unit and is connected to a communication test support device that supports a communication test for the external device so as to be capable of data communication. In the communication test support device, input of a character string included in a command for the external device is performed. Is received, a command for the external device is generated based on the character string for which the input is received, and the command issued when the issue trigger of the command is received is received.

また、第8発明に係るプログラマブルロジックコントローラは、第7発明において、少なくともCPUユニットと通信ユニットとを含むことが好ましい。 Further, in the seventh invention, the programmable logic controller according to the eighth invention preferably includes at least a CPU unit and a communication unit.

次に、上記目的を達成するために第9発明に係る通信テスト支援装置は、ユーザプログラムを記憶するプログラム記憶部と、前記ユーザプログラムを繰り返し実行するプログラム実行部と、前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、外部機器とデータ通信することが可能に接続する通信部と、該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部とを備えるプログラマブルロジックコントローラとデータ通信することが可能に接続されており、前記外部機器に対する通信テストを支援する通信テスト支援装置において、前記外部機器との接続条件を表示する表示部と、前記外部機器に対するコマンドに含まれる文字列の入力を受け付ける入力受付部と、前記コマンドの発行トリガを受け付けるトリガ発行受付部と、入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記コマンドの発行トリガを受け付けた場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第二のコマンド発行部とを備えることを特徴とする。 Next, in order to achieve the above object, the communication test support device according to the ninth invention is described in the program storage unit for storing the user program, the program execution unit for repeatedly executing the user program, and the user program. For the device storage unit that has the device area to which the device is allocated, the communication unit that connects to the external device so that data communication can be performed, the frame definition of the command for the external device, and the elements included in the frame definition. A command for the external device is generated based on the setting data storage unit that stores the allocation information assigned to the device as setting data, the device value of the device, and the setting data stored in the setting data storage unit. The first command to issue a command generated to the external device connected to the communication unit when the device corresponding to the issue trigger of the command to the external device is turned on by the program execution unit. In a communication test support device that is connected to a programmable logic controller including a issuing unit so as to be able to perform data communication and supports a communication test for the external device, a display unit that displays connection conditions with the external device and a display unit. An input reception unit that accepts the input of a character string included in a command to the external device, a trigger issuance reception unit that accepts an issuance trigger of the command, and a command to the external device are generated based on the character string that receives the input. It is characterized by including a second command issuing unit that issues a generated command to the external device connected to the communication unit when the issuing trigger of the command is received.

また、第10発明に係る通信テスト支援装置は、第9発明において、前記第二のコマンド発行部は、入力を受け付けた文字列と前記設定データ記憶部に予め記憶されている設定データとに基づいて、前記外部機器に対するコマンドを生成することが好ましい。 Further, in the communication test support device according to the tenth invention, in the ninth invention, the second command issuing unit is based on a character string for receiving input and setting data stored in advance in the setting data storage unit. It is preferable to generate a command for the external device.

また、第11発明に係る通信テスト支援装置は、第9発明において、前記外部機器との接続条件を設定する接続条件設定部を備え、前記第二のコマンド発行部は、入力を受け付けた文字列と前記接続条件設定部により設定された接続条件とに基づいて、前記外部機器に対するコマンドを生成することが好ましい。 Further, in the ninth invention, the communication test support device according to the eleventh invention includes a connection condition setting unit for setting a connection condition with the external device, and the second command issuing unit receives an input character string. It is preferable to generate a command for the external device based on the connection condition set by the connection condition setting unit.

また、第12発明に係る通信テスト支援装置は、第10発明において、前記設定データ記憶部を備えており、前記第二のコマンド発行部は、前記通信テスト支援装置の前記設定データ記憶部に記憶されている設定データに基づいて前記外部機器に対するコマンドを生成することが好ましい。 Further, in the tenth invention, the communication test support device according to the twelfth invention includes the setting data storage unit, and the second command issuing unit stores the setting data storage unit of the communication test support device. It is preferable to generate a command for the external device based on the setting data.

また、第13発明に係る通信テスト支援装置は、第9乃至第12発明のいずれか1つにおいて、生成されたコマンドを発行した後に、対応するラダープログラムを出力することが好ましい。 Further, it is preferable that the communication test support device according to the thirteenth invention outputs the corresponding ladder program after issuing the generated command in any one of the ninth to twelfth inventions.

次に、上記目的を達成するために第14発明に係る通信テスト支援方法は、ユーザプログラムを記憶するプログラム記憶部と、前記ユーザプログラムを繰り返し実行するプログラム実行部と、前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、外部機器とデータ通信することが可能に接続する通信部と、該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部とを備えるプログラマブルロジックコントローラと、該プログラマブルロジックコントローラとデータ通信することが可能であり、前記外部機器に対する通信テストを支援する通信テスト支援装置とで構成されたプログラマブルロジックコントローラシステムで実行することが可能な通信テスト支援方法において、前記通信テスト支援装置は、前記外部機器との接続条件を表示する工程と、前記外部機器に対するコマンドに含まれる文字列の入力を受け付ける工程と、前記コマンドの発行トリガを受け付ける工程と、入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記コマンドの発行トリガを受け付けた場合に、前記外部機器に対して生成したコマンドを発行する工程とを含むことを特徴とする。 Next, in order to achieve the above object, the communication test support method according to the fourteenth invention is described in the program storage unit for storing the user program, the program execution unit for repeatedly executing the user program, and the user program. For the device storage unit that has the device area to which the device is allocated, the communication unit that connects to the external device so that data communication can be performed, the frame definition of the command for the external device, and the elements included in the frame definition. A command for the external device is generated based on the setting data storage unit that stores the allocation information assigned to the device as setting data, the device value of the device, and the setting data stored in the setting data storage unit. The first command to issue a command generated to the external device connected to the communication unit when the device corresponding to the issue trigger of the command to the external device is turned on by the program execution unit. Execution in a programmable logic controller system composed of a programmable logic controller including a issuing unit and a communication test support device capable of data communication with the programmable logic controller and supporting a communication test for the external device. In the communication test support method capable of the above, the communication test support device has a step of displaying connection conditions with the external device, a step of accepting input of a character string included in a command to the external device, and issuance of the command. A process of accepting a trigger and a process of generating a command for the external device based on a character string for which input is received and issuing a generated command to the external device when the issue trigger of the command is received. It is characterized by including.

また、第15発明に係る通信テスト支援方法は、第14発明において、前記通信テスト支援装置は、入力を受け付けた文字列と前記設定データ記憶部に予め記憶されている設定データとに基づいて、前記外部機器に対するコマンドを生成することが好ましい。 Further, in the communication test support method according to the fifteenth invention, in the fourteenth invention, the communication test support device is based on a character string receiving an input and setting data stored in advance in the setting data storage unit. It is preferable to generate a command for the external device.

また、第16発明に係る通信テスト支援方法は、第14発明において、前記通信テスト支援装置は、前記外部機器との接続条件を設定する工程を含み、入力を受け付けた文字列と設定された接続条件とに基づいて、前記外部機器に対するコマンドを生成することが好ましい。 Further, in the communication test support method according to the sixteenth invention, in the fourteenth invention, the communication test support device includes a step of setting connection conditions with the external device, and is a connection set with a character string that accepts input. It is preferable to generate a command for the external device based on the conditions.

また、第17発明に係る通信テスト支援方法は、第15発明において、前記通信テスト支援装置も、前記設定データ記憶部を備えており、前記通信テスト支援装置は、前記通信テスト支援装置の前記設定データ記憶部に記憶されている設定データに基づいて前記外部機器に対するコマンドを生成することが好ましい。 Further, in the communication test support method according to the seventeenth invention, in the fifteenth invention, the communication test support device also includes the setting data storage unit, and the communication test support device is the setting of the communication test support device. It is preferable to generate a command for the external device based on the setting data stored in the data storage unit.

また、第18発明に係る通信テスト支援方法は、第14乃至第17発明のいずれか1つにおいて、前記通信テスト支援装置は、生成されたコマンドを発行した後に、対応するラダープログラムを出力することが好ましい。 Further, in the communication test support method according to the eighteenth invention, in any one of the fourteenth to seventeenth inventions, the communication test support device outputs a corresponding ladder program after issuing a generated command. Is preferable.

次に、上記目的を達成するために第19発明に係るコンピュータプログラムは、ユーザプログラムを記憶するプログラム記憶部と、前記ユーザプログラムを繰り返し実行するプログラム実行部と、前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、外部機器とデータ通信することが可能に接続する通信部と、該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部とを備えるプログラマブルロジックコントローラとデータ通信することが可能に接続されており、前記外部機器に対する通信テストを支援する通信テスト支援装置で実行することが可能なコンピュータプログラムにおいて、前記通信テスト支援装置を、前記外部機器との接続条件を表示する表示手段、前記外部機器に対するコマンドに含まれる文字列の入力を受け付ける入力受付手段、前記コマンドの発行トリガを受け付けるトリガ発行受付手段、及び入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記コマンドの発行トリガを受け付けた場合に、前記通信手段で接続された前記外部機器に対して生成したコマンドを発行する第二のコマンド発行手段として機能させることを特徴とする。 Next, in order to achieve the above object, the computer program according to the nineteenth invention includes a program storage unit that stores the user program, a program execution unit that repeatedly executes the user program, and a device described in the user program. A device storage unit having an allocated device area, a communication unit connected to enable data communication with an external device, a frame definition of a command for the external device, and a device for an element included in the frame definition. The program generates a command for the external device based on the setting data storage unit that stores the assigned allocation information as setting data, the device value of the device, and the setting data stored in the setting data storage unit. A first command issuing unit that issues a generated command to the external device connected to the communication unit when the execution unit turns on the device that responds to the issue trigger of the command to the external device. In a computer program that is connected to a programmable logic controller that is capable of data communication and can be executed by a communication test support device that supports a communication test with respect to the external device, the communication test support device is used. A display means for displaying connection conditions with the external device, an input receiving means for receiving input of a character string included in a command for the external device, a trigger issuing receiving means for receiving a trigger for issuing the command, and a character string for receiving input. As a second command issuing means for issuing a generated command to the external device connected by the communication means when a command for the external device is generated and a trigger for issuing the command is received based on the above. It is characterized by making it work.

次に、上記目的を達成するために第20発明に係るプログラマブルロジックコントローラシステムは、ユーザプログラムを記憶するプログラム記憶部と、前記ユーザプログラムを繰り返し実行するプログラム実行部と、前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、外部機器とデータ通信することが可能に接続する通信部と、該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部とを備えるプログラマブルロジックコントローラと、該プログラマブルロジックコントローラとデータ通信することが可能に接続されており、前記外部機器に対する通信テストを支援する通信テスト支援装置とで構成されたプログラマブルロジックコントローラシステムにおいて、前記通信テスト支援装置は、前記外部機器との接続条件を表示する表示部と、前記外部機器に対するコマンドに含まれる文字列の入力を受け付ける入力受付部と、前記コマンドの発行トリガを受け付けるトリガ発行受付部とを備え、前記プログラマブルロジックコントローラは、前記通信テスト支援装置で入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記通信テスト支援装置から前記コマンドの発行トリガを受け付けた場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第二のコマンド発行部とを備えることを特徴とする。 Next, in order to achieve the above object, the programmable logic controller system according to the twentieth invention is described in the program storage unit for storing the user program, the program execution unit for repeatedly executing the user program, and the user program. For the device storage unit that has the device area to which the device is allocated, the communication unit that connects to the external device so that data communication can be performed, the frame definition of the command for the external device, and the elements included in the frame definition. A command for the external device is generated based on the setting data storage unit that stores the allocation information assigned to the device as setting data, the device value of the device, and the setting data stored in the setting data storage unit. The first command to issue a command generated to the external device connected to the communication unit when the device corresponding to the issue trigger of the command to the external device is turned on by the program execution unit. In a programmable logic controller system composed of a programmable logic controller including a issuing unit and a communication test support device which is connected to the programmable logic controller so as to be capable of data communication and supports a communication test for the external device. The communication test support device has a display unit that displays connection conditions with the external device, an input reception unit that accepts input of a character string included in a command for the external device, and a trigger issuance that accepts an issuance trigger of the command. The programmable logic controller includes a reception unit, generates a command for the external device based on a character string input received by the communication test support device, and receives a trigger for issuing the command from the communication test support device. In this case, it is characterized by including a second command issuing unit that issues a generated command to the external device connected to the communication unit.

第1発明、第7発明、第9発明、第14発明、第19発明、及び第20発明では、通信テスト支援装置が、外部機器との接続条件を表示する表示部と、外部機器に対するコマンドに含まれる文字列の入力を受け付ける入力受付部と、コマンドの発行トリガを受け付けるトリガ発行受付部と、入力を受け付けた文字列に基づいて、外部機器に対するコマンドを生成し、発行トリガを受け付けた場合に、通信部に接続された外部機器に対して生成したコマンドを発行する第二のコマンド発行部とを備える。これにより、ラダープログラムを作成することなく、コマンドを動的に生成しながら通信テストを行うこともできるので、ユーザ所望の通信テストを容易かつ簡潔に行うことが可能となる。また、通信エラーが発生した場合に、ラダープログラムを実行させないときには通信コマンドのチェックのみで確認することができ、エラー対処時間を短縮することも可能となる。 In the 1st, 7th, 9th, 14th, 19th, and 20th inventions, the communication test support device is used as a display unit for displaying connection conditions with an external device and a command for the external device. When an input reception unit that accepts the input of the included character string, a trigger issuance reception unit that accepts the command issuance trigger, and a command for an external device is generated based on the input character string and the issuance trigger is accepted. , A second command issuing unit that issues a generated command to an external device connected to the communication unit is provided. As a result, the communication test can be performed while dynamically generating commands without creating a ladder program, so that the communication test desired by the user can be easily and concisely performed. Further, when a communication error occurs, when the ladder program is not executed, it can be confirmed only by checking the communication command, and the error handling time can be shortened.

第2発明、第10発明、及び第15発明では、入力を受け付けた文字列と予め記憶されている設定データとに基づいて、外部機器に対するコマンドを生成するので、入力を受け付けた文字列をそのままコマンドとして生成する場合だけでなく、新たなコマンドを生成する場合においても、ラダープログラムを作成することなく、コマンドを動的に生成しながら通信テストを行うことができる。したがって、ユーザ所望の通信テストを容易かつ簡潔に行うことが可能となる。また、通信エラーが発生した場合に、ラダープログラムを実行させないときには通信コマンドのチェックのみで確認することができ、エラー対処時間を短縮することも可能となる。 In the second invention, the tenth invention, and the fifteenth invention, since the command for the external device is generated based on the character string for which the input is accepted and the setting data stored in advance, the character string for which the input is accepted is used as it is. Communication tests can be performed while dynamically generating commands without creating a ladder program, not only when generating as commands but also when generating new commands. Therefore, it is possible to easily and concisely perform the communication test desired by the user. Further, when a communication error occurs, when the ladder program is not executed, it can be confirmed only by checking the communication command, and the error handling time can be shortened.

第3発明、第11発明、及び第16発明では、入力を受け付けた文字列と設定された接続条件とに基づいて、外部機器に対するコマンドを生成するので、入力を受け付けた文字列に対して接続先の情報(IPアドレス等)を付加することができ、ラダープログラムを作成することなく、コマンドを動的に生成しながら通信テストを行うことができる。したがって、ユーザ所望の通信テストを容易かつ簡潔に行うことが可能となる。また、通信エラーが発生した場合に、ラダープログラムを実行させないときには通信コマンドのチェックのみで確認することができ、エラー対処時間を短縮することも可能となる。 In the third invention, the eleventh invention, and the sixteenth invention, since the command for the external device is generated based on the character string for which the input is accepted and the set connection condition, the connection is made to the character string for which the input is accepted. The above information (IP address, etc.) can be added, and a communication test can be performed while dynamically generating commands without creating a ladder program. Therefore, it is possible to easily and concisely perform the communication test desired by the user. Further, when a communication error occurs, when the ladder program is not executed, it can be confirmed only by checking the communication command, and the error handling time can be shortened.

第4発明、第12発明、及び第17発明では、通信テスト支援装置も、設定データ記憶部を備えており、通信テスト支援装置の設定データ記憶部に記憶されている設定データに基づいて外部機器に対するコマンドを生成するので、プログラマブルロジックコントローラにアクセスすることなく通信テスト用のコマンドを生成することができ、所望のタイミングで通信テストを行うことが可能となる。 In the fourth, twelfth, and seventeenth inventions, the communication test support device also includes a setting data storage unit, and is an external device based on the setting data stored in the setting data storage unit of the communication test support device. Since the command for is generated, the command for the communication test can be generated without accessing the programmable logic controller, and the communication test can be performed at a desired timing.

第5発明、第13発明、及び第18発明では、通信テスト支援装置は、生成されたコマンドを発行した後に、対応するラダープログラムを出力するので、通信テストで送信したコマンドを送付するためのプログラムを容易に作成することができるとともに、通信テストを容易に再現することが可能となる。 In the fifth, thirteenth, and eighteenth inventions, the communication test support device outputs the corresponding ladder program after issuing the generated command, so that the program for sending the command transmitted in the communication test is sent. Can be easily created, and the communication test can be easily reproduced.

第6発明、及び第8発明では、プログラマブルロジックコントローラは、少なくともCPUユニットと通信ユニットとを含むので、CPUユニットの処理負荷を大幅に増やすことなく通信テスト用のコマンドを生成することが可能となる。 In the sixth invention and the eighth invention, since the programmable logic controller includes at least a CPU unit and a communication unit, it is possible to generate a command for a communication test without significantly increasing the processing load of the CPU unit. ..

本発明によれば、ラダープログラムを作成することなく、コマンドを動的に生成しながら通信テストを行うこともできるので、ユーザ所望の通信テストを容易かつ簡潔に行うことが可能となる。また、通信エラーが発生した場合に、ラダープログラムを実行させないときには通信コマンドのチェックのみで確認することができ、エラー対処時間を短縮することも可能となる。 According to the present invention, it is possible to perform a communication test while dynamically generating a command without creating a ladder program, so that it is possible to easily and concisely perform a communication test desired by the user. Further, when a communication error occurs, when the ladder program is not executed, it can be confirmed only by checking the communication command, and the error handling time can be shortened.

本発明の実施の形態1に係る通信テスト支援装置を用いた、PLCシステムの構成例を示すブロック図である。It is a block diagram which shows the structural example of the PLC system using the communication test support apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る通信テスト支援装置と接続されているPLCの構成例を示すブロック図である。It is a block diagram which shows the structural example of the PLC connected to the communication test support apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る通信テスト支援装置と接続されているPLCで生成される通信コマンドの例示図である。It is an example diagram of the communication command generated by the PLC connected to the communication test support device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る通信テスト支援装置と接続されているPLCのCPUユニットのCPUの処理手順を示すフローチャートである。It is a flowchart which shows the processing procedure of the CPU of the CPU unit of PLC connected to the communication test support apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る通信テスト支援装置と接続されているPLCの通信ユニットの処理手順を示すフローチャートである。It is a flowchart which shows the processing procedure of the communication unit of PLC connected to the communication test support apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る通信テスト支援装置の、CPU等の制御部を用いた場合の構成を示すブロック図である。FIG. 5 is a block diagram showing a configuration of a communication test support device according to a first embodiment of the present invention when a control unit such as a CPU is used. 本発明の実施の形態1に係る通信テスト支援装置の機能を示す機能ブロック図である。It is a functional block diagram which shows the function of the communication test support apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る通信テスト支援装置の制御部の処理手順を示すフローチャートである。It is a flowchart which shows the processing procedure of the control part of the communication test support apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る通信テスト支援装置と接続されているPLCのCPUユニット及び通信ユニットの処理手順を示すフローチャートである。It is a flowchart which shows the processing procedure of the CPU unit and the communication unit of PLC connected to the communication test support device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る通信テスト支援装置の設定画面の例示図である。It is an example figure of the setting screen of the communication test support device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る通信テスト支援装置の通信テストのコマンドのデータ構成の例示図である。It is explanatory drawing of the data structure of the command of the communication test of the communication test support apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態2に係る通信テスト支援装置と接続されているPLCの構成例を示すブロック図である。It is a block diagram which shows the structural example of the PLC connected to the communication test support apparatus which concerns on Embodiment 2 of this invention. 本発明の実施の形態2に係る通信テスト支援装置の機能を示す機能ブロック図である。It is a functional block diagram which shows the function of the communication test support apparatus which concerns on Embodiment 2 of this invention. 本発明の実施の形態3に係る通信テスト支援装置のラダープログラムの表示出力指定画面の例示図である。It is an example figure of the display output designation screen of the ladder program of the communication test support device which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る通信テスト支援装置のラダープログラム及びフレーム定義の表示出力画面の例示図である。It is an example figure of the display output screen of the ladder program and the frame definition of the communication test support device which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る通信テスト支援装置の処理のフローの表示出力画面の例示図である。It is an example figure of the display output screen of the processing flow of the communication test support apparatus which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る通信テスト支援装置の処理のフロー及びフレーム定義の表示出力画面の例示図である。It is an example figure of the display output screen of the processing flow and frame definition of the communication test support device which concerns on Embodiment 3 of this invention.

以下、本発明の実施の形態に係る通信テスト支援装置を用いた、プログラマブルロジックコントローラ(Programmable Logic Controller:以下、PLC)システムについて、図面に基づいて具体的に説明する。 Hereinafter, a programmable logic controller (PLC) system using the communication test support device according to the embodiment of the present invention will be specifically described with reference to the drawings.

(実施の形態1)
図1は、本発明の実施の形態1に係る通信テスト支援装置を用いた、PLCシステムの構成例を示すブロック図である。図1に示すように、本実施の形態1では、PLC1に通信テスト支援装置2が接続されている。
(Embodiment 1)
FIG. 1 is a block diagram showing a configuration example of a PLC system using the communication test support device according to the first embodiment of the present invention. As shown in FIG. 1, in the first embodiment, the communication test support device 2 is connected to the PLC1.

PLC1は、各種のセンサ、リレー接点、エンコーダ、スイッチ等の入力装置(外部機器)3と、モータ、ランプ、ソレノイド等の出力装置(外部機器)4とも接続されており、入力装置3からの入力信号に基づいて、出力装置4への出力信号を生成する。PLC1の動作は、PLC1内に記憶されているラダープログラムによって決定される。なお、入力装置(外部機器)3又は出力装置(外部機器)4としては、例えば、画像処理装置、計測器、バーコードリーダ、マーキング機器、除電器、温度調節器、インバータ、アクチュエータ、又は電子はかり等、通信によりPLC1とデータをやり取りし得る機器(外部通信機器)が含まれていても良い。 The PLC 1 is also connected to an input device (external device) 3 such as various sensors, relay contacts, encoders, and switches, and an output device (external device) 4 such as a motor, lamp, and solenoid, and is input from the input device 3. Based on the signal, an output signal to the output device 4 is generated. The operation of the PLC1 is determined by the ladder program stored in the PLC1. The input device (external device) 3 or output device (external device) 4 includes, for example, an image processing device, a measuring instrument, a bar code reader, a marking device, a static eliminator, a temperature controller, an inverter, an actuator, or an electronic scale. Etc., a device (external communication device) capable of exchanging data with the PLC1 by communication may be included.

より具体的には、PLC1は、PLC1全体の制御を司るCPUユニットと、CPUユニットに着脱可能に接続される一又は複数の拡張ユニットとで構成されている。CPUユニットは、表示部及び操作部を備える。表示部は、CPUユニットに接続されている各拡張ユニットの動作状況等を表示し、表示部の表示内容は、操作部を操作することにより切り替えることができる。表示部には、通常、ラダープログラムにより参照されるデバイスの現在値(デバイス値)、PLC1内で生じたエラー情報等が表示される。つまり、CPUユニットは、操作部を介したユーザ操作に基づいて、表示部に所望のデバイス値を表示させたり、そのデバイス値を他の値(ユーザの所望の値)に変更(編集)したりする機能を有する。 More specifically, the PLC1 is composed of a CPU unit that controls the entire PLC1 and one or a plurality of expansion units that are detachably connected to the CPU unit. The CPU unit includes a display unit and an operation unit. The display unit displays the operating status of each expansion unit connected to the CPU unit, and the display content of the display unit can be switched by operating the operation unit. Normally, the display unit displays the current value (device value) of the device referred to by the ladder program, error information generated in PLC1, and the like. That is, the CPU unit displays a desired device value on the display unit or changes (edits) the device value to another value (user's desired value) based on the user operation via the operation unit. Has the function of

PLC1の動作モードは、ユーザによって運用モード(いわゆるRUNモード)又は非運用モード(いわゆる設定モード)に切り替えられる。運用モード時には、ラダープログラムが周期的に繰り返し実行され、非運用モード時には、ラダープログラムの実行は停止している。 The operation mode of the PLC1 is switched to an operation mode (so-called RUN mode) or a non-operation mode (so-called setting mode) by the user. In the operation mode, the ladder program is periodically and repeatedly executed, and in the non-operation mode, the execution of the ladder program is stopped.

通信テスト支援装置2は、PLC1内のデバイスにデバイス値を設定することにより、入力装置3及び/又は出力装置4等の外部機器が正常に動作するか否かを確認する。PLC1単体で通信テストを実行する場合、外部機器3、4に対するコマンドのフレーム定義、及びフレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶しておく(設定データ記憶部を通信テスト支援装置2に備えても良い)。デバイスのデバイス値と記憶されている設定データとに基づいて、外部機器3、4に対するコマンドを生成し、外部機器3、4に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、外部機器3、4に対して生成したコマンドを発行する。 The communication test support device 2 confirms whether or not the external device such as the input device 3 and / or the output device 4 operates normally by setting the device value in the device in the PLC1. When the communication test is executed by the PLC1 alone, the frame definition of the command for the external devices 3 and 4 and the allocation information in which the device is assigned to the element included in the frame definition are stored as the setting data (setting data). The storage unit may be provided in the communication test support device 2). When a command for external devices 3 and 4 is generated based on the device value of the device and the stored setting data, and the device corresponding to the command issuance trigger for the external devices 3 and 4 is turned on. Issue the generated command to the external devices 3 and 4.

一方、通信テスト支援装置2において、外部機器3、4に対するコマンドに含まれる文字列の入力を受け付け、入力を受け付けた文字列と記憶されている設定データとに基づいて、外部機器3、4に対するコマンドを生成し、発行トリガを受け付けた場合に、外部機器3、4に対して生成したコマンドを発行する。これにより、通信テスト用のコマンドをPLC1及び通信テスト支援装置2の両方で発行することができ、通信テストを柔軟に、しかも簡便に行うことができる。なお、発行トリガには、テスト用のファンクションブロック(又はテスト用の命令語)を実行開始するためのトリガも含む。 On the other hand, the communication test support device 2 accepts the input of the character string included in the command for the external devices 3 and 4, and receives the input for the external devices 3 and 4 based on the received character string and the stored setting data. When a command is generated and an issue trigger is received, the generated command is issued to the external devices 3 and 4. As a result, the command for the communication test can be issued by both the PLC 1 and the communication test support device 2, and the communication test can be performed flexibly and easily. The issue trigger also includes a trigger for starting execution of a test function block (or a test instruction word).

図2は、本発明の実施の形態1に係る通信テスト支援装置2と接続されているPLC1の構成例を示すブロック図である。本実施の形態1に係るPLC1は、CPUユニット1aと拡張ユニット(通信ユニット)1bとで構成されている。CPUユニット1aと拡張ユニット1bとで機能を分散することにより、CPUユニット1aの処理負荷を大きく低減することが可能となる。 FIG. 2 is a block diagram showing a configuration example of PLC1 connected to the communication test support device 2 according to the first embodiment of the present invention. The PLC1 according to the first embodiment is composed of a CPU unit 1a and an expansion unit (communication unit) 1b. By distributing the functions between the CPU unit 1a and the expansion unit 1b, it is possible to greatly reduce the processing load of the CPU unit 1a.

拡張ユニット1bの種類は、特に限定されるものではない。本実施の形態1では、拡張ユニット1bが、他の外部機器とデータ通信を行うことができる通信ユニットである場合について説明する。もちろん、CPUユニット1aと拡張ユニット1bとで機能を分散せず、単体のPLC1で構成されていても良いことは言うまでもない。 The type of expansion unit 1b is not particularly limited. In the first embodiment, a case where the expansion unit 1b is a communication unit capable of performing data communication with another external device will be described. Of course, it goes without saying that the functions may not be distributed between the CPU unit 1a and the expansion unit 1b, and may be composed of a single PLC1.

図2に示すように、本発明の実施の形態1に係るPLC1のプログラム実行部102は、プログラムメモリ(プログラム記憶部)103に記憶されているラダープログラム8に基づいて、デバイスメモリ(デバイス記憶部)104を参照して演算処理を実行し、演算処理結果をデバイスメモリ104に記憶する。なお、デバイスメモリ104には、他の外部機器から取得したデータが記憶されている。 As shown in FIG. 2, the program execution unit 102 of the PLC 1 according to the first embodiment of the present invention is a device memory (device storage unit) based on the ladder program 8 stored in the program memory (program storage unit) 103. ) 104, the arithmetic processing is executed, and the arithmetic processing result is stored in the device memory 104. The device memory 104 stores data acquired from other external devices.

記憶されているラダープログラム8は、複数の命令コードからなり、シーケンス制御の手順を規定しているプログラムである。ラダープログラム8は、図示しないプログラム作成装置を用いてユーザによって作成され、PLC1へ転送されている。 The stored ladder program 8 is a program composed of a plurality of instruction codes and defining a sequence control procedure. The ladder program 8 is created by a user using a program creation device (not shown) and transferred to PLC1.

プログラム実行部102は、記憶されているラダープログラム8に基づいて演算処理を実行する。演算処理は、デバイスメモリ104を参照して行われ、演算処理結果もデバイスメモリ104に記憶される。運用モード時には、プログラム実行部102によって、ラダープログラム8が周期的に繰り返し実行される。ラダープログラム8を1回実行することを「スキャン」と呼び、運用モード中はラダープログラム8のスキャンが繰り返される。一方、非運用モード時には、ラダープログラム8のスキャンは停止される。 The program execution unit 102 executes arithmetic processing based on the stored ladder program 8. The arithmetic processing is performed with reference to the device memory 104, and the arithmetic processing result is also stored in the device memory 104. In the operation mode, the ladder program 8 is periodically and repeatedly executed by the program execution unit 102. Executing the ladder program 8 once is called "scan", and the scan of the ladder program 8 is repeated during the operation mode. On the other hand, in the non-operation mode, the scan of the ladder program 8 is stopped.

デバイスメモリ104は、記憶領域が複数の小領域に分割されている。分割された小領域を「デバイス」と呼び、1つのデバイスは、通常、1ビット又は1ワード若しくは複数ワードの記憶容量からなる。換言すれば、例えばオン/オフのように1ビットのデバイス値を記憶する記憶領域(仮想記憶領域)であるデバイスをリレーデバイスと呼び(ビットデバイスとも呼ぶ)、アナログ値‘150’のように1ワード若しくは複数ワードのデバイス値(アナログ値)を記憶する記憶領域(仮想記憶領域)であるデバイスをワードデバイスと呼ぶ。ラダープログラム8には、参照すべきデバイスが記述されているとともに、デバイスに格納されたデータ(デバイス値)に関する演算処理が記述されている。つまり、ラダープログラム8には、デバイスメモリ104からデバイス値を読み出し、読み出したデバイス値に基づいて演算処理を行い、演算結果をデバイスメモリ104にデバイス値として書き込む手順が記述されている。 The storage area of the device memory 104 is divided into a plurality of small areas. The divided small area is called a "device", and one device usually has a storage capacity of one bit or one word or a plurality of words. In other words, a device that is a storage area (virtual storage area) that stores a 1-bit device value such as on / off is called a relay device (also called a bit device), and 1 such as an analog value '150'. A device that is a storage area (virtual storage area) that stores a word or a device value (analog value) of a plurality of words is called a word device. In the ladder program 8, the device to be referred to is described, and the arithmetic processing related to the data (device value) stored in the device is described. That is, the ladder program 8 describes a procedure of reading a device value from the device memory 104, performing arithmetic processing based on the read device value, and writing the arithmetic result to the device memory 104 as a device value.

まず、ラダープログラム8による通信テストの実行手順について説明する。CPUユニット1aのプログラム実行部102は、トリガ受付部101からのプログラム開始トリガを受信し、ラダープログラム8による通信テストの実行を開始する。ラダープログラム8は、デバイスメモリ104、バスマスタ106を通じて、拡張ユニットである通信ユニット1bのバススレーブ107を介して第一のコマンド管理部110へ通信テストの開始を通知する。 First, the procedure for executing the communication test by the ladder program 8 will be described. The program execution unit 102 of the CPU unit 1a receives the program start trigger from the trigger reception unit 101, and starts executing the communication test by the ladder program 8. The ladder program 8 notifies the first command management unit 110 of the start of the communication test through the device memory 104 and the bus master 106 via the bus slave 107 of the communication unit 1b which is an expansion unit.

第一のコマンド管理部110は、第一のコマンド生成部111に対してコマンド生成の開始を通知する。第一のコマンド生成部111は、バススレーブ107、バスマスタ106を介してデバイスメモリ104のデバイス値を取得し、設定データ記憶部115からフレーム定義等の設定データを取得して、コマンドの生成を行う。記憶されている設定データは、外部機器3(4)に対するコマンドのフレーム定義、及びフレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を含む。 The first command management unit 110 notifies the first command generation unit 111 of the start of command generation. The first command generation unit 111 acquires the device value of the device memory 104 via the bus slave 107 and the bus master 106, acquires the setting data such as the frame definition from the setting data storage unit 115, and generates a command. .. The stored setting data includes the frame definition of the command for the external device 3 (4) and the allocation information in which the device is assigned to the element included in the frame definition.

図3は、本発明の実施の形態1に係る通信テスト支援装置2と接続されているPLC1で生成される通信コマンドの例示図である。図3の例では、コマンドは数字列として構成されており、複数のデータブロックで構成されている。データブロックは、図3の例では、最初の2桁を局番部31、次の2桁をコマンド種類部32、次の4桁を読み出し先頭アドレス部33、次の4桁を読み出し点数部34、最後の2桁をチェックコード部35として構成されている。 FIG. 3 is an example diagram of a communication command generated by the PLC1 connected to the communication test support device 2 according to the first embodiment of the present invention. In the example of FIG. 3, the command is composed of a sequence of numbers and is composed of a plurality of data blocks. In the example of FIG. 3, in the example of FIG. 3, the first two digits are the station code part 31, the next two digits are the command type part 32, the next four digits are read from the start address part 33, and the next four digits are read from the point number part 34. The last two digits are configured as the check code unit 35.

図2に戻って、コマンドの生成が完了した後、第一のコマンド発行部112は、通信部108へコマンドの発行を通知して、通信部108は、ユニットの通信設定に関する情報等を含む通信設定データを通信設定部109から取得して、外部機器3、4等へコマンドを発行する。 Returning to FIG. 2, after the command generation is completed, the first command issuing unit 112 notifies the communication unit 108 of the issuance of the command, and the communication unit 108 communicates including information regarding the communication settings of the unit. The setting data is acquired from the communication setting unit 109, and a command is issued to the external devices 3, 4, and the like.

通信部108は、外部機器3、4等から通信テストの実行結果に関する情報を受信し、第一のコマンド受信部113へ渡す。第一のコマンド受信部113で受信された実行結果に関する情報は、第一のコマンド解釈部114において、設定データ記憶部115を参照しながら解釈され、解釈された実行結果に関する情報は、バススレーブ107、バスマスタ106を介してデバイスメモリ104に記憶される。 The communication unit 108 receives information on the execution result of the communication test from the external devices 3, 4, and the like, and passes it to the first command reception unit 113. The information about the execution result received by the first command receiving unit 113 is interpreted by the first command interpreting unit 114 with reference to the setting data storage unit 115, and the information about the interpreted execution result is the bus slave 107. , Stored in the device memory 104 via the bus master 106.

図4は、本発明の実施の形態1に係る通信テスト支援装置2と接続されているPLC1のCPUユニット1aのCPU10の処理手順を示すフローチャートである。図4に示すように、CPUユニット1aのCPU10は、プログラム開始トリガを受信したか否かを判断する(ステップS401)。 FIG. 4 is a flowchart showing a processing procedure of the CPU 10 of the CPU unit 1a of the PLC1 connected to the communication test support device 2 according to the first embodiment of the present invention. As shown in FIG. 4, the CPU 10 of the CPU unit 1a determines whether or not the program start trigger has been received (step S401).

CPU10が、プログラム開始トリガを受信していないと判断した場合(ステップS401:NO)、CPU10は、受信待ち状態となる。CPU10が、プログラム開始トリガを受信したと判断した場合(ステップS401:YES)、CPU10は、ラダープログラム8の実行を開始する(ステップS402)。CPI10は、拡張ユニットである通信ユニット1bへ、通信テストの実行開始を通知する(ステップS403)。 When the CPU 10 determines that the program start trigger has not been received (step S401: NO), the CPU 10 is in the reception waiting state. When the CPU 10 determines that the program start trigger has been received (step S401: YES), the CPU 10 starts executing the ladder program 8 (step S402). The CPI 10 notifies the communication unit 1b, which is an expansion unit, of the start of execution of the communication test (step S403).

CPU10は、通信ユニット1bから通信テストの実行結果に関する情報を、コマンドの解釈結果として受信し(ステップS404)、デバイスメモリ104に記憶する(ステップS405)。CPU10は、ラダープログラム8が終了したか否かを判断し(ステップS406)、CPU10が、ラダープログラム8が終了していないと判断した場合(ステップS406:NO)、CPU10は、処理をステップS402へ戻し、上述した処理を繰り返す。CPU10が、ラダープログラム8が終了したと判断した場合(ステップS406:YES)、CPU10は、処理を終了する。 The CPU 10 receives information regarding the execution result of the communication test from the communication unit 1b as a command interpretation result (step S404) and stores it in the device memory 104 (step S405). The CPU 10 determines whether or not the ladder program 8 has ended (step S406), and when the CPU 10 determines that the ladder program 8 has not ended (step S406: NO), the CPU 10 processes the process to step S402. Return and repeat the above process. When the CPU 10 determines that the ladder program 8 has ended (step S406: YES), the CPU 10 ends the process.

図5は、本発明の実施の形態1に係る通信テスト支援装置2と接続されているPLC1の通信ユニット1bの処理手順を示すフローチャートである。図5に示すように、通信ユニット1bは、通信テストの実行開始の通知を受信したか否かを判断する(ステップS501)。 FIG. 5 is a flowchart showing a processing procedure of the communication unit 1b of the PLC1 connected to the communication test support device 2 according to the first embodiment of the present invention. As shown in FIG. 5, the communication unit 1b determines whether or not the notification of the start of execution of the communication test has been received (step S501).

通信ユニット1bが、通信テストの実行開始の通知を受信していないと判断した場合(ステップS501:NO)、通信ユニット1bは、受信待ち状態となる。通信ユニット1bが、通信テストの実行開始の通知を受信したと判断した場合(ステップS501:YES)、通信ユニット1bは、デバイスメモリ104のデバイス値を取得する(ステップS502)。 When it is determined that the communication unit 1b has not received the notification of the start of execution of the communication test (step S501: NO), the communication unit 1b is in the reception waiting state. When the communication unit 1b determines that the notification of the start of execution of the communication test has been received (step S501: YES), the communication unit 1b acquires the device value of the device memory 104 (step S502).

通信ユニット1bは、フレーム定義等の設定データを取得して(ステップS503)、コマンドの生成を行う(ステップS504)。通信ユニット1bは、外部機器3、4等へコマンドを発行する(ステップS505)。 The communication unit 1b acquires setting data such as a frame definition (step S503) and generates a command (step S504). The communication unit 1b issues a command to the external devices 3, 4, and the like (step S505).

通信ユニット1bは、外部機器3、4等から通信テストの実行結果に関する情報を受信し(ステップS506)、受信された通信テストの実行結果に関する情報を解釈する(ステップS507)。通信ユニット1bは、解釈された通信テストの実行結果に関する情報をCPUユニット1aへ転送する(ステップS508)。転送された通信テストの実行結果に関する情報は、CPUユニット1aのデバイスメモリ104に記憶される。 The communication unit 1b receives information regarding the execution result of the communication test from the external devices 3, 4, and the like (step S506), and interprets the received information regarding the execution result of the communication test (step S507). The communication unit 1b transfers the information regarding the execution result of the interpreted communication test to the CPU unit 1a (step S508). The information regarding the execution result of the transferred communication test is stored in the device memory 104 of the CPU unit 1a.

上述のようにPLC1でラダープログラム8に沿って通信テストを行う場合、ラダープログラム8を外部のコンピュータ等で生成しておき、PLC1へ転送しておく必要がある。それに対して、本実施の形態1では、ユーザによる操作に応じてコマンドを生成して、生成されたコマンドを所望のタイミングで発行することによっても通信テストを行うことができる点に特徴を有する。 When a communication test is performed on the PLC1 according to the ladder program 8 as described above, it is necessary to generate the ladder program 8 on an external computer or the like and transfer it to the PLC1. On the other hand, the first embodiment is characterized in that a communication test can be performed by generating a command in response to an operation by the user and issuing the generated command at a desired timing.

図6は、本発明の実施の形態1に係る通信テスト支援装置2の、CPU等の制御部を用いた場合の構成を示すブロック図である。図6に示すように、本実施の形態1に係る通信テスト支援装置2は、少なくとも制御部(CPU)21、メモリ22、ハードディスク等の記憶装置23、I/Oインタフェース24、ビデオインタフェース25、通信インタフェース26、可搬型ディスクドライブ27及び上述したハードウェアを接続する内部バス28で構成されている。 FIG. 6 is a block diagram showing a configuration of the communication test support device 2 according to the first embodiment of the present invention when a control unit such as a CPU is used. As shown in FIG. 6, the communication test support device 2 according to the first embodiment has at least a control unit (CPU) 21, a memory 22, a storage device 23 such as a hard disk, an I / O interface 24, a video interface 25, and communication. It consists of an interface 26, a portable disk drive 27, and an internal bus 28 that connects the above-mentioned hardware.

制御部21は、内部バス28を介して通信テスト支援装置2の上述したようなハードウェア各部と接続されており、上述したハードウェア各部の動作を制御するとともに、記憶装置23に記憶しているコンピュータプログラム100に従って、種々のソフトウェア的機能を実行する。メモリ22は、SRAM、SDRAM等の揮発性メモリで構成され、コンピュータプログラム100の実行時にロードモジュールが展開され、コンピュータプログラム100の実行時に発生する一時的なデータ等を記憶する。また、メモリ22は記憶領域が、PLC1のデバイスと同じ大きさの複数の小領域(以下、デバイス)に分割されている。 The control unit 21 is connected to each of the above-mentioned hardware parts of the communication test support device 2 via the internal bus 28, controls the operation of each of the above-mentioned hardware parts, and stores the operation in the storage device 23. Various software functions are executed according to the computer program 100. The memory 22 is composed of volatile memories such as SRAM and SDRAM, and a load module is expanded when the computer program 100 is executed to store temporary data and the like generated when the computer program 100 is executed. Further, the storage area of the memory 22 is divided into a plurality of small areas (hereinafter, devices) having the same size as the device of the PLC1.

記憶装置23は、内蔵される固定型記憶装置(ハードディスク)、ROM等で構成されている。記憶装置23に記憶しているコンピュータプログラム100は、プログラム及びデータ等の情報を記録したDVD、CD−ROM等の可搬型記録媒体90から、可搬型ディスクドライブ27によりダウンロードされ、実行時には記憶装置23からメモリ22へ展開して実行される。もちろん、通信インタフェース26を介してネットワークに接続されている外部のコンピュータからダウンロードされたコンピュータプログラムであっても良い。 The storage device 23 is composed of a built-in fixed storage device (hard disk), a ROM, and the like. The computer program 100 stored in the storage device 23 is downloaded by the portable disk drive 27 from a portable recording medium 90 such as a DVD or CD-ROM in which information such as a program and data is recorded, and is stored in the storage device 23 at the time of execution. Is expanded to the memory 22 and executed. Of course, it may be a computer program downloaded from an external computer connected to the network via the communication interface 26.

I/Oインタフェース24は、キーボード241、マウス242等の入力装置と接続され、データの入力を受け付ける。また、ビデオインタフェース25は、CRTモニタ、LCD等の表示装置251と接続され、所定の画像を表示する。 The I / O interface 24 is connected to an input device such as a keyboard 241 and a mouse 242, and accepts data input. Further, the video interface 25 is connected to a display device 251 such as a CRT monitor and an LCD to display a predetermined image.

通信インタフェース26は内部バス28に接続されており、インターネット、LAN、WAN等の外部のネットワークに接続されることにより、又はUSBを介して接続されることにより、外部のコンピュータ等とデータ送受信することが可能となっている。また、通信線を介してPLC1へデータ送受信することが可能となっている。 The communication interface 26 is connected to the internal bus 28 and transmits / receives data to / from an external computer or the like by being connected to an external network such as the Internet, LAN, WAN, etc., or by being connected via USB. Is possible. In addition, it is possible to send and receive data to and from the PLC1 via a communication line.

図7は、本発明の実施の形態1に係る通信テスト支援装置2の機能を示す機能ブロック図である。図7において、通信テスト支援装置2のトリガ発行受付部203でトリガ発行を受け付け、通信テストの実行開始の通知を第二のコマンド管理部204へ送信する。第二のコマンド生成部211は、入力受付部202から接続先の設定情報、コマンドデータ等の設定データを取得して、コマンド生成を開始する。 FIG. 7 is a functional block diagram showing the functions of the communication test support device 2 according to the first embodiment of the present invention. In FIG. 7, the trigger issuance receiving unit 203 of the communication test support device 2 accepts the trigger issuance, and sends a notification of the start of execution of the communication test to the second command management unit 204. The second command generation unit 211 acquires setting data such as connection destination setting information and command data from the input reception unit 202, and starts command generation.

なお、設定データは、通信ユニット1bの設定データ記憶部に記憶しておいても良いし、通信テスト支援装置2に設定データ記憶部を備えていても良い。通信テスト支援装置2に記憶しておくことで、PLC1にアクセスすることなく通信テスト用のコマンドを生成することができ、所望のタイミングで通信テストを行うことができるからである。 The setting data may be stored in the setting data storage unit of the communication unit 1b, or the communication test support device 2 may be provided with the setting data storage unit. By storing it in the communication test support device 2, it is possible to generate a command for the communication test without accessing the PLC 1, and the communication test can be performed at a desired timing.

なお、入力受付部202で入力を受け付けるのは、数字であっても良いし、例えば文字列「ABCD」というようなコマンドそのものを示す文字列(英文字、アスキー文字、記号列等)であっても良い。この場合、入力を受け付けた文字列「ABCD」を、そのままコマンドとして生成して外部機器に送信する。 It should be noted that the input receiving unit 202 may accept an input by a number, for example, a character string (alphabet character, ASCII character, symbol string, etc.) indicating the command itself such as the character string "ABCD". Is also good. In this case, the character string "ABCD" that has received the input is generated as a command as it is and transmitted to the external device.

ただし、コマンドには、イーサネット(登録商標)接続における接続先、IPアドレス、シリアル通信接続におけるボーレート等の外部機器との接続条件を含んでも良い。また、入力を受け付けるのが文字列のみであったとしても、コマンドが生成される時点で、設定データとして含まれる接続先の情報であるIPアドレス等を付加した方が好ましい。 However, the command may include connection conditions with an external device such as a connection destination in an Ethernet (registered trademark) connection, an IP address, and a baud rate in a serial communication connection. Further, even if only a character string is accepted for input, it is preferable to add an IP address or the like which is information on the connection destination included as setting data when the command is generated.

この場合、例えば接続条件設定部206を別途設けておき、コマンド生成に必要となるイーサネット(登録商標)接続における接続先、IPアドレス、シリアル通信接続におけるボーレート等の外部機器との接続条件の設定を受け付けても良い。なお、接続先の情報を付加しなくても通信可能である場合(例えばRS232通信等)には、これを省略することもできる。 In this case, for example, a connection condition setting unit 206 is separately provided to set connection conditions with an external device such as a connection destination for Ethernet (registered trademark) connection, an IP address, and a baud rate for serial communication connection, which are required for command generation. You may accept it. If communication is possible without adding information on the connection destination (for example, RS232 communication), this can be omitted.

コマンドの生成が完了した後、第二のコマンド発行部212は、通信インタフェース205を介して、通信ユニット1bの通信部108へ生成されたコマンドを送信する。図2に示すように、通信ユニット1bの通信部108は、ユニットの通信設定に関する情報等を含む通信設定データを通信設定部109から取得して、外部機器3、4等へコマンドを発行する。 After the command generation is completed, the second command issuing unit 212 transmits the generated command to the communication unit 108 of the communication unit 1b via the communication interface 205. As shown in FIG. 2, the communication unit 108 of the communication unit 1b acquires communication setting data including information related to the communication setting of the unit from the communication setting unit 109, and issues a command to the external devices 3, 4, and the like.

通信ユニット1bの通信部108は、外部機器3、4等から実行結果に関する情報を受信し、通信インタフェース205を介して、第二のコマンド受信部213へ渡す。第二のコマンド受信部213で受信された通信テストの実行結果に関する情報は、第二のコマンド解釈部214において、設定データを参照しながら解釈され、解釈された通信テストの実行結果に関する情報は、表示部201に表示される。 The communication unit 108 of the communication unit 1b receives information on the execution result from the external devices 3, 4, and the like, and passes it to the second command reception unit 213 via the communication interface 205. The information regarding the execution result of the communication test received by the second command receiving unit 213 is interpreted by the second command interpreting unit 214 with reference to the setting data, and the information regarding the interpreted communication test execution result is It is displayed on the display unit 201.

なお、表示部201は、イーサネット(登録商標)接続における接続先、IPアドレス、シリアル通信接続におけるボーレート等の外部機器との接続条件を表示することができる。もちろん、通信テスト支援装置2の表示部201で、マルチウインドウで表示しても良いし、他の装置の表示装置で表示しても良い。 The display unit 201 can display connection conditions with an external device such as a connection destination in an Ethernet (registered trademark) connection, an IP address, and a baud rate in a serial communication connection. Of course, the display unit 201 of the communication test support device 2 may display in a multi-window, or may be displayed on the display device of another device.

図8は、本発明の実施の形態1に係る通信テスト支援装置2の制御部21の処理手順を示すフローチャートである。図8に示すように、通信テスト支援装置2の制御部21は、通信テストの実行開始トリガとしてのトリガ発行を受け付け(ステップS801)、通信テストの実行開始の通知を第二のコマンド管理部204へ送信する。 FIG. 8 is a flowchart showing a processing procedure of the control unit 21 of the communication test support device 2 according to the first embodiment of the present invention. As shown in FIG. 8, the control unit 21 of the communication test support device 2 accepts the trigger issuance as the execution start trigger of the communication test (step S801), and notifies the execution start of the communication test to the second command management unit 204. Send to.

制御部21は、接続先の設定情報、コマンドデータ等の設定データの入力を受け付ける(ステップS802)。制御部21は、入力を受け付けた設定データに基づいて、コマンド生成を開始する(ステップS803)。制御部21は、生成されたコマンドを、CPUユニット1aへ送信する。 The control unit 21 receives input of setting data such as connection destination setting information and command data (step S802). The control unit 21 starts command generation based on the input setting data (step S803). The control unit 21 transmits the generated command to the CPU unit 1a.

制御部21は、CPUユニット1aから、外部機器3、4等から通信テストの実行結果に関する情報を受信する(ステップS804)。制御部21は、受信された通信テストの実行結果に関する情報を、設定データを参照しながら解釈し(ステップS805)、解釈された通信テストの実行結果に関する情報を表示する(ステップS806)。 The control unit 21 receives information regarding the execution result of the communication test from the CPU unit 1a from the external devices 3, 4, and the like (step S804). The control unit 21 interprets the received information regarding the execution result of the communication test with reference to the setting data (step S805), and displays the information regarding the interpreted execution result of the communication test (step S806).

図9は、本発明の実施の形態1に係る通信テスト支援装置2と接続されているPLC1のCPUユニット1a及び通信ユニット1bの処理手順を示すフローチャートである。図9に示すように、CPUユニット1aは、生成されたコマンドを受信し(ステップS901)、通信ユニット1bの通信部108へ渡す。 FIG. 9 is a flowchart showing a processing procedure of the CPU unit 1a and the communication unit 1b of the PLC1 connected to the communication test support device 2 according to the first embodiment of the present invention. As shown in FIG. 9, the CPU unit 1a receives the generated command (step S901) and passes it to the communication unit 108 of the communication unit 1b.

通信ユニット1bは、ユニットの通信設定に関する情報等を含む通信設定データを取得して(ステップS902)、外部機器3、4等へコマンドを発行する(ステップS903)。通信ユニット1bは、外部機器3、4等から通信テストの実行結果に関する情報を受信し(ステップS904)、通信テスト支援装置2へ送信する(ステップS905)。 The communication unit 1b acquires communication setting data including information related to the communication settings of the unit (step S902), and issues a command to the external devices 3, 4, and the like (step S903). The communication unit 1b receives information regarding the execution result of the communication test from the external devices 3, 4 and the like (step S904), and transmits the information to the communication test support device 2 (step S905).

図10は、本発明の実施の形態1に係る通信テスト支援装置2の設定画面の例示図である。図10において、接続先設定領域151においては、コマンドを送信する送信先である外部機器3(4)のIPアドレス及びポート番号の設定を受け付ける。 FIG. 10 is an example diagram of a setting screen of the communication test support device 2 according to the first embodiment of the present invention. In FIG. 10, the connection destination setting area 151 accepts the setting of the IP address and the port number of the external device 3 (4) to which the command is transmitted.

送信データ設定領域153においては、送信データとして生成されたコマンドを設定する。図10の例では、送信データとして16進数の‘4D 30 0D’を設定している。この状態で実行ボタン152の選択を受け付けるとコマンドが発行されて、通信テストが実行される。 In the transmission data setting area 153, a command generated as transmission data is set. In the example of FIG. 10, the hexadecimal number '4D 300D' is set as the transmission data. When the selection of the execution button 152 is accepted in this state, a command is issued and the communication test is executed.

そして、受信結果表示領域154において、受信した通信テストの実行結果に関する情報を表示する。図10の例では、通信テストの実行結果に関する情報として16進数の‘4F 4B 0D 0A’を受信している。 Then, in the reception result display area 154, information regarding the execution result of the received communication test is displayed. In the example of FIG. 10, the hexadecimal number ‘4F 4B 0D 0A’ is received as the information regarding the execution result of the communication test.

なお、PLC1でコマンドを生成するのか、通信テスト支援装置2でコマンドを生成するのかは、コマンドのヘッダ情報で制御すればよい。図11は、本発明の実施の形態1に係る通信テスト支援装置2の通信テストのコマンドのデータ構成の例示図である。 Whether the command is generated by the PLC 1 or the communication test support device 2 may be controlled by the header information of the command. FIG. 11 is an example diagram of a data structure of a communication test command of the communication test support device 2 according to the first embodiment of the present invention.

図11において、通信テスト支援装置2の第二のコマンド生成部211で生成されたコマンド1102には、ヘッダ情報1101として拡張ユニット(通信ユニット)1bを特定する情報が設定されている。一方、通信ユニット1bの第一のコマンド生成部111で生成されたコマンドには、ヘッダ情報が付加されない。 In FIG. 11, in the command 1102 generated by the second command generation unit 211 of the communication test support device 2, information for identifying the expansion unit (communication unit) 1b is set as the header information 1101. On the other hand, header information is not added to the command generated by the first command generation unit 111 of the communication unit 1b.

これにより、通信ユニット1bにおいてヘッダ情報を読み取ることで、第一のコマンド生成部111で生成されたコマンドか、あるいは第二のコマンド生成部211で生成されたコマンドかを区別することができ、外部機器3(4)に対してコマンドを発行した後、通信テストの実行結果に関する情報を第二のコマンド受信部213に返すことが可能となる。 As a result, by reading the header information in the communication unit 1b, it is possible to distinguish between the command generated by the first command generation unit 111 and the command generated by the second command generation unit 211. After issuing the command to the device 3 (4), it is possible to return the information regarding the execution result of the communication test to the second command receiving unit 213.

以上のように本実施の形態1によれば、ラダープログラムを作成することなく、コマンドを動的に生成しながら通信テストを行うこともできるので、ユーザ所望の通信テストを容易かつ簡潔に行うことが可能となる。また、通信エラーが発生した場合に、ラダープログラムを実行させないときには通信コマンドのチェックのみで確認することができ、エラー対処時間を短縮することも可能となる。 As described above, according to the first embodiment, the communication test can be performed while dynamically generating commands without creating a ladder program, so that the communication test desired by the user can be easily and concisely performed. Is possible. Further, when a communication error occurs, when the ladder program is not executed, it can be confirmed only by checking the communication command, and the error handling time can be shortened.

なお、上述した実施の形態1では、PLC1をCPUユニット1aと拡張ユニット(通信ユニット)1bとで構成しているが、特にこれに限定されるものではなく、CPUユニット1a単体で両方のユニットの機能を実現しても同様の効果が期待できる。また、設定データ記憶部についても、PLC1だけでなく、通信テスト支援装置2にも備えても良い。 In the first embodiment described above, the PLC1 is composed of the CPU unit 1a and the expansion unit (communication unit) 1b, but the present invention is not particularly limited to this, and the CPU unit 1a alone is used for both units. The same effect can be expected even if the function is realized. Further, the setting data storage unit may be provided not only in the PLC 1 but also in the communication test support device 2.

(実施の形態2)
本発明の実施の形態2に係る通信テスト支援装置を用いた、PLCシステムの構成は、実施の形態1と同様であることから、同一の符号を付することで詳細な説明は省略する。本実施の形態2では、第二のコマンド管理部130(204)をPLC1のCPUユニット1aに備える点で実施の形態1と相違する。
(Embodiment 2)
Since the configuration of the PLC system using the communication test support device according to the second embodiment of the present invention is the same as that of the first embodiment, detailed description thereof will be omitted by adding the same reference numerals. The second embodiment is different from the first embodiment in that the second command management unit 130 (204) is provided in the CPU unit 1a of the PLC1.

図12は、本発明の実施の形態2に係る通信テスト支援装置2と接続されているPLC1の構成例を示すブロック図である。本実施の形態2に係るPLC1は、CPUユニット1aと拡張ユニット(通信ユニット)1bとで構成されている。CPUユニット1aと拡張ユニット1bとで機能を分散することにより、CPUユニット1aの処理負荷を大きく低減することが可能となる。 FIG. 12 is a block diagram showing a configuration example of PLC1 connected to the communication test support device 2 according to the second embodiment of the present invention. The PLC1 according to the second embodiment is composed of a CPU unit 1a and an expansion unit (communication unit) 1b. By distributing the functions between the CPU unit 1a and the expansion unit 1b, it is possible to greatly reduce the processing load of the CPU unit 1a.

拡張ユニット1bの種類は、特に限定されるものではない。本実施の形態1では、拡張ユニット1bが、他の外部機器とデータ通信を行うことができる通信ユニットである場合について説明する。もちろん、CPUユニット1aと拡張ユニット1bとで機能を分散せず、単体のPLC1で構成されていても良いことは言うまでもない。 The type of expansion unit 1b is not particularly limited. In the first embodiment, a case where the expansion unit 1b is a communication unit capable of performing data communication with another external device will be described. Of course, it goes without saying that the functions may not be distributed between the CPU unit 1a and the expansion unit 1b, and may be composed of a single PLC1.

図12に示すように、本発明の実施の形態2に係るPLC1のプログラム実行部102は、プログラムメモリ(プログラム記憶部)103に記憶されているラダープログラム8に基づいて、デバイスメモリ(デバイス記憶部)104を参照して演算処理を実行し、演算処理結果をデバイスメモリ104に記憶する。なお、デバイスメモリ104には、外部機器から取得したデータが記憶されている。 As shown in FIG. 12, the program execution unit 102 of the PLC1 according to the second embodiment of the present invention is a device memory (device storage unit) based on the ladder program 8 stored in the program memory (program storage unit) 103. ) 104, the arithmetic processing is executed, and the arithmetic processing result is stored in the device memory 104. The device memory 104 stores data acquired from an external device.

記憶されているラダープログラム8は、複数の命令コードからなり、シーケンス制御の手順を規定しているプログラムである。ラダープログラム8は、図示しないプログラム作成装置を用いてユーザによって作成され、PLC1へ転送されている。 The stored ladder program 8 is a program composed of a plurality of instruction codes and defining a sequence control procedure. The ladder program 8 is created by a user using a program creation device (not shown) and transferred to PLC1.

プログラム実行部102は、記憶されているラダープログラム8に基づいて演算処理を実行する。演算処理は、デバイスメモリ104を参照して行われ、演算処理結果もデバイスメモリ104に記憶される。運用モード時には、プログラム実行部102によって、ラダープログラム8が周期的に繰り返し実行される。ラダープログラム8を1回実行することを「スキャン」と呼び、運用モード中はラダープログラム8のスキャンが繰り返される。一方、非運用モード時には、ラダープログラム8のスキャンは停止される。 The program execution unit 102 executes arithmetic processing based on the stored ladder program 8. The arithmetic processing is performed with reference to the device memory 104, and the arithmetic processing result is also stored in the device memory 104. In the operation mode, the ladder program 8 is periodically and repeatedly executed by the program execution unit 102. Executing the ladder program 8 once is called "scan", and the scan of the ladder program 8 is repeated during the operation mode. On the other hand, in the non-operation mode, the scan of the ladder program 8 is stopped.

デバイスメモリ104は、記憶領域が複数の小領域に分割されている。分割された小領域を「デバイス」と呼び、1つのデバイスは、通常、1ビット又は1ワード若しくは複数ワードの記憶容量からなる。換言すれば、例えばオン/オフのように1ビットのデバイス値を記憶する記憶領域(仮想記憶領域)であるデバイスをリレーデバイスと呼び(ビットデバイスとも呼ぶ)、アナログ値‘150’のように1ワード若しくは複数ワードのデバイス値(アナログ値)を記憶する記憶領域(仮想記憶領域)であるデバイスをワードデバイスと呼ぶ。ラダープログラム8には、参照すべきデバイスが記述されているとともに、デバイスに格納されたデータ(デバイス値)に関する演算処理が記述されている。つまり、ラダープログラム8には、デバイスメモリ104からデバイス値を読み出し、読み出したデバイス値に基づいて演算処理を行い、演算結果をデバイスメモリ104にデバイス値として書き込む手順が記述されている。 The storage area of the device memory 104 is divided into a plurality of small areas. The divided small area is called a "device", and one device usually has a storage capacity of one bit or one word or a plurality of words. In other words, a device that is a storage area (virtual storage area) that stores a 1-bit device value such as on / off is called a relay device (also called a bit device), and 1 such as an analog value '150'. A device that is a storage area (virtual storage area) that stores a word or a device value (analog value) of a plurality of words is called a word device. In the ladder program 8, the device to be referred to is described, and the arithmetic processing related to the data (device value) stored in the device is described. That is, the ladder program 8 describes a procedure of reading a device value from the device memory 104, performing arithmetic processing based on the read device value, and writing the arithmetic result to the device memory 104 as a device value.

ラダープログラム8による通信テストの実行手順については、実施の形態1と同様であることから、詳細な説明は省略する。本実施の形態2でも、ユーザによる操作に応じてコマンドを生成して、生成されたコマンドを所望のタイミングで発行することによっても通信テストを行うことができる。 Since the procedure for executing the communication test by the ladder program 8 is the same as that in the first embodiment, detailed description thereof will be omitted. Also in the second embodiment, the communication test can be performed by generating a command in response to an operation by the user and issuing the generated command at a desired timing.

本実施の形態2では、実施の形態1とは異なり、第二のコマンド管理部130をCPUユニット1aに備えている。図13は、本発明の実施の形態2に係る通信テスト支援装置2の機能を示す機能ブロック図である。 In the second embodiment, unlike the first embodiment, the CPU unit 1a is provided with the second command management unit 130. FIG. 13 is a functional block diagram showing the functions of the communication test support device 2 according to the second embodiment of the present invention.

図12及び図13において、通信テスト支援装置2のトリガ発行受付部203でトリガ発行を受け付け、通信インタフェース205、105を介して、通信テストの実行開始の通知をCPUユニット1aの第二のコマンド管理部130へ送信する。CPUユニット1aにおいて、第二のコマンド生成部131は、通信テスト支援装置2の入力受付部202から、通信インタフェース205、105を介して接続先の設定情報、コマンドデータ等の設定データを取得して、コマンド生成を開始する。 In FIGS. 12 and 13, the trigger issuance receiving unit 203 of the communication test support device 2 accepts the trigger issuance, and the second command management of the CPU unit 1a notifies the start of execution of the communication test via the communication interfaces 205 and 105. It is transmitted to the unit 130. In the CPU unit 1a, the second command generation unit 131 acquires setting data such as connection destination setting information and command data from the input reception unit 202 of the communication test support device 2 via the communication interfaces 205 and 105. , Start command generation.

コマンドの生成が完了した後、第二のコマンド発行部132は、バスマスタ106、バススレーブ107を介して、通信ユニット1bの通信部108へ生成されたコマンドを送信する。通信部108は、ユニットの通信設定に関する情報等を含む通信設定データを通信設定部109から取得して、外部機器3、4等へコマンドを発行する。 After the command generation is completed, the second command issuing unit 132 transmits the generated command to the communication unit 108 of the communication unit 1b via the bus master 106 and the bus slave 107. The communication unit 108 acquires communication setting data including information related to the communication setting of the unit from the communication setting unit 109, and issues a command to the external devices 3, 4, and the like.

通信ユニット1bの通信部108は、外部機器3、4等から通信テストの実行結果に関する情報を受信し、バススレーブ107、バスマスタ106を介して、第二のコマンド受信部133へ渡す。第二のコマンド受信部133で受信された通信テストの実行結果に関する情報は、第二のコマンド解釈部134において、設定データを参照しながら解釈され、解釈された通信テストの実行結果に関する情報を通信インタフェース105、205を介して通信テスト支援装置2へ送信する。解釈された通信テストの実行結果に関する情報は、通信テスト支援装置2の表示部201に表示される。 The communication unit 108 of the communication unit 1b receives information on the execution result of the communication test from the external devices 3, 4, and the like, and passes it to the second command reception unit 133 via the bus slave 107 and the bus master 106. The information regarding the execution result of the communication test received by the second command receiving unit 133 is interpreted by the second command interpreting unit 134 with reference to the setting data, and the information regarding the interpreted communication test execution result is communicated. It is transmitted to the communication test support device 2 via the interfaces 105 and 205. Information about the interpreted communication test execution result is displayed on the display unit 201 of the communication test support device 2.

以上のように本実施の形態2によれば、ラダープログラムを作成することなく、コマンドを動的に生成しながら通信テストを行うこともできるので、ユーザ所望の通信テストを容易かつ簡潔に行うことが可能となる。また、通信エラーが発生した場合に、ラダープログラムを実行させないときには通信コマンドのチェックのみで確認することができ、エラー対処時間を短縮することも可能となる。 As described above, according to the second embodiment, the communication test can be performed while dynamically generating the command without creating the ladder program, so that the communication test desired by the user can be easily and concisely performed. Is possible. Further, when a communication error occurs, when the ladder program is not executed, it can be confirmed only by checking the communication command, and the error handling time can be shortened.

なお、上述した実施の形態2では、設定データ記憶部135をCPUユニット1aにも備えているが、もちろん通信ユニット1bだけに備えていても良い。この場合、設定データを必要とするときには、CPUユニット1aと通信ユニット1bとの間で設定データをデータ通信する。 In the second embodiment described above, the setting data storage unit 135 is also provided in the CPU unit 1a, but of course, it may be provided only in the communication unit 1b. In this case, when the setting data is required, the setting data is data-communicated between the CPU unit 1a and the communication unit 1b.

(実施の形態3)
本発明の実施の形態3に係る通信テスト支援装置2を用いた、PLCシステムの構成は、実施の形態1と同様であることから、同一の符号を付することで詳細な説明は省略する。本実施の形態3では、第二のコマンド管理部204で生成された通信テストに用いるコマンドに基づいて、ラダープログラム8を表示出力する点で実施の形態1及び2と相違する。表示出力されたラダープログラム8は、運用モードにおいてCPUユニット1aにより実行されても良い。また、表示出力されたフレーム定義やフローも同様に、運用モードにおいて実行されても良い。
(Embodiment 3)
Since the configuration of the PLC system using the communication test support device 2 according to the third embodiment of the present invention is the same as that of the first embodiment, detailed description thereof will be omitted by adding the same reference numerals. The third embodiment is different from the first and second embodiments in that the ladder program 8 is displayed and output based on the command used for the communication test generated by the second command management unit 204. The displayed and output ladder program 8 may be executed by the CPU unit 1a in the operation mode. Further, the frame definition and the flow that are displayed and output may also be executed in the operation mode.

表示出力の形式としては、(1)ラダープログラム8の表示出力、(2)ラダープログラム8及びフレーム定義の表示出力、(3)ラダープログラム8のフローの表示出力、(4)ラダープログラム8のフロー及びフレーム定義の表示出力の4種類の表示出力方法が考えられる。図14は、本発明の実施の形態3に係る通信テスト支援装置2のラダープログラム8の表示出力指定画面の例示図である。 The display output formats are (1) display output of ladder program 8, (2) display output of ladder program 8 and frame definition, (3) display output of flow of ladder program 8, and (4) flow of ladder program 8. And four types of display output methods of frame definition display output can be considered. FIG. 14 is an example diagram of a display output designation screen of the ladder program 8 of the communication test support device 2 according to the third embodiment of the present invention.

図14の例では、表示出力指定領域1401に、出力ボタン1402が表示されている。ユーザが、出力ボタン1402を選択した場合、プルダウンメニュー1403が表示される。プルダウンメニューの中で、「ラダー」、「ラダー+フレーム定義」、「フロー」、「フロー+フレーム定義」の中から1つを選択することで、表示出力を形式(1)〜(4)に変更することができる。 In the example of FIG. 14, the output button 1402 is displayed in the display output designated area 1401. When the user selects the output button 1402, the pull-down menu 1403 is displayed. In the pull-down menu, select one from "Ladder", "Ladder + frame definition", "Flow", and "Flow + frame definition" to convert the display output to formats (1) to (4). Can be changed.

例えば、ユーザが「ラダー」を選択した場合、発行されたコマンドに対応したラダープログラム8が表示出力される。表示出力されるのは、通信先であるIPアドレス等の設定を行うラダー、プロトコル設定を行うラダー、コマンドのバイト列を送信するラダー、受信するラダー、クローズを行うラダー等を表示出力する。 For example, when the user selects "ladder", the ladder program 8 corresponding to the issued command is displayed and output. The display and output are a ladder for setting the IP address and the like of the communication destination, a ladder for setting the protocol, a ladder for transmitting a byte string of a command, a ladder for receiving, a ladder for closing, and the like.

また、「ラダー+フレーム定義」が選択された場合、ラダープログラム8に加えてフレーム定義も表示出力する。図15は、本発明の実施の形態3に係る通信テスト支援装置2のラダープログラム8及びフレーム定義の表示出力画面の例示図である。 When "ladder + frame definition" is selected, the frame definition is also displayed and output in addition to the ladder program 8. FIG. 15 is an example diagram of a display output screen of the ladder program 8 and the frame definition of the communication test support device 2 according to the third embodiment of the present invention.

図15に示すように、フレーム定義表示領域1502にフレーム定義を表示出力する。そして、表示されているフレーム定義を実行するラダーをラダープログラム表示領域1501に表示出力する。 As shown in FIG. 15, the frame definition is displayed and output in the frame definition display area 1502. Then, the ladder that executes the displayed frame definition is displayed and output to the ladder program display area 1501.

さらに、「フロー」が選択された場合、ラダープログラム8ではなく、処理のフローが表示出力される。図16は、本発明の実施の形態3に係る通信テスト支援装置2の処理のフローの表示出力画面の例示図である。図16の例では、処理のフロー表示領域1601に、追加された処理のフローが表示出力される。 Further, when "flow" is selected, the processing flow is displayed and output instead of the ladder program 8. FIG. 16 is an example diagram of a display output screen of the processing flow of the communication test support device 2 according to the third embodiment of the present invention. In the example of FIG. 16, the added processing flow is displayed and output in the processing flow display area 1601.

そして、「フロー+フレーム定義」が選択された場合、処理のフローだけでなくフレーム定義も表示出力される。図17は、本発明の実施の形態3に係る通信テスト支援装置2の処理のフロー及びフレーム定義の表示出力画面の例示図である。 Then, when "flow + frame definition" is selected, not only the processing flow but also the frame definition is displayed and output. FIG. 17 is an example diagram of a display output screen of the processing flow and frame definition of the communication test support device 2 according to the third embodiment of the present invention.

図17に示すように、フレーム定義表示領域1702にフレーム定義を表示出力する。そして、表示されているフレーム定義を実行する処理のフローを処理フロー表示領域1701に表示出力する。 As shown in FIG. 17, the frame definition is displayed and output in the frame definition display area 1702. Then, the flow of the process for executing the displayed frame definition is displayed and output to the process flow display area 1701.

以上のように本実施の形態3によれば、生成されたコマンドを発行した後に、対応するラダープログラムを出力するので、どういう通信テストを行って正常に終了したのかを目視で確認することができるとともに、通信テストを容易に再現することが可能となる。 As described above, according to the third embodiment, since the corresponding ladder program is output after issuing the generated command, it is possible to visually confirm what kind of communication test was performed and the result was completed normally. At the same time, the communication test can be easily reproduced.

なお、本発明は上記実施例に限定されるものではなく、本発明の趣旨の範囲内であれば多種の変更、改良等が可能である。例えば、上述した実施の形態1では、第一のコマンド管理部は通信ユニット1b(PLC1)に、第二のコマンド管理部は通信テスト支援装置2に、実施の形態2では、第一のコマンド管理部は通信ユニット1bに、第二のコマンド管理部はCPUユニット1aに、それぞれ備えているが、特にこれに限定されるものではなく、PLCシステムの中で別個に備えていれば良い。 The present invention is not limited to the above embodiment, and various changes and improvements can be made within the scope of the gist of the present invention. For example, in the first embodiment described above, the first command management unit is in the communication unit 1b (PLC1), the second command management unit is in the communication test support device 2, and in the second embodiment, the first command management. The unit is provided in the communication unit 1b, and the second command management unit is provided in the CPU unit 1a, but the present invention is not particularly limited to this, and the second command management unit may be provided separately in the PLC system.

1 PLC
1a CPUユニット
1b 拡張ユニット(通信ユニット)
2 通信テスト支援装置
10 CPU
21 制御部
22 メモリ
104 デバイスメモリ
1 PLC
1a CPU unit 1b Expansion unit (communication unit)
2 Communication test support device 10 CPU
21 Control unit 22 Memory 104 Device memory

Claims (20)

ユーザプログラムを記憶するプログラム記憶部と、
前記ユーザプログラムを繰り返し実行するプログラム実行部と、
前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、
外部機器とデータ通信することが可能に接続する通信部と、
該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、
デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部と
を備えるプログラマブルロジックコントローラと、
該プログラマブルロジックコントローラとデータ通信することが可能に接続されており、前記外部機器に対する通信テストを支援する通信テスト支援装置と
で構成されたプログラマブルロジックコントローラシステムにおいて、
前記通信テスト支援装置は、
前記外部機器との接続条件を表示する表示部と、
前記外部機器に対するコマンドに含まれる文字列の入力を受け付ける入力受付部と、
前記コマンドの発行トリガを受け付けるトリガ発行受付部と、
入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記コマンドの発行トリガを受け付けた場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第二のコマンド発行部と
を備えることを特徴とするプログラマブルロジックコントローラシステム。
A program storage unit that stores user programs and
A program execution unit that repeatedly executes the user program, and
A device storage unit having a device area to which the device described in the user program is allocated,
A communication unit that connects to enable data communication with external devices,
A setting data storage unit that stores the frame definition of the command for the external device and the allocation information assigned to the device for the element included in the frame definition as setting data.
A command for the external device is generated based on the device value of the device and the setting data stored in the setting data storage unit, and the program execution unit turns on the device corresponding to the command issuance trigger for the external device. A programmable logic controller including a first command issuing unit that issues a generated command to the external device connected to the communication unit in the event of a state.
In a programmable logic controller system that is connected to the programmable logic controller so as to be capable of data communication and is composed of a communication test support device that supports a communication test for the external device.
The communication test support device is
A display unit that displays connection conditions with the external device,
An input reception unit that accepts input of character strings included in commands for the external device,
A trigger issuance reception unit that accepts the issuance trigger of the command,
A command for the external device is generated based on the input character string, and when a command issuance trigger for the command is received, the generated command is issued to the external device connected to the communication unit. A programmable logic controller system characterized by having a second command issuing unit.
前記第二のコマンド発行部は、入力を受け付けた文字列と前記設定データ記憶部に予め記憶されている設定データとに基づいて、前記外部機器に対するコマンドを生成することを特徴とする請求項1に記載のプログラマブルロジックコントローラシステム。 The second command issuing unit is characterized in that it generates a command for the external device based on a character string that receives an input and setting data stored in advance in the setting data storage unit. Programmable logic controller system described in. 前記通信テスト支援装置は、
前記外部機器との接続条件を設定する接続条件設定部を備え、
前記第二のコマンド発行部は、入力を受け付けた文字列と前記接続条件設定部により設定された接続条件とに基づいて、前記外部機器に対するコマンドを生成することを特徴とする請求項1に記載のプログラマブルロジックコントローラシステム。
The communication test support device is
A connection condition setting unit for setting connection conditions with the external device is provided.
The second command issuing unit according to claim 1, wherein the second command issuing unit generates a command for the external device based on a character string that receives an input and a connection condition set by the connection condition setting unit. Programmable logic controller system.
前記通信テスト支援装置も、前記設定データ記憶部を備えており、
前記第二のコマンド発行部は、前記通信テスト支援装置の前記設定データ記憶部に記憶されている設定データに基づいて前記外部機器に対するコマンドを生成することを特徴とする請求項2に記載のプログラマブルロジックコントローラシステム。
The communication test support device also includes the setting data storage unit.
The programmable according to claim 2, wherein the second command issuing unit generates a command for the external device based on the setting data stored in the setting data storage unit of the communication test support device. Logic controller system.
前記通信テスト支援装置は、生成されたコマンドを発行した後に、対応するラダープログラムを出力することを特徴とする請求項1乃至4のいずれか一項に記載のプログラマブルロジックコントローラシステム。 The programmable logic controller system according to any one of claims 1 to 4, wherein the communication test support device outputs a corresponding ladder program after issuing a generated command. 前記プログラマブルロジックコントローラは、少なくともCPUユニットと通信ユニットとを含むことを特徴とする請求項1乃至5のいずれか一項に記載のプログラマブルロジックコントローラシステム。 The programmable logic controller system according to any one of claims 1 to 5, wherein the programmable logic controller includes at least a CPU unit and a communication unit. ユーザプログラムを記憶するプログラム記憶部と、
前記ユーザプログラムを繰り返し実行するプログラム実行部と、
前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、
外部機器とデータ通信することが可能に接続する通信部と、
該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、
デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部と
を備え、
前記外部機器に対する通信テストを支援する通信テスト支援装置とデータ通信することが可能に接続されており、
前記通信テスト支援装置において、前記外部機器に対するコマンドに含まれる文字列の入力を受け付け、入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記コマンドの発行トリガを受け付けた場合に発行されたコマンドを受信することを特徴とするプログラマブルロジックコントローラ。
A program storage unit that stores user programs and
A program execution unit that repeatedly executes the user program, and
A device storage unit having a device area to which the device described in the user program is allocated,
A communication unit that connects to enable data communication with external devices,
A setting data storage unit that stores the frame definition of the command for the external device and the allocation information assigned to the device for the element included in the frame definition as setting data.
A command for the external device is generated based on the device value of the device and the setting data stored in the setting data storage unit, and the program execution unit turns on the device corresponding to the command issuance trigger for the external device. It is provided with a first command issuing unit that issues a generated command to the external device connected to the communication unit when the state is reached.
It is connected to the communication test support device that supports the communication test for the external device so that it can perform data communication.
When the communication test support device accepts an input of a character string included in a command for the external device, generates a command for the external device based on the input-accepted character string, and receives a trigger for issuing the command. A programmable logic controller characterized by receiving commands issued to.
少なくともCPUユニットと通信ユニットとを含むことを特徴とする請求項7に記載のプログラマブルロジックコントローラ。 The programmable logic controller according to claim 7, wherein at least a CPU unit and a communication unit are included. ユーザプログラムを記憶するプログラム記憶部と、
前記ユーザプログラムを繰り返し実行するプログラム実行部と、
前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、
外部機器とデータ通信することが可能に接続する通信部と、
該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、
デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部と
を備えるプログラマブルロジックコントローラとデータ通信することが可能に接続されており、前記外部機器に対する通信テストを支援する通信テスト支援装置において、
前記外部機器との接続条件を表示する表示部と、
前記外部機器に対するコマンドに含まれる文字列の入力を受け付ける入力受付部と、
前記コマンドの発行トリガを受け付けるトリガ発行受付部と、
入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記コマンドの発行トリガを受け付けた場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第二のコマンド発行部と
を備えることを特徴とする通信テスト支援装置。
A program storage unit that stores user programs and
A program execution unit that repeatedly executes the user program, and
A device storage unit having a device area to which the device described in the user program is allocated,
A communication unit that connects to enable data communication with external devices,
A setting data storage unit that stores the frame definition of the command for the external device and the allocation information assigned to the device for the element included in the frame definition as setting data.
A command for the external device is generated based on the device value of the device and the setting data stored in the setting data storage unit, and the program execution unit turns on the device corresponding to the command issuance trigger for the external device. When a state occurs, it is connected to a programmable logic controller including a first command issuing unit that issues a generated command to the external device connected to the communication unit so that data communication can be performed. , In the communication test support device that supports the communication test for the external device,
A display unit that displays connection conditions with the external device,
An input reception unit that accepts input of character strings included in commands for the external device,
A trigger issuance reception unit that accepts the issuance trigger of the command,
A command for the external device is generated based on the input character string, and when a trigger for issuing the command is received, the generated command is issued to the external device connected to the communication unit. A communication test support device characterized by having a second command issuing unit.
前記第二のコマンド発行部は、入力を受け付けた文字列と前記設定データ記憶部に予め記憶されている設定データとに基づいて、前記外部機器に対するコマンドを生成することを特徴とする請求項9に記載の通信テスト支援装置。 9. The second command issuing unit is characterized in that it generates a command for the external device based on a character string that has received input and setting data that is stored in advance in the setting data storage unit. Communication test support device described in. 前記外部機器との接続条件を設定する接続条件設定部を備え、
前記第二のコマンド発行部は、入力を受け付けた文字列と前記接続条件設定部により設定された接続条件とに基づいて、前記外部機器に対するコマンドを生成することを特徴とする請求項9に記載の通信テスト支援装置。
A connection condition setting unit for setting connection conditions with the external device is provided.
The second command issuing unit according to claim 9, wherein the second command issuing unit generates a command for the external device based on the character string that receives the input and the connection condition set by the connection condition setting unit. Communication test support device.
前記設定データ記憶部を備えており、
前記第二のコマンド発行部は、前記通信テスト支援装置の前記設定データ記憶部に記憶されている設定データに基づいて前記外部機器に対するコマンドを生成することを特徴とする請求項10に記載の通信テスト支援装置。
It is equipped with the setting data storage unit.
The communication according to claim 10, wherein the second command issuing unit generates a command for the external device based on the setting data stored in the setting data storage unit of the communication test support device. Test support device.
生成されたコマンドを発行した後に、対応するラダープログラムを出力することを特徴とする請求項9乃至12のいずれか一項に記載の通信テスト支援装置。 The communication test support device according to any one of claims 9 to 12, wherein the corresponding ladder program is output after issuing the generated command. ユーザプログラムを記憶するプログラム記憶部と、
前記ユーザプログラムを繰り返し実行するプログラム実行部と、
前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、
外部機器とデータ通信することが可能に接続する通信部と、
該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、
デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部と
を備えるプログラマブルロジックコントローラと、
該プログラマブルロジックコントローラとデータ通信することが可能であり、前記外部機器に対する通信テストを支援する通信テスト支援装置と
で構成されたプログラマブルロジックコントローラシステムで実行することが可能な通信テスト支援方法において、
前記通信テスト支援装置は、
前記外部機器との接続条件を表示する工程と、
前記外部機器に対するコマンドに含まれる文字列の入力を受け付ける工程と、
前記コマンドの発行トリガを受け付ける工程と、
入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記コマンドの発行トリガを受け付けた場合に、前記外部機器に対して生成したコマンドを発行する工程と
を含むことを特徴とする通信テスト支援方法。
A program storage unit that stores user programs and
A program execution unit that repeatedly executes the user program, and
A device storage unit having a device area to which the device described in the user program is allocated,
A communication unit that connects to enable data communication with external devices,
A setting data storage unit that stores the frame definition of the command for the external device and the allocation information assigned to the device for the element included in the frame definition as setting data.
A command for the external device is generated based on the device value of the device and the setting data stored in the setting data storage unit, and the program execution unit turns on the device corresponding to the command issuance trigger for the external device. A programmable logic controller including a first command issuing unit that issues a generated command to the external device connected to the communication unit in the event of a state.
In a communication test support method that can perform data communication with the programmable logic controller and can be executed by a programmable logic controller system composed of a communication test support device that supports a communication test for the external device.
The communication test support device is
The process of displaying the connection conditions with the external device and
The process of accepting the input of the character string included in the command for the external device, and
The process of accepting the command issuance trigger and
It is characterized by including a step of generating a command for the external device based on a character string for which input is received, and issuing a generated command for the external device when a trigger for issuing the command is received. Communication test support method.
前記通信テスト支援装置は、入力を受け付けた文字列と前記設定データ記憶部に予め記憶されている設定データとに基づいて、前記外部機器に対するコマンドを生成することを特徴とする請求項14に記載の通信テスト支援方法。 14. The communication test support device according to claim 14, wherein the communication test support device generates a command for the external device based on a character string that receives input and setting data stored in advance in the setting data storage unit. Communication test support method. 前記通信テスト支援装置は、
前記外部機器との接続条件を設定する工程を含み、
入力を受け付けた文字列と設定された接続条件とに基づいて、前記外部機器に対するコマンドを生成することを特徴とする請求項14に記載の通信テスト支援方法。
The communication test support device is
Including the step of setting the connection conditions with the external device.
The communication test support method according to claim 14, wherein a command for the external device is generated based on a character string that receives an input and a set connection condition.
前記通信テスト支援装置も、前記設定データ記憶部を備えており、
前記通信テスト支援装置は、前記通信テスト支援装置の前記設定データ記憶部に記憶されている設定データに基づいて前記外部機器に対するコマンドを生成することを特徴とする請求項15に記載の通信テスト支援方法。
The communication test support device also includes the setting data storage unit.
The communication test support according to claim 15, wherein the communication test support device generates a command for the external device based on the setting data stored in the setting data storage unit of the communication test support device. Method.
前記通信テスト支援装置は、生成されたコマンドを発行した後に、対応するラダープログラムを出力することを特徴とする請求項14乃至17のいずれか一項に記載の通信テスト支援方法。 The communication test support method according to any one of claims 14 to 17, wherein the communication test support device outputs a corresponding ladder program after issuing a generated command. ユーザプログラムを記憶するプログラム記憶部と、
前記ユーザプログラムを繰り返し実行するプログラム実行部と、
前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、
外部機器とデータ通信することが可能に接続する通信部と、
該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、
デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部と
を備えるプログラマブルロジックコントローラとデータ通信することが可能に接続されており、前記外部機器に対する通信テストを支援する通信テスト支援装置で実行することが可能なコンピュータプログラムにおいて、
前記通信テスト支援装置を、
前記外部機器との接続条件を表示する表示手段、
前記外部機器に対するコマンドに含まれる文字列の入力を受け付ける入力受付手段、
前記コマンドの発行トリガを受け付けるトリガ発行受付手段、及び
入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記コマンドの発行トリガを受け付けた場合に、前記通信手段で接続された前記外部機器に対して生成したコマンドを発行する第二のコマンド発行手段
として機能させることを特徴とするコンピュータプログラム。
A program storage unit that stores user programs and
A program execution unit that repeatedly executes the user program, and
A device storage unit having a device area to which the device described in the user program is allocated,
A communication unit that connects to enable data communication with external devices,
A setting data storage unit that stores the frame definition of the command for the external device and the allocation information assigned to the device for the element included in the frame definition as setting data.
A command for the external device is generated based on the device value of the device and the setting data stored in the setting data storage unit, and the program execution unit turns on the device corresponding to the command issuance trigger for the external device. When a state occurs, it is connected to a programmable logic controller including a first command issuing unit that issues a generated command to the external device connected to the communication unit so that data communication can be performed. , In a computer program that can be executed by a communication test support device that supports a communication test for the external device.
The communication test support device
A display means for displaying connection conditions with the external device,
An input receiving means for receiving an input of a character string included in a command for the external device,
When a command for the external device is generated based on the trigger issuance receiving means for receiving the issuing trigger of the command and the character string for which the input is received, and the issuing trigger for the command is received, the communication means is connected. A computer program characterized in that it functions as a second command issuing means for issuing a generated command to the external device.
ユーザプログラムを記憶するプログラム記憶部と、
前記ユーザプログラムを繰り返し実行するプログラム実行部と、
前記ユーザプログラムに記述されたデバイスが割り付けられたデバイス領域を有するデバイス記憶部と、
外部機器とデータ通信することが可能に接続する通信部と、
該外部機器に対するコマンドのフレーム定義、及び該フレーム定義に含まれる要素に対してデバイスが割り当てられた割当情報を、設定データとして記憶する設定データ記憶部と、
デバイスのデバイス値と前記設定データ記憶部に記憶された設定データとに基づいて、前記外部機器に対するコマンドを生成し、前記プログラム実行部により、前記外部機器に対するコマンドの発行トリガに応じたデバイスがオン状態となった場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第一のコマンド発行部と
を備えるプログラマブルロジックコントローラと、
該プログラマブルロジックコントローラとデータ通信することが可能に接続されており、前記外部機器に対する通信テストを支援する通信テスト支援装置と
で構成されたプログラマブルロジックコントローラシステムにおいて、
前記通信テスト支援装置は、
前記外部機器との接続条件を表示する表示部と、
前記外部機器に対するコマンドに含まれる文字列の入力を受け付ける入力受付部と、
前記コマンドの発行トリガを受け付けるトリガ発行受付部と
を備え、
前記プログラマブルロジックコントローラは、
前記通信テスト支援装置で入力を受け付けた文字列に基づいて、前記外部機器に対するコマンドを生成し、前記通信テスト支援装置から前記コマンドの発行トリガを受け付けた場合に、前記通信部に接続された前記外部機器に対して生成したコマンドを発行する第二のコマンド発行部と
を備えることを特徴とするプログラマブルロジックコントローラシステム。
A program storage unit that stores user programs and
A program execution unit that repeatedly executes the user program, and
A device storage unit having a device area to which the device described in the user program is allocated,
A communication unit that connects to enable data communication with external devices,
A setting data storage unit that stores the frame definition of the command for the external device and the allocation information assigned to the device for the element included in the frame definition as setting data.
A command for the external device is generated based on the device value of the device and the setting data stored in the setting data storage unit, and the program execution unit turns on the device corresponding to the command issuance trigger for the external device. A programmable logic controller including a first command issuing unit that issues a generated command to the external device connected to the communication unit in the event of a state.
In a programmable logic controller system that is connected to the programmable logic controller so as to be capable of data communication and is composed of a communication test support device that supports a communication test for the external device.
The communication test support device is
A display unit that displays connection conditions with the external device,
An input reception unit that accepts input of character strings included in commands for the external device,
It is equipped with a trigger issuance receiving unit that accepts the issuing trigger of the command.
The programmable logic controller
When a command for the external device is generated based on a character string input received by the communication test support device and a command issuance trigger for the command is received from the communication test support device, the communication unit is connected. A programmable logic controller system characterized by having a second command issuing unit that issues commands generated to an external device.
JP2017024999A 2017-02-14 2017-02-14 Programmable logic controller system, programmable logic controller, communication test support device, communication test support method, and computer program that can be executed by the communication test support device. Active JP6767896B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017024999A JP6767896B2 (en) 2017-02-14 2017-02-14 Programmable logic controller system, programmable logic controller, communication test support device, communication test support method, and computer program that can be executed by the communication test support device.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017024999A JP6767896B2 (en) 2017-02-14 2017-02-14 Programmable logic controller system, programmable logic controller, communication test support device, communication test support method, and computer program that can be executed by the communication test support device.

Publications (2)

Publication Number Publication Date
JP2018132875A JP2018132875A (en) 2018-08-23
JP6767896B2 true JP6767896B2 (en) 2020-10-14

Family

ID=63247453

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017024999A Active JP6767896B2 (en) 2017-02-14 2017-02-14 Programmable logic controller system, programmable logic controller, communication test support device, communication test support method, and computer program that can be executed by the communication test support device.

Country Status (1)

Country Link
JP (1) JP6767896B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210303495A1 (en) * 2018-09-13 2021-09-30 Mitsubishi Electric Corporation Setting assistance device, setting assistance method, and program
CN109783368A (en) * 2018-12-20 2019-05-21 武汉华中数控股份有限公司 Trapezoidal pattern programming software testing system and method
JP7339037B2 (en) * 2019-07-10 2023-09-05 ファナック株式会社 Control device, diagnostic method and diagnostic program

Also Published As

Publication number Publication date
JP2018132875A (en) 2018-08-23

Similar Documents

Publication Publication Date Title
JP6767896B2 (en) Programmable logic controller system, programmable logic controller, communication test support device, communication test support method, and computer program that can be executed by the communication test support device.
JP6470955B2 (en) Programmable controller and programmable controller expansion unit
JP4426492B2 (en) Programmable terminal system
JP2008165399A (en) Simulation data generation support device
Thomas Introduction to the modbus protocol
JP2008158813A (en) Programmable display unit, display control program and recording medium with this program recorded
JP4463716B2 (en) Programmable display, display control program, and recording medium recording the same
JP2007179112A5 (en)
JP2008084027A (en) Programmable display device, display program and recording medium recording the same
JP2006302216A (en) Display device, screen data producing device and screen display system
JP2007179112A (en) Programmable display, control program, and recording medium recording the program
JP2008077467A (en) Display unit
JP5360382B2 (en) PLC program development support device
JP2008033572A (en) Screen generating apparatus, screen generating program and recording medium for recording this program
JP4288137B2 (en) Display system
KR101304817B1 (en) Keypad apparatus having parameter copy function by recognizing software versions and inverter types
JP4491838B2 (en) Programmable controller
JPH06187015A (en) Program converter for sequencer
JP3833086B2 (en) Document creation apparatus, document creation program, and computer-readable recording medium recording the program
JP2731245B2 (en) Graphic display device
JP4478884B2 (en) Programmable display maintenance method
JP5053316B2 (en) Network system, programmable display device, and memory access method
JP2011138451A (en) Connected device simulator apparatus having trace function, method, and program
JP2007252162A (en) Motor drive device
JP2005084820A (en) Controller comprising simulating functions of input/output unit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190910

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200825

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200918

R150 Certificate of patent or registration of utility model

Ref document number: 6767896

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250