JP6498557B2 - Programmable controller - Google Patents

Programmable controller Download PDF

Info

Publication number
JP6498557B2
JP6498557B2 JP2015148405A JP2015148405A JP6498557B2 JP 6498557 B2 JP6498557 B2 JP 6498557B2 JP 2015148405 A JP2015148405 A JP 2015148405A JP 2015148405 A JP2015148405 A JP 2015148405A JP 6498557 B2 JP6498557 B2 JP 6498557B2
Authority
JP
Japan
Prior art keywords
address
module
programmable controller
data
access
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.)
Active
Application number
JP2015148405A
Other languages
Japanese (ja)
Other versions
JP2017027539A (en
JP2017027539A5 (en
Inventor
満 曽我
満 曽我
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Industrial Equipment Systems Co Ltd
Original Assignee
Hitachi Industrial Equipment Systems 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 Hitachi Industrial Equipment Systems Co Ltd filed Critical Hitachi Industrial Equipment Systems Co Ltd
Priority to JP2015148405A priority Critical patent/JP6498557B2/en
Publication of JP2017027539A publication Critical patent/JP2017027539A/en
Publication of JP2017027539A5 publication Critical patent/JP2017027539A5/ja
Application granted granted Critical
Publication of JP6498557B2 publication Critical patent/JP6498557B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

本発明は、設備や機械システムの動作をシーケンスプログラムによって制御するプログラマブルコントローラに関し、特に、CPUモジュールとIOモジュールとのIOアクセス方式に特徴を有する。   The present invention relates to a programmable controller that controls operations of equipment and a mechanical system by a sequence program, and particularly has a feature in an IO access method between a CPU module and an IO module.

プログラマブルコントローラ(以下、「PLC」という)は、ユーザが作成するラダープログラムをサイクリックに実行する制御機器であって、工場などに設置されている多様な機械設備やプラント設備などを制御するための汎用制御装置として広く普及している。
PLCは、機械設備の稼働状態をセンサやスイッチなどの機器からデジタル信号として入力モジュールを介してON/OFF情報として取り込むか、あるいは、プラント設備の圧力情報や温度情報などをアナログ信号として取り込み、ユーザが作成したシーケンスプログラムにて演算を行う。そして、その演算結果は、デジタル信号やアナログ信号として出力モジュールを介して機械設備の動力源やプラント設備のバルブなどに伝達され、設備全体の高度な制御が実現される。この入力モジュールから入力データを取り込み、出力モジュールへ演算結果を出力することを「IOリフレッシュ」と呼ぶ。PLCによる制御を高速に行うための手段の一つとして、このIOリフレッシュを高速に行うことが挙げられる。
A programmable controller (hereinafter referred to as “PLC”) is a control device that cyclically executes a ladder program created by a user, and is used to control various machine facilities and plant facilities installed in factories and the like. Widely used as a general-purpose control device.
The PLC captures the operating status of mechanical equipment from devices such as sensors and switches as digital signals as ON / OFF information via the input module, or captures pressure information, temperature information, etc. of plant equipment as analog signals. Calculation is performed with the sequence program created by. Then, the calculation result is transmitted as a digital signal or an analog signal to the power source of the machine facility, the valve of the plant facility, or the like via the output module, thereby realizing advanced control of the entire facility. Taking input data from the input module and outputting the operation result to the output module is called “IO refresh”. One means for performing control by PLC at high speed is to perform this IO refresh at high speed.

このPLCによる制御を高速化するための技術として、例えば特許文献1には、「入出力モジュール割付情報に各モジュールの更新周期を設定可能とし、毎スキャンのリフレッシュ処理実行時に、更新周期が設定された更新周期と等しいか、あるいは、それよりも過ぎているモジュールのみリフレッシュを実行することで、CPUモジュールと入出力モジュールとのバスアクセス回数を低減し、スキャン時間の高速化を図る」技術が示されている。   As a technique for speeding up the control by the PLC, for example, in Patent Document 1, “the update cycle of each module can be set in the input / output module allocation information, and the update cycle is set at the time of executing the refresh process for each scan. By refreshing only modules that are equal to or longer than the update cycle, the number of bus accesses between the CPU module and the I / O module is reduced, and the scan time is increased. " Has been.

また、PLCの技術分野ではないが、メモリデバイスのアクセス性能(読み書き)を高速化するために、1回のアドレス指定によって複数のデータをまとめて連続的に転送するバーストモードが、データ転送モードの一つの手法として公知の技術である(例えば、特許文献2)。   Although not in the technical field of PLC, in order to increase the access performance (read / write) of a memory device, the burst mode in which a plurality of data is transferred continuously by one address designation is a data transfer mode. This is a known technique (for example, Patent Document 2).

特開2015−60377号公報Japanese Patent Laying-Open No. 2015-60377 特開2002−251319号公報JP 2002-251319 A

モジュール型のPLCは、様々な種類のIOモジュールを実装可能とする。例えば、16点(ビット)/32点/64点といった点(ビット)数のデジタル信号を入力または出力するモジュール、8チャネル(1チャネルは16ビット)のアナログ信号を入力または出力するモジュール、その他にPLC間のデータ共有を行うための通信モジュール等が使用される。   The module type PLC can mount various types of IO modules. For example, a module that inputs or outputs digital signals of 16 points (bits) / 32 points / 64 points, a module that inputs or outputs analog signals of 8 channels (1 channel is 16 bits), etc. A communication module or the like for sharing data between PLCs is used.

通信モジュールが扱うデータの量は、8kワードや32kワードと大量のデータを扱う。CPUモジュールは、これらIOモジュールや通信モジュールとの間のデータのIOリフレッシュおよびシーケンスプログラムの演算をサイクリックに行う。このため、データ量が多くなると、ユーザプログラムの演算周期がその分遅くなってしまう。   The amount of data handled by the communication module handles a large amount of data such as 8k words or 32k words. The CPU module cyclically performs IO refresh of data between these IO modules and communication modules and sequence program calculation. For this reason, when the amount of data increases, the calculation cycle of the user program is delayed accordingly.

そこで、本発明では、連続したエリア(アドレス空間)のデータを高速にアクセス可能な技術を提供することを目的とする。   Therefore, an object of the present invention is to provide a technique capable of accessing data in continuous areas (address spaces) at high speed.

本発明に係るPLCは、CPUモジュールと、1以上のIOモジュールと、両モジュールをつなぐ外部バスとを備え、CPUモジュールは、IOモジュール個々のアドレス空間の任意アドレスを指定し、IOモジュールは、指定された任意アドレスから当該アドレスをインクリメントまたはデクリメントして当該IOモジュール内の連続したアドレス空間に対してIO処理を実行することを特徴とする。   The PLC according to the present invention includes a CPU module, one or more IO modules, and an external bus connecting both modules. The CPU module designates an arbitrary address in the address space of each IO module, and the IO module designates The address is incremented or decremented from the given arbitrary address, and IO processing is executed on a continuous address space in the IO module.

本発明によれば、データ転送を高速に行うことが可能となる。   According to the present invention, data transfer can be performed at high speed.

図1は、本発明の実施例に係るプログラマブルコントローラの構成図である。FIG. 1 is a configuration diagram of a programmable controller according to an embodiment of the present invention. 図2は、通信モジュールが備えるBUSコントローラの内部ブロックの構成図である。FIG. 2 is a configuration diagram of an internal block of the BUS controller included in the communication module. 図3は、通常のIOモジュールに対するライトアクセス時のタイムチャートである。FIG. 3 is a time chart at the time of write access to a normal IO module. 図4は、通常のIOモジュールに対するリードアクセス時のタイムチャートである。FIG. 4 is a time chart at the time of read access to a normal IO module. 図5は、通信モジュールに対するライト時の高速連続アクセスのタイムチャートである。FIG. 5 is a time chart of high-speed continuous access when writing to the communication module. 図6は、通信モジュールに対するリード時の高速連続アクセスのタイムチャートである。FIG. 6 is a time chart of high-speed continuous access at the time of reading with respect to the communication module. 図7は、プログラマブルコントローラ(PLC)の動作を示すフローチャートである。FIG. 7 is a flowchart showing the operation of the programmable controller (PLC).

以下に、本発明の実施例について、図を参照しながら説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の実施例に係るPLCの構成図である。
このPLCのCPUスロットに搭載したCPUモジュール1は、シーケンスプログラムの演算を行うMPU11、パソコン等の周辺機器と通信するための通信ポート12、シーケンスプログラムやシステムプログラムを格納するためのROM13、シーケンスプログラムの演算に使用するデータを格納するRAM14、該RAM14と外部バス5に接続されるIOモジュールとのデータ転送を行うDMAC15、外部バス3とのインタフェースであるアドレス出力部およびデータ入出力部を持つBUSコントローラM16(Mは「マスタ」を表す)、から構成される。また、CPUモジュール1は、後述するIOモジュールに対する高速連続アクセスのために、連続アクセス数をカウントするカウンタを設ける。このカウンタは、ハード的にまたはソフト的に構成することができるものである。そのため、図1のCPUモジュール1内には図示をしていない。
FIG. 1 is a configuration diagram of a PLC according to an embodiment of the present invention.
The CPU module 1 installed in the CPU slot of the PLC includes an MPU 11 for calculating a sequence program, a communication port 12 for communicating with a peripheral device such as a personal computer, a ROM 13 for storing a sequence program and a system program, a sequence program A BUS controller having a RAM 14 for storing data used for calculation, a DMAC 15 for transferring data between the RAM 14 and an IO module connected to the external bus 5, an address output unit serving as an interface with the external bus 3, and a data input / output unit M16 (M represents “master”). Further, the CPU module 1 is provided with a counter for counting the number of continuous accesses for high-speed continuous access to an IO module described later. This counter can be configured in hardware or software. Therefore, it is not shown in the CPU module 1 of FIG.

CPUモジュール1は、IOスロット0、IOスロット1、・・・IOスロットnに、どのようなIOモジュールが接続されているのか、あらかじめ把握する必要がある。通常は、IOモジュール側において、ステータス情報として入出力タイプやデータサイズといった情報をCPUモジュール1から認識できるようにする。このステータス情報に、高速連続アクセス対応可否の情報を設けることにより、CPUモジュール1から高速連続アクセス対応可能なIOモジュールがどのIOスロットに実装されているか判断可能となる。   The CPU module 1 needs to know in advance which IO module is connected to the IO slot 0, IO slot 1,... IO slot n. Normally, on the IO module side, information such as input / output type and data size can be recognized from the CPU module 1 as status information. By providing information indicating whether high-speed continuous access is supported or not in this status information, it is possible to determine in which IO slot an IO module capable of high-speed continuous access is mounted from the CPU module 1.

外部IOモジュールには、デジタル信号やアナログ信号用のIOモジュール(入力モジュールや出力モジュール)の他に、通信モジュール2がある。この通信モジュール2は、モジュール内部に例えば2ポートRAM21を備え、CPUモジュール1と通信モジュール2の通信ポートに接続される外部通信機器とのデータを、この2ポートRAM21を介して転送する。その際のCPUモジュール1側からのアクセス時に、通信モジュール2は、外部バス3を介して取得したアドレスにより内部の2ポートRAM21にアクセスするか、または、そのアドレスに対してCPUモジュールから送られる連続アクセス数分のインクリメントまたはデクリメントしたアドレスを送出して内部の2ポートRAM21にアクセスする。このアクセスを可能にするために、通信モジュール2は、BUSコントローラS22(Sは「スレーブ」を表す)を備える。アドレスは番地ともいう。   The external IO module includes a communication module 2 in addition to an IO module (input module or output module) for digital signals and analog signals. The communication module 2 includes, for example, a 2-port RAM 21 inside the module, and transfers data between the CPU module 1 and an external communication device connected to the communication port of the communication module 2 via the 2-port RAM 21. At the time of access from the CPU module 1 side at that time, the communication module 2 accesses the internal 2-port RAM 21 by an address acquired via the external bus 3 or is continuously sent from the CPU module to the address. The address incremented or decremented by the number of accesses is sent to access the internal 2-port RAM 21. In order to enable this access, the communication module 2 comprises a BUS controller S22 (S stands for “slave”). The address is also called an address.

外部バス3は、CPUモジュール1およびIOスロット0〜nに接続された各種IOモジュールをつなぎ、アドレス、データおよび制御情報をやり取りする。本実施例では、この外部バス3として、アドレスとデータで共用するマルチプレクスバスを用いている。なお、図1では、外部バス3を構成する信号線の内、後述するモード信号(mode_n)およびストローブ信号(strobe_n)のための信号線を分離した形で示している。
本発明は、外部バスをこのマルチプレクスバスに限定するものではなく、セパレート型のバス形態であってもよい。ただし、マルチプレクスバスは、セパレート型のバスと比べ必要となる信号線を減らしピン数を低減することができる。
The external bus 3 connects the CPU module 1 and various IO modules connected to the IO slots 0 to n to exchange addresses, data, and control information. In the present embodiment, a multiplexed bus that is shared by addresses and data is used as the external bus 3. In FIG. 1, signal lines for a mode signal (mode_n) and a strobe signal (strobe_n), which will be described later, are separated from signal lines constituting the external bus 3.
The present invention does not limit the external bus to this multiplex bus, but may be a separate bus form. However, the multiplexed bus can reduce the number of necessary signal lines and the number of pins compared to a separate bus.

図2は、通信モジュール2が備えるBUSコントローラS22の内部ブロックの構成図である。外部バス3とのインタフェースであるBUSコントローラS22は、アドレスを記憶するフリップフロップ(FF)31、このフリップフロップ(FF)が出力するアドレスをインクリメントまたはデクリメントする増減カウンタ32およびアドレス選択用のセレクタ33から構成される。外部バス3は、マルチプレクスバスであることから、この外部バス3からの入力データの内、データについてはそのまま2ポートRAMの方へ送り、アドレスについてはセレクタ33へ送られる。なお、図2では、モード信号(mode_n)およびストローブ信号(strobe_n)のための信号線は省略している。   FIG. 2 is a configuration diagram of an internal block of the BUS controller S22 included in the communication module 2. The BUS controller S22 that is an interface with the external bus 3 includes a flip-flop (FF) 31 that stores an address, an increase / decrease counter 32 that increments or decrements an address output from the flip-flop (FF), and a selector 33 for selecting an address. Composed. Since the external bus 3 is a multiplex bus, the input data from the external bus 3 is sent as it is to the 2-port RAM, and the address is sent to the selector 33. In FIG. 2, signal lines for the mode signal (mode_n) and the strobe signal (strobe_n) are omitted.

フリップフロップ(FF)31は、その入力として、CPUモジュール1から外部バス3を介して入力されるアドレス、またはフリップフロップ(FF)31自身が記憶しているアドレスを増減カウンタ32によりインクリメントまたはデクリメントしたアドレスをセレクタ33により選択する。すなわち、フリップフロップ(FF)31は、通常アクセス時には、外部バス3からのアドレスが選択されて記憶/出力することとなり、高速連続アクセス時には、上記インクリメントまたはデクリメントしたアドレスが選択されて順次記憶/出力することとなる。このセレクタ33による選択には、後述するモード信号(mode_n)が使用される。また、増減カウンタ32がインクリメントするかデクリメントするかには、後述するモード信号(mode_n)およびストローブ信号(strobe_n)が使用される。   The flip-flop (FF) 31 is incremented or decremented by the increment / decrement counter 32 as the input, the address input from the CPU module 1 via the external bus 3 or the address stored in the flip-flop (FF) 31 itself. An address is selected by the selector 33. That is, the flip-flop (FF) 31 selects and stores / outputs the address from the external bus 3 during normal access, and sequentially stores / outputs the incremented or decremented address during high-speed continuous access. Will be. For selection by the selector 33, a mode signal (mode_n) described later is used. Further, a mode signal (mode_n) and a strobe signal (strobe_n) described later are used to determine whether the increase / decrease counter 32 is incremented or decremented.

CPUモジュール1と通信モジュール2との間では、CPUモジュール1と通常のIOモジュールが扱うデータ量よりもはるかに大量のデータを扱う。そこで、両者におけるデータアクセスの違いを、タイムチャートを使って説明する。   Between the CPU module 1 and the communication module 2, a much larger amount of data is handled than the data amount handled by the CPU module 1 and the normal IO module. Therefore, the difference in data access between the two will be described using a time chart.

先ず、図3および図4は、CPUモジュール1が通常のIOモジュールに対するリフレッシュ処理を行う場合のタイムチャートである。図3がライト時、図4がリード時である。
外部バス3は、アドレスとデータで共用するマルチプレクスバスであり、やり取りを行う信号は、各スロットの選択信号(cs_n)、アドレスストローブ信号(as_n)、データストローブ信号(wr_n/rd_n)および16ビットのアドレス/データ信号(ad[15:0])から構成される。
First, FIG. 3 and FIG. 4 are time charts when the CPU module 1 performs a refresh process for a normal IO module. FIG. 3 shows a write time and FIG. 4 shows a read time.
The external bus 3 is a multiplexed bus shared by addresses and data, and signals to be exchanged are selection signals (cs_n), address strobe signals (as_n), data strobe signals (wr_n / rd_n) and 16 bits for each slot. Address / data signal (ad [15: 0]).

例えば、32点(ビット)の出力モジュールに対するリフレッシュ処理は、図3に示すライトアクセスを2回行うことになる。また、8チャネルのアナログ入力モジュールに対するリフレッシュ処理は、1チャネルが16ビットであることから、図4に示すリードアクセスを8回行うことになる。   For example, in the refresh process for a 32-point (bit) output module, the write access shown in FIG. 3 is performed twice. Further, the refresh processing for the 8-channel analog input module is performed 8 times for the read access shown in FIG. 4 because one channel is 16 bits.

次に、図5および図6は、CPUモジュール1と通信モジュール2との間で高速連続アクセスを行う場合のタイムチャートである。図5がライト時、図6がリード時である。
CPUモジュール1は、通信モジュール2に対して、アクセスするアドレス空間のアドレス(ADR)を指定する(任意アドレスの指定)と共に、通常アクセスか高速連続アクセスかを識別するためのモード信号(mode_n)をアドレス出力と同じタイミングで出力する。通信モジュール2側は、アドレスストローブ信号(as_n)の立ち上がり時に、モード信号(mode_n)のレベルによって、通常アクセスまたは高速連続アクセスのどちらでCPUモジュール1がアクセスしているのか判断する(図5および図6では、モード信号(mode_n)のLレベルの時が高速連続アクセスである)。
Next, FIG. 5 and FIG. 6 are time charts when high-speed continuous access is performed between the CPU module 1 and the communication module 2. FIG. 5 shows a write time and FIG. 6 shows a read time.
The CPU module 1 designates an address (ADR) of an address space to be accessed (designation of an arbitrary address) and a mode signal (mode_n) for identifying normal access or high-speed continuous access to the communication module 2. Output at the same timing as address output. At the rising edge of the address strobe signal (as_n), the communication module 2 side determines whether the CPU module 1 is accessing by normal access or high-speed continuous access according to the level of the mode signal (mode_n) (FIGS. 5 and 5). 6, when the mode signal (mode_n) is at the L level, the high-speed continuous access is performed.

高速連続アクセスのデータサイクル時には、ストローブ信号(strobe_n)のレベル変化に応じて通信モジュール内部のアドレスを更新する。すなわち、ストローブ信号(strobe_n)のレベル変化開始時点(LレベルからHレベルへの立ち上がり時)のモード信号(mode_n)のレベルにより、インクリメントまたはデクリメントが選択される(図5および図6では、ストローブ信号(strobe_n)のLレベルからHレベル変化開始時に、モード信号(mode_n)が、Lレベルであればインクリメント、Hレベルであればデクリメント)。   In the data cycle of the high-speed continuous access, the address in the communication module is updated according to the level change of the strobe signal (strobe_n). That is, the increment or decrement is selected according to the level of the mode signal (mode_n) at the start of level change of the strobe signal (strobe_n) (at the time of rising from the L level to the H level) (in FIGS. 5 and 6, the strobe signal is changed). At the start of the H level change from the (strobe_n) L level, the mode signal (mode_n) is incremented if it is L level, and decremented if it is H level).

そして、CPUモジュール1は、高速連続アクセスに係る連続アクセス数(連続するアドレス空間)を指定する。CPUモジュール1は、内部に設けたカウンタを用いて、通信モジュール2に対して、連続したアドレス空間に対応する連続アクセス数分パルス化したストローブ信号(strobe_n)を送信する。通信モジュール2が備えるBUSコントローラS22の増減カウンタ32は、このパルス化したストローブ信号を受けて、指定された任意アドレスからこの連続アクセス数分インクリメントまたはデクリメントすることになる。   Then, the CPU module 1 designates the continuous access number (continuous address space) related to the high-speed continuous access. The CPU module 1 transmits a strobe signal (strobe_n) pulsed by the number of continuous accesses corresponding to the continuous address space to the communication module 2 using a counter provided therein. The increase / decrease counter 32 of the BUS controller S22 included in the communication module 2 receives this pulsed strobe signal and increments or decrements this specified number of consecutive accesses from an arbitrary address.

また、CPUモジュール1が、高速連続アクセスに対応していない従来のCPUモジュールであって、高速連続アクセス対応のIOモジュールとの組み合わせであった場合でも、通常アクセスに必要な制御信号(cs_n、as_n、wr_nおよびrd_n)の出力方法は互換性があるので、通常アクセスは可能である。   Further, even when the CPU module 1 is a conventional CPU module that does not support high-speed continuous access and is combined with an IO module that supports high-speed continuous access, control signals (cs_n, as_n) required for normal access are used. , Wr_n and rd_n) are compatible, so normal access is possible.

