JP2020010079A - Communication system and communication method - Google Patents

Communication system and communication method Download PDF

Info

Publication number
JP2020010079A
JP2020010079A JP2018126257A JP2018126257A JP2020010079A JP 2020010079 A JP2020010079 A JP 2020010079A JP 2018126257 A JP2018126257 A JP 2018126257A JP 2018126257 A JP2018126257 A JP 2018126257A JP 2020010079 A JP2020010079 A JP 2020010079A
Authority
JP
Japan
Prior art keywords
communication device
communication
packet
data
transmitted
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.)
Pending
Application number
JP2018126257A
Other languages
Japanese (ja)
Inventor
貴司 川口
Takashi Kawaguchi
貴司 川口
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.)
JTEKT Corp
Original Assignee
JTEKT 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 JTEKT Corp filed Critical JTEKT Corp
Priority to JP2018126257A priority Critical patent/JP2020010079A/en
Publication of JP2020010079A publication Critical patent/JP2020010079A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

To provide a communication system and a communication method that prevent communication efficiency between devices from deteriorating due to transmission of reception confirmation information indicating reception of data from a transmission side and thereby can speed up data transfer.SOLUTION: In a communication system and a communication method in which packets including a header and a data body are mutually transmitted between a first communication device and a second communication device, the second communication device transmits reception confirmation information indicating reception of a packet transmitted from the first communication device and a data body to be transmitted to the first communication device by a single packet when a predetermined condition is satisfied.SELECTED DRAWING: Figure 2

Description

本発明は、通信システム及び通信方法に関する。   The present invention relates to a communication system and a communication method.

従来、例えばシーケンスプログラムに従って設備を制御するプログラマブルコントローラのモジュール間の通信は、受信側が送信側から一纏まりのデータを受け取ったとき、受信確認の信号(アクノリッジ信号)を送信側に送ることでハンドシェイクがなされている。特許文献1に記載のプログラマブルコントローラでは、マスターモジュールと複数のスレーブモジュールとが、リクエスト信号伝送線、アクノリッジ信号伝送線、データバス、ゲート信号伝送線で接続されており、データバスによってデータ転送がなされると共に、アクノリッジ信号伝送線を介してアクノリッジ信号が送信側に送られるように構成されている。   Conventionally, for example, communication between modules of a programmable controller that controls equipment according to a sequence program is performed by handshaking by transmitting a reception confirmation signal (acknowledge signal) to the transmission side when the reception side receives a group of data from the transmission side. Has been made. In the programmable controller described in Patent Document 1, a master module and a plurality of slave modules are connected by a request signal transmission line, an acknowledge signal transmission line, a data bus, and a gate signal transmission line, and data transfer is performed by the data bus. In addition, an acknowledgment signal is sent to the transmission side via an acknowledgment signal transmission line.

特開2003−206276号公報JP 2003-206276 A

近年の通信技術及び半導体技術の高度化により、例えばプログラマブルコントローラにおいても、モジュール間の通信が例えば100Mbpsの高速シリアル通信により行われるようになってきている。この場合、受信確認のためのパケットが通信トラフィックを増大させて通信の高速化の妨げとなるおそれがある。   With the advancement of communication technology and semiconductor technology in recent years, for example, even in a programmable controller, communication between modules has been performed by high-speed serial communication of, for example, 100 Mbps. In this case, the packet for the reception confirmation may increase the communication traffic and hinder the speeding up of the communication.

そこで、本発明は、送信側からデータを受け取ったことを示す受信確認情報の送信により装置間の通信効率が低下してしまうことを抑制し、データ転送の高速化を図ることが可能な通信システム及び通信方法を提供することを目的とする。   Therefore, the present invention provides a communication system capable of suppressing a decrease in communication efficiency between apparatuses due to transmission of reception confirmation information indicating that data has been received from a transmission side, and capable of increasing data transfer speed. And a communication method.

本発明は、上記の目的を達成するため、第1の通信装置と第2の通信装置との間でヘッダとデータ本体とを含むパケットを相互に送信する通信システムであって、前記第2の通信装置は、所定の条件を満たすとき、前記第1の通信装置から送信されたパケットを受信したことを示す受信確認情報と前記第1の通信装置に送信するデータ本体とを単一のパケットで送信する、通信システムを提供する。   The present invention provides a communication system for mutually transmitting a packet including a header and a data body between a first communication device and a second communication device, in order to achieve the above object. When the communication device satisfies a predetermined condition, the reception confirmation information indicating that the packet transmitted from the first communication device has been received and the data body to be transmitted to the first communication device are represented by a single packet. A communication system is provided for transmitting.

