JP4859601B2 - Programmable display and drawing device - Google Patents

Programmable display and drawing device Download PDF

Info

Publication number
JP4859601B2
JP4859601B2 JP2006247883A JP2006247883A JP4859601B2 JP 4859601 B2 JP4859601 B2 JP 4859601B2 JP 2006247883 A JP2006247883 A JP 2006247883A JP 2006247883 A JP2006247883 A JP 2006247883A JP 4859601 B2 JP4859601 B2 JP 4859601B2
Authority
JP
Japan
Prior art keywords
data
command
communication
screen
common attribute
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
JP2006247883A
Other languages
Japanese (ja)
Other versions
JP2008071033A (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.)
Idec Corp
Original Assignee
Idec 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 Idec Corp filed Critical Idec Corp
Priority to JP2006247883A priority Critical patent/JP4859601B2/en
Publication of JP2008071033A publication Critical patent/JP2008071033A/en
Application granted granted Critical
Publication of JP4859601B2 publication Critical patent/JP4859601B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

この発明は、プログラマブル表示器と外部機器とのデータ通信に関するものであり、特にその通信プログラム開発の容易化に関するものである。   The present invention relates to data communication between a programmable display and an external device, and particularly relates to facilitating development of the communication program.

プログラマブル・ロジック・コントローラ(PLC)、ロボットなどの外部機器に制御指示を与えたり、外部機器のデータを表示したりするために、プログラマブル表示器が用いられている。   A programmable display is used to give a control instruction to an external device such as a programmable logic controller (PLC) or a robot, or to display data of the external device.

プログラマブル表示器は表示やボタンなどの汎用性が高いが、その反面、外部機器とデータのやりとり(通信)を行うためのインターフェイス・プログラムを用意しなければならない。このインターフェイス・プログラムの作成は必ずしも容易ではなく、従来、様々な工夫がなされている。   Programmable displays are highly versatile, such as displays and buttons, but on the other hand, an interface program for exchanging data with external devices (communication) must be prepared. Creation of this interface program is not always easy, and various ideas have been made in the past.

特許文献1には、予め複数のPLCに対するインターフェイス・プログラムを作成支援装置に用意しておき、ユーザがこれらインターフェイス・プログラムを選択し、作成支援装置からプログラマブル表示器に転送して使用するものである。ユーザは、PLCの機種に対応するインターフェイス・プログラムを選択するだけでよいという利点がある。   In Patent Document 1, an interface program for a plurality of PLCs is prepared in advance in a creation support apparatus, and the user selects these interface programs and transfers them from the creation support apparatus to a programmable display for use. . There is an advantage that the user only has to select an interface program corresponding to the PLC model.

特許文献2には、通信プロトコルを自動解析して、インターフェイス・プログラムを生成する作成装置が開示されている。ユーザは、PLCのプロトコルなどを知らなくとも、インターフェイス・プログラムを作成できるという利点がある。   Patent Document 2 discloses a creation device that automatically analyzes a communication protocol and generates an interface program. There is an advantage that the user can create an interface program without knowing the PLC protocol or the like.

特許文献3には、プロトコルマクロにて記述した、定数および変数について、アドレスが自動的に割り当てられるプロトコル作成方法が開示されている。プロトコルマクロを効率的に作成できるという利点がある。   Patent Document 3 discloses a protocol creation method in which addresses are automatically assigned to constants and variables described in a protocol macro. There is an advantage that a protocol macro can be created efficiently.

特許3356530Patent 3356530

特開2002−300226JP 2002-300226

特開2002−189505JP 2002-189505 A

しかしながら、上記の従来技術には次のような問題があった。   However, the above prior art has the following problems.

特許文献1のものでは、予め登録されていないPLCについては、新たにインターフェイス・プログラムを作成しなければならないという問題があった。   The one in Patent Document 1 has a problem that a new interface program has to be created for a PLC that is not registered in advance.

特許文献2のものでは、一つのフレームによって各命令が構成されるような単純なプロトコルについては対応できるが、複数フレームによってマクロ命令が構成されるような場合や、分岐などがある複雑なプログラムについては、対応することができなかった。   With the thing of patent document 2, although it can respond to a simple protocol in which each instruction is constituted by one frame, a case where a macro instruction is constituted by a plurality of frames, or a complicated program having a branch or the like Could not respond.

特許文献3のものでは、アドレスを自動的に割り当てることはできるものの、PLCの機種に応じてインターフェイス・プログラムを自動的に生成するものではなかった。   In Patent Document 3, although an address can be automatically assigned, an interface program is not automatically generated according to the PLC model.

この発明は上記のような問題点を解決して、PLC等の外部機器の機種を問わずに、インターフェイス・プログラムの作成が容易なプログラマブル表示器および作画装置を提供することを目的とする。   SUMMARY OF THE INVENTION An object of the present invention is to solve the above-described problems and provide a programmable display and a drawing device that can easily create an interface program regardless of the type of an external device such as a PLC.

(1)この発明の一側面によるプログラマブル表示器は、デバイスを有する外部機器とデータ通信するプログラマブル表示器であって、外部機器との通信の基本処理を行うインターフェイス基本コマンドと、外部機器のデバイスの種類毎に設けられ少なくともデータ桁数、アドレス桁数、種別コードを含むデバイス情報データと、少なくともアドレスおよびデータのデータ形式を含む通信コマンド共通属性データとを記録した記録部と、前記インターフェイス基本コマンドにしたがって、特定デバイスについて、通信相手先のデバイスに対応するデバイス情報データと通信コマンド共通属性データに基づいて外部機器と通信する通信手段と、を備えている。 (1) A programmable display according to one aspect of the present invention is a programmable display that performs data communication with an external device having a device, and includes an interface basic command that performs basic processing of communication with the external device, and a device of the external device. A recording unit that is provided for each type and records device information data including at least the number of data digits, the number of address digits, and a type code, and communication command common attribute data including at least the data format of the address and data, and the interface basic command Accordingly, the specific device includes communication means for communicating with the external device based on the device information data corresponding to the communication partner device and the communication command common attribute data.

したがって、インターフェイス基本コマンドおよび通信コマンド共通属性データとともに、外部機器のデバイス毎に設けられたデバイス情報データに基づいて、外部機器とのデータのやりとりが実現され汎用性が高い。また、これら、通信コマンド共通属性データ、デバイス情報データを設けておけば、外部機器とのインターフェイスのための動作プログラムを、外部機器の機種への依存性を小さくして作成することができる。   Therefore, based on the device basic data and the communication command common attribute data and the device information data provided for each device of the external device, data exchange with the external device is realized and the versatility is high. If these communication command common attribute data and device information data are provided, an operation program for interfacing with an external device can be created with less dependence on the model of the external device.

(2)この発明の一側面によるプログラマブル表示器は、通信手段は、読み出しの場合は、デバイス情報データと通信コマンド共通属性データとフレームフォーマットとに基づいて受信したフレームを解析し、書き込みの場合は、デバイス情報データと通信コマンド共通属性データとに基づいてフレームを生成して外部機器に送信することを特徴としている。 (2) In the programmable display device according to one aspect of the present invention, the communication means analyzes the received frame based on the device information data, the communication command common attribute data, and the frame format in the case of reading, and in the case of writing. The method is characterized in that a frame is generated based on device information data and communication command common attribute data and transmitted to an external device.

したがって、外部機器の機種に拘わらず、データの送受信を行うことが可能となる。   Therefore, data can be transmitted and received regardless of the type of external device.

(3)この発明の一側面によるプログラマブル表示器は、特定デバイスは、画面読み出しデバイステーブルまたは画面書き込みデバイステーブルに登録されたデバイスであることを特徴としている。 (3) The programmable display device according to one aspect of the present invention is characterized in that the specific device is a device registered in the screen reading device table or the screen writing device table.

(4)この発明の一側面による作画装置は、プログラマブル表示器のプロジェクトデータを生成して出力する作画装置であって、外部機器との通信の基本処理を行うインターフェイス基本コマンドを記録した記録部と、外部機器との間でのデータの送受信を含む命令を備えて構成される通信プロトコルを、ユーザとの対話によって生成する対話生成手段と、外部機器のデバイスの種類毎に少なくともデータ桁数、アドレス桁数、種別コードを含むデバイス情報データおよび少なくともアドレスおよびデータのデータの形式を含む通信コマンド共通属性データをユーザが入力するための入力手段と、前記通信プロトコルとインターフェイス基本コマンドとデバイス情報データと通信コマンド共通属性データとを含むプロジェクトデータを出力する出力手段とを備えている。 (4) A drawing device according to one aspect of the present invention is a drawing device that generates and outputs project data of a programmable display, and a recording unit that records an interface basic command for performing basic processing of communication with an external device; , A dialog generation means for generating a communication protocol including a command including transmission / reception of data with an external device by a dialog with a user, and at least the number of data digits and an address for each type of the device of the external device Input means for a user to input device information data including the number of digits, type code, and communication command common attribute data including at least address and data format, communication protocol, interface basic command, device information data and communication Output project data including command common attribute data And a means.

