JPH04218807A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH04218807A
JPH04218807A JP40380790A JP40380790A JPH04218807A JP H04218807 A JPH04218807 A JP H04218807A JP 40380790 A JP40380790 A JP 40380790A JP 40380790 A JP40380790 A JP 40380790A JP H04218807 A JPH04218807 A JP H04218807A
Authority
JP
Japan
Prior art keywords
variable
program
storage device
external storage
variables
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.)
Withdrawn
Application number
JP40380790A
Other languages
Japanese (ja)
Inventor
Hiroaki Saegusa
宏明 三枝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP40380790A priority Critical patent/JPH04218807A/en
Publication of JPH04218807A publication Critical patent/JPH04218807A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To easily preserve or take out a variable in a program in the BASIC language in or from an external storage device in the command level and to preserve this variable in the external storage device even in the state that the BASIC program cannot be executed because of trouble of hardware. CONSTITUTION:A variable holding memory area is provided where a specific variable of variables used by the program in the BASIC language is stored in such mode that it is not initialized at the time of program execution, and the variable to be held is stored in the variable holding memory area and is held without being initialized at the time of program execution, and the variable in the variable holding memory area is preserved in the external storage device or the variable preserved in the external storage device is taken out to the variable holding memory area by a defined command.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、プログラマブルコント
ローラに関し、特にBASIC言語によるプログラムに
より動作するユーザインタフェースを有するプログラマ
ブルコントローラに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller, and more particularly to a programmable controller having a user interface operated by a program written in BASIC language.

【0002】0002

【従来の技術】プログラマブルコントローラとして、B
ASIC言語によるプログラムにより動作するユーザイ
ンタフェースを有しているものが知られている。このプ
ログラマブルコントローラに於いては、BASIC言語
によるプログラムの実行に際し、プログラムの実行に使
用する変数メモリエリアを確保し、変数メモリエリアに
格納された以前の変数の値の影響を受けるこなくプログ
ラムが実行されるよう、プログラムの実行に先だって変
数メモリエリアを初期化することが行われる。
[Prior Art] As a programmable controller, B
Some devices are known that have user interfaces that operate using programs written in ASIC language. In this programmable controller, when executing a program using the BASIC language, a variable memory area used for executing the program is secured, and the program is executed without being affected by the previous variable values stored in the variable memory area. In order to do so, the variable memory area is initialized prior to program execution.

【0003】0003

【発明が解決しようとする課題】プログラマブルコント
ローラに用いられるBASIC言語によるプログラムに
於ける変数の取扱は、プログラムの実行範囲内にて完結
するが、しかし、特定のタイミングにて変数データを外
部記憶装置に保存しようとすると、また外部記憶装置に
保存された変数データを再利用のためにプログラムに取
り込もうとすると、その各処理のために特別なプログラ
ムをユーザが作成する必要が生じる。
[Problem to be Solved by the Invention] The handling of variables in a program using the BASIC language used in a programmable controller is completed within the execution range of the program, but it is difficult to store variable data at a specific timing in an external storage device. When attempting to save variable data stored in an external storage device into a program for reuse, the user must create a special program for each process.

【0004】また、上述の如き処理のためのプログラム
が準備されていないと、システムにハードウェア上の障
害が突発的に発生し、ハードウェアを交換せざるを得な
い状況に陥ると、使用中の変数を保存、再使用すること
が不可能になる。
[0004] Furthermore, if a program for the above-mentioned processing is not prepared, if a hardware failure suddenly occurs in the system and the hardware has to be replaced, the variables become impossible to save and reuse.

【0005】本発明は、従来のプログラマブルコントロ
ーラに於ける上述の如き問題点に着目してなされたもの
であり、BASIC言語によるプログラムに於ける変数
を、コマンドレベルにて、容易に外部記憶装置に保存、
或は外部記憶装置より取出すことができ、しかもハード
ウェアの障害によりBASICプログラムが実行され得
ない状態下であっても前記変数を外部記憶装置に保存で
きるよう構成されたプログラマブルコントローラを提供
することを目的としている。
The present invention was made by focusing on the above-mentioned problems in conventional programmable controllers, and allows variables in a program written in BASIC language to be easily stored in an external storage device at the command level. keep,
Alternatively, it is an object of the present invention to provide a programmable controller configured such that the variables can be retrieved from an external storage device and can be saved in the external storage device even under a condition where the BASIC program cannot be executed due to a hardware failure. The purpose is