また、本発明は、上記の目的を達成するため、第1の通信装置と第2の通信装置との間でヘッダとデータ本体とを含むパケットを相互に送信する通信方法であって、前記第2の通信装置は、所定の条件を満たすとき、前記第1の通信装置から送信されたパケットを受信したことを示す受信確認情報と前記第1の通信装置に送信するデータ本体とを単一のパケットで送信する、通信方法を提供する。   According to another aspect of the present invention, there is provided a communication method for mutually transmitting a packet including a header and a data body between a first communication device and a second communication device. The second communication device, when a predetermined condition is satisfied, a single piece of reception confirmation information indicating that the packet transmitted from the first communication device has been received and a data body to be transmitted to the first communication device. A communication method for transmitting in a packet is provided.

本発明に係る通信システム及び通信方法によれば、送信側からデータを受け取ったことを示す受信確認情報の送信により装置間の通信効率が低下してしまうことを抑制し、データ転送の高速化を図ることが可能となる。   ADVANTAGE OF THE INVENTION According to the communication system and the communication method according to the present invention, it is possible to suppress a reduction in communication efficiency between devices due to transmission of reception confirmation information indicating that data has been received from a transmission side, and to increase the speed of data transfer. It becomes possible to plan.

本発明の実施の形態に係るプログラマブルコントローラ及びその周辺の接続構成例を示す概略構成図である。FIG. 1 is a schematic configuration diagram illustrating a connection configuration example of a programmable controller according to an embodiment of the present invention and peripheral components thereof. (a)は、本実施の形態に係る通信方法により、モジュール間でコマンド・レスポンス方式の通信を行う場合のタイムチャートの一例である。(b)は、比較例として示すタイムチャートである。(A) is an example of a time chart in the case of performing command-response communication between modules by the communication method according to the present embodiment. (B) is a time chart shown as a comparative example. (a)は、本実施の形態に係る受信確認及びコマンドパケットの一例を示す説明図である。(b)は、比較例に係る受信確認パケット及びコマンドパケットを示す説明図である。(A) is an explanatory diagram showing an example of a reception confirmation and command packet according to the present embodiment. (B) is an explanatory view showing a reception confirmation packet and a command packet according to a comparative example. (a)は、本実施の形態に係る通信方法により、モジュール間でサイクリック伝送を行う場合のタイムチャートの一例である。(b)は、比較例として示すタイムチャートである。(A) is an example of a time chart when performing cyclic transmission between modules by the communication method according to the present embodiment. (B) is a time chart shown as a comparative example. (a)は、本実施の形態に係る受信確認及び書き込みデータパケットの一例を示す説明図である。(b)は、比較例に係る受信確認パケット及び書き込みデータパケットを示す説明図である。(A) is an explanatory view showing an example of a reception confirmation and write data packet according to the present embodiment. (B) is an explanatory view showing a reception confirmation packet and a write data packet according to a comparative example.

[実施の形態]
本発明の実施の形態について、図1乃至図5を参照して説明する。なお、以下に説明する実施の形態は、本発明を実施する上での好適な具体例として示すものであり、技術的に好ましい種々の技術的事項を具体的に例示している部分もあるが、本発明の技術的範囲は、この具体的態様に限定されるものではない。
[Embodiment]
An embodiment of the present invention will be described with reference to FIGS. The embodiments described below are shown as preferred specific examples for carrying out the present invention, and there are portions specifically illustrating various technical matters that are technically preferable. However, the technical scope of the present invention is not limited to this specific embodiment.

図1は、本発明の実施の形態に係るプログラマブルコントローラ及びその周辺の接続構成例を示す概略構成図である。   FIG. 1 is a schematic configuration diagram showing an example of a connection configuration of a programmable controller according to an embodiment of the present invention and peripheral components thereof.

プログラマブルコントローラ1は、電源モジュール11、CPUモジュール12、通信モジュール13、出力モジュール14、入力モジュール15、及びこれら各モジュール11〜15が装着されたベース10を有して構成されている。電源モジュール11は、ベース10に設けられたプリント基板の配線パターンを介して、各モジュール12〜15に電源を供給する。   The programmable controller 1 includes a power supply module 11, a CPU module 12, a communication module 13, an output module 14, an input module 15, and a base 10 on which these modules 11 to 15 are mounted. The power supply module 11 supplies power to each of the modules 12 to 15 via a wiring pattern of a printed board provided on the base 10.

プログラマブルコントローラ1は、設備2の動作手順を示す動作プログラムに従って設備2を制御する。動作プログラムは、例えば国際規格IEC61131−3に規定されたラダー言語によって記述されたシーケンスプログラムであり、予めユーザによって作成されてCPUモジュール12に記憶されている。また、CPUモジュール12は、動作プログラムで用いられる各種のレジスタデータを記憶している。設備2は、例えば工作物(ワーク)の機械加工や組み立てを行う工作機械である。   The programmable controller 1 controls the facility 2 according to an operation program indicating an operation procedure of the facility 2. The operation program is, for example, a sequence program described in a ladder language defined in International Standard IEC61131-3, and is created in advance by a user and stored in the CPU module 12. Further, the CPU module 12 stores various register data used in the operation program. The equipment 2 is, for example, a machine tool that performs machining and assembling of a workpiece (work).

