WO1989011686A1 - System for making reference to signals of a pc unit - Google Patents

System for making reference to signals of a pc unit Download PDF

Info

Publication number
WO1989011686A1
WO1989011686A1 PCT/JP1989/000399 JP8900399W WO8911686A1 WO 1989011686 A1 WO1989011686 A1 WO 1989011686A1 JP 8900399 W JP8900399 W JP 8900399W WO 8911686 A1 WO8911686 A1 WO 8911686A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
signal
instruction
program
relay
Prior art date
Application number
PCT/JP1989/000399
Other languages
French (fr)
Japanese (ja)
Inventor
Nobuyuki Kiya
Yasushi Onishi
Original Assignee
Fanuc Ltd
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 Fanuc Ltd filed Critical Fanuc Ltd
Publication of WO1989011686A1 publication Critical patent/WO1989011686A1/en

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

A system for making reference to input and output signals and internal relay signals of a PC (programmable controller) unit. A user program (10) is stored in a RAM (6). Instruction of the user program consists of an operation portion that indicates the type of instruction, an address portion, and an addressing mode portion for designating a reference mode. By indirectly making reference to the addressing mode portion, the user program (10) can be easily changed even when correspondence is changed between the relay address and the hardware terminal

Description

明 細 書  Specification
P c装置の信号参照方式 技 術 分 野 Pc device signal reference method
本発明はプログラマブル ' コ ン ト ローラ (以下、 P c と記 す) に閲し、 特に工作機械のリ レー及びコ ィ ルの状態を信号 と して P Cへ入力してプログラムに従って演算し、 その演算 結果を出力して工作機械を制御するよう に した P Cの信号参 照方式に関する。 背 景 技 術  The present invention refers to a programmable controller (hereinafter, referred to as Pc). In particular, the state of a relay and a coil of a machine tool are input to a PC as signals, and the signals are calculated according to a program. The present invention relates to a signal reference method for a PC that outputs a calculation result and controls a machine tool. Background technology
従来の P Cによる工作機械制御方法においては、 リ レー及 びコ ィ ルの状態に相当する外部の信号を入出力するために P C ©入出力信号端子にそれぞれ信号線を接繞し、 プロ グラ ム に従って、 これらの信号を参照している。 プ C グ ラ ム中て'は これらの信号を参照する場合には例えば入力端子の I 番¾子 はシ ンボル I 1 、 出力端子の 1 番端子はシ ンボル Q 】 という よ う に、 信号端子と 1 対 1 に対応したシ ンボルを用いて参照 している。  In a conventional machine tool control method using a PC, a signal line is connected to each input / output signal terminal to input and output external signals corresponding to relay and coil states. According to these signals. When referring to these signals in the C program, for example, the I terminal of the input terminal is the symbol I 1, the 1 terminal of the output terminal is the symbol Q, and so on. References are made using symbols that correspond one to one.
しかし、 このよう な従来の方法においては、 システムの開 発および保守に際してしばしば必要となる小規模な変更に ¾ 応する こ とすら容易ではない。 すなわち、 信号を接続する端 子がただ 1 箇所変更になった場合にも、 プログラム中!: 全命 令を検索して数多 く の命令を変更しなければな らない。 例え ば、 プログラム中のシンボル I 1をすベて I 2に変更するこ とが必要となる。 プログラムが R 0 Mに格納されている場合 には変更に手数がかかり、 特に現場での変更は容易ではない。 However, it is not easy for such conventional methods to respond to small-scale changes that are often required in system development and maintenance. In other words, even if the signal connecting terminal is changed at only one place, the program is being programmed! : All instructions must be searched and many instructions must be changed. example For example, it is necessary to change all symbols I 1 in the program to I 2. If the program is stored in R0M, it takes time to change it, and it is not easy to change it on site.
発 明 の 開 示 Disclosure of the invention
本発明はこのような問題点に鑑みてなされたものであり、 ユーザプロ グラ ムの作成、 変更における柔軟性を向上させた The present invention has been made in view of such a problem, and has improved flexibility in creating and changing a user program.
P Cの信号参照方式を提供することを目的とする。 An object of the present invention is to provide a PC signal reference method.
本発明では、 上記課題を解決するために、  In the present invention, in order to solve the above problems,
P C (プログラ マブル ' コ ン ト ローラ) 装置の入出力信号、 内部 レー信号と参照する P c装置の信号参照方式において、 命令の種類を示すオペレーショ ン部と該命令で参照するリ レ 一もしく はコ イ ルのァ ド レスを示すァ ド レス部と前記参照の モー ドを指示するァ ド レシ ングモー ド部とを舍む命令コ ード からなるプログラ ムをメ モリに格納し、 該メ モ リから順次前 記プ口グラムを読み出し、 読み出したプログラムの前記ァ レ シ ンダモード部が直接参照を指示している場合には命令コ 一ド中のァ ド レス部が指示するリ レーも し く はコィ ルを演算 に使用し、 前記ァ ド レシングモー ド部が間接参照を指示して いる場合には命令コード中のァ I·" レス部が指示する レジスタ を参照し参照されたレジスタ中に格納されている値が指し示 すリ -レーもしく はコィルを演算に使用することを特散とする P C装置の信号参照方式が、  In the signal reference method of the PC device, which refers to the input / output signals of the PC (programmable controller) device and the internal ray signal, the operation section indicating the type of instruction and the relay referenced by the instruction. Stores, in a memory, a program including an instruction code including an address portion indicating an address of a coil and an addressing mode portion indicating a reference mode, and stores the program in a memory. The above-mentioned program is sequentially read from the memory, and if the address mode part of the read program instructs direct reference, the relay specified by the address part in the instruction code is also performed. When the addressing mode part indicates indirect reference, the coil refers to the register indicated by the address part in the instruction code, and the reference is made to the register referred to. Stored The signal reference method of the PC device, which specially uses the relay or coil indicated by the
提洪される  Be flooded
前記 P Cは N C装置に内蔵された Γ Cであつてもよ ::、 た、 独立形 P Cであってもよい。 The PC may be a ΓC built in the NC device ::, In addition, a stand-alone PC may be used.
P C のマ イ ク ロ プロ セ ッ サ (以下、 C P U と記す) 力くフ。 π グラムを 1 ステ ツプずつ解釈、 実行する際に、 先ず、 ァ ド レ シ ングモー ド部を構成する ビッ ト力 1 である力、、 0 である力、 を参照する。  Microprocessor for PC (hereinafter referred to as CPU). When interpreting and executing the π-gram one step at a time, first, reference is made to the forces that are bit forces 1 and 0 that constitute the addressing mode section.
例えば、 前記ビ ッ 卜が 0であれば命令中のァ ドレス §βに格 納されたア ド レスを有する信号を演算に使用 し、 また、 前記 ビッ ト力く 1 であるならば命令中のァ ド レス部に格納されたァ ド レスを有する レジスタ の内容を参照してこ の レジ スタ に格 納された値をア ド レスとする信号を演算に使用する。 図 面 の 簡 単 な 説 明 第 1 図は本発明の P c装置の信号参照方式を実施するため のハー ドウ ェアのブロ ッ ク図、  For example, if the bit is 0, the signal having the address stored in the address §β in the instruction is used for the operation, and if the bit power is 1, the signal in the instruction is used. The contents of the register having the address stored in the address section are referred to, and the signal having the value stored in this register as the address is used for the operation. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of hardware for implementing the signal reference method of the PC device of the present invention,
第 2図はユーザプロ グラ ムの命令コ 一 ド構成図、  Fig. 2 is a block diagram of the instruction code of the user program.
第 3図はオペレー シ ョ ン部に対応する命令の種類を示すコ — ド衷、  FIG. 3 is a code showing the types of instructions corresponding to the operation part.
第 4 図はァ ド レス部のコ ー ド表、  Fig. 4 shows the code table of the address section.
第 5図はユーザプ σグラムの例である。 発明を実施するための最良の形態 以下、 本発明の一実施例を図面に基づいて説明する 第 1 図は、 本発明の P C装置の信号参照方式を実施するハ 一 ドウ ェアブロ ッ ク図てある。  FIG. 5 is an example of a user sigma program. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a hardware block diagram for implementing a signal reference method of a PC device of the present invention. .
P C 1 は、 C P U 2 と入力回路 3 上出力回路 4 と R 〇 M 5 と R A M 6 とプログラ ム作成装置用ィ ンタ フ エース 7 とバス 8 とを舍む。 R 0 M 5には、 システムプログラム 9が格納さ れている。 R A M 6はバッテリ ノ ックァ ップされており 、 ュ —ザプログラムメ モ リ 1 0、 入力リ レーメ モ リ 1 1 、 出カリ レーメ モ リ 1 2、 内部リ レーメ モ リ 1 3及びレジスタ メ モ リ 1 として使用される。 PC 1 is composed of CPU 2, input circuit 3, output circuit 4 and R 〇 M 5 And RAM 6, an interface 7 for a program creation device, and a bus 8. R 0 M 5 stores the system program 9. RAM 6 is battery-knocked out, and can be programmed by user program memory 10, input relay memory 11, output calibration memory 12, internal relay memory 13, and register memory. Used as 1.
プロ グラ ム作成装置 1 5 は液晶表示装置 1 6 とキーボー ド I 7 と 有しており、 イ ンタ フェース 7 に接続される c The program creation device 15 has a liquid crystal display device 16 and a keyboard I 7 and is connected to the interface 7 c
第 2図に、 ユーザプログラ の命令コ一 ドの構成を示す。 ユーザプログラ ムメ モ リ 1 0 は構成単位が 1 6 ビ ッ ト 1 ヮー ドであり、 1 ヮ一ドが命令の 1 ステ ッ プに対応する。 命令ス テツプを表現する 1 ワー ドの構成は、 第 2図から明らかなよ う に、 4 ビッ ト のオペレーショ ン部と 1 ビッ ト のァ ド レシ ン グモー ド部と 1 1 ビッ トのァ ド レス部とからなる。 ァ ドレ シ ングモード部が 0の時はア ド レス部の信号を直接参照し-、 】 の時はァ ドレス都の指定する レジスタの内容等を参 Eする 第 3 11に、 ォペレ一シ ョ ン部の 4 ビ ッ ト に ¾応する命令 - 種類を示すコ一 ド袠を示す。  Fig. 2 shows the structure of the instruction code of the user program. The user program memory 10 has a 16-bit 1-mode configuration unit, and one level corresponds to one step of an instruction. As can be seen from Fig. 2, the structure of one word representing the instruction step consists of a 4-bit operation section, a 1-bit addressing mode section, and an 11-bit address section. Less part. When the addressing mode part is 0, the signal of the address part is directly referred to-, and when the addressing mode part is】, the contents of the register specified by the address city are referred to. E 311. Operation Instructions corresponding to the four bits of the instruction part-The code indicating the type is shown below.
第 4図に、 ア ド レス部の詳細を示したコー ド表を示す。 ァ ドレス部は、 演算に使用するデータのァ ドレスを示しており、 上位 2 ビ ッ トは参 すべきメ モ リ のタィ プを衷し、 下位 9 ビ ッ トがビッ ト番号を示す。  Fig. 4 shows a code table showing details of the address section. The address part indicates the address of the data used for the operation. The upper two bits indicate the type of memory to be referred to, and the lower nine bits indicate the bit number.
第 5図に、 ユーザプログラムの一例を示す。 ここに、 ア ド レス 0からア ド レス 2迄は、. それらのア ド レ シングモ一 Si が 0てあるからいずれも直接参照の命令てある 一方、 ア ド レス 3 からア ド レス 5迄は、 それらのア ドレシングモー ド部 力く 1 であるから、 いずれも間接ァ ドレス指示の命令である。 例えば、 レジスタ R 1 の内容が 1 であり、 レジスタ R 2 の内 容が 2 であり、 レジスタ R 3 の内容が 2 である とするならば ア ド レス 3 からア ド レス 5迄の命令は、 I I の信号と 1 2 の 信号との論理積を Q 2 に出力すべき こ とを示している。 こ こ で、 Q 2への出力を I 3 の信号と I 4 の信号との論理積に変 更する必要が生じた場合には、 レジスタ R 1 の内容を 1 から 3 へと変更し、 且つ、 レジスタ R 2 の内容を 2 から 4 へと変 更すればよい。 同一の信号が多数のステ ップに於いて参照さ れる場合であっても、 プログラムを変更する必要はな く 、 レ ジスタ メ モ リ 1 4 の変更だけで済む。 また、 例えばカ ウ ンタ のデータを レジスタメ モ リ 1 4 に入力すれば、 レジスタ メ モ リ 1 4 を間接参照する こ とによって、 プロ グラ ムの実行時に 読み出す信号を変化させる こ とが出来る。 Fig. 5 shows an example of a user program. Here, from address 0 to address 2, the addressing mode Si is 0, so all of them are direct reference instructions, while the address From address 3 to address 5, the addressing mode part is 1 most, and therefore all are instructions for indirect addressing. For example, if the contents of register R 1 are 1, the contents of register R 2 are 2, and the contents of register R 3 are 2, the instructions from address 3 to address 5 are: This indicates that the logical product of the signal of II and the signal of 12 should be output to Q 2. If it is necessary to change the output to Q2 to the logical product of the signal of I3 and the signal of I4, the content of the register R1 is changed from 1 to 3, and Change the contents of register R 2 from 2 to 4. Even when the same signal is referenced in many steps, the program does not need to be changed, only the register memory 14 needs to be changed. For example, if the data of the counter is input to the register memory 14, the signal to be read at the time of executing the program can be changed by indirectly referring to the register memory 14.
尚、 表示装置 1 6 と して本実施例では液晶を用いたが、 C R T表示装置を用いてもよい。  Although the liquid crystal is used as the display device 16 in this embodiment, a CRT display device may be used.
以上説明したよう に、 本発明では、 P C装置のユーザプ口 グラムメ モ リ 中に直接的に信号のァ ドレスを格納する代わり にレジスタ メ モ リ のア ド レスを格納し、 読み出した レジスタ メ モ リ の内容によって演算に使用する信号のァ ド レスを決定 し得るように構成したので、 使用する信号のア ド レスを変更 する際に全命令を検索して変更する必要が無 く 、 該当する レ ジスタメ モ リ の内容変更のみで済む。  As described above, in the present invention, instead of storing the address of the signal directly in the user program memory of the PC device, the address of the register memory is stored, and the read register memory is stored. Since the configuration is such that the address of the signal to be used for the operation can be determined according to the content of the instruction, there is no need to search and change all the instructions when changing the address of the signal to be used. It is only necessary to change the contents of the system memory.
ま た、 カ ウ ンタ のデータ等を レジスタ メ モ リ に入力すれば: プログラム実行時に、 読み出す信号を変化させることが出来 る。 Also, if you input the counter data etc. to the register memory: The signal to be read can be changed during program execution.
従って、 ユーザプログラムの作成時および変更時における 柔軟性を大幅に向上させるこ とが出来る。  Therefore, the flexibility in creating and modifying a user program can be greatly improved.

Claims

請 求 の 範 囲 The scope of the claims
1 . P C (プログラマブル ' コ ン ト ローラ ) 装置の入出力 信号、 内部リ レー信号と参照する P C装置の信号参照方式に おいて、  1. In the signal reference method of the PC device, which refers to the input / output signals and internal relay signal of the PC (programmable controller) device,
命令の種類を示すオペレーショ ン部と該命令で参照する リ レーも し く はコ イ ルのァ ド レスを示すァ ド レス部と前記参照 のモー ドを指示するァ ド レシングモー ド部とを舍む命令コ ー ドからなるプログラムをメ モ リ に格納し、  An operation section indicating the type of instruction, an address section indicating the relay or coil address referred to by the instruction, and an addressing mode section indicating the reference mode are provided. A program consisting of instruction codes stored in memory,
該メ モ リ から順次前記プログラ ムを読み出し、  The program is sequentially read from the memory,
読み出したプロ グラ ムの前記ァ ドレ シ ングモー ド部が直接 参照を指示している場合には命令コ ー ド中のァ ド レス部が指 示する リ レーも し く はコ イ ルを演算に使用し、  If the above-mentioned addressing mode section of the read program directs reference, the relay or coil indicated by the address section in the instruction code is used for calculation. use,
前記ァ ド レ シ ングモー ド部が間接参照を指示している場合 には命令コ 一 ド中のァ ドレス部が指示する レジスタを参照し 参照された レジスタ中に格納されている値が指し示すリ レー も し く はコ イ ルを演算に使用する こ とを特徴とする P C装置 の信号参照方式。  When the addressing mode section indicates an indirect reference, the register indicated by the address section in the instruction code is referred to, and the relay indicated by the value stored in the referred register is referred to. A signal reference method for a PC device, characterized in that a coil is used for calculation.
2 . 前記 P Cが N C装置に内蔵された P Cである こ とを特 徴とする特許請求の範囲第 1 項記載の P C装置の信号参照方 式。  2. The signal reference method for a PC device according to claim 1, wherein the PC is a PC built in an NC device.
3 . 前記 P Cが独立形 P Cである こ とを特徴とする特許請 求の範囲第 1 項記載の P C装置の信号参照方式。  3. The signal reference system for a PC device according to claim 1, wherein the PC is an independent PC.
PCT/JP1989/000399 1988-05-19 1989-04-12 System for making reference to signals of a pc unit WO1989011686A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP63/122570 1988-05-19
JP12257088A JPH01292402A (en) 1988-05-19 1988-05-19 Signal referencing system for pc device

Publications (1)

Publication Number Publication Date
WO1989011686A1 true WO1989011686A1 (en) 1989-11-30

Family

ID=14839171

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1989/000399 WO1989011686A1 (en) 1988-05-19 1989-04-12 System for making reference to signals of a pc unit

Country Status (2)

Country Link
JP (1) JPH01292402A (en)
WO (1) WO1989011686A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
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
JPS63106004A (en) * 1986-10-23 1988-05-11 Hitachi Ltd Automatic generating device for program of programmable controller

Patent Citations (4)

* Cited by examiner, † Cited by third party
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
JPS63106004A (en) * 1986-10-23 1988-05-11 Hitachi Ltd Automatic generating device for program of programmable controller

Also Published As

Publication number Publication date
JPH01292402A (en) 1989-11-24

Similar Documents

Publication Publication Date Title
EP0127440A2 (en) Integrated circuit device incorporating a data processing unit and a ROM storing applications program therein
US4126896A (en) Microprogrammed large-scale integration (LSI) microprocessor
US5301338A (en) System including central processing unit
US4792918A (en) Programmable controller monitoring system for simultaneous multiple line display of original and updated data program execution
WO1989011686A1 (en) System for making reference to signals of a pc unit
US4831572A (en) Polynomial vector arithmetic operation control system
JPH02220102A (en) Sequence program editing system
JPS6310445B2 (en)
JP3024410B2 (en) Programmable controller
JP2864536B2 (en) Data converter
JP3190945B2 (en) Micro program control circuit
JPS5921068B2 (en) Program step calculation method
JPH07104998A (en) Program counter
JP3344488B2 (en) Microcomputer and method of manufacturing the same
KR810001761B1 (en) Starting circuit in computer
JP3023959B2 (en) Undefined instruction detection method
JPS58221405A (en) Programmable controller
JPH0226252B2 (en)
JPH02178836A (en) Central arithmetic processing unit
JPS59105110A (en) Programmable controller
KR910010299A (en) Bit operation processing circuit of programmable controller
JPH0128416B2 (en)
JPS63126007A (en) Programmable controller
JPS59223804A (en) Programmable controller
WO1984003963A1 (en) Apparatus for displaying nc command program portion stored at specific address

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): DE FR GB