【0006】[0006]

【課題を解決するための手段】上述の如き目的は、本発
明によれば、BASIC言語によるプログラムにより動
作するユーザインタフェースを有するプログラマブルコ
ントローラに於いて、BASIC言語によるプログラム
にて使用する変数のうち特定の変数をプログラム実行時
に初期化されない態様にて格納する変数保持メモリエリ
アを有し、定義されたコマンドにより前記変数保持メモ
リエリアの変数を外部記憶装置に保存し且つ外部記憶装
置に保存された変数を前記変数保持メモリエリアに取出
すよう構成されていることを特徴とするプログラマブル
コントローラによって達成される。
[Means for Solving the Problems] According to the present invention, in a programmable controller having a user interface operated by a program in the BASIC language, it is possible to specify among variables used in the program in the BASIC language. A variable holding memory area that stores variables in a manner that is not initialized during program execution, and a variable holding memory area that stores variables in the variable holding memory area in an external storage device by a defined command, and a variable that is saved in the external storage device. This is accomplished by a programmable controller configured to retrieve the variable into the variable holding memory area.

【0007】[0007]

【作用】上述の如き構成によれば、BASIC言語によ
るプログラムにて使用する変数のうち特定の変数、即ち
保持すべき変数は変数保持メモリエリアに格納され、こ
れによりこの変数はプログラム実行時に初期化されるこ
となく保持され、定義されたコマンドにより外部記憶装
置に保存(セーブ)され、また外部記憶装置に保存され
た変数は定義されたコマンドにより変数保持メモリエリ
アに取出(ロード)される。
[Operation] According to the above-mentioned structure, a specific variable among the variables used in a program written in the BASIC language, that is, a variable to be held, is stored in the variable holding memory area, and this variable is thereby initialized when the program is executed. Variables stored in the external storage device are stored (saved) in an external storage device by a defined command, and are retrieved (loaded) into the variable storage memory area by a defined command.

【0008】[0008]

【実施例】以下に添付の図を参照して本発明を実施例に
ついて詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below with reference to the accompanying drawings.

【0009】図1は本発明によるプログラマブルコント
ローラの一実施例を示している。このプログラマブルコ
ントローラは、PC本体としてのCPU部1と、BAS
IC言語動作部10とを有している。
FIG. 1 shows an embodiment of a programmable controller according to the present invention. This programmable controller includes a CPU section 1 as a PC main body, and a BAS
It has an IC language operation section 10.

【0010】CPU部1は、MPU2と、プログラマブ
ルコントローラのシステムプログラムを格納したシステ
ムROM3と、プログラマブルコントローラのユーザプ
ログラム、プログラマブルコントローラの変数等を格納
するRAM4と、入出力インタフェース5と、外部記憶
装置インタフェース6とを有している。外部記憶装置イ
ンタフェース6にはメモリカード等の外部記憶装置7が
接続されている。
The CPU unit 1 includes an MPU 2, a system ROM 3 storing a programmable controller system program, a RAM 4 storing a programmable controller user program, programmable controller variables, etc., an input/output interface 5, and an external storage device interface. 6. An external storage device 7 such as a memory card is connected to the external storage device interface 6.

【0011】BASIC言語動作部10は、MPU11
と、BASIC言語によるプログラムの実行のためのシ
ステムプログラムを格納したシステムROM12と、R
OM13と、プログラマブルコントローラインタフェー
ス14と、入出力インタフェース15とを有しており、
プログラマブルコントローラインタフェース14により
CPU部1と接続され、入出力インタフェース15には
CRT16とコマンド入力用のキーボード17が接続さ
れている。
[0011] The BASIC language operating unit 10 is an MPU 11
, a system ROM 12 storing a system program for executing programs in BASIC language, and R
It has an OM 13, a programmable controller interface 14, and an input/output interface 15,
It is connected to the CPU unit 1 through a programmable controller interface 14, and a CRT 16 and a keyboard 17 for inputting commands are connected to an input/output interface 15.