本実施例では、高速連続アクセス対応のモジュールとして、通信モジュール2を示しているが、これは通信モジュールに限ったことではない。さらに、通信モジュール2は、内部に2ポートRAMを備えているが、実際には、2ポートRAMではなく、1ポートRAMに対して調停回路(アービタ)を付加したものであってもよい。   In this embodiment, the communication module 2 is shown as a module for high-speed continuous access, but this is not limited to the communication module. Furthermore, although the communication module 2 includes a 2-port RAM therein, in reality, an arbitration circuit (arbiter) may be added to the 1-port RAM instead of the 2-port RAM.

図7は、PLCの動作を示すフローチャートである。PLCは、通常、データの入力に係る入力リフレッシュ、入力データに基づくシーケンス演算および演算結果に伴うデータの出力に係る出力リフレッシュの一連の処理フローを、電源オフのような停止操作が発生するまでの間、サイクリックに実行するものである。そして、IOリフレッシュ(入力リフレッシュ+出力リフレッシュ)およびシーケンス演算の実行による一連のサイクリック処理に掛かる時間を「スキャンタイム」と呼んでいる。そうすると、シーケンス演算の実行時間が一定であれば、スキャンタイムはIOリフレッシュに掛かる時間に左右されることになる。   FIG. 7 is a flowchart showing the operation of the PLC. The PLC normally performs a series of processing flows of input refresh related to data input, sequence calculation based on input data, and output refresh related to data output accompanying the calculation result until a stop operation such as power-off occurs. It will be executed cyclically. The time required for a series of cyclic processing by executing IO refresh (input refresh + output refresh) and sequence calculation is called “scan time”. Then, if the execution time of the sequence calculation is constant, the scan time depends on the time required for IO refresh.

