JPH01292402A - Signal referencing system for pc device - Google Patents
Signal referencing system for pc deviceInfo
- Publication number
- JPH01292402A JPH01292402A JP12257088A JP12257088A JPH01292402A JP H01292402 A JPH01292402 A JP H01292402A JP 12257088 A JP12257088 A JP 12257088A JP 12257088 A JP12257088 A JP 12257088A JP H01292402 A JPH01292402 A JP H01292402A
- Authority
- JP
- Japan
- Prior art keywords
- address
- signal
- register
- memory
- section
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000007430 reference method Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 3
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000000034 method Methods 0.000 description 1
- 230000033772 system development Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/05—Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
- G05B19/056—Programming the PLC
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はプログラマブル・コントローラ(以下、PCと
記す)に関し、特に工作機械のリレー及びコイルの状態
を信号としてPCへ入力してプログラムに従って演算し
、その演算結果を出力して工作機械を制御するようにし
たPCの信号参照方式〔従来の技術〕
従来のPCによる工作機械制御方法においては、リレー
及びコイルの状態に相当する外部の信号を入出力するた
めにPCの入出力信号端子にそれぞれ信号線を接続し、
プログラムに従って、これらの信号を参照している。プ
ログラム中では、これらの信号を参照する場合には例え
ば入力端子の1番端子はシンボル11、出力端子の1番
端子はシンボルQ1というように、信号端子と1対1に
対応したシンボルを用いて参照している。[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a programmable controller (hereinafter referred to as a PC), and in particular, the present invention relates to a programmable controller (hereinafter referred to as a PC), and in particular, a system that inputs the status of relays and coils of a machine tool as signals to a PC and performs calculations according to a program. , PC signal reference system that outputs the calculation results to control the machine tool [Prior art] In the conventional PC-based machine tool control method, external signals corresponding to the states of relays and coils are input. Connect the signal lines to the input and output signal terminals of the PC for output,
These signals are referenced according to the program. In a program, when referring to these signals, use symbols that have a one-to-one correspondence with the signal terminals, such as symbol 11 for input terminal 1 and symbol Q1 for output terminal 1. Referring to.
しかし、このような従来の方法においては、システムの
開発および保守に際してしばしば必要となる小規模な変
更に対応することすら容易ではない、すなわち、信号を
接続する端子がただ1箇所変更になった場合にも、プロ
グラム中の全命令を検索して数多くの命令を変更しなけ
ればならない。However, these conventional methods cannot easily accommodate even the small changes that are often required during system development and maintenance, i.e., when only one terminal to which a signal is connected is changed. In order to do this, one must search through all the instructions in the program and change many instructions.
例えば、プログラム中のシンボル11をすべて■2に変
更することが必要となる。プログラムがROMに格納さ
れている場合には変更に手数がかかり、特に現場での変
更は容易ではない。For example, it is necessary to change all symbols 11 in the program to ■2. If the program is stored in a ROM, it takes a lot of effort to change it, and it is especially difficult to change it on-site.
本発明はこのような問題点に鑑みてなされたものであり
、ユーザプログラムの作成、変更における柔軟性を向上
させたPCの信号参照方式を提供することを目的とする
。The present invention has been made in view of these problems, and it is an object of the present invention to provide a PC signal reference system that improves flexibility in creating and changing user programs.
本発明では、上記課題を解決するために、PC(プログ
ラマブル・コントローラ)装置の入出力信号、内部リレ
ー信号と参照するPC装置の信号参照方式において、
命令の種類を示すオペレーション部と該命令で参照する
リレーもしくはコイルのアドレスを示すアドレス部と前
記参照のモードを指示するアドレシングモード部とを含
む命令コードからなるプログラムをメモリに格納し、
該メモリから順次前記プログラムを読み出し、読み出し
たプログラムの前記アドレシングモード部が直接参照を
指示している場合には命令コード中のアドレス部が指示
するリレーもしくはコイルを演算に使用し、
前記アドレシングモード部が間接参照を指示している場
合には命令コード中のアドレス部が指示するレジスタを
参照し参照されたレジスタ中に格納されている値が指し
示すリレーもしくはコイルを演算に使用することを特徴
とするPC装置の信号参照方式、
が提供される。In order to solve the above-mentioned problems, the present invention provides a signal reference method of a PC device that refers to input/output signals and internal relay signals of a PC (programmable controller) device. A program consisting of an instruction code including an address section indicating the address of the relay or coil to be referenced and an addressing mode section indicating the mode of reference is stored in a memory, and the program is sequentially read from the memory, and the addressing of the read program is If the mode section specifies direct reference, the relay or coil specified by the address section in the instruction code is used for calculation, and if the addressing mode section specifies indirect reference, the relay or coil specified by the address section in the instruction code is used for calculation. A signal reference method for a PC device is provided, characterized in that a register indicated by an address part is referenced and a relay or coil indicated by a value stored in the referenced register is used for calculation.
前記PCはNC装置に内部されたPCであってもよく、
また、独立形PCであってもよい。The PC may be a PC built into an NC device,
Alternatively, it may be a stand-alone PC.
PCのマイクロプロセッサ(以下、CPUと記す)がプ
ログラムを1ステツプずつ解釈、実行する際に、先ず、
アドレシングモード部を構成するビットが1であるか、
0であるかを参照する。When a PC's microprocessor (hereinafter referred to as CPU) interprets and executes a program step by step, it first
Whether the bits forming the addressing mode part are 1 or
Check whether it is 0.
例えば、前記ビットがOであれば命令中のアドレス部に
格納されたアドレスを有する信号を演算に使用し、また
、前記ビットが1であるならば命令中のアドレス部に格
納されたアドレスを有するレジスタの内容を参照してこ
のレジスタに格納された値をアドレスとする信号を演算
に使用する。For example, if the bit is 0, a signal having the address stored in the address field of the instruction is used for calculation, and if the bit is 1, the signal has the address stored in the address field of the instruction. The contents of the register are referenced and a signal whose address is the value stored in this register is used for calculation.
以下、本発明の一実施例を図面に基づいて説明する。 Hereinafter, one embodiment of the present invention will be described based on the drawings.
第1図は、本発明のPC装置の信号参照方式を実施する
ハードウェアブロック図である。FIG. 1 is a hardware block diagram that implements a signal reference method of a PC device according to the present invention.
PCIは、CPU2と入力回路3と出力回路4とROM
5とRAM6とプログラム作成装置用インタフェース7
とバス8とを含む、ROM5には、システムプログラム
9が格納されている。RAM6はバッテリバックアップ
されており、ユーザプログラムメモリ10、入力リレー
メモリ11、出力リレーメモリ12、内部リレーメモリ
13及びレジスタメモリ14として使用される。PCI includes CPU2, input circuit 3, output circuit 4, and ROM.
5, RAM 6, and program creation device interface 7
A system program 9 is stored in the ROM 5, which includes a bus 8 and a bus 8. The RAM 6 is backed up by a battery and is used as a user program memory 10, an input relay memory 11, an output relay memory 12, an internal relay memory 13, and a register memory 14.
プログラム作成装置15は液晶表示装置16とキーボー
ド17とを有しており、インタフェース7に接続される
。The program creation device 15 has a liquid crystal display device 16 and a keyboard 17, and is connected to the interface 7.
第2図に、ユーザプログラムの命令コードの構成を示す
。FIG. 2 shows the structure of the instruction code of the user program.
ユーザプログラムメモリ10は構成単位が16ビツトl
ワードであり、1ワードが命令の1ステツプに対応する
。命令ステップを表現するlワードの構成は、第2図か
ら明らかなように、4ビツトのオペレーション部と1ビ
ツトのアドレシングモード部と11ビツトのアドレス部
とからなる。The user program memory 10 has a configuration unit of 16 bits.
Each word corresponds to one step of the instruction. As is clear from FIG. 2, the structure of an l word representing an instruction step consists of a 4-bit operation field, a 1-bit addressing mode field, and an 11-bit address field.
アドレシングモード部が0の時はアドレス部の信号を直
接参照し、lの時はアドレス部の指定するレジスタの内
容等を参照する。When the addressing mode section is 0, the signal in the address section is directly referenced, and when it is 1, the contents of the register specified by the address section are referenced.
第3図に、オペレーション部の4ビツトに対応する命令
の種類を示すコード表を示す。FIG. 3 shows a code table showing the types of instructions corresponding to the 4 bits of the operation section.
第4図に、アドレス部の詳細を示したコード表を示す、
アドレス部は、演算に使用するデータのアドレスを示し
ており、上位2ビツトは参照すべきメモリのタイプを表
し、下位9ビツトがビット番号を示す。Figure 4 shows a code table showing details of the address part.
The address field indicates the address of data used in the calculation, the upper 2 bits indicate the type of memory to be referenced, and the lower 9 bits indicate the bit number.
第5図に、ユーザプログラムの一例を示す、ここに、ア
ドレス0からアドレス2迄は、それらのアドレシングモ
ード部が0であるからいずれも直接参照の命令である。FIG. 5 shows an example of a user program, in which addresses 0 to 2 are all direct reference instructions since their addressing mode sections are 0.
一方、アドレス3からアドレス5迄は、それらのアドレ
シングモード部が1であるから、いずれも間接アドレス
指示の命令である0例えば、レジスタR1の内容が1で
あり、レジスタR2の内容が2であり、レジスタR3の
内容が2であるとするならば、アドレス3からアドレス
5迄の命令は、!1の信号と■2の信号との論理積をQ
2に出力すべきことを示している。On the other hand, since the addressing mode part of addresses 3 to 5 is 1, they are all indirect address instruction instructions.For example, the contents of register R1 are 1, the contents of register R2 are 2, and so on. , the contents of register R3 are 2, then the instructions from address 3 to address 5 are ! Q the AND of the signal 1 and the signal 2
2 shows what should be output.
ここで、Q2への出力を!3の信号と■4の信号との論
理積に変更する必要が生じた場合には、レジスタR1の
内容を1から3へと変更し、且つ、レジスタR2の内容
を2から4へと変更すればよい、同一の信号が多数のス
テップに於いて参照される場合であっても、プログラム
を変更する必要はなく、レジスタメモリ14の変更だけ
で済む。Here, output to Q2! If it becomes necessary to change the logical product of signal 3 and signal 4, change the contents of register R1 from 1 to 3, and change the contents of register R2 from 2 to 4. Even if the same signal is referenced in multiple steps, there is no need to change the program, and only the register memory 14 needs to be changed.
また、例えばカウンタのデータをレジスタメモリ14に
入力すれば、レジスタメモリ14を間接参照することに
よって、プログラムの実行時に読み出す信号を変化させ
ることが出来る。Further, for example, if counter data is input to the register memory 14, the signals read out during program execution can be changed by indirectly referencing the register memory 14.
尚、表示装置16として本実施例では液晶を用いたが、
CRT表示装置を用いてもよい。Although a liquid crystal was used as the display device 16 in this embodiment,
A CRT display device may also be used.
以上説明したように、本発明では、PC装置のユーザプ
ログラムメモリ中に直接的に信号のアドレスを格納する
代わりにレジスタメモリのアドレスを格納し、読み出し
たレジスタメモリの内容によって演算に使用する信号の
アドレスを決定し得るように構成したので、使用する信
号のアドレスを変更する際に全命令を検索して変更する
必要が無く、該当するレジスタメモリの内容変更のみで
済む。As explained above, in the present invention, instead of directly storing the signal address in the user program memory of the PC device, the address of the register memory is stored, and the signal used for the calculation is determined based on the read contents of the register memory. Since the configuration is such that the address can be determined, there is no need to search and change all instructions when changing the address of the signal to be used, and it is only necessary to change the contents of the corresponding register memory.
また、カウンタのデータ等をレジスタメモリに入力すれ
ば、プログラム実行時に、読み出す信号を変化させるこ
とが出来る。Furthermore, by inputting counter data and the like to the register memory, it is possible to change the readout signal during program execution.
従って、ユーザプログラムの作成時および変更時におけ
る柔軟性を大幅に向上させることが出来る。Therefore, flexibility in creating and changing user programs can be greatly improved.
第1図は本発明のPC装置の信号参照方式を実施するた
めのハードウェアのブロック図、第2図はユーザプログ
ラムの命令コード構成図、第3図はオペレーション部に
対応する命令の種類を示すコード表、
第4図はアドレス部のコード表、
第5図はユーザプログラムの例である。
1−−一−−・−−−−−−−・−・プログラマブル・
コントローラ
2・−−−−−−−−−・−・・マイクロ・プロセッサ
3・−・−・−・−−−−−一・−・入力回路4−・−
−−一−−−−・・・−・出力回路5・・−・・−・・
−−−−−・・ROM6−−−−−−−−−−・−・R
AM
7・−・−・−・−・・プログラム作成装置用インタフ
ェース
8・・・−−m−−・・−・−バス
9−・・・−・・−・−−−−−−システムプログラム
10・−−−−−−−−−−−−m−・ユーザプログラ
ム11−−−一・−−−−−一−・−・入力リレーメモ
リ12−−−−−−・−−−−・−出力リレーメモリ1
3・−m−−・−−−−−・−内部リレーメモリ14−
・・−・−−−−−−−一−・レジスタメモリ15・−
・−・−・−・−プログラム作成装置16−・−・−・
−・液晶表示装置
17−・−・−・・−・−・キーボード特許出願人 フ
ァナック株式会社
代理人 弁理士 服部毅巖
第1図
第2図
第3図Fig. 1 is a block diagram of hardware for implementing the signal reference method of the PC device of the present invention, Fig. 2 is a diagram showing the instruction code configuration of the user program, and Fig. 3 shows the types of instructions corresponding to the operation section. FIG. 4 is a code table for the address section, and FIG. 5 is an example of a user program. 1−−1−−・−−−−−−−・−・Programmable・
Controller 2 -------------- Microprocessor 3 ----------- Input circuit 4--
−−1−−−−・・Output circuit 5・・−・・−・・
-------・ROM6-------------・-・R
AM 7・−・−・−・−・Program creation device interface 8・・・−−m−−・・−・−Bus 9−・・−・−・−−−−−−System program 10.---------------m--User program 11--1.・-Output relay memory 1
3・-m−−・−−−−−・−Internal relay memory 14−
・・−・−−−−−−−1−・Register memory 15・−
・−・−・−・−Program creation device 16−・−・−・
−・Liquid crystal display device 17−・−・−・・−・−・Keyboard Patent applicant Fanuc Co., Ltd. Agent Patent attorney Takeshi Hattori Figure 1 Figure 2 Figure 3
Claims (3)
出力信号、内部リレー信号と参照するPC装置の信号参
照方式において、 命令の種類を示すオペレーション部と該命令で参照する
リレーもしくはコイルのアドレスを示すアドレス部と前
記参照のモードを指示するアドレシングモード部とを含
む命令コードからなるプログラムをメモリに格納し、 該メモリから順次前記プログラムを読み出し、読み出し
たプログラムの前記アドレシングモード部が直接参照を
指示している場合には命令コード中のアドレス部が指示
するリレーもしくはコイルを演算に使用し、 前記アドレシングモード部が間接参照を指示している場
合には命令コード中のアドレス部が指示するレジスタを
参照し参照されたレジスタ中に格納されている値が指し
示すリレーもしくはコイルを演算に使用することを特徴
とするPC装置の信号参照方式。(1) In the signal reference method of a PC device that refers to input/output signals and internal relay signals of a PC (programmable controller) device, an operation section indicating the type of instruction and an address indicating the address of the relay or coil referred to by the instruction A program consisting of an instruction code including a section and an addressing mode section instructing the mode of reference is stored in a memory, the program is sequentially read from the memory, and the addressing mode section of the read program instructs direct reference. If the addressing mode section indicates indirect reference, the relay or coil indicated by the address section in the instruction code is used for calculation, and the register indicated by the address section in the instruction code is referenced. A signal reference method for a PC device, characterized in that a relay or coil pointed to by a value stored in a referenced register is used for calculation.
を特徴とする特許請求の範囲第1項記載のPC装置の信
号参照方式。(2) A signal reference system for a PC device according to claim 1, wherein the PC is a PC built into an NC device.
許請求の範囲第1項記載のPC装置の信号参照方式。(3) A signal reference system for a PC device according to claim 1, wherein the PC is an independent PC.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP12257088A JPH01292402A (en) | 1988-05-19 | 1988-05-19 | Signal referencing system for pc device |
PCT/JP1989/000399 WO1989011686A1 (en) | 1988-05-19 | 1989-04-12 | System for making reference to signals of a pc unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP12257088A JPH01292402A (en) | 1988-05-19 | 1988-05-19 | Signal referencing system for pc device |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH01292402A true JPH01292402A (en) | 1989-11-24 |
Family
ID=14839171
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP12257088A Pending JPH01292402A (en) | 1988-05-19 | 1988-05-19 | Signal referencing system for pc device |
Country Status (2)
Country | Link |
---|---|
JP (1) | JPH01292402A (en) |
WO (1) | WO1989011686A1 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS59191612A (en) * | 1983-04-15 | 1984-10-30 | Hitachi Ltd | Input and output designating system of sequence controller |
JPS6246304A (en) * | 1985-08-23 | 1987-02-28 | Hitachi Ltd | Programmable controller |
JPS62286102A (en) * | 1986-06-05 | 1987-12-12 | Mitsubishi Electric Corp | Setting method for contents of sequencer indirect address |
JP2527722B2 (en) * | 1986-10-23 | 1996-08-28 | 株式会社日立製作所 | Programmable controller program automatic generation method and apparatus |
-
1988
- 1988-05-19 JP JP12257088A patent/JPH01292402A/en active Pending
-
1989
- 1989-04-12 WO PCT/JP1989/000399 patent/WO1989011686A1/en unknown
Also Published As
Publication number | Publication date |
---|---|
WO1989011686A1 (en) | 1989-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5319783A (en) | Programmable controller with an operator messaging function | |
JPH01292402A (en) | Signal referencing system for pc device | |
JPS5952303A (en) | Programmable controller provided with forcible operating function of input and output data | |
JP2003228418A (en) | Control apparatus for industrial purpose robot, and display method for the apparatus | |
JP3307568B2 (en) | Programmable display | |
JPS62243008A (en) | Signal trace controlling system for pmc | |
JPH02155005A (en) | Numerical controller | |
JP3533078B2 (en) | Sequence control method and control device | |
JPH0310123B2 (en) | ||
JPS63126007A (en) | Programmable controller | |
JPH01223504A (en) | Sampling trace system for programmable controller | |
JPH02253305A (en) | Signal tracing system for programmable controller | |
JPS6217803A (en) | Control system for programmable controller | |
JPH0619518A (en) | Program calling system | |
JPS5875203A (en) | Sequence controller of double structure | |
JPH0751610Y2 (en) | Programmable controller with override function | |
JPH02226307A (en) | Numerical controller | |
JP2965407B2 (en) | Display control device | |
JPH1011285A (en) | Programmable controller and recording medium | |
JPH07334225A (en) | Program executing system for cnc | |
JPS58221405A (en) | Programmable controller | |
JPS59105110A (en) | Programmable controller | |
JPH05204414A (en) | Programable controller system | |
JPH03246602A (en) | Programmable controller | |
JPH01236309A (en) | Display device for numerical controller |