【0012】BASIC言語動作部10のROM13は
、図示されている如く、BASIC言語によるユーザプ
ログラムを格納するユーザプログラムエリアとワークエ
リア以外に、BASIC言語によるユーザプログラムの
実行に使用する一般変数を格納する一般変数エリアと特
定の変数を格納する保持変数エリアとを個別に有してい
る。この場合、一般変数エリアはBASIC言語による
ユーザプログラムの実行に先だって初期化され、一般変
数エリアに格納されている変数はユーザプログラムの実
行によって自動的に消去されるようになっているが、保
持変数エリアはBASIC言語によるユーザプログラム
の実行に際して初期化されずに保持され、この保持変数
エリアに格納されている変数はBASIC言語によるユ
ーザプログラムの実行によっては消去されないようにな
っている。
As shown in the figure, the ROM 13 of the BASIC language operating unit 10 stores general variables used for executing user programs in the BASIC language, in addition to a user program area and a work area that store user programs in the BASIC language. It has separate general variable areas and holding variable areas for storing specific variables. In this case, the general variable area is initialized before the execution of the user program in BASIC language, and the variables stored in the general variable area are automatically erased by the execution of the user program, but the retained variables The area is held without being initialized when a user program in BASIC language is executed, and the variables stored in this holding variable area are not erased by execution of a user program in BASIC language.

【0013】前記保持変数エリアの変数の外部記憶装置
7に対する保存は予め定義された”VSAVE”の如き
コマンドのキーボード17よりのキーインにより行われ
、また外部記憶装置7に保存された変数の前記保持変数
エリアに対する取出しは予め定義された”VLOAD”
の如きコマンドのキーボード17よりのキーインにより
行われようになっている。このためこのBASIC言語
動作部10のBASIC言語には、各々コマンドとして
、”VSAVE”と”VLOAD”とが準備されている
Saving of the variables in the retained variable area to the external storage device 7 is performed by keying in a predefined command such as "VSAVE" from the keyboard 17, and the above-mentioned retention of the variables stored in the external storage device 7 Extraction from the variable area is done using the predefined “VLOAD”
This is performed by keying in a command such as the following from the keyboard 17. For this reason, the BASIC language of the BASIC language operation unit 10 has two commands, ``VSAVE'' and ``VLOAD.''

【0014】図2は本発明によるプログラマブルコント
ローラのBASIC言語動作部10の動作フローを示し
ている。電源の投入によりBASIC言語動作部10が
起動されると、先ず、BASIC言語によるユーザプロ
グラムの実行であるか、否かの判別が行われる(ステッ
プ10)。BASIC言語によるユーザプログラムの実
行である場合は、ROM13のうち上述の一般変数エリ
ヤの初期化が行われ(ステップ20)、次にプログラム
が実行される(ステップ30)。
FIG. 2 shows the operational flow of the BASIC language operating section 10 of the programmable controller according to the present invention. When the BASIC language operating unit 10 is activated by turning on the power, first, it is determined whether or not a user program is to be executed in the BASIC language (step 10). When executing a user program in BASIC language, the above-mentioned general variable area of the ROM 13 is initialized (step 20), and then the program is executed (step 30).

【0015】これに対し、BASIC言語によるユーザ
プログラムの実行でない場合は、次に実行すべきコマン
ドが保時変数関係コマンド、即ち”VSAVE”或は”
VLOAD”であるか、否かの判別が行われる(ステッ
プ40)。次に実行すべきコマンドが保時変数関係コマ
ンドでない場合は、各種ダイレクトコマンド、或はプロ
グラム編集が実行される(ステップ50)。
On the other hand, if the user program is not executed in the BASIC language, the next command to be executed is a timekeeping variable related command, ie, "VSAVE" or "
VLOAD" or not (step 40). If the next command to be executed is not a timekeeping variable related command, various direct commands or program editing are executed (step 50). .

