JPH03134712A - Programmable control - Google Patents

Programmable control

Info

Publication number
JPH03134712A
JPH03134712A JP27272389A JP27272389A JPH03134712A JP H03134712 A JPH03134712 A JP H03134712A JP 27272389 A JP27272389 A JP 27272389A JP 27272389 A JP27272389 A JP 27272389A JP H03134712 A JPH03134712 A JP H03134712A
Authority
JP
Japan
Prior art keywords
communication module
shared memory
cpu
response
command
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
JP27272389A
Other languages
Japanese (ja)
Inventor
Toru Shigeoka
重岡 徹
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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric Manufacturing Co 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 Yaskawa Electric Manufacturing Co Ltd filed Critical Yaskawa Electric Manufacturing Co Ltd
Priority to JP27272389A priority Critical patent/JPH03134712A/en
Publication of JPH03134712A publication Critical patent/JPH03134712A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To execute the full duplexing for the transmission reception of data between a CPU and a communication module and to improve the communication efficiency by providing two sets of shared memories, and switching the shared memories. CONSTITUTION:On each communication module 3, two sets of shared memories 151, 152 are provided, and by following it, bus drivers 173, 174 are added. In such a state an arbiter controls bus drivers 171-174 so that in the case one of the shared memories 151, 152 is obtained, the other is released. The shared memories 151, 152 are both divided into a command area and a response area. In such a manner, between a CPU 1 and the communication module 3, data is transmitted and received by the full duplex, and also, the scan delay of command read-out and response write on the CPU 1 side is eliminated, and a high throughput can be obtained.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、CPUと通信部かモジュールとして互いに分
離されて相〃にバスで接続され、通信部に、CPUとの
間のデータ)交叉のための共有メモリを存するプログラ
マブルコントローラ(以F、pcと略す)に関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention is directed to a CPU and a communication unit that are separated from each other as modules and connected to each other via a bus, and that the communication unit transmits data (data) and The present invention relates to a programmable controller (hereinafter abbreviated as PC) having a shared memory for the purpose of the program.

〔従来の技術〕[Conventional technology]

第2図はこの種のpcの一般的な構成図、第3図は通信
モジュール3の従来例の構成図、第4図は共有メモリ5
のメモリマツプである。
FIG. 2 is a general configuration diagram of this type of PC, FIG. 3 is a configuration diagram of a conventional example of the communication module 3, and FIG. 4 is a configuration diagram of a conventional example of the communication module 3.
This is the memory map of

CPUIと各通信モジュール3は相互にバス2で接続さ
れている。各通信モジュール3には、MPUI 1.R
OMI 2.RAMI 3.通信部14の他に、CPL
IIとの間のデータ授受のための共有メモリ15(デュ
アルポートメモリ)と、この共有メモリ15に対するC
PUI側、通信部14側からのアクセスの切替を行うバ
スドライバ17、.172およびアービータ16を含ん
でいる。
The CPUI and each communication module 3 are connected to each other via a bus 2. Each communication module 3 includes an MPUI 1. R
OMI 2. RAMI 3. In addition to the communication department 14, CPL
A shared memory 15 (dual port memory) for exchanging data with II, and a C for this shared memory 15.
A bus driver 17, . 172 and arbiter 16.

ここで、共有メモリ15は、第4図に示すように、コマ
ンド領域とレスポンス領域に分割されており、CPUI
と各通信モジュール3間のコマンド、レスポンスの授受
による相互のデータの授受は以下のシーケンスで行なわ
れる。
Here, the shared memory 15 is divided into a command area and a response area, as shown in FIG.
Mutual data exchange between the communication module 3 and each communication module 3 by exchanging commands and responses is performed in the following sequence.

1)通信ポート18からのデータ受信。1) Data reception from communication port 18.

(コマンド受信) 2)通信モジュール3による受信データの共有メモリ1
5への書込み。
(Command reception) 2) Shared memory 1 of received data by communication module 3
Write to 5.

(コマンド書込みン 3)CPUIによるコマンドの読出し。(Command writing 3) Reading commands using CPUI.

4)CPUIのコマンド解析処理。4) CPUI command analysis processing.

5)CPUIからのレスポンス書込み。5) Write response from CPUI.

6)通信モジュール3内部でのレスポンス受信割り込み
発生、または、レスポンス書込み完了制御コード検出に
よるレスポンス受信の認識。
6) Recognition of response reception by occurrence of a response reception interrupt within the communication module 3 or by detection of response write completion control code.

7)通信モジュール3のレスポンス読出し。7) Read response from communication module 3.

8)通信ポート18よりデータ送出。8) Send data from communication port 18.

(レスポンス返信) (発明が解決しようとする課題) 上述した従来のPCでは、通信モジュールとCPU間の
通信は半2重であり、通信モジュールがコマンドを共有
メモリに書いている間はCPUは共有メモリへの書込み
が禁止され、また逆にCPUが共有メモリにレスポンス
を書いている間は通信モジュールの共有メモリへの書込
みが禁止される(この共有メモリの獲得と解放は第3図
に示すアービタ16によりハードウェアで行われる)の
で、通信モジュールの外部通信インタフェースが全2重
の通信機能を有していても、CPUと通信モジュールの
データ授受に依存し半2重となる。通常、通信モジュー
ルは受信キューを持っており、受信コマンドをキューに
ためることができる。しかしながら、従来のPCでは先
着コマンドの処理中はキューから取り出すことはできな
い。
(Response reply) (Problem to be solved by the invention) In the conventional PC described above, communication between the communication module and the CPU is half-duplex, and while the communication module is writing a command to the shared memory, the CPU is shared. Writing to the memory is prohibited, and conversely, writing to the communication module's shared memory is prohibited while the CPU is writing a response to the shared memory (this shared memory is acquired and released by the arbiter shown in Figure 3). 16), even if the external communication interface of the communication module has a full-duplex communication function, it becomes half-duplex depending on the data exchange between the CPU and the communication module. Typically, a communication module has a receive queue and can store received commands in the queue. However, in conventional PCs, it is not possible to take out a first-arrival command from the queue while it is being processed.

更に、CPUは共有メモリの解放が通信モジュールより
なされた直後であっても、その処理が第5図の流れ図の
ように行なわれるためコマンドの受信が次スキャンまで
行なわれないケースが発生しつる。
Furthermore, even after the shared memory is released by the communication module, the CPU may not receive commands until the next scan because the process is performed as shown in the flowchart of FIG.

本発明の目的は、このような通信処理のスルーブツトの
低下がなく、高速な応答が可能なpcを提供することで
ある。
An object of the present invention is to provide a PC that is capable of high-speed response without reducing the throughput of communication processing.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のPCは、共有メモリが2布設けられ、共有メモ
リの切替えを行う手段を有する。
The PC of the present invention is provided with two shared memories and has means for switching between the shared memories.

〔作用〕[Effect]

したがって、CPUと通信モジュール間のデータ授受が
全2重で行なえ、かつCPU側のコマンド読出しおよび
レスポンス書込みのスキャン遅れがなくなり、高スルー
ブツトを得ることが可能となる。
Therefore, data transmission and reception between the CPU and the communication module can be performed in full duplex mode, and there is no scan delay in command reading and response writing on the CPU side, making it possible to obtain high throughput.

(実施例) 次に、本発明の実施例について図面を参照して説明する
(Example) Next, an example of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例のpcを構成する通信モジュ
ールの構成図である。
FIG. 1 is a block diagram of a communication module that constitutes a PC according to an embodiment of the present invention.

本実施例では、通信モジュールに共有メモリが15、.
152と2布設けられ、これに伴ないバスドライバ17
3,174が追加されている。ここで、アービタ16は
共有メモリ15..152の一方を獲得した場合、他方
を解放するようにバスドライバ17.%174を制御す
る。共有メモリ15..152は共に第4図に示すよう
に従来と同様にコマンド領域とレスポンス領域とに分け
られている。
In this embodiment, the communication module has 15 shared memories, .
152 and 2 cloths are provided, and along with this, a bus driver 17
3,174 have been added. Here, the arbiter 16 uses the shared memory 15. .. 152, the bus driver 17.152 releases the other one. Control %174. Shared memory 15. .. 152, as shown in FIG. 4, is divided into a command area and a response area, as in the prior art.

次に、本実施例におけるCPU 1と通信モジュール3
間のデータ授受について説明する。
Next, the CPU 1 and the communication module 3 in this embodiment
We will explain the data transfer between.

1)通信モジュール3による共有メモリ15、の獲得と
共有メモリ152の解放。
1) Acquisition of shared memory 15 by communication module 3 and release of shared memory 152.

2)通信ボート18からのデータ受信。2) Data reception from communication boat 18.

(コマンド受信) 3)通信モジュール3による受信データの共存メモリ1
51への書込み。
(Command reception) 3) Coexistence memory 1 of received data by communication module 3
Write to 51.

(コマンド書込み) 4)通信モジュール3による共有メモリ15、の解放と
共有メモリ152の獲得。
(Command writing) 4) Release of the shared memory 15 and acquisition of the shared memory 152 by the communication module 3.

5)CPU 1による共有メモリ15.上のコマンドの
読出し。通信モジュール3内部でコマンド送信完了割り
込み19の発生。
5) Shared memory by CPU 115. Read the above command. A command transmission completion interrupt 19 occurs inside the communication module 3.

6)CPU lのコマンド解析処理。6) Command analysis processing by CPU l.

7)CPUIからの共有メモリ151上へのレスポンス
書込み。
7) Writing a response onto the shared memory 151 from the CPUI.

8)通信モジュール3内部でのレスポンス受信割り込み
20の発生。
8) Occurrence of response reception interrupt 20 inside communication module 3.

9)通信モジュール3による共有メモリ15□の獲得と
共存メモリ152の解放。
9) Acquisition of shared memory 15□ by communication module 3 and release of coexisting memory 152.

10)通信モジュール3による共有メモリ151上のレ
スポンス読出し。
10) Reading the response from the shared memory 151 by the communication module 3.

11)通信モジュール3による共有メモリ15、の解放
と共有メモリ152の獲得。
11) Release of shared memory 15 and acquisition of shared memory 152 by communication module 3.

12)通信ポート18よりデータ送出。12) Send data from communication port 18.

(レスポンス返信) 次に、通信モジュール3が複数のコマンドを受信し、C
PUIに連続して処理を依頼する場合のシーケンスを示
す。
(Response reply) Next, the communication module 3 receives multiple commands, and C
The sequence when continuously requesting the PUI to perform processing is shown.

1)通信モジュール3による共有メモリ15、の獲得と
共有メモリ152の解放。
1) Acquisition of shared memory 15 by communication module 3 and release of shared memory 152.

2)通(gポート18からのデータ受イ言。2) Communication (data reception from g port 18).

(コマンド受信) 3)通信モジュール3による受信データの共有メモリ1
5.への書込み。
(Command reception) 3) Shared memory 1 of received data by communication module 3
5. writing to.

4)通信モジュール3による共有メモリ15、の解放と
共存メモリ152の獲得。
4) Release of the shared memory 15 and acquisition of the coexisting memory 152 by the communication module 3.

5)CPUIによる共有メモリ15.上のコマンドの読
出し。通信モジュール3内部でコマンド送信完了割り込
み19の発生。通信モジュール3による次コマンドの共
有メモリ152への書込み。
5) Shared memory by CPUI15. Read the above command. A command transmission completion interrupt 19 occurs inside the communication module 3. Writing the next command to the shared memory 152 by the communication module 3.

6)CPUIのコマンド解析処理。6) CPUI command analysis processing.

7)CPUIからの共有メモリ151上へのレスポンス
書込み。
7) Writing a response onto the shared memory 151 from the CPUI.

8)通信モジュール3内部でのレスポンス受信割り込み
20の発生。
8) Occurrence of response reception interrupt 20 inside communication module 3.

9)通信モジュール3による共有メモリ15、の獲得と
共有メモリ152の解放。
9) Acquisition of shared memory 15 by communication module 3 and release of shared memory 152.

10)通信モジュール3による共有メモリ15I上のレ
スポンス読出し。CPLIIによる共有メモリ152上
のコマンド読出し。通信モジュール3内部でコマンド送
信完了割り込み19の発生。
10) Reading of the response from the shared memory 15I by the communication module 3. Command reading on shared memory 152 by CPLII. A command transmission completion interrupt 19 occurs inside the communication module 3.

11 ) CPU 1のコマンド解析処理。11) CPU 1 command analysis processing.

12)CPUIからの共有メモリ15.トへのレスポン
ス書込み。
12) Shared memory from CPUI 15. Write response to.

13)通信モジュール3内部でのレスポンス受信割り込
み20の発生。
13) Occurrence of response reception interrupt 20 inside communication module 3.

14)通信モジュール3による共有メモリ15?の解放
と共有メモリ15.の獲得。
14) Shared memory 15 by communication module 3? Freeing and shared memory 15. Acquisition of.

15)通信ポート18よりデータ送出。15) Send data from communication port 18.

くレスポンス返信) これにより、CPU 1と通信モジュール3間で共有メ
モリのアクセスの競合がなくなり、相互のデータ授受が
効率よく行なわれる。
(response reply) Thereby, there is no contention in accessing the shared memory between the CPU 1 and the communication module 3, and mutual data exchange is performed efficiently.

(発明の効果) 以上説明したように本発明は、通信モジュールの共有メ
モリを2面にすることにより、CPUと通信モジュール
の共有メモリのアクセスの競合をなくし相互のデータ授
受を全2@、かつCPUによる処理のスキャン遅れを最
小にすることか可能となり、通信効率が向上する効果が
ある。
(Effects of the Invention) As explained above, the present invention eliminates contention in accessing the shared memory between the CPU and the communication module by making the shared memory of the communication module two-sided. This makes it possible to minimize scan delays in processing by the CPU, which has the effect of improving communication efficiency.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例のPCを構成する通信モジュ
ールの構成図、第2図はPCの概略構成図、第3図は従
来のpcの通信モジュールの構成図、第4図は共有メモ
リ15,15..15.の構成図、第5図はCPUIの
処理を示す流れ図である。 1・・・CPU、      2・・・システムバス、
3・・・通信モジュール、 11 ・−M  P  U 、        12 
・・−ROM。 13・・・RAM、    14・・・通信部、15、
.152−・・共有メモリ、 16・・・アービタ、 171〜174・・・バスドライバ、 18・・・通信ポート、 19・・・コマンド送信完γ割り込み、20・・・レス
ポンス受信割り込み。
Fig. 1 is a block diagram of a communication module that constitutes a PC according to an embodiment of the present invention, Fig. 2 is a schematic block diagram of a PC, Fig. 3 is a block diagram of a communication module of a conventional PC, and Fig. 4 is a shared Memory 15, 15. .. 15. FIG. 5 is a flowchart showing the processing of the CPUI. 1...CPU, 2...System bus,
3... Communication module, 11 -MPU, 12
...-ROM. 13...RAM, 14...Communication department, 15,
.. 152--Shared memory, 16--Arbiter, 171-174--Bus driver, 18--Communication port, 19--Command transmission completion gamma interrupt, 20--Response reception interrupt.

Claims (1)

【特許請求の範囲】[Claims] 1、CPUと通信部がモジュールとして互いに分離され
て相互にバスで接続され、通信部に、CPUとの間のデ
ータ授受のための共有メモリを有するプログラマブルコ
ントローラにおいて、前記共有メモリが2面設けられ、
共有メモリの切替えを行う手段を有することを特徴とす
るプログラマブルコントローラ。
1. A programmable controller in which a CPU and a communication section are separated from each other as modules and connected to each other via a bus, and the communication section has a shared memory for exchanging data with the CPU, and the shared memory is provided on two sides. ,
A programmable controller characterized by having means for switching shared memory.
JP27272389A 1989-10-19 1989-10-19 Programmable control Pending JPH03134712A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27272389A JPH03134712A (en) 1989-10-19 1989-10-19 Programmable control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27272389A JPH03134712A (en) 1989-10-19 1989-10-19 Programmable control

Publications (1)

Publication Number Publication Date
JPH03134712A true JPH03134712A (en) 1991-06-07

Family

ID=17517885

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27272389A Pending JPH03134712A (en) 1989-10-19 1989-10-19 Programmable control

Country Status (1)

Country Link
JP (1) JPH03134712A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6308244B1 (en) 1993-02-26 2001-10-23 Mitsubishi Denki Kabushiki Kaisha Information processing apparatus with improved multiple memory access and control
WO2011125178A1 (en) * 2010-04-06 2011-10-13 三菱電機株式会社 Control system, control device and control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6308244B1 (en) 1993-02-26 2001-10-23 Mitsubishi Denki Kabushiki Kaisha Information processing apparatus with improved multiple memory access and control
WO2011125178A1 (en) * 2010-04-06 2011-10-13 三菱電機株式会社 Control system, control device and control method

Similar Documents

Publication Publication Date Title
KR930008039B1 (en) Bus master interface circuit with transparent preemption of a data transfer operation
JPS63255759A (en) Control system
US5566345A (en) SCSI bus capacity expansion controller using gating circuits to arbitrate DMA requests from a plurality of disk drives
JP2962787B2 (en) Communication control method
JPH03134712A (en) Programmable control
US5446847A (en) Programmable system bus priority network
JPH0343804A (en) Sequence controller
US7107374B1 (en) Method for bus mastering for devices resident in configurable system logic
JPH0340417B2 (en)
JPS6341103B2 (en)
JPH05314061A (en) Bus interface control system
JP2554423Y2 (en) Memory controller
JP2522412B2 (en) Communication method between programmable controller and input / output device
JP2705955B2 (en) Parallel information processing device
JPS6029139B2 (en) Connection method between processing units
JPH04328667A (en) System and device for transmitting/receiving 2-port ram
JPH02211571A (en) Information processor
JP2610971B2 (en) Direct memory access method between central processing units
JP2573790B2 (en) Transfer control device
JPH0652081A (en) Local memory type dma control system for packet communication
JPH04282938A (en) Communication controller
JPS62281191A (en) Magnetic bubble memory device
JPS6127790B2 (en)
JPS6132161A (en) Information transfer device of processing system
JPH0561671B2 (en)