次に、上記フローチャートに従い、高速連続アクセスの有無によりどの程度サイクリックな演算性能、すなわちスキャンタイムに差異がでるのかを説明する。ここで、PLCの構成例としては、図1に示す通り、IOスロット0に、8,192ワードのデータを扱う通信モジュール、IOスロット1に、1ワードのデータを扱う入力モジュール、IOスロット2に、1ワードのデータを扱う出力モジュール、が実装されているものとする。また、IOアクセスの単位時間を“1μsec”として、図7のフローチャートが示す、一連のサイクリック処理に掛かるスキャンタイムを算出する。   Next, according to the above flowchart, how much the cyclic calculation performance, that is, the scan time differs depending on the presence or absence of high-speed continuous access will be described. Here, as an example of the configuration of the PLC, as shown in FIG. 1, a communication module that handles 8,192 words of data in IO slot 0, an input module that handles 1 word of data in IO slot 1, and IO slot 2 Assume that an output module that handles 1-word data is mounted. Further, assuming that the unit time of IO access is “1 μsec”, the scan time required for a series of cyclic processes shown in the flowchart of FIG. 7 is calculated.

図3および図4に示す通常のIOモジュールに対するアクセスを、通信モジュールに対して行った場合を想定する。通信モジュールは最大で8,192ワードのデータを扱うことから、入力リフレッシュおよび出力リフレッシュを通常のIOアクセスで行うと、IOリフレッシュは、最大で“8,194μsec”(約8msec)の時間を要することとなる。また、シーケンス演算に要する時間は、ユーザが作成するシーケンスプログラムの容量に依存するところ、通常の目安として“1msec(=1,000μsec)”である。そうすると、スキャンタイムは、最大“9,194μsec”で、9msec程度となる。   Assume that the access to the normal IO module shown in FIGS. 3 and 4 is performed on the communication module. Since the communication module handles data of 8,192 words at the maximum, if input refresh and output refresh are performed with normal IO access, the IO refresh requires a maximum of “8,194 μsec” (about 8 msec). It becomes. Further, the time required for the sequence calculation depends on the capacity of the sequence program created by the user, and is generally “1 msec (= 1,000 μsec)”. Then, the maximum scan time is “9,194 μsec”, which is about 9 msec.

一方、通信モジュールに対するIOリフレッシュを、図5および図6に示す高速連続アクセスで行う場合、通信モジュール内部ではアドレスを更新するだけの処理となる。そうすると、CPUモジュール1から順次アドレスを取得するよりも高速にアドレス更新が可能である。通信モジュール内部でのアドレス更新時間は、通常120nsec程度であるので、“0.1μsec”とすると、通信モジュールのIOリフレッシュに要する時間は、最大“819μsec”程度と捉えることができる。これに、入力モジュールおよび出力モジュールとしての通常のIOアクセス分(2μsec)を加えて、IOリフレッシュとしては、最大“821μsec”となる。更に、シーケンス演算時間(1msec)を加えたスキャンタイムは、最大“1,821μsec”となる。すなわち、上記の通常のIOアクセスの場合のスキャンタイムと比べて約5倍の性能アップとなることが判る(ここで、上記アドレス更新時間を“0.12μsec”として算出した場合でも、通信モジュール内で最大“983μsec”、通常のIOアクセス分とシーケンス演算時間を加えたスキャンタイムは、最大“1,985μsec”となり、4.6倍の性能アップとなる)。   On the other hand, when the IO refresh for the communication module is performed by the high-speed continuous access shown in FIGS. 5 and 6, only the address is updated inside the communication module. Then, the address can be updated at a higher speed than the sequential acquisition of addresses from the CPU module 1. Since the address update time inside the communication module is normally about 120 nsec, if it is “0.1 μsec”, the time required for IO refresh of the communication module can be regarded as about “819 μsec” at the maximum. In addition to this, the normal IO access for the input module and the output module (2 μsec) is added, and the maximum IO refresh is “821 μsec”. Furthermore, the maximum scan time including the sequence calculation time (1 msec) is “1,821 μsec”. That is, it can be seen that the performance is improved about 5 times compared to the scan time in the case of the above-mentioned normal IO access (in this case, even when the address update time is calculated as “0.12 μsec” The maximum scan time is “983 μsec”, and the scan time including the normal IO access and the sequence calculation time is “1,985 μsec” at maximum, which is a 4.6 times improvement in performance).

データ通信の際には、番地の指定を1度行い、指定された番地にデータ通信を行った後には、指定番地以降または以前の番地に対して、リードまたはライトの順次データ通信ができるため、この順次データ通信を行う際に、番地の指定を行わなくてよいこととなる。
これにより、番地指定の通信に要する時間を減らすことが可能となる。
つまり、一の通信モジュールが通信を開始する際に、データ通信を行う前にデータ通信をする番地の指定を行った後は、一と他の通信モジュールは、それぞれ順次データ通信することを設定またはその情報を有しているため、データ通信を繰り返し行うこととなる。
例えば、指定番地nを指定する通信を行い、指定番地nのデータ通信後には、番地n+1、n+2・・・またはn−1、n−2・・・に対しては、番地を指定する通信が不要となるため、全体のデータ通信速度を向上させることが可能となる。なお、便宜上n+1,n+2・・・等と記載したが、データ通信するバス数等に応じて指定番地以降または以前の番地は適宜変更されるため、一般化すると順次データ通信が行われる番地は、n+m、n+2mとなる。
At the time of data communication, the address is designated once, and after performing data communication to the designated address, sequential data communication of read or write can be performed to the address after the designated address or before, When performing this sequential data communication, the address need not be specified.
As a result, the time required for address designation communication can be reduced.
That is, when one communication module starts communication, after specifying the address for data communication before performing data communication, one and the other communication modules are set to sequentially perform data communication. Since this information is included, data communication is repeated.
For example, communication specifying the designated address n is performed, and after data communication of the designated address n, communication specifying the address is performed for the addresses n + 1, n + 2,... Or n-1, n-2,. Since it becomes unnecessary, the overall data communication speed can be improved. In addition, although described as n + 1, n + 2,... For convenience, the address after the designated address or the previous address is appropriately changed depending on the number of buses for data communication, etc. n + m and n + 2m.

以上のように、本実施例においては、CPUモジュールのIOリフレッシュ処理において、連続したエリア(アドレス空間)に対するアクセスを上記の高速連続アクセスとすることにより、大幅に処理時間を高速化することが可能となる。
すなわち、連続したアドレス空間に対するCPUモジュールからのバスアクセスを1回の任意アドレスの指定出力後に、テータストローブ信号をアクセスサイズ分トグルすることによりリードまたはライトが可能となり、高速にデータ転送が行える。
また、データ転送を高速に行うことで、CPUモジュールでの演算周期が速くなり、外部機器に対する制御を高速に処理実行することが可能となる。
As described above, in this embodiment, in the IO refresh processing of the CPU module, it is possible to greatly speed up the processing time by using the above-described high-speed continuous access for the access to the continuous area (address space). It becomes.
In other words, the bus access from the CPU module to the continuous address space can be read or written by toggling the data strobe signal by the access size after the designation output of an arbitrary address once, and data can be transferred at high speed.
In addition, by performing data transfer at high speed, the calculation cycle in the CPU module becomes faster, and control for external devices can be executed at high speed.

なお、本発明は、上記の実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記の実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、実施例の構成の一部について、他の構成の追加・削除・置換をすることが可能である。   In addition, this invention is not limited to said Example, Various modifications are included. For example, the above-described embodiments have been described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described. In addition, it is possible to add, delete, and replace other configurations for a part of the configuration of the embodiment.

1…CPUモジュール、2…通信モジュール、3…外部バス、
11…MPU、12…通信ポート、13…ROM、14…RAM、15…DMAC、
16…BUSコントローラM、21…2ポートRAM、22…BUSコントローラS、
31…フリップフロップ(FF)、32…増減カウンタ、33…セレクタ
1 ... CPU module, 2 ... communication module, 3 ... external bus,
11 ... MPU, 12 ... communication port, 13 ... ROM, 14 ... RAM, 15 ... DMAC,
16 ... BUS controller M, 21 ... 2-port RAM, 22 ... BUS controller S,
31 ... flip-flop (FF), 32 ... increase / decrease counter, 33 ... selector

Claims (4)

CPUモジュールと、1以上のIOモジュールと、前記両モジュールをつなぐ外部バスとを備え、
前記CPUモジュールは、前記IOモジュール個々のアドレス空間の任意アドレスまたは前記IOモジュール内の連続したアドレス空間に対応する連続アクセス数を指定し、
前記IOモジュールは、指定された前記任意アドレスから当該アドレスを前記連続アクセス数分のインクリメントまたはデクリメントして当該IOモジュール内の連続したアドレス空間に対してIO処理を実行し、
前記外部バスには、前記連続したアドレス空間に対するIO処理の実行と前記アドレスのインクリメントまたはデクリメントとを指定するモード信号を通信する第1の信号線、および、前記アドレスをインクリメントまたはデクリメントする更新タイミングを規定するストローブ信号を通信する第2の信号線、が付設される
ことを特徴とするプログラマブルコントローラ。
A CPU module, one or more IO modules, and an external bus connecting the two modules;
The CPU module specifies the number of consecutive accesses corresponding to the address space contiguous in any address or the IO module of the IO module individual address space,
The IO module increments or decrements the address from the specified arbitrary address by the number of consecutive accesses , and executes IO processing on a continuous address space in the IO module ,
The external bus has a first signal line for communicating a mode signal designating execution of IO processing for the continuous address space and increment or decrement of the address, and update timing for incrementing or decrementing the address. A programmable controller , wherein a second signal line for communicating a prescribed strobe signal is attached .
請求項1記載のプログラマブルコントローラであって、
前記アドレスをインクリメントまたはデクリメントする更新タイミングは、前記ストローブ信号のレベル変化時である
ことを特徴とするプログラマブルコントローラ。
The programmable controller according to claim 1,
The programmable controller , wherein the update timing for incrementing or decrementing the address is when the level of the strobe signal changes .
請求項1または2に記載のプログラマブルコントローラであって、
前記CPUモジュールは、前記ストローブ信号として前記連続アクセス数分のパルス化した信号を出力する
ことを特徴とするプログラマブルコントローラ。
The programmable controller according to claim 1 or 2 ,
The programmable controller , wherein the CPU module outputs a pulsed signal corresponding to the number of continuous accesses as the strobe signal .
請求項1〜3のいずれか1項に記載のプログラマブルコントローラであって、
前記外部バスは、前記アドレスとデータで共用するマルチプレクスバスである
ことを特徴とするプログラマブルコントローラ。
The programmable controller according to any one of claims 1 to 3 ,
The programmable controller , wherein the external bus is a multiplexed bus shared by the address and data .
JP2015148405A 2015-07-28 2015-07-28 Programmable controller Active JP6498557B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015148405A JP6498557B2 (en) 2015-07-28 2015-07-28 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015148405A JP6498557B2 (en) 2015-07-28 2015-07-28 Programmable controller

Publications (3)

Publication Number Publication Date
JP2017027539A JP2017027539A (en) 2017-02-02
JP2017027539A5 JP2017027539A5 (en) 2018-02-15
JP6498557B2 true JP6498557B2 (en) 2019-04-10

Family

ID=57949808

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015148405A Active JP6498557B2 (en) 2015-07-28 2015-07-28 Programmable controller

Country Status (1)

Country Link
JP (1) JP6498557B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7087378B2 (en) 2017-12-25 2022-06-21 オムロン株式会社 Control system and control unit
JP7003952B2 (en) 2019-03-14 2022-01-21 オムロン株式会社 Programs for control systems, support devices and support devices
JP7294912B2 (en) * 2019-06-24 2023-06-20 株式会社日立産機システム control system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05233028A (en) * 1992-02-19 1993-09-10 Fuji Electric Co Ltd Data exchanging method for programmable controller
JPH07110803A (en) * 1993-10-13 1995-04-25 Nec Corp Single chip microcomputer
JP3862031B2 (en) * 1995-03-20 2006-12-27 株式会社ルネサステクノロジ Microprocessor
JP4850556B2 (en) * 2006-03-29 2012-01-11 三菱電機株式会社 Program creation support apparatus and method

Also Published As

Publication number Publication date
JP2017027539A (en) 2017-02-02

Similar Documents

Publication Publication Date Title
US8225064B2 (en) Storage region allocation system, storage region allocation method, and control apparatus
CN110750351B (en) Multi-core task scheduler, multi-core task scheduling method, multi-core task scheduling device and related products
JP6498557B2 (en) Programmable controller
JP2019020822A (en) Programmable controller
JP2004252960A (en) Memory controller
EP2829988B1 (en) Storage apparatus, and system and method for executing access operations
US9767054B2 (en) Data transfer control device and memory-containing device
JP7294912B2 (en) control system
US9627014B2 (en) Multiple port shared memory
JP5360594B2 (en) DMA transfer apparatus and method
US20100153610A1 (en) Bus arbiter and bus system
JP4765003B2 (en) Multiprocessor system
TWI442383B (en) Memory architecture for display device and control method thereof
JP6631063B2 (en) Electronic equipment
JP2017021573A (en) Multi-processor system
JPH09311812A (en) Microcomputer
KR20230119306A (en) Memory access method
JP4642398B2 (en) Shared bus arbitration system
JP2010262431A (en) Access method of and access control device for dual port memory
US9959221B2 (en) Semiconductor device, memory access control method, and semiconductor device system for determining random access or burst access as an access method for an external address set
JP6725970B2 (en) Multiprocessor system
JP4854598B2 (en) Data transfer control device
JP5720989B2 (en) Data processing device
JP2010049512A (en) High speed bus transfer system and programmable controller of multi-cpu configuration
CN117795494A (en) Processor and byte order conversion method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180104

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181030

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181031

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181130

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190312

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190313

R150 Certificate of patent or registration of utility model

Ref document number: 6498557

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150