JP3399709B2 - Data extraction method in programmable controller and programmable controller - Google Patents

Data extraction method in programmable controller and programmable controller

Info

Publication number
JP3399709B2
JP3399709B2 JP21785795A JP21785795A JP3399709B2 JP 3399709 B2 JP3399709 B2 JP 3399709B2 JP 21785795 A JP21785795 A JP 21785795A JP 21785795 A JP21785795 A JP 21785795A JP 3399709 B2 JP3399709 B2 JP 3399709B2
Authority
JP
Japan
Prior art keywords
data
read
storage medium
memory
programmable controller
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.)
Expired - Fee Related
Application number
JP21785795A
Other languages
Japanese (ja)
Other versions
JPH0962318A (en
Inventor
尚志 野々山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP21785795A priority Critical patent/JP3399709B2/en
Publication of JPH0962318A publication Critical patent/JPH0962318A/en
Application granted granted Critical
Publication of JP3399709B2 publication Critical patent/JP3399709B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Description

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

【0001】[0001]

【発明が属する技術分野】この発明は、産業機器等で使
用されるプログラマブルコントローラに関し、特にCP
Uユニット(PC本体)内のシーケンスプログラム、デ
バイスメモリのデータを脱着式の外部記憶媒体に書き込
むプログラマブルコントローラにおけるデータ取出方法
およびプログラマブルコントローラおよび外部周辺機器
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller used in industrial equipment, etc.
The present invention relates to a sequence program in a U unit (PC main body), a data fetching method in a programmable controller that writes data in a device memory to a removable external storage medium, a programmable controller, and an external peripheral device.

【0002】[0002]

【従来の技術】従来より、産業機械等の制御用機器とし
て、シーケンス制御装置が広く利用されている。ここで
云うシーケンス制御装置とは、産業機械等の制御におい
て、一つの制御動作の終了を確認し、その結果に応じて
次の動作を選定すると云ったように、あらかじめ定めら
れた順序に従って、制御の各段階を逐次進めていく制御
(シーケンス制御)を行う制御機器である。
2. Description of the Related Art Conventionally, a sequence control device has been widely used as a control device such as an industrial machine. The sequence control device referred to here is, in the control of an industrial machine or the like, that the end of one control operation is confirmed and the next operation is selected according to the result, and the control is performed according to a predetermined order. Is a control device that performs control (sequence control) to sequentially advance each of the steps.

【0003】近年のシーケンス制御装置としては、シー
ケンスプログラムを変更可能なプログラマブルコントロ
ーラ(以下、PCと略称する)が使用されてきている。
As a recent sequence control device, a programmable controller (hereinafter abbreviated as PC) capable of changing a sequence program has been used.

【0004】図20は従来のPCの一般的構成を示して
いる。PCは、PCの主要部をなすCPUユニット1を
有しており、CPUユニット1には外部周辺機器2がケ
ーブル3により切り離し可能に接続される。
FIG. 20 shows a general structure of a conventional PC. The PC has a CPU unit 1 which is a main part of the PC, and an external peripheral device 2 is detachably connected to the CPU unit 1 by a cable 3.

【0005】CPUユニット1は、外部周辺機器2とデ
ータの送受信を行うための周辺インタフェース(以下、
周辺I/Fとする)4と、外部周辺機器2より送信され
たデータを一時的に待避しておく受信バッファ5と、外
部周辺機器2へ送信するデータを一時的に格納する送信
バッファ6と、シーケンスプログラムを格納するシーケ
ンスプログラムメモリ7と、シーケンスプログラム上で
制御対象外部機器をON、OFF制御するのに必要な入
出力信号用のデバイスデータや、数値を扱うデバイスの
状態を記憶するデバイスメモリ8と、システムプログラ
ムを格納したシステムROM9と、CPU12が実行中
に一時的にデータを記憶するためのデータRAM10
と、アドレス信号線やデータ信号線などの各種信号線1
1と、システムROM9に格納されたシステムプログラ
ムを実行するCPU12とを有している。
The CPU unit 1 has a peripheral interface (hereinafter, referred to as a "peripheral interface" for transmitting / receiving data to / from the external peripheral device 2).
Peripheral I / F 4), a reception buffer 5 for temporarily saving the data transmitted from the external peripheral device 2, and a transmission buffer 6 for temporarily storing the data to be transmitted to the external peripheral device 2. , A sequence program memory 7 for storing a sequence program, and a device memory for storing device data for input / output signals necessary for ON / OFF control of a control target external device on the sequence program and a state of a device handling numerical values 8, a system ROM 9 storing a system program, and a data RAM 10 for temporarily storing data during execution by the CPU 12.
And various signal lines such as address signal lines and data signal lines 1
1 and a CPU 12 that executes a system program stored in the system ROM 9.

【0006】外部周辺機器2は、プログラミングコンソ
ールのようなものであり、キーボード2aと、ディスプ
レイ部2bとを有し、フロッピディスク、ICメモリカ
ード等によるメモリ(外部記憶媒体)19を脱着可能に
装着される。
The external peripheral device 2 is like a programming console, has a keyboard 2a and a display unit 2b, and has a memory (external storage medium) 19 such as a floppy disk or an IC memory card detachably mounted. To be done.

【0007】ここで、例えば0ステップ目から9ステッ
プまでの10ステップによるシーケンスプログラムがシ
ーケンスプログラムメモリ7に既に格納されていると
し、その10ステップ分のシーケンスプログラムをPC
のCPUユニット1から外部周辺機器2に読み出す一連
の処理について説明する。
Here, assuming that a sequence program including 10 steps from the 0th step to the 9th step is already stored in the sequence program memory 7, the sequence program for the 10 steps is stored in the PC.
A series of processes for reading from the CPU unit 1 to the external peripheral device 2 will be described.

【0008】ユーザーが、外部周辺機器2の電源を入れ
ると、図20に示されているようなメインメニューがデ
ィスプレイ部2bに画面表示される。このメインメニュ
ーでは、図20に示されるように、1段目に「PC読出
し」と表示され、2段目に「デバイス読出し」と表示さ
れる。
When the user turns on the external peripheral device 2, a main menu as shown in FIG. 20 is displayed on the display unit 2b. In this main menu, as shown in FIG. 20, "PC read" is displayed in the first row and "device read" is displayed in the second row.

【0009】CPUユニット1から外部周辺機器2にシ
ーケンスプログラムを読み出すべく、メインメニューの
中から1段目の「PC読出し」を選択し、RETキー
(リターンキー)を押下する。
In order to read the sequence program from the CPU unit 1 to the external peripheral device 2, select the first-stage "PC read" from the main menu and press the RET key (return key).

【0010】これにより図22に示されているような、
PC読出し画面がオープンする。この画面では、1段目
に「読出し先頭アドレス[ ]ステップ」と表示され、
2段目に「読出し最終アドレス[ ]ステップ」と表示
される。この例では、読出し先頭アドレスは0ステップ
目であり、最終アドレスは9ステップ目であるから、ユ
ーザーは、1段目の[ ]内に“0”を、2段目の[
]内に“9”をそれぞれセットし、RETを押下す
る。
As a result, as shown in FIG.
The PC read screen opens. In this screen, "Read start address [] step" is displayed in the first row,
"Read last address [] step" is displayed in the second row. In this example, the read start address is the 0th step and the final address is the 9th step. Therefore, the user sets "0" in the [] of the first row
] And set "9", and press RET.

【0011】これにより、図23に示されているシーケ
ンスプログラム読出し要求データ作成ルーチンが起動さ
れる。シーケンスプログラム読出し要求データ作成ルー
チンは、CPUユニット1内のシーケンスプログラムメ
モリ7にあるシーケンスプログラムを外部周辺機器2に
読出す要求のデータ構成を外部周辺機器2の送信バッフ
ァ(図示省略)にセットし、これをCPUユニット1へ
送信する処理を実行するルーチンである。
As a result, the sequence program read request data creation routine shown in FIG. 23 is started. The sequence program read request data creation routine sets the data structure of the request for reading the sequence program in the sequence program memory 7 in the CPU unit 1 to the external peripheral device 2 in the transmission buffer (not shown) of the external peripheral device 2, This is a routine for executing a process of transmitting this to the CPU unit 1.

【0012】図24は、シーケンスプログラムの読出し
要求時に外部周辺機器2の送信バッファにセットされる
データ構成を例示しており、これは、データ長格納エリ
アと、シーケンスプログラム読出しの要求コード格納エ
リアと、オフセットステップ値格納エリアと、読出しス
テップ数格納エリアとで構成される。このように、CP
Uユニット1からシーケンスプログラムを読み出すな
ど、CPUユニット1と外部周辺機器2との各種交信処
理を行うために、外部周辺機器2からCPUユニット1
に向かって発行されるデータ構成を交信要求データとい
う。
FIG. 24 exemplifies a data configuration set in the transmission buffer of the external peripheral device 2 when a read request for the sequence program is made. This is a data length storage area and a request code storage area for reading the sequence program. , An offset step value storage area and a read step number storage area. In this way, CP
In order to perform various communication processes between the CPU unit 1 and the external peripheral device 2, such as reading a sequence program from the U unit 1, the external peripheral device 2 sends the CPU unit 1 to the CPU unit 1.
The data structure issued toward the destination is called communication request data.

【0013】シーケンスプログラム読出し要求データ作
成ルーチンでは、先ずステップS501にて、外部周辺
機器2の送信バッファの要求コード格納エリアにシーケ
ンスプログラム読出しの要求コードをセットする。ここ
では、シーケンスプログラム読出しの要求コードを予め
“1”に決めておく。
In the sequence program read request data creation routine, first, in step S501, the request code for sequence program read is set in the request code storage area of the transmission buffer of the external peripheral device 2. Here, the request code for reading the sequence program is previously set to "1".

【0014】次にステップS502で、外部周辺機器2
の送信バッファのオフセットステップ値格納エリアに読
出し先頭ステップをセットする。この例では、読出し先
頭ステップは0ステップであるから、図24に示されて
いるように、オフセットステップ値格納エリアに“0”
をセットする。
Next, in step S502, the external peripheral device 2
Set the read first step in the offset step value storage area of the transmission buffer of. In this example, since the read first step is 0 step, as shown in FIG. 24, “0” is stored in the offset step value storage area.
Set.

【0015】次にステップS503では、外部周辺機器
2の送信バッファの読出しステップ数格納エリアに読出
しステップ数をセットする。この例では、読出しステッ
プ数は0ステップ目から9ステップ目までの10ステッ
プであるから、図24に示されているように、読出しス
テップ数格納エリアエリアに“10”をセットする。
Next, in step S503, the read step number is set in the read step number storage area of the transmission buffer of the external peripheral device 2. In this example, the read step number is 10 steps from the 0th step to the 9th step. Therefore, as shown in FIG. 24, "10" is set in the read step number storage area area.

【0016】次にステップS504では、外部周辺機器
2の送信バッファのデータ長格納エリアにシーケンスプ
ログラム読出し要求のデータ長をセットする。シーケン
スプログラム読出し要求は上述のステップS501〜ス
テップS503にてセットした3つのデータで構成され
ているので、図24に示されているように、データ長格
納エリアに“3”をセットする。
Next, in step S504, the data length of the sequence program read request is set in the data length storage area of the transmission buffer of the external peripheral device 2. Since the sequence program read request is composed of the three data set in steps S501 to S503 described above, "3" is set in the data length storage area as shown in FIG.

【0017】次のステップS505で、CPUユニット
1に対してデータ送信割込信号を送り、次のステップS
506で、CPUユニット1へ外部周辺機器2の上述の
送信バッファのデータを送信する。
At the next step S505, a data transmission interrupt signal is sent to the CPU unit 1, and at the next step S505.
At 506, the data of the above-mentioned transmission buffer of the external peripheral device 2 is transmitted to the CPU unit 1.

【0018】次に、CPUユニット1におけるシーケン
スプログラム読出し処理を図25に示されているメイン
ルーチンに従って説明する。
Next, the sequence program read processing in the CPU unit 1 will be described according to the main routine shown in FIG.

【0019】CPUユニット1に電源が投入されると、
これのメインルーチンが起動される。このメインルーチ
ンでは、先ずステップS601で、シーケンスプログラ
ムメモリ7に記憶されているシーケンスプログラムを実
行する。
When the CPU unit 1 is powered on,
Its main routine is started. In this main routine, first, in step S601, the sequence program stored in the sequence program memory 7 is executed.

【0020】次にステップS602で、外部周辺機器2
よりのデータ送信割込信号があるか否かを検出する。デ
ータ送信割込信号があったならば、ステップS603へ
進み、外部周辺機器2からの交信要求データ受信処理を
実行する。
Next, in step S602, the external peripheral device 2
It is detected whether or not there is a data transmission interrupt signal. If there is a data transmission interrupt signal, the process proceeds to step S603, and communication request data reception processing from the external peripheral device 2 is executed.

【0021】ここで、メインルーチンの説明を中断して
ステップS603における交信要求データ受信処理を図
26に示されているフローチャートを参照して説明す
る。
Here, the description of the main routine is interrupted, and the communication request data receiving process in step S603 will be described with reference to the flowchart shown in FIG.

【0022】先ず、ステップS701で、外部周辺機器
2の送信バッファのデータ長格納エリアに書き込まれて
いるデータ長を周辺I/F4で取得する。
First, in step S701, the data length written in the data length storage area of the transmission buffer of the external peripheral device 2 is acquired by the peripheral I / F 4.

