JPH05119813A - Communication unit for programmable controller and its communication method - Google Patents

Communication unit for programmable controller and its communication method

Info

Publication number
JPH05119813A
JPH05119813A JP3279642A JP27964291A JPH05119813A JP H05119813 A JPH05119813 A JP H05119813A JP 3279642 A JP3279642 A JP 3279642A JP 27964291 A JP27964291 A JP 27964291A JP H05119813 A JPH05119813 A JP H05119813A
Authority
JP
Japan
Prior art keywords
registration
data
memory
transmission
request flag
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
JP3279642A
Other languages
Japanese (ja)
Inventor
Toshimitsu Asai
俊光 浅井
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP3279642A priority Critical patent/JPH05119813A/en
Publication of JPH05119813A publication Critical patent/JPH05119813A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)
  • Communication Control (AREA)

Abstract

PURPOSE:To improve operability, to simply generate a sequence program for transmission and to quickly execute a transmission processing by registering transmitting data and also, transmitting plural registered transmitting data by a single transmission request. CONSTITUTION:The communication unit 1 has a shared memory 2 capable of making access from a CPU unit for controlling the whole programmable controller and is provided with a function for transmitting designated data to the shared memory 2 by the CPU unit. Also, the unit is provided with a registration data memory 5 for registering transmitting data designated by the shared memory 2 and the shared memory 2 provided with at least a registered data designating memory 4 for storing registration No., registered data length and registered data, a registration request flag 41 for showing a registration request of transmitting data, a registration No. designating memory 6 for designating transmitting registered data and a registered data transmission request flag 61 for transmitting the registered data.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、CPUユニットから
アクセス可能な共用メモリを有し、CPUユニットによ
って共用メモリに指定されたデータを送信する機能を備
えたプログラマブルコントローラの通信ユニット及びそ
の通信方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a communication unit of a programmable controller having a shared memory accessible from a CPU unit and having a function of transmitting data designated by the CPU unit to the shared memory, and a communication method thereof. It is a thing.

【0002】[0002]

【従来の技術】図9は、プログラマブルコントローラの
周辺機器にデータを送信する場合におけるシステムの構
成例を示しており、図9において、10はプログラマブ
ルコントローラ全体を制御するCPUユニット、1はデ
ータを送信するための通信ユニット、2はCPUユニッ
ト10からアクセス可能な通信ユニット1の共用メモ
リ、11はデータを出力するための周辺機器、12は通
信ユニット1と周辺機器11を接続する通信ケーブルで
ある。
2. Description of the Related Art FIG. 9 shows an example of a system configuration in the case of transmitting data to a peripheral device of a programmable controller. In FIG. 9, 10 is a CPU unit for controlling the entire programmable controller, and 1 is data. 2 is a shared memory of the communication unit 1 accessible from the CPU unit 10, 11 is a peripheral device for outputting data, and 12 is a communication cable connecting the communication unit 1 and the peripheral device 11.

【0003】図10は、上記通信ユニット1内における
共用メモリ2のメモリ構成例を示しており、3は送信デ
ータメモリ、31は送信要求フラグである。
FIG. 10 shows an example of the memory configuration of the shared memory 2 in the communication unit 1, where 3 is a transmission data memory and 31 is a transmission request flag.

【0004】図11は、上記送信データメモリ3の構成
例を示しており、3aは送信データ長で、20文字分の
データを送信することを示す。3bは送信データで、1
組の「“ ”」で囲まれた1文字を表す文字コードが入
る。ここで、「“”」は空白文字(空白コード)、
「“↓”」は改行コードを各々表している。
FIG. 11 shows an example of the structure of the transmission data memory 3, in which 3a is a transmission data length and indicates that 20 characters of data are transmitted. 3b is transmission data, 1
A character code that represents one character enclosed by a pair of """is entered. Here, "" is a blank character (blank code),
““ ↓ ”represents a line feed code.

【0005】図12は、図9に示した周辺機器11がプ
リンタである場合を想定したときの出力例であり、10
aは出力端を示す枠で、上端及び左端の目盛りは1文字
分を示す。10bは行を示し、10cは列を示す。10
d1〜10d6は出力文字列が予め決まっている(固定
したデータ)例、10eは出力文字列が予め決まってい
ない(変化するデータ)例である。図13は、上記通信
ユニット1における送信処理の動作を示すフローチャー
トである。
FIG. 12 shows an output example assuming that the peripheral device 11 shown in FIG. 9 is a printer.
“A” is a frame indicating an output end, and the scales at the upper end and the left end indicate one character. 10b shows a row and 10c shows a column. 10
d1 to 10d6 are examples in which the output character string is predetermined (fixed data), and 10e are examples in which the output character string is not predetermined (changing data). FIG. 13 is a flowchart showing the operation of the transmission process in the communication unit 1.

【0006】次に、動作について説明する。図9に示す
如く構成されたプログラマブルコントローラのシステム
にあっては、CPUユニット10からプリンタ等の周辺
機器11へのデータ出力は、一旦周辺機器11との通信
機能を備えた通信ユニット1に対し出力するデータを送
り、通信ユニット1が通信ケーブル12を介して周辺機
器11にデータを送信することにより実行される。
Next, the operation will be described. In the programmable controller system configured as shown in FIG. 9, data output from the CPU unit 10 to the peripheral device 11 such as a printer is once output to the communication unit 1 having a communication function with the peripheral device 11. Is executed by the communication unit 1 transmitting the data to the peripheral device 11 via the communication cable 12.

【0007】CPUユニット10から送信データを、シ
ーケンスプログラムでアクセスできるデバイスメモリ
(図示せず)上に作成し、通信ユニット1における共用
メモリ2の送信データメモリ3に送信データ長3aと共
に送信データ3bを図11に示すように書き込む。図1
1に示した例では送信データ長3aは20文字、送信デ
ータ3bは先頭から「空白、空白、・・・、キ、ョ、
ウ、改行」である。
Transmission data is created from the CPU unit 10 on a device memory (not shown) that can be accessed by the sequence program, and the transmission data length 3a and the transmission data 3b are stored in the transmission data memory 3 of the shared memory 2 in the communication unit 1. Write as shown in FIG. Figure 1
In the example shown in FIG. 1, the transmission data length 3a is 20 characters, and the transmission data 3b is “blank, blank, ..., Ki, yo,
C, line break ".

【0008】次に、送信したいタイミングでシーケンス
プログラムにより通信ユニット1に送信要求フラグ31
をセットし送信要求を実行する。ここで、通信ユニット
1は図13のフローチャートに示す処理を実行する。通
信ユニット1は送信要求があるか否かを判断し(S
1)、送信要求を受け付けたと判断したときには、送信
データメモリ3の送信データ長3a及び送信データ3b
に対し取り込み送信に必要な内容のチェックを行う(S
2)。エラーがないと判断すれば、送信データ3bの先
頭から「空白、空白、・・・」の順に順次送信する(S
3)。反対に、エラーがあると判断するとエラー処理を
実行する(S4)。送信データ長3a分の20文字のデ
ータ送信が終了すると、通信ユニット1は、送信完了と
して送信要求フラグ31をリセットし送信要求を解除
(初期状態に戻す)する(S5)。通信ユニット1の送
信処理はこれで終了し、次の処理を行う。
Next, at the timing of transmission, the sequence program sends a transmission request flag 31 to the communication unit 1.
Is set and the transmission request is executed. Here, the communication unit 1 executes the processing shown in the flowchart of FIG. The communication unit 1 determines whether or not there is a transmission request (S
1) When it is determined that the transmission request is accepted, the transmission data length 3a and the transmission data 3b of the transmission data memory 3
Check the contents necessary for import transmission (S
2). If it is determined that there is no error, the transmission data 3b is sequentially transmitted from the beginning in the order of "blank, blank, ..." (S
3). On the contrary, if it is determined that there is an error, error processing is executed (S4). When the data transmission of 20 characters for the transmission data length 3a is completed, the communication unit 1 completes the transmission and resets the transmission request flag 31 to cancel the transmission request (return to the initial state) (S5). The transmission process of the communication unit 1 is now completed, and the next process is performed.

【0009】また、CPUユニット10は、これによっ
て通信ユニット1の送信処理が終了し、次の送信要求が
受け付け可能になったことを知る。続けて送信したいと
きは、CPUユニット10では送信要求フラグ31が初
期状態に戻ったのを確認後、次のデータを送信し、送信
データメモリ3にセットし送信要求をすることになる。
Further, the CPU unit 10 knows that the transmission process of the communication unit 1 is completed by this, and the next transmission request can be accepted. When it is desired to continue transmission, the CPU unit 10 confirms that the transmission request flag 31 has returned to the initial state, transmits the next data, sets it in the transmission data memory 3, and makes a transmission request.

【0010】例えば、プリンタに幾つかの数値の変化を
図12に示すような表にして出力する場合を考える。こ
の表の2行目を出力するための送信データの一例が図1
1に示した送信データ3bである。このように、1行分
を1回の送信データとして送信すればよい。しかし、1
行のデータが全く同じになる1・3・4・・行目、或い
は、7・9・11・・行目などは、シーケンスプログラ
ムでその都度同じデータをセットして送信することにな
る。例えば、6行目のデータを作成、セットして送信し
た後、7行目の罫線となるデータを作成し、セットして
送信する。次に、8行目のデータを作成、セットして送
信した後、9行目も7行目と同じ罫線となるデータを改
めて全て作成し、セットして送信する。10行目、11
行目も同様となる。但し、同一データの場合はデータの
作成は1回にして、デバイスメモリなどに格納しておく
ことはできるが、送信データメモリ3には、この格納し
たデータを全てセットしなければならない。
For example, let us consider a case in which some numerical value changes are output to a printer in a table as shown in FIG. An example of transmission data for outputting the second row of this table is shown in FIG.
It is the transmission data 3b shown in FIG. In this way, one line may be transmitted as one transmission data. But 1
For the 1st, 3rd, 4th, ... Lines, or the 7th, 9th, 11th, ... Lines in which the data of the lines are exactly the same, the same data is set and transmitted in each case by the sequence program. For example, after the data of the sixth line is created, set, and transmitted, the data forming the ruled line of the seventh line is created, set, and transmitted. Next, after creating, setting and transmitting the data of the 8th line, all the data having the same ruled lines as those of the 7th line in the 9th line are also newly created, set and transmitted. 10th line, 11
The same applies to the line. However, in the case of the same data, the data can be created once and stored in the device memory or the like, but all of the stored data must be set in the transmission data memory 3.

【0011】また、6・8・10行目のように1行のう
ちに同じ部分が何か所ある(パターンが同じ)場合も、
例えば、6行目と8行目と10行目は別のデータとして
1行分ずつ1回1回作成、セットして送信しなければな
らない。例えば、6行目であれば、予め10d1、10
d2、10d3・・・と順に並べて1行のデータを作成
し、セット、送信することになる。或いは、1行をパタ
ーンに合わせて幾つかに分割し、同一パターンはデバイ
スメモリなどに格納しておき、送信データは分割した文
字列単位で作成、セットして送信する、例えば、6行目
であれば10d1、10d2、10d3・・・と分割し
て、まず10d1をセットして送信、次に10d2をセ
ットして送信・・・と文字列単位での送信を繰り返す、
8・10行目など変化する文字列を含む場合も同様に文
字列単位での送信を繰り返す等の方法を実行していた。
Also, when there are some same parts in one line (same pattern) as in the sixth, eighth, tenth lines,
For example, the sixth line, the eighth line, and the tenth line must be created, set, and transmitted once for each line as separate data. For example, in the case of the 6th row, 10d1 and 10
One line of data is created in order of d2, 10d3, ..., Set, and transmitted. Alternatively, one line is divided into several parts according to the pattern, the same pattern is stored in the device memory, etc., and transmission data is created in units of divided character strings, set and transmitted. For example, in the 6th line If there is, it is divided into 10d1, 10d2, 10d3 ..., 10d1 is first set and transmitted, then 10d2 is set and transmitted ..., and transmission in character string units is repeated.
Even when the changing character strings such as the 8th and 10th lines are included, the method of repeating the transmission in the character string units is performed.

【0012】その他、この発明に関連する参考技術文献
として、例えば、特開昭63−131772号公報に開
示されている「ファクシミリ応答装置」、特開昭63−
284971号公報に開示されている「ファクシミリ装
置」、特開平2−153673号公報に開示されている
「ファクシミリ装置」がある。
In addition, as other reference technical documents related to the present invention, for example, "Facsimile response device" disclosed in Japanese Patent Laid-Open No. 63-131772, Japanese Patent Laid-Open No. 63-
There is a "facsimile device" disclosed in Japanese Patent No. 284971 and a "facsimile device" disclosed in Japanese Patent Application Laid-Open No. 2-153673.

【0013】[0013]

【発明が解決しようとする課題】従来の送信機能を備え
たプログラマブルコントローラの通信ユニットは以上の
ように共用メモリにおける指定エリアの送信データしか
送信できない構成なので、幾つかあるフォーマットのデ
ータを複数回も送信するような場合、送信する毎に送信
データを全てセットすることが必要であった。これは、
例えば、2・3種類の固定したデータ交互に送信する場
合も同様で毎回全てのデータをセットしなければならな
いので、操作性が著しく悪いという問題点があった。
Since the communication unit of the conventional programmable controller having the transmission function can transmit only the transmission data of the designated area in the shared memory as described above, the data of several formats can be transmitted a plurality of times. In the case of transmission, it was necessary to set all the transmission data for each transmission. this is,
For example, in the case of transmitting two or three types of fixed data alternately, all the data must be set every time, and there is a problem that the operability is extremely poor.

【0014】また、送信の都度、通信ユニットが受け付
け可能であるか否かをチェックして送信要求を実行する
必要があるため、周辺機器がプリンタやCRTであると
きなど同じデータを何回も送信する場合であっても、プ
ログラムが複雑になり、また、シーケンスプログラム全
体としての送信処理に時間がかかるという問題点もあっ
た。
In addition, since it is necessary to check whether or not the communication unit can accept each transmission and execute a transmission request, the same data is transmitted many times when the peripheral device is a printer or a CRT. However, even in such a case, there are problems that the program becomes complicated and that the transmission process as the whole sequence program takes time.

【0015】この発明は、上記のような問題点を解決す
るためになされたもので、送信データを登録し、また、
1回の送信要求にて複数の登録した送信データを送信す
ることにより、操作性を向上させ、送信用のシーケンス
プログラムを簡易に作成でき、また、シーケンスプログ
ラム全体としての送信処理を迅速に実行することができ
るプログラマブルコントローラの通信ユニット及びその
通信方法を得ることを目的とする。
The present invention has been made to solve the above-mentioned problems, and registers transmission data, and
By transmitting a plurality of registered transmission data with one transmission request, the operability is improved, a sequence program for transmission can be easily created, and the transmission process of the entire sequence program is executed quickly. An object of the present invention is to obtain a programmable controller communication unit and a communication method thereof.

【0016】[0016]

【課題を解決するための手段】この発明に係るプログラ
マブルコントローラの通信ユニットは、プログラマブル
コントローラ全体を制御するCPUユニットからアクセ
ス可能な共用メモリを有し、前記CPUユニットにより
前記共用メモリに指定されたデータを送信する機能を備
えたプログラマブルコントローラの通信ユニットにおい
て、前記共用メモリにより指定された送信データを登録
する登録データメモリと、前記共用メモリは、少なくと
も登録No.、登録データ長、登録データを格納する登
録データ指定メモリと、前記送信データの登録要求を示
す登録要求フラグと、送信する登録データを指定する登
録No.指定メモリと、前記登録データを送信する登録
データ送信要求フラグとを具備するものである。
A communication unit of a programmable controller according to the present invention has a shared memory accessible from a CPU unit that controls the entire programmable controller, and data designated by the CPU unit in the shared memory. In the communication unit of the programmable controller having a function of transmitting the registration data memory for registering the transmission data designated by the shared memory and the shared memory, at least the registration number. , A registration data length, a registration data designation memory for storing registration data, a registration request flag indicating a registration request for the transmission data, and a registration number for designating registration data to be transmitted. It is provided with a designated memory and a registration data transmission request flag for transmitting the registration data.

【0017】この発明に係るプログラマブルコントロー
ラの通信ユニットは、前記共用メモリが、前記CPUユ
ニットのシーケンスプログラムにより登録データを複数
指定でき、複数の登録された送信データを前記共用メモ
リの内容に従って順次送信することができるものであ
る。
In the communication unit of the programmable controller according to the present invention, the shared memory can specify a plurality of registration data by the sequence program of the CPU unit, and the plurality of registered transmission data are sequentially transmitted according to the contents of the shared memory. Is something that can be done.

【0018】この発明に係るプログラマブルコントロー
ラの通信ユニットの通信方法は、プログラマブルコント
ローラ全体を制御するCPUユニットからアクセス可能
な共用メモリを有し、前記CPUユニットにより前記共
用メモリに指定されたデータを送信する機能を備えたプ
ログラマブルコントローラの通信ユニットの通信方法に
おいて、登録要求フラグの有無を判断し、前記登録要求
フラグが有りのとき、登録データ指定メモリに格納され
ている登録No.、登録データ長、登録データをチェッ
クし、指定登録No.を登録データメモリへ登録し、前
記登録要求フラグを解除した後、登録データ送信要求フ
ラグの有無を判断し、前記登録データ送信要求フラグが
有りのとき、登録No.指定メモリの登録No.をチェ
ックし、エラーがないとき、指定登録No.の登録デー
タを送信し、前記登録データ送信要求フラグを解除する
ものである。
A communication method of a communication unit of a programmable controller according to the present invention has a shared memory accessible from a CPU unit that controls the entire programmable controller, and transmits data designated by the CPU unit to the shared memory. In a communication method of a communication unit of a programmable controller having a function, it is determined whether or not a registration request flag is present, and when the registration request flag is present, the registration No. stored in the registration data designation memory is stored. Check the registration data length, registration data, and specify the registration number. Is registered in the registration data memory, the registration request flag is released, and then the presence or absence of the registration data transmission request flag is determined. When the registration data transmission request flag is present, the registration No. Registration No. of specified memory If there is no error, the designated registration No. is checked. Registration data is transmitted and the registration data transmission request flag is cleared.

【0019】この発明に係るプログラマブルコントロー
ラの通信ユニットの通信方法は、プログラマブルコント
ローラ全体を制御するCPUユニットからアクセス可能
な共用メモリを有し、前記CPUユニットにより前記共
用メモリに指定されたデータを送信する機能を備えたプ
ログラマブルコントローラの通信ユニットの通信方法に
おいて、登録要求フラグの有無を判断し、前記登録要求
フラグが有りのとき、登録データ指定メモリに格納され
ている登録No.、登録データ長、登録データをチェッ
クし、指定登録No.を登録データメモリへ登録し、前
記登録要求フラグを解除した後、登録データ送信要求フ
ラグの有無を判断し、前記登録データ送信要求フラグが
有りのとき、カウンタに1をセットし、登録No.指定
メモリのN番目の登録No.をチェックし、エラーがな
いとき、前記登録No.指定メモリのN番目の登録N
o.の登録データを送信し、−1のとき前記登録データ
送信要求フラグを解除するものである。
A communication method of a communication unit of a programmable controller according to the present invention has a shared memory accessible from a CPU unit that controls the entire programmable controller, and transmits data designated by the CPU unit to the shared memory. In a communication method of a communication unit of a programmable controller having a function, it is determined whether or not a registration request flag is present, and when the registration request flag is present, the registration No. stored in the registration data designation memory is stored. Check the registration data length, registration data, and specify the registration number. Is registered in the registration data memory, the registration request flag is released, and then the presence or absence of the registration data transmission request flag is determined. When the registration data transmission request flag is present, the counter is set to 1 and the registration No. Nth registration number of the designated memory. If there is no error, the registration number. Nth registration N in the specified memory
o. The registration data transmission request flag is canceled and the registration data transmission request flag is canceled when the registration data is -1.

【0020】[0020]

【作用】この発明におけるプログラマブルコントローラ
の通信ユニット及びその通信方法は、CPUユニットの
シーケンスプログラムによって指定された複数の送信デ
ータを内部メモリに登録No.と共に登録(格納)する
ことが可能であり、既に登録されたデータを送信するに
は、送信データの代わりに送信したい登録データの登録
No.を指定して送信要求を行う。
In the communication unit of the programmable controller and the communication method thereof according to the present invention, a plurality of transmission data designated by the sequence program of the CPU unit are registered in the internal memory. It is possible to register (store) with, and to send the already registered data, the registration No. of the registration data to be transmitted is sent instead of the transmission data. Is specified and a transmission request is made.

【0021】また、この発明におけるプログラマブルコ
ントローラの通信ユニット及びその通信方法は、送信す
る登録データを複数指定することが可能で、登録No.
を複数指定しておき、1回の送信要求において複数の登
録データを指定した順に全て送信する。
Further, in the communication unit of the programmable controller and the communication method thereof according to the present invention, a plurality of registration data to be transmitted can be designated.
Are designated in advance, and a plurality of registration data are all transmitted in the designated order in one transmission request.

【0022】[0022]

【実施例】以下、この発明の一実施例を図について説明
する。図1は、通信ユニットのメモリ構成を示すブロッ
ク図であり、1は通信ユニット、2は共用メモリ、3は
送信データメモリ、31は送信要求フラグ、4は登録デ
ータ指定メモリ、41は登録要求フラグ、5は登録デー
タを格納する登録データメモリ、6は送信する登録デー
タを指定する登録No.指定メモリ、61は登録データ
送信要求フラグ、100は通信ユニット1全体を制御す
る制御手段である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a memory configuration of a communication unit. 1 is a communication unit, 2 is a shared memory, 3 is a transmission data memory, 31 is a transmission request flag, 4 is a registration data designation memory, 41 is a registration request flag. 5 is a registration data memory for storing registration data, and 6 is a registration number for specifying registration data to be transmitted. A designated memory, 61 is a registration data transmission request flag, and 100 is a control means for controlling the entire communication unit 1.

【0023】図2は、共有メモリ2の各部(送信データ
メモリ3、送信要求フラグ31、登録データ指定メモリ
4、登録要求フラグ41、登録No.指定メモリ6、登
録データ送信要求フラグ61)に対するソフトウェア的
制御を実行する制御手段100内における各手段を示し
ている。101は共用メモリ2にセットされた送信デー
タを周辺機器11に送信する手段、102はCPUユニ
ット10のシーケンスプログラムからの送信要求フラグ
31を受け付ける手段、103はCPUユニット10に
送信完了を知らせるための送信要求フラグ31を解除す
る手段、104は共用メモリ2にセットされた送信デー
タを登録データメモリ5に格納する手段、105はCP
Uユニット10のシーケンスプログラムから登録要求フ
ラグ41を受け付ける手段、106はCPUユニット1
0に登録完了を知らせるための登録要求フラグ41を解
除する手段、107は共用メモリ2に登録された登録デ
ータを登録No.指定メモリ6に従って送信する手段、
108はCPUユニット10のシーケンスプログラムか
ら登録データ送信要求フラグ61を受け付ける手段、1
09はCPUユニット10に登録データ送信完了を知ら
せるための登録データ送信要求フラグ61を解除する手
段である。
2 shows software for each part of the shared memory 2 (transmission data memory 3, transmission request flag 31, registration data designation memory 4, registration request flag 41, registration number designation memory 6, registration data transmission request flag 61). The respective means in the control means 100 for executing the dynamic control are shown. 101 is means for transmitting the transmission data set in the shared memory 2 to the peripheral device 11, 102 is means for accepting the transmission request flag 31 from the sequence program of the CPU unit 10, and 103 is for notifying the CPU unit 10 of completion of transmission. Means for clearing the transmission request flag 31, 104 for storing the transmission data set in the shared memory 2 in the registered data memory 5, 105 for CP
Means for accepting the registration request flag 41 from the sequence program of the U unit 10, 106 is the CPU unit 1
0 is a means for canceling the registration request flag 41 for notifying the registration completion to the registration data registered in the shared memory 2. Means for transmitting according to the designated memory 6,
Reference numeral 108 denotes a means for receiving the registration data transmission request flag 61 from the sequence program of the CPU unit 10, 1
Reference numeral 09 is means for canceling the registration data transmission request flag 61 for notifying the CPU unit 10 that registration data transmission has been completed.

【0024】図3は、上記登録データ指定メモリ4のメ
モリ構成を示す例であり、4aは登録No.、4bは登
録データ長、4cは登録データである。図4は、上記登
録データメモリ5のメモリ構成を示す例であり、501
a、501bで登録No.1のデータを示す。501a
は登録No.1の登録データ長、501bは登録No.
1の登録データである。同様に、502a、502bは
登録No.2のデータを示し、登録No.mまで、即
ち、m個の登録が可能である。
FIG. 3 shows an example of the memory configuration of the registration data designating memory 4, 4a being the registration number. Reference numeral 4b is the registration data length, and 4c is the registration data. FIG. 4 shows an example of the memory configuration of the registration data memory 5, 501
a and 501b, registration No. 1 shows the data. 501a
Is the registration number. The registration data length of No. 1 and 501b is the registration number.
It is the registration data of 1. Similarly, 502a and 502b are registration numbers. 2 shows the data of registration No. Up to m, that is, m registrations are possible.

【0025】図5は、上記登録No.指定メモリ6のメ
モリ構成を示す例である。(a)は1個の登録No.を
指定することができ、(b)は複数個の登録No.を指
定することができる。図6は、通信ユニット1における
登録処理の動作を示すフローチャートである。図7、図
8は、通信ユニット1における登録送信処理の動作を示
すフローチャートである。ここで、図7は、図5(a)
の場合の登録送信処理であり、図8は、図5(b)の場
合の登録送信処理である。
FIG. 5 shows the registration number. It is an example showing a memory configuration of the designated memory 6. (A) shows one registration number. (B) shows a plurality of registration numbers. Can be specified. FIG. 6 is a flowchart showing the operation of the registration process in the communication unit 1. 7 and 8 are flowcharts showing the operation of the registration transmission process in the communication unit 1. Here, FIG. 7 shows FIG.
8 is the registration transmission process in the case of FIG. 5, and FIG. 8 is the registration transmission process in the case of FIG.

【0026】次に、動作について説明する。まず、登録
から述べる。CPUユニット10から登録データをシー
ケンスプログラムで、アクセスできるデバイスメモリ
(図示せず)上に作成し、通信ユニット1における共用
メモリ2の登録データ指定メモリ4に登録No.4a及
び登録データ長4bと共に登録データ4cを図3に示す
ように書き込む。図3の例にあっては、登録No.4a
は2、登録データ長4bは3文字、登録データ4cは
「空白、空白|(縦の罫線)」である。次に、登録した
いタイミングでシーケンスプログラムにより通信ユニッ
ト1に登録要求のフラグ41をセットし登録要求する。
Next, the operation will be described. First, registration will be described. Registration data is created from the CPU unit 10 on a device memory (not shown) that can be accessed by the sequence program, and the registration data is registered in the registration data designation memory 4 of the shared memory 2 in the communication unit 1. The registration data 4c is written together with 4a and the registration data length 4b as shown in FIG. In the example of FIG. 4a
Is 2, the registered data length 4b is 3 characters, and the registered data 4c is “blank, blank | (vertical ruled line)”. Next, the registration request flag 41 is set in the communication unit 1 by the sequence program at the timing of registration, and a registration request is made.

【0027】ここで、通信ユニット1は、図6に示した
フローチャートに示す処理を行う。通信ユニット1は登
録要求があるか否かを判断し(S10)、登録要求を受
け付けると、登録データ指定メモリ4の登録No.4a
及び登録データ長4b、登録データ4cを取り込み登録
に必要なチェックを行う(S11)。エラーがないと判
断したときは、指定登録No.を登録データメモリ5に
登録する(S12)。反対に、エラーがあると判断した
ときはエラー処理を実行する(S13)。登録データメ
モリ5への登録は、登録No.4aの値をn’(図3の
場合、n’は2)とすると、登録データメモリ5のn’
番目の登録データ長50n’a(図4の場合、502
a)に登録データ長4bを登録データ50n’b(図4
の場合、502b)に登録データ4cを転送して行う。
これで登録が終了し、通信ユニット1は登録完了として
登録要求フラグ41をリセットし登録要求を解除(初期
状態に戻す)する(S14)。通信ユニット1の登録処
理はこれで終了し、次の処理を行う。
Here, the communication unit 1 performs the processing shown in the flowchart of FIG. The communication unit 1 determines whether or not there is a registration request (S10), and when the registration request is accepted, the registration number of the registration data designation memory 4 is determined. 4a
Then, the registration data length 4b and the registration data 4c are fetched and the check necessary for registration is performed (S11). When it is determined that there is no error, the designated registration number. Is registered in the registration data memory 5 (S12). On the contrary, if it is determined that there is an error, error processing is executed (S13). Registration to the registration data memory 5 is performed by registering the registration number. When the value of 4a is n '(n' is 2 in FIG. 3), n'of the registered data memory 5 is
The fifth registration data length 50n'a (502 in FIG. 4)
The registration data length 4b is added to the registration data 50n'b in FIG.
In this case, the registration data 4c is transferred to 502b).
With this, the registration is completed, and the communication unit 1 resets the registration request flag 41 to complete the registration and cancels the registration request (returns to the initial state) (S14). The registration process of the communication unit 1 is completed, and the following process is performed.

【0028】また、CPUユニット10は、これによっ
て通信ユニット1の登録処理が終了し、次の登録要求が
受け付け可能になったことを知る。続けて登録したいと
きは、CPUユニット10では登録要求フラグ41が初
期状態に戻ったのを確認後、次のデータを登録データ指
定メモリ4にセットし登録要求をすることになる。
Further, the CPU unit 10 knows that the registration process of the communication unit 1 is completed and the next registration request can be accepted. When the user wants to continue registering, the CPU unit 10 confirms that the registration request flag 41 has returned to the initial state, and then sets the next data in the registration data designation memory 4 to make a registration request.

【0029】次に、登録したデータの送信について述べ
る。CPUユニット10からシーケンスプログラムで通
信ユニット1の共用メモリ2の登録No.指定メモリ6
に登録No.を図5(a)に示すように書き込む。図5
(a)の例では登録No.は2である。次に、送信した
いタイミングでシーケンスプログラムによって通信ユニ
ット1に登録データ送信要求フラグ61をセットし登録
送信要求をする。ここで、通信ユニット1は、図7のフ
ローチャートに示す処理を行う。通信ユニット1は登録
送信要求ありか否かを判断し(S21)、登録送信要求
を受け付けると、登録No.指定メモリ6の登録No.
を取り込み登録No.のチェックを行う(S22)。エ
ラーがないと判断したときは、登録データを送信する送
信処理を行う(S23)。具体的には登録No.指定メ
モリ6で指定された値をn’とすると(図5(a)の場
合、n’は2)登録データメモリ5のn’番目の登録デ
ータ50n’b(図4の場合、502b)のデータから
登録データ長50n’a(図4の場合、502a)にセ
ットされた文字数分のデータを先頭から順次送信する
(図3の場合は、先頭から「空白、空白、|」の3文字
を送信)。送信し終わったら通信ユニット1は登録完了
として登録データ送信要求フラグ61をリセットし登録
送信要求を解除(初期状態に戻す)する(S25)。通
信ユニット1の登録送信処理はこれで終了し、次の処理
を行う。また、ステップS22においてエラーがあると
判断したときには、エラー処理を実行する(S24)。
Next, the transmission of registered data will be described. The registration number of the shared memory 2 of the communication unit 1 is registered by the sequence program from the CPU unit 10. Designated memory 6
Registration No. Is written as shown in FIG. Figure 5
In the example of (a), the registration number. Is 2. Next, the registration program transmission request flag 61 is set in the communication unit 1 by the sequence program at the timing of transmission, and a registration transmission request is issued. Here, the communication unit 1 performs the process shown in the flowchart of FIG. The communication unit 1 determines whether there is a registration transmission request (S21), and when the registration transmission request is accepted, the registration number. Registration No. of the designated memory 6
Import registration number. Is checked (S22). If it is determined that there is no error, a transmission process for transmitting registration data is performed (S23). Specifically, the registration number. If the value designated in the designated memory 6 is n ′ (n ′ is 2 in the case of FIG. 5A), the n′-th registration data 50n′b (502b in FIG. 4) of the registration data memory 5 Data corresponding to the number of characters set to the registered data length 50n'a (502a in FIG. 4) is sequentially transmitted from the data from the beginning (in the case of FIG. 3, the three characters "blank, blank, |" Send). When the transmission is completed, the communication unit 1 determines that the registration is completed, resets the registration data transmission request flag 61, and cancels the registration transmission request (returns to the initial state) (S25). The registration / transmission processing of the communication unit 1 is completed, and the following processing is performed. If it is determined in step S22 that there is an error, error processing is executed (S24).

【0030】また、CPUユニット10は、これによっ
て通信ユニット1の登録送信処理が終了し、次の登録送
信要求が受け付け可能になったことを知る。続けて登録
データを送信したいときは、CPUユニット10では登
録データ送信要求フラグ61が初期状態に戻ったのを確
認後、次の登録No.を登録No.指定メモリ6にセッ
トし登録送信要求をすることになる。
Further, the CPU unit 10 knows that the registration transmission process of the communication unit 1 is completed by this, and the next registration transmission request can be accepted. When it is desired to continuously transmit the registration data, the CPU unit 10 confirms that the registration data transmission request flag 61 has returned to the initial state, and then the next registration number. Register No. It is set in the designated memory 6 and a registration transmission request is made.

【0031】次に、この発明の第2の実施例を図につい
て説明する。図5は、登録No.指定メモリ6のメモリ
構成例であり、(b)は601から60nまでn個のエ
リアから構成されているが、登録No.の終了を示す終
了コードを付加するため、最大n−1個の複数の登録N
o.を指定することができる。図8は通信ユニット1の
登録送信処理の動作フローチャートであり、図5(b)
の場合における登録送信処理である。
Next, a second embodiment of the present invention will be described with reference to the drawings. 5 shows the registration number. It is a memory configuration example of the designated memory 6, and (b) is composed of n areas 601 to 60n. Since an end code indicating the end of N is added, a maximum of n-1 multiple registered N
o. Can be specified. FIG. 8 is an operation flowchart of the registration transmission process of the communication unit 1, and FIG.
This is the registration transmission process in the case of.

【0032】次に、動作について説明する。第2の実施
例の登録送信処理において、登録No.指定メモリ6
は、図5(b)に示すように構成されているので、登録
No.は最大n−1個までセットすることができる。送
信したいデータが登録されている登録No.を登録N
o.指定メモリ6の601から送信する順番にセットす
る。このとき、最終の登録No.の次に登録No.終了
を示す最終コードを付加する。図5(b)の例では60
6の「−1」である。このように、CPUユニット10
からシーケンスプログラムで登録No.指定メモリ6に
セットした後、送信したいタイミングでシーケンスプロ
グラムによって通信ユニット1に登録データ送信要求フ
ラグ61をセットし登録送信要求をする。
Next, the operation will be described. In the registration transmission process of the second embodiment, the registration No. Designated memory 6
Is configured as shown in FIG. Can be set up to n-1. Registration No. in which the data you want to send is registered. Register N
o. The items are set in the order of transmission from 601 of the designated memory 6. At this time, the final registration No. Next to the registration number. A final code indicating the end is added. In the example of FIG. 5B, 60
6 is "-1". In this way, the CPU unit 10
Registration No. from the sequence program After setting in the designated memory 6, the registration data transmission request flag 61 is set in the communication unit 1 by the sequence program at the timing of transmission and a registration transmission request is issued.

【0033】ここで、通信ユニット1は図8のフローチ
ャートに示す処理を行う。ここでカウンタNは登録N
o.指定メモリ6の何番目の登録No.を実行している
かをカウントしている。通信ユニット1は登録送信要求
があるか否かを判断し(S31)、登録送信要求を受け
付けると、まずカウンタNに1をセットし(S32)、
登録No.指定メモリ6の601の登録No.を取り込
み、登録No.のチェックを行う(S33)。「−1」
であれば、これで終了なので登録送信完了として登録デ
ータ送信要求フラグ61をリセットし登録送信要求を解
除(初期状態に戻す)する(S34)。また、エラーで
なければ(エラーの場合はエラー処理を実行する(S3
7))、登録データメモリ5から登録No.指定メモリ
601の示すNo.、N(図5(b)の場合、Nは1)
の登録データ50Nb(図4の場合、501b)のデー
タから登録データ長50Na(図4の場合、501a)
にセットされた文字数分のデータを先頭から順次送信す
る(S35)。送信し終わったらNに+1してN=2と
し(S36)、次の登録No.指定メモリ6の602の
登録No.をチェックし、正常であれば602の示す登
録No.の登録データを送信する。
Here, the communication unit 1 performs the processing shown in the flowchart of FIG. Here, the counter N is the registration N
o. The registration number of the designated memory 6 Is counting what is running. The communication unit 1 determines whether or not there is a registration transmission request (S31), and when the registration transmission request is accepted, first, the counter N is set to 1 (S32),
Registration No. Registration No. of 601 of the designated memory 6 The registration number. Is checked (S33). "-1"
If this is the case, the registration data transmission request flag 61 is reset and the registration transmission request is canceled (returned to the initial state) since the registration transmission is completed (S34). If it is not an error (if it is an error, error processing is executed (S3
7)), from the registration data memory 5 to the registration number. No. indicated by the designated memory 601. , N (in the case of FIG. 5B, N is 1)
Registration data length 50Na (501a in FIG. 4) from registration data 50Nb (501b in FIG. 4) data
The data for the number of characters set in is sequentially transmitted from the beginning (S35). When the transmission is completed, +1 is added to N to set N = 2 (S36), and the next registration number. Registration No. of 602 of the designated memory 6 Is checked, and if it is normal, the registration No. indicated by 602 is displayed. Send the registration data of.

【0034】こうして、601→602→・・・と登録
データを送信し、登録No.が−1になるまで登録N
o.指定メモリ6における登録No.の示す登録データ
を送信する。登録No.が−1になったら登録送信完了
とする。通信ユニット1の登録送信処理はこれで終了
し、次の処理を行う。また、CPUユニット10は、こ
れによって通信ユニット1の処理が終了し、次の登録送
信要求が受け付け可能になったことを知る。続けて登録
データを送信したいときは、CPUユニット10では登
録データ送信要求フラグ61が初期状態に戻ったのを確
認後、次の登録No.を必要個数分登録No.指定メモ
リ6にセットし登録送信要求をすることになる。
In this way, the registration data is transmitted as 601 → 602 →, and the registration number. Registration N until becomes -1
o. Registration No. in the designated memory 6 The registration data indicated by is transmitted. Registration No. When becomes -1, registration and transmission is completed. The registration / transmission processing of the communication unit 1 is completed, and the following processing is performed. Further, the CPU unit 10 knows that the processing of the communication unit 1 is completed by this, and the next registration transmission request can be accepted. When it is desired to continuously transmit the registration data, the CPU unit 10 confirms that the registration data transmission request flag 61 has returned to the initial state, and then the next registration number. Register the required number of registration numbers. It is set in the designated memory 6 and a registration transmission request is made.

【0035】例えば、プリンタに幾つかの数値の変化を
図12のような表にして出力する場合を考える。1行分
を1回の送信データとして送信する場合、1行の文字列
が予め決まっている行を登録しておく。1行のデータが
全く同じになる1・3・4・・行目、或いは、7・9・
11・・行目などは、それぞれ1行分を登録すれば良
い。実際に送信するときは、登録No.指定メモリ6に
同じ登録No.を繰り返しセットし、まとめて登録送信
要求を出せばよい。例えば、1行目のデータが登録N
o.1に、2行目のデータが登録No.2に、5行目の
データが登録No.3に登録されている場合、登録N
o.指定メモリ6には「1、2、1、1、3、−1」と
セットするだけでよい。
For example, let us consider a case in which some numerical value changes are output to the printer as a table as shown in FIG. When transmitting one line as one transmission data, the line in which the character string of one line is predetermined is registered. 1st, 3rd, 4th, or 1st, 3rd, 4th, ...
For the 11th line and the like, it is sufficient to register one line each. When actually sending, the registration number. The same registration number in the designated memory 6 Repeatedly set, and issue a registration transmission request collectively. For example, the data in the first row is the registration N
o. The data in the second line is the registration number. The data of the 5th line is registered No. 2 and No. 2. If registered in 3, register N
o. It is sufficient to set "1, 2, 1, 1, 3, -1" in the designated memory 6.

【0036】また、1行のうちに同じ部分が何か所ある
(パターンが同じ)6行目のようなデータを送信する場
合、10d1、10d2・・・と分割して登録しておけ
ば登録No.指定メモリ6に「10d1、10d2、1
0d3、10d4、10d3・・・」と登録No.を並
べて、同じ文字列は同じ登録No.を指定して登録送信
要求をすればよい。また、8・10行目のように変化す
る文字列を含む場合は、固定データは登録しておき登録
No.の指定で送信し、変化するデータは従来の送信デ
ータメモリ3を使用して従来の送信方法で送信する、と
いうように送信方法を組み合わせて使用する。このよう
にして、同じデータを何回もセットする必要なく送信す
ることができる。
When data such as the 6th line in which the same portion is present in one line (the pattern is the same) is to be transmitted, if the data is divided into 10d1, 10d2, ... No. In the designated memory 6, "10d1, 10d2, 1
0d3, 10d4, 10d3 ... "Registration No. And the same character string has the same registration number. Is specified and a registration transmission request may be made. When the character string that changes like the 8th and 10th lines is included, the fixed data is registered and the registration number. The transmission data is transmitted according to the designation of No. 1, and the changing data is transmitted by the conventional transmission method using the conventional transmission data memory 3. In this way, the same data can be sent without having to set it many times.

【0037】なお、上記実施例では、登録処理と登録送
信処理の2処理を示したが、必要に応じて登録したデー
タの読み出し、削除処理など他の処理を追加してもよ
い。
In the above embodiment, the two processes of the registration process and the registration transmission process are shown, but other processes such as reading and deleting the registered data may be added if necessary.

【0038】また、上記実施例では、登録No.指定メ
モリ6の内容を登録した送信データとしたが、送信デー
タメモリ3を含めて指定できるようにしてもよい。ま
た、登録しない送信データを複数セットできるように構
成し、これらを含めて指定できるようにしてもよい。さ
らに、登録No.の最終として「−1」としたが他のコ
ードであってもよいし、登録No.の個数を別にセット
してその個数の登録データを送信するようにしてもよ
い。
In the above embodiment, the registration No. Although the contents of the designated memory 6 are the registered transmission data, the transmission data memory 3 may be included and designated. Further, it may be configured such that a plurality of sets of transmission data that are not registered can be set so that they can be designated. Furthermore, the registration number. Was set to "-1" at the end, but another code may be used and the registration number. Alternatively, the number of registration data may be set separately and the registration data of that number may be transmitted.

【0039】また、上記実施例では、登録データ指定メ
モリ4及び登録No.指定メモリ6を別に設けたが、処
理内容を指定できるようにするなどして共用してもよ
い。またこのとき同様に、登録要求フラグ41及び登録
データ送信要求フラグ61を共用してもよい。また、登
録要求フラグ41を1つのフラグで構成したが、CPU
ユニット10及び通信ユニット1がそれぞれ制御する2
本の信号でハンドシェイクをとって行ってもよい。登録
データ送信要求フラグ61も同様である。
In the above embodiment, the registration data designation memory 4 and the registration number. Although the designated memory 6 is provided separately, the designated memory 6 may be shared by allowing the processing contents to be designated. At this time, similarly, the registration request flag 41 and the registration data transmission request flag 61 may be shared. Further, although the registration request flag 41 is composed of one flag,
2 controlled by the unit 10 and the communication unit 1, respectively
You may take a handshake with the signal of the book. The same applies to the registration data transmission request flag 61.

【0040】また、上記実施例では、登録データ指定メ
モリ4及び登録データメモリ5を図3、4のように構成
したが、順序が異なっても、さらに他のデータを追加し
てもよい。さらに、登録データ長を指定するように構成
したが、最終のコードを決めておき、その最終コードの
1つ前のデータまでを送信するようにして、登録データ
長を指定しない構成にしてもよい。
In the above embodiment, the registration data designation memory 4 and the registration data memory 5 are configured as shown in FIGS. 3 and 4, but the order may be different or other data may be added. Further, although the registration data length is specified, the final code may be determined and the data immediately before the final code may be transmitted so that the registration data length is not specified. ..

【0041】[0041]

【発明の効果】以上のように、この発明によるプログラ
マブルコントローラの通信ユニット及びその通信方法で
は、通信ユニットに複数の送信データを内部メモリに登
録No.とともに登録(格納)し、既に登録したデータ
の送信は送信データの代わりに送信したい登録データの
登録No.を指定するように構成したので、幾つかのあ
るフォーマットのデータを複数回送信するような場合、
同じデータを送信する度に送信データを全てセットする
必要がないので、その分シーケンスプログラムを簡易に
記述することができ、効率の良いプログラム設計を行う
ことが可能となると共に操作性が向上する効果がある。
As described above, in the communication unit of the programmable controller and the communication method thereof according to the present invention, a plurality of pieces of transmission data are registered in the internal memory in the communication unit. With the registration No. of the registration data to be transmitted instead of the transmission data, the already registered data is registered (stored) with. Since it is configured to specify, when sending data of some certain format multiple times,
Since it is not necessary to set all the transmission data every time the same data is transmitted, the sequence program can be simply written for that amount, and efficient program design can be performed and the operability is improved. There is.

【0042】また、通信ユニットに送信する登録データ
を複数指定するように構成したので、登録No.を複数
指定しておき、1回の送信要求において複数の登録デー
タを指定した順に全て送信するので、シーケンスプログ
ラムを簡易に記述することができ、効率の良いプログラ
ム設計を行うことが可能であると共に、従来に比べ送信
要求の回数を減らすことができるので、1回の送信要求
にかかるオーバーヘッドの時間を削減することができ、
送信全体の処理時間を短縮させることが可能となる効果
がある。
Since a plurality of registration data to be transmitted to the communication unit is designated, the registration number. Since a plurality of registered data are designated and all the registered data are transmitted in the designated order in one transmission request, the sequence program can be simply described, and efficient program design can be performed. Since the number of transmission requests can be reduced compared to the conventional case, the overhead time required for one transmission request can be reduced,
There is an effect that the processing time of the entire transmission can be shortened.

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

【図1】この発明の一実施例による通信ユニットのメモ
リ構成を示すブロック図である。
FIG. 1 is a block diagram showing a memory configuration of a communication unit according to an embodiment of the present invention.

【図2】図1に示した制御手段によるソフトウェア的制
御の内容を示すブロック図である。
FIG. 2 is a block diagram showing the contents of software control by the control means shown in FIG.

【図3】この発明の一実施例による通信ユニットにおけ
る登録データ指定メモリのメモリ構成を示す説明図であ
る。
FIG. 3 is an explanatory diagram showing a memory configuration of a registration data designation memory in the communication unit according to the embodiment of the present invention.

【図4】この発明の一実施例による通信ユニットにおけ
る登録データメモリのメモリ構成を示す説明図である。
FIG. 4 is an explanatory diagram showing a memory configuration of a registration data memory in the communication unit according to the embodiment of the present invention.

【図5】この発明の一実施例による通信ユニットにおけ
る登録No.指定メモリのメモリ構成を示す説明図であ
る。
FIG. 5 shows a registration No. in the communication unit according to the embodiment of the present invention. It is explanatory drawing which shows the memory structure of a designated memory.

【図6】この発明の一実施例をよる通信ユニットにおけ
る登録処理の動作を示すフローチャートである。
FIG. 6 is a flowchart showing an operation of registration processing in the communication unit according to the embodiment of the present invention.

【図7】この発明の一実施例をよる通信ユニットにおけ
る登録送信処理の動作を示すフローチャートである。
FIG. 7 is a flowchart showing an operation of registration transmission processing in the communication unit according to the embodiment of the present invention.

【図8】この発明の一実施例による通信ユニットにおけ
る他の登録送信処理の動作を示すフローチャートであ
る。
FIG. 8 is a flowchart showing the operation of another registration transmission process in the communication unit according to the embodiment of the present invention.

【図9】従来におけるプログラマブルコントローラの周
辺機器にデータを送信する場合のシステム構成を示すブ
ロック図である。
FIG. 9 is a block diagram showing a system configuration when transmitting data to a peripheral device of a conventional programmable controller.

【図10】従来における通信ユニットのメモリ構成を示
す説明図である。
FIG. 10 is an explanatory diagram showing a memory configuration of a conventional communication unit.

【図11】従来における通信ユニットの送信データメモ
リのメモリ構成を示す説明図である。
FIG. 11 is an explanatory diagram showing a memory configuration of a transmission data memory of a conventional communication unit.

【図12】図9に示した周辺機器がプリンタしたときの
出力例を示す説明図である。
12 is an explanatory diagram illustrating an output example when the peripheral device illustrated in FIG. 9 prints.

【図13】従来における通信ユニットの送信処理動作を
示すフローチャートである。
FIG. 13 is a flowchart showing a transmission processing operation of a conventional communication unit.

【符号の説明】[Explanation of symbols]

1 通信ユニット 2 共用メモリ 3 送信データメモリ 4 登録データ指定メモリ 5 登録データメモリ 6 登録No.指定メモリ 10 CPUユニット 11 周辺機器 31 送信要求フラグ 41 登録要求フラグ 61 登録データ送信要求フラグ 100 制御手段 1 Communication unit 2 Shared memory 3 Transmission data memory 4 Registration data designation memory 5 Registration data memory 6 Registration No. Designated memory 10 CPU unit 11 Peripheral device 31 Transmission request flag 41 Registration request flag 61 Registration data transmission request flag 100 Control means

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 プログラマブルコントローラ全体を制御
するCPUユニットからアクセス可能な共用メモリを有
し、前記CPUユニットにより前記共用メモリに指定さ
れたデータを送信する機能を備えたプログラマブルコン
トローラの通信ユニットにおいて、前記共用メモリによ
り指定された送信データを登録する登録データメモリ
と、前記共用メモリは、少なくとも登録No.、登録デ
ータ長、登録データを格納する登録データ指定メモリ
と、前記送信データの登録要求を示す登録要求フラグ
と、送信する登録データを指定する登録No.指定メモ
リと、前記登録データを送信する登録データ送信要求フ
ラグとを具備することを特徴とするプログラマブルコン
トローラの通信ユニット。
1. A communication unit of a programmable controller having a shared memory accessible from a CPU unit for controlling the entire programmable controller, the communication unit of the programmable controller having a function of transmitting data designated by the CPU unit to the shared memory, The registration data memory for registering the transmission data designated by the shared memory and the shared memory are at least the registration number. , A registration data length, a registration data designation memory for storing registration data, a registration request flag indicating a registration request for the transmission data, and a registration number for designating registration data to be transmitted. A communication unit of a programmable controller comprising a designated memory and a registration data transmission request flag for transmitting the registration data.
【請求項2】 前記共用メモリは、前記CPUユニット
のシーケンスプログラムにより登録データを複数指定で
き、複数の登録された送信データを前記共用メモリの内
容に従って順次送信することができることを特徴とする
請求項1のプログラマブルコントローラの通信ユニッ
ト。
2. The shared memory can specify a plurality of registered data by a sequence program of the CPU unit, and can sequentially transmit a plurality of registered transmission data according to the contents of the shared memory. Communication unit of the programmable controller of 1.
【請求項3】 プログラマブルコントローラ全体を制御
するCPUユニットからアクセス可能な共用メモリを有
し、前記CPUユニットにより前記共用メモリに指定さ
れたデータを送信する機能を備えたプログラマブルコン
トローラの通信ユニットの通信方法において、登録要求
フラグの有無を判断し、前記登録要求フラグが有りのと
き、登録データ指定メモリに格納されている登録N
o.、登録データ長、登録データをチェックし、指定登
録No.を登録データメモリへ登録し、前記登録要求フ
ラグを解除した後、登録データ送信要求フラグの有無を
判断し、前記登録データ送信要求フラグが有りのとき、
登録No.指定メモリの登録No.をチェックし、エラ
ーがないとき、指定登録No.の登録データを送信し、
前記登録データ送信要求フラグを解除することを特徴と
するプログラマブルコントローラの通信ユニットの通信
方法。
3. A communication method of a communication unit of a programmable controller having a shared memory accessible from a CPU unit for controlling the entire programmable controller, and having a function of transmitting data designated by the CPU unit to the shared memory. In the step S1, the presence or absence of the registration request flag is determined. When the registration request flag is present, the registration N stored in the registration data designation memory is determined.
o. Check the registration data length, registration data, and specify the registration number. Is registered in the registration data memory, the registration request flag is released, the presence or absence of the registration data transmission request flag is determined, and when the registration data transmission request flag is present,
Registration No. Registration No. of specified memory If there is no error, the designated registration No. is checked. Send the registration data of
A communication method for a communication unit of a programmable controller, characterized in that the registration data transmission request flag is cleared.
【請求項4】 プログラマブルコントローラ全体を制御
するCPUユニットからアクセス可能な共用メモリを有
し、前記CPUユニットにより前記共用メモリに指定さ
れたデータを送信する機能を備えたプログラマブルコン
トローラの通信ユニットの通信方法において、登録要求
フラグの有無を判断し、前記登録要求フラグが有りのと
き、登録データ指定メモリに格納されている登録N
o.、登録データ長、登録データをチェックし、指定登
録No.を登録データメモリへ登録し、前記登録要求フ
ラグを解除した後、登録データ送信要求フラグの有無を
判断し、前記登録データ送信要求フラグが有りのとき、
カウンタに1をセットし、登録No.指定メモリのN番
目の登録No.をチェックし、エラーがないとき、前記
登録No.指定メモリのN番目の登録No.の登録デー
タを送信し、−1のとき前記登録データ送信要求フラグ
を解除することを特徴とするプログラマブルコントロー
ラの通信ユニットの通信方法。
4. A communication method of a communication unit of a programmable controller having a shared memory accessible from a CPU unit for controlling the entire programmable controller, and having a function of transmitting data designated by the CPU unit to the shared memory. In the step S1, the presence or absence of the registration request flag is determined. When the registration request flag is present, the registration N stored in the registration data designation memory is determined.
o. Check the registration data length, registration data, and specify the registration number. Is registered in the registration data memory, the registration request flag is released, the presence or absence of the registration data transmission request flag is determined, and when the registration data transmission request flag is present,
The counter is set to 1 and the registration number. Nth registration number of the designated memory. If there is no error, the registration number. Nth registration number of the designated memory. Registration data is transmitted, and the registration data transmission request flag is released when the value is -1, the communication method of the communication unit of the programmable controller.
JP3279642A 1991-10-25 1991-10-25 Communication unit for programmable controller and its communication method Pending JPH05119813A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3279642A JPH05119813A (en) 1991-10-25 1991-10-25 Communication unit for programmable controller and its communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3279642A JPH05119813A (en) 1991-10-25 1991-10-25 Communication unit for programmable controller and its communication method

Publications (1)

Publication Number Publication Date
JPH05119813A true JPH05119813A (en) 1993-05-18

Family

ID=17613830

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3279642A Pending JPH05119813A (en) 1991-10-25 1991-10-25 Communication unit for programmable controller and its communication method

Country Status (1)

Country Link
JP (1) JPH05119813A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62204329A (en) * 1986-03-05 1987-09-09 Nec Corp Executing system for printer control code
JPH0313038A (en) * 1989-06-09 1991-01-22 Mitsubishi Electric Corp Asynchronous serial data transmitter
JPH0354942A (en) * 1989-07-24 1991-03-08 Fujitsu Ltd Method of transmitting data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62204329A (en) * 1986-03-05 1987-09-09 Nec Corp Executing system for printer control code
JPH0313038A (en) * 1989-06-09 1991-01-22 Mitsubishi Electric Corp Asynchronous serial data transmitter
JPH0354942A (en) * 1989-07-24 1991-03-08 Fujitsu Ltd Method of transmitting data

Similar Documents

Publication Publication Date Title
JPH05119813A (en) Communication unit for programmable controller and its communication method
JPH0430074B2 (en)
JPH0430073B2 (en)
JP2870998B2 (en) Character output device
JPH0522933B2 (en)
JP2748718B2 (en) Synchronous terminal equipment control system
JP2995313B2 (en) Document data output device
JPH0425931A (en) Data output device
JP3475428B2 (en) Data array controller
JPH05135055A (en) Word processor equipped with puzzle game function
JPS642180Y2 (en)
JPH09162948A (en) Data communication method
JPH05151228A (en) Device for plotting operation procedure
JPS61296446A (en) Group information processor
JPS63223943A (en) Direct memory access control system
JPS61258778A (en) Uniform allocation printing controlling system
JPH0473157B2 (en)
JPS60104373A (en) Character processor
JPH0779399B2 (en) Equipment
JPH0498493A (en) Electronic cash register
JPH06175797A (en) Input/output processing device
JPS62297923A (en) Control system for table data output
JPS62209946A (en) Data transfer system
JPS63221759A (en) Document data delivery device
JPS6142290B2 (en)