したがって、外部機器の機種に依存するインターフェイス基本コマンド、通信プロトコルデータ、デバイス情報データ、通信コマンド共通属性データと、外部機器の機種依存性の小さい動作プログラムとに分離することによって、異なる機種の外部機器への対応が容易となる。すなわち、一旦、インターフェイス基本コマンド、デバイス情報データ、通信コマンド共通属性データを記憶しておけば、外部機器の機種依存性の小さい動作プログラムを生成することで簡単にインターフェイスを実現できる。また、インターフェイス基本コマンド、デバイス情報データ、通信コマンド共通属性データを用意すれば、作成した動作プログラムを他の機種の外部機器にもそのまま、あるいは、わずかな修正で用いることができる。   Therefore, by separating the interface basic commands, communication protocol data, device information data, communication command common attribute data that depend on the model of the external device, and operation programs that are less dependent on the model of the external device, It becomes easy to handle. That is, once the interface basic command, device information data, and communication command common attribute data are stored, an interface can be easily realized by generating an operation program with little model dependence of the external device. In addition, if the interface basic command, device information data, and communication command common attribute data are prepared, the created operation program can be used as it is for an external device of another model or with a slight modification.

(a)この発明の一側面によるマン・マシン・インターフェイス機器は、プログラマブル・コントローラに接続され、プログラマブル・コントローラとの間でデータのやりとりを行うマン・マシン・インターフェイス機器であって、プログラマブル・コントローラのデバイス毎に少なくともデータ桁数を含むデバイス情報データを記録した記録部と、プログラマブル・コントローラの特定デバイスからのデータを受信する際には、当該特定デバイスに対応して記録されたデバイス情報に基づいて、データ内容を解釈する受信処理手段と、プログラマブル・コントローラの特定デバイスへデータを送信する際には、当該特定デバイスに対応して記録されたデバイス情報に基づいて、プログラマブル・コントローラに対する送信データを生成して送信する送信処理手段とを備えている。 (a) A man-machine interface device according to one aspect of the present invention is a man-machine interface device that is connected to a programmable controller and exchanges data with the programmable controller. When receiving data from a specific device of a programmable controller and a recording unit that records device information data including at least the number of data digits for each device, based on the device information recorded corresponding to the specific device When data is transmitted to the specific device of the programmable controller and the reception processing means for interpreting the data content, transmission data for the programmable controller is generated based on the device information recorded corresponding to the specific device. Then send And a that transmission processing means.

(b)この発明に係るマン・マシン・インターフェイスプログラムは、プログラマブル・コントローラに接続され、プログラマブル・コントローラとの間でデータのやりとりを行うマン・マシン・インターフェイス機器をコンピュータによって実現するためのプログラムであって、プログラマブル・コントローラの特定デバイスからのデータを受信する際には、当該特定デバイスに対応して記録部に記録されたデバイス情報に基づいて、データ内容を解釈する受信処理手段と、プログラマブル・コントローラの特定デバイスへデータを送信する際には、当該特定デバイスに対応して記録部に記録されたデバイス情報に基づいて、プログラマブル・コントローラに対する送信データを生成して送信する送信処理手段とをコンピュータによって実現するためのマン・マシン・インターフェイスプログラムである。 (b) The man-machine interface program according to the present invention is a program for realizing, by a computer, a man-machine interface device that is connected to the programmable controller and exchanges data with the programmable controller. When receiving data from a specific device of the programmable controller, a reception processing means for interpreting the data content based on device information recorded in the recording unit corresponding to the specific device, and the programmable controller When transmitting data to a specific device, the computer generates transmission processing means for generating and transmitting transmission data to the programmable controller based on the device information recorded in the recording unit corresponding to the specific device. Realize It is a man-machine interface program for.

(c)この発明に係るマン・マシン・インターフェイス機器は、記録部には、さらに、少なくともアドレスおよびデータのデータ形式を含む通信コマンド共通属性データが記録されており、前記受信処理手段は、各デバイスについて共通な通信コマンド共通属性データとフレームフォーマットとに基づいて、受信したフレームを解析し、前記特定デバイスに対応するデバイス情報に基づいて、受信したデータの内容を解析し、前記送信処理手段は、前記特定デバイスに対応するデバイス情報に基づいて、プログラマブル・コントローラが内容を理解できるデータを構築し、各デバイスについて共通な通信コマンド共通属性データとフレームフォーマットとに基づいて、送信すべきフレームを構築(作成)して送信することを特徴としている。 (c) In the man-machine interface device according to the present invention, the recording unit further records communication command common attribute data including at least an address and a data format of the data, and the reception processing means includes each device Analyzing the received frame based on the common communication command common attribute data and the frame format, analyzing the content of the received data based on the device information corresponding to the specific device, the transmission processing means, Based on device information corresponding to the specific device, data that can be understood by the programmable controller is constructed, and a frame to be transmitted is constructed on the basis of common communication command attribute data and frame format common to each device ( (Created) and transmitted.

(d)この発明に係るマン・マシン・インターフェイス機器は、デバイス情報は、さらに、デバイスが書込用であるか読出用であるかを示す種別とデバイスのアドレス桁数を含むことを特徴としている。 (d) In the man-machine interface device according to the present invention, the device information further includes a type indicating whether the device is for writing or reading, and the number of address digits of the device. .

(e)この発明に係るマン・マシン・インターフェイス機器は、通信コマンド共通属性は、さらに、アドレスおよびデータの格納方法とパリティチェック方法を含むことを特徴としている。 (e) The man-machine interface device according to the present invention is characterized in that the communication command common attribute further includes an address and data storage method and a parity check method.

(f)この発明に係るデータ通信方法は、プログラマブル・コントローラとマン・マシン・インターフェイス機器との間のデータ通信方法であって、マン・マシン・インターフェイス機器に、プログラマブル・コントローラのデバイス毎に少なくともデータ桁数を含むデバイス情報データを記録し、マン・マシン・インターフェイス機器において、プログラマブル・コントローラの特定デバイスからのデータを受信する際には、当該特定デバイスに対応して記録されたデバイス情報に基づいて、データ内容を解釈し、マン・マシン・インターフェイス機器において、プログラマブル・コントローラの特定デバイスへデータを送信する際には、当該特定デバイスに対応して記録されたデバイス情報に基づいて、プログラマブル・コントローラに対する送信データを生成して送信することを特徴としている。 (f) A data communication method according to the present invention is a data communication method between a programmable controller and a man-machine interface device, and the man-machine interface device includes at least data for each device of the programmable controller. When device information data including the number of digits is recorded and data is received from a specific device of the programmable controller in the man-machine interface device, the device information is recorded based on the device information recorded corresponding to the specific device. When interpreting data contents and transmitting data to a specific device of a programmable controller in a man-machine interface device, the data is recorded in the programmable controller based on the device information recorded corresponding to the specific device. Against It is characterized by generating and transmitting transmission data.

(g)この発明に係るデータ通信方法は、マン・マシン・インターフェイス機器がデバイスを有するプログラマブル・コントローラとデータ通信する方法であって、マン・マシン・インターフェイス機器に、プログラマブル・コントローラとの通信の基本処理を行うインターフェイス基本プログラムと、プログラマブル・コントローラのデバイス毎に設けられ少なくともデータ桁数を含むデバイス情報データと、少なくともアドレスおよびデータのデータ形式を含む通信コマンド共通属性データとを記録しておき、プログラマブル・コントローラの特定デバイスからのデータを受信する際には、前記インターフェイス基本プログラムが、通信相手先のデバイスに対応するデバイス情報データと、通信コマンド共通属性データとフレームフォーマットとに基づいて、プログラマブル・コントローラからのデータを解釈し、プログラマブル・コントローラの特定デバイスへデータを送信する際には、前記インターフェイス基本プログラムが、通信相手先のデバイスに対応するデバイス情報データと、通信コマンド共通属性データとフレームフォーマットとに基づいて、データを生成しプログラマブル・コントローラに送信することを特徴としている。 (g) A data communication method according to the present invention is a method in which a man-machine interface device performs data communication with a programmable controller having a device, and the man-machine interface device has a basic communication with the programmable controller. The basic interface program for processing, device information data provided for each programmable controller device, including at least the number of data digits, and communication command common attribute data including at least the address and data format are recorded and programmable. When receiving data from a specific device of the controller, the interface basic program reads device information data corresponding to the communication partner device, communication command common attribute data, and frame format. When the data from the programmable controller is interpreted based on the above and the data is transmitted to the specific device of the programmable controller, the interface basic program communicates with the device information data corresponding to the communication partner device, Based on the command common attribute data and the frame format, data is generated and transmitted to the programmable controller.

(h)この発明に係る作画装置は、プロジェクトデータを生成し、マン・マシン・インターフェイス機器に送信する作画装置であって、プログラマブル・コントローラとの通信の基本処理を行うインターフェイス基本コマンドを記録した記録部と、インターフェイス基本コマンドを含む命令を備えて構成される通信プロトコルを、ユーザとの対話によって生成する対話生成手段と、プログラマブル・コントローラのデバイス毎に少なくともデータ桁数を含むデバイス情報データおよび少なくともアドレスおよびデータのデータ形式を含む通信コマンド共通属性データをユーザが入力するための入力手段と、前記通信プロトコルとインターフェイス基本コマンドとデバイス情報データと通信コマンド共通属性データとを含むプロジェクトデータをマン・マシン・インターフェイス機器に送信する送信手段とを備えている。 (h) A drawing device according to the present invention is a drawing device that generates project data and transmits it to a man-machine interface device, and records a basic interface command for performing basic processing of communication with a programmable controller. And a communication generating means for generating a communication protocol comprising instructions including interface basic commands by interaction with the user, device information data including at least the number of data digits for each device of the programmable controller, and at least an address And project data including input means for a user to input communication command common attribute data including the data format of the data, the communication protocol, interface basic command, device information data, and communication command common attribute data. - and a transmitting means for transmitting to the machine-interface devices.

この発明において「マン・マシン・インターフェイス機器」とは、機械と人間とのインターフェイスをとるための機器をいい、プログラマブル表示器などがこれに該当する。   In the present invention, the “man-machine interface device” means a device for taking an interface between a machine and a human, and a programmable display or the like corresponds to this.

「プログラマブル表示器」とは、少なくともPLCなどの状態を確認することのできる装置をいい、さらにPLCなどに指令を与えるようになっていてもよい。また、PLCだけでなく、ロボットなどを対象としてもよい。   The “programmable display” means a device that can confirm at least the state of the PLC or the like, and may give a command to the PLC or the like. Further, not only the PLC but also a robot or the like may be targeted.

「記録部」とは、少なくともデバイス情報データを記録することのできるものをいい、メモリ、ハードディスク、CD−ROMなどの形式を問わない。実施形態では、P−ROM30やメモリ28がこれに該当する。   The “recording unit” refers to a unit that can record at least device information data, and may be in any form such as a memory, a hard disk, or a CD-ROM. In the embodiment, the P-ROM 30 and the memory 28 correspond to this.

「通信手段」とは、少なくともPLCからのデータを受信する事のできる手段をいう。実施形態では、図12のステップS3等がこれに対応する。   “Communication means” means means capable of receiving at least data from the PLC. In the embodiment, step S3 in FIG. 12 corresponds to this.

「プログラム」とは、CPUにより直接実行可能なプログラムだけでなく、ソース形式のプログラム、圧縮処理がされたプログラム、暗号化されたプログラム等を含む概念である。   The “program” is a concept that includes not only a program that can be directly executed by the CPU, but also a source format program, a compressed program, an encrypted program, and the like.

発明を実施するための形態BEST MODE FOR CARRYING OUT THE INVENTION

1.全体的構成
図1に、この発明の一実施形態によるマン・マシン・インターフェイス機器としてのプログラマブル表示器2の機能ブロック図を示す。送信処理手段8は、動作プログラムからの指令を受けて、動作プログラムによって、直接または間接的に指定されたPLC4(外部機器)のデバイスD1、D2・・・Dnのいずれかに対してデータを送信して書き込む。この際、送信処理手段8は、PLC4とのデータやりとりのためのインターフェイス基本コマンド12、共通属性データ14、デバイス情報データ16を参照して、指定されたデバイスD1、D2・・・Dnとの通信を行う。
1. Overall Configuration FIG. 1 is a functional block diagram of a programmable display 2 as a man-machine interface device according to an embodiment of the present invention. The transmission processing means 8 receives a command from the operation program and transmits data to any one of the devices D1, D2,... Dn of the PLC 4 (external device) designated directly or indirectly by the operation program. And write. At this time, the transmission processing means 8 refers to the interface basic command 12, the common attribute data 14, and the device information data 16 for data exchange with the PLC 4, and communicates with the designated devices D1, D2,. I do.

ここで、インターフェイス基本コマンド12は、PLC4との通信のための基本となるコマンドである。具体的には、PLC4のデバイスに対する書込リクエスト送信コマンド(デバイスに対してデータの書込を求める)、書込レスポンス受信コマンド(デバイスからの書込完了の連絡)、読出リクエスト送信コマンド(デバイスデータの読出を求める)、読出レスポンス受信コマンド(デバイスからのデータの受信)などのコマンドのフレームフォーマットを、インターフェイス基本コマンド12として記録している。なお、このインターフェイス基本コマンド12は、PLCの種類によって異なるものである。したがって、PLCの各機種毎に用意しておくことが好ましい。   Here, the interface basic command 12 is a basic command for communication with the PLC 4. Specifically, a write request transmission command to the PLC 4 device (requests data writing to the device), a write response reception command (notification of writing completion from the device), a read request transmission command (device data) The frame format of the command such as a read response reception command (reception of data from the device) is recorded as the interface basic command 12. The interface basic command 12 varies depending on the type of PLC. Therefore, it is preferable to prepare for each model of PLC.

共通属性データ14は、上記のインターフェイス基本コマンド12をPLC4との間でやりとりするために必要な属性である。アドレスやデータの形式(ASCIIコードかBINコードかなど)、アドレスやデータの格納方式(上位バイトからあるいは下位バイトから格納されているかなど)、パリティチェックの方式などについての属性が記述されている。この属性は、各コマンドに共通な属性であり、PLCの機種毎に異なるのが通常である。したがって、PLCの各機種毎に用意しておくことが好ましい。   The common attribute data 14 is an attribute necessary for exchanging the interface basic command 12 with the PLC 4. Attributes such as address and data format (ASCII code or BIN code, etc.), address and data storage system (whether stored from upper byte or lower byte, etc.), parity check system, etc. are described. This attribute is an attribute common to each command and is usually different for each PLC model. Therefore, it is preferable to prepare for each model of PLC.

デバイス情報データ16は、デバイスとの通信を行う際の、アドレスの桁数、データの桁数などを記述したものである。このデバイス情報データ16は、同じPLCであってもデバイスの種類ごとに異なる。したがって、デバイスの種類毎に用意することが好ましい。   The device information data 16 describes the number of address digits, the number of data digits, and the like when communicating with a device. The device information data 16 is different for each type of device even in the same PLC. Therefore, it is preferable to prepare for each type of device.

送信処理手段8は、上記のインターフェイス基本コマンド12、共通属性データ14、デバイス情報データ16を参照して、指定されたデバイスD1、D2・・・Dnに対する書込を行う。   The transmission processing means 8 refers to the interface basic command 12, the common attribute data 14, and the device information data 16, and writes to the designated devices D1, D2,.

一方、受信処理手段6も同様に、上記のインターフェイス基本コマンド12、共通属性データ14、デバイス情報データ16を参照して、指定されたデバイスD1、D2・・・Dnからのデータの読み出しを行う。読み出したデータは、動作プログラムに与える。   On the other hand, the reception processing means 6 similarly reads the data from the designated devices D1, D2,... Dn with reference to the interface basic command 12, common attribute data 14, and device information data 16. The read data is given to the operation program.

なお、この実施形態では、送信処理手段8と受信処理手段6によって通信手段が構成されている。   In this embodiment, the transmission processing means 8 and the reception processing means 6 constitute a communication means.

2.ハードウエア構成およびデータ
図2に、プログラマブル表示器2のハードウエア構成を示す。CPU20には、タッチスクリーン22、入出力インターフェイス(I/F)24、入力キー26、メモリ28、P−ROM30、入出力インターフェイス(I/F)32が接続されている。入出力インターフェイス24は、PLC4との接続を行うものである。入出力インターフェイス32は、インターフェイスプログラム作成装置である作画装置5(後述)との接続を行うものである。
2. Hardware Configuration and Data FIG. 2 shows a hardware configuration of the programmable display 2. A touch screen 22, an input / output interface (I / F) 24, an input key 26, a memory 28, a P-ROM 30, and an input / output interface (I / F) 32 are connected to the CPU 20. The input / output interface 24 connects to the PLC 4. The input / output interface 32 is connected to a drawing device 5 (described later) which is an interface program creation device.

タッチスクリーン22は、ディスプレイの画面上に透明電極が配置され、表示するだけでなくユーザが入力可能に構成されている。入力キー26は、ハードウエアとしての入力ボタンである。メモリ28は、CPU20のワークエリアとして機能する。   The touch screen 22 is configured such that a transparent electrode is arranged on the screen of the display, and not only the display but also the user can input. The input key 26 is an input button as hardware. The memory 28 functions as a work area for the CPU 20.

プログラムROM(P−ROM)30には、システム処理プログラム34、画面データ36、画面デバイステーブル38、通信プロトコルプログラム40、インターフェイス基本コマンド12、通信コマンド共通属性データ14(共通属性データ)、デバイス情報テーブル16(デバイス情報データ)、動作プログラム42が記録されている。なお、通信コマンド共通属性データ14、デバイス情報テーブル16は、それぞれ、図1の共通属性データ14、デバイス情報データ16に対応するものであるから、同一の符号を付している。   The program ROM (P-ROM) 30 includes a system processing program 34, screen data 36, a screen device table 38, a communication protocol program 40, an interface basic command 12, communication command common attribute data 14 (common attribute data), and a device information table. 16 (device information data) and an operation program 42 are recorded. The communication command common attribute data 14 and the device information table 16 correspond to the common attribute data 14 and the device information data 16 in FIG.

P−ROM30に記録された通信コマンド共通属性データ14の例を、図3に示す。アドレス変換形式の「BCD−>ASCII」は、アドレスデータについて、プログラマブル表示器2ではBCDコードを使用しており、PLC4との通信ではASCIIコードを使用していることを示している。これにより、プログラマブル表示器2からPLC4にアドレスデータを送る場合には、ASCIIコードに変換して送信する必要があることがわかる。   An example of the communication command common attribute data 14 recorded in the P-ROM 30 is shown in FIG. The address conversion format “BCD-> ASCII” indicates that the address data uses the BCD code in the programmable display 2 and uses the ASCII code in communication with the PLC 4. Thereby, when sending address data from the programmable display 2 to PLC4, it turns out that it is necessary to convert into ASCII code and to transmit.

また、PLCの種類によっては、アドレスの格納方法が上位バイトからであったり、下位バイトからであったりする。アドレス格納方法は、これを示している。   Also, depending on the type of PLC, the address storage method may be from the upper byte or from the lower byte. The address storage method shows this.

データ変換形式、データ格納方法についても同様に記録されている。   The data conversion format and data storage method are also recorded in the same manner.

BCC計算では、PLC4との通信におけるパリティ値の計算方法を記述している。   In the BCC calculation, a parity value calculation method in communication with the PLC 4 is described.

P−ROM30に記録されたインターフェイス基本コマンド12の例を、図4に示す。図4Aは、デバイスからデータを読み出す際の読出要求コマンドである。先頭の定数部分は、このコマンドが読出要求コマンドであることを示すコードである。最後の定数部分は、このコマンドの終了を示している。「種別」「アドレス」「個数」「BCC」の部分は、可変長の項目だけが設定されておりコマンドは完成していない。これは、実行時に、システム処理プログラム34が、デバイス情報テーブル16などの情報をもとに「種別」「アドレス」「個数」「BCC」の部分の内容を生成して完成させて実行するからである。つまり、読出要求コマンドは、コマンドを生成するために用意されたスケルトン(コマンドの仮想的な骨格の構造(フレームフォーマット))である。なお、「個数」は、連続して読み出すアドレスの個数、「BCC」はパリティを示している。   An example of the interface basic command 12 recorded in the P-ROM 30 is shown in FIG. FIG. 4A shows a read request command for reading data from the device. The constant part at the head is a code indicating that this command is a read request command. The last constant part indicates the end of this command. In the “type”, “address”, “number”, and “BCC” portions, only variable length items are set, and the command is not completed. This is because, at the time of execution, the system processing program 34 generates and completes the contents of the “type”, “address”, “number”, and “BCC” portions based on information such as the device information table 16 and executes them. is there. That is, the read request command is a skeleton (a virtual skeleton structure of the command (frame format)) prepared for generating the command. “Number” indicates the number of addresses to be read continuously, and “BCC” indicates parity.

図4Bは、デバイスからデータを受信する際のデータ読出のコマンドである。デバイスからデータを読み出す際には、図4Aの読出要求をデバイスに与え、これに応答してデバイスから図4Bのコマンドとして送られてくるデータを受信する。このデータ読出コマンドも読出要求コマンドと同じように、先頭部分にデータ読出コマンドであることを示すコードが記述されている。これに続いて、「データ」「BCC」の項目が用意されている。システム処理プログラム34は、デバイスから受信したデータを、このデータ読出コマンドやデバイス情報テーブル16などにしたがって解釈して必要なデータを取得する。   FIG. 4B shows a data read command when data is received from the device. When reading data from the device, the read request shown in FIG. 4A is given to the device, and in response to this, data sent as a command shown in FIG. 4B is received from the device. Similarly to the read request command, a code indicating that the data read command is a data read command is described in the head portion. Following this, items of “data” and “BCC” are prepared. The system processing program 34 interprets the data received from the device according to the data read command, the device information table 16 and the like, and acquires necessary data.

図5Aは、デバイスにデータを書き込む際の書込要求コマンドのスケルトンである。図5Bは、デバイスから送られてくるデータ書込完了コマンドを示している。   FIG. 5A is a skeleton of a write request command when data is written to the device. FIG. 5B shows a data write completion command sent from the device.

図4、図5以外にもコマンドが記録されているが、同様の形式であるのでここでは省略する。なお、各コマンドのコードや、これに続いてどのような項目(「種別」「アドレス」「個数」「BCC」など)がどのような順序で続くかは、PLCによって異なる。したがって、使用するPLCごとに、上記のインターフェイス基本コマンド12をP−ROM30に記録しておき、選択して使用するようにすればよい。   Commands other than those shown in FIGS. 4 and 5 are recorded, but are omitted here because they have the same format. It should be noted that the code of each command and what items (“type”, “address”, “number”, “BCC”, etc.) follow in what order are different depending on the PLC. Therefore, the interface basic command 12 may be recorded in the P-ROM 30 for each PLC to be used by selecting it.

P−ROM30に記録された通信プロトコルプログラム40の例を、図6Aに示す。図6Aでは、デバイスからデータを読み出す際の一連の手順が示されている。システム処理プログラム34は、まず、ステップ1において、読出要求コマンドをPLC4に向けて送信する。読出要求コマンドは、図4Aのスケルトンを参照して生成する。ステップ2では、PLC4からのデータ読出コマンドを受信してデバイスのデータを取得する。受信したデータ読出コマンドからデバイスのデータを抽出する際には、図4Bのデータ読出コマンドの情報を参照する。   An example of the communication protocol program 40 recorded in the P-ROM 30 is shown in FIG. 6A. FIG. 6A shows a series of procedures for reading data from the device. First, the system processing program 34 transmits a read request command to the PLC 4 in step 1. The read request command is generated with reference to the skeleton of FIG. 4A. In step 2, a data read command from the PLC 4 is received to obtain device data. When extracting device data from the received data read command, the information of the data read command in FIG. 4B is referred to.

このように、通信プロトコルは、インターフェイス基本コマンド12を組み合わせて、読出や書込のための一連の処理を記述したもの(マクロ)である。なお、図6Aでは、読出のための通信プロトコルだけを示しているが、書込その他の通信プロトコルも同じようにP−ROM30に記録されている。   As described above, the communication protocol is a description (macro) describing a series of processes for reading and writing by combining the interface basic commands 12. In FIG. 6A, only the communication protocol for reading is shown, but writing and other communication protocols are recorded in the P-ROM 30 in the same manner.

P−ROM30に記録されたデバイス情報テーブル16の例を、図7に示す。PLC4の各デバイスは、その種類によって、データの記録の仕方などが異なっている。これを示したのが、デバイス情報テーブル16である。具体的には、デバイスの種類毎に、アドレス桁数やデータ桁数などが記述されている。図7では、デバイスの種類として「データレジスタ」「内部リレー」のみが示されているが、実際には多くの種類のデバイスがある。   An example of the device information table 16 recorded in the P-ROM 30 is shown in FIG. Each device of the PLC 4 has different data recording methods depending on the type. This is shown in the device information table 16. Specifically, the number of address digits, the number of data digits, and the like are described for each type of device. Although only “data register” and “internal relay” are shown as device types in FIG. 7, there are actually many types of devices.

なお、図3〜図7では、各データを入力するための画面として示しているが、P−ROM30に記録されるデータも同様の形式となっている。   3 to 7 show the screens for inputting each data, the data recorded in the P-ROM 30 has the same format.

P−ROM30に記録された動作プログラム42の例を、図8に示す。動作プログラム42は、プログラマブル表示器2の表示画面の動作を決定するプログラムである。図8に示す動作プログラム42は、図9に示すような動作をさせるためのものである。まず、最初に図9Aの画面をタッチスクリーン22に表示する。ユーザにより目標個数が入力キー26から入力され、「次へ」のボタンが押されると、画面2に表示が変わる。画面2では、PLC4から生産個数データを受けて、これを表示する。   An example of the operation program 42 recorded in the P-ROM 30 is shown in FIG. The operation program 42 is a program that determines the operation of the display screen of the programmable display device 2. The operation program 42 shown in FIG. 8 is for operating as shown in FIG. First, the screen of FIG. 9A is displayed on the touch screen 22 first. When the target number is input from the input key 26 by the user and the “Next” button is pressed, the display changes to the screen 2. On the screen 2, the production number data is received from the PLC 4 and displayed.

図9のような画面表示を行うためには、図8の動作プログラム42とは別に、図10に示す画面データ36、図11に示す画面デバイステーブル38が必要であり、これらもP−ROM30に記録されている。   In order to perform the screen display as shown in FIG. 9, the screen data 36 shown in FIG. 10 and the screen device table 38 shown in FIG. 11 are necessary in addition to the operation program 42 shown in FIG. It is recorded.

3.システム処理プログラム34の動作
図12に、システム処理プログラムのフローチャートを示す。まず、ステップS1において、CPU20はシステムの初期化を行う。次に、動作プログラム42(図8参照)の1行目の画面Start命令を取得し、画面Start命令によって指定された画面の画面データを読み出して、表示を行う(ステップS1)。ここで1行目は、”画面1Start”であるから、画面1についての画面データを読み出してタッチスクリーン22に表示する。
3. Operation of System Processing Program 34 FIG. 12 shows a flowchart of the system processing program. First, in step S1, the CPU 20 initializes the system. Next, the screen Start command on the first line of the operation program 42 (see FIG. 8) is acquired, and the screen data of the screen specified by the screen Start command is read and displayed (step S1). Here, since the first line is “Screen 1 Start”, the screen data for the screen 1 is read and displayed on the touch screen 22.

図10の画面1データでは、「目標個数」という文字を、X座標を150、Y座標を100の位置に表示する旨が指定されている。これにより、CPU20は、図9Aのように「目標個数」を指定されたX座標、Y座標に表示する(目標個数の文字の基本位置(左上隅など)をX座標、Y座標にするように表示する)。さらに、画面1データの機能部品データの項目に示された機能部品を表示する。まず、「画面切換スイッチ」を表示する。これは、図9Aの「次へ」のボタンとして表示されている。さらに、「数値入力器」を表示する。図9Aでは、「目標個数」の右側に表示されている入力のための領域50がこれに対応する。   In the screen 1 data of FIG. 10, it is specified that the character “target number” is displayed at a position of 150 for the X coordinate and 100 for the Y coordinate. As a result, the CPU 20 displays the “target number” on the designated X and Y coordinates as shown in FIG. 9A (the basic position (such as the upper left corner) of the target number of characters is set to the X and Y coordinates). indicate). Further, the functional component indicated in the functional component data item of the screen 1 data is displayed. First, the “screen switch” is displayed. This is displayed as the “Next” button in FIG. 9A. In addition, a “numerical value input device” is displayed. In FIG. 9A, the area 50 for input displayed on the right side of the “target number” corresponds to this.

次に、CPU20は、指定された画面の画面デバイステーブルの内容をP−ROM30から読み出す(ステップS3)。ここでは、画面1に対応するデバイステーブルである画面1デバイステーブル(図11参照)が読み出される。CPU20は、画面1デバイステーブルの「読出デバイス」に記述されたPLC4のデバイスと通信し、当該デバイスの値を取得する。ここでは、画面1デバイステーブルの読出デバイスの欄において、アドレスが「7」としてデバイスが指定されているので、このアドレスをもとに通信を行う。なお、本発明の特徴である通信の方法については、後に詳述する。   Next, the CPU 20 reads the contents of the screen device table of the designated screen from the P-ROM 30 (step S3). Here, a screen 1 device table (see FIG. 11), which is a device table corresponding to screen 1, is read. The CPU 20 communicates with the device of the PLC 4 described in the “read device” of the screen 1 device table, and acquires the value of the device. Here, since the device is designated with the address “7” in the read device column of the screen 1 device table, communication is performed based on this address. The communication method that is a feature of the present invention will be described in detail later.

次に、CPU20は、読み出したデバイスの値を、画面1デバイステーブルに記憶する(ステップS4)。読み出した値が「0」であれば、図11のように値の欄に「0」が記憶される。   Next, the CPU 20 stores the read device value in the screen 1 device table (step S4). If the read value is “0”, “0” is stored in the value column as shown in FIG.

次に、CPU20は、ステップS3、S4にて取得した読出デバイスの値を、タッチスクリーン22の指定の位置に表示する(ステップS5)。図10の画面1データでは、読出デバイスの値の表示が指定されていないので、ここでは読出デバイスの値の表示はなされない。続いて、画面に設定された数値入力器(図9Aの入力領域50)に対して、入力された数値を画面1デバイステーブルの「値」欄に記憶する。たとえば、図9Aの画面において入力キー26によって入力領域50に「3521」が入力されたとすると、図11の「書込デバイス」の「値」欄に示すように、「3521」が記憶される。   Next, the CPU 20 displays the value of the reading device acquired in steps S3 and S4 at a designated position on the touch screen 22 (step S5). In the screen 1 data of FIG. 10, since the display of the reading device value is not specified, the reading device value is not displayed here. Subsequently, the input numerical value is stored in the “value” column of the screen 1 device table for the numerical value input device (input area 50 in FIG. 9A) set on the screen. For example, if “3521” is input to the input area 50 by the input key 26 on the screen of FIG. 9A, “3521” is stored as shown in the “value” column of “write device” in FIG.

次に、CPU20は、動作プログラム(図8)のマクロ命令を実行する。ここでは次の行の命令は、「SW1 JUMP 画面2」であってマクロ命令である。したがって、ステップS6に進んで、当該マクロ命令を実行する。「SW1 JUMP 画面2」は、画面切り換えスイッチSW1(図9の「次へ」のボタン)が押されて「ON」であれば、画面2にジャンプすることを意味している。画面切り換えスイッチSW1が押されておらず「OFF」であれば、ステップS8の処理に進む。   Next, the CPU 20 executes a macro instruction of the operation program (FIG. 8). Here, the instruction on the next line is “SW1 JUMP screen 2”, which is a macro instruction. Accordingly, the process proceeds to step S6 to execute the macro instruction. “SW1 JUMP screen 2” means that if the screen changeover switch SW1 (“next” button in FIG. 9) is pressed and “ON”, the screen jumps to screen 2. If the screen switch SW1 is not pressed and is “OFF”, the process proceeds to step S8.

ステップS8では、"画面1End”命令の処理が行われる。すなわち、画面1デバイステーブルの書込デバイスに記述されたデバイスについて、記憶された「値」をPLC4と通信して、そのデバイスに書き込む。ここでは、アドレス「7」として指定されたデバイスに対して値「3521」が送信されて記録される。このようにして、ステップS6においてユーザが入力したデータが、PLC4のデバイスに送信されて記録される。   In step S8, a “screen 1 End” command is processed. That is, for the device described in the writing device of the screen 1 device table, the stored “value” is communicated with the PLC 4 and written to the device. Here, the value “3521” is transmitted to the device designated as the address “7” and recorded. In this way, the data input by the user in step S6 is transmitted to the PLC4 device and recorded.

上記のようにして「画面1End」の処理を終えると、CPU20は、ステップS2以下を再び実行する。   When the process of “screen 1 End” is completed as described above, the CPU 20 executes step S2 and subsequent steps again.

ユーザによって、画面切り換えスイッチSW1が押されると、画面切り換えスイッチSW1の値が、「OFF」から「ON」に変わる(なおSW1の値は、メモリ28に記憶される)。画面切り換えスイッチSW1の値が「ON」に変わると、CPU20は、動作プログラムの2行目から、4行目にジャンプする。これにより、画面2についての処理がステップS2以下で実行される。   When the screen changeover switch SW1 is pressed by the user, the value of the screen changeover switch SW1 changes from “OFF” to “ON” (note that the value of SW1 is stored in the memory 28). When the value of the screen changeover switch SW1 changes to “ON”, the CPU 20 jumps from the second line to the fourth line of the operation program. Thereby, the process for the screen 2 is executed in step S2 and subsequent steps.

画面2についての処理が実行されると、CPU20は、画面2デバイステーブル(図11)、画面2データ(図10)を参照して、図9Bに示すような画面をタッチスクリーン22上に表示する。図9Bの画面2において、上から順に、PLC4の数値表示器であるレジスタD1、D2、D3、D4の値が読み出されてい表示されている。数値表示器D1は、数値入力器D7に書き込まれた値(目標個数)がそのままコピーされたものとなっている。数値表示器D2は、PLC4に接続されたセンサの出力などに基づいて生産個数を記録するデバイスである。数値表示器D3は、PLC4に接続されたセンサの出力などに基づいて不良個数を記録するデバイスである。数値表示器D4は、レジスタD1の値からレジスタD2およびレジスタD3の値を減じた値が記録されているレジスタである。   When the process for the screen 2 is executed, the CPU 20 refers to the screen 2 device table (FIG. 11) and the screen 2 data (FIG. 10) and displays a screen as shown in FIG. 9B on the touch screen 22. . In the screen 2 of FIG. 9B, the values of the registers D1, D2, D3, and D4, which are the numerical value indicators of the PLC 4, are read and displayed in order from the top. In the numerical value display D1, the value (target number) written in the numerical value input device D7 is copied as it is. The numerical value display D2 is a device that records the number of production based on the output of a sensor connected to the PLC4. The numerical display D3 is a device that records the number of defects based on the output of a sensor connected to the PLC4. The numerical value display D4 is a register in which a value obtained by subtracting the values of the registers D2 and D3 from the value of the register D1 is recorded.

上記のようにPLC4の各レジスタD1、D2、D3、D4の値が読み出されて、タッチスクリーン22に表示される。これにより、ユーザは、生産の進行状況を知ることができる。   As described above, the values of the registers D1, D2, D3, and D4 of the PLC 4 are read and displayed on the touch screen 22. Thereby, the user can know the progress of production.

上記のように、ユーザは、動作プログラム42、画面データ36、画面デバイステーブル38を用意することによって、PLC4のデバイス(上記レジスタなど)の値をタッチスクリーン22に表示し、タッチスクリーン22からPLC4の動作を制御したりすることができる。   As described above, the user prepares the operation program 42, the screen data 36, and the screen device table 38, thereby displaying the values of the devices (such as the registers) of the PLC 4 on the touch screen 22, and from the touch screen 22 to the PLC 4 The operation can be controlled.

4.通信処理の詳細
上記の各処理を行うためには、CPU20は、PLC4との通信を行う必要がある。たとえば、ステップS3においては、PLC4と通信を行い、画面デバイステーブル38に記述された各読出デバイスの値を取得する必要がある。また、ステップS6においては、PLC4と通信を行い、画面デバイステーブル38に記述された各書込デバイスに値を記録する必要がある。以下、本実施形態の特徴であるこれら通信処理の詳細を説明する。
4). Details of Communication Processing In order to perform each of the above processes, the CPU 20 needs to communicate with the PLC 4. For example, in step S3, it is necessary to communicate with the PLC 4 to obtain the value of each reading device described in the screen device table 38. In step S6, it is necessary to communicate with the PLC 4 and record a value in each writing device described in the screen device table 38. Details of these communication processes, which are the features of this embodiment, will be described below.

まず、ステップS3におけるPLC4との通信処理(デバイスのデータの読み出し)を説明する。ステップS3において、CPU20は、PLC4と通信を行い、画面デバイステーブル38に記載されたPLC4の読出デバイスからデータを取得する。たとえば、図11の画面1デバイステーブルであれば、PLC4のアドレス「7」に割り当てられているレジスタからデータを読み出す。画面2デバイステーブルであれば、アドレス「1」「2」「3」「4」に割り当てられているレジスタからデータを読み出す。   First, communication processing (reading of device data) with the PLC 4 in step S3 will be described. In step S <b> 3, the CPU 20 communicates with the PLC 4 and acquires data from the reading device of the PLC 4 described in the screen device table 38. For example, in the case of the screen 1 device table of FIG. 11, data is read from the register assigned to the address “7” of the PLC 4. In the case of the screen 2 device table, data is read from the registers assigned to the addresses “1”, “2”, “3”, and “4”.

上記の読み出しの際、CPU20は、まず図6Aに示す通信プロトコル40(デバイス読出)を、P−ROM30から読み出す。そして、読み出したデバイス読出通信プロトコルを先頭から実行する。図6Aに示されているように、デバイス読出通信プロトコルにおいては、まず、CPU20は、PLC4に対してデバイスを指定して読出要求を送信し、続いてPLC4の当該デバイスからデータを受信する。   At the time of the above reading, the CPU 20 first reads the communication protocol 40 (device reading) shown in FIG. 6A from the P-ROM 30. Then, the read device reading communication protocol is executed from the top. As shown in FIG. 6A, in the device read communication protocol, first, the CPU 20 designates a device to the PLC 4 and transmits a read request, and subsequently receives data from the device of the PLC 4.

CPU20は、上記読出要求およびデータ読出の際には、P−ROM30に記録されたインターフェイス基本コマンドのうち、図4に示す読出要求コマンド、データ読出コマンドを取得する。ただし、図4に記憶されている読出要求コマンドにおいて、種別、アドレス等は空欄となっており、スケルトンとなっている。   The CPU 20 acquires the read request command and the data read command shown in FIG. 4 among the interface basic commands recorded in the P-ROM 30 at the time of the read request and data read. However, in the read request command stored in FIG. 4, the type, address, and the like are blank and are skeletons.

次に、読み出そうとしているデバイスの種別を画面デバイステーブル38から取得する。たとえば、画面1デバイステーブルであれば、読出デバイスの欄に種別コード「44」のデバイスがあることが示されている。したがって、CPU20は、図7のデバイス情報テーブルから、種別コード「44」であるデバイスについての、アドレス桁数やデータ桁数などを取得する。そして、取得した読出要求コマンドのスケルトンの空欄を、これらの情報を用いて完成する。「種別」の欄には「44」を記述し、「アドレス」の欄には「7」を記述し、「個数」の欄には「1」(画面1デバイステーブルの「点数」)を記述する。なお、ここで、個数とは、当該画面において指定されている読出デバイス(または書込デバイス)の数である。   Next, the device type to be read is acquired from the screen device table 38. For example, in the screen 1 device table, it is indicated that there is a device of type code “44” in the column of read device. Therefore, the CPU 20 acquires the number of address digits, the number of data digits, and the like for the device having the type code “44” from the device information table of FIG. Then, the blank of the skeleton of the acquired read request command is completed using these pieces of information. “44” is described in the “Type” column, “7” is described in the “Address” column, and “1” (“Point” in the screen 1 device table) is described in the “Number” column. To do. Here, the number is the number of read devices (or write devices) designated on the screen.

そして、この際に、デバイス情報テーブル(図7)の情報を参照し、アドレスの桁数、個数の桁数にしたがって数値を決定する。具体的には、「アドレス」の欄には、4桁にて「7」を記述することになるので「0007」が記述されることになる。「個数」の欄には、2桁にて「1」を記述することになるので「01」が記述されることになる。   At this time, with reference to the information in the device information table (FIG. 7), a numerical value is determined according to the number of digits of the address and the number of digits. Specifically, since “7” is described in four digits in the “address” column, “0007” is described. Since “1” is described in two digits in the “number” column, “01” is described.

以上のようにして、CPU20は、通信コマンド共通属性を参照して、アドレス変換形式として示された形式に従って、アドレスをASCIIコードに変換する。つまり、アドレス「0007」が「30 30 30 37」に変換されることになる。ここでは、読出要求コマンドとして、「05 30 30 30 52 44 30 30 30 37 30 31 -- 0D」(16進数表記)が完成する。なお、ここで、「4桁」は「4バイト」を意味している。また、上記コマンドにおいて、「--」の部分はパリティチェックのBCCが記述されるべき部分である。そこで、CPU20は、図3の通信コマンド共通属性を参照して、BCC計算の方法を取得し、BCCを計算して「--」の部分に記述する。たとえば、BCCが「25」であればこれを記述して「05 30 30 30 52 44 30 30 30 37 30 31 32 35 0D」というコマンドが完成する。   As described above, the CPU 20 refers to the communication command common attribute and converts the address into the ASCII code according to the format indicated as the address conversion format. That is, the address “0007” is converted to “30 30 30 37”. Here, “05 30 30 30 44 44 30 30 37 30 31 —0D” (hexadecimal notation) is completed as the read request command. Here, “4 digits” means “4 bytes”. In the above command, the “-” part is the part where the BCC for parity check is to be described. Therefore, the CPU 20 refers to the communication command common attribute in FIG. 3 to acquire the BCC calculation method, calculates the BCC, and describes it in the “-” part. For example, if BCC is “25”, this is described and the command “05 30 30 30 44 44 30 30 37 30 31 32 35 0D” is completed.

さらに、CPU20はこれをPLC4に送信する際に、通信コマンド共通属性を参照して、このコマンドをASCIIコードに変換する。また、アドレス格納方法として示された方法に従って、アドレスの上位桁と下位桁を入れ替える。ここでは、もともと上位バイトからアドレスが示されているので何も変更しない。しかし、通信コマンド共通属性において「下位バイトから」と示されていれば、アドレスの部分の順序を逆にして「05 30 30 30 52 44 37 30 30 30 30 31 32 35 0D」とする。このようにして、完成した読出要求コマンドをPLC4の形式に変換して送信する。   Furthermore, when transmitting this to PLC4, CPU20 refers to a communication command common attribute, and converts this command into an ASCII code. Also, the upper and lower digits of the address are exchanged according to the method indicated as the address storage method. Here, since the address is originally shown from the upper byte, nothing is changed. However, if “from the lower byte” is indicated in the communication command common attribute, the order of the address part is reversed to “05 30 30 30 52 44 37 30 30 30 30 31 32 35 0D”. In this manner, the completed read request command is converted into the PLC4 format and transmitted.

上記のようにしてPLC4に対して読出要求コマンドを送信すると、PLC4はこれに応答して、上記読出要求コマンドによって指定したデバイスのデータをデータ読出コマンドとして返信してくる。たとえば、「06 30 30 30 30 30 30 30 33 36 0D」という様なデータ読出コマンドが返送されてくる。CPU20は、図6Aの通信プロトコルを参照して、読出要求コマンドに続いてデータ読出コマンドが返信されてくることを知る。さらに、図4Bのデータ読出コマンドを参照して、その内容を解釈する。   When the read request command is transmitted to the PLC 4 as described above, the PLC 4 returns the data of the device designated by the read request command as a data read command in response thereto. For example, a data read command such as “06 30 30 30 30 30 30 30 33 36 0D” is returned. CPU 20 refers to the communication protocol of FIG. 6A and knows that a data read command is returned following the read request command. Further, the contents are interpreted with reference to the data read command in FIG. 4B.

すなわち、図4Bに示すように、最初の4桁(4バイト)「06 30 30 30」はデータ読出コマンドを示す定数である。これに続いて、データが送信されることを図4Bから知ることができる。ただし、これだけでは、データの桁数が不明である。そこで、画面1デバイステーブル(図11)を参照して、読み出し対象となっているデバイスの種別「44」を取得し、図7のデバイス情報テーブルから当該種別のデバイスについてのデータ桁数「4桁」を取得する。これにより、CPU20は、データの桁数が4桁であることを知る。したがって、「06 30 30 30」に続く4桁「30 30 30 30」をデータとして取得する。   That is, as shown in FIG. 4B, the first four digits (four bytes) “06 30 30 30” are constants indicating data read commands. Subsequent to this, it can be seen from FIG. 4B that data is being transmitted. However, the number of digits of data is unknown only by this. Therefore, referring to the screen 1 device table (FIG. 11), the type “44” of the device to be read is acquired, and the number of data digits “4 digits” for the device of the type from the device information table of FIG. Is obtained. Thereby, CPU20 knows that the number of digits of data is four digits. Therefore, the four digits “30 30 30 30” following “06 30 30 30” are acquired as data.

この際、CPU20は、図3の通信コマンド共通属性を参照して、データの格納方法が「上位バイトから」であるか「下位バイトから」:であるかを判断する。「下位バイトから」となっていれば、上位バイトと下位バイトとを入れ換える。ここでは、「上位バイトから」であるから、データの並び替えは行わない。   At this time, the CPU 20 refers to the communication command common attribute in FIG. 3 and determines whether the data storage method is “from the upper byte” or “from the lower byte”. If it is “from lower byte”, the upper byte and the lower byte are exchanged. Here, since “from the upper byte”, the data is not rearranged.

続いて、CPU20は、通信コマンド共通属性を参照しBCCの計算を行う。BCCの桁数は「2桁」となっているので、計算したBCCを2桁で表現し、データ「00 00」に続く2桁「33 36」と比べて、エラーのチェックを行う。一致しない場合には、PLC4に対してデータの再送を要求する。BCCが正しければ、取得したデータを、画面1デバイステーブルに記憶する(図12のステップS4)。   Subsequently, the CPU 20 calculates BCC with reference to the communication command common attribute. Since the number of digits of the BCC is “2 digits”, the calculated BCC is expressed by 2 digits, and an error check is performed compared to the 2 digits “33 36” following the data “00 00”. If they do not match, the PLC 4 is requested to retransmit data. If the BCC is correct, the acquired data is stored in the screen 1 device table (step S4 in FIG. 12).

上記のようにしてPLC4との通信が行われる。なお、上記では画面1についての処理を説明したが、他の画面についても同様である。また、上記では、データの読み出しについて説明したが、PLC4へのデータの書込についても同様である。つまり、図6Bに示すような書込のための通信プロトコルがP−ROM30に記録されている。デバイスへの書込処理においては、デバイス、データなどを指定して書込要求をPLC4に送信する。書込が完了すると、PLC4は書込完了を返信してくる。   Communication with the PLC 4 is performed as described above. In addition, although the process about the screen 1 was demonstrated above, it is the same also about another screen. In the above description, the data read is described, but the same applies to the data write to the PLC 4. That is, a communication protocol for writing as shown in FIG. 6B is recorded in the P-ROM 30. In the writing process to the device, a writing request is transmitted to the PLC 4 by designating the device, data and the like. When the writing is completed, the PLC 4 returns a writing completion.

書込要求は、図5Aに示すようなコマンドとして記録されている。また、書込完了は図5Bに示すようなコマンドとして記録されている。CPU20は、上記と同じようにして、デバイス情報テーブル16や通信コマンド共通属性14などを参照して、データを送信し受信する。   The write request is recorded as a command as shown in FIG. 5A. The completion of writing is recorded as a command as shown in FIG. 5B. The CPU 20 transmits and receives data with reference to the device information table 16 and the communication command common attribute 14 in the same manner as described above.

この実施形態によれば、インターフェイス基本コマンド(図4、図5)とデバイス情報テーブル16を、PLC4の機種に合わせて用意することで、各種のPLC4に対応することができる。   According to this embodiment, by preparing the interface basic command (FIGS. 4 and 5) and the device information table 16 in accordance with the PLC 4 model, various PLCs 4 can be supported.

5.プロジェクトデータの作成
上記では、P−ROM30に画面データ36、画面デバイステーブル38、通信プロトコルプログラム40、インターフェイス基本コマンド12、通信コマンド共通属性14、デバイス情報テーブル16、動作プログラム42(以上をまとめてプロジェクトデータという)を記録した後の動作を説明した。以下では、このプロジェクトデータを作画装置5(図2参照)によって作成する処理を説明する。作画装置は、いわゆるパーソナルコンピュータであり、CPU、ハードディスク、ディスプレイ、キーボード、マウス(図示せず)などを備えている。
5. Creation of Project Data In the above, the screen data 36, the screen device table 38, the communication protocol program 40, the interface basic command 12, the communication command common attribute 14, the device information table 16, the operation program 42 (the above are collectively stored in the P-ROM 30) The operation after recording data) was explained. Below, the process which produces this project data with the drawing apparatus 5 (refer FIG. 2) is demonstrated. The drawing device is a so-called personal computer, and includes a CPU, a hard disk, a display, a keyboard, a mouse (not shown), and the like.

図13に、ハードディスクに記録されたプロジェクトデータ生成プログラムのフローチャートを示す。プロジェクトデータ生成プログラムを立ち上げて、初期メニューから、たとえば「インターフェイス基本コマンドの作成」を選択したとする。   FIG. 13 shows a flowchart of the project data generation program recorded on the hard disk. Assume that the project data generation program is started up and, for example, “Create interface basic command” is selected from the initial menu.

CPUは、まず、インターフェイス基本コマンドを入力するための画面(図5A)をディスプレイに表示する。そのプルダウンボタン40をマウスなどでクリックすると、書込要求送信、書込完了受信、読出要求送信、データ読出受信などのコマンド名が一覧表示される。ユーザは、入力したいコマンドを選択する。たとえば、書込要求送信を選択すると、図5Aのような画面が表示される。ただし、図における「05 30 30 30 57」「0D」などは最初は空欄として表示される。ユーザは、使用したいPLC4のマニュアルなどを見て、書込要求送信に対するコマンドをキーボードなどから入力する(図13のステップS21)。   First, the CPU displays a screen (FIG. 5A) for inputting an interface basic command on the display. When the pull-down button 40 is clicked with a mouse or the like, command names such as write request transmission, write completion reception, read request transmission, and data read reception are displayed in a list. The user selects a command to be input. For example, when write request transmission is selected, a screen as shown in FIG. 5A is displayed. However, “05 30 30 30 57” and “0D” in the figure are initially displayed as blanks. The user views the manual of the PLC 4 that he / she wishes to use and inputs a command for writing request transmission from the keyboard or the like (step S21 in FIG. 13).

完了ボタン42がクリックされると、CPUは、ステップS23に進んで、入力された書込要求コマンドをハードディスクに記録する。このようにして、書込要求送信のコマンドを設定することができる。他のコマンドについても同様の処理によって設定することができる。   When the completion button 42 is clicked, the CPU proceeds to step S23 and records the inputted write request command on the hard disk. In this way, a write request transmission command can be set. Other commands can be set by similar processing.

また、通信プロトコル、通信コマンド共通属性、デバイス情報テーブルについでも同様の処理によって設定してハードディスクに記録することができる。通信プロトコル設定のための画面を図6に、通信コマンド共通属性設定のための画面を図3に、デバイス情報テーブル設定のための画面を図7に示す。   The communication protocol, communication command common attribute, and device information table can also be set and recorded on the hard disk by the same process. FIG. 6 shows a screen for setting a communication protocol, FIG. 3 shows a screen for setting a communication command common attribute, and FIG. 7 shows a screen for setting a device information table.

このように、ユーザは、通信コマンド共通属性、インターフェイス基本コマンド、通信プロトコル、デバイス情報テーブルを、所望のPLCに合致するように設定することができる。したがってこれらを一旦設定すれば、ユーザは、動作プログラム(図8)、画面データ(図10)、画面デバイステーブル(図11)を作成する際に、PLCに固有の通信プロトコルなどを意識する必要がなく、プログラマブル表示器の制御プログラムの作成が容易である。   Thus, the user can set the communication command common attribute, the interface basic command, the communication protocol, and the device information table so as to match the desired PLC. Therefore, once these are set, the user needs to be aware of the communication protocol specific to the PLC when creating the operation program (FIG. 8), screen data (FIG. 10), and screen device table (FIG. 11). It is easy to create a control program for a programmable display.

上記のようにして作成されたプロジェクトデータは、I/F32(図2)を介して、プログラマブル表示器に転送される。   The project data created as described above is transferred to the programmable display device via the I / F 32 (FIG. 2).

なお、この実施形態では、通信コマンド共通属性、インターフェイス基本コマンド、通信プロトコル、デバイス情報テーブルをユーザが入力するようにしている。しかし、予め各種のPLCについてこれらをハードディスクに記録しておき、選択して使用できるようにしてもよい。   In this embodiment, the user inputs a communication command common attribute, an interface basic command, a communication protocol, and a device information table. However, various PLCs may be recorded in advance on a hard disk so that they can be selected and used.

6.その他
上記実施形態においては、外部機器としてPLCを用いているが、ロボットなどを外部機器としてもよい。
6). Others In the above embodiment, the PLC is used as the external device, but a robot or the like may be used as the external device.