【0016】次に実行すべきコマンドが保時変数関係コ
マンド、即ち”VSAVE”或は”VLOAD”である
場合は、ROM13のうち上述の保持変数エリアの変数
が外部記憶装置7に対する保存、或は外部記憶装置7に
保存された変数が保持変数エリアに対する取出される(
ステップ60)。
When the next command to be executed is a time-retention variable related command, ie, "VSAVE" or "VLOAD," the variables in the above-mentioned retention variable area of the ROM 13 are stored in the external storage device 7 or The variables stored in the external storage device 7 are retrieved from the retained variable area (
Step 60).

【0017】図3は、BASIC言語によるユーザプロ
グラムの任意の場所に、保持変数の保存、取出しコマン
ド”VSAVE”、”VLOADが挿入された例を示し
ている。
FIG. 3 shows an example in which retention variable save/retrieve commands "VSAVE" and "VLOAD" are inserted at arbitrary locations in a user program written in BASIC language.

【0018】[0018]

【発明の効果】以上の説明から理解される如く、本発明
によるプログラマブルコントローラによれば、BASI
C言語によるプログラムにて使用する変数のうち特定の
変数、即ち保持すべき変数はプログラム実行時に初期化
されない変数保持メモリエリアに格納され、これにより
この変数はプログラム実行時に消去されることなく保持
され、変数保持メモリエリアの変数は定義されたコマン
ドにより外部記憶装置に保存され、また外部記憶装置に
保存された変数は定義されたコマンドにより変数保持メ
モリエリアに取出されるから、この変数の保存、取出し
がBASICプログラムの停止時に特別なプログラムを
必要とすることなく容易に行われ得るようになる。また
変数の保存、取出しのコマンドがBASICプログラム
に記述されることにより任意のタイミングにて変数保持
メモリエリアの変数の保存、取出しが行われようになる
。これらのことによりBASIC言語によるプログラム
に於ける変数データの再利用のための変数の保存、取出
しが外部記憶装置との間のデータ授受のアルゴリズムを
ユーザがプログラミングする必要がなくなる。
Effects of the Invention As understood from the above explanation, according to the programmable controller according to the present invention, BASI
Among the variables used in a C language program, certain variables, that is, variables that should be retained, are stored in a variable retention memory area that is not initialized when the program is executed, so that the variables are retained without being erased when the program is executed. , the variable in the variable holding memory area is saved to the external storage device by the defined command, and the variable saved in the external storage device is retrieved to the variable holding memory area by the defined command, so the saving of this variable, Extraction can be easily performed when the BASIC program is stopped without requiring a special program. Also, by writing commands for saving and retrieving variables in the BASIC program, variables in the variable holding memory area can be stored and retrieved at arbitrary timing. As a result, the user does not need to program an algorithm for data exchange between the external storage device and the storage and retrieval of variables for reuse of variable data in programs written in the BASIC language.

【0019】またハードウェアの故障によりモジュール
交換等を行う必要がある場合には、BASICプログラ
ムが実行できない状態でも、保持変数の保存コマンドが
実行可能で、外部記憶装置とのインタフェースが動作可
能であれば、保存コマンドの実行により現状の保持変数
の状態をそのまま外部記憶装置に保存することができ、
モジュール交換後にプログラムだけでなく、保持変数も
外部記憶装置より取出すことにより、データを再利用し
、交換前の動作状態を復元することができる。
[0019] In addition, if it is necessary to replace a module due to a hardware failure, even if the BASIC program cannot be executed, the command to save the retained variables can be executed and the interface with the external storage device can be operated. For example, by executing the save command, the current state of the retained variables can be saved as is to the external storage device.
By retrieving not only the program but also the retained variables from the external storage device after module replacement, data can be reused and the operating state before replacement can be restored.

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

【図1】本発明によるプログラマブルコントローラの一
実施例を示すブロック線図。
FIG. 1 is a block diagram showing one embodiment of a programmable controller according to the present invention.

【図2】本発明によるプログラマブルコントローラのB
ASIC言語動作部の動作フローの一例をしめすフロー
チャート。
FIG. 2 B of the programmable controller according to the present invention
3 is a flowchart showing an example of the operation flow of the ASIC language operation unit.

【図3】BASIC言語によるユーザプログラムのリス
ト例を示すリスト図。
FIG. 3 is a list diagram showing an example of a list of user programs written in BASIC language.

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

1  CPU部 2  MPU 3  システムROM 4  RAM 5  入出力インタフェース 6  外部記憶装置インタフェース 7  外部記憶装置 10  BASIC言語動作部 11  MPU 12  システムROM 13  ROM 14  プログラマブルコントローラインタフェース1
5  入出力インタフェース 16  CRT 17  キーボード17
1 CPU section 2 MPU 3 System ROM 4 RAM 5 Input/output interface 6 External storage device interface 7 External storage device 10 BASIC language operation section 11 MPU 12 System ROM 13 ROM 14 Programmable controller interface 1
5 Input/output interface 16 CRT 17 Keyboard 17

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  BASIC言語によるプログラムによ
り動作するユーザインタフェースを有するプログラマブ
ルコントローラに於いて、BASIC言語によるプログ
ラムにて使用する変数のうち特定の変数をプログラム実
行時に初期化されない態様にて格納する変数保持メモリ
エリアを有し、定義されたコマンドにより前記変数保持
メモリエリアの変数を外部記憶装置に保存し且つ外部記
憶装置に保存された変数を前記変数保持メモリエリアに
取出すよう構成されていることを特徴とするプログラマ
ブルコントローラ。
Claim 1: In a programmable controller having a user interface operated by a program in the BASIC language, variable retention for storing specific variables among variables used in the program in the BASIC language in a manner that they are not initialized when the program is executed. It has a memory area, and is configured to store variables in the variable storage memory area in an external storage device and retrieve variables stored in the external storage device into the variable storage memory area according to a defined command. A programmable controller.
JP40380790A 1990-12-19 1990-12-19 Programmable controller Withdrawn JPH04218807A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP40380790A JPH04218807A (en) 1990-12-19 1990-12-19 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP40380790A JPH04218807A (en) 1990-12-19 1990-12-19 Programmable controller

Publications (1)

Publication Number Publication Date
JPH04218807A true JPH04218807A (en) 1992-08-10

Family

ID=18513535

Family Applications (1)

Application Number Title Priority Date Filing Date
JP40380790A Withdrawn JPH04218807A (en) 1990-12-19 1990-12-19 Programmable controller

Country Status (1)

Country Link
JP (1) JPH04218807A (en)

Similar Documents

Publication Publication Date Title
US9824229B2 (en) Controller with enhanced reliability
JPH04218807A (en) Programmable controller
JP4280964B2 (en) Control data protection device
KR0170747B1 (en) A protection method for power on/off
JPH01234954A (en) Firmware control system
JP2004185290A (en) Reading/writing method to flash memory
EP3301582A1 (en) Information processing apparatus, information processing method and program
JPH1078812A (en) Method for transferring data and device for controlling data transfer
JPH01255902A (en) Method for inputting and outputting data
JPH03135628A (en) Terminal equipment
JPH06274434A (en) Computer peripheral equipment and its control method
JPH05224712A (en) Producing method of prom for programmable controller
JPH03276230A (en) Data control method for starting equipment with built-in cpu
JPH02171802A (en) Programmable controller
JPH04335438A (en) Virtual storage space generating system
JPH01298421A (en) Control method for ram with back-up battery
JPS60189536A (en) Program formation device
JPH04229302A (en) Control processor
JPH01112454A (en) Battery back-up ram data guarantee system
JPH0436816A (en) Electronic equipment containing power supply cut-off processing function
JPH0259816A (en) System parameter control system
JPH04167101A (en) Programmable controller
JPS63311506A (en) Programmable controller
JPH05250171A (en) Terminal system
JPH052251U (en) Information processing equipment

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980312