【0023】次にステップS702では、周辺I/F4
に取得したデータ長を受信バッファ5のアドレス0にセ
ットし、次のステップS703では、外部周辺機器2の
送信バッファの要求コード格納エリア、オフセットステ
ップ値格納エリア、読出しステップ数格納エリアの各々
に書き込まれているデータを周辺I/F4で取得し、こ
れらを受信バッファ5のアドレス1以降にセットする。
Next, in step S702, the peripheral I / F 4
The acquired data length is set to the address 0 of the reception buffer 5, and in the next step S703, it is written in each of the request code storage area, the offset step value storage area, and the read step number storage area of the transmission buffer of the external peripheral device 2. The peripheral I / F 4 obtains the stored data and sets them at the address 1 and later of the reception buffer 5.

【0024】次にステップS704では、受信バッファ
5のアドレス0にセットされたデータ長に基づいてデー
タ長分、受信したか否かを判別し、この判別によりデー
タ長分、ステップS703を繰り返し実行する。
Next, in step S704, it is determined whether or not the data has been received for the data length based on the data length set in the address 0 of the reception buffer 5, and this determination repeatedly executes step S703 for the data length. .

【0025】これにより、受信バッファ5には図27に
示されているようなデータがセットされる。この場合、
受信バッファ5には、図27に示されているように、デ
ータ長エリアと、要求コード格納エリアと、オフセット
ステップ値格納エリアと、読出しデータ長格納エリアと
が設けられ、それらエリアに外部周辺機器2の送信バッ
ファのデータがそのまま書き込まれる。
As a result, the data as shown in FIG. 27 is set in the reception buffer 5. in this case,
As shown in FIG. 27, the reception buffer 5 is provided with a data length area, a request code storage area, an offset step value storage area, and a read data length storage area, and external peripheral devices are provided in these areas. The data in the second transmission buffer is written as it is.

【0026】ここで、図25に示されているメインルー
チンの説明に戻る。上述のようなデータ受信を完了する
と、次にステップS604で、外部周辺機器2よりの交
信要求データの種類を、受信バッファ5の先頭アドレス
から+1したアドレスのデータ、つまり要求コード格納
エリアの内容を読出すことで判断する。その値が“1”
であれば、交信要求データの種類がシーケンスプログラ
ム読出しであると判定し、ステップS605へ進み、シ
ーケンスプログラム読出し処理を実行する。
Now, let us return to the description of the main routine shown in FIG. When the data reception as described above is completed, next, in step S604, the type of the communication request data from the external peripheral device 2 is changed to +1 from the start address of the reception buffer 5, that is, the content of the request code storage area is changed. Judge by reading. The value is "1"
If so, it is determined that the type of communication request data is the sequence program read, and the process proceeds to step S605 to execute the sequence program read processing.

【0027】次にステップ605におけるシーケンスプ
ログラム読出し処理を図28に示されているフローチャ
ートを参照して説明する。
Next, the sequence program read processing in step 605 will be described with reference to the flow chart shown in FIG.

【0028】先ず、ステップS801では、受信バッフ
ァ5のオフセットステップ値格納エリアに格納されてい
るオフセットステップ値と読出しステップ数格納エリア
に格納されている読出しステップ数とを読み出し、その
2つのデータの和とシーケンスプログラムメモリ7の最
大ステップ値との大小比較を行う。
First, in step S801, the offset step value stored in the offset step value storage area of the reception buffer 5 and the read step number stored in the read step number storage area are read, and the sum of the two data is read. And the maximum step value of the sequence program memory 7 are compared.

【0029】オフセットステップ値と読出しステップ数
との和が、シーケンスプログラムメモリ7の最大ステッ
プ値より小さい場合には、オフセットステップ値と読出
しステップ数の値がともに正常値であると判定し、次に
ステップS802へ進み、受信バッファ5の読出しステ
ップ数格納エリアに格納されている読出しステップ数が
送信バッファ6の容量内であるか否かチェックを行う。
なお、図29はシーケンスプログラムメモリ7に格納さ
れているシーケンスプログラムの例を示している。
If the sum of the offset step value and the number of read steps is smaller than the maximum step value of the sequence program memory 7, it is determined that both the offset step value and the number of read steps are normal values, and In step S802, it is checked whether the number of read steps stored in the read step number storage area of the reception buffer 5 is within the capacity of the transmission buffer 6.
29 shows an example of the sequence program stored in the sequence program memory 7.

【0030】読出しステップ数が送信バッファ6の容量
より小さいならば、読出しステップ数の正常値なので、
次にステップS803へ進み、指定オフセットステップ
より指定ステップ数分のシーケンスプログラムを送信バ
ッファ6にセットする処理を行う。
If the number of read steps is smaller than the capacity of the transmission buffer 6, the read step number is a normal value.
Next, proceeding to step S803, processing for setting the sequence program for the designated number of steps from the designated offset step in the transmission buffer 6 is performed.

【0031】ここでは、受信バッファ5のオフセットス
テップ値格納エリアと読出しステップ数格納エリアに格
納されている読出しステップ数との値がそれぞれ
“0”、“10”であるから、図29に例示されている
シーケンスプログラムの0ステップ目より、10ステッ
プ分のデータを送信バッファ6の読出しデータ格納エリ
ア(図30参照)にセットする。
Here, the values of the offset step value storage area and the number of read steps stored in the read step number storage area of the reception buffer 5 are "0" and "10", respectively, so that they are exemplified in FIG. From the 0th step of the sequence program, the data for 10 steps is set in the read data storage area (see FIG. 30) of the transmission buffer 6.

【0032】送信バッファ6は、図30に示されている
ように、データ長格納エリアと、応答コード格納エリア
と、正常応答か異常応答かを示すデータが格納される応
答適否データ格納エリアと、オフセットステップ値格納
エリアと、読出しステップ数格納エリアと、読出しデー
タ格納エリアとにより構成される。この送信バッファ6
のデータ容量は、例えば1005ステップに設定され、
1回のシーケンスプログラム読出し要求で、最大100
0ステップのプログラム読出しが可能である。
As shown in FIG. 30, the transmission buffer 6 includes a data length storage area, a response code storage area, and a response propriety data storage area in which data indicating a normal response or an abnormal response is stored. It is composed of an offset step value storage area, a read step number storage area, and a read data storage area. This send buffer 6
The data capacity of is set to 1005 steps, for example,
A maximum of 100 can be issued by one sequence program read request.
Program reading in 0 steps is possible.

【0033】次にステップS804では、受信バッファ
5のオフセットステップ値エリアに格納されているオフ
セットステップ値と、読出しステップ数格納エリアに格
納されている読出しステップ数、即ち要求パケットのオ
フセットステップ値と読出しステップ数とを送信バッフ
ァ6のオフセットステップ値格納エリアと読出しステッ
プ数格納エリアにそれぞれセットする。
Next, in step S804, the offset step value stored in the offset step value area of the receiving buffer 5 and the read step number stored in the read step number storage area, that is, the offset step value and the read of the request packet. The step number is set in the offset step value storage area and the read step number storage area of the transmission buffer 6, respectively.

【0034】次にステップS805では、送信バッファ
6の応答適否データ格納エリアに常応答を示す"0"を
セットする。
[0034] Then in step S805, the sets "0" indicating a normal response to the response propriety data storage area of the transmission buffer 6.

【0035】次にステップS806では、送信バッファ
6の読出しステップ数格納エリアとヘッダ長(固定長)
から応答データ長を計算し、それを送信バッファ6のデ
ータ長格納エリアにセットする。この例では、読出しス
テップ数10にヘッダ部の長さ4ステップを加えて14
ステップが応答データ長である。
Next, in step S806, the read step number storage area of the transmission buffer 6 and the header length (fixed length).
The response data length is calculated from this, and it is set in the data length storage area of the transmission buffer 6. In this example, the number of read steps is 10 and the length of the header section is 4
The step is the response data length.

【0036】通常、交信要求データ並びに応答データの
データ構成はデータの長さが固定の部分とデータの長さ
が可変の部分とに大きく二つに分かれる。この二つのデ
ータの集まりの並び方は、データの長さが固定の部分が
先にきて、次に可変の部分となる。この二つのデータの
集まりのうち、データの長さが固定の部分のことをデー
タの並び方にちなんでヘッダ部と呼び、その長さをヘッ
ダ長という。
Generally, the data structure of the communication request data and the response data is roughly divided into a fixed data length portion and a variable data length portion. In the arrangement of these two sets of data, the part where the data length is fixed comes first, and then the variable part. Of these two sets of data, the part where the data length is fixed is called the header part because of the arrangement of the data, and the length is called the header length.

【0037】次にステップS807では、シーケンスプ
ログラム読出しの応答コードを送信バッファ6の応答コ
ード格納エリアにセットする。この例では、シーケンス
プログラム読出しの応答コードを“81”としている。
Next, in step S807, the response code for reading the sequence program is set in the response code storage area of the transmission buffer 6. In this example, the response code for reading the sequence program is "81".

【0038】次にステップS808では、送信バッファ
6にあるシーケンスプログラム読出しの応答データ(図
30参照)を周辺I/F4よりケーブル3を介して外部
周辺機器2に応答データを送信する。
Next, in step S808, the response data for reading the sequence program (see FIG. 30) in the transmission buffer 6 is transmitted from the peripheral I / F 4 to the external peripheral device 2 via the cable 3.

【0039】上述のように、CPUユニット1からシー
ケンスプログラムを読出す等、CPUユニット1と外部
周辺機器2との各種交信処理を行うためにCPUユニッ
ト1から外部周辺機器2に向かって発行されるデータ構
成を交信応答データという。
As described above, the CPU unit 1 issues it to the external peripheral device 2 in order to perform various communication processes between the CPU unit 1 and the external peripheral device 2, such as reading a sequence program from the CPU unit 1. The data structure is called communication response data.

【0040】なお、ステップS801にてオフセットス
テップ値と読出しステップ数との和が、シーケンスプロ
グラムメモリ7の最大ステップ値より大きい場合には、
オフセットステップ値と読出しステップ数の少なくとも
何れか一方が異常値であると判定してステップS809
へ進み、ステップS809では、送信バッファ6の応答
適否データ格納エリアに異常応答を示す“FFFFH”
をセットする。
If the sum of the offset step value and the number of read steps is larger than the maximum step value of the sequence program memory 7 in step S801,
It is determined that at least one of the offset step value and the read step number is an abnormal value, and step S809 is performed.
In step S809, "FFFFH" indicating an abnormal response is displayed in the response propriety data storage area of the transmission buffer 6.
Set.

【0041】次にステップS810で、そのパケット長
(応答データ長)を送信バッファ6のデータ長格納エリ
アにセットし、この後にステップS807、808へ進
み、この場合も送信バッファ6にあるシーケンスプログ
ラム読出しの応答データを周辺I/F4よりケーブル3
を介して外部周辺機器2へに送信する。
Next, in step S810, the packet length (response data length) is set in the data length storage area of the transmission buffer 6, and then the process proceeds to steps S807 and 808. In this case as well, the sequence program read in the transmission buffer 6 is read. Response data from the peripheral I / F 4 to cable 3
To the external peripheral device 2 via.

【0042】次にデバイスメモリのデータ読出しについ
て説明する。
Next, reading of data from the device memory will be described.

【0043】まず始めに、このデバイスメモリのデータ
読出しがどのような場合に必要であるかを説明する。F
Aシステムを何かの異常のため停止させる場合には、シ
ステムを再起動させるために、システム稼動時のCPU
ユニット1のデバイスメモリの内容を保管する必要があ
り、この時にデバイスメモリの内容を脱着可能なメモリ
に書き込むことが行われる。
First, the case where the data read from the device memory is necessary will be described. F
A When the system is stopped due to some abnormality, in order to restart the system, the CPU during system operation
It is necessary to save the contents of the device memory of the unit 1, and at this time, the contents of the device memory are written to the removable memory.

【0044】この従来例では、ユーザーは、シーケンス
プログラム中にデバイスメモリをデバイスNO.0から
デバイスNO.9までの10ワード分使用しているとし
て説明する。
In this conventional example, the user sets the device memory to the device No. during the sequence program. 0 to device No. It is assumed that 10 words up to 9 are used.

【0045】ユーザーが外部周辺機器2の電源を入れる
と、図21に示されている前述のメインメニューがディ
スプレイ部2aに画面表示される。CPUユニット1か
ら外部周辺機器2を経由して脱着可能なメモリ19にC
PUユニット1のデバイスメモリのデータを転送すべ
く、メインメニューの中から2段目の「デバイス読出
し」を選択し、RETキーを押下する。
When the user turns on the external peripheral device 2, the main menu shown in FIG. 21 is displayed on the display unit 2a. C from the CPU unit 1 to the removable memory 19 via the external peripheral device 2
In order to transfer the data in the device memory of the PU unit 1, select the "read device" in the second row from the main menu and press the RET key.

