JP5287630B2 - Control system, control system communication method, communication unit, and communication unit communication method - Google Patents

Control system, control system communication method, communication unit, and communication unit communication method Download PDF

Info

Publication number
JP5287630B2
JP5287630B2 JP2009214475A JP2009214475A JP5287630B2 JP 5287630 B2 JP5287630 B2 JP 5287630B2 JP 2009214475 A JP2009214475 A JP 2009214475A JP 2009214475 A JP2009214475 A JP 2009214475A JP 5287630 B2 JP5287630 B2 JP 5287630B2
Authority
JP
Japan
Prior art keywords
communication
communication test
data
command
storage unit
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.)
Expired - Fee Related
Application number
JP2009214475A
Other languages
Japanese (ja)
Other versions
JP2011065346A (en
Inventor
明彦 松浦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2009214475A priority Critical patent/JP5287630B2/en
Publication of JP2011065346A publication Critical patent/JP2011065346A/en
Application granted granted Critical
Publication of JP5287630B2 publication Critical patent/JP5287630B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

本発明は、プログラマブル・ロジック・コントローラ(Programmable Logic Controller:PLC)と外部機器との間で交信を行う制御システムおよびその交信方法と、PLCの通信ユニットおよびその交信方法に関する。 The present invention relates to a control system that performs communication between a programmable logic controller (PLC) and an external device, a communication method thereof, a PLC communication unit, and a communication method thereof.

従来のプログラマブルコントローラシステムにおいて、PLCと、汎用の外部機器と、PLCと外部機器間の交信に用いるプロトコルマクロを作成するプロトコルマクロ作成装置とからなるものがある(例えば、特許文献1)。PLCは、外部機器と交信するリンクユニットと、このリンクユニットを制御するCPUユニットとからなる。 A conventional programmable controller system includes a PLC, a general-purpose external device, and a protocol macro creation device that creates a protocol macro used for communication between the PLC and the external device (for example, Patent Document 1). The PLC includes a link unit that communicates with an external device and a CPU unit that controls the link unit.

そして、リンクユニットには、ユーザがプロトコルマクロ作成装置により作成したプロトコルマクロが記憶される。このプロトコルマクロは、外部機器のプロトコルに従って作成される。一方、CPUユニットには、ユーザが別途作成したラダープログラムが記憶される。このラダープログラムは、リンクユニットに記憶されたプロトコルマクロによる交信を指令する専用指令を含むものである。そして、CPUユニットがラダープログラムの実行中に専用指令を読み込むと、通信ユニットは、プロトコルマクロにより外部機器と交信を行う。 The link unit stores a protocol macro created by the user using the protocol macro creation device. This protocol macro is created according to the protocol of the external device. On the other hand, the CPU unit stores a ladder program created separately by the user. This ladder program includes a dedicated command for commanding communication using a protocol macro stored in the link unit. When the CPU unit reads a dedicated command during execution of the ladder program, the communication unit communicates with an external device using a protocol macro.

このように、ユーザは専用指令を用いてラダープログラムを作成することにより、PLCと外部機器間の交信を実現できるため、容易にラダープログラムを作成することができる。 Thus, since the user can realize the communication between the PLC and the external device by creating the ladder program using the dedicated command, the ladder program can be easily created.

特開2002−189505号公報(例えば段落0005〜0007、図17)JP 2002-189505 A (for example, paragraphs 0005 to 0007, FIG. 17)

しかしながら、従来のプログラマブルコントローラシステムでは、上記のように作成したラダープログラムにより正常に交信できなかった場合、その原因特定に手間と時間がかかるという問題があった。すなわち、ユーザは、ラダープログラム実行中に回線モニタ等の専用装置を用いてプロトコルマクロに問題があるか否かを確認し、プロトコルマクロに問題が無い場合は、つぎにラダープログラムの各行において問題があるか否かを確認する必要があった。 However, the conventional programmable controller system has a problem that it takes time and effort to specify the cause when communication cannot be normally performed by the ladder program created as described above. In other words, the user checks whether there is a problem with the protocol macro using a dedicated device such as a line monitor during execution of the ladder program. If there is no problem with the protocol macro, then the problem occurs in each line of the ladder program. It was necessary to check whether there was.

本発明にかかる制御システムは、PLCと、前記PLCに接続されるエンジニアリング・ツールと、前記PLCに接続される外部機器と、を備えた制御システムにおいて、前記エンジニアリング・ツールは、前記PLCに対し交信テスト指令をする交信テスト指令手段を備え、前記PLCは、制御指令プログラムを記憶する制御指令プログラム記憶部と、第1のプロトコル・データを記憶する交信データ記憶部と、第2のプロトコル・データを記憶する交信テスト・データ記憶部と、前記制御指令プログラム中のプロトコル・データ起動指令を読み込むプロトコル起動手段と、前記プロトコル起動手段が読み込む前記プロトコル・データ起動指令に基づき、前記交信データ記憶部に記憶される前記第1のプロトコル・データにより前記外部機器と交信する交信手段と、前記交信テスト指令手段から受ける前記交信テスト指令に基づき、前記交信テスト・データ記憶部に記憶される前記第2のプロトコル・データにより前記外部機器と交信する交信テスト手段と、を備えたことを特徴とする。 A control system according to the present invention includes a PLC, an engineering tool connected to the PLC, and an external device connected to the PLC. The engineering tool communicates with the PLC. A communication test command means for performing a test command is provided. The PLC stores a control command program storage unit for storing a control command program, a communication data storage unit for storing first protocol data, and a second protocol data. A communication test / data storage unit to be stored, a protocol activation means for reading a protocol / data activation command in the control command program, and stored in the communication data storage unit based on the protocol / data activation command read by the protocol activation unit The external device according to the first protocol data And communication test means for communicating with the external device by the second protocol data stored in the communication test data storage section based on the communication test command received from the communication test command means. , Provided.

また、本発明にかかる制御システムの交信方法は、PLCと、前記PLCに接続されるエンジニアリング・ツールと、前記PLCに接続される外部機器と、を備えた制御システムにおいて、前記PLCが制御指令プログラム中のプロトコル・データ起動指令を読み込むプロトコル起動ステップと、前記PLCが前記プロトコル起動ステップにて読み込んだ前記プロトコル・データ起動指令に基づき、前記PLCに設けられた交信データ記憶部に記憶される第1のプロトコル・データにより前記外部機器と交信する交信ステップと、前記エンジニアリング・ツールが前記PLCに対し交信テスト指令をする交信テスト指令ステップと、前記PLCが前記交信テスト指令ステップにて受けた前記交信テスト指令に基づき、前記PLCに設けられた交信テスト・データ記憶部に記憶される第2のプロトコル・データにより前記外部機器と交信する交信テスト・ステップと、を備えたことを特徴とする。 According to another aspect of the present invention, there is provided a control system communication method comprising: a control system comprising: a PLC; an engineering tool connected to the PLC; and an external device connected to the PLC. A protocol start step for reading the protocol / data start command, and a PLC stored in a communication data storage unit provided in the PLC based on the protocol / data start command read by the PLC in the protocol start step. A communication step for communicating with the external device using the protocol data; a communication test command step for the engineering tool to perform a communication test command to the PLC; and the communication test received by the PLC in the communication test command step Based on the command, provided in the PLC The second protocol data stored in the signal test data storage unit, characterized by comprising a communication test steps to communicate with the external device.

また、本発明にかかる通信ユニットは、第1のプロトコル・データを記憶する交信データ記憶部と、第2のプロトコル・データを記憶する交信テスト・データ記憶部と、CPUユニットによりプロトコル・データ起動指令がされたか否かを判断する交信指令判断手段と、前記交信指令判断手段にて、前記プロトコル・データ起動指令がされたと判断した場合、前記交信データ記憶部に記憶される前記第1のプロトコル・データにより外部機器と交信する交信手段と、エンジニアリング・ツールにより交信テスト指令がされたか否かを判断する交信テスト指令判断手段と、前記交信テスト指令判断手段にて、前記交信テスト指令がされたと判断した場合、前記交信テスト・データ記憶部に記憶される前記第2のプロトコル・データにより前記外部機器と交信する交信テスト手段と、を備えたことを特徴とする。
The communication unit according to the present invention includes a communication data storage unit for storing the first protocol data, a communication test data storage unit for storing the second protocol data, and a protocol data start command by the CPU unit. When the communication command determination unit determines whether or not the protocol / data activation command has been issued by the communication command determination unit and the communication command determination unit, the first communication protocol stored in the communication data storage unit is determined. Communication means that communicates with external devices based on data, communication test command determination means that determines whether or not a communication test command is issued by an engineering tool, and the communication test command determination means that the communication test command is determined If the second protocol data stored in the communication test data storage unit Characterized by comprising a communication test means to communicate with devices, the.

また、本発明にかかる通信ユニットの交信方法は、第1のプロトコル・データを記憶する交信データ記憶部および第2のプロトコル・データを記憶する交信テスト・データ記憶部を有する通信ユニットにおいて、CPUユニットによりプロトコル・データ起動指令がされたか否かを判断する交信指令判断ステップと、前記交信指令判断ステップにて、前記プロトコル・データ起動指令がされたと判断した場合、前記交信データ記憶部に記憶される前記第1のプロトコル・データにより外部機器と交信する交信ステップと、エンジニアリング・ツールにより交信テスト指令がされたか否かを判断する交信テスト指令判断ステップと、前記交信テスト指令判断ステップにて、前記交信テスト指令がされたと判断した場合、前記交信テスト・データ記憶部に記憶される前記第2のプロトコル・データにより前記外部機器と交信する交信テスト・ステップと、を備えたことを特徴とする。
In addition, a communication unit communication method according to the present invention includes a communication unit having a communication data storage unit for storing first protocol data and a communication test data storage unit for storing second protocol data. When the communication command determination step determines whether or not the protocol / data activation command has been issued, and when the protocol / data activation command is determined in the communication command determination step, it is stored in the communication data storage unit. In the communication step of communicating with an external device using the first protocol data, the communication test command determining step for determining whether or not a communication test command has been issued by an engineering tool, and the communication test command determining step, the communication If it is determined that a test command has been issued, the communication test data And communicating the test step by said second protocol data stored in 憶部 to communicate with the external device, characterized by comprising a.

本発明によれば、エンジニアリング・ツールにてプロトコル・データを作成した後、制御指令プログラムを作成することなく、作成したプロトコル・データが正常に交信できるものか否かを確認することができる。また、制御指令プログラムのデバッグの際に、回線モニタ等の専用装置を用いることなく、容易に原因を特定することができる。 According to the present invention, it is possible to confirm whether or not the created protocol data can be normally communicated without creating a control command program after creating the protocol data with the engineering tool. Further, when debugging the control command program, the cause can be easily identified without using a dedicated device such as a line monitor.

実施の形態1における制御システムのブロック図である。FIG. 3 is a block diagram of a control system in the first embodiment. 実施の形態1におけるPLCの斜視図である。1 is a perspective view of a PLC in a first embodiment. 実施の形態1における通信ユニットの記憶部の記憶領域の構成を示すブロック図である。3 is a block diagram illustrating a configuration of a storage area of a storage unit of a communication unit according to Embodiment 1. FIG. 実施の形態1におけるエンジニアリング・ツールのブロック図である。3 is a block diagram of an engineering tool in Embodiment 1. FIG. 実施の形態1におけるプロトコル・データ設定画面である。4 is a protocol / data setting screen according to the first embodiment. 実施の形態1におけるパケット設定画面である。3 is a packet setting screen according to the first embodiment. 実施の形態1における3つのプロトコル・データの例を示した図である。3 is a diagram illustrating an example of three protocol data according to Embodiment 1. FIG. 実施の形態1におけるエンジニアリング・ツール50の交信テスト処理を示すフローチャートである。4 is a flowchart showing a communication test process of the engineering tool 50 according to the first embodiment. 実施の形態1における交信テスト実行画面である。3 is a communication test execution screen in the first embodiment. 実施の形態1における通信ユニット30の処理を示すフローチャートである。3 is a flowchart showing processing of a communication unit 30 in the first embodiment.

実施の形態1.
本発明にかかる実施の形態1を図1〜図10を参照して説明する。
Embodiment 1 FIG.
A first embodiment of the present invention will be described with reference to FIGS.

図1は、実施の形態1における制御システムのブロック図である。図2は、実施の形態1におけるPLCの斜視図である。制御システム90は、PLC1と、エンジニアリング・ツール50と、外部機器60とを有する。PLC1は、電源ユニット10と、CPUユニット20と、通信ユニット30と、ベースユニット40とを有する。なお、便宜のため、図1では電源ユニット10を省略している。ベースユニット40は、バス41と複数のスロットなどのI/F部42とを有する。各I/F部42は、バス41に接続される。そして、電源ユニット10、CPUユニット20、および通信ユニット30は、それぞれベースユニット40のI/F部42に接続される。また、ベースユニット40のI/F部42には、他にもいかなる種類のユニットが接続されてもよいが、本実施の形態では、他のユニットが接続されていないものとする。 FIG. 1 is a block diagram of a control system according to the first embodiment. FIG. 2 is a perspective view of the PLC according to the first embodiment. The control system 90 includes a PLC 1, an engineering tool 50, and an external device 60. The PLC 1 includes a power supply unit 10, a CPU unit 20, a communication unit 30, and a base unit 40. For convenience, the power supply unit 10 is omitted in FIG. The base unit 40 includes a bus 41 and an I / F unit 42 such as a plurality of slots. Each I / F unit 42 is connected to the bus 41. The power supply unit 10, the CPU unit 20, and the communication unit 30 are each connected to the I / F unit 42 of the base unit 40. In addition, any type of unit may be connected to the I / F unit 42 of the base unit 40, but in this embodiment, no other unit is connected.

電源ユニット10は、外部電源から入力される電力を、ベースユニット40のバス41を経由してCPUユニット20および通信ユニット30に供給する。 The power supply unit 10 supplies power input from the external power supply to the CPU unit 20 and the communication unit 30 via the bus 41 of the base unit 40.

CPUユニット20は、オペレーティング・システム(Operating System:OS)などのシステム・プログラム、ラダー・プログラムやC言語プログラムなどの制御指令プログラム、またはあらゆるデータなどを記憶する記憶部22と、記憶部22に記憶されたシステム・プログラムや制御指令プログラムを実行する制御部21と、外部のエンジニアリング・ツール50と接続ケーブル70を介して接続されるI/F部23と、ベース・ユニット40のバス41に接続されるI/F部24とを有する。これらは、バス25を介して接続される。 The CPU unit 20 stores a system program such as an operating system (OS), a control command program such as a ladder program or a C language program, or any data, and stores the data in the storage unit 22. Connected to the control unit 21 for executing the system program and the control command program, the I / F unit 23 connected to the external engineering tool 50 via the connection cable 70, and the bus 41 of the base unit 40. I / F unit 24. These are connected via a bus 25.

I/F部23は、例えば図2に示すユニバーサル・シリアル・バス(Universal Serial Bus:USB)インタフェース23a、レコメンデッド・スタンダード232(Recommended Standard 232:RS-232)インタフェース23b、または図示しないEthernet(登録商標)インタフェースなどである。そして、接続ケーブル70としては、I/F部23に対応するUSBケーブル、RS-232ケーブル、またはEthernet(登録商標)ケーブルなどを用いる。 The I / F unit 23 is, for example, a universal serial bus (USB) interface 23a, a recommended standard 232 (RS-232) interface 23b shown in FIG. 2, or an Ethernet (registered) not shown. Trademark interface. As the connection cable 70, a USB cable corresponding to the I / F unit 23, an RS-232 cable, an Ethernet (registered trademark) cable, or the like is used.

記憶部22は、読み出し専用メモリ(Read-Only Memory:ROM)、随時アクセス・メモリ(Random-Access Memory:RAM)、またはフラッシュ・メモリなどからなる。フラッシュ・メモリを使用することで、記憶部22の容量を大きくすることができる。例えば、システム・プログラムをROMに記憶し、制御指令プログラムをフラッシュ・メモリに記憶し、制御部21がシステム・プログラムや制御指令プログラムを実行する際に用いるデータをRAMまたはフラッシュ・メモリに記憶することができる。 The storage unit 22 includes a read-only memory (ROM), a random-access memory (RAM), or a flash memory. By using the flash memory, the capacity of the storage unit 22 can be increased. For example, the system program is stored in the ROM, the control command program is stored in the flash memory, and the data used when the control unit 21 executes the system program or the control command program is stored in the RAM or the flash memory. Can do.

制御部21は、中央処理装置(Central Processing Unit:CPU)またはマイクロ・コンピュータなどである。 The control unit 21 is a central processing unit (CPU) or a microcomputer.

通信ユニット30は、システム・プログラムまたはあらゆるデータなどを記憶する記憶部32と、記憶部32に記憶されたシステム・プログラムを実行する制御部31と、外部機器60と接続ケーブル80を介して接続されるI/F部33と、ベース・ユニット40のバス41に接続されるI/F部34とを有する。これらは、バス35を介して接続される。 The communication unit 30 is connected via a connection cable 80 to a storage unit 32 that stores a system program or any data, a control unit 31 that executes a system program stored in the storage unit 32, and an external device 60. And an I / F unit 34 connected to the bus 41 of the base unit 40. These are connected via a bus 35.

I/F部33は、例えば図2に示すEthernet(登録商標)インタフェース33a、RS-232インタフェース33b、または図示しないUSBインタフェースなどである。そして、接続ケーブル80としては、I/F部33に対応するEthernet(登録商標)ケーブル、RS-232ケーブル、またはUSBケーブルなどを用いる。外部機器60は、例えば温度調節器、バーコード・リーダ、または計測機器などである。 The I / F unit 33 is, for example, the Ethernet (registered trademark) interface 33a, the RS-232 interface 33b, or a USB interface (not shown) shown in FIG. As the connection cable 80, an Ethernet (registered trademark) cable, an RS-232 cable, a USB cable, or the like corresponding to the I / F unit 33 is used. The external device 60 is, for example, a temperature controller, a barcode reader, or a measurement device.

記憶部32は、ROM、RAM、またはフラッシュ・メモリなどからなる。フラッシュ・メモリを使用することで、記憶部32の容量を大きくすることができる。図3は、実施の形態1における通信ユニット30の記憶部32の記憶領域の構成を示すブロック図である。記憶部32は、システム・プログラムを記憶するシステム・プログラム記憶領域100と、交信テストを指令するデータを記憶する交信テスト指令データ記憶領域101と、交信テストに用いられるデータを記憶する交信テスト・データ記憶領域102と、通常の交信に用いられるデータを記憶する交信データ記憶領域103と、交信テストおよび通常の交信の結果に関するデータを記憶する交信結果データ記憶領域104とを有する。 The storage unit 32 includes a ROM, a RAM, a flash memory, or the like. By using the flash memory, the capacity of the storage unit 32 can be increased. FIG. 3 is a block diagram illustrating a configuration of the storage area of the storage unit 32 of the communication unit 30 according to the first embodiment. The storage unit 32 includes a system program storage area 100 for storing system programs, a communication test command data storage area 101 for storing data for instructing a communication test, and communication test data for storing data used for the communication test. It has a storage area 102, a communication data storage area 103 for storing data used for normal communication, and a communication result data storage area 104 for storing data relating to the result of the communication test and normal communication.

例えば、システム・プログラム記憶領域100をROMに設け、交信テスト指令データ記憶領域101および交信テスト・データ記憶領域102をRAMに設け、交信データ記憶領域103および交信結果データ記憶領域104をフラッシュ・メモリに設けることができる。 For example, the system program storage area 100 is provided in the ROM, the communication test command data storage area 101 and the communication test data storage area 102 are provided in the RAM, and the communication data storage area 103 and the communication result data storage area 104 are provided in the flash memory. Can be provided.

制御部31は、CPUまたはマイクロ・コンピュータなどである。 The control unit 31 is a CPU or a microcomputer.

図4は、実施の形態1におけるエンジニアリング・ツールのブロック図である。エンジニアリング・ツール50は、プログラムまたはあらゆるデータなどを記憶する記憶部52と、記憶部52に記憶されたプログラムを実行する制御部51と、PLC1と接続ケーブル70を介して接続されるI/F部53と、表示画面などの表示部54と、キーボードやマウスなどの入力部55とを有する。これらは、バス56を介して接続される。 FIG. 4 is a block diagram of the engineering tool in the first embodiment. The engineering tool 50 includes a storage unit 52 that stores a program or any data, a control unit 51 that executes a program stored in the storage unit 52, and an I / F unit that is connected to the PLC 1 via a connection cable 70. 53, a display unit 54 such as a display screen, and an input unit 55 such as a keyboard and a mouse. These are connected via a bus 56.

制御部51は、例えばCPUである。I/F部53は、接続ケーブル70に対応するUSBインタフェース、RS-232インタフェース、またはEthernet(登録商標)インタフェースなどである。記憶部52は、ROMやRAMなどからなる。記憶部52には、システム・プログラムと、プロトコル・データの作成およびPLC1に対する交信指令などを行うためのプログラムとが記憶される。この他にも、記憶部52には、PLC1の初期設定および設定変更などを行うためのプログラム、または制御指令プログラムを作成するためのプログラムなどが記憶されてもよい。 The control unit 51 is, for example, a CPU. The I / F unit 53 is a USB interface, an RS-232 interface, or an Ethernet (registered trademark) interface corresponding to the connection cable 70. The storage unit 52 includes a ROM, a RAM, and the like. The storage unit 52 stores a system program and a program for creating protocol data and issuing a communication command to the PLC 1. In addition, the storage unit 52 may store a program for initial setting and setting change of the PLC 1 or a program for creating a control command program.

なお、エンジニアリング・ツール50がPLC1へ送信するデータは、まず接続ケーブル70を通ってCPUユニット20のI/F部23にて受信される。その後、CPUユニット20の制御部21は、I/F部23にて受信したデータの宛先がCPUユニット20であるか否かを判断し、そのデータの宛先がCPUユニット20である場合は、制御部21がそのデータを処理する。一方、受信したデータの宛先がCPUユニット20でない場合は、制御部21は、そのデータを通信ユニット30へベースユニット40を介して送信する。つぎに、そのデータが通信ユニット30のI/F部34にて受信されると、通信ユニット30の制御部31は、I/F部34にて受信したデータの宛先が通信ユニット30であるか否かを判断し、そのデータの宛先が通信ユニット30である場合は、制御部31がそのデータを処理する。一方、そのデータの宛先が通信ユニット30でない場合は、制御部31は、そのデータを破棄する。これによって、エンジニアリング・ツール50は、CPUユニット20に対し指令したり、通信ユニット30の記憶部32のデータを読み書きすることができる。 The data transmitted from the engineering tool 50 to the PLC 1 is first received by the I / F unit 23 of the CPU unit 20 through the connection cable 70. Thereafter, the control unit 21 of the CPU unit 20 determines whether or not the destination of the data received by the I / F unit 23 is the CPU unit 20. If the destination of the data is the CPU unit 20, the control unit 21 performs control. The unit 21 processes the data. On the other hand, when the destination of the received data is not the CPU unit 20, the control unit 21 transmits the data to the communication unit 30 via the base unit 40. Next, when the data is received by the I / F unit 34 of the communication unit 30, the control unit 31 of the communication unit 30 determines whether the destination of the data received by the I / F unit 34 is the communication unit 30. If the destination of the data is the communication unit 30, the control unit 31 processes the data. On the other hand, when the destination of the data is not the communication unit 30, the control unit 31 discards the data. As a result, the engineering tool 50 can instruct the CPU unit 20 and read / write data in the storage unit 32 of the communication unit 30.

また、エンジニアリング・ツール50は通信ユニット30のI/F部33に接続されてもよい。この場合も、エンジニアリング・ツール50がPLC1へ送信するデータは、上記と同様に処理される。 The engineering tool 50 may be connected to the I / F unit 33 of the communication unit 30. Also in this case, the data transmitted from the engineering tool 50 to the PLC 1 is processed in the same manner as described above.

つぎに、動作を説明する。まず、エンジニアリング・ツール50が行う動作について、図5〜9を参照して説明する。なお、エンジニアリング・ツール50が行う動作は、制御部51が記憶部52に記憶された各プログラムに従って処理する。まず、エンジニアリング・ツール50は、ユーザによる設定内容に基づいて、通信ユニット30と外部機器60との間の交信に用いるプロトコル・データを作成する。ここで、ユーザは、表示部54に表示される画面にて、入力部55により必要事項を入力することにより、プロトコル・データの内容を設定する。また、このプロトコル・データは、外部機器60のプロトコルに従って作成される。図5のプロトコル・データ設定画面および図6のパケット設定画面は、ユーザがプロトコル・データの内容を設定する際に、表示部54に表示される画面のイメージである。 Next, the operation will be described. First, operations performed by the engineering tool 50 will be described with reference to FIGS. The operation performed by the engineering tool 50 is processed by the control unit 51 in accordance with each program stored in the storage unit 52. First, the engineering tool 50 creates protocol data to be used for communication between the communication unit 30 and the external device 60 based on the setting content by the user. Here, the user sets the contents of the protocol data by inputting necessary items through the input unit 55 on the screen displayed on the display unit 54. The protocol data is created according to the protocol of the external device 60. The protocol data setting screen in FIG. 5 and the packet setting screen in FIG. 6 are images of screens displayed on the display unit 54 when the user sets the contents of the protocol data.

図5のプロトコル・データ設定画面において、ユーザは、新たに作成するプロトコル・データの基本情報を設定する。例えば、外部機器60を特定する情報として、外部機器60の製造者名および外部機器60の名称を入力するとともに、この新たに作成するプロトコル・データを特定する情報として、プロトコル・データの名称および番号を入力する。また、このプロトコル・データの通信種別として、「送信」、「受信」、または「送信及び受信」のいずれかを特定する。通信種別を「送信」と設定する場合、このプロトコル・データは通信ユニット30から外部機器60へ送信されるものとなる。通信種別を「受信」と設定する場合、このプロトコル・データは通信ユニット30が外部機器60から受信するものとなる。通信種別を「送信及び受信」と設定する場合、このプロトコル・データは通信ユニット30から外部機器60へ送信された後に外部機器60から通信ユニット30へ返信されるものとなる。この他にも、通信ユニット30がこのプロトコル・データを外部機器60から受信するのを待機する受信待ち時間など、プロトコル・データの交信に関するさまざまな情報を設定することができる。 In the protocol / data setting screen shown in FIG. 5, the user sets basic information of newly created protocol / data. For example, the manufacturer name of the external device 60 and the name of the external device 60 are input as information for specifying the external device 60, and the name and number of the protocol data are used as information for specifying this newly created protocol data. Enter. Further, “transmission”, “reception”, or “transmission and reception” is specified as the communication type of the protocol data. When the communication type is set to “transmission”, the protocol data is transmitted from the communication unit 30 to the external device 60. When the communication type is set to “reception”, the protocol data is received by the communication unit 30 from the external device 60. When the communication type is set to “transmission and reception”, the protocol data is transmitted from the communication unit 30 to the external device 60 and then returned from the external device 60 to the communication unit 30. In addition to this, it is possible to set various information regarding communication of protocol data, such as a reception waiting time for waiting for the communication unit 30 to receive the protocol data from the external device 60.

図6のパケット設定画面において、ユーザは、この新たに作成するプロトコル・データの送信パケットまたは受信パケットの内容を設定する。例えば、パケットを特定する情報として、このパケットが属するプロトコル・データの名称および番号を入力するとともに、このパケット種別として送信パケットまたは受信パケットを特定する。さらに、このパケットを構成する各要素の種別、順番、データ長などを、外部機器60のプロトコルに従って特定する。 In the packet setting screen of FIG. 6, the user sets the contents of the newly created protocol data transmission packet or reception packet. For example, the name and number of protocol data to which the packet belongs are input as information for specifying the packet, and the transmission packet or the reception packet is specified as the packet type. Furthermore, the type, order, data length, etc. of each element constituting this packet are specified according to the protocol of the external device 60.

つぎに、エンジニアリング・ツール50は、図5のプロトコル・データ設定画面や図6のパケット設定画面などにてユーザにより設定された内容に従って作成したプロトコル・データを、記憶部52に記憶する。なお、記憶部52には、同様に作成した複数のプロトコル・データを記憶することができる。 Next, the engineering tool 50 stores the protocol data created according to the contents set by the user on the protocol data setting screen of FIG. 5 or the packet setting screen of FIG. The storage unit 52 can store a plurality of similarly created protocol data.

図7は、3つのプロトコル・データの例を示した図である。各プロトコル・データは、送信パケットおよび受信パケットから構成されるとともに、それぞれ異なるプロトコル・データ番号「No.1」、「No.2」、「No.3」が付されている。これら3つのプロトコル・データは、「A社の温度調節器」である外部機器60のプロトコルに従って作成されている。 FIG. 7 is a diagram showing an example of three protocol data. Each protocol data is composed of a transmission packet and a reception packet, and has different protocol data numbers “No. 1”, “No. 2”, and “No. 3”. These three protocol data are created in accordance with the protocol of the external device 60 which is “A company's temperature controller”.

「No.1」の番号が付されたプロトコル・データは、通信ユニット30が外部機器60に起動を指令するものである。送信パケットにおいて、「STX」はヘッダ、「02」は外部機器60の局番、「00 01 00」は指令を意味するデータ、「00 02 00」は起動を意味するデータ、「ETX」はフッタである。また、受信パケットにおいて、「データ1」は外部機器60がこのプロトコル・データを受信した旨のデータを格納するためのフレーム、「データ2」は外部機器60が起動した旨のデータを格納するためのフレームである。 The protocol data with the number “No. 1” is for the communication unit 30 to instruct the external device 60 to start. In the transmission packet, “STX” is a header, “02” is a station number of the external device 60, “00 01 00” is data indicating a command, “00 02 00” is data indicating activation, and “ETX” is a footer. is there. In the received packet, “Data 1” is a frame for storing data indicating that the external device 60 has received this protocol data, and “Data 2” is for storing data indicating that the external device 60 has been activated. It is a frame.

同様に、「No.2」の番号が付されたプロトコル・データは、通信ユニット30が外部機器60に温度の読出しを指令するものである。送信パケットにおける「00 03 00」は温度の読出しを意味するデータであり、受信パケットにおける「データ2」は外部機器60が読出した温度値のデータを格納するためのフレームである。その他の送信パケットおよび受信パケットの各構成要素は、プロトコル・データ「No.1」と同様である。 Similarly, the protocol data with the number “No. 2” is used by the communication unit 30 to instruct the external device 60 to read the temperature. “00 03 00” in the transmission packet is data indicating temperature reading, and “Data 2” in the reception packet is a frame for storing temperature value data read by the external device 60. The other constituent elements of the transmission packet and the reception packet are the same as the protocol data “No. 1”.

同様に、「No.3」の番号が付されたプロトコル・データは、通信ユニット30が外部機器60に温度の変更を指令するものである。送信パケットにおける「00 04 00」は温度の変更を意味するデータであり、受信パケットにおける「データ2」は外部機器60が温度を変更した旨のデータを格納するためのフレームである。その他の送信パケットおよび受信パケットの各構成要素は、プロトコル・データ「No.1」と同様である。 Similarly, the protocol data with the number “No. 3” is for the communication unit 30 to instruct the external device 60 to change the temperature. “00 04 00” in the transmission packet is data indicating a change in temperature, and “data 2” in the reception packet is a frame for storing data indicating that the external device 60 has changed the temperature. The other constituent elements of the transmission packet and the reception packet are the same as the protocol data “No. 1”.

つぎに、ユーザは、図9に示す交信テスト実行画面にて、プルダウン方式により、交信テストを行いたいプロトコル・データの名称および番号を選択する。これにより、記憶部52に記憶された複数のプロトコル・データの中から一つのプロトコル・データを特定することができる。つぎに、ユーザは、図9の交信テスト実行画面にて「テスト実行」釦を選択する。 Next, on the communication test execution screen shown in FIG. 9, the user selects the name and number of protocol data to be subjected to the communication test by a pull-down method. Thereby, one protocol data can be specified from the plurality of protocol data stored in the storage unit 52. Next, the user selects a “test execution” button on the communication test execution screen of FIG.

図8は、ユーザにより図9にて「テスト実行」釦が選択された後、エンジニアリング・ツール50が行う交信テスト処理を示すフローチャートである。エンジニアリング・ツール50は、ユーザにより図9にて特定されたプロトコル・データを記憶部52から読み込み(ステップS101)、その後、読み込んだプロトコル・データを通信ユニット30の記憶部32の交信テスト・データ記憶領域102に書き込む(ステップS102)。ここで、既に交信テスト・データ記憶領域102に何らかのデータが記憶されている場合は、このプロトコル・データに書き換えられる。 FIG. 8 is a flowchart showing a communication test process performed by the engineering tool 50 after the user selects the “execute test” button in FIG. The engineering tool 50 reads the protocol data specified in FIG. 9 by the user from the storage unit 52 (step S101), and then stores the read protocol data in the communication test data storage unit 32 of the communication unit 30. Write in the area 102 (step S102). If any data is already stored in the communication test data storage area 102, it is rewritten with this protocol data.

つぎに、エンジニアリング・ツール50は、通信ユニット30の記憶部32の交信テスト指令データ記憶領域101に交信テスト指令データを書き込む(ステップS103)。この交信テスト指令データは、例えば「1」のようなデータであり、通信ユニット30に対し交信テストを指令するものである。ここで、既に交信テスト指令データ記憶領域101に何らかのデータが記憶されている場合は、この交信テスト指令データに書き換えられる。 Next, the engineering tool 50 writes the communication test command data in the communication test command data storage area 101 of the storage unit 32 of the communication unit 30 (step S103). The communication test command data is data such as “1”, for example, and commands the communication unit 30 to perform a communication test. Here, when some data is already stored in the communication test command data storage area 101, it is rewritten to this communication test command data.

つぎに、エンジニアリング・ツール50は、交信テスト指令データ記憶領域101を読み込み(ステップS104)、交信テスト完了データが書き込まれているか否かを判断する(ステップS105)。この交信テスト完了データは、例えば「2」のような交信テスト指令データとは異なるデータであり、通信ユニット30が交信テストを完了した旨のデータである。後述するように、通信ユニット30は、交信テスト指令データ記憶領域101に交信テスト指令データが書き込まれていることを確認すると、交信テストを行い、その後、交信テスト指令データ記憶領域101に記憶された交信テスト指令データを記憶交信テスト完了データに書き換える。S105にて、交信テスト完了データが書き込まれていない場合は、S104に戻る。 Next, the engineering tool 50 reads the communication test command data storage area 101 (step S104), and determines whether or not communication test completion data has been written (step S105). This communication test completion data is data different from the communication test command data such as “2”, for example, and is data indicating that the communication unit 30 has completed the communication test. As will be described later, when the communication unit 30 confirms that the communication test command data is written in the communication test command data storage area 101, the communication unit 30 performs a communication test, and then stored in the communication test command data storage area 101. Rewrite the communication test command data to the stored communication test completion data. If the communication test completion data is not written in S105, the process returns to S104.

S105にて、交信テスト完了データが書き込まれている場合は、つぎに、エンジニアリング・ツール50は、通信ユニット30の記憶部32の交信結果データ記憶領域104から、この交信テストに係る交信テスト結果データを読み込む(ステップS106)。この交信テスト結果データは、通信ユニット30が行った交信テストの結果が正常だったか否か、また、異常だった場合は具体的に接続ケーブル80に異常があった旨などを表すデータである。 If the communication test completion data has been written in S105, the engineering tool 50 next transmits the communication test result data related to this communication test from the communication result data storage area 104 of the storage unit 32 of the communication unit 30. Is read (step S106). This communication test result data is data representing whether or not the result of the communication test performed by the communication unit 30 is normal, and if abnormal, specifically indicates that the connection cable 80 is abnormal.

つぎに、エンジニアリング・ツール50は、S106にて読み込んだ交信テスト結果データに基づいて、交信テストの結果情報を表示部54に表示する(ステップS107)。その後、交信テスト処理を終了する。 Next, the engineering tool 50 displays the communication test result information on the display unit 54 based on the communication test result data read in S106 (step S107). Thereafter, the communication test process is terminated.

なお、交信テストの結果が正常であった場合、このプロトコル・データは、通信ユニット30と外部機器60との間の通常の交信に問題無く用いることができることを意味する。そして、この交信テストが完了したプロトコル・データを通常の交信に用いるためには、まずエンジニアリング・ツール50は、ユーザによる操作に従い、このプロトコル・データを通信ユニット30の記憶部32の交信データ記憶領域103に書き込む。なお、交信データ記憶領域103には、交信テストが完了した複数のプロトコル・データを記憶することができる。 If the result of the communication test is normal, this protocol data means that it can be used for normal communication between the communication unit 30 and the external device 60 without any problem. In order to use the protocol data for which the communication test has been completed for normal communication, the engineering tool 50 first transmits the protocol data to the communication data storage area of the storage unit 32 of the communication unit 30 according to the operation by the user. 103 is written. The communication data storage area 103 can store a plurality of protocol data for which the communication test has been completed.

また、ユーザは、エンジニアリング・ツールまたは他の装置を用いて、別途このプロトコル・データの起動指令を含むラダー・プログラムなどの制御指令プログラムを作成し、作成した制御指令プログラムをCPUユニット20の記憶部22に書き込む。この制御指令プログラムは、CPUユニット20が実行するものであり、このプロトコル・データ起動指令は、通信ユニット30に対し、このプロトコル・データによる外部機器60との交信を指令するものである。 Further, the user separately creates a control command program such as a ladder program including a start command for the protocol data by using an engineering tool or another device, and the created control command program is stored in the storage unit of the CPU unit 20. 22 is written. This control command program is executed by the CPU unit 20, and this protocol / data activation command instructs the communication unit 30 to communicate with the external device 60 using this protocol / data.

つぎに、エンジニアリング・ツール50は、ユーザによりこの制御指令プログラムの実行が指令されると、CPUユニット20に対し、この制御指令プログラムの実行を指令する。つぎに、CPUユニット20は、記憶部22に記憶された制御指令プログラムの実行を開始し、実行中にプロトコル・データ起動指令を読み込むと、通信ユニット30に対し、このプロトコル・データ起動指令をする。 Next, when the execution of the control command program is instructed by the user, the engineering tool 50 instructs the CPU unit 20 to execute the control command program. Next, the CPU unit 20 starts execution of the control command program stored in the storage unit 22, and reads the protocol / data start command during the execution, and issues the protocol / data start command to the communication unit 30. .

つぎに、通信ユニット30が行う動作について、図10を参照して説明する。なお、通信ユニット30が行う動作は、制御部31がシステム・プログラム記憶領域100に記憶されたシステム・プログラムに従って処理する。図10は、実施の形態1における通信ユニット30の処理を示すフローチャートである。まず、通信ユニット30は、CPUユニット20によりプロトコル・データ起動指令がされたか否か判断する(ステップS201)。S201にて、プロトコル・データ起動指令がされた場合、つぎに、通信ユニット30は、交信データ記憶領域103からこの起動指令がされたプロトコル・データを読み込む(ステップS202)。つぎに、S202にて読み込んだプロトコル・データのデータ長やデータ内容などを確認し、このプロトコル・データが外部機器60と交信するための所定条件を満たすかどうかを診断する(ステップS203)。 Next, operations performed by the communication unit 30 will be described with reference to FIG. The operation performed by the communication unit 30 is processed by the control unit 31 according to the system program stored in the system program storage area 100. FIG. 10 is a flowchart showing processing of the communication unit 30 in the first embodiment. First, the communication unit 30 determines whether a protocol / data activation command has been issued by the CPU unit 20 (step S201). If a protocol / data activation command is issued in S201, the communication unit 30 then reads the protocol data for which this activation command has been issued from the communication data storage area 103 (step S202). Next, the data length and data content of the protocol data read in S202 are confirmed, and it is diagnosed whether or not this protocol data satisfies a predetermined condition for communicating with the external device 60 (step S203).

つぎに、通信ユニット30は、S203の診断の結果、このプロトコル・データが外部機器60と交信することができるものであるか否かを判断する(ステップS204)。S204にて、このプロトコル・データが交信できるものであると判断した場合、つぎに、このプロトコル・データにより外部機器60と交信する(ステップS205)。つぎに、交信結果データを交信結果データ記憶領域104に書き込み(ステップS206)、その後、S201に戻る。なお、この交信結果データは、通信ユニット30が行った交信の結果が正常だったか否か、また、異常だった場合は具体的に接続ケーブル80に異常があった旨などを表すデータである。 Next, the communication unit 30 determines whether or not this protocol data can be communicated with the external device 60 as a result of the diagnosis in S203 (step S204). If it is determined in S204 that the protocol data can be communicated, the communication is performed with the external device 60 using the protocol data (step S205). Next, the communication result data is written in the communication result data storage area 104 (step S206), and then the process returns to S201. The communication result data is data representing whether or not the result of the communication performed by the communication unit 30 is normal, and if abnormal, specifically indicates that the connection cable 80 is abnormal.

一方、S204にて、このプロトコル・データが交信できないものであると判断した場合、つぎに、プロトコル異常データを交信結果データ記憶領域104に書き込み(ステップS206)、その後、S201に戻る。このプロトコル異常データは、このプロトコル・データに何らかの異常があるため、所定条件を満たしていない旨のデータである。 On the other hand, if it is determined in S204 that the protocol data cannot be communicated, then protocol abnormality data is written in the communication result data storage area 104 (step S206), and then the process returns to S201. This protocol abnormality data is data indicating that a predetermined condition is not satisfied because there is some abnormality in the protocol data.

一方、S201にて、プロトコル・データ起動指令がされていない場合、つぎに、通信ユニット30は、エンジニアリング・ツール50により交信テスト指令がされたか否かを判断する(ステップS208)。すなわち、交信テスト指令データ記憶領域101を読み込み、交信テスト指令データが書き込まれているか否かを判断する。S208にて、交信テスト指令データが書き込まれていない場合は、ステップS201へ戻る。ここで、交信テスト指令データが書き込まれていない場合とは、例えば交信テスト完了データなどの交信テスト指令データとは異なるデータが書き込まれている場合、または何もデータが書き込まれていない場合である。 On the other hand, if the protocol / data activation command is not issued in S201, the communication unit 30 next determines whether or not a communication test command is issued by the engineering tool 50 (step S208). That is, the communication test command data storage area 101 is read to determine whether or not communication test command data has been written. If the communication test command data is not written in S208, the process returns to step S201. Here, the case where the communication test command data is not written is, for example, a case where data different from the communication test command data such as communication test completion data is written, or no data is written. .

一方、S208にて、交信テスト指令データが書き込まれている場合は、つぎに、通信ユニット30は、交信テスト・データ記憶領域102からプロトコル・データを読み込む(ステップS209)。つぎに、S209にて読み込んだプロトコル・データのデータ長やデータ内容などを確認し、このプロトコル・データが外部機器60と交信するための所定条件を満たすかどうかを診断する(ステップS210)。 On the other hand, if the communication test command data has been written in S208, the communication unit 30 then reads the protocol data from the communication test data storage area 102 (step S209). Next, the data length and data content of the protocol data read in S209 are confirmed, and it is diagnosed whether or not the protocol data satisfies a predetermined condition for communicating with the external device 60 (step S210).

そして、通信ユニット30は、S210の診断の結果、このプロトコル・データが外部機器60と交信することができるものであるか否かを判断する(ステップS211)。S211にて、このプロトコル・データが交信できるものであると判断した場合、つぎに、このプロトコル・データにより外部機器60と交信する(ステップS212)。つぎに、交信テスト結果データを交信結果データ記憶領域104に書き込む(ステップS213)。つぎに、通信ユニット30は、交信テスト指令データ記憶領域101に交信テスト完了データを書き込み(ステップS214)、その後、S201に戻る。 Then, the communication unit 30 determines whether or not this protocol data can be communicated with the external device 60 as a result of the diagnosis in S210 (step S211). If it is determined in S211 that the protocol data can be communicated, then the protocol data is communicated with the external device 60 (step S212). Next, the communication test result data is written in the communication result data storage area 104 (step S213). Next, the communication unit 30 writes the communication test completion data in the communication test command data storage area 101 (step S214), and then returns to S201.

一方、S211にて、このプロトコル・データが交信できないものであると判断した場合、つぎに、通信ユニット30は、プロトコル異常データを交信結果データ記憶領域104に書き込む(ステップS215)。つぎに、S214に進んで交信テスト指令データ記憶領域101に交信テスト完了データを書き込み、その後、S201に戻る。 On the other hand, if it is determined in S211 that the protocol data cannot be communicated, the communication unit 30 then writes the protocol abnormality data in the communication result data storage area 104 (step S215). Next, the process proceeds to S214, the communication test completion data is written in the communication test command data storage area 101, and then the process returns to S201.

なお、本実施の形態では、図8のS102にて、エンジニアリング・ツール50は、作成したプロトコル・データを交信テスト・データ記憶領域102に書き込むが、交信データ記憶領域103に記憶されたプロトコル・データを交信テスト・データ記憶領域102に書き込むこともできる。これにより、制御指令プログラムのデバッグの際にも、プロトコル・データの交信テストを行うことができる。 In this embodiment, the engineering tool 50 writes the created protocol data in the communication test data storage area 102 in S102 of FIG. 8, but the protocol data stored in the communication data storage area 103 is written. Can be written in the communication test data storage area 102. This makes it possible to perform a protocol / data communication test when debugging the control command program.

また、本実施の形態では、図10のS201にて、通信ユニット30は、CPUユニット20によりプロトコル・データ起動指令がされたか否かのみを判断するが、CPUユニット20により交信テスト指令以外のあらゆる指令がされたか否かを判断し、その後、各指令に従った処理を行うようにしてもよい。 In this embodiment, in S201 of FIG. 10, the communication unit 30 determines only whether the CPU / unit 20 has issued a protocol / data activation command. It may be determined whether or not a command has been issued, and thereafter, processing according to each command may be performed.

また、通信ユニット30の交信テスト指令データ記憶領域101は無くてもよい。この場合、通信ユニット30は、図10のS208にて、交信テスト指令データ記憶領域101に交信テスト指令データが書き込まれているか否かを判断する代わりに、直接交信テスト・データ記憶領域102にプロトコル・データが書き込まれているか否かを判断する。また、通信ユニット30は、図10のS214にて、交信テスト指令データ記憶領域101に交信テスト完了データを書き込む代わりに、交信テスト・データ記憶領域102のプロトコル・データを削除する。一方、エンジニアリング・ツール50は、図8のS102の後、S106に進むことになる。 Further, the communication test command data storage area 101 of the communication unit 30 may be omitted. In this case, instead of determining whether or not the communication test command data is written in the communication test command data storage area 101 in S208 of FIG. 10, the communication unit 30 directly transmits the protocol to the communication test data storage area 102. -Determine whether data has been written. Further, the communication unit 30 deletes the protocol data in the communication test data storage area 102 instead of writing the communication test completion data in the communication test command data storage area 101 in S214 of FIG. On the other hand, the engineering tool 50 proceeds to S106 after S102 in FIG.

本実施の形態によれば、エンジニアリング・ツールにてプロトコル・データを作成した後、制御指令プログラムを作成することなく、作成したプロトコル・データが正常に交信できるものか否かを確認することができる。また、制御指令プログラムのデバッグの際に、回線モニタ等の専用装置を用いることなく、容易に原因を特定することができる。 According to the present embodiment, it is possible to confirm whether or not the created protocol data can be normally communicated without creating a control command program after creating the protocol data with the engineering tool. . Further, when debugging the control command program, the cause can be easily identified without using a dedicated device such as a line monitor.

1 PLC
20 CPUユニット
30 通信ユニット
50 エンジニアリング・ツール
60 外部機器
90 制御システム
101 交信テスト指令データ記憶領域
102 交信テスト・データ記憶領域
103 交信データ記憶領域
104 交信結果データ記憶領域
1 PLC
20 CPU unit 30 Communication unit 50 Engineering tool 60 External device 90 Control system 101 Communication test command data storage area 102 Communication test data storage area 103 Communication data storage area 104 Communication result data storage area

Claims (16)

PLCと、
前記PLCに接続されるエンジニアリング・ツールと、
前記PLCに接続される外部機器と、を備えた制御システムにおいて、
前記エンジニアリング・ツールは、
前記PLCに対し交信テスト指令をする交信テスト指令手段を備え、
前記PLCは、
制御指令プログラムを記憶する制御指令プログラム記憶部と、
第1のプロトコル・データを記憶する交信データ記憶部と、
第2のプロトコル・データを記憶する交信テスト・データ記憶部と、
前記制御指令プログラム中のプロトコル・データ起動指令を読み込むプロトコル起動手段と、
前記プロトコル起動手段が読み込む前記プロトコル・データ起動指令に基づき、前記交信データ記憶部に記憶される前記第1のプロトコル・データにより前記外部機器と交信する交信手段と、
前記交信テスト指令手段から受ける前記交信テスト指令に基づき、前記交信テスト・データ記憶部に記憶される前記第2のプロトコル・データにより前記外部機器と交信する交信テスト手段と、
を備えたことを特徴とする制御システム。
PLC and
An engineering tool connected to the PLC;
In a control system comprising an external device connected to the PLC,
The engineering tool is
A communication test command means for issuing a communication test command to the PLC;
The PLC is
A control command program storage unit for storing the control command program;
A communication data storage unit for storing the first protocol data;
A communication test data storage unit for storing second protocol data;
Protocol starting means for reading a protocol / data starting command in the control command program;
Based on the protocol data activation command read by the protocol activation means, communication means for communicating with the external device by the first protocol data stored in the communication data storage unit;
Based on the communication test command received from the communication test command means, communication test means for communicating with the external device by the second protocol data stored in the communication test data storage unit;
A control system characterized by comprising:
前記エンジニアリング・ツールは、前記第2のプロトコル・データを前記交信テスト・データ記憶部に書き込み、
前記PLCは、交信テスト指令データ記憶部を備え、
前記交信テスト指令手段は、前記交信テスト指令データ記憶部に交信テスト指令データを書き込み、
前記交信テスト手段は、前記交信テスト指令手段により前記交信テスト指令データ記憶部に書き込まれる前記交信テスト指令データに基づき、前記交信テスト・データ記憶部に記憶される前記第2のプロトコル・データにより前記外部機器と交信する
ことを特徴とする請求項1記載の制御システム。
The engineering tool, writes the second protocol data to the communication test data storage unit,
The PLC includes a communication test command data storage unit,
The communication test command means writes the communication test command data in the communication test command data storage unit,
The communication test means is based on the second protocol data stored in the communication test data storage section based on the communication test command data written in the communication test command data storage section by the communication test instruction means. The control system according to claim 1, wherein the control system communicates with an external device.
前記PLCは、前記交信テスト指令手段により前記交信テスト指令データ記憶部に書き込まれる前記交信テスト指令データを交信テスト完了データに書き換えることを特徴とする請求項2記載の制御システム。 The PLC is control system according to claim 2, wherein the rewriting Turkey the communication test command data to be written to the communication test instruction data storage unit by the communication test command means in the communication test completion data. 前記交信テスト指令手段は、前記第2のプロトコル・データを前記交信テスト・データ記憶部に書き込み、
前記交信テスト手段は、前記交信テスト指令手段により前記交信テスト・データ記憶部に書き込まれる前記第2のプロトコル・データにより前記外部機器と交信する
ことを特徴とする請求項1記載の制御システム。
The communication test command means writes the second protocol data into the communication test data storage unit,
2. The control system according to claim 1, wherein the communication test means communicates with the external device by the second protocol data written in the communication test data storage unit by the communication test command means.
前記PLCは、前記交信テスト指令手段により前記交信テスト・データ記憶部に書き込まれる前記第2のプロトコル・データを削除することを特徴とする請求項4記載の制御システム。 The PLC is control system according to claim 4, wherein the benzalkonium delete the second protocol data to be written to the communication test data storage unit by the communication test command means. PLCと、
前記PLCに接続されるエンジニアリング・ツールと、
前記PLCに接続される外部機器と、を備えた制御システムにおいて、
前記PLCが制御指令プログラム中のプロトコル・データ起動指令を読み込むプロトコル起動ステップと、
前記PLCが前記プロトコル起動ステップにて読み込んだ前記プロトコル・データ起動指令に基づき、前記PLCに設けられた交信データ記憶部に記憶される第1のプロトコル・データにより前記外部機器と交信する交信ステップと、
前記エンジニアリング・ツールが前記PLCに対し交信テスト指令をする交信テスト指令ステップと、
前記PLCが前記交信テスト指令ステップにて受けた前記交信テスト指令に基づき、前記PLCに設けられた交信テスト・データ記憶部に記憶される第2のプロトコル・データにより前記外部機器と交信する交信テスト・ステップと、
を備えたことを特徴とする制御システムの交信方法。
PLC and
An engineering tool connected to the PLC;
In a control system comprising an external device connected to the PLC,
A protocol starting step in which the PLC reads a protocol / data starting command in the control command program;
A communication step of communicating with the external device by the first protocol data stored in the communication data storage unit provided in the PLC based on the protocol data activation command read by the PLC in the protocol activation step; ,
A communication test command step in which the engineering tool issues a communication test command to the PLC;
A communication test in which the PLC communicates with the external device based on the second protocol data stored in the communication test data storage unit provided in the PLC based on the communication test command received in the communication test command step.・ Step and
A control system communication method characterized by comprising:
前記エンジニアリング・ツールが前記第2のプロトコル・データを前記交信テスト・データ記憶部に書き込む第2プロトコル書込ステップを備え、
前記交信テスト指令ステップは、前記第2プロトコル書込ステップの後、前記エンジニアリング・ツールが前記PLCに設けられた交信テスト指令データ記憶部に交信テスト指令データを書き込み、
前記交信テスト・ステップは、前記PLCが前記交信テスト指令ステップにて前記交信テスト指令データ記憶部に書き込まれた前記交信テスト指令データに基づき前記第2のプロトコル・データにより前記外部機器と交信する
ことを特徴とする請求項6記載の制御システムの交信方法。
A second protocol writing step in which the engineering tool writes the second protocol data to the communication test data storage unit;
In the communication test command step, after the second protocol writing step, the engineering tool writes communication test command data in a communication test command data storage unit provided in the PLC,
In the communication test step, the PLC communicates with the external device by the second protocol data based on the communication test command data written in the communication test command data storage unit in the communication test command step. The communication method of the control system according to claim 6.
前記交信テスト・ステップの後、前記PLCが前記交信テスト指令ステップにて前記交信テスト指令データ記憶部に書き込まれた前記交信テスト指令データを交信テスト完了データに書き換える完了書込ステップと、
を備えたことを特徴とする請求項7記載の制御システムの交信方法。
After the communication test step, a completion writing step in which the PLC rewrites the communication test command data written in the communication test command data storage unit in the communication test command step to communication test completion data;
8. The control system communication method according to claim 7, further comprising:
前記交信テスト指令ステップは、前記エンジニアリング・ツールが前記第2のプロトコル・データを前記交信テスト・データ記憶部に書き込み、
前記交信テスト・ステップは、前記PLCが前記交信テスト指令ステップにて前記交信テスト・データ記憶部に書き込まれる前記第2のプロトコル・データにより前記外部機器と交信する
ことを特徴とする請求項6記載の制御システムの交信方法。
In the communication test command step, the engineering tool writes the second protocol data in the communication test data storage unit,
7. The communication test step is characterized in that the PLC communicates with the external device by the second protocol data written in the communication test data storage unit in the communication test command step. Control system communication method.
前記交信テスト・ステップの後、前記PLCが前記交信テスト指令ステップにて前記交信テスト・データ記憶部に書き込まれた前記第2のプロトコル・データを削除する第2プロトコル削除ステップと、
を備えたことを特徴とする請求項9記載の制御システムの交信方法。
After the communication test step, the PLC deletes the second protocol data written in the communication test data storage unit in the communication test command step;
The communication method of the control system according to claim 9, further comprising:
第1のプロトコル・データを記憶する交信データ記憶部と、
第2のプロトコル・データを記憶する交信テスト・データ記憶部と、
CPUユニットによりプロトコル・データ起動指令がされたか否かを判断する交信指令判断手段と、
前記交信指令判断手段にて、前記プロトコル・データ起動指令がされたと判断した場合、前記交信データ記憶部に記憶される前記第1のプロトコル・データにより外部機器と交信する交信手段と、
エンジニアリング・ツールにより交信テスト指令がされたか否かを判断する交信テスト指令判断手段と、
前記交信テスト指令判断手段にて、前記交信テスト指令がされたと判断した場合、前記交信テスト・データ記憶部に記憶される前記第2のプロトコル・データにより前記外部機器と交信する交信テスト手段と、
を備えたことを特徴とする通信ユニット。
A communication data storage unit for storing the first protocol data;
A communication test data storage unit for storing second protocol data;
A communication command determining means for determining whether or not a protocol / data start command has been issued by the CPU unit;
If the communication command determining means determines that the protocol / data activation command has been issued, the communication means for communicating with an external device using the first protocol data stored in the communication data storage unit;
A communication test command determination means for determining whether a communication test command has been issued by the engineering tool;
When the communication test command determining means determines that the communication test command has been issued, communication test means for communicating with the external device by the second protocol data stored in the communication test data storage unit;
A communication unit comprising:
交信テスト指令データ記憶部を備え、
前記交信テスト指令判断手段は、前記交信テスト指令データ記憶部に交信テスト指令データが書き込まれているか否かを判断し、
前記交信テスト手段は、前記交信テスト指令判断手段にて、前記交信テスト指令データ記憶部に前記交信テスト指令データが書き込まれていると判断した場合、前記交信テスト・データ記憶部に記憶される前記第2のプロトコル・データにより前記外部機器と交信することを特徴とする請求項11記載の通信ユニット。
A communication test command data storage unit is provided.
The communication test command determination means determines whether or not communication test command data is written in the communication test command data storage unit,
The communication test means, when the communication test command determination means determines that the communication test command data is written in the communication test command data storage unit, the communication test data storage unit stores the communication test command data. 12. The communication unit according to claim 11, wherein the communication unit communicates with the external device using second protocol data.
前記交信テスト指令判断手段は、前記交信テスト・データ記憶部に前記第2のプロトコル・データが書き込まれているか否かを判断し、
前記交信テスト手段は、交信テスト指令判断手段にて、前記交信テスト・データ記憶部に前記第2のプロトコル・データが書き込まれていると判断した場合、前記第2のプロトコル・データにより前記外部機器と交信する
ことを特徴とする請求項11記載の通信ユニット。
The communication test command determination means determines whether or not the second protocol data is written in the communication test data storage unit,
When the communication test command determining unit determines that the second protocol data is written in the communication test data storage unit, the communication test unit determines the external device based on the second protocol data. The communication unit according to claim 11, wherein the communication unit communicates with the communication unit.
第1のプロトコル・データを記憶する交信データ記憶部および第2のプロトコル・データを記憶する交信テスト・データ記憶部を有する通信ユニットにおいて、
CPUユニットによりプロトコル・データ起動指令がされたか否かを判断する交信指令判断ステップと、
前記交信指令判断ステップにて、前記プロトコル・データ起動指令がされたと判断した場合、前記交信データ記憶部に記憶される前記第1のプロトコル・データにより外部機器と交信する交信ステップと、
エンジニアリング・ツールにより交信テスト指令がされたか否かを判断する交信テスト指令判断ステップと、
前記交信テスト指令判断ステップにて、前記交信テスト指令がされたと判断した場合、前記交信テスト・データ記憶部に記憶される前記第2のプロトコル・データにより前記外部機器と交信する交信テスト・ステップと、
を備えたことを特徴とする通信ユニットの交信方法。
In a communication unit having a communication data storage unit for storing first protocol data and a communication test data storage unit for storing second protocol data,
A communication command determination step for determining whether or not a protocol / data start command has been issued by the CPU unit;
If it is determined in the communication command determination step that the protocol data activation command has been issued, a communication step of communicating with an external device using the first protocol data stored in the communication data storage unit;
A communication test command determination step for determining whether a communication test command has been issued by the engineering tool;
A communication test step of communicating with the external device by the second protocol data stored in the communication test data storage unit when it is determined in the communication test command determining step that the communication test command has been made; ,
A communication unit communication method characterized by comprising:
前記通信ユニットは、さらに交信テスト指令データ記憶部を有し、
前記交信テスト指令判断ステップは、前記交信テスト指令データ記憶部に交信テスト指令データが書き込まれているか否かを判断し、
前記交信テスト・ステップは、前記交信テスト指令判断ステップにて、前記交信テスト指令データ記憶部に前記交信テスト指令データが書き込まれていると判断した場合、前記交信テスト・データ記憶部に記憶される前記第2のプロトコル・データにより前記外部機器と交信する
ことを特徴とする請求項14記載の通信ユニットの交信方法。
The communication unit further includes a communication test command data storage unit,
The communication test command determination step determines whether communication test command data is written in the communication test command data storage unit,
The communication test step is stored in the communication test data storage unit when it is determined in the communication test command determination step that the communication test command data is written in the communication test command data storage unit. 15. The communication unit communication method according to claim 14, wherein communication with the external device is performed by the second protocol data.
前記交信テスト指令判断ステップは、前記交信テスト・データ記憶部に前記第2のプロトコル・データが書き込まれているか否かを判断し、
前記交信テスト・ステップは、交信テスト指令判断ステップにて、前記交信テスト・データ記憶部に前記第2のプロトコル・データが書き込まれていると判断した場合、前記第2のプロトコル・データにより前記外部機器と交信する
ことを特徴とする請求項14記載の通信ユニットの交信方法。
The communication test command determination step determines whether or not the second protocol data is written in the communication test data storage unit,
In the communication test step, when it is determined in the communication test command determination step that the second protocol data is written in the communication test data storage unit, the external test data is determined by the second protocol data. 15. The communication method for a communication unit according to claim 14, wherein communication is performed with a device.
JP2009214475A 2009-09-16 2009-09-16 Control system, control system communication method, communication unit, and communication unit communication method Expired - Fee Related JP5287630B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009214475A JP5287630B2 (en) 2009-09-16 2009-09-16 Control system, control system communication method, communication unit, and communication unit communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009214475A JP5287630B2 (en) 2009-09-16 2009-09-16 Control system, control system communication method, communication unit, and communication unit communication method

Publications (2)

Publication Number Publication Date
JP2011065346A JP2011065346A (en) 2011-03-31
JP5287630B2 true JP5287630B2 (en) 2013-09-11

Family

ID=43951536

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009214475A Expired - Fee Related JP5287630B2 (en) 2009-09-16 2009-09-16 Control system, control system communication method, communication unit, and communication unit communication method

Country Status (1)

Country Link
JP (1) JP5287630B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114035050A (en) * 2021-11-19 2022-02-11 深圳市新威尔电子有限公司 Battery detection system control method based on PLC

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4554809B2 (en) * 2000-12-20 2010-09-29 株式会社キーエンス Communication protocol creation method, communication protocol creation device, communication protocol creation program, and recording medium recording the same

Also Published As

Publication number Publication date
JP2011065346A (en) 2011-03-31

Similar Documents

Publication Publication Date Title
TWI564685B (en) Enginnering tool, program editing device and program editing system
WO2015136959A1 (en) Control system, method, program and information processing device
JP2008282363A (en) Programmable controller, program creation support device, computer program and programmable logic controller (plc) system
JP5992776B2 (en) Programmable controller, program creation support device, program, and basic unit
TWI541622B (en) Apparatus for supporting the compilation of a sequence program
EP2816427A1 (en) Plc simulation system, plc simulator, recording medium, and simulation method
JP5785501B2 (en) Ladder program creation device
JP4849261B2 (en) Safety application creation support device
JP6442131B2 (en) Control system and control device
JP6201298B2 (en) Controller and program
JP4883314B2 (en) Data trace system using PLC
JP2006330867A (en) Management system of program change history, program editing device applied to the system, and program
JP5279534B2 (en) Programmable controller and data collection device
JP5287630B2 (en) Control system, control system communication method, communication unit, and communication unit communication method
JP5566473B2 (en) System design equipment
JP5141895B2 (en) PLC program development support device
JP4390079B2 (en) Control system
JP3359562B2 (en) Display screen creation method for programmable display device
JP5492573B2 (en) Device / PLC simulator device, method, and program having trace function
JP7241982B1 (en) Image generation program, image generation device, programmable controller system and image generation method
JP5951041B2 (en) Programmable display
JPWO2019207679A1 (en) Monitor support device, monitor support method, and monitor support program
JP6725567B2 (en) Numerical control device
JP3309434B2 (en) PC programming device
JP2008234379A (en) Software generation device and software generation method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110621

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120904

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121022

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130520

R151 Written notification of patent or utility model registration

Ref document number: 5287630

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees