JPS62190544A - Higher link unit for programmable controller - Google Patents

Higher link unit for programmable controller

Info

Publication number
JPS62190544A
JPS62190544A JP61032528A JP3252886A JPS62190544A JP S62190544 A JPS62190544 A JP S62190544A JP 61032528 A JP61032528 A JP 61032528A JP 3252886 A JP3252886 A JP 3252886A JP S62190544 A JPS62190544 A JP S62190544A
Authority
JP
Japan
Prior art keywords
data
command
link
upper link
host computer
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
JP61032528A
Other languages
Japanese (ja)
Inventor
Hideo Shimokawa
下川 日出男
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.)
Omron Corp
Original Assignee
Omron Tateisi Electronics Co
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 Omron Tateisi Electronics Co filed Critical Omron Tateisi Electronics Co
Priority to JP61032528A priority Critical patent/JPS62190544A/en
Publication of JPS62190544A publication Critical patent/JPS62190544A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Programmable Controllers (AREA)
  • Communication Control (AREA)

Abstract

PURPOSE:To quickly fetch the change of each data to simplify a communication program by transmitting prescribed data to the host side without waiting for a request command in case a higher link unit is set to the data link level. CONSTITUTION:In case a normal command is sent from a host computer 3, a higher link unit 2 accesses an input/output memory 15 of a PC body 1 and returns its contents to the computer 3. In case a data link start command is sent, the unit 2 is set to the data link level, and hereafter, channel data designated by a higher link instruction is returned to the computer 3 indepedently of the presence or the absence of commands from the computer each time when a higher link service is performed on the side of the PC body 1. At the time of a data link terminating command is sent, the level of the unit 2 is changed, and hereafter, the unit 2 waits for a command from the computer 3 to access the PC body 1.

Description

【発明の詳細な説明】 (発明の分野) この発明は、プログラマブル・コン1〜ローラの上位リ
ンクユニットに関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of the Invention) The present invention relates to an upper link unit of programmable controllers 1-roller.

(発明の概要) この発明では、この種の上位リンクユニットに対して、
新たにリンクレベルの1つとしてデータリンクレベルを
設けるとともに、上位リンクユニットがデータリンクレ
ベルに設定されている場合には、ホストコンピュータ側
からデータ要求コマンドが与えられるのを待つことなく
、プログラマブル・コントローラからHALTレディー
信号が与えられるたびに、同コントローラ側で設定され
た範囲のデータを読出し、これをホストコンピュータ側
へと送信するようにしたものである。
(Summary of the invention) In this invention, for this type of upper link unit,
In addition to establishing a data link level as one of the link levels, if the upper link unit is set to the data link level, the programmable controller Each time a HALT ready signal is given from the controller, data within a set range is read out from the controller and sent to the host computer.

(従来技術とその問題点) 従来、この種の上位リンクユニットにあっては、ポスト
コンピュータ側からデータ要求コマンドが到来するのを
情って、プログラマブル・コントローラの入出カメモリ
をアクセスし、要求された入出力データ等をホストコン
ピュータ側へと返送するようにしている。
(Prior art and its problems) Conventionally, in this type of upper link unit, upon receiving a data request command from the postcomputer side, it accesses the input/output memory of the programmable controller and processes the requested data. Input/output data, etc. are sent back to the host computer.

このため、入出カメモリのデータをホストコンピュータ
側へ伝送するためには、その都度ボス1〜コンピュータ
側から上位リンクユニットに対してデータ要求コマンド
を送るために余分の時間がかかり、また入出力データ等
の変化をボス1〜コンピユータ側に取込むタイミングか
、ホストコンピュータからのポーリングタイミングに依
存してしまい、データ変化を取込むのが遅れてしまうほ
か、ホストコンピュータの使用者側から見ても、通信プ
ログラムが複雑になるなどの問題点があった。
Therefore, in order to transmit the data in the input/output memory to the host computer side, it takes extra time to send a data request command from the boss 1 to the computer side to the upper link unit each time, and the input/output data etc. It depends on the timing of importing changes in data to the computer from the boss 1 or on the timing of polling from the host computer, which results in a delay in importing data changes, and from the perspective of the user of the host computer, communication There were problems such as the program becoming complicated.

(発明の目的) この発明の目的は、プログラマブル・コントローラの入
出力データ変化を高速に取込むのに適し、かつホストコ
ンピュータ側の通信プログラムを簡素化することが可能
なプログラマブル・コントローラの上位リンクユニット
を提供することにある。
(Object of the Invention) An object of the present invention is to provide an upper link unit of a programmable controller that is suitable for rapidly capturing input/output data changes of a programmable controller and that is capable of simplifying a communication program on the host computer side. Our goal is to provide the following.

(発明の構成と効果) この発明は上記の目的を達成するために、ホストコンピ
ュータから受信したコマンドに従って、リンクレベルを
データリンクレベルに設定または設定解除するリンクレ
ベル制御手段と、データリンクレベルに設定されている
ことを条件として、プログラマブル・コン]・ローラか
らHALTレディー信号が与えられるたびに、同コント
ローラ側で設定された範囲のデータを読出し、これをホ
ストコンピュータ側へ送信するデータリンク制御手段と
、 を具備することを特徴とするものである。
(Structure and Effect of the Invention) In order to achieve the above object, the present invention includes a link level control means for setting or canceling the setting of a link level to a data link level according to a command received from a host computer, and a link level control means for setting or canceling the setting of a link level to a data link level. data link control means for reading data in a range set on the controller side and transmitting it to the host computer side each time a HALT ready signal is given from the programmable controller roller. It is characterized by comprising the following.

このような構成によれば、予め上位リンクユニットに対
してデータリンクレベルへの設定用コマンドを送出した
後にあっては、プログラマブル・コントローラ側におけ
る上位リンクユニット用のサービス時間の到来とともに
、これに応答してHALTレディー信号が上位リンクユ
ニット側へ与えられるため、以後ホストコンピュータ側
から上位リンクユニットに対して何等伝送要求コマンド
を送らずとも、命令を1スキャン実行するたびに、実行
の結果得られた入出力のデータをホストコンピュータ側
へと直ちに伝送させることができ、この際実施例に示さ
れるようにユーザプログラム中に上位リンク命令を定義
すれば、ユーザ命令で特定されたデータのみを、かつプ
ログラムで指定された条件の状態に限り、ホストコンピ
ュータ側へと送信することが可能となる。
According to such a configuration, after sending a command for setting the data link level to the upper link unit in advance, the programmable controller side responds to the command when the service time for the upper link unit arrives. Since the HALT ready signal is then given to the upper link unit, the execution result is obtained every time the command is executed for one scan without the need to send any transmission request command from the host computer to the upper link unit. Input/output data can be immediately transmitted to the host computer side, and in this case, if an upper link instruction is defined in the user program as shown in the embodiment, only the data specified by the user instruction and the program It is possible to send data to the host computer only under the conditions specified in .

(実施例の説明) 第1図は、本発明に係る上位リンクユニットが適用され
たプログラマブル・コントローラシステムの構成を示す
ブロック図である。
(Description of Embodiments) FIG. 1 is a block diagram showing the configuration of a programmable controller system to which an upper link unit according to the present invention is applied.

同図に示す如く、PC本体1と上位リンクユニット2と
はシステムバス4を介して接続され、また上位リンクユ
ニット2とホストコンピュータ3とは、通信ライン5を
介して接続されている。
As shown in the figure, the PC main body 1 and the upper link unit 2 are connected via a system bus 4, and the upper link unit 2 and the host computer 3 are connected via a communication line 5.

PC本体1はよく知られているように、CPU10、シ
ステムプログラムメモリ11.入出力装置12.ユーザ
メモリ131.ワークメモリ14および入出カメモリ1
5を備えるほか、CPU  HALT制御回路16を内
蔵している。
As is well known, the PC body 1 includes a CPU 10, a system program memory 11. Input/output device 12. User memory 131. Work memory 14 and input/output memory 1
5 and also has a built-in CPU HALT control circuit 16.

CPU10は、システムプログラムメモリ11に格納さ
れたシステムプログラムに従って動作し、後述するよう
に入出力更新処理、命令実行処理。
The CPU 10 operates according to the system program stored in the system program memory 11, and performs input/output update processing and instruction execution processing as described later.

上位リンクサービス処理、ツールサービス処理等を順に
サイクリックに行なうようになされている。
Upper link service processing, tool service processing, etc. are performed cyclically in order.

入出力装置12は、外部入力機器(リミット・スイッチ
など)の出力を取込んだり、あるいは外部出力機器(リ
レーなど)に対して出力信号を送出するものである。
The input/output device 12 receives an output from an external input device (limit switch, etc.) or sends an output signal to an external output device (relay, etc.).

ユーザメモリ13は、ユーザが適宜作成したユーザプロ
グラムを格納するもので、この実施例ではラダー図に対
応してユーザプログラムが作成されている。
The user memory 13 stores user programs appropriately created by the user, and in this embodiment, the user programs are created in correspondence with a ladder diagram.

ワークメモリ14は、CPU10における演算の各種途
中結果等の記憶のために利用される。
The work memory 14 is used to store various intermediate results of calculations performed by the CPU 10.

入出カメモリ15には、入出力装置12の入出力点数に
対応した記憶エリアのはかに、補助リレーエリア、カウ
ンタエリア、タイマエリア、キープリレーエリア等の各
種記憶エリアが設けられており、この発明では入出カメ
モリ15の特定エリアのデータを上位リンクユニット2
を介して、ホストコンピュータ3側へと取込むことがで
きるようになされている。
The input/output memory 15 is provided with various storage areas such as a memory area corresponding to the number of input/output points of the input/output device 12, an auxiliary relay area, a counter area, a timer area, and a keep relay area. Now, the data in the specific area of the input/output memory 15 is transferred to the upper link unit 2.
The data can be imported to the host computer 3 via the .

上位リンクユニット2は、よく知られているように、C
PU20.システムプログラムメモリ21、ワークメモ
リ221通信用LSI23を備えている。
As is well known, the upper link unit 2 is C
PU20. It includes a system program memory 21, a work memory 221, and a communication LSI 23.

CPU20はマイクロプロセッサを主体として構成され
、システムプログラメモリ21に格納されたシステムプ
ログラムに従って動作する。
The CPU 20 is mainly composed of a microprocessor, and operates according to a system program stored in a system program memory 21.

ワークメモリ22は、CPU20で行なわれる各種演算
の途中結果等の記憶に利用される。
The work memory 22 is used to store intermediate results of various calculations performed by the CPU 20.

通信用LSI23は、ホストコンピュータ3からの受信
動作、ホストコンピュータ3に対する送信動作を行なう
ものである。
The communication LSI 23 performs a receiving operation from the host computer 3 and a transmitting operation to the host computer 3.

次に、第2図はPC本体の制御プログラムの構成を示す
フローチャート、第3図は上位リンクユニット2の制御
プログラムの構成を示すフローチャート、第4図はホス
トコンピュータ3の制御プログラムの構成を示すフロー
チャートであり、以下これらのフローチャー1・に従っ
て本実施例装置の動作を系統的に説明する。なお、各図
中斜線で示す部分が、本発明に関連して新たに追加され
た部分である。
Next, FIG. 2 is a flowchart showing the structure of the control program of the PC main body, FIG. 3 is a flowchart showing the structure of the control program of the upper link unit 2, and FIG. 4 is a flowchart showing the structure of the control program of the host computer 3. The operation of the apparatus of this embodiment will be systematically explained below according to flowchart 1. Note that the hatched portions in each figure are newly added portions related to the present invention.

まず、PC本体の制御プログラムについて説明する。第
2図において、電源投入などによりプログラムがスター
トされると、イニシャル処理として各種レジスタ、フラ
グ等の初期設定を行なった後(ステップ200)、上位
リンクサービス処理を行なう(ステップ201)。
First, the control program for the PC main body will be explained. In FIG. 2, when the program is started by power-on, etc., various registers, flags, etc. are initialized as initial processing (step 200), and then upper link service processing is performed (step 201).

この上位リンクサービス処理では、よく知られているよ
うにCPU  HALT制御回路16を介して上位リン
クユニット2のCPU20に対してトIALTレディー
信号を与え、上位リンクユニット2側からHALT指令
が返送されるのを持って、CPU10はHALT状態と
なり、システムバス4の占有を上位リンクユニット2の
CPU20側に明は渡す。
In this upper link service processing, as is well known, an IALT ready signal is given to the CPU 20 of the upper link unit 2 via the CPU HALT control circuit 16, and a HALT command is returned from the upper link unit 2 side. With this, the CPU 10 enters the HALT state and transfers occupation of the system bus 4 to the CPU 20 of the upper link unit 2.

後)ホするように、以後上位リンクユニット2のCPU
20はシステムバス4を使ってPC本体1側に対し各種
の処理を行ない、その終了とともにCPU  HALT
υI@回路16を介してPC本体1のCPLJIOに対
しHALT解除指令を返送する。
(After) From now on, the CPU of the upper link unit 2
20 uses the system bus 4 to perform various processing on the PC main body 1 side, and upon completion of the processing, the CPU HALT
A HALT release command is sent back to the CPLJIO of the PC body 1 via the υI@ circuit 16.

すると、PC本体1側のCPUl0はHALT状態を解
除され、これにより上位リンクサービス処理は終了する
Then, the CPU 10 on the PC main body 1 side is released from the HALT state, thereby ending the upper link service processing.

次いで、ツールサービス処理が行なわれ(ステップ20
2)、PC本体1に対してプログラムコンソール(図示
せず)が接続されていれば、当該装置のキーボードから
の信号に応じ、モニタ処理。
Tool service processing is then performed (step 20).
2) If a program console (not shown) is connected to the PC main body 1, monitor processing is performed in response to signals from the keyboard of the device.

プログラミング処理などの各種処理を行ない(ステップ
202>、処理終了とともに入出力更新処理へと移行す
る。
Various processing such as programming processing is performed (step 202>, and upon completion of the processing, the process shifts to input/output updating processing.

入出力更新処理では、よく知られているように、入出力
装置12の各入力状態を、入出カメモリ15の入カニリ
アへと転送するとともに、入出カメモリ15の出力デー
タを、入出力装置12から外部機器へと送出する(ステ
ップ203)。
In the input/output update process, as is well known, each input state of the input/output device 12 is transferred to the input canister of the input/output memory 15, and the output data of the input/output memory 15 is transferred from the input/output device 12 to an external device. The data is sent to the device (step 203).

次いで、RUNフラグがit 1 t+にセットされる
までの間(ステップ204否定)、入出力装置12の全
出力をオフさせたまま(ステップ205)、以上ステッ
プ201〜203の動作を繰り返す。
Next, until the RUN flag is set to it 1 t+ (No in step 204), all outputs of the input/output device 12 are kept off (step 205), and the operations in steps 201 to 203 are repeated.

これに対して、プログラミングコンソール(図示せず)
からの信号によって、RUNフラグが111 $1にセ
ットされると(ステップ204肯定)、命令実行動作へ
の移行が行なわれる。
In contrast, a programming console (not shown)
When the RUN flag is set to 111 $1 by a signal from 111 (Yes at step 204), a transition to an instruction execution operation is made.

この命令実行動作では、まずプログラムカウンタの値を
ユーザ命令の先頭アドレスにイニシャル設定させた後(
ステップ206) 、プログラムカウンタの値を+1ず
つ歩進させつつ(ステップ213)、プログラムカウン
タで指定される命令をユーザメモリ13から順次読出し
ては(ステップ207)、その内容を解読しくステップ
208)、解読結果に応じた命令実行処理を行なう(ス
テップ210,211,212>。
In this instruction execution operation, first the value of the program counter is initialized to the start address of the user instruction, and then (
Step 206), while incrementing the value of the program counter by 1 (step 213), sequentially read out the instructions specified by the program counter from the user memory 13 (step 207), and decode the contents (step 208); Instruction execution processing is performed according to the decoding result (steps 210, 211, 212>).

命令実行処理の詳細については、よく知られているよう
に、入出カメモリ15の入出力データ等を参照して、指
定された論理演算等を行ない、その演算結果で出力デー
タの内容を書替えるのが通例である。
Regarding the details of the instruction execution process, as is well known, it refers to the input/output data of the input/output memory 15, performs specified logical operations, etc., and rewrites the contents of the output data with the results of the operations. is customary.

ここで、本実施例では特に第6図に示されるように、ユ
ーザ命令中に新たな命令語である「上位リンク命令」を
定義する。「上位リンク命令」は、ラダーチャート方式
のプログラムの1応用命令として扱う。
Here, in this embodiment, as particularly shown in FIG. 6, a new command word "upper link command" is defined in the user command. The "upper link instruction" is treated as one application instruction of the ladder chart type program.

ユーザは「上位リンク命令」を使用する際には、データ
リンク確立リレー接点をロードする必要がある。この接
点は、システムが提供覆るリード・オンリーの特殊補助
リレーエリアに割イ」けられ、「データリンクレベル」
が確立しているとぎONするリレーである。従って、こ
の接点がONしていなければ、「上位リンク命令」が実
行されることはない。
The user needs to load the data link establishment relay contact when using the "upper link command". This contact is allocated to a read-only special auxiliary relay area provided by the system and is located at the data link level.
This is a relay that turns ON when it is established. Therefore, unless this contact is turned on, the "upper link command" will not be executed.

また「上位リンク命令」のオペランドは、先頭リンクチ
ャンネルと最終リンクチャンネルを指定する。ここには
、通常の入出力リレーエリアのはかに、データメモ1ハ
タイマ/カウンタの現在値エリア、リンクリレーエリア
、保持リレーエリア。
Further, the operand of the "upper link command" specifies the first link channel and the last link channel. This area includes the normal input/output relay area, data memo 1, timer/counter current value area, link relay area, and holding relay area.

特殊補助リレーエリアなどが設定できるものとする。It shall be possible to set special auxiliary relay areas, etc.

従って、第2図のフローチャートにおいて、ユーザプロ
グラム中から上位リンク命令が読出され(ステップ21
0肯定)、データリンク確立リレー接点がON状態であ
れば、上位リンク命令処理要求がセラ1〜される(ステ
ップ211)。
Therefore, in the flowchart of FIG. 2, the upper link instruction is read out from the user program (step 21).
If the data link establishment relay contact is in the ON state, an upper link command processing request is issued (step 211).

すなわち、データリンク確立リレー接点がON状態であ
れば二−モニツクHLNKに続いて記述された先頭、最
終リンクチャンネル情報がワークメモリ14の所定エリ
アに上位リンク命令処理要求としてセラ1−されるわけ
である。
That is, if the data link establishment relay contact is in the ON state, the first and last link channel information written following the second monitor HLNK is sent to a predetermined area of the work memory 14 as an upper link command processing request. be.

そして、このセットされた内容は、後述する如く上位リ
ンクユニット2側からPC本体1をアク     −セ
スした際に、どの範囲のデータをホストコンピュータ3
へと転送すべきかを示す参照情報となるのである。
The set contents determine which range of data is transmitted to the host computer 3 when the PC main body 1 is accessed from the host link unit 2 side, as described later.
This serves as reference information that indicates where to forward the data to.

このように、PC本体側では、命令実行動作中、上位リ
ンク命令が読出された場合、データリンク確立リレー接
点のON、OFF状態に応じて、上位リンク命令処理要
求がセットされることとなる。
In this way, on the PC main body side, when an upper link instruction is read during an instruction execution operation, an upper link instruction processing request is set depending on the ON/OFF state of the data link establishment relay contact.

次に、第3図を参照して、上位リンクユニット2の制御
プログラムについて説明1−る。
Next, referring to FIG. 3, the control program for the upper link unit 2 will be explained.

電源投入等によりプログラムがスタートすると、まずイ
ニシャル処理によって各種フラグ、レジスタ類の初期設
定を行なった後(ステップ30)、ホストコンビ五−夕
からのコマンド受信(ステップ31否定)、データリン
クレベルへの設定(ステップ32否定)を待機する状態
となる。
When the program starts by turning on the power, etc., it first initializes various flags and registers through initial processing (step 30), receives a command from the host combination Goto (step 31 is negative), and sets the data link level. It enters a state of waiting for setting (step 32 negative).

この状態において、ホストコンピュータ3側から通常コ
マンド、すなわち入出カメモリの特定データをホストコ
ンピュータ側へ返送すべきデータ要求コマンドが与えら
れると(ステップ31肯定)、以後上位リンクユニット
側ではPC本体1側からHALTレディー信号が到来す
るのを待機する状態となる(ステップ33)。
In this state, when a normal command, that is, a data request command to return specific data in the input/output memory to the host computer side, is given from the host computer 3 side (Yes at step 31), the upper link unit side then sends the data from the PC main body 1 side. It enters a state of waiting for the arrival of a HALT ready signal (step 33).

ここで、第2図で説明したように、上位リンクサービス
処理が開始された場合(ステップ201)、PC本体1
のCPLJIOからはCPU  HΔLTt5制御回路
16を介して、1−IALTレディー信号が到来するよ
うになされている。
Here, as explained in FIG. 2, when the upper link service process is started (step 201), the PC main body 1
A 1-IALT ready signal is received from CPLJIO via the CPU HΔLTt5 control circuit 16.

このようにしてHALTレディー信号が上位リンクユニ
ット2側へ到来すると、ただちにステップ3301以降
のHΔLTレディー割込処理が開始される。
When the HALT ready signal arrives at the upper link unit 2 side in this way, the HΔLT ready interrupt processing starting from step 3301 is immediately started.

この割込処理では、まず最初にPC本体1側にHALT
指令を発して、PC本体1のCPU 10をHALT状
態に設定しくステップ3301)、次いでデータリンク
レベルでないこと(ステップ3302否定)、処理すべ
きコマンドがあること(ステップ3303肖定)を確認
した後、データリンク開始コマンドでないことを条件と
して(ステップ3304否定)、通常コマンド処理を実
行する(ステップ3307)。
In this interrupt processing, first, HALT is sent to the PC main body 1 side.
After issuing a command to set the CPU 10 of the PC body 1 to the HALT state (Step 3301), and confirming that it is not at the data link level (Step 3302 negative) and that there is a command to be processed (Step 3303 Portrait). , and on the condition that it is not a data link start command (step 3304 negative), normal command processing is executed (step 3307).

この通常コマンド処理では、PC本体1の入出カメモリ
15から、通常コマンドで指定された入出力データを読
出し、これを上位リンクユニット2のワークメモリ22
に格納する。
In this normal command processing, the input/output data specified by the normal command is read from the input/output memory 15 of the PC main body 1, and is transferred to the work memory 22 of the upper link unit 2.
Store in.

その後、PC本体1に対してHALT解除指令を与え、
PC本体1のCPU10のHALT状態を解除させた後
(ステップ3308)、HALTレディー割込を終了す
る。
After that, give a HALT release command to the PC main body 1,
After releasing the HALT state of the CPU 10 of the PC main body 1 (step 3308), the HALT ready interrupt is ended.

次いで、レスポンス作成処理を実行して、ワークメモリ
22に格納された入出力データを、通信用LSI23を
介して、ホストコンピュータ3へと送信しくステップ3
4)、以後再びコンビュー夕からのコマンド待ち(ステ
ップ31否定)、データリンクレベルへの設定待ち(ス
テップ32否定)の状態となる。
Next, a response creation process is executed to transmit the input/output data stored in the work memory 22 to the host computer 3 via the communication LSI 23.Step 3
4) Thereafter, the system is again in a state of waiting for a command from the viewer (No in step 31) and waiting for setting to the data link level (No in step 32).

このように、ホストコンピュータ3側から通常コマンド
が受信された場合には、従来通り、コマンドで指定され
る入出力データをPC本体1の入出カメモリ15から読
出し、これを通信用LSI23を介してホストコンピュ
ータ3側へと返送する動作が行なわれる。
In this way, when a normal command is received from the host computer 3 side, the input/output data specified by the command is read from the input/output memory 15 of the PC body 1 and sent to the host computer via the communication LSI 23. An operation is performed to send the data back to the computer 3 side.

次に、ホストコンピュータ3側からデータリンク開始コ
マンドが与えられた場合(本発明の詳細な説明する。ま
ず前述と同様に、コンピュータからのコマンドが受信さ
れ(ステップ31肯定)、上位リンクサービス待ちとな
り(ステップ33)、HALTレディー信号が到来する
のを待って、HALTレディー割込が開始される。
Next, when a data link start command is given from the host computer 3 side (the present invention will be explained in detail), first, as described above, a command from the computer is received (Yes at step 31), and the host computer 3 waits for the upper link service. (Step 33), the HALT ready interrupt is started after waiting for the arrival of the HALT ready signal.

その後、PC本体へHALTレディー信号を発して、P
C本体1のCPU10をHALT状態に設定させた後(
ステップ3301) 、データリンクレベルでないこと
(ステップ3302否定)、コマンドかあること(ステ
ップ3303肯定)、データリンク開始コマンドである
こと(ステップ3304肯定)、PC本体1がRUN状
態であること(ステップ3305N定)を順に確認した
後、リンクレベルフラグをデータリンクレベルに設定変
更する(ステップ3306)。
After that, a HALT ready signal is sent to the PC, and P
After setting the CPU 10 of the C main body 1 to the HALT state (
Step 3301), the command is not at the data link level (step 3302 negative), a command exists (step 3303 affirmative), it is a data link start command (step 3304 affirmative), and the PC body 1 is in the RUN state (step 3305N). After checking the link level flag (step 3306), the link level flag is changed to the data link level (step 3306).

その後、PC本体のHALT状態を解除させた後(ステ
ップ3308) 、1−tALTレディー割込    
 −を終了して、データリンクレベル開始に必要な一連
の受付処理が終了した旨のレスポンスをホストコンピュ
ータ3に返送する(ステップ34)。
After that, after releasing the HALT state of the PC (step 3308), a 1-tALT ready interrupt is generated.
- is completed, and a response indicating that a series of reception processes necessary for starting the data link level has been completed is returned to the host computer 3 (step 34).

以後、上位リンクユニット2のCPLJ20では、リン
クレベルフラグの状態に基づき、データリンクレベルへ
の設定が確認され(ステップ32肯定)、以後PC本体
1における上位リンクサービス持もの状態になる(ステ
ップ33)。
Thereafter, in the CPLJ 20 of the upper link unit 2, the setting to the data link level is confirmed based on the state of the link level flag (Yes at step 32), and from then on, the PC body 1 becomes in a state where the upper link service is provided (step 33). .

そして、PC本体でユーザ命令を一巡実行するたびに、
上位リンクサービス処理が開始されると(ステップ20
1)、その都度上位リンクユニット2側ではHALTレ
ディー割込がかけられ、PC本体1に対してHALT指
令が与えられる(ステップ3301’)。
Then, each time the PC executes a round of user commands,
When the upper link service process starts (step 20
1) Each time, a HALT ready interrupt is generated on the upper link unit 2 side, and a HALT command is given to the PC main body 1 (step 3301').

この状態では、フラグの内容に基づきデータリンクレベ
ルであることが確認され(ステップ33021定)、そ
の後PC本体側で上位リンク命令処理要求がセットされ
ているかが確認される(ステップ3309)。
In this state, it is confirmed that it is at the data link level based on the contents of the flag (step 33021), and then it is confirmed whether an upper link instruction processing request is set on the PC main body side (step 3309).

ここで、前述した如く、本実施例ではユーザ命令中に新
たな命令語である上位リンク命令を定義し、その実行に
よって転送されるべきデータの開始および終了チャンネ
ルがワークメモリ14にセットされるようになされてい
る。
Here, as described above, in this embodiment, an upper link instruction, which is a new instruction word, is defined in the user instruction, and the start and end channels of the data to be transferred are set in the work memory 14 by its execution. is being done.

このため、ワークメモリ14の内容に基づいて、上位リ
ンク命令処理要求有りと判定されると(ステップ330
9肯定)、上位リンクユニット2側ではPC本体1の入
出カメモリ15から指定エリアのデータを読出し、これ
をワークメモリ22に格納するとともに、これに続いて
ワークメモリ14にセットされていた上位リンク命令処
理要求をクリアしくステップ3311)、PC本体のH
ALTを解除させた後(ステップ3308)、HALT
レディー割込を終了する。
Therefore, if it is determined that there is an upper link instruction processing request based on the contents of the work memory 14 (step 330
9 affirmative), the upper link unit 2 side reads the data in the specified area from the input/output memory 15 of the PC main body 1, stores it in the work memory 22, and subsequently reads the upper link command set in the work memory 14. To clear the processing request, step 3311), press H on the PC.
After releasing the ALT (step 3308), the HALT
End ready interrupt.

次いで、レスポンス作成処理では、PC本体1の入出カ
メモリ15から読出した入出力データを、通信用LSI
23を介して、ホストコンピュータ3側へと返送する。
Next, in the response creation process, the input/output data read from the input/output memory 15 of the PC body 1 is transferred to the communication LSI.
23, it is sent back to the host computer 3 side.

このように、ホストコンピュータ3側からデータリンク
開始コマンドが与えられ、これに基づいて上位リンクユ
ニット2がデータリンクレベルに設定された後にあって
は、その後ホストコンピュータ3から特に伝送要求コマ
ンドが与えられずとも、PC本体1側で上位リンクサー
ビス時間が到来するたびに、上位リンク命令で指定され
た入出力データの内容が、上位リンク命令の実行結果に
応じて、ホストコンピュータ3側へとその都度返送され
ることとなるのである。
In this way, after a data link start command is given from the host computer 3 side and the upper link unit 2 is set to the data link level based on this, a transmission request command is especially given from the host computer 3. Naturally, each time the upper link service time arrives on the PC main unit 1 side, the contents of the input/output data specified by the upper link command are transferred to the host computer 3 side each time according to the execution result of the upper link command. It will be sent back.

このため、ホストコンピュータ3側からデータリンク開
始コマンドを送り、上位リンクユニット2をデータリン
クレベルに設定しておきさえすれば、以後PC本体1の
入出カメモリ15内における各データの変化を、高速応
答性をもって、ホストコンピュータ3側に取込むことが
でき、その際にホス1−コンピュータ3側では特に通信
プログラムを複雑化することもないのである。
Therefore, once a data link start command is sent from the host computer 3 side and the upper link unit 2 is set to the data link level, changes in each data in the input/output memory 15 of the PC main body 1 can be handled with high speed response. The communication program can be imported into the host computer 3 side with ease, and the communication program on the host 1-computer 3 side does not have to be particularly complicated.

次に、ホスi・コンピュータ3側から、データリンク終
了コマンドが与えられた場合には、HALTレディー割
込処理において、データリンク終了コマンド有りとの判
定が行なわれ(ステップ3312)、その場合にはリン
クレベルはデータリンクレベルを設定解除され、コマン
ド処理レベルに設定変更される(ステップ3313)。
Next, when a data link end command is given from the host i/computer 3 side, it is determined in the HALT ready interrupt processing that there is a data link end command (step 3312); The link level is canceled from the data link level and set to the command processing level (step 3313).

そして、以後上位リンクユニット2では、ホストコンピ
ュータ3から与えられた通常コマンドに従って、PC本
体1に対しコマンドで指定された各種の処理を行なうこ
ととなる。
Thereafter, the upper link unit 2 will perform various processes specified by the commands on the PC body 1 in accordance with the normal commands given from the host computer 3.

次に、第4図のフローチャートを参照して、ホストコン
ピュータの制御プログラムについて説明する。ホストコ
ンピュータ側で、キーボード入力などによってPCデー
タの通常速度による続出が指令されると(ステップ40
1否定)、ホストコンピュータ3から上位リンクユニッ
ト2に対して通常コマンドの送出が行なわれる(ステッ
プ402)。
Next, the control program of the host computer will be explained with reference to the flowchart of FIG. When the host computer receives a command to continue outputting PC data at normal speed through keyboard input, etc. (step 40).
1 (No), a normal command is sent from the host computer 3 to the upper link unit 2 (step 402).

すると、前述した如く上位リンクユニット2側では、通
常コマンドを受けて、PC本体1から入出カメ七り15
の指定データの内容を読出し、これをポストコンピュー
タ3に対して返送する。
Then, as mentioned above, the upper link unit 2 side receives the normal command and operates the input/output camera 7 from the PC main body 1.
The contents of the designated data are read out and sent back to the postcomputer 3.

こうしてレスポンスが受信されると(ステップ403肯
定)、ホス1へコンピュータ3側では、返送された入出
力データに基づき、予めプログラムされたデータ処理を
行なうのである。
When the response is received in this way (step 403 affirmative), the computer 3 side of the host 1 performs preprogrammed data processing based on the returned input/output data.

例えば、PC本体1の入出カメモリ15のカウンタの計
数値を読出して、ライン上を流れる被加工材料の加工状
況を確認し、新たな加工指令を与えたりするのである(
ステップ404)。
For example, it reads the count value of the counter in the input/output memory 15 of the PC main body 1, checks the processing status of the workpiece material flowing on the line, and gives a new processing command (
Step 404).

これに対して、ホストコンピュータ3のキーボードから
、PCのデータを高速で続出すべき指令が与えられると
くステップ401肯定)、ホス1〜コンピユータ3から
上位リーンクユニット2に対してデータリンク開始コマ
ンドの送出が行なわれる(ステップ405)。
In response, if a command is given from the keyboard of the host computer 3 to send PC data one after another at high speed (step 401 is affirmative), a data link start command is sent from the host 1 to the computer 3 to the upper lean unit 2. is performed (step 405).

すると、前述した如く上位リンクユニット2側では、こ
のデータリンク開始コマンドに従って、リンクレベルを
データリンクレベルへと設定し、その後データリンクレ
ベルへの設定が完了した旨のレスポンスをホストコンピ
ュータ3に与える。
Then, as described above, the upper link unit 2 side sets the link level to the data link level in accordance with this data link start command, and then gives a response to the host computer 3 indicating that the setting to the data link level is completed.

すると、レスポンスが受信されたことに基づいて(ステ
ップ4064定)、データリンク開始の受付が行なわれ
たことをホストコンピュータ側で確認する(ステップ4
07)。
Then, based on the response being received (step 4064), the host computer side confirms that the data link start has been accepted (step 4064).
07).

以後、上位リンクユニット2からは、PC本体1でユー
ザ命令の一巡実行がなされるたびに、上位リンク命令で
指定された一連のデータが、ホストコンピュータ3側へ
と返送され(ステップ408否定、409肖定)、その
たびに高速レスポンスデータに対応した所定の処理が実
行されることとなる(ステップ410)。
Thereafter, each time the PC main unit 1 executes a user command, a series of data specified by the high-order link command is sent back to the host computer 3 from the high-order link unit 2 (steps 408 negative, 409 (step 410).

つまり、ホストコンピュータ3側において、PC本体1
の入出カメモリ15内のデータを、1スキヤンの遅れも
なく取込み、これに基づいたデータ処理を行なうことが
できるのである。
In other words, on the host computer 3 side, the PC main body 1
The data in the input/output memory 15 can be taken in without a delay of one scan, and data processing can be performed based on this data.

次に、ホストコンピュータ3のキーボードから、データ
リンク終了指令が与えられると(ステップ408肯定)
、ホストコンピュータ3から上位リンクユニット2に対
してデータリンク終了コマンドの送出が行なわれる(ス
テップ411)。
Next, when a data link termination command is given from the keyboard of the host computer 3 (step 408 affirmative)
, a data link termination command is sent from the host computer 3 to the upper link unit 2 (step 411).

すると、前述した如く、上位リンクユニット2側では、
データリンクレベルからコマンド処理レベルへのレベル
変更処理が行なわれた後、その旨のレスポンスが返送さ
れる。
Then, as mentioned above, on the upper link unit 2 side,
After the level change process from the data link level to the command processing level is performed, a response to that effect is returned.

このレスポンスがホストコンピュータ3側で受信される
と(ステップ412肖定)、データリンク終了の受付確
認が行なわれ(ステップ413肯定)、以後以上一連の
動作を繰り返し実行するわけである。
When this response is received on the host computer 3 side (step 412), acceptance of the end of the data link is confirmed (step 413 affirmative), and the series of operations described above is repeated.

以上第2図〜第4図のフローチャートで説明したように
、ホストコンピュータ3側から通常コマンドが送られた
場合、上位リンクユニット2側では従来通り、PC本体
1の入出カメモリ15をアクセスし、その内容をホスト
コンピュータ3側へと返送する。
As explained above using the flowcharts in FIGS. 2 to 4, when a normal command is sent from the host computer 3 side, the upper link unit 2 side accesses the input/output memory 15 of the PC body 1 as before, and The contents are sent back to the host computer 3 side.

これに対して、ホストコンピュータ3側からデータリン
ク6(l始コマンドが送られた場合、上位リンクユニッ
ト2側ではデータリンクレベルに設定され、以後ポスト
コンピュータ3からのコマンド有無にかかわりなく、P
C本体1側で上位リンクサービスが行なわれるたびに、
上位リンク命令で指定されるチャンネルのデータを、ホ
ストコンピュータ3側へと返送する。
On the other hand, when the data link 6 (l start command) is sent from the host computer 3 side, the upper link unit 2 side sets it to the data link level, and from then on, regardless of whether there is a command from the post computer 3, the P
Every time the upper link service is performed on the C main unit 1 side,
The data of the channel specified by the upper link command is sent back to the host computer 3 side.

また、ボストコンビ1−夕3からデータリンク終了コマ
ンドが送出された場合、上位リンクユニット2側ではコ
マンド処理レベルへのレベル変更が行なわれ、以後従来
通りホストコンピュータ3からのコマンドを待って、P
C本体1をアクセスすることとなるのである。
In addition, when a data link end command is sent from the host combination 1-3, the level is changed to the command processing level on the upper link unit 2 side, and from then on, it waits for a command from the host computer 3 as before, and then
This means that the C main body 1 will be accessed.

以上の動作を、第5図のタイムチャートにまとめて示す
こととする。
The above operations are collectively shown in the time chart of FIG.

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

第1図は本発明に係る上位リンクユニットが適用される
プログラマブル・コントローラシステムの構成を示すブ
ロック図、第2図はPC本体の制御プログラムを示ずフ
ローチャート、第3図は上位リンクユニツ1への制御プ
ログラムを示すフローチャート、第4図はホス1〜コン
ピユータの制御プログラムを示すフローチャート、第5
図はPC本体、上位リンクユニット、ホス1〜コンピユ
ータ相互の動作を関連付けて示すタイムチャート、第6
図は本発明で新たに定義された上位リンク命令の   
   −構成を示すラダー図である。 1・・・プログラマブル・コントローラ本体2・・・上
位リンクユニット 3・・・ホストコンピュータ
Fig. 1 is a block diagram showing the configuration of a programmable controller system to which the upper link unit according to the present invention is applied, Fig. 2 is a flowchart showing the control program of the PC main body, and Fig. 3 is a flowchart showing the control program for the upper link unit 1. Flowchart showing the program, FIG. 4 is a flowchart showing the control program of host 1 to computer,
The figure is a time chart showing the mutual operations of the PC main unit, upper link unit, host 1 to computer in relation to each other.
The figure shows the upper link instruction newly defined in this invention.
- It is a ladder diagram showing the configuration. 1...Programmable controller main body 2...Upper link unit 3...Host computer

Claims (1)

【特許請求の範囲】[Claims] (1)ホストコンピュータから受信したコマンドに従っ
て、リンクレベルをデータリンクレベルに設定または設
定解除するリンクレベル制御手段と、データリンクレベ
ルに設定されていることを条件として、プログラマブル
・コントローラからHALTレディー信号が与えられる
たびに、同コントローラ側で設定された範囲のデータを
読出し、これをホストコンピュータ側へ送信するデータ
リンク制御手段と、 を具備することを特徴とするプログラマブル・コントロ
ーラの上位リンクユニット。
(1) A link level control means for setting or canceling the setting of the link level to the data link level according to a command received from the host computer, and a HALT ready signal from the programmable controller on the condition that the link level is set to the data link level. An upper link unit of a programmable controller, comprising: data link control means for reading data in a range set on the controller side and transmitting it to the host computer side each time the data is given.
JP61032528A 1986-02-17 1986-02-17 Higher link unit for programmable controller Pending JPS62190544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61032528A JPS62190544A (en) 1986-02-17 1986-02-17 Higher link unit for programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61032528A JPS62190544A (en) 1986-02-17 1986-02-17 Higher link unit for programmable controller

Publications (1)

Publication Number Publication Date
JPS62190544A true JPS62190544A (en) 1987-08-20

Family

ID=12361444

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61032528A Pending JPS62190544A (en) 1986-02-17 1986-02-17 Higher link unit for programmable controller

Country Status (1)

Country Link
JP (1) JPS62190544A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01261706A (en) * 1988-04-13 1989-10-18 Yaskawa Electric Mfg Co Ltd Method for transferring data in programmable controller

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56146344A (en) * 1980-04-16 1981-11-13 Hitachi Ltd Terminal control device
JPS6079848A (en) * 1983-10-06 1985-05-07 Fujitsu Ltd High level procedure control system of communication control equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56146344A (en) * 1980-04-16 1981-11-13 Hitachi Ltd Terminal control device
JPS6079848A (en) * 1983-10-06 1985-05-07 Fujitsu Ltd High level procedure control system of communication control equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01261706A (en) * 1988-04-13 1989-10-18 Yaskawa Electric Mfg Co Ltd Method for transferring data in programmable controller

Similar Documents

Publication Publication Date Title
EP0458304A1 (en) Direct memory access transfer controller
US4095268A (en) System for stopping and restarting the operation of a data processor
JPS62190544A (en) Higher link unit for programmable controller
EP0376003A2 (en) Multiprocessing system with interprocessor communications facility
JP3139310B2 (en) Digital signal processor
JP2508038B2 (en) Programmable controller
JP2522412B2 (en) Communication method between programmable controller and input / output device
JP3168845B2 (en) Digital signal processor
JPH0357053A (en) Down load control system for communication processing device
JPH02730B2 (en)
JP3127737B2 (en) Digital signal processor
JP3227273B2 (en) Link processing method of programmable controller
JPS6022383B2 (en) input/output control device
JPH03225551A (en) Input and output device access control system
JPH05233525A (en) Input/otuput processor
JPS63191258A (en) Channel device
JPH01248264A (en) System for controlling contention of system bus
JPH09160786A (en) Microprocessor
JPS6336304A (en) Programmable controller system
JPH01184569A (en) Data transmission equipment
JPS5818032B2 (en) Communication control device
JPS5918733B2 (en) Data transmission/reception control device
JPH02133849A (en) Transfer process system for received data
JPS5939766B2 (en) multiplexer channel equipment
JPH03296105A (en) Information transfer method for programmable controller