出力モジュール14は、設備2に設けられた複数のアクチュエータ21に接続された複数の出力接点を有している。複数のアクチュエータ21は、例えばソレノイドやモータ、あるいは油圧を制御する電磁切換弁等である。入力モジュール15は、設備2に設けられた複数のセンサ22からの入力信号によってオン/オフする複数の入力接点を有している。複数のセンサ22は、例えば近接センサや光電センサ、あるいはリミットスイッチ等である。CPUモジュール12は、入力モジュール15から各入力接点の状態を示す信号を受信し、動作プログラムにしたがって各出力接点をオン/オフさせる信号を出力モジュール14に送信することで、設備2を制御する。   The output module 14 has a plurality of output contacts connected to a plurality of actuators 21 provided in the facility 2. The plurality of actuators 21 are, for example, solenoids, motors, or electromagnetic switching valves that control hydraulic pressure. The input module 15 has a plurality of input contacts that are turned on / off by input signals from a plurality of sensors 22 provided in the facility 2. The plurality of sensors 22 are, for example, proximity sensors, photoelectric sensors, limit switches, or the like. The CPU module 12 controls the equipment 2 by receiving a signal indicating the state of each input contact from the input module 15 and transmitting a signal for turning on / off each output contact to the output module 14 according to an operation program.

通信モジュール13には、設備2を操作及びモニタすることが可能な操作盤3のタッチパネルコンピュータ31が通信ケーブル30によって接続されている。本実施の形態では、タッチパネルコンピュータ31がイーサネット(登録商標)によって通信モジュール13との通信を行うものとする。通信ケーブル30は、一方の端部の送信端子と他方の端部の受信端子とが接続されたクロスケーブルである。   A touch panel computer 31 of an operation panel 3 capable of operating and monitoring the facility 2 is connected to the communication module 13 by a communication cable 30. In the present embodiment, it is assumed that the touch panel computer 31 performs communication with the communication module 13 via Ethernet (registered trademark). The communication cable 30 is a cross cable in which a transmission terminal at one end and a reception terminal at the other end are connected.

操作盤3には、タッチパネルコンピュータ31の他、設備2の自動運転モードと各個操作モードとを切り替えるセレクトスイッチ32や、運転準備スイッチ33、自動運転の起動を指示するための起動スイッチ34、各個操作モードにおいてアクチュエータ21を動作させる実行スイッチ35、ならびに設備2の動作を即時停止させる非常停止スイッチ36が設けられている。   The operation panel 3 includes a touch panel computer 31, a select switch 32 for switching between the automatic operation mode of the equipment 2 and each operation mode, an operation preparation switch 33, a start switch 34 for instructing start of automatic operation, and individual operation. An execution switch 35 for operating the actuator 21 in the mode and an emergency stop switch 36 for immediately stopping the operation of the equipment 2 are provided.

タッチパネルコンピュータ31は、通信ケーブル30を介してプログラマブルコントローラ1から動作プログラムを読み出し、自動運転モードにおける動作プログラムの実行状況を画面に表示することが可能である。また、タッチパネルコンピュータ31は、レジスタデータの数値情報をプログラマブルコントローラ1から読み出し、画面に表示してユーザに提示することが可能である。   The touch panel computer 31 can read the operation program from the programmable controller 1 via the communication cable 30 and display the execution status of the operation program in the automatic operation mode on the screen. Further, the touch panel computer 31 can read out the numerical information of the register data from the programmable controller 1 and display it on the screen to present it to the user.

またさらに、タッチパネルコンピュータ31は、ユーザが画面に触れるタッチ操作によって動作プログラムやレジスタデータの書き換え指示を受け付け、その書き換え内容をプログラマブルコントローラ1に送信することで、動作プログラムやレジスタデータの書き換えを行わせることも可能である。   Further, the touch panel computer 31 receives an instruction to rewrite the operation program and register data by a touch operation of touching the screen by the user, and transmits the rewritten content to the programmable controller 1 to cause the operation program and register data to be rewritten. It is also possible.

通信モジュール13は、タッチパネルコンピュータ31からの読み出し又は書き込み指令を受け付け、その指示内容をコマンドとしてCPUモジュール12に送る。CPUモジュール12は、通信モジュール13からのコマンドを受け付け、通信モジュール13にレスポンスを返す。通信モジュール13は、通信ケーブル30を介してCPUモジュール12からのレスポンスをタッチパネルコンピュータ31に送信する。   The communication module 13 receives a read or write command from the touch panel computer 31 and sends the command to the CPU module 12 as a command. The CPU module 12 receives a command from the communication module 13 and returns a response to the communication module 13. The communication module 13 transmits a response from the CPU module 12 to the touch panel computer 31 via the communication cable 30.

CPUモジュール12と通信モジュール13との通信は、本発明の通信システムによって行われる。この通信システムにおいて、CPUモジュール12は、本発明の第1の通信装置に相当するマスターモジュールである。また、通信モジュール13は、本発明の第2の通信装置に相当するスレーブモジュールである。CPUモジュール12と通信モジュール13とは、ベース10に設けられたデータ交換バスを介するシリアル通信によってデータ交換を行う。   Communication between the CPU module 12 and the communication module 13 is performed by the communication system of the present invention. In this communication system, the CPU module 12 is a master module corresponding to the first communication device of the present invention. Further, the communication module 13 is a slave module corresponding to the second communication device of the present invention. The CPU module 12 and the communication module 13 exchange data by serial communication via a data exchange bus provided on the base 10.

本実施の形態では、このデータ交換が、産業用オープンネットワークとして広く普及しつつあるEtherCAT(イーサキャット:登録商標)に部分的に準拠したプロトコルにより行われ、CPUモジュール12と通信モジュール13との間で送受信されるパケットの最小サイズ及び最大サイズが規定されている。最小サイズは、例えば80バイトであり、下位の通信階層における通信の制御のために必要なヘッダ等のデータのバイト数(ヘッダ長)と、相手モジュールに送信すべき正味のデータのバイト数(ペイロード長)との和が最小サイズに満たない場合には、意味のない空データを付加したパケットを送信することとなる。パケットの最大サイズは、例えば1152バイトである。   In the present embodiment, this data exchange is performed by a protocol partially compliant with EtherCAT (registered trademark), which is becoming widespread as an industrial open network, and between the CPU module 12 and the communication module 13. Defines the minimum size and the maximum size of the packet transmitted and received. The minimum size is, for example, 80 bytes. The number of bytes (header length) of data such as a header necessary for controlling communication in a lower communication layer, and the number of bytes of net data (payload) to be transmitted to the partner module If the sum of the length and the length is less than the minimum size, a packet to which meaningless empty data is added is transmitted. The maximum size of the packet is, for example, 1152 bytes.

また、本実施の形態では、相手モジュールから送信されたパケットの受信確認情報のデータ長(バイト数)と、自モジュールから相手モジュールに送信するデータ本体のデータ長(バイト数)との和(合計バイト数)が、相手モジュールに送信可能な最大サイズのパケットにおけるペイロード長以下であることを条件として、相手モジュールから送信されたパケットの受信確認情報と、相手モジュールに送信するデータ本体とを、単一のパケットで組み合わせて送信する。なお、上記の和が上記のペイロード長を超える場合には、データ本体を複数のパケットに分割して送信する。   Also, in the present embodiment, the sum (total) of the data length (number of bytes) of the reception confirmation information of the packet transmitted from the partner module and the data length (byte number) of the data body transmitted from the own module to the partner module (The number of bytes) is equal to or less than the payload length of the maximum size packet that can be transmitted to the partner module, the reception confirmation information of the packet transmitted from the partner module and the data body to be transmitted to the partner module are simply described. Combined and transmitted in one packet. If the sum exceeds the payload length, the data body is divided into a plurality of packets and transmitted.

ここで、最大サイズのパケットにおけるペイロード長とは、相手モジュールに送信可能な最大サイズのパケットのバイト数からヘッダ等の通信制御用のデータのバイト数を差し引いた正味のデータのバイト数をいう。換言すれば、CPUモジュール12や通信モジュール13がコマンドあるいはレスポンスなどのデータ本体の領域として任意に用いることができるデータの最大バイト数である。   Here, the payload length of the maximum-size packet refers to the net number of data bytes obtained by subtracting the byte number of communication control data such as the header from the byte number of the maximum-size packet that can be transmitted to the partner module. In other words, it is the maximum number of bytes of data that the CPU module 12 or the communication module 13 can arbitrarily use as a data body area such as a command or a response.

また、本実施の形態では、通信モジュール13からCPUモジュール12に送信するデータ本体の内容が、CPUモジュール12からデータを読み出す読み出しコマンドであるとき、CPUモジュール12から送信されたパケットを受信したことを示す受信確認情報と、CPUモジュール12に送信するデータ本体(コマンドデータ)とを単一のパケットで送信する。このような読み出しコマンドは、その中身が読み出し開始アドレス及び読み出しデータサイズであることから、データ本体のデータ長が短く、CPUモジュール12から送信されたパケットの受信確認情報と合わせて単一のパケットを構成することにより、モジュール間通信の効率を大きく改善することができる。   Further, in the present embodiment, when the content of the data body transmitted from the communication module 13 to the CPU module 12 is a read command for reading data from the CPU module 12, it is determined that the packet transmitted from the CPU module 12 has been received. The received acknowledgment information and the data body (command data) to be transmitted to the CPU module 12 are transmitted in a single packet. Since such a read command includes a read start address and a read data size, the data length of the data body is short, and a single packet is combined with the reception confirmation information of the packet transmitted from the CPU module 12. With this configuration, the efficiency of inter-module communication can be greatly improved.

なお、CPUモジュール12から送信されたパケットの受信確認情報のデータ長と、通信モジュール13から送信するデータ本体のデータ長との和が、通信モジュール13からCPUモジュール12に送信可能な最小サイズのパケットにおけるデータのペイロード長以下であることを、CPUモジュール12から送信されたパケットの受信確認情報とCPUモジュール12に送信するデータ本体とを単一のパケットで送信するための条件としてもよい。パケットの最小サイズが規定されている場合において、この最小サイズのパケットで送信可能なデータ長の最大値よりも小さいデータを送る場合には、意味のない空データを付加してパケットを構成する必要があるが、上記の条件を満たすときに受信確認情報とデータ本体とを単一のパケットで送信すれば、空データを小さくしてモジュール間通信の効率改善に寄与することができる。   The sum of the data length of the acknowledgment information of the packet transmitted from the CPU module 12 and the data length of the data itself transmitted from the communication module 13 is the minimum size packet that can be transmitted from the communication module 13 to the CPU module 12. May be a condition for transmitting the reception confirmation information of the packet transmitted from the CPU module 12 and the data body transmitted to the CPU module 12 in a single packet. If the minimum packet size is specified and data smaller than the maximum data length that can be transmitted with this minimum size packet is sent, it is necessary to add meaningless empty data to form the packet. However, if the reception acknowledgment information and the data body are transmitted in a single packet when the above condition is satisfied, empty data can be reduced to contribute to improvement in the efficiency of inter-module communication.

図2(a)は、本実施の形態に係る通信方法でCPUモジュール12と通信モジュール13とがコマンド・レスポンス方式の通信を行う場合のタイムチャートの一例である。図2(b)は、比較例として示す、本実施の形態に係る通信方法ではない従来の通信方法でCPUモジュール12と通信モジュール13とがコマンド・レスポンス方式の通信を行う場合のタイムチャートの一例である。   FIG. 2A is an example of a time chart when the CPU module 12 and the communication module 13 perform command-response communication using the communication method according to the present embodiment. FIG. 2B is an example of a time chart shown as a comparative example, in which the CPU module 12 and the communication module 13 perform command-response communication using a conventional communication method other than the communication method according to the present embodiment. It is.

図2(a)及び(b)に示す例では、通信モジュール13がCPUモジュール12に読み出しコマンドを送信し、CPUモジュール12が記憶しているレジスタデータを読み出す場合のタイムチャートを示している。図2(a)及び(b)に示す白抜きの矢印が一つのパケットであり、矢印の方向は送信の方向を示し、矢印の幅はパケット長を模式的に示している。図2(a)及び(b)の横軸は時間軸である。   2A and 2B show time charts when the communication module 13 transmits a read command to the CPU module 12 and reads the register data stored in the CPU module 12. The white arrows shown in FIGS. 2A and 2B indicate one packet, the direction of the arrow indicates the direction of transmission, and the width of the arrow schematically indicates the packet length. The horizontal axis in FIGS. 2A and 2B is the time axis.

図2(a)及び(b)において、P_comは、通信モジュール13がCPUモジュール12に発行する読み出しコマンドのパケットである。P_ackは、読み出しコマンドに対してCPUモジュール12が通信モジュール13にコマンドを受け付けたことを通知する受信確認のパケットである。P_resは、読み出しコマンドに対してCPUモジュール12が通信モジュール13に返すレスポンスのパケットであり、読み出しコマンドにおいて指定されたアドレス及びデータサイズのレジスタデータが含まれる。   2A and 2B, P_com is a packet of a read command issued by the communication module 13 to the CPU module 12. P_ack is a reception confirmation packet for notifying that the CPU module 12 has accepted the command to the communication module 13 in response to the read command. P_res is a response packet returned from the CPU module 12 to the communication module 13 in response to the read command, and includes register data of the address and data size specified in the read command.

また、図2(a)におけるP_ack+comは、通信モジュール13がCPUモジュール12に対してレスポンスを受け取ったことを通知する受信確認の情報と、通信モジュール13がCPUモジュール12に発行する読み出しコマンドとを組み合わせたパケットである。図2(b)において通信モジュール13が送信するP_ackは、CPUモジュール12に対してレスポンス(P_res)を受け取ったことを通知する受信確認のパケットである。   P_ack + com in FIG. 2A is a combination of reception confirmation information notifying that the communication module 13 has received a response to the CPU module 12 and a read command issued by the communication module 13 to the CPU module 12. Packet. In FIG. 2B, P_ack transmitted by the communication module 13 is a reception confirmation packet that notifies the CPU module 12 that a response (P_res) has been received.

図2(a)と図2(b)との比較から明らかなように、本実施の形態に係る通信方法でモジュール間通信を行った場合には、P_ack及びP_comの二つのパケットをP_ack+comの単一のパケットにまとめることができるので、通信モジュール13からのパケット送信回数を減らすことができる。これにより、パケットの送信に要する送信時間ならびに二つのパケットを連続して送る場合に不可避的に発生するパケット間の空白時間を削減することができ、通信を高速化することが可能となる。   As is clear from the comparison between FIG. 2A and FIG. 2B, when the communication between the modules is performed by the communication method according to the present embodiment, two packets P_ack and P_com are converted into a single packet of P_ack + com. Since the packets can be collected into one packet, the number of packet transmissions from the communication module 13 can be reduced. As a result, it is possible to reduce a transmission time required for packet transmission and a blank time between packets that are inevitably generated when two packets are continuously transmitted, and it is possible to speed up communication.

図3(a)は、図2(a)にP_ack+comで示す受信確認及びコマンドパケットの一例を示す説明図である。このパケットは、16バイトのヘッダ、2バイトの受信確認情報、29バイトのコマンドデータ、及び33バイトの空きデータからなる。コマンドデータデータは、当該パケットのデータ本体である。   FIG. 3A is an explanatory diagram showing an example of a reception confirmation and command packet indicated by P_ack + com in FIG. 2A. This packet includes a 16-byte header, 2-byte reception confirmation information, 29-byte command data, and 33-byte free data. The command data is the data body of the packet.

図3(b)は、図2(b)にP_ackで示す受信確認パケット、及び図2(b)にP_comで示すコマンドパケットの一例を示す説明図である。受信確認パケットは、16バイトのヘッダ、2バイトの受信確認情報、及び62バイトの空きデータからなる。コマンドパケットは、16バイトのヘッダ、29バイトのコマンドデータ、及び35バイトの空きデータからなる。   FIG. 3B is an explanatory diagram showing an example of a reception confirmation packet indicated by P_ack in FIG. 2B and a command packet indicated by P_com in FIG. 2B. The reception confirmation packet includes a 16-byte header, 2-byte reception confirmation information, and 62-byte free data. The command packet includes a 16-byte header, 29-byte command data, and 35-byte free data.

図3(b)に示すように、受信確認パケットとコマンドパケットとを別個に送る場合には、通信モジュール13が送信する空きデータが多くなり、通信効率が低下してしまうが、図3(a)に示すように受信確認情報とコマンドデータとを単一のパケットで送ることにより、通信モジュール13が送信する空きデータを減らして通信効率を高めることができる。   As shown in FIG. 3B, when the reception confirmation packet and the command packet are sent separately, the free data transmitted by the communication module 13 increases, and the communication efficiency decreases. By transmitting the reception confirmation information and the command data in a single packet as shown in (1), the free data transmitted by the communication module 13 can be reduced and the communication efficiency can be improved.

図4(a)は、本実施の形態に係る通信方法でCPUモジュール12と通信モジュール13とが、定期的にデータ交換を行うサイクリック伝送を行う場合のタイムチャートの一例である。図4(b)は、比較例として示す、本実施の形態に係る通信方法ではない従来の通信方法でCPUモジュール12と通信モジュール13とがサイクリック伝送を行う場合のタイムチャートの一例である。サイクリック伝送では、CPUモジュール12と通信モジュール13とが相互に書き込みデータを送信するが、ここでは、CPUモジュール12が通信モジュール13に送信するデータのサイズが、通信モジュール13がCPUモジュール12に送信するデータのサイズよりも大きい場合について説明する。   FIG. 4A is an example of a time chart in the case where the CPU module 12 and the communication module 13 perform cyclic transmission in which data is exchanged periodically in the communication method according to the present embodiment. FIG. 4B is an example of a time chart showing a comparative example in which the CPU module 12 and the communication module 13 perform cyclic transmission by a conventional communication method other than the communication method according to the present embodiment. In the cyclic transmission, the CPU module 12 and the communication module 13 transmit write data to each other. Here, the size of the data transmitted by the CPU module 12 to the communication module 13 is determined by the communication module 13 transmitting to the CPU module 12. A case where the size is larger than the size of the data to be performed will be described.

図4(a)及び(b)において、P_datLは、CPUモジュール12が通信モジュール13に書き込みデータを送るサイクリック伝送のパケットである。P_ack+datSは、P_datLに対する受信確認、及び通信モジュール13がCPUモジュール12に書き込みデータを送るサイクリック伝送のパケットである。P_ackは、サイクリック伝送のパケットを受け取ったことを通知する受信確認のパケットである。P_datSは、通信モジュール13がCPUモジュール12に書き込みデータを送るサイクリック伝送のパケットである。   4A and 4B, P_datL is a cyclic transmission packet in which the CPU module 12 sends write data to the communication module 13. P_ack + datS is a packet for cyclic transmission in which reception of P_datL is confirmed and the communication module 13 sends write data to the CPU module 12. P_ack is a packet for acknowledging that a packet for cyclic transmission has been received. P_datS is a cyclic transmission packet in which the communication module 13 sends write data to the CPU module 12.

図4(a)と図4(b)との比較から明らかなように、本実施の形態に係る通信方法でモジュール間のサイクリック伝送を行った場合には、P_ack及びP_datSの二つのパケットをP_ack+datSの単一のパケットにまとめることができるので、通信モジュール13からのパケット送信回数を減らすことができる。これにより、パケットの送信に要する送信時間ならびに二つのパケットを連続して送る場合に不可避的に発生するパケット間の空白時間を削減することができ、サイクリック伝送を高速化することが可能となる。   As is clear from a comparison between FIG. 4A and FIG. 4B, when cyclic transmission between modules is performed by the communication method according to the present embodiment, two packets of P_ack and P_datS are transmitted. Since a single packet of P_ack + datS can be collected, the number of packet transmissions from the communication module 13 can be reduced. As a result, it is possible to reduce the transmission time required for packet transmission and the blank time between packets that are inevitably generated when two packets are continuously transmitted, and to speed up cyclic transmission. .

図5(a)は、図4(a)にP_ack+datSで示す受信確認及び書き込みデータパケットの一例を示す説明図である。このパケットは、16バイトのヘッダ、2バイトの受信確認情報、29バイトの書き込みデータ、及び33バイトの空きデータからなる。書き込みデータは、当該パケットのデータ本体である。   FIG. 5A is an explanatory diagram showing an example of a reception confirmation and write data packet indicated by P_ack + datS in FIG. 4A. This packet includes a 16-byte header, 2-byte reception confirmation information, 29-byte write data, and 33-byte free data. The write data is the data body of the packet.

図5(b)は、図4(b)にP_ackで示す通信モジュール13が送信する受信確認パケット、及び図4(b)にP_datSで示す書き込みデータパケットの一例を示す説明図である。受信確認パケットは、16バイトのヘッダ、2バイトの受信確認情報、及び62バイトの空きデータからなる。書き込みデータパケットは、16バイトのヘッダ、29バイトの書き込みデータ、及び35バイトの空きデータからなる。   FIG. 5B is an explanatory diagram showing an example of a reception confirmation packet transmitted by the communication module 13 indicated by P_ack in FIG. 4B, and an example of a write data packet indicated by P_datS in FIG. 4B. The reception confirmation packet includes a 16-byte header, 2-byte reception confirmation information, and 62-byte free data. The write data packet includes a 16-byte header, 29-byte write data, and 35-byte free data.

図5(b)に示すように、受信確認パケットと書き込みデータパケットとを別個に送る場合には、コマンド・レスポンス方式の通信を行う場合と同様に、通信モジュール13が送信する空きデータが多くなって通信効率が低下してしまうが、図5(a)に示すように受信確認情報と書き込みデータとを単一のパケットで送ることにより、通信モジュール13が送信する空きデータを減らして通信効率を高めることができる。   As shown in FIG. 5B, when the acknowledgment packet and the write data packet are sent separately, the amount of free data transmitted by the communication module 13 increases as in the case of the command-response communication. However, by transmitting the reception acknowledgment information and the write data in a single packet as shown in FIG. 5A, the vacant data transmitted by the communication module 13 is reduced and the communication efficiency is reduced. Can be enhanced.

(実施の形態の作用及び効果)
以上説明した本発明の実施の形態によれば、受信確認情報の送信によりモジュール間の通信効率が低下してしまうことを抑制し、データ転送の高速化を図ることが可能となる。
(Operation and effect of the embodiment)
According to the embodiment of the present invention described above, it is possible to suppress a decrease in communication efficiency between modules due to transmission of reception confirmation information, and to achieve a higher data transfer speed.

(付記)
以上、本発明を実施の形態に基づいて説明したが、これらの実施の形態は特許請求の範囲に係る発明を限定するものではない。また、実施の形態の中で説明した特徴の組合せの全てが発明の課題を解決するための手段に必須であるとは限らない点に留意すべきである。
(Note)
As described above, the present invention has been described based on the embodiments, but these embodiments do not limit the invention according to the claims. Also, it should be noted that not all combinations of the features described in the embodiments are necessarily indispensable to the means for solving the problems of the invention.

また、本発明は、その趣旨を逸脱しない範囲で適宜変形して実施することが可能である。例えば、上記の実施の形態では、本発明の通信システム及び通信方式をプログラマブルコントローラのモジュール間通信に適用した場合について説明したが、これに限らず、様々な装置間の通信に本発明を適用することが可能である。   Further, the present invention can be appropriately modified and implemented without departing from the spirit thereof. For example, in the above-described embodiment, a case has been described in which the communication system and the communication method of the present invention are applied to communication between modules of a programmable controller. However, the present invention is not limited to this, and the present invention is applied to communication between various devices. It is possible.

1…プログラマブルコントローラ
12…CPUモジュール(第1の通信装置、マスターモジュール)
13…通信モジュール(第2の通信装置、スレーブモジュール)
2…設備
1. Programmable controller 12 CPU module (first communication device, master module)
13. Communication module (second communication device, slave module)
2. Equipment

Claims (5)

第1の通信装置と第2の通信装置との間でヘッダとデータ本体とを含むパケットを相互に送信する通信システムであって、
前記第2の通信装置は、所定の条件を満たすとき、前記第1の通信装置から送信されたパケットを受信したことを示す受信確認情報と前記第1の通信装置に送信するデータ本体とを単一のパケットで送信する、
通信システム。
A communication system for mutually transmitting a packet including a header and a data body between a first communication device and a second communication device,
When the second communication device satisfies a predetermined condition, the second communication device simply receives acknowledgment information indicating that a packet transmitted from the first communication device has been received and a data body to be transmitted to the first communication device. Send in one packet,
Communications system.
前記所定の条件は、前記第1の通信装置から送信されたパケットの受信確認情報のデータ長と前記第2の通信装置から送信するデータ本体のデータ長との和が、前記第2の通信装置から前記第1の通信装置に送信可能な最大サイズのパケットにおけるペイロード長以下であることを含む、
請求項1に記載の通信システム。
The predetermined condition is that a sum of a data length of reception confirmation information of a packet transmitted from the first communication device and a data length of a data body transmitted from the second communication device is equal to the second communication device. From the payload length of the maximum size packet that can be transmitted to the first communication device from
The communication system according to claim 1.
前記第2の通信装置は、前記第1の通信装置に送信するデータ本体が前記第1の通信装置からデータを読み出す読み出しコマンドであるとき、前記第1の通信装置から送信されたパケットを受信したことを示す受信確認情報と前記第1の通信装置に送信するデータ本体とを単一のパケットで送信する、
請求項1又は2に記載の通信システム。
The second communication device has received a packet transmitted from the first communication device when a data body transmitted to the first communication device is a read command for reading data from the first communication device. Transmitting the reception confirmation information indicating the fact and the data body to be transmitted to the first communication device in a single packet,
The communication system according to claim 1.
前記第1の通信装置は、設備の動作手順を示す動作プログラムに従って当該設備を制御するプログラマブルコントローラのマスターモジュールであり、
前記第2の通信装置は、前記第1の通信装置とデータ交換バスを介してデータ交換を行う前記プログラマブルコントローラのスレーブモジュールである、
請求項1乃至3の何れか1項に記載の通信システム。
The first communication device is a master module of a programmable controller that controls the facility according to an operation program indicating an operation procedure of the facility,
The second communication device is a slave module of the programmable controller that exchanges data with the first communication device via a data exchange bus.
The communication system according to claim 1.
第1の通信装置と第2の通信装置との間でヘッダとデータ本体とを含むパケットを相互に送信する通信方法であって、
前記第2の通信装置は、所定の条件を満たすとき、前記第1の通信装置から送信されたパケットを受信したことを示す受信確認情報と前記第1の通信装置に送信するデータ本体とを単一のパケットで送信する、
通信方法。
A communication method for mutually transmitting a packet including a header and a data body between a first communication device and a second communication device,
When the second communication device satisfies a predetermined condition, the second communication device simply receives acknowledgment information indicating that a packet transmitted from the first communication device has been received and a data body to be transmitted to the first communication device. Send in one packet,
Communication method.
JP2018126257A 2018-07-02 2018-07-02 Communication system and communication method Pending JP2020010079A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018126257A JP2020010079A (en) 2018-07-02 2018-07-02 Communication system and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018126257A JP2020010079A (en) 2018-07-02 2018-07-02 Communication system and communication method

Publications (1)

Publication Number Publication Date
JP2020010079A true JP2020010079A (en) 2020-01-16

Family

ID=69152452

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018126257A Pending JP2020010079A (en) 2018-07-02 2018-07-02 Communication system and communication method

Country Status (1)

Country Link
JP (1) JP2020010079A (en)

Similar Documents

Publication Publication Date Title
WO2011114994A1 (en) Programmable controller
CN103439866B (en) VxWorks-based lithography machine double-workbench communication method and device
CN108650159A (en) A kind of field bus communication method based on RS485 interfaces
CN108247632A (en) A kind of cooperation robot control system based on ROS
CN105049312A (en) Industrial control ring network system and networking method thereof
KR101179431B1 (en) Network Management System based on a EhterCAT And Managing Method thereof
EP1739569A1 (en) Device and method for performing multi-function using unique port in wireless terminal
JP5029906B2 (en) I / O system
CN101414177A (en) System for converting serial port to Ethernet based on field bus data acquisition
JP2020010079A (en) Communication system and communication method
CN107222379A (en) A kind of method and apparatus of serial communication
CN113194048B (en) Device for dynamically switching CPU and GPU topology and use method
KR20000055999A (en) a system of in-line equipments and a controlling method thereof
US6654385B1 (en) Message division communication method and communication system
KR20110072009A (en) Integrated network system for communication of robot and operation method thereof
CN1964300A (en) Read-write serial interface bus communication controller
JP4346539B2 (en) Control device
CN1486047A (en) Method and apparatus for gateway control
CN107864081B (en) Synchronous motor data communication system based on ModbusRTU protocol
WO1988009532A1 (en) Serial data link for numerical control device
CN201266317Y (en) On-site bus serial communication and Ethernet ascendency complementary system
WO2021157513A1 (en) Control system
JP2549217B2 (en) Response sequence transmission method
JP2008146527A (en) Command processing method
CN115913907A (en) Can realize integrative PLC of multichannel CANopen principal and subordinate