【0046】これにより図31に示されているような、
デバイス読出し画面がオープンする。この画面では、1
段目に「読出し先頭デバイスNO.[ ]」と表示さ
れ、2段目に「読出し最終デバイスNO.[ ]」と表
示される。この例では、読出し先頭デバイスNO.は
“0”であり、最終デバイスNO.は“9”であるか
ら、ユーザーは、1段目の[ ]内に“0”を、2段目
の[ ]内に“9”をそれぞれセットし、RETキーを
押下する。
As a result, as shown in FIG.
The device read screen opens. In this screen, 1
"Read first device No. []" is displayed in the second row, and "Read last device No. []" is displayed in the second row. In this example, the read head device No. Is "0", and the final device No. Is "9", the user sets "0" in [] of the first row and "9" in [] of the second row, and presses the RET key.

【0047】これにより、図32に示されているデバイ
スメモリ読出し要求データ作成ルーチンが起動される。
デバイスメモリ読出し要求データ作成ルーチンでは、先
ず、ステップS901で、外部周辺機器2の送信バッフ
ァの要求コード格納エリアに、図33に示されているよ
うに、デバイスメモリ読出し要求コードである“2”を
セットする。
As a result, the device memory read request data creation routine shown in FIG. 32 is started.
In the device memory read request data creation routine, first, in step S901, the device memory read request code "2" is set in the request code storage area of the transmission buffer of the external peripheral device 2, as shown in FIG. set.

【0048】これより以降のステップS902〜906
は、図23に示されているシーケンスプログラム読出し
要求データ作成処理ルーチンにおけるステップS502
〜506と同等であり、デバイスメモリ読出しのための
交信要求データを外部周辺機器2の送信バッファ(図3
3参照)に作成する。この交信要求データは、データ長
と、要求コードと、オフセットアドレスと、読出しワー
ド数とで構成される。
Subsequent steps S902-906
Is a step S502 in the sequence program read request data creation processing routine shown in FIG.
.. 506, the communication request data for reading the device memory is sent to the transmission buffer of the external peripheral device 2 (see FIG.
3)). This communication request data is composed of a data length, a request code, an offset address, and the number of read words.

【0049】CPUユニット1は、図34に示されてい
るメインルーチン(図25のメインルーチンと同じも
の)を実行し、ステップS603で、外部周辺機器2よ
りの要求データ受信処理を図26に示されている前述の
フローチャートに従って行い、図35に示されているよ
うに、受信バッファ5に外部周辺機器2の送信バッファ
のデータ、即ちデータ長と、要求コードと、オフセット
アドレスと、読出しワード数とをそのまま書き込む。
The CPU unit 1 executes the main routine shown in FIG. 34 (the same as the main routine shown in FIG. 25), and in step S603, the request data reception process from the external peripheral device 2 is shown in FIG. 35, the data of the transmission buffer of the external peripheral device 2, that is, the data length, the request code, the offset address, and the number of read words are read. Write as it is.

【0050】次にステップS604にて、受信バッファ
5の要求コード格納エリアの書き込み値が“2”であれ
ば、交信要求データの種類がデバイスメモリ読出しであ
ると判定し、ステップS605へ進み、デバイスメモリ
読出し処理を実行する。
Next, in step S604, if the write value in the request code storage area of the reception buffer 5 is "2", it is determined that the type of communication request data is device memory read, and the flow advances to step S605 to set the device. Executes memory read processing.

【0051】次にデバイスメモリ読出し処理を図36に
示されているフローチャートを参照して説明する。デバ
イスメモリ読出し処理ルーチンにおけるステップS10
01〜1006は、図28に示されているシーケンスプ
ログラム読出し処理ルーチンにおけるステップS801
〜806と同等であり、ステップS1007で、送信バ
ッファ6の先頭から+1したアドレス、即ち応答コード
格納エリアに予め定義されているデバイスメモリ読出し
の応答コードを“82”をセットする。
Next, the device memory read processing will be described with reference to the flow chart shown in FIG. Step S10 in the device memory read processing routine
01 to 1006 are steps S801 in the sequence program read processing routine shown in FIG.
.About.806, and in step S1007, "82" is set as the response code of the device memory read defined in advance in the address that is +1 from the head of the transmission buffer 6, that is, in the response code storage area.

【0052】なお、図37はデバイスメモリ8のデータ
メモリ構成例を示している。
FIG. 37 shows a data memory configuration example of the device memory 8.

【0053】次にステップS1008では、送信バッフ
ァ6にあるデバイスメモリ読出しの応答データ(図38
参照)を周辺I/F4よりケーブル3を介して外部周辺
機器2の受信バッファ(図示省略)に応答データを送信
する。
Next, in step S1008, response data for reading the device memory in the transmission buffer 6 (see FIG. 38).
Response data is transmitted from the peripheral I / F 4 to the reception buffer (not shown) of the external peripheral device 2 via the cable 3.

【0054】このようにして外部周辺機器2の受信バッ
ファが受信した応答データ中のデバイスメモリのデータ
(図37参照)は外部周辺機器2に装填されているメモ
リ19に書き込まれる。
In this way, the data in the device memory (see FIG. 37) in the response data received by the reception buffer of the external peripheral device 2 is written in the memory 19 loaded in the external peripheral device 2.

【0055】また特開昭61−35653号公報には、
ICメモリカードを通信端末装置に装着すると、通信端
末装置のMPUに割込み信号を発生し、ICメモリカー
ドが保有しているデータを通信端末装置内のRAMに書
き込んだり、通信端末装置内のRAMのデータをICメ
モリカードに書き込むことことが示されている。
Further, JP-A-61-35653 discloses that
When the IC memory card is attached to the communication terminal device, an interrupt signal is generated in the MPU of the communication terminal device, the data held by the IC memory card is written to the RAM in the communication terminal device, or the data in the RAM in the communication terminal device is written. Writing data to an IC memory card is shown.

【0056】[0056]

【発明が解決しようとする課題】上述した従来のシーケ
ンスプログラムの読出しの方法では、CPUユニット1
と外部周辺機器2との間で、要求データと応答データの
授受がケーブル3を使用して行われているため、保守点
検時に例えばシーケンスプログラムを読み出す場合、保
守担当者はPCが設置されている現場へ外部周辺機器2
を持っていき、PCのCPUユニット1と外部周辺機器
2とをケーブル3を用いて接続してシーケンスプログラ
ムを外部周辺機器2に読出し、その外部周辺機器2を設
計室などに持って戻らなければならず、保守担当者にと
っては、外部周辺機器2をPCが設置されている現場へ
持ち歩くことが煩わしいという問題点があった。
In the conventional method of reading a sequence program described above, the CPU unit 1 is used.
Since the request data and the response data are exchanged between the external peripheral device 2 and the external peripheral device 2 using the cable 3, for example, when reading a sequence program at the time of maintenance and inspection, the maintenance person has a PC installed. To the site External peripheral equipment 2
Take the CPU unit 1 of the PC and the external peripheral device 2 with the cable 3 to read the sequence program to the external peripheral device 2, and bring the external peripheral device 2 back to the design room or the like. However, there is a problem that it is troublesome for the maintenance staff to carry the external peripheral device 2 to the site where the PC is installed.

【0057】またシステム稼動時のデバイスメモリのデ
ータをFDなどの脱着可能なメモリ19に保管する場
合、CPUユニット1から読出したデバイスメモリのデ
ータを外部周辺機器2内のバッファメモリに一旦書き込
み、その後に外部周辺機器2内のバッファメモリからF
Dなどの脱着可能なメモリ19にデータを書き込むた
め、読出し/書込みを2回ずつ行わなければならず、C
PUユニット1から読出すバイスメモリのデータが大容
量の場合、その処理にかなりな時間がいるという問題点
があった。
When the data in the device memory during system operation is stored in the removable memory 19 such as the FD, the data in the device memory read from the CPU unit 1 is once written in the buffer memory in the external peripheral device 2 and then From the buffer memory in the external peripheral device 2 to F
In order to write data to the removable memory 19 such as D, reading / writing must be performed twice, and C
When the amount of data in the vise memory read from the PU unit 1 is large, there is a problem that the processing takes a considerable amount of time.

【0058】また、特開昭61−35653号公報に示
されているものは、何時も通信端末装置内のRAMの全
データをICメモリカードに書き込むことを前提として
おり、このため、RAMの一部のデータのみを読み出す
べく、読出し先頭アドレス、読出しデータ量など変更す
ることについて考慮されておらず、この通信端末装置で
は、通信端末装置内のメモリに、読出し先頭アドレス、
読出しデータ数などの読出し制御のためのデータを予め
セットしておく必要がある。また読出し先頭アドレス、
読出しデータ量などを変更するのに、外部周辺機器を通
信端末装置に接続するなどして読出し先頭アドレス、読
出しデータ数などを変更する必要がある。
Further, the one disclosed in Japanese Patent Laid-Open No. 61-35653 is premised on writing all the data in the RAM in the communication terminal device to the IC memory card at all times. In order to read only the data of, the change of the read start address, the read data amount, etc. is not considered. In this communication terminal device, the read start address,
It is necessary to preset data for read control such as the number of read data. Read start address,
In order to change the amount of read data, it is necessary to change the read start address, the number of read data, etc. by connecting an external peripheral device to the communication terminal device.

【0059】従って、通信端末装置のデータ転送の技術
をプログラマブルコントローラにおけるデータ読み出し
に転用すると、読出し先頭アドレス、読出し量などを変
更するのに、外部周辺機器をCPUユニットが設置して
ある現場に持参しなくてはならず、さらにその現場でC
PUユニットに対して保守担当者が読出し先頭アドレ
ス、読出し量などを指定する操作が必要になるため、外
部周辺機器をPCが設置されている現場へ持ち歩くこと
が煩わしいということについて改善されない。
Therefore, if the data transfer technique of the communication terminal device is diverted to the data reading in the programmable controller, the external peripheral device is brought to the site where the CPU unit is installed to change the read start address, the read amount, and the like. Must be done, and C
Since it is necessary for the maintenance staff to perform an operation of designating the read start address, the read amount, etc. for the PU unit, it is not improved that the external peripheral device is troublesome to carry to the site where the PC is installed.

【0060】この発明は、上述のような問題点に着目し
てなされたものであり、外部周辺機器をPCが設置され
ている現場へ持ち運ぶことなく、プログラマブルコント
ローラ内のシーケンスプログラムメモリやデバイスメモ
リのデータを、必要分のみ脱着可能な外部記憶媒体に取
り出すことができるプログラマブルコントローラにおけ
るデータ取出方法、およびそのデータ取出方法の実施に
使用されるプログラマブルコントローラおよび外部周辺
機器を提供することを目的としている。
The present invention has been made by paying attention to the above-mentioned problems, and the sequence program memory and the device memory in the programmable controller can be stored in the programmable controller without carrying the external peripheral equipment to the site where the PC is installed. An object of the present invention is to provide a data fetching method in a programmable controller capable of fetching only a required amount of data to an external storage medium that can be detached, and a programmable controller and an external peripheral device used for implementing the data fetching method.

【0061】[0061]

【課題を解決するための手段】上述の目的を達成するた
めに、この発明によるプログラマブルコントローラにお
けるデータ取出方法は、シーケンスプログラムに基づい
て制御対象機器を制御するプログラマブルコントローラ
のデータを脱着可能な外部記憶媒体に取り出す方法にお
いて、外部記憶媒体にデータ読出しの種類と領域を指定
した交信要求データを書換可能に登録し、当該外部記憶
媒体がプログラマブルコントローラに設けられた外部記
憶媒体ドライバにセットされることにより、割込み信号
を発生して外部記憶媒体のメモリアドレスをプログラマ
ブルコントローラのメモリアドレスに割付けて、前記
部記憶媒体内の交信要求データを読み出すことによりデ
ータ読出しの種類と領域の指定情報を取得し、当該領域
の指定情報を正常値であると判定した場合に、指定され
た種類および領域のデータを交信応答データとして前記
外部記憶媒体に書き込み、一方で、前記領域の指定情報
を異常値であると判定した場合に、前記外部記憶媒体に
異常であることを示すデータを書き込むものである。
In order to achieve the above-mentioned object, a data fetching method in a programmable controller according to the present invention is a detachable external storage for data of a programmable controller for controlling a controlled device based on a sequence program. In the method of extracting to the medium, by registering the communication request data in which the type and area of the data reading are rewritable in the external storage medium and setting the external storage medium in the external storage medium driver provided in the programmable controller, the memory address of the external storage medium by generating an interrupt signal allocated to the memory address of the programmable controller, specifies the type and area of the data read by reading the communication request data of the outer <br/> unit storage medium Get information and the area
When it is determined that the specified information of No. 1 is a normal value, the data of the specified type and area is written to the external storage medium as communication response data, while the specified information of the area is written.
When it is determined that the value is an abnormal value, the data indicating the abnormality is written in the external storage medium.

【0062】従って、この発明によるプログラマブルコ
ントローラにおけるデータ取出方法では、外部周辺機器
を使用して外部記憶媒体にデータ読出しの種類と領域を
指定した交信要求データを書換可能に登録しておき、こ
の外部記憶媒体をプログラマブルコントローラの外部記
憶媒体ドライバにセットする。外部記憶媒体をプログラ
マブルコントローラの外部記憶媒体ドライバにセットす
ると、割込み信号が発生して外部記憶媒体のメモリアド
レスをプログラマブルコントローラのメモリアドレスに
割付けることが行われ、プログラマブルコントローラが
外部記憶媒体に登録されている交信要求データを読み出
すことによりデータ読出しの種類と領域の指定情報を取
得し、指定(要求)された種類および領域のデータを交
信応答データとして外部記憶媒体に書き込む。
Therefore, in the data fetching method in the programmable controller according to the present invention, the communication request data designating the type and area of data reading is rewritably registered in the external storage medium by using the external peripheral device, and the external request is made. The storage medium is set in the external storage medium driver of the programmable controller. When the external storage medium is set in the external storage medium driver of the programmable controller, an interrupt signal is generated, the memory address of the external storage medium is assigned to the memory address of the programmable controller, and the programmable controller is registered in the external storage medium. By reading the communication request data, the data read type and the area designation information are acquired, and the data of the designated (requested) type and area is written in the external storage medium as the communication response data.

【0063】これにより外部記憶媒体をプログラマブル
コントローラの外部記憶媒体ドライバにセットするだけ
で、プログラマブルコントローラ内のシーケンスプログ
ラムメモリやデバイスメモリのデータを、必要分のみ脱
着可能な外部記憶媒体に取り出すことができる。
As a result, only by setting the external storage medium in the external storage medium driver of the programmable controller, the data of the sequence program memory and the device memory in the programmable controller can be taken out to the removable external storage medium as much as necessary. .

【0064】次の発明によるプログラマブルコントロー
ラにおけるデータ取出方法は、前記交信要求データが、
データ読出しの種類を指定するデータとしてシーケンス
プログラムの読出しとデバイスメモリのデータ読出しと
を識別する要求コードを有し、データ読出しの領域を指
定するデータとしてシーケンスプログラムの読出し先頭
ステップあるいはデバイスメモリの読出し先頭アドレス
と、シーケンスプログラムの読出しステップ数あるいは
デバイスメモリの読出しワード数とを含んでいるもので
ある。
In the data fetching method in the programmable controller according to the next invention, the communication request data is
It has a request code that identifies the sequence program read and device memory data read as data that specifies the type of data read, and the sequence program read first step or device memory read first as the data that specifies the data read area. It includes the address and the number of read steps of the sequence program or the number of read words of the device memory.

【0065】従って、このデータ取出方法では、要求コ
ードによって読出しデータをシーケンスプログラムとデ
バイスメモリのデータの何れか一方に選択的に指定で
き、シーケンスプログラムの読出し先頭ステップあるい
はデバイスメモリの読出し先頭アドレスと、シーケンス
プログラムの読出しステップ数あるいはデバイスメモリ
の読出しワード数を指定することにより必要分のシーケ
ンスプログラムあるいはデバイスメモリのデータを外部
記憶媒体に取り出すことができる。
Therefore, in this data fetching method, the read data can be selectively designated to either the sequence program or the data in the device memory by the request code, and the read start step of the sequence program or the read start address of the device memory, By specifying the number of read steps of the sequence program or the number of read words of the device memory, it is possible to take out the necessary amount of data of the sequence program or device memory to the external storage medium.

【0066】次の発明によるプログラマブルコントロー
ラは、シーケンスプログラムに基づいて制御対象機器を
制御するプログラマブルコントローラにおいて、脱着可
能な外部記憶媒体の装着により割込み信号を発生する割
込み回路と、前記割込み信号により前記外部記憶媒体の
メモリアドレスをプログラマブルコントローラのメモリ
アドレスに割付けるアドレス割付け手段と、前記外部記
憶媒体に登録された交信要求データを前記アドレス割付
け手段によって割り付けられたメモリアドレスに読み出
すことによりデータ読出しの種類と領域の指定情報を取
得する読出し手段と、前記領域の指定情報を正常値であ
ると判定した場合に、指定された種類および領域のデー
タを交信応答データとして前記外部記憶媒体に書き込む
書込み手段とを有し、前記書込み手段は、前記領域の指
定情報を異常値であると判定した場合に、前記外部記憶
媒体に異常であることを示すデータを書き込むものであ
る。
A programmable controller according to the next invention is a programmable controller for controlling a device to be controlled based on a sequence program, wherein an interrupt circuit for generating an interrupt signal by mounting a removable external storage medium, and the external circuit by the interrupt signal. read out the memory address of the storage medium and the address allocation means for allocating the memory addresses of the programmable controller, the communication request data registered in the external storage medium in the memory address allocated by the address allocation unit
Information to specify the type of data read and the area
The reading means to be obtained and the specified information of the area are normal values.
Data of the specified type and area,
Writing data into the external storage medium as communication response data , and the writing means is a finger of the area.
When it is determined that the constant information is an abnormal value, the data indicating the abnormality is written in the external storage medium.

【0067】従って、この発明によるプログラマブルコ
ントローラでは、外部記憶媒体が装着されると、割込み
回路が割込み信号を発生し、この割込み信号によりアド
レス割付け手段が外部記憶媒体のメモリアドレスをプロ
グラマブルコントローラのメモリアドレスに割付ける。
これによりプログラマブルコントローラは外部記憶媒体
のデータを読み書きできるようになり、プログラマブル
コントローラが読出し手段によって外部記憶媒体に予め
登録されている交信要求データを読み取ることにより、
データ読出しの種類と領域とを認識し、この交信要求デ
ータによって指定されたデータ読出しの種類と領域とに
応じて書込み手段により外部記憶媒体に交信応答データ
を書き込む。
Therefore, in the programmable controller according to the present invention, when the external storage medium is mounted, the interrupt circuit generates an interrupt signal, and the address assigning means changes the memory address of the external storage medium to the memory address of the programmable controller by the interrupt signal. Assign to.
As a result, the programmable controller can read and write data in the external storage medium, and the programmable controller reads the communication request data registered in advance in the external storage medium by the reading means.
The type and area of data read are recognized, and the communication response data is written in the external storage medium by the writing means in accordance with the type and area of data read specified by this communication request data.

【0068】これにより領域指定された所要ステップ数
のシーケンスプログラムあるい所要ワード数のデバイス
メモリのデータが外部記憶媒体に書き込まれ、シーケン
スプログラムの読み出し、デバイスメモリの内容保存が
行われる。
As a result, the data of the device memory of the required number of sequence programs or the required number of words designated in the area is written to the external storage medium, the sequence program is read, and the contents of the device memory are saved.

【0069】次の発明によるプログラマブルコントロー
ラは、前記交信要求データが、データ読出しの種類を指
定するデータとしてシーケンスプログラムの読出しとデ
バイスメモリのデータ読出しとを識別する要求コードを
有し、データ読出しの領域を指定するデータとしてシー
ケンスプログラムの読出し先頭ステップあるいはデバイ
スメモリの読出し先頭アドレスと、シーケンスプログラ
ムの読出しステップ数あるいはデバイスメモリの読出し
ワード数とを含んでいるものである。
In the programmable controller according to the next invention, the communication request data has a request code for identifying a sequence program read and a device memory data read as data for designating a data read type, and a data read area. As the data for specifying, the read start step of the sequence program or the read start address of the device memory and the number of read steps of the sequence program or the read word number of the device memory are included.

【0070】従って、このプログラマブルコントローラ
では、要求コードによって読出しデータをシーケンスプ
ログラムとデバイスメモリのデータの何れか一方に選択
的に指定でき、シーケンスプログラムの読出し先頭ステ
ップあるいはデバイスメモリの読出し先頭アドレスと、
シーケンスプログラムの読出しステップ数あるいはデバ
イスメモリの読出しワード数を指定することにより必要
分のシーケンスプログラムあるいはデバイスメモリのデ
ータを外部記憶媒体に取り出すことができる。
Therefore, in this programmable controller, the read data can be selectively designated as either the sequence program or the data in the device memory by the request code, and the read start step of the sequence program or the read start address of the device memory,
By specifying the number of read steps of the sequence program or the number of read words of the device memory, it is possible to take out the necessary amount of data of the sequence program or device memory to the external storage medium.

【0071】次の発明によるプログラマブルコントロー
ラは、外部記憶媒体を着脱可能に装着される外部記憶媒
体ドライバを有し、当該外部記憶媒体ドライバには外部
記憶媒体が装着されることによりオン信号を出力するス
イッチが設けられ、前記割込み回路は前記スイッチが出
力するオン信号を取り込むことにより割込み信号を発生
するものである。
A programmable controller according to the next invention has an external storage medium driver to which an external storage medium is detachably attached, and outputs an ON signal when the external storage medium is attached to the external storage medium driver. A switch is provided, and the interrupt circuit generates an interrupt signal by taking in an ON signal output from the switch.

【0072】従って、このプログラマブルコントローラ
では、外部記憶媒体が外部記憶媒体ドライバに装着さ
れ、これによってスイッチがオン信号を出力すること
で、割込み回路が割込み信号を発生する。
Therefore, in this programmable controller, the external storage medium is attached to the external storage medium driver, and the switch outputs the ON signal, whereby the interrupt circuit generates the interrupt signal.

【0073】[0073]

【0074】[0074]

【0075】[0075]

【発明の実施の形態】以下に添付の図を参照してこの発
明を実施例について詳細に説明する。なお、この発明の
実施例において上述の従来例と同一構成の部分は、上述
の従来例に付した符号と同一の符号を付してその説明を
省略する。
BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. In the embodiment of the present invention, the same components as those in the above-mentioned conventional example are designated by the same reference numerals as those in the above-described conventional example, and the description thereof will be omitted.

【0076】[実施例1]図1はこの発明に係るプログ
ラマブルコントローラの概略構成を示している。
[Embodiment 1] FIG. 1 shows a schematic configuration of a programmable controller according to the present invention.

【0077】CPUユニット1は、外部記憶媒体である
ICメモリカード17を脱着可能に装填されるICメモ
リカードドライバ20と、ICメモリカード17の先頭
アドレスをCPUユニット1のRAM全体のメモリマッ
プの所定番地、例えば10000番地に割付けるアドレ
ス割付け手段13と、ICメモリカード17がCPUユ
ニット1に装着されたときに割込み信号を発生する割込
み回路14とを新たに有し、割込み回路14が発生する
割込み信号は割込み信号線18によってCPU12に直
接入力される。
In the CPU unit 1, the IC memory card driver 20 into which the IC memory card 17, which is an external storage medium, is detachably mounted, and the start address of the IC memory card 17 are set in a predetermined memory map of the entire RAM of the CPU unit 1. An address allocating means 13 for allocating to an address, for example, 10000, and an interrupt circuit 14 for newly generating an interrupt signal when the IC memory card 17 is attached to the CPU unit 1 are newly provided, and the interrupt circuit 14 generates an interrupt. The signal is directly input to the CPU 12 by the interrupt signal line 18.

【0078】図2に示されているように、ICメモリカ
ードドライバ20にはリミットスイッチ20aが設けら
れており、リミットスイッチ20aはドライバ20にI
Cメモリカード17が装着されたときに、オン信号を発
生する。割込み回路14はこのオン信号を取り込むこと
によって割込み信号を発生する。システムROM9に格
納されているシステムプログラムは、シーケンスプログ
ラムメモリ7のデータをICメモリカード17に書込む
処理を行う部分を有している。
As shown in FIG. 2, the IC memory card driver 20 is provided with a limit switch 20a.
An ON signal is generated when the C memory card 17 is attached. The interrupt circuit 14 generates an interrupt signal by taking in this ON signal. The system program stored in the system ROM 9 has a portion for writing the data in the sequence program memory 7 into the IC memory card 17.

【0079】外部周辺機器2は、ICメモリカード17
を脱着可能に装着される型式のものであり、ICメモリ
カード17へシーケンスプログラム読出しなどの交信要
求データを登録するデータ登録手段15と、ICメモリ
カード17からシーケンスプログラム読出しなどの交信
応答データを読み出すデータ読出し手段16とを有して
いる。
The external peripheral device 2 is the IC memory card 17
Is a removably mounted type, and data registration means 15 for registering communication request data such as sequence program read to the IC memory card 17, and communication response data such as sequence program read from the IC memory card 17. It has a data reading means 16.

【0080】外部周辺機器2は、図には示されていない
が、ICメモリカード登録用バッファを有しており、こ
のバッファは、図3に示されているように、要求データ
の有無を示すフラグが格納されるフラグ格納エリアと、
データ長格納エリアと、要求コード格納エリアと、オフ
セットステップ値格納エリアと、読出しステップ数格納
エリアとを含んでいる。
Although not shown in the figure, the external peripheral device 2 has an IC memory card registration buffer, and this buffer indicates the presence or absence of request data, as shown in FIG. A flag storage area where flags are stored,
It includes a data length storage area, a request code storage area, an offset step value storage area, and a read step number storage area.

【0081】ここで、0ステップ目から9ステップ目ま
での長さ10ステップのシーケンスプログラムがシーケ
ンスプログラムメモリ7に格納されているとして、この
長さ10ステップのシーケンスプログラムをPCのCP
Uユニット1からICメモリカード17に読み出す一連
の処理について説明する。
Here, assuming that a sequence program having a length of 10 steps from the 0th step to the 9th step is stored in the sequence program memory 7, the sequence program having a length of 10 steps is stored in the CP of the PC.
A series of processes for reading from the U unit 1 to the IC memory card 17 will be described.

【0082】ユーザーが、外部周辺機器2の電源を入れ
ると、図4に示されているメインメニューがディスプレ
イ部2aに画面表示される。このメインメニューには、
「ICメモリカードへのPC読出し登録」、「ICメモ
リカードからのPC読出し」、「ICメモリカードへの
デバイスメモリ読出し」の各項目が1〜3段目に表示さ
れる。
When the user turns on the power of the external peripheral device 2, the main menu shown in FIG. 4 is displayed on the display unit 2a. This main menu has
The items of "PC read registration to IC memory card", "PC read from IC memory card", and "device memory read to IC memory card" are displayed in the first to third rows.

【0083】このメインメニューより1段目の「ICメ
モリカードへのPC読出し登録」の項目を選択し、RE
Tキーを押下する。これにより図5に示されているよう
なICメモリカードへのPC読出し登録画面がオープン
する。この画面では、1段目に「読出し先頭アドレス
[ ]ステップ」、2段目に「読出し最終アドレス[]
ステップ」と表示される。
From the main menu, select the item "PC read registration to IC memory card" in the first row and click RE.
Press the T key. This opens the PC read registration screen for the IC memory card as shown in FIG. In this screen, the first row is the "read start address [] step", and the second row is the "read last address [] step".
"Step" is displayed.

【0084】本実施例の場合、読出し先頭アドレスは0
ステップ目であり、最終アドレスは9ステップ目である
から、ユーザーは1段目の[ ]内に“0”を、2段目
の[]内に“9”をそれぞれセットし、RETキーを押
下する。
In the case of this embodiment, the read start address is 0.
Since this is the 9th step and the final address is the 9th step, the user sets "0" in the first row [] and "9" in the second row [], and presses the RET key. To do.

【0085】これにより図6に示されているシーケンス
プログラム読出し要求データ作成処理ルーチンが起動さ
れ、シーケンスプログラム読出しのための交信要求デー
タの作成が行われる。
As a result, the sequence program read request data creation processing routine shown in FIG. 6 is started, and the communication request data for reading the sequence program is created.

【0086】シーケンスプログラム読出し要求データ作
成処理ルーチンでは、先ずステップS11で、外部周辺
機器2のICメモリカード登録用バッファの要求コード
格納エリアにシーケンスプログラム読出しを表す要求コ
ード“1”をセットする。
In the sequence program read request data creation processing routine, first, in step S11, the request code "1" representing the sequence program read is set in the request code storage area of the IC memory card registration buffer of the external peripheral device 2.

【0087】次にステップS12で、ICメモリカード
登録用バッファのオフセットステップ値格納エリアに読
出し先頭ステップをセットする。本実施例の場合、読出
し先頭ステップは0ステップであるから、このエリア
に"0"をセットする。次にステップS13で、ICメモ
リカード登録用バッファの読出しステップ数格納エリア
に読出しステップ数をセットする。本実施例の場合、読
出しステップ数は0ステップ目から9ステップ目までの
10ステップであるから、このエリアに10をセットす
る。
Next, in step S12, the read head step is set in the offset step value storage area of the IC memory card registration buffer. In the case of the present embodiment, since the read first step is 0 step, "0" is set in this area . In step S13 in the next, to set the number of read steps in the read step number storage area of the IC memory card registration buffer. In the case of the present embodiment, the number of read steps is 10 steps from the 0th step to the 9th step, so 10 is set in this area.

【0088】次にステップS14で、シーケンスプログ
ラム読出し要求のデータ長をICメモリカード登録用バ
ッファのデータ長格納エリアにセットする。本実施例の
場合、シーケンスプログラム読出し要求は上述のステッ
11〜13にてセットした3つのデータで構成さ
れているので、データ長格納エリアに“3”をセットす
る。
Next, in step S14, the data length of the sequence program read request is set in the data length storage area of the IC memory card registration buffer. In this embodiment, the sequence program read request because it is composed of three data sets in the above-described step S. 11 to S 13, sets "3" to the data length storage area.

【0089】次にステップS15で、フラグ格納エリア
に、“1111”、“2222”、“3333”をセッ
トする。このフラグ格納エリアのセット値は、交信要求
データがICメモリカードにセットされたことを示すも
のであり、これを要求データ有りフラグと定義する。
Next, in step S15, "1111", "2222" and "3333" are set in the flag storage area. The set value in the flag storage area indicates that the communication request data has been set in the IC memory card, and this is defined as a request data present flag.

【0090】次にステップS16で、ICメモリカード
17への交信要求データの登録処理を実行する。
Next, in step S16, the processing for registering the communication request data in the IC memory card 17 is executed.

【0091】図7は上述のステップS16におけるIC
メモリカードへの交信要求データ登録処理ルーチンを示
している。この登録処理ルーチンでは、先ずステップS
21で、ドライブ指定をICメモリカード指定とし、次
のステップS22で、ICメモリカード登録用バッファ
に既にセットされているシーケンスプログラム読出しの
交信要求データをICメモリカード17の0番地目より
順にセットする。
FIG. 7 shows the IC in step S16 described above.
The routine for the communication request data registration processing to the memory card is shown. In this registration processing routine, first, step S
In step 21, the drive designation is designated as the IC memory card designation, and in the next step S22, communication program request data for sequence program read that has already been set in the IC memory card registration buffer is set in order from the 0th address of the IC memory card 17. .

【0092】この交信要求データ登録処理ルーチンによ
りICメモリカードへの交信要求データ登録手段15は
実現される。
This communication request data registration processing routine realizes the communication request data registration means 15 for the IC memory card.

【0093】次に、ICメモリカードにシーケンスプロ
グラムを読み出す処理におけるCPUユニット1の動作
を図8に示されているプログラマブルコントローラのメ
インルーチンに従って説明する。
Next, the operation of the CPU unit 1 in the process of reading the sequence program to the IC memory card will be described according to the main routine of the programmable controller shown in FIG.

【0094】CPUユニット1に電源が投入されると、
これのメインルーチンが起動されるる。このメインルー
チンにおけるステップS31〜35は、図25に示され
ている従来のプログラマブルコントローラのメインルー
チンにおけるステップS601〜605と同じであるか
ら、その説明を省略する。
When the CPU unit 1 is powered on,
The main routine of this is started. Since steps S31 to S35 in this main routine are the same as steps S601 to S605 in the main routine of the conventional programmable controller shown in FIG. 25, description thereof will be omitted.

【0095】この発明によるプログラマブルコントロー
ラのCPUユニット1のメインルーチンでは、ステップ
S3〜40が追加されており、ステップS3では、
CPUユニット1の割込み回路14からの割込み信号の
有無をチェックし、割込み回路14からの割込み信号が
あった場合には、次のステップS37へ進み、ICメモ
リカードのアドレス割付け処理を行う。
[0095] In the programmable controller of the main routine of the CPU unit 1 according to the present invention, the step S3 6 to 40 have been added, in step S3 6,
The presence / absence of an interrupt signal from the interrupt circuit 14 of the CPU unit 1 is checked. If there is an interrupt signal from the interrupt circuit 14, the process proceeds to the next step S37, and the address allocation process of the IC memory card is performed.

【0096】図9はステップS37におけるICメモリ
カードのアドレス割付け処理ルーチンを示している。こ
のアドレス割付け処理ルーチンでは、先ずステップS5
1では、アドレス割付け手段13に“RAM全体メモリ
の10000番地をICメモリカードの先頭アドレスと
する”という指令を出し、次のステップS52では、ア
ドレス割付け手段13が、図10に示されているよう
に、アドレスコントロール線21をICメモリカードに
接続させることにより、RAM全体メモリの10000
番地をICメモリカードの0番地に見せる処理を行う。
FIG. 9 shows the address allocation processing routine of the IC memory card in step S37. In this address allocation processing routine, first, step S5
In step 1, the address allocating means 13 is instructed to "use address 10000 of the entire RAM memory as the start address of the IC memory card", and in the next step S52, the address allocating means 13 is set as shown in FIG. By connecting the address control line 21 to the IC memory card,
Processing for displaying the address as address 0 of the IC memory card is performed.

【0097】図10はCPUユニット1のRAMの全体
メモリマップを示している。アドレス割付け手段13を
使用して、10000番地をICメモリカード17の0
番地に見せることによって、CPUユニット1は、IC
メモリカード17の内容を読み出したり、ICメモリカ
ード17にデータを書き込んだりすることができるよう
になる。
FIG. 10 shows the entire memory map of the RAM of the CPU unit 1. By using the address assigning means 13, the address 10000 is set to 0 of the IC memory card 17.
By showing the address, the CPU unit 1
It becomes possible to read the contents of the memory card 17 and write data to the IC memory card 17.

【0098】次にメインルーチンのステップS38で
は、ICメモリカード17内に交信要求データが存在す
るか否かのチェックをICメモリカード17の0〜2番
地の内容、つまり図1のCPUユニット1AのRAMの
全体アドレスの10000番地〜10002番地の内容
が、“1111”、“2222”、“3333”である
か否かを判定する。
Next, in step S38 of the main routine, it is checked whether or not communication request data exists in the IC memory card 17, the contents of addresses 0 to 2 of the IC memory card 17, that is, the CPU unit 1A of FIG. It is determined whether or not the contents of the entire address 10000 to 10002 of the RAM are “1111”, “2222”, and “3333”.

【0099】その全体アドレス10000番地〜100
02番地の内容が、“1111”、“2222”、“3
333”であるならば、ICメモリカード17内に交信
要求データが有ると判別し、ステップS39へ進む。ス
テップS39では、交信要求の種類をICメモリカード
17の4番地、CPUユニット1AのRAMの全体アド
レス10004番地の値を読出すことにより判断し、そ
の値が“1”ならば、交信要求データの種類がシーケン
スプログラム読出しであると判定し、ステップS40
で、ICメモリカード17に対するシーケンスプログラ
ム読出し処理を実行する。
Total address 10000 to 100
The contents of address 02 are "1111,""2222," and "3.
If it is 333 ", it is determined that there is communication request data in the IC memory card 17, and the process proceeds to step S39. In step S39, the type of communication request is the address 4 of the IC memory card 17 and the RAM of the CPU unit 1A. It is judged by reading the value of the entire address 10004. If the value is "1", it is judged that the type of communication request data is the sequence program read, and step S40
Then, the sequence program reading process for the IC memory card 17 is executed.

【0100】ここでICメモリカード17のメモリ内容
について図11(a)を用いて説明する。ICメモリカ
ード17は、交信要求データと交信応答データのいずれ
かであるか等を示すフラグが格納される交信識別フラグ
格納エリアと、データ長格納エリアと、要求コード格納
エリアと、読出しオフセットステップ値格納エリアと、
読出しステップ数格納エリアとを有している。
Here, the memory contents of the IC memory card 17 will be described with reference to FIG. The IC memory card 17 has a communication identification flag storage area in which a flag indicating whether the communication request data or the communication response data is stored, a data length storage area, a request code storage area, and a read offset step value. Storage area,
It has a read step number storage area.

【0101】図12は上述のステップS40におけるI
Cメモリカード17に対するシーケンスプログラム読出
し処理ルーチンを示している。このルーチンでは、先
ず、ステップS61で、図11(a)に示されているI
Cメモリカード17の5番地と6番地、つまりCPUユ
ニット1のRAMの全体アドレス10005番地により
示される読出しオフセットステップ値格納エリアの内容
であるオフセットステップ値と、10006番地により
示される読出しステップ数格納エリアの内容である読出
しステップ数とを読み出し、その2つのデータの和とシ
ーケンスプログラムメモリ7の最大ステップ値との大小
比較を行う。
FIG. 12 shows I in step S40 described above.
8 shows a sequence program read processing routine for the C memory card 17. In this routine, first, in step S61, I shown in FIG.
The offset step value, which is the contents of the read offset step value storage area indicated by the total address 10005 of the RAM of the CPU unit 1, and the read step number storage area indicated by the address 10006. The number of read steps, which is the content of, is read, and the sum of the two data and the maximum step value of the sequence program memory 7 are compared in magnitude.

【0102】オフセットステップ値と読出しステップの
和がシーケンスプログラムメモリ7の最大ステップ値よ
り小さい場合には、オフセットステップ値と読出しステ
ップ数がともに正常値であるとしてステップS62へ進
む。
If the sum of the offset step value and the read step is smaller than the maximum step value of the sequence program memory 7, both the offset step value and the read step number are normal values and the process proceeds to step S62.

【0103】ステップS62では、図11(a)に示さ
れているICメモリカード17の読み出しステップ数格
納エリアに格納されている読出しステップ数と、ICメ
モリカード17のメモリ容量との大小比較を行い、読出
しステップ数がICメモリカード17のメモリ容量より
小さいならば、読出しステップ数が正常値であるとして
次のステップS3へ進み、シーケンスプログラムをI
Cメモリカード17に書き込む処理を行う。
In step S62, the size of the read step number stored in the read step number storage area of the IC memory card 17 shown in FIG. 11A and the memory capacity of the IC memory card 17 are compared. , if the number of read steps is smaller than the memory capacity of the IC memory card 17, processing proceeds as the number of read steps is normal value to the next step S 6 3, the sequence program I
The writing process to the C memory card 17 is performed.

【0104】この場合、ICメモリカード17の読出し
オフセットステップ値格納エリアに格納されているオフ
セットステップ値と読み出しステップ数格納エリアに格
納されている読出しステップ数とがそれぞれ“0”、
“10”であるから、シーケンスプログラムメモリ7に
書き込まれているシーケンスプログラムの0ステップ
(指定オフセットステップ)目より指定ステップ分、即
ち10ステップ分のシーケンスプログラムデータを、I
Cメモリカード17の8番地(図11(b)参照)、つ
まりCPUユニット1のRAMの全体アドレス1000
8番地から割り付けられた読出しデータエリアにセット
する。
In this case, the offset step value stored in the read offset step value storage area of the IC memory card 17 and the read step number stored in the read step number storage area are "0",
Since it is "10", the sequence program data corresponding to the designated step, that is, 10 steps from the 0th step (designated offset step) of the sequence program written in the sequence program memory 7 is I
Address 8 of the C memory card 17 (see FIG. 11B), that is, the entire address 1000 of the RAM of the CPU unit 1.
Set in the read data area allocated from address 8.

【0105】次にステップS64では、図11(b)に
示されているICメモリカード17の5番地と6番地、
つまりCPUユニット1のRAMの全体アドレス100
05番地と10006番地にあるオフセットステップ値
と読出しステップ数をそれぞれCPUユニット1AのR
AMの全体アドレス10006番地と10007番地に
セットすることにより、ICメモリカード17の6番地
にオフセットステップ値を、7番地に読出しステップ数
をそれぞれセットする。
Next, in step S64, addresses 5 and 6 of the IC memory card 17 shown in FIG.
That is, the entire address 100 of the RAM of the CPU unit 1
The offset step value and the number of read steps at the address 05 and the address 10006 are set to R of the CPU unit 1A.
By setting the total addresses of the AM at addresses 10006 and 10007, the offset step value is set at address 6 of the IC memory card 17, and the number of read steps is set at address 7.

【0106】次のステップS65では、ICメモリカー
ド17の5番地、つまりCPUユニット1AのRAMの
全体アドレス10005番地に正常応答を示す“0”を
セットすることにより、ICメモリカード17の5番地
に正常応答を示す“0”を0をセットする。
In the next step S65, "5" of the IC memory card 17 is set to the address 5 of the IC memory card 17, that is, the whole address 10005 of the RAM of the CPU unit 1A to set the address 5 of the IC memory card 17 to the normal address. “0” indicating a normal response is set to 0.

【0107】次にステップS66では、読出しステップ
数とヘッダ長(固定長)から応答データ長を計算し、応
答データ長をICメモリカード17の3番地、つまりC
PUユニット1のRAMの全体アドレス10003番地
にセットする。この実施例では、読出しステップ数10
ステップにヘッダ部の長さ4ステップを加えて14ステ
ップが応答データ長である。
Next, in step S66, the response data length is calculated from the number of read steps and the header length (fixed length), and the response data length is set to the third address of the IC memory card 17, that is, C.
It is set to the entire address 10003 of the RAM of the PU unit 1. In this embodiment, the number of read steps is 10
The length of the header part is added to the step, 4 steps are added, and 14 steps are the response data length.

【0108】次にステップS67では、シーケンスプロ
グラム読出しの応答コードをICメモリカード17の4
番地、つまりCPUユニット1のRAMの全体アドレス
10004番地にセットする。ここでシーケンスプロ
グラム読出しの応答コードを“81”としている。
Next, in step S67, the response code for reading the sequence program is set to 4 in the IC memory card 17.
The address is set to the total address 10004 of the RAM of the CPU unit 1. Taken here to be "81" the response code sequence program read.

【0109】次にステップS68では、ICメモリカー
ド17の0〜2番地、つまりCPUユニット1のRAM
の全体アドレス10000番地〜10002番地に応答
データ有りフラグをセットする。本実施例では、応答デ
ータ有りフラグを、“AAAAH”、“BBBBH”、
“CCCCH”としている。尚、Hは16進数を表す。
Next, in step S68, addresses 0 to 2 of the IC memory card 17, that is, the RAM of the CPU unit 1
The response data present flag is set at the total address 10000 to 10002 of the above. In this embodiment, the response data presence flag is set to "AAAAH", "BBBBH",
It is referred to as "CCCCH". H represents a hexadecimal number.

【0110】図11(c)は、上述の一連のデータ書き
込み処理を行った後のICメモリカード17のメモリ内
容である。
FIG. 11C shows the memory contents of the IC memory card 17 after the series of data write processing described above has been performed.

【0111】なお、ステップS61にてオフセットステ
ップ値と読出しステップ数との和が、シーケンスプログ
ラムメモリ7の最大ステップ値より大きい場合には、オ
フセットステップ値と読出しステップ数の値の少なくと
も何れか一方が異常値であると判定してステップS69
へ進み、ステップS69では、ICメモリカード17の
5番地に異常応答を示す“FFFFH”をセットする。
If the sum of the offset step value and the number of read steps is larger than the maximum step value of the sequence program memory 7 in step S61, at least one of the offset step value and the number of read steps is set. It is determined to be an abnormal value and step S69
In step S69, "FFFFH" indicating an abnormal response is set in the address 5 of the IC memory card 17.

【0112】次にステップS70で、そのパケット長
(応答データ長)をICメモリカード17の3番地にセ
ットし、その後にステップS67、68へ進む。
Next, in step S70, the packet length (response data length) is set in the address 3 of the IC memory card 17, and thereafter, the process proceeds to steps S67 and 68.

【0113】上述のようにデータを書き込まれたICメ
モリカード17を外部周辺機器2に装着した後、ユーザ
ーが図4に示されている外部周辺機器2のメインメニュ
ーの2段目の「ICメモリカードからのPC読出し」の
項目を選択し、RETキーを押下すると、図13に示さ
れているICメモリカードからの交信応答データ読出し
処理ルーチンが起動される。
After the IC memory card 17 in which the data has been written as described above is attached to the external peripheral device 2, the user selects "IC memory" in the second row of the main menu of the external peripheral device 2 shown in FIG. When the "PC read from card" item is selected and the RET key is pressed, the communication response data read processing routine from the IC memory card shown in FIG. 13 is started.

【0114】この交信応答データ読出し処理ルーチンで
は、先ずステップS71で、ICメモリカード17の0
〜2番地の内容を読出し、次のステップS72で、その
読出し内容が、“AAAAH”、“BBBBH”、“C
CCCH”であるか否かのチェックを行う。“AAAA
H”、“BBBBH”、“CCCCH”であるならば、
ICメモリカード17に交信応答データが存在するとい
うことであるから、この場合にはステップS73へ進
み、ICメモリカード17の2番地の以降のデータを外
部周辺機器2の受信バッファ(図示省略)にセットす
る。
In this communication response data read processing routine, first, in step S71, 0 of the IC memory card 17 is read.
The contents of the address 2 are read out, and in the next step S72, the contents read out are "AAAAH", "BBBBH", "C".
It is checked whether or not it is "CCCH".
If "H", "BBBBH", and "CCCCH",
Since the communication response data exists in the IC memory card 17, the process proceeds to step S73 in this case, and the data after the address 2 of the IC memory card 17 is stored in the reception buffer (not shown) of the external peripheral device 2. set.

【0115】この交信応答データ読出し処理ルーチンに
よりICメモリカードからの応答データ読出し手段16
が実現される。
By this communication response data reading processing routine, the response data reading means 16 from the IC memory card
Is realized.

【0116】その後、外部周辺機器2は受信バッファよ
りシーケンスプログラムを読出し、そのシーケンスプロ
グラムの表示を行う。
After that, the external peripheral device 2 reads the sequence program from the reception buffer and displays the sequence program.

【0117】上述の如き構成によれば、外部周辺機器2
にてICメモリカード17にシーケンスプログラム読出
しの交信要求データをセットすることで、外部周辺機器
2が設置されている設計室などにて読出し先頭アドレス
などのデータを変更することができ、CPUユニット1
が設置してある現場には保守担当者はICメモリカード
17だけを持参すればよく、また、その現場では、IC
メモリカード17をCPUユニット1に装着するだけ
で、所要のシーケンスプログラムの読出しを行うことが
できる。
According to the above configuration, the external peripheral device 2
By setting the communication request data for reading the sequence program in the IC memory card 17, the data such as the read start address can be changed in the design room in which the external peripheral device 2 is installed.
The person in charge of maintenance only needs to bring the IC memory card 17 to the site where the IC is installed.
Only by mounting the memory card 17 on the CPU unit 1, the required sequence program can be read.

【0118】次にシーケンスプログラム中にデバイスメ
モリをデバイスNO.0からデバイスNO.9までの1
0ワード分使用しているとして、その10ワードのデー
タをICメモリカード17に転送する一連の処理につい
て説明する。
Next, during the sequence program, the device memory is set to the device No. 0 to device No. 1 up to 9
A series of processes for transferring the data of 10 words to the IC memory card 17 assuming that 0 words are used will be described.

【0119】ユーザが外部周辺機器2の電源を入れる
と、図4に示されている前述のメインメニューがディス
プレイ部2aに画面表示される。このメインメニューの
中から3段目の「ICメモリカードへのデバイスメモリ
読出し」の項目を選択し、RETキーを押下する。
When the user turns on the power of the external peripheral device 2, the main menu shown in FIG. 4 is displayed on the display unit 2a. From the main menu, select the item "read device memory from IC memory card" on the third row and press the RET key.

【0120】これにより図14に示されているような、
ICメモリカードへのデバイスメモリ読出し画面がオー
プンする。この画面では、1段目に「読出し先頭デバイ
スNO.[ ]」と表示され、2段目に「読出し最終デ
バイスNO.[ ]」と表示される。本実施例では、先
頭デバイスNO.は“0”であり、最終デバイスNO.
は“9”であるから、ユーザーは、1段目の[ ]内に
“0”を、2段目の[]内に“9”を各々セットし、R
ETキーを押下する。
As a result, as shown in FIG.
The screen for reading the device memory to the IC memory card opens. In this screen, "reading head device No. []" is displayed in the first row, and "reading last device No. []" is displayed in the second row. In this embodiment, the first device No. Is "0", and the final device No.
Is “9”, the user sets “0” in the first row [] and sets “9” in the second row [], and R
Press the ET key.

【0121】これにより図15に示されているデバイス
メモリ読出し要求データ作成処理ルーチンが起動され
る。デバイスメモリ読出し要求データ作成処理ルーチン
では、先ずステップS81で、外部周辺機器2のICメ
モリカード登録用バッファの要求コード格納エリアに、
図16に示されているように、デバイスメモリ読出し要
求コードである“2”をセットする。
As a result, the device memory read request data creation processing routine shown in FIG. 15 is started. In the device memory read request data creation processing routine, first in step S81, in the request code storage area of the IC memory card registration buffer of the external peripheral device 2,
As shown in FIG. 16, the device memory read request code "2" is set.

【0122】これより以降のステップS82〜86は、
図6のステップS12〜16と同等であり、デバイスメ
モリ読出しのための交信要求データを外部周辺機器2の
ICメモリカード登録用バッファ(図16参照)に作成
する。この交信要求データは、データ長と、要求コード
と、オフセットアドレスと、読出しワード数とで構成さ
れる。これによりデバイスメモリ読出し要求データ(交
信要求データ)が作成され、この交信要求データは、図
7に示されている交信要求データ登録処理ルーチンによ
り、図17(a)に示されているように、ICメモリカ
ード17に登録される。
Steps S82 to S86 after this are
This is equivalent to steps S12 to S16 of FIG. 6, and communication request data for reading the device memory is created in the IC memory card registration buffer (see FIG. 16) of the external peripheral device 2. This communication request data is composed of a data length, a request code, an offset address, and the number of read words. As a result, device memory read request data (communication request data) is created, and this communication request data is processed by the communication request data registration processing routine shown in FIG. 7 as shown in FIG. It is registered in the IC memory card 17.

【0123】次に、ICメモリカード17にデバイスメ
モリ8の内容をセットする処理におけるCPUユニット
1側の動作を説明する。
Next, the operation of the CPU unit 1 side in the process of setting the contents of the device memory 8 in the IC memory card 17 will be described.

【0124】CPUユニット1に電源を入れると、図1
8に示されているメインルーチンが起動される。図18
に示されているメインルーチンは図8に示されているメ
インルーチンと同じものであり、ここでは交信要求がデ
バイス読出しの交信要求である場合に、デバイスメモリ
の読出し処理を行う。
When power is turned on to the CPU unit 1, FIG.
The main routine shown in 8 is started. FIG.
8 is the same as the main routine shown in FIG. 8. Here, when the communication request is a device read communication request, the device memory read processing is performed.

【0125】従って、ステップS39では、ICメモリ
カード17の4番地、つまりCPUユニット1のRAM
の全体アドレス10004番地の値が“2”あるか否か
を判別し、“2”ならば、交信要求データの種類がデバ
イスメモリ読出しと判定し、ステップS41で、ICメ
モリカード17に対するデバイスメモリ読出し処理を実
行する。
Therefore, in step S39, the fourth address of the IC memory card 17, that is, the RAM of the CPU unit 1
Of the entire address 10004 of "1" is "2", and if it is "2", it is determined that the type of communication request data is device memory read, and in step S41, the device memory read for the IC memory card 17 Execute the process.

【0126】図19はステップS41におけるデバイス
メモリ読出し処理ルーチンを示している。このデバイス
メモリ読出し処理ルーチンにおけるステップS91〜9
6、98〜100は図12に示されているシーケンスプ
ログラム読出し処理ルーチンにおけるステップS61〜
66、68〜70と同等であり、ステップS97では、
図17(b)に示されているように、デバイスメモリ読
出しの応答コード“82”をICメモリカード17の4
番地、つまりCPUユニット1のRAMの全体アドレス
10004番地にセットする。
FIG. 19 shows the device memory read processing routine in step S41. Steps S91 to 9 in this device memory read processing routine
6, 98 to 100 are steps S61 to S61 in the sequence program read processing routine shown in FIG.
66, 68 to 70, and in step S97,
As shown in FIG. 17B, the response code “82” for reading the device memory is set to 4 in the IC memory card 17.
The address is set to the total address 10004 of the RAM of the CPU unit 1.

【0127】図17(c)は上述の一連のデータ書き込
み処理を行った後のICメモリカード17のメモリ内容
を示している。
FIG. 17C shows the memory contents of the IC memory card 17 after the series of data writing processing described above has been performed.

【0128】以上のようにしてICメモリカード17に
デバイスメモリ8のデータを読出すことができるので、
保守担当者は、データ登録済のICメモリカード17を
CPUユニット1から抜き取り、そのICメモリカード
17を保管すれば、デバイスメモリ8のデータの吸い上
げ作業は完了する。
Since the data in the device memory 8 can be read into the IC memory card 17 as described above,
The maintenance staff pulls out the IC memory card 17 whose data has been registered from the CPU unit 1 and stores the IC memory card 17, and the work of sucking up the data in the device memory 8 is completed.

【0129】[0129]

【発明の効果】以上の説明より明かなように、この発明
によるプログラマブルコントローラにおけるデータ取出
方法においては、外部記憶媒体にデータ読出しの種類と
領域を指定した交信要求データを予め登録しておき、こ
の外部記憶媒体をプログラマブルコントローラの外部記
憶媒体ドライバにセットするだけで、プログラマブルコ
ントローラ内のシーケンスプログラムメモリやデバイス
メモリのデータを、必要分のみ脱着可能な外部記憶媒体
に取り出すことができるから、外部周辺機器をPCが設
置されている現場へ持ち運ぶ必要がなくなり、また前も
って先頭ステップ、読出しステップ数など、データ読出
し領域をプログラマブルコントローラ(CPUユニッ
ト)にセットする必要がなく、その分、保守担当者の負
担は軽減される。
As is apparent from the above description, in the data fetching method in the programmable controller according to the present invention, the communication request data designating the type and area of data reading is registered in advance in the external storage medium, and By setting the external storage medium in the external storage medium driver of the programmable controller, the data of the sequence program memory and device memory in the programmable controller can be taken out to the removable external storage medium only for the required amount, so that the external peripheral device Does not need to be carried to the site where the PC is installed, and there is no need to set the data read area such as the first step and the number of read steps in the programmable controller (CPU unit) in advance. It will be reduced.

【0130】また、デバイスメモリデータを外部周辺機
器を経由せずにプログラマブルコントローラから直接に
外部記憶媒体に転送するので、デバイスメモリのプログ
ラマブルコントローラからのデータ吸い上げの時間が従
来よりかなり短縮することができる。
Further, since the device memory data is directly transferred from the programmable controller to the external storage medium without passing through the external peripheral device, the time taken for the data to be downloaded from the programmable controller of the device memory can be considerably shortened as compared with the conventional case. .

【0131】次の発明によるプログラマブルコントロー
ラにおけるデータ取出方法では、要求コードによって読
出しデータをシーケンスプログラムとデバイスメモリの
データの何れか一方に選択的に指定でき、シーケンスプ
ログラムの読出し先頭ステップあるいはデバイスメモリ
の読出し先頭アドレスと、シーケンスプログラムの読出
しステップ数あるいはデバイスメモリの読出しワード数
を指定することにより必要分のシーケンスプログラムあ
るいはデバイスメモリのデータを外部記憶媒体に取り出
すことができるから、外部周辺機器をPCが設置されて
いる現場へ持ち運ぶことなく、プログラマブルコントロ
ーラ内のシーケンスプログラムメモリやデバイスメモリ
のデータを、必要分のみ脱着可能な外部記憶媒体に取り
出すことができ、また前もって先頭ステップ、読出しス
テップ数など、データ読出し領域をプログラマブルコン
トローラにセットする必要がないから、その分、保守担
当者の負担は軽減される。
In the data fetching method in the programmable controller according to the next invention, the read data can be selectively designated as either the sequence program or the data in the device memory by the request code. By specifying the start address and the number of read steps of the sequence program or the number of read words of the device memory, the required amount of the sequence program or the data of the device memory can be taken out to the external storage medium. Data of the sequence program memory and device memory in the programmable controller can be taken out to an external storage medium that can be detached only as needed, without having to carry it to the site. Advance the top step, such as a read step number, because there is no need to set the data read-out region to the programmable controller, correspondingly, the maintenance personnel burden is reduced.

【0132】次の発明によるプログラマブルコントロー
ラにおいては、データ読出しの種類と領域を指定した交
信要求データを予め登録された外部記憶媒体をプログラ
マブルコントローラの外部記憶媒体ドライバにセットす
るだけで、プログラマブルコントローラ内のシーケンス
プログラムメモリやデバイスメモリのデータを、必要分
のみ脱着可能な外部記憶媒体に取り出すことができるか
ら、外部周辺機器をPCが設置されている現場へ持ち運
ぶ必要がなくなり、また前もって先頭ステップ、読出し
ステップ数など、データ読出し領域をプログラマブルコ
ントローラ(CPUユニット)にセットする必要がな
く、その分、保守担当者の負担は軽減される。
In the programmable controller according to the next invention, the external storage medium preregistered with the communication request data designating the type and area of data reading is set in the external storage medium driver of the programmable controller. Since the data in the sequence program memory and device memory can be taken out to the removable external storage medium only as much as necessary, it is not necessary to carry the external peripheral device to the site where the PC is installed, and the first step and the reading step in advance. It is not necessary to set the data read area such as the number in the programmable controller (CPU unit), and the burden on the maintenance staff is reduced accordingly.

【0133】また、デバイスメモリデータを外部周辺機
器を経由せずにプログラマブルコントローラから直接に
外部記憶媒体に転送するので、デバイスメモリのプログ
ラマブルコントローラからのデータ吸い上げの時間が従
来よりかなり短縮することができる。
Further, since the device memory data is directly transferred from the programmable controller to the external storage medium without passing through the external peripheral equipment, the time taken for the data to be taken from the programmable controller of the device memory can be considerably shortened as compared with the conventional case. .

【0134】次の発明によるプログラマブルコントロー
ラにおいては、要求コードによって読出しデータをシー
ケンスプログラムとデバイスメモリのデータの何れか一
方に選択的に指定でき、シーケンスプログラムの読出し
先頭ステップあるいはデバイスメモリの読出し先頭アド
レスと、シーケンスプログラムの読出しステップ数ある
いはデバイスメモリの読出しワード数を指定することに
より必要分のシーケンスプログラムあるいはデバイスメ
モリのデータを外部記憶媒体に取り出すことができるか
ら、外部周辺機器をPCが設置されている現場へ持ち運
ぶことなく、プログラマブルコントローラ内のシーケン
スプログラムメモリやデバイスメモリのデータを、必要
分のみ脱着可能な外部記憶媒体に取り出すことができ、
また前もって先頭ステップ、読出しステップ数など、デ
ータ読出し領域をプログラマブルコントローラにセット
する必要がないから、その分、保守担当者の負担は軽減
される。
In the programmable controller according to the next invention, the read data can be selectively designated to either the sequence program or the data of the device memory by the request code, and the read start step of the sequence program or the read start address of the device memory can be specified. By specifying the number of read steps of the sequence program or the number of read words of the device memory, the required amount of the sequence program or the data of the device memory can be taken out to the external storage medium. Therefore, the external peripheral device is a PC. Data of the sequence program memory and device memory in the programmable controller can be taken out to an external storage medium that can be detached only as needed, without having to carry it to the site.
Further, since it is not necessary to set the data read area such as the first step and the number of read steps in the programmable controller in advance, the burden on the maintenance staff can be reduced accordingly.

【0135】次の発明によるプログラマブルコントロー
ラにおいては、外部記憶媒体が外部記憶媒体ドライバに
装着されると、スイッチがオン信号を出力することで、
割込み回路が割込み信号を発生するから、外部記憶媒体
が外部記憶媒体ドライバに装着されれば、割込み信号が
確実に発生し、データ取出処理が行われる。
In the programmable controller according to the next invention, when the external storage medium is attached to the external storage medium driver, the switch outputs an ON signal,
Since the interrupt circuit generates an interrupt signal, if the external storage medium is attached to the external storage medium driver, the interrupt signal is reliably generated and the data fetching process is performed.

【0136】[0136]

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

【図1】 この発明によるプログラマブルコントローラ
の一実施例を示す構成図である。
FIG. 1 is a configuration diagram showing an embodiment of a programmable controller according to the present invention.

【図2】 この発明によるプログラマブルコントローラ
にて使用するICメモリカードのドライバの概略図であ
る。
FIG. 2 is a schematic diagram of a driver of an IC memory card used in the programmable controller according to the present invention.

【図3】 この発明によるプログラマブルコントローラ
におけるシーケンスプログラム読出し処理の要求データ
構成を示す説明図である。
FIG. 3 is an explanatory diagram showing a request data structure of a sequence program reading process in the programmable controller according to the present invention.

【図4】 この発明によるプログラマブルコントローラ
にて使用する外部周辺機器のメインメニューの画面を示
す図である。
FIG. 4 is a diagram showing a screen of a main menu of an external peripheral device used in the programmable controller according to the present invention.

【図5】 この発明によるプログラマブルコントローラ
にて使用する外部周辺機器のシーケンスプログラム読出
しの画面を示す図である。
FIG. 5 is a diagram showing a screen for reading a sequence program of an external peripheral device used in the programmable controller according to the present invention.

【図6】 この発明によるプログラマブルコントローラ
にて使用する外部周辺機器でのシーケンスプログラム読
出し要求データ作成処理ルーチンを示すフロー図であ
る。
FIG. 6 is a flowchart showing a sequence program read request data creation processing routine in an external peripheral device used in the programmable controller according to the present invention.

【図7】 この発明によるプログラマブルコントローラ
にて使用する外部周辺機器でのICメモリカードへの交
信要求データ登録処理ルーチンを示すフロー図である。
FIG. 7 is a flowchart showing a communication request data registration processing routine to an IC memory card in an external peripheral device used in the programmable controller according to the present invention.

【図8】 この発明によるプログラマブルコントローラ
(CPUユニット)におけるメインルーチンを示すフロ
ー図である。
FIG. 8 is a flowchart showing a main routine in the programmable controller (CPU unit) according to the present invention.

【図9】 この発明によるプログラマブルコントローラ
におけるICメモリカードのアドレス割付け処理ルーチ
ンを示すフロー図である。
FIG. 9 is a flowchart showing an address allocation processing routine of an IC memory card in the programmable controller according to the present invention.

【図10】 この発明によるプログラマブルコントロー
ラのRAMのメモリマップを示す図である。
FIG. 10 is a diagram showing a memory map of a RAM of the programmable controller according to the present invention.

【図11】 (a)はシーケンスプログラム読出し処理
の要求データを登録したICメモリカードの内容を、
(b)はシーケンスプログラム読出し処理を行っている
途中のICメモリカードの内容を、(c)はシーケンス
プログラム読出し完了後のICメモリカードの内容を各
々示す図である。
FIG. 11A shows the contents of the IC memory card in which the request data for the sequence program read processing is registered,
(B) is a diagram showing the contents of the IC memory card during the sequence program reading process, and (c) is a diagram showing the contents of the IC memory card after the completion of the sequence program reading process.

【図12】 この発明によるプログラマブルコントロー
ラにおけるシーケンスプログラム読出し処理ルーチンを
示すフロー図である。
FIG. 12 is a flowchart showing a sequence program read processing routine in the programmable controller according to the present invention.

【図13】 この発明によるプログラマブルコントロー
ラにて使用する外部周辺機器でのICメモリカードから
の交信応答データの読出し処理ルーチンを示すフロー図
である。
FIG. 13 is a flowchart showing a read processing routine of communication response data from an IC memory card in an external peripheral device used in the programmable controller according to the present invention.

【図14】 この発明によるプログラマブルコントロー
ラにおける外部周辺機器のデバイスメモリ読出しの画面
を示す図である。
FIG. 14 is a diagram showing a screen for reading device memory of an external peripheral device in the programmable controller according to the present invention.

【図15】 この発明によるプログラマブルコントロー
ラにおける外部周辺機器でのデバイスメモリ読出し要求
データ作成処理ルーチンを示すフロー図である。
FIG. 15 is a flowchart showing a device memory read request data creation processing routine in an external peripheral device in the programmable controller according to the present invention.

【図16】 この発明によるプログラマブルコントロー
ラにおけるデバイスメモリ読出し処理の要求データ構成
を示す図である。
FIG. 16 is a diagram showing a request data structure of a device memory reading process in the programmable controller according to the present invention.

【図17】 (a)はデバイスメモリ読出し処理の要求
データを登録したICメモリカードの内容を、(b)は
デバイスメモリ読出し処理を行っている途中のICメモ
リカードの内容を、(c)はデバイスメモリ読出し完了
後のICメモリカードの内容を各々示す図である。
FIG. 17A is a content of an IC memory card in which request data for device memory read processing is registered, FIG. 17B is a content of an IC memory card in the middle of device memory read processing, and FIG. It is a figure which shows the content of each IC memory card after the completion of device memory reading.

【図18】 この発明によるプログラマブルコントロー
ラにおけるメインルーチンを示すフロー図である。
FIG. 18 is a flowchart showing a main routine in the programmable controller according to the present invention.

【図19】 この発明によるプログラマブルコントロー
ラにおけるデバイスメモリ読出し処理ルーチンを示すフ
ロー図である。
FIG. 19 is a flowchart showing a device memory read processing routine in the programmable controller according to the present invention.

【図20】 従来のプログラマブルコントローラの構成
図である。
FIG. 20 is a block diagram of a conventional programmable controller.

【図21】 従来例における外部周辺機器のメインメニ
ューの画面を示す図である。
FIG. 21 is a diagram showing a screen of a main menu of an external peripheral device in a conventional example.

【図22】 従来例における外部周辺機器のシーケンス
プログラム読出しの画面を示す図である。
FIG. 22 is a diagram showing a screen for reading a sequence program of an external peripheral device in a conventional example.

【図23】 従来例における外部周辺機器でのシーケン
スプログラム読出し要求データ作成処理ルーチンを示す
フロー図である。
FIG. 23 is a flowchart showing a sequence program read request data creation processing routine in an external peripheral device in a conventional example.

【図24】 シーケンスプログラム読出し要求データが
外部周辺機器の送信バッファにセットされた状態を表す
図である。
FIG. 24 is a diagram showing a state in which sequence program read request data is set in a transmission buffer of an external peripheral device.

【図25】 従来例におけるプログラマブルコントロー
ラのメインルーチンを示すフロー図である。
FIG. 25 is a flowchart showing a main routine of a programmable controller in a conventional example.

【図26】 従来例における外部周辺機器からの要求デ
ータ受信処理ルーチンを示すフロー図である。
FIG. 26 is a flowchart showing a request data reception processing routine from an external peripheral device in a conventional example.

【図27】 シーケンスプログラム読出しの要求データ
がプログラマブルコントローラの受信バッファにセット
された状態を表す図である。
FIG. 27 is a diagram showing a state in which request data for reading a sequence program is set in a reception buffer of the programmable controller.

【図28】 従来例におけるシーケンスプログラム読出
し処理ルーチンを示すフロー図である。
FIG. 28 is a flowchart showing a sequence program read processing routine in a conventional example.

【図29】 シーケンスプログラムメモリに格納された
シーケンスプログラム例を示す図である。
FIG. 29 is a diagram showing an example of a sequence program stored in a sequence program memory.

【図30】 シーケンスプログラム読出しの応答データ
がプログラマブルコントローラの送信バッファにセット
された状態を表す図である。
FIG. 30 is a diagram showing a state in which response data for reading a sequence program is set in a transmission buffer of a programmable controller.

【図31】 従来例における外部周辺機器のデバイスメ
モリ読出しの画面を示す図である。
FIG. 31 is a diagram showing a screen for reading a device memory of an external peripheral device in a conventional example.

【図32】 従来例における外部周辺機器でのデバイス
メモリ読出し要求データ作成処理ルーチンを示すフロー
図である。
FIG. 32 is a flowchart showing a device memory read request data creation processing routine in an external peripheral device in a conventional example.

【図33】 バイスメモリ読出し要求データが外部周辺
機器の送信バッファにセットされた状態を示す図であ
る。
FIG. 33 is a diagram showing a state in which vice memory read request data is set in a transmission buffer of an external peripheral device.

【図34】 従来例におけるプログラマブルコントロー
ラのメインルーチンを示すフロー図である。
FIG. 34 is a flowchart showing a main routine of a programmable controller in a conventional example.

【図35】 デバイスメモリ読出しの要求データがプロ
グラマブルコントローラの受信バッファにセットされた
状態を表す図である。
FIG. 35 is a diagram showing a state in which request data for device memory reading is set in a reception buffer of the programmable controller.

【図36】 従来例におけるデバイスメモリ読出し処理
ルーチンを示すフロー図である。
FIG. 36 is a flowchart showing a device memory read processing routine in a conventional example.

【図37】 デバイスメモリの内容を示す図である。FIG. 37 is a diagram showing the contents of a device memory.

【図38】 デバイスメモリ読出しの応答データがプロ
グラマブルコントローラの送信バッファにセットされた
状態を表す図である。
FIG. 38 is a diagram showing a state in which response data of device memory read is set in a transmission buffer of the programmable controller.

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

1 CPUユニット,2 外部周辺機器,3 ケーブ
ル,4 周辺インタフェース,5 受信バッファ,6
送信バッファ,7 シーケンスプログラムメモリ,8
デバイスメモリ,9 システムROM,10 データR
AM,11 各種信号線,12 CPU,13 アドレ
ス割付け手段,14 割込み回路,15要求データ登録
手段,16 応答データ読出し手段,17 ICメモリ
カード,18 割込み信号線,19 メモリ,20 I
Cカードドライバ,21 アドレスコントロール線
1 CPU unit, 2 external peripheral device, 3 cable, 4 peripheral interface, 5 receive buffer, 6
Transmission buffer, 7 Sequence program memory, 8
Device memory, 9 system ROM, 10 data R
AM, 11 various signal lines, 12 CPU, 13 address allocating means, 14 interrupt circuit, 15 request data registration means, 16 response data reading means, 17 IC memory card, 18 interrupt signal line, 19 memory, 20 I
C card driver, 21 address control line

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G05B 19/05 G06K 17/00 G06K 19/00 ─────────────────────────────────────────────────── ─── Continuation of front page (58) Fields surveyed (Int.Cl. 7 , DB name) G05B 19/05 G06K 17/00 G06K 19/00

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 シーケンスプログラムに基づいて制御対
象機器を制御するプログラマブルコントローラのデータ
を脱着可能な外部記憶媒体に取り出す方法において、 外部記憶媒体にデータ読出しの種類と領域を指定した交
信要求データを書換可能に登録し、当該外部記憶媒体が
プログラマブルコントローラに設けられた外部記憶媒体
ドライバにセットされることにより、割込み信号を発生
して外部記憶媒体のメモリアドレスをプログラマブルコ
ントローラのメモリアドレスに割付けて、前記外部記憶
媒体内の交信要求データを読み出すことによりデータ読
出しの種類と領域の指定情報を取得し、当該領域の指定
情報を正常値であると判定した場合に、指定された種類
および領域のデータを交信応答データとして前記外部記
憶媒体に書き込み、一方で、前記領域の指定情報を異常
値であると判定した場合に、前記外部記憶媒体に異常で
あることを示すデータを書き込むことを特徴とするプロ
グラマブルコントローラにおけるデータ取出方法。
1. A method of retrieving data of a programmable controller for controlling a controlled device based on a sequence program into a removable external storage medium, wherein communication request data designating a type and area of data reading is rewritten in the external storage medium. capable registered, by the external storage medium is set in the external storage medium driver provided in the programmable controller, and assigned to generate an interrupt signal to a memory address of the external storage medium to the memory address of the programmable controller, wherein acquires designation information of the type and area of the data read by reading the communication request data in the external storage medium, designation of the area
When it is determined that the information is a normal value, the data of the designated type and area is written to the external storage medium as the communication response data, while the designated information of the area is abnormal.
A data extraction method in a programmable controller, characterized in that, when it is determined that the value is a value, data indicating an abnormality is written in the external storage medium.
【請求項2】 前記交信要求データは、データ読出しの
種類を指定するデータとしてシーケンスプログラムの読
出しとデバイスメモリのデータ読出しとを識別する要求
コードを有し、データ読出しの領域を指定するデータと
してシーケンスプログラムの読出し先頭ステップあるい
はデバイスメモリの読出し先頭アドレスと、シーケンス
プログラムの読出しステップ数あるいはデバイスメモリ
の読出しワード数とを含んでいることを特徴とする請求
項1に記載のプログラマブルコントローラにおけるデー
タ取出方法。
2. The communication request data has a request code for identifying read of a sequence program and data read of a device memory as data for designating a type of data read, and sequence as data for designating a data read area. 2. The data fetching method in a programmable controller according to claim 1, wherein the method includes a program read start step or a device memory read start address, and a sequence program read step number or a device memory read word number.
【請求項3】 シーケンスプログラムに基づいて制御対
象機器を制御するプログラマブルコントローラにおい
て、 脱着可能な外部記憶媒体の装着により割込み信号を発生
する割込み回路と、前記割込み信号により前記外部記憶
媒体のメモリアドレスをプログラマブルコントローラの
メモリアドレスに割付けるアドレス割付け手段と、前記
外部記憶媒体に登録された交信要求データを前記アドレ
ス割付け手段によって割り付けられたメモリアドレスに
読み出すことによりデータ読出しの種類と領域の指定情
報を取得する読出し手段と、前記領域の指定情報を正常
値であると判定した場合に、指定された種類および領域
のデータを交信応答データとして前記外部記憶媒体に書
き込む書込み手段とを有し、前記書込み手段は、前記領
域の指定情報を異常値であると判定した場合に、前記外
部記憶媒体に異常であることを示すデータを書き込むこ
とを特徴とするプログラマブルコントローラ。
3. A programmable controller for controlling a control target device based on a sequence program, wherein an interrupt circuit for generating an interrupt signal when a removable external storage medium is attached, and a memory address of the external storage medium by the interrupt signal are provided. an address assignment means for assigning the memory addresses of the programmable controller, said external storage medium to the registered communication request read <br/> data to the memory address allocated by the address allocation unit by tying the data read type And designation information of the area
Information to read information and the specified information of the area is normal
If it is determined to be a value, the specified type and area
Is written in the external storage medium as communication response data.
And a writing means for burn them, said writing means, said territory
A programmable controller, characterized in that, when it is determined that the area designation information is an abnormal value, data indicating that the area is abnormal is written to the external storage medium.
【請求項4】 前記交信要求データは、データ読出しの
種類を指定するデータとしてシーケンスプログラムの読
出しとデバイスメモリのデータ読出しとを識別する要求
コードを有し、データ読出しの領域を指定するデータと
してシーケンスプログラムの読出し先頭ステップあるい
はデバイスメモリの読出し先頭アドレスと、シーケンス
プログラムの読出しステップ数あるいはデバイスメモリ
の読出しワード数とを含んでいることを特徴とする請求
項3に記載のプログラマブルコントローラ。
4. The communication request data has a request code for identifying read of a sequence program and data read of a device memory as data for designating a data read type, and a sequence as data for designating a data read area. 4. The programmable controller according to claim 3, wherein the programmable controller includes a program read start step or a device memory read start address, and a sequence program read step number or a device memory read word number.
【請求項5】 外部記憶媒体を着脱可能に装着される外
部記憶媒体ドライバを有し、当該外部記憶媒体ドライバ
には外部記憶媒体が装着されることによりオン信号を出
力するスイッチが設けられ、前記割込み回路は前記スイ
ッチが出力するオン信号を取り込むことにより割込み信
号を発生することを特徴とする請求項3または4に記載
のプログラマブルコントローラ。
5. An external storage medium driver to which an external storage medium is detachably mounted, wherein the external storage medium driver is provided with a switch that outputs an ON signal when the external storage medium is mounted, The programmable controller according to claim 3, wherein the interrupt circuit generates an interrupt signal by taking in an ON signal output from the switch.
JP21785795A 1995-08-25 1995-08-25 Data extraction method in programmable controller and programmable controller Expired - Fee Related JP3399709B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21785795A JP3399709B2 (en) 1995-08-25 1995-08-25 Data extraction method in programmable controller and programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21785795A JP3399709B2 (en) 1995-08-25 1995-08-25 Data extraction method in programmable controller and programmable controller

Publications (2)

Publication Number Publication Date
JPH0962318A JPH0962318A (en) 1997-03-07
JP3399709B2 true JP3399709B2 (en) 2003-04-21

Family

ID=16710859

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21785795A Expired - Fee Related JP3399709B2 (en) 1995-08-25 1995-08-25 Data extraction method in programmable controller and programmable controller

Country Status (1)

Country Link
JP (1) JP3399709B2 (en)

Also Published As

Publication number Publication date
JPH0962318A (en) 1997-03-07

Similar Documents

Publication Publication Date Title
KR100782594B1 (en) Memory device having data processing function
JPS63106060A (en) Fast mutual connector for digital data processing system
JP3399709B2 (en) Data extraction method in programmable controller and programmable controller
JPH0480811A (en) Electronic equipment
JPS5916299B2 (en) Data processing method in display display system
JPH0522365A (en) Communication processor
JPS60160447A (en) Programmable controller
JP2004151762A (en) Programmable controller
JP2914538B2 (en) Programmable controller
JPS6041102A (en) Sequence control device
JP3496436B2 (en) Programmable controller
JPS6142290B2 (en)
JP2727717B2 (en) Programmable controller system
JPH0417454B2 (en)
JPS6212528B2 (en)
JPH07121021B2 (en) Line control information setting method in communication control processor
JP2002123305A (en) Real-time display data collecting system
JP2587046B2 (en) Electronic equipment
JPS59106017A (en) Testing of input/output controller
JPH04273327A (en) Back-up device for generation of static parallel processing program
JPH02109101A (en) Monitoring device
KR20070105761A (en) Memory device having data processing fuction and data processing method thereof
JPS6382536A (en) Channel device
JPH03186951A (en) Memory capacity setting device
JP2000242389A (en) Display device, window display method and storage medium

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees