JP2020119012A - Communication control apparatus - Google Patents

Communication control apparatus Download PDF

Info

Publication number
JP2020119012A
JP2020119012A JP2019006984A JP2019006984A JP2020119012A JP 2020119012 A JP2020119012 A JP 2020119012A JP 2019006984 A JP2019006984 A JP 2019006984A JP 2019006984 A JP2019006984 A JP 2019006984A JP 2020119012 A JP2020119012 A JP 2020119012A
Authority
JP
Japan
Prior art keywords
transmission
transmission buffer
control circuit
buffer
data
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
JP2019006984A
Other languages
Japanese (ja)
Inventor
快昌 惠木
Yoshimasa Egi
快昌 惠木
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.)
Okuma Corp
Original Assignee
Okuma Corp
Okuma Machinery Works Ltd
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 Okuma Corp, Okuma Machinery Works Ltd filed Critical Okuma Corp
Priority to JP2019006984A priority Critical patent/JP2020119012A/en
Publication of JP2020119012A publication Critical patent/JP2020119012A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

To reduce a processing load in a communication control apparatus.SOLUTION: A communication control apparatus includes transmission buffers 2A and 2B, transmission buffer control circuits 7A and 7B that cause the transmission buffer 2A or the transmission buffer 2B to store fixed data which is data having a fixed data length, and a transmission control circuit 3 that transmits the fixed data stored in each of the transmission buffers. The transmission control circuit 3 performs transmission processing that transmits first fixed data stored in the transmission buffer 2A, and as the transmission processing is performed, the transmission buffer control circuit 7B performs storage processing that causes the transmission buffer 2B to store second fixed data. As the transmission processing is performed, the transmission buffer control circuit 7A specifies information included in the second fixed data based on a transmitted address, and performs common processing that causes the specified information to be stored in a region specified by the transmitted address in a storage region of the transmission buffer 2A.SELECTED DRAWING: Figure 3

Description

本発明は、通信制御装置に関し、特に、固定周期で固定データ長のデータの授受を行う装置に関する。 The present invention relates to a communication control device, and more particularly, to a device for transmitting/receiving data having a fixed data length in a fixed cycle.

工作機械等、複数のモータを同期させて制御する装置において、指令を作成するNC装置とモータを制御するインバータとの通信インターフェースに求められる技術要件としては、高速性に加え、定周期性および軸間同期性が必要とされる。さらに、通信インターフェースへの送信データ書き込み、および通信インターフェースからの受信データ読み込みは通信周期内のタイミング制約無しで行えることが望ましい。 In a machine tool or other device that controls a plurality of motors in synchronization, the communication interface between the NC device that creates commands and the inverter that controls the motors has the technical requirements of high speed, regularity, and axis. Inter-synchronization is required. Furthermore, it is desirable that writing of transmission data to the communication interface and reading of reception data from the communication interface can be performed without timing constraints within the communication cycle.

一般的に、通信インターフェースへの送信データの書き込み、および受信データ読み込みを、通信周期内のタイミング制約無しで行う方式として、DMA方式、FIFO方式、ダブルバッファ方式等がある。DMA方式は、通信インターフェースにアクセスするバッファと、通信インターフェースが使用するバッファとの間を上位制御装置がダイレクトメモリアクセス(DMA)で転送する方式である。FIFO方式は、上位制御装置と通信インターフェースとの間を先入れ先出しのバッファで接続する方式である。ダブルバッファ方式は、上位制御装置が通信インターフェースにアクセスするバッファと通信インターフェースが送受信処理に使用するバッファとを準備し、通信周期毎にバッファの役割を切り替える方式である。これらの方式のうち、FIFO方式は、送受信の順番に沿ったシーケンシャルなアクセスしかできないため、通信データサイズが大きい装置には適さない。また、DMAを使用した方式は、バッファ間のメモリ転送を行っている期間は送信処理を行うことができず、通信帯域の利用効率が下がる課題がある。そのため、通信データサイズが大きく、通信帯域の利用効率を向上させたい場合、ダブルバッファ方式を使用することが望まれる。 Generally, there are a DMA method, a FIFO method, a double buffer method, and the like as a method of writing transmission data to a communication interface and reading reception data without timing constraints within a communication cycle. The DMA method is a method in which the host controller transfers data between a buffer that accesses the communication interface and a buffer that is used by the communication interface by direct memory access (DMA). The FIFO system is a system in which a host controller and a communication interface are connected by a first-in first-out buffer. The double buffer system is a system in which the host controller prepares a buffer for accessing the communication interface and a buffer used by the communication interface for transmission/reception processing, and switches the role of the buffer for each communication cycle. Among these methods, the FIFO method is not suitable for a device having a large communication data size because it can only perform sequential access in the order of transmission and reception. In addition, the method using the DMA has a problem that the transmission processing cannot be performed during the memory transfer between the buffers, and the utilization efficiency of the communication band is lowered. Therefore, when the communication data size is large and it is desired to improve the utilization efficiency of the communication band, it is desirable to use the double buffer method.

ダブルバッファ方式を使用した通信制御装置の動作を図1および図2を参照して説明する。 The operation of the communication control device using the double buffer method will be described with reference to FIGS. 1 and 2.

図1は通信制御装置の送信側のブロック図であり、上位制御装置1は送信側通信制御装置14に対して送信データを設定し、送信側通信制御装置14は送信信号を図示しない通信相手先に送信する。上位制御装置1は、切替器4を介して、送信データを送信バッファ2Aまたは2Bに書き込む(記憶させる)。送信制御回路3はタイマ6から出力される信号に基づいて送信開始タイミングを決定し、図示しない通信相手先に送信信号を出力する。送信制御回路3が送信するデータは、切替器5の状態に応じて、送信バッファ2Aまたは2Bのどちらかから読み込まれる。切替器4、5はタイマ6から出力される信号に基づいて通信周期毎に同期して状態が切り替わる。また、切替器4、5が接続する送信バッファ2A、2Bは、書き込みと読み出しとが逆になる様に制御され、上位制御装置1が送信データを書き込む側の送信バッファと、送信制御回路3が送信データを読み込む側の送信バッファは排他的になる。すなわち、上位制御装置1が送信バッファ2Aに書き込みを行っているとき、送信制御回路3は送信バッファ2Bのデータを送信し、次の通信周期では、切替器4、5の状態が切り替えられ、上位制御装置1は送信バッファ2Bに書き込みを行い、送信制御回路3は送信バッファ2Aのデータを送信する。この仕組みにより、上位制御装置1は、通信周期内に送信バッファ書き込みを完了させればよく、タイミング制約無しで送信バッファに書き込みができる。 FIG. 1 is a block diagram of the transmission side of the communication control apparatus. The host control apparatus 1 sets transmission data to the transmission side communication control apparatus 14, and the transmission side communication control apparatus 14 sends a transmission signal to a communication partner (not shown). Send to. The host controller 1 writes (stores) the transmission data in the transmission buffer 2A or 2B via the switch 4. The transmission control circuit 3 determines the transmission start timing based on the signal output from the timer 6, and outputs the transmission signal to a communication partner (not shown). The data transmitted by the transmission control circuit 3 is read from either the transmission buffer 2A or 2B depending on the state of the switch 5. The states of the switches 4 and 5 are switched in synchronization with each communication cycle based on the signal output from the timer 6. Further, the transmission buffers 2A and 2B to which the switches 4 and 5 are connected are controlled so that writing and reading are reversed, and the transmission buffer on the side in which the host controller 1 writes transmission data and the transmission control circuit 3 are The transmission buffer on the side that reads the transmission data becomes exclusive. That is, while the upper control device 1 is writing to the transmission buffer 2A, the transmission control circuit 3 transmits the data of the transmission buffer 2B, and in the next communication cycle, the states of the switches 4 and 5 are switched, The control device 1 writes in the transmission buffer 2B, and the transmission control circuit 3 transmits the data in the transmission buffer 2A. With this mechanism, the higher-level control device 1 has only to complete the writing of the transmission buffer within the communication cycle, and can write to the transmission buffer without timing constraint.

図2は通信制御装置の受信側のブロック図である。受信側通信制御装置15には、図示しない通信相手から受信信号が入力され、上位制御装置10は受信側通信制御装置15が受信したデータを取得する。上位制御装置10が取得する受信データは切替器12により、受信バッファ9Aまたは9Bから読み込まれる。受信制御回路8は図示しない通信相手先から入力される受信信号を復調して受信データを取得し、切替器11により、受信バッファ9Aまたは9Bのどちらかに受信データを書き込む。また、受信制御回路8は、受信信号に基づき、タイマ13を図1に示すタイマ6と同期化する。切替器11、12はタイマ13により通信周期毎に同期して状態が切り替わる。また、切替器11、12が接続する受信バッファ9A、9Bは、書き込みと読み出しとが逆になる様に制御され、上位制御装置10が受信データを読み込む側の受信バッファと、受信制御回路8が受信データを書き込む側の送信バッファは排他的になる。すなわち、上位制御装置10が受信バッファ9Aから読み込みを行っているときに、受信制御回路8は受信バッファ9Bに受信データを書き込み、次の通信周期では、切替器11、12の状態が切り替えられ、上位制御装置10は受信バッファ9Bから読み込みを行い、受信制御回路8は受信バッファ9Aに受信データを設定する。この仕組みにより、上位制御装置10は、通信周期内に受信バッファの読み込みを完了させればよく、タイミング制約無しで受信バッファの読み込みができる。 FIG. 2 is a block diagram of the receiving side of the communication control device. A reception signal is input to the reception-side communication control device 15 from a communication partner (not shown), and the host control device 10 acquires the data received by the reception-side communication control device 15. The reception data acquired by the host controller 10 is read from the reception buffer 9A or 9B by the switch 12. The reception control circuit 8 demodulates a reception signal input from a communication partner (not shown) to acquire reception data, and the switch 11 writes the reception data in either the reception buffer 9A or 9B. Further, the reception control circuit 8 synchronizes the timer 13 with the timer 6 shown in FIG. 1 based on the received signal. The states of the switches 11 and 12 are switched by a timer 13 in synchronization with each communication cycle. Further, the reception buffers 9A and 9B connected to the switches 11 and 12 are controlled so that writing and reading are reversed, and the reception buffer on the side where the higher-level controller 10 reads the reception data and the reception control circuit 8 are The transmission buffer on the side where the received data is written becomes exclusive. That is, while the host controller 10 is reading from the reception buffer 9A, the reception control circuit 8 writes the reception data in the reception buffer 9B, and the states of the switches 11 and 12 are switched in the next communication cycle. The host controller 10 reads from the reception buffer 9B, and the reception control circuit 8 sets the reception data in the reception buffer 9A. With this mechanism, the higher-level controller 10 has only to complete the reading of the reception buffer within the communication cycle, and can read the reception buffer without timing constraints.

このようなダブルバッファ方式を使用した通信制御装置では、上位制御装置は次回の通信周期n+1回目の送信データを送信バッファに設定する。通信周期n+1回目の送信データは、通信周期n回目の送信データと近似していることがある。この場合、仮に、送信バッファに、通信周期n回目の送信データが記憶されているのであれば、送信バッファに設定する通信周期n+1回目の送信データのうち、通信周期n回目の送信データと異なる部分のみを送信バッファに記憶させればよい。ところが、送信データを設定する側の送信バッファに記憶されているデータは、通信周期n−1回目の送信データであり、通信周期n回目の送信データではない。 In the communication control device using such a double buffer system, the host control device sets the transmission data of the next communication cycle n+1 times in the transmission buffer. The transmission data of the communication cycle n+1th time may be similar to the transmission data of the communication cycle nth time. In this case, if the transmission buffer stores the transmission data of the nth communication cycle, the portion of the transmission data of the communication cycle n+1th set in the transmission buffer that is different from the transmission data of the nth communication cycle. Only the transmission buffer needs to be stored. However, the data stored in the transmission buffer on the side for setting the transmission data is the transmission data at the communication cycle n−1 and is not the transmission data at the communication cycle n.

そのため、通信周期n回目の送信データと通信周期n+1回目の送信データが、ほとんど同じであっても、送信データ全体を送信バッファに設定する必要があり、上位制御装置の処理負荷が大きくなるという課題がある。 Therefore, even if the transmission data at the communication cycle n times and the transmission data at the communication cycle n+1 times are almost the same, it is necessary to set the entire transmission data in the transmission buffer, which increases the processing load of the host controller. There is.

また、送信データの一部bitのオン、オフを通信周期毎に切り替えることで、受信側にて送信側のデータ更新を確認する手法がある。この手法では次のような点が問題となることがある。すなわち、ダブルバッファ方式では、送信バッファが通信周期毎に切り替えられるため、片側の送信バッファのbitは常に1、逆側の送信バッファのbitは常に0となり、1bitのデータでは受信側で送信側のデータ更新確認ができない。そのため、通信周期毎に加算する2bit以上のカウンタ値を送信データに設定する必要があり、制御データの送受信に使用できるデータ量が低下するという問題が生じることがある。 In addition, there is a method in which the receiving side confirms the updating of data on the transmitting side by switching on/off of a part of the transmission data for each communication cycle. The following points may be a problem with this method. That is, in the double buffer method, since the transmission buffer is switched for each communication cycle, the bit of the transmission buffer on one side is always 1, the bit of the transmission buffer on the other side is always 0, and the data of 1 bit is transmitted from the reception side to the transmission side. Data update cannot be confirmed. Therefore, it is necessary to set a counter value of 2 bits or more, which is added for each communication cycle, in the transmission data, which may cause a problem that the amount of data that can be used for transmitting and receiving the control data decreases.

本発明は、通信制御装置における処理負担を軽減することを目的とする。 An object of the present invention is to reduce the processing load on the communication control device.

本発明は、第1送信バッファおよび第2送信バッファと、前記第1送信バッファまたは前記第2送信バッファに、固定データ長のデータである固定データを記憶させる送信バッファ制御回路と、前記第1送信バッファまたは前記第2送信バッファに記憶された前記固定データを送信する送信制御回路と、を備え、前記送信制御回路は、前記第1送信バッファに記憶された第1の前記固定データを送信する送信処理を実行し、前記送信処理が実行されると共に、前記送信バッファ制御回路は、前記第2送信バッファに第2の前記固定データを記憶させる記憶処理と、前記送信制御回路によって送信された情報を指定する送信済みアドレスに基づいて、第2の前記固定データに含まれる情報を指定し、前記第1送信バッファの記憶領域のうち前記送信済みアドレスで指定される領域に、その指定した情報を記憶させる共通化処理と、を実行する。 The present invention relates to a first transmission buffer and a second transmission buffer, a transmission buffer control circuit for storing fixed data having a fixed data length in the first transmission buffer or the second transmission buffer, and the first transmission buffer. A transmission control circuit for transmitting the fixed data stored in the buffer or the second transmission buffer, the transmission control circuit transmitting the first fixed data stored in the first transmission buffer. The transmission process is executed, and the transmission buffer control circuit stores the storage process of storing the second fixed data in the second transmission buffer and the information transmitted by the transmission control circuit. The information included in the second fixed data is designated based on the designated transmitted address, and the designated information is stored in the area designated by the transmitted address in the storage area of the first transmission buffer. Common processing to be performed and.

望ましくは、前記第2の前記固定データに含まれる情報のうち、前記第2送信バッファに記憶されたデータに含まれる情報と異なるものを、前記第2送信バッファが記憶する。 Preferably, among the information included in the second fixed data, the second transmission buffer stores information different from the information included in the data stored in the second transmission buffer.

望ましくは、前記送信制御回路は、前記送信処理を実行するときに、前記第1送信バッファに対してリードアクセス要求を送信し、前記送信バッファ制御回路は、前記リードアクセス要求が前記第1送信バッファに対して送信されているときに、前記記憶処理および前記共通化処理を実行する。 Preferably, the transmission control circuit transmits a read access request to the first transmission buffer when executing the transmission process, and the transmission buffer control circuit causes the read access request to be transmitted to the first transmission buffer. The storage process and the commonization process are executed when the data is transmitted to the.

また、本発明の一実施形態は、固定通信周期で固定データ長のデータ送受信を行う通信システムに用いられ、2つの送信バッファを有し、ある通信周期では、一方の前記送信バッファを上位制御装置がデータ書き込みに使用し、他方の前記送信バッファを送信バッファ制御回路が送信信号生成に使用し、次の通信周期では、当該他方の前記送信バッファを前記上位制御装置がデータ書き込みに使用し、当該一方の前記送信バッファを前記送信バッファ制御回路が送信信号生成に使用するダブルバッファ方式の通信制御装置であって、前記上位制御装置と2つの前記送信バッファの間に、前記送信バッファ制御回路が設けられており、前記送信バッファ制御回路は、前記上位制御装置がデータ書き込みする側の前記送信バッファ(A)へのライトアクセスを検出し、ライトアクセスアドレスが、送信済みのアドレスの場合、前記送信バッファ制御回路が送信信号生成に使用する側の前記送信バッファ(B)に対しても同じデータを書き込み、さらに、前記送信バッファ制御回路の前記送信バッファ(B)に対するリードアクセスを検出し、前記送信バッファ(A)から同じアドレスのデータを読み込み、前記送信バッファ(B)に書き込む。 Further, one embodiment of the present invention is used in a communication system that transmits and receives data of a fixed data length in a fixed communication cycle, has two transmission buffers, and in one communication cycle, one of the transmission buffers is used as a host controller. Is used for data writing, the other transmission buffer is used by the transmission buffer control circuit for transmission signal generation, and in the next communication cycle, the other transmission buffer is used by the higher-order control device for data writing. A double-buffer type communication control device in which the transmission buffer control circuit uses one of the transmission buffers for generating a transmission signal, wherein the transmission buffer control circuit is provided between the upper control device and the two transmission buffers. The transmission buffer control circuit detects a write access to the transmission buffer (A) on the data write side of the higher-order control device, and when the write access address is an already transmitted address, the transmission buffer control circuit The same data is written in the transmission buffer (B) on the side used by the control circuit to generate a transmission signal, and further read access to the transmission buffer (B) of the transmission buffer control circuit is detected, Data of the same address is read from (A) and written in the transmission buffer (B).

本発明によれば、通信制御装置における処理負担を軽減することができる。以下に説明する実施例によると、送信制御回路がデータ送信を完了したタイミング以降、2つの送信バッファのデータが一致する。そのため、上位制御装置による送信バッファへの送信データの書き込みは、送信バッファに先に記憶されているデータと、書き込まれるべきデータとの差分のみについて行えばよくなり、上位制御装置の処理を軽減できる。また、通信データ中の受信側での送信側データ更新確認に使用する領域も1bitでよく、通信データを有効活用できる。 According to the present invention, the processing load on the communication control device can be reduced. According to the embodiment described below, the data in the two transmission buffers match after the timing when the transmission control circuit completes the data transmission. Therefore, the writing of the transmission data to the transmission buffer by the higher-level control device only needs to be performed for the difference between the data previously stored in the transmission buffer and the data to be written, and the processing of the higher-level control device can be reduced. .. Moreover, the area used for confirmation of the data update on the transmission side on the receiving side in the communication data may be 1 bit, and the communication data can be effectively utilized.

従来技術における通信制御装置の送信側を示すブロック図である。It is a block diagram which shows the transmission side of the communication control apparatus in a prior art. 従来技術における通信制御装置の受信側を示すブロック図である。It is a block diagram which shows the receiving side of the communication control apparatus in a prior art. 本発明の実施例を示すブロック図である。It is a block diagram which shows the Example of this invention. 本発明の送信バッファ制御回路の動作フローを示す図である。It is a figure which shows the operation|movement flow of the transmission buffer control circuit of this invention.

本発明の実施例について、図3および図4を用いて説明する。 An embodiment of the present invention will be described with reference to FIGS. 3 and 4.

図3に、本発明の実施形態に係る通信制御装置の送信側のブロック図を示す。上位制御装置1は送信側通信制御装置14に対して送信データを設定し、送信側通信制御装置14は図示しない通信相手先に送信信号を送信する。上位制御装置1は、切替器4、送信バッファ制御回路7A、7Bを介して送信バッファ2A、2Bに送信データを設定する。切替器4が送信バッファ2A側に接続されている時のライトアクセス信号は、送信バッファ制御回路7Aだけでなく、送信バッファ制御回路7Bにも入力され、上位制御装置1の送信バッファ2Aに対するライトアクセスを送信バッファ制御回路7Bが監視できる。同様に、切替器4が送信バッファ2B側に接続されている時のライトアクセス信号は、送信バッファ制御回路7Bだけでなく、送信バッファ制御回路7Aにも入力され、上位制御装置1の送信バッファ2Bに対するライトアクセスを送信バッファ制御回路7Aが監視できる。 FIG. 3 shows a block diagram of the transmission side of the communication control device according to the embodiment of the present invention. The host controller 1 sets transmission data to the transmission side communication controller 14, and the transmission side communication controller 14 transmits a transmission signal to a communication partner (not shown). The host controller 1 sets transmission data in the transmission buffers 2A and 2B via the switch 4 and the transmission buffer control circuits 7A and 7B. The write access signal when the switch 4 is connected to the transmission buffer 2A side is input not only to the transmission buffer control circuit 7A but also to the transmission buffer control circuit 7B, and the write access signal to the transmission buffer 2A of the host controller 1 is accessed. Can be monitored by the transmission buffer control circuit 7B. Similarly, the write access signal when the switch 4 is connected to the transmission buffer 2B side is input not only to the transmission buffer control circuit 7B but also to the transmission buffer control circuit 7A, and the transmission buffer 2B of the host controller 1 is transmitted. The transmission buffer control circuit 7A can monitor the write access to.

送信制御回路3はタイマ6から出力される信号に基づいて送信開始タイミングを決定し、図示しない通信相手先に送信信号を出力するとともに、送信済みアドレスを送信バッファ制御回路7A、7Bに出力する。送信制御回路3が送信するデータは、切替器5a、5bの状態に応じて、送信バッファ2Aまたは2Bのどちらかから読み込まれる。切替器5aは送信バッファ2Aに対するリードアクセス要求元を送信制御回路3と送信バッファ制御回路7Bとの間で切り替え、送信制御回路3が送信バッファ2Aを使用していないタイミングでは、送信バッファ制御回路7Bが送信バッファ2Aのデータをリード可能となる。切替器5aと同期してオン/オフを切替える切替器5cは、切替器5aが送信制御回路3側を選択している時にオンとなり、送信バッファ2Aに対する送信制御回路3からのリードアクセス要求を送信バッファ制御回路7Aで監視する。 The transmission control circuit 3 determines the transmission start timing based on the signal output from the timer 6, outputs the transmission signal to a communication partner (not shown), and outputs the transmitted address to the transmission buffer control circuits 7A and 7B. The data transmitted by the transmission control circuit 3 is read from either the transmission buffer 2A or 2B according to the states of the switches 5a and 5b. The switch 5a switches the read access request source for the transmission buffer 2A between the transmission control circuit 3 and the transmission buffer control circuit 7B, and at a timing when the transmission control circuit 3 is not using the transmission buffer 2A, the transmission buffer control circuit 7B. Can read the data in the transmission buffer 2A. The switch 5c, which switches on/off in synchronization with the switch 5a, is turned on when the switch 5a selects the transmission control circuit 3 side, and transmits a read access request from the transmission control circuit 3 to the transmission buffer 2A. It is monitored by the buffer control circuit 7A.

同様に、切替器5bは送信バッファ2Bへのリードアクセス要求元を送信制御回路3と送信バッファ制御回路7Aとの間で切り替え、送信制御回路3が送信バッファ2Bを使用していないタイミングでは、送信バッファ制御回路7Aが送信バッファ2Bのデータをリード可能となる。切替器5bと同期してオン/オフを切替える切替器5dは、切替器5bが送信制御回路3側を選択している時にオンとなり、送信バッファ2Bに対する送信制御回路3からのリードアクセス要求を送信バッファ制御回路7Bで監視する。 Similarly, the switch 5b switches the read access request source to the transmission buffer 2B between the transmission control circuit 3 and the transmission buffer control circuit 7A, and at the timing when the transmission control circuit 3 is not using the transmission buffer 2B, The buffer control circuit 7A can read the data in the transmission buffer 2B. The switch 5d, which switches on/off in synchronization with the switch 5b, is turned on when the switch 5b selects the transmission control circuit 3 side, and transmits a read access request from the transmission control circuit 3 to the transmission buffer 2B. The buffer control circuit 7B monitors.

切替器4、5a、5b、5c、5dは、タイマ6により通信周期毎に状態が切り替えられる。送信バッファ制御回路7Aは、切替器4を介して入力される上位制御装置1のライトアクセス信号、送信制御回路3が出力する送信済みアドレス、切替器5c、5dから入力される送信制御回路3の送信バッファ2A、2Bに対するリードアクセス要求とから送信バッファ2A、2Bへの送信データ書き込みを行う。なお、本実施例では、切替器4を送信側通信制御装置14の一部として記載しているが、切替器4が有する機能を上位制御装置1によるライトアドレス切替で実現してもよい。 The states of the switches 4, 5a, 5b, 5c, and 5d are switched by the timer 6 for each communication cycle. The transmission buffer control circuit 7A includes a write access signal of the higher-level controller 1 input via the switch 4, a transmitted address output by the transmission control circuit 3, and a transmission control circuit 3 input from the switches 5c and 5d. Transmission data writing to the transmission buffers 2A and 2B is performed based on a read access request to the transmission buffers 2A and 2B. In the present embodiment, the switch 4 is described as a part of the transmission-side communication control device 14, but the function of the switch 4 may be realized by the write address switching by the host controller 1.

図4に、送信バッファ制御回路7Aの動作フローを示す。送信バッファ制御回路7Aは、最初に、上位制御装置1から送信バッファ2Aへのライトアクセスの有無を判定し(S101)、ライトアクセスがある場合、ライトアクセス信号からライトアドレス、ライトデータを取得し(S102)、送信バッファ2Aに書き込む(S103)。ライトアクセスが無い場合、上位制御装置1から送信バッファ2Bへのライトアクセスの有無を判定し(S104)、ライトアクセスがある場合、ライトアクセス信号からライトアドレス、ライトデータを取得し(S105)、ライトアドレスが送信制御回路3の出力する送信済みアドレスに含まれるか否かを判定する(S106)。そして、ライトアドレスが、送信制御回路3の出力する送信済みアドレスに含まれる場合のみ、送信バッファ2Aへの書き込みを行う(S103)。上位制御装置1の送信バッファ2Bへのライトアクセスが無い場合(S104)、または上位制御装置1の送信バッファ2Bへのライトアドレスが送信制御回路3の出力する送信済みアドレスに含まれない場合、送信制御回路3から送信バッファ2Aへのリードアクセス要求の有無を判定し(S107)、リードアクセス要求がある場合、リードアクセス要求から、リードアドレスを取得し、送信バッファ2Bからデータをリードする(S108)。さらに、リードアドレスをライトアドレス、リード値をライトデータとして(S109)、送信バッファ2Aへ書き込む(S103)。送信バッファ制御回路7Aは本動作フローを繰り返し行う。なお、送信バッファ制御回路7Bの動作は、図4の送信バッファ2A、2Bの動作が入れ替わるのみであるため、説明を省略する。 FIG. 4 shows an operation flow of the transmission buffer control circuit 7A. The transmission buffer control circuit 7A first determines whether or not there is a write access from the host controller 1 to the transmission buffer 2A (S101), and if there is a write access, acquires the write address and the write data from the write access signal ( S102), and writes in the transmission buffer 2A (S103). If there is no write access, it is determined whether or not there is a write access from the host controller 1 to the transmission buffer 2B (S104). If there is a write access, the write address and write data are obtained from the write access signal (S105), and the write access is performed. It is determined whether the address is included in the transmitted address output from the transmission control circuit 3 (S106). Then, only when the write address is included in the transmitted address output from the transmission control circuit 3, writing to the transmission buffer 2A is performed (S103). If there is no write access to the transmission buffer 2B of the upper control device 1 (S104), or if the write address to the transmission buffer 2B of the higher control device 1 is not included in the transmitted addresses output by the transmission control circuit 3, the transmission Whether or not there is a read access request from the control circuit 3 to the transmission buffer 2A is determined (S107). If there is a read access request, the read address is acquired from the read access request and the data is read from the transmission buffer 2B (S108). .. Further, the read address is used as the write address and the read value is used as the write data (S109), and is written in the transmission buffer 2A (S103). The transmission buffer control circuit 7A repeats this operation flow. The operation of the transmission buffer control circuit 7B is the same as that of the transmission buffers 2A and 2B shown in FIG.

このように、本発明の実施形態に係る通信制御装置では、送信バッファ2Aに記憶されている通信周期n−1回目のデータを送信制御回路3が送信している間に、上位制御装置1および送信バッファ制御回路7Bが、通信周期n回目のデータを送信バッファ2Bに記憶させる。送信バッファ2Aの記憶領域のうち、情報が送信されてしまった送信済み領域には、通信周期n回目のデータに含まれる情報のうち、送信済みアドレスに対応する対応情報が、送信バッファ制御回路7Aによって送信バッファ2Bから取り出される。送信バッファ制御回路7Aは、対応情報を送信バッファ2Aの送信済み領域に記憶させる。送信バッファ2Aの送信済み領域に通信周期n回目のデータにおける対応情報が記憶される共通化処理のタイミングは、送信バッファ2Aへのリードアクセス要求に基づいて規定される。すなわち、共通化処理は、送信バッファ2Aへのリードアクセス要求のタイミングに従って実行される。 As described above, in the communication control device according to the embodiment of the present invention, while the transmission control circuit 3 is transmitting the data of the communication cycle n−1 times stored in the transmission buffer 2A, the host control device 1 and The transmission buffer control circuit 7B stores the data of the nth communication cycle in the transmission buffer 2B. In the transmitted area where the information has been transmitted in the storage area of the transmission buffer 2A, the correspondence information corresponding to the transmitted address among the information included in the data of the nth communication cycle is the transmission buffer control circuit 7A. Is taken out from the transmission buffer 2B. The transmission buffer control circuit 7A stores the correspondence information in the transmitted area of the transmission buffer 2A. The timing of the commonization processing in which the correspondence information in the data of the nth communication cycle is stored in the transmitted area of the transmission buffer 2A is defined based on the read access request to the transmission buffer 2A. That is, the common processing is executed according to the timing of the read access request to the transmission buffer 2A.

これによって、送信制御回路3が通信周期n−1回目のデータを送信し終わった時点では、送信バッファ2Aおよび送信バッファ2Bの両者には、通信周期n回目のデータが記憶された状態となる。 As a result, at the time when the transmission control circuit 3 finishes transmitting the data of the communication cycle n-1 times, the data of the communication cycle n times is stored in both the transmission buffer 2A and the transmission buffer 2B.

この状態から、送信制御回路3は、送信バッファ2Bに記憶されている通信周期n回目のデータを送信する。その間に上位制御装置1および送信バッファ制御回路7Aは、通信周期n+1回目のデータを送信バッファ2Aに記憶させる。この記憶処理は、通信周期n+1回目のデータに含まれる情報のうち、先に記憶されていた通信周期n回目のデータと異なる情報についてのみ行われてよい。送信バッファ2Bの記憶領域のうち、情報が送信されてしまった送信済み領域には、通信周期n+1回目のデータに含まれる情報のうち、送信済みアドレスに対応する対応情報が送信バッファ2Aから取り出され、送信バッファ2Bの送信済み領域に記憶される。送信バッファ2Bの送信済み領域に通信周期n+1回目のデータにおける対応情報が記憶される共通化処理のタイミングは、送信バッファ2Bへのリードアクセス要求に基づいて規定される。すなわち、共通化処理は、送信バッファ2Bへのリードアクセス要求のタイミングに従って実行される。 From this state, the transmission control circuit 3 transmits the data of the communication cycle n times stored in the transmission buffer 2B. Meanwhile, the host controller 1 and the transmission buffer control circuit 7A store the communication cycle n+1-th data in the transmission buffer 2A. This storage process may be performed only on information that is different from the previously stored data of the nth communication cycle among the information included in the data of the n+1th communication cycle. Corresponding information corresponding to the transmitted address of the information included in the data of the communication cycle n+1 is extracted from the transmission buffer 2A in the transmitted area of the storage area of the transmission buffer 2B where the information has been transmitted. , Are stored in the transmitted area of the transmission buffer 2B. The timing of the commonization processing in which the correspondence information of the communication cycle n+1th data is stored in the transmitted area of the transmission buffer 2B is defined based on the read access request to the transmission buffer 2B. That is, the common processing is executed according to the timing of the read access request to the transmission buffer 2B.

このように、本発明の実施形態に係る通信制御装置は、送信バッファ2Aおよび2B(第1送信バッファおよび第2送信バッファ)と、送信バッファ2Aまたは送信バッファ2Bに、固定データ長のデータである固定データを記憶させる送信バッファ制御回路7Aおよび7B(以下、送信バッファ制御回路7Aおよび7Bを併せたものを送信バッファ制御回路という)と、送信バッファ2Aまたは送信バッファ2Bに記憶された固定データを送信する送信制御回路3とを備えている。 As described above, the communication control device according to the embodiment of the present invention stores fixed-length data in the transmission buffers 2A and 2B (first transmission buffer and second transmission buffer) and the transmission buffer 2A or the transmission buffer 2B. Transmission buffer control circuits 7A and 7B for storing fixed data (hereinafter, the combination of transmission buffer control circuits 7A and 7B is referred to as a transmission buffer control circuit) and transmission of fixed data stored in transmission buffer 2A or transmission buffer 2B The transmission control circuit 3 is provided.

送信制御回路3は、送信バッファ2Aに記憶された第1の固定データ(通信周期n−1回目のデータ)を送信する送信処理を実行し、送信処理が実行されると共に、送信バッファ制御回路は、送信バッファ2Bに第2の固定データ(通信周期n回目のデータ)を記憶させる記憶処理を実行する。また、送信処理が実行されると共に、送信バッファ制御回路は、送信制御回路3によって送信された情報を指定する送信済みアドレスに基づいて、第2の固定データに含まれる情報を指定し、送信バッファ2Aの記憶領域のうち送信済みアドレスで指定される領域に、その指定した情報を記憶させる共通化処理を実行する。 The transmission control circuit 3 executes a transmission process for transmitting the first fixed data (data of the communication cycle n−1 time) stored in the transmission buffer 2A, and the transmission process is executed and the transmission buffer control circuit executes Then, a storage process of storing the second fixed data (data of the nth communication cycle) in the transmission buffer 2B is executed. In addition, the transmission process is executed, and the transmission buffer control circuit specifies the information included in the second fixed data based on the transmitted address that specifies the information transmitted by the transmission control circuit 3, A commonization process of storing the designated information in the area designated by the transmitted address in the storage area of 2A is executed.

上位制御装置1は、第2の固定データに含まれる情報のうち、送信バッファ2Bに記憶されたデータに含まれる情報と異なるものを、送信バッファ2Bに記憶させる。また、送信制御回路3は、送信処理を実行するときに、送信バッファ2Aに対してリードアクセス要求を送信する。送信バッファ制御回路は、リードアクセス要求が送信バッファ2Aに対して送信されているときに、記憶処理および共通化処理を実行する。 The host controller 1 causes the transmission buffer 2B to store, of the information included in the second fixed data, information different from the information included in the data stored in the transmission buffer 2B. Further, the transmission control circuit 3 transmits a read access request to the transmission buffer 2A when executing the transmission process. The transmission buffer control circuit executes the storage process and the commonization process when the read access request is transmitted to the transmission buffer 2A.

また、本発明の実施形態に係る通信制御装置は、固定通信周期で固定データ長のデータ送受信を行う通信システムに用いられる。本発明の実施形態に係る通信制御装置は、2つの送信バッファ2Aおよび2Bを有し、ある通信周期では、一方の送信バッファを上位制御装置1がデータ書き込みに使用し、他方の送信バッファを送信バッファ制御回路7Aまたは7Bが送信信号生成に使用し、次の通信周期では、当該他方の送信バッファを上位制御装置1がデータ書き込みに使用し、当該一方の送信バッファを送信バッファ制御回路7Aまたは7Bが送信信号生成に使用するダブルバッファ方式の通信制御装置である。 Further, the communication control device according to the embodiment of the present invention is used in a communication system that transmits and receives data having a fixed data length in a fixed communication cycle. The communication control device according to the embodiment of the present invention has two transmission buffers 2A and 2B. In a certain communication cycle, one transmission buffer is used by the higher-level control device 1 for writing data and the other transmission buffer is transmitted. The buffer control circuit 7A or 7B uses it to generate a transmission signal, and in the next communication cycle, the other transmission buffer is used by the host controller 1 to write data, and the one transmission buffer concerned uses the transmission buffer control circuit 7A or 7B. Is a double-buffer type communication control device used for transmission signal generation.

本方式によれば、送信制御回路3は、通信周期n−1回目に上位制御装置1が送信バッファ2Aに書き込んだ値を通信周期n回目に正しく送信でき、かつ、通信周期n回目が完了したタイミング以降は、上位制御装置1が通信周期n+1回目用に送信バッファ2Bに書き込んだデータと、送信バッファ2Aのデータが一致する。通信周期n+1回目では、上位制御装置1は、送信バッファ2Aに書き込む通信周期n+2回目の送信データのうち、通信周期n+1回目に送信バッファ2Bに書き込んだデータと異なる部分のみを送信バッファ2Aへ書き込む。そのため、送信データの変更が少ない場合、上位制御装置1の処理負荷を軽減できる。 According to this method, the transmission control circuit 3 can correctly transmit the value written in the transmission buffer 2A by the higher-level control device 1 at the communication cycle n-1th time at the communication cycle nth time, and the communication cycle nth time is completed. After the timing, the data written in the transmission buffer 2B by the higher-level controller 1 for the communication cycle n+1th time and the data in the transmission buffer 2A match. At the communication cycle n+1th time, the higher-level controller 1 writes to the transmission buffer 2A only the portion of the transmission data at the communication cycle n+2th time to be written to the transmission buffer 2A, which is different from the data written to the transmission buffer 2B at the communication cycle n+1th time. Therefore, when the change of the transmission data is small, the processing load of the host controller 1 can be reduced.

1,10 上位制御装置、2A,2B 送信バッファ、3 送信制御回路、4,5,5a,5b,5c,5d,11,12 切替器、6,13 タイマ、7A,7B 送信バッファ制御回路、8 受信制御回路、9A,9B 受信バッファ、14 送信側通信制御装置、15 受信側通信制御装置。
1, 10 Host control device, 2A, 2B transmission buffer, 3 Transmission control circuit, 4, 5, 5a, 5b, 5c, 5d, 11, 12 Switch, 6, 13 Timer, 7A, 7B transmission buffer control circuit, 8 Reception control circuit, 9A, 9B reception buffer, 14 transmission side communication control device, 15 reception side communication control device.

Claims (3)

第1送信バッファおよび第2送信バッファと、
前記第1送信バッファまたは前記第2送信バッファに、固定データ長のデータである固定データを記憶させる送信バッファ制御回路と、
前記第1送信バッファまたは前記第2送信バッファに記憶された前記固定データを送信する送信制御回路と、を備え、
前記送信制御回路は、
前記第1送信バッファに記憶された第1の前記固定データを送信する送信処理を実行し、
前記送信処理が実行されると共に、前記送信バッファ制御回路は、
前記第2送信バッファに第2の前記固定データを記憶させる記憶処理と、
前記送信制御回路によって送信された情報を指定する送信済みアドレスに基づいて、第2の前記固定データに含まれる情報を指定し、前記第1送信バッファの記憶領域のうち前記送信済みアドレスで指定される領域に、その指定した情報を記憶させる共通化処理と、
を実行する通信制御装置。
A first send buffer and a second send buffer;
A transmission buffer control circuit for storing fixed data, which is data having a fixed data length, in the first transmission buffer or the second transmission buffer;
A transmission control circuit for transmitting the fixed data stored in the first transmission buffer or the second transmission buffer,
The transmission control circuit,
Performing a transmission process of transmitting the first fixed data stored in the first transmission buffer,
While the transmission process is executed, the transmission buffer control circuit,
A storage process for storing the second fixed data in the second transmission buffer;
The information included in the second fixed data is designated based on the transmitted address that designates the information transmitted by the transmission control circuit, and is designated by the transmitted address in the storage area of the first transmission buffer. Common area to store the specified information in the specified area,
A communication control device that executes the.
請求項1に記載の通信制御装置において、
前記第2の前記固定データに含まれる情報のうち、前記第2送信バッファに記憶されたデータに含まれる情報と異なるものを、前記第2送信バッファが記憶する、通信制御装置。
The communication control device according to claim 1,
A communication control device, wherein, of the information included in the second fixed data, information that is different from the information included in the data stored in the second transmission buffer is stored in the second transmission buffer.
請求項1または請求項2に記載の通信制御装置において、
前記送信制御回路は、前記送信処理を実行するときに、前記第1送信バッファに対してリードアクセス要求を送信し、
前記送信バッファ制御回路は、前記リードアクセス要求が前記第1送信バッファに対して送信されているときに、前記記憶処理および前記共通化処理を実行する、通信制御装置。
The communication control device according to claim 1 or 2,
The transmission control circuit transmits a read access request to the first transmission buffer when executing the transmission processing,
The communication control device, wherein the transmission buffer control circuit executes the storage processing and the commonization processing when the read access request is transmitted to the first transmission buffer.
JP2019006984A 2019-01-18 2019-01-18 Communication control apparatus Pending JP2020119012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019006984A JP2020119012A (en) 2019-01-18 2019-01-18 Communication control apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019006984A JP2020119012A (en) 2019-01-18 2019-01-18 Communication control apparatus

Publications (1)

Publication Number Publication Date
JP2020119012A true JP2020119012A (en) 2020-08-06

Family

ID=71890759

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019006984A Pending JP2020119012A (en) 2019-01-18 2019-01-18 Communication control apparatus

Country Status (1)

Country Link
JP (1) JP2020119012A (en)

Similar Documents

Publication Publication Date Title
JP2545482B2 (en) Interface device transfer parameter setting method
KR20070039120A (en) Method and device for accessing data of a message memory of a communication component
KR20070039580A (en) Message administrator and method for controlling access to data of the message memory of a communications component
KR20070037634A (en) Flexray communication component
US7035956B2 (en) Transmission control circuit, reception control circuit, communications control circuit, and communications control unit
JP2020119012A (en) Communication control apparatus
JP6419400B1 (en) PLC, network unit, CPU unit, and data transfer method
WO1982003930A1 (en) Data exchanging method and device
KR100464257B1 (en) Three step communication buffer of communication unit
JP2016130947A (en) Control system and control device
JP4073383B2 (en) Relay device between scan transmission networks
JP2002084316A (en) Variable length packet write and read circuit
JPWO2023281805A5 (en)
JP2707961B2 (en) Duplex system
JP2985276B2 (en) Communications system
JPH0756803A (en) High-speed dma transfer device
JP2001273245A (en) Electronic equipment
JP2817535B2 (en) HDLC frame reception control method
KR20020051545A (en) DMA controller for the high speed image processor at real time
JP4633378B2 (en) Elevator control information transmission control circuit
KR20050045195A (en) Apparatus and method controlling a serial bus
JP2000353106A (en) Device and method for transferring data
KR20050107159A (en) Bus controller for serial interface of system
KR20050046094A (en) Bus system for reducing data write latency of slave device and method of processing data in the bus system
JPH1049479A (en) Master device