上記実施形態では、各手段をプログラムによって実現しているが、その一部または全部をハードウエアのみによって実現するようにしてもよい。   In the above embodiment, each means is realized by a program, but a part or all of the means may be realized only by hardware.

この発明の一実施形態によるプログラマブル表示器の機能ブロック図である。It is a functional block diagram of the programmable display by one Embodiment of this invention. プログラマブル表示器のハードウエア構成である。It is a hardware structure of a programmable display. 通信コマンド共通属性の例である。It is an example of a communication command common attribute. インターフェイス基本コマンドの例である。It is an example of an interface basic command. インターフェイス基本コマンドの例である。It is an example of an interface basic command. 通信プロトコルの例である。It is an example of a communication protocol. デバイス情報テーブルの例である。It is an example of a device information table. 動作プログラムの例である。It is an example of an operation program. 表示画面の例である。It is an example of a display screen. 画面データの例である。It is an example of screen data. 画面デバイステーブルの例である。It is an example of a screen device table. システム処理プログラムのフローチャートである。It is a flowchart of a system processing program. 生成プログラムのフローチャートである。It is a flowchart of a production | generation program.

符号の説明Explanation of symbols

2・・・プログラマブル表示器
4・・・PLC
6・・・受信処理手段
8・・・送信処理手段
10・・・記録部
12・・・インターフェイス基本コマンド
14・・・共通属性データ
16・・・デバイス情報データ
2 ... Programmable display 4 ... PLC
6 ... Reception processing means 8 ... Transmission processing means 10 ... Recording section 12 ... Interface basic command 14 ... Common attribute data 16 ... Device information data

Claims (4)

デバイスを有する外部機器とデータ通信するプログラマブル表示器であって、
外部機器との通信の基本処理を行うためのコマンドについて、そのフレームフォーマットを記述したインターフェイス基本コマンドと、外部機器のデバイスの種類毎に設けられ少なくともデータ桁数、アドレス桁数、種別コードを含むデバイス情報データと、少なくともアドレスのデータ形式およびデータのデータ形式を示す情報を含む通信コマンド共通属性データとを記録した記録部と、
前記インターフェイス基本コマンドにしたがって、特定デバイスについて、通信相手先のデバイスに対応するデバイス情報データと通信コマンド共通属性データに基づいて外部機器と通信する通信手段と、
を備えたプログラマブル表示器。
A programmable display for data communication with an external device having a device,
A device that includes at least the number of data digits, the number of address digits, and the type code provided for each type of device of the external device and the interface basic command that describes the frame format of the command for performing basic processing for communication with the external device A recording unit that records information data and communication command common attribute data including information indicating at least the data format of the address and the data format of the data;
In accordance with the interface basic command, for a specific device, communication means for communicating with an external device based on device information data corresponding to a communication partner device and communication command common attribute data;
Programmable display with
請求項1のプログラマブル表示器において、
前記通信手段は、読み出しの場合は、デバイス情報データと通信コマンド共通属性データとフレームフォーマットとに基づいて受信したフレームを解析し、書き込みの場合は、デバイス情報データと通信コマンド共通属性データとフレームフォーマットとに基づいてフレームを生成して外部機器に送信することを特徴とするもの。
The programmable display of claim 1,
The communication means analyzes the received frame based on device information data, communication command common attribute data, and frame format in the case of reading, and device information data, communication command common attribute data, and frame format in the case of writing. Based on the above, a frame is generated and transmitted to an external device.
請求項1のプログラマブル表示器において、
前記特定デバイスは、前記プログラマブル表示器の画面への表示のために読み出すべき外部機器のデバイス、または前記プログラマブル表示器の画面から入力されたデータを書き込むべき外部機器のデバイスであることを特徴とするもの。
The programmable display of claim 1,
The specific device is a device of an external device to be read for display on the screen of the programmable display or a device of an external device to which data input from the screen of the programmable display is to be written. thing.
プログラマブル表示器のプロジェクトデータを生成して出力する作画装置であって、
外部機器との通信の基本処理を行うためのコマンドについて、そのフレームフォーマットを記述したインターフェイス基本コマンドを記録した記録部と、
外部機器との間でのデータの送受信を含む命令を備えて構成される通信プロトコルを、ユーザとの対話によって生成する対話生成手段と、
外部機器のデバイスの種類毎に少なくともデータ桁数、アドレス桁数、種別コードを含むデバイス情報データおよび少なくともアドレスのデータ形式およびデータのデータ形式を示す情報を含む通信コマンド共通属性データをユーザが入力するための入力手段と、
前記通信プロトコルとインターフェイス基本コマンドとデバイス情報データと通信コマンド共通属性データとを含むプロジェクトデータを出力する出力手段と、
を備えた作画装置。
A drawing device that generates and outputs project data for a programmable display,
For a command for performing basic processing of communication with an external device, a recording unit that records an interface basic command describing its frame format ,
Dialog generating means for generating a communication protocol including instructions including transmission and reception of data with an external device by dialog with a user;
For each device type of external device, the user inputs communication command common attribute data including at least device information data including the number of data digits, the number of address digits, and a type code, and at least information indicating the data format of the address and the data format of the data. Input means for,
Output means for outputting project data including the communication protocol, interface basic command, device information data, and communication command common attribute data;
A drawing device with
JP2006247883A 2006-09-13 2006-09-13 Programmable display and drawing device Expired - Fee Related JP4859601B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006247883A JP4859601B2 (en) 2006-09-13 2006-09-13 Programmable display and drawing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006247883A JP4859601B2 (en) 2006-09-13 2006-09-13 Programmable display and drawing device

Publications (2)

Publication Number Publication Date
JP2008071033A JP2008071033A (en) 2008-03-27
JP4859601B2 true JP4859601B2 (en) 2012-01-25

Family

ID=39292574

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006247883A Expired - Fee Related JP4859601B2 (en) 2006-09-13 2006-09-13 Programmable display and drawing device

Country Status (1)

Country Link
JP (1) JP4859601B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5014094B2 (en) * 2007-11-30 2012-08-29 Idec株式会社 Man-machine interface equipment and drawing equipment
JP5383136B2 (en) * 2008-09-30 2014-01-08 Idec株式会社 Debugging method and debugging program for man-machine interface device program
JP2020151770A (en) * 2017-07-05 2020-09-24 芳賀電機株式会社 Flexible manufacturing system
CN111781886B (en) * 2020-05-28 2021-11-05 珠海格力智能装备有限公司 Signal transmission method, device, storage medium and processor
JP2023113476A (en) 2022-02-03 2023-08-16 シュナイダーエレクトリックホールディングス株式会社 Protocol driver creation device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3356530B2 (en) * 1994-02-11 2002-12-16 株式会社デジタル Data creation support device for display control device
JP4414050B2 (en) * 2000-02-28 2010-02-10 株式会社キーエンス Data creation device, data creation method, recording medium recording data creation program, and display device

Also Published As

Publication number Publication date
JP2008071033A (en) 2008-03-27

Similar Documents

Publication Publication Date Title
JP4859601B2 (en) Programmable display and drawing device
JP4485326B2 (en) PROGRAMMABLE DISPLAY, DISPLAY CONTROL PROGRAM, AND RECORDING MEDIUM CONTAINING THE PROGRAM
JP5875555B2 (en) Image creation system
JP4566904B2 (en) System, control program and recording medium recording the program, and image data creation program and recording medium recording the program
JP4085286B2 (en) PLC monitoring system
JP2016059989A (en) Robot control device, robot device, robot control method, program, and recording medium
JP5014094B2 (en) Man-machine interface equipment and drawing equipment
JP2018132875A (en) Programmable logic control system, programmable logic controller, communication test support device, communication test support method, and computer program executable on the communication test support device
JP2008225342A (en) Simulator system for operation training
JP2006302216A (en) Display device, screen data producing device and screen display system
JP4322780B2 (en) Screen creation device, screen creation program and recording medium
JP4562141B2 (en) Programmable logic controller, information processing apparatus, control program, and table creation program
JP4335109B2 (en) Screen creation device, screen creation program, and recording medium recording the same
JP2007252162A (en) Motor drive device
JP4697822B2 (en) Operation content setting method and display device
JP6042980B2 (en) Programmable controller system, drawing editor device thereof, program thereof
TWI709908B (en) Method, program product, and computer readable medium for operating software in plc editing environment
JP3823938B2 (en) Program creation device
JP5383136B2 (en) Debugging method and debugging program for man-machine interface device program
JP3808430B2 (en) DATA TRANSFER DEVICE, DATA TRANSFER SYSTEM, DATA TRANSFER METHOD, DATA TRANSFER PROGRAM, AND RECORDING MEDIUM CONTAINING THE DATA TRANSFER PROGRAM
JPH0460807A (en) Programming device for programmable controller
JP2776443B2 (en) Programmable controller
JP2005250869A (en) Protocol macro setting device and computer program
JP2001067110A (en) Teaching device for robot device, method for teaching robot device and control device for robot device
JP2023113476A (en) Protocol driver creation device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080630

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090827

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100804

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110307

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110427

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111101

R150 Certificate of patent or registration of utility model

Ref document number: 4859601

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20141111

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees