KR930005707B1 - Command processing method of plc - Google Patents

Command processing method of plc Download PDF

Info

Publication number
KR930005707B1
KR930005707B1 KR1019900016894A KR900016894A KR930005707B1 KR 930005707 B1 KR930005707 B1 KR 930005707B1 KR 1019900016894 A KR1019900016894 A KR 1019900016894A KR 900016894 A KR900016894 A KR 900016894A KR 930005707 B1 KR930005707 B1 KR 930005707B1
Authority
KR
South Korea
Prior art keywords
command
plc
command code
processing
code
Prior art date
Application number
KR1019900016894A
Other languages
Korean (ko)
Other versions
KR920008565A (en
Inventor
이동률
Original Assignee
삼성전자 주식회사
정용문
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 삼성전자 주식회사, 정용문 filed Critical 삼성전자 주식회사
Priority to KR1019900016894A priority Critical patent/KR930005707B1/en
Publication of KR920008565A publication Critical patent/KR920008565A/en
Application granted granted Critical
Publication of KR930005707B1 publication Critical patent/KR930005707B1/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/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The method for improving the processing velocity of programable logic controller (PLC) comprises the following steps of: discriminating whether the instruction code is inputted or not through the data buffer; interpreting the instruction code; discriminating whether the intervention demand instruction of CPU is included or not; increasing the program counter by one if the intervention demand instruction is not included, followed by returning to the previous stage; discriminating whether the instruction code of the third stage is processed; outputting the processed result of program; generating the interrupt to the CPU if the instruction code of the third stage is not processed.

Description

PLC의 명령어 처리방법PLC command processing method

제1도는 본 발명에 다른 하드웨어 블록도.1 is a hardware block diagram according to the present invention.

제2도는 본 발명에 따른 제어흐름도.2 is a control flow diagram according to the present invention.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

10 : 어드레스버퍼 11 : 데이타버퍼10: address buffer 11: data buffer

12,13 : 제1-2메모리 14,15 : 제3-4메모리12,13: 1-2 memory 14,15: 3-4 memory

16 : 버퍼래치 20 : HSU16: buffer latch 20: HSU

본 발명은 PLC(Programabld Logic Controller)에 관한 것으로 특히 PLC명령어의 처리속도를 증가시켜 빠른 제어를 할수있는 PLC의 명령어 처리방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable logic controller (PLC), and more particularly, to a command processing method of a PLC capable of fast control by increasing a processing speed of a PLC command.

일반적으로 PLC는 사용자의 명령에 의해 프로세싱하여 동작대상을 제어하기 위한 콘트롤러이다.Generally, a PLC is a controller for controlling an operation object by processing by a user's command.

종래에는 사용자가 명령코드로써 명령어를 상기 PLC로 주게 되면 상기 PLC의 중앙처리장치는 내부의 운용 프로그램으로 명령어를 처리하여 그에 따른 결과를 출력시켜 동작대상을 제어하였다.Conventionally, when a user gives a command to the PLC as a command code, the central processing unit of the PLC processes the command with an internal operating program and outputs a result thereof to control the operation target.

즉 상기 PLC내의 중앙처리장치는 사용자의 명령어를 입력하여 램영역에 기억시키고 내장된 운용 프로그램에 의해 명령어 코드를 소프크웨어적으로 처리하여 동작 대상으로 제어하였다.In other words, the central processing unit in the PLC inputs the user's command into the RAM area and processes the command code by software using the built-in operation program to control the operation target.

따라서 상기 종래의 방법은 중앙처리장치의 명령어 처리에 따른 스캔(scan)시간의 지연이 유발되었는데 이에따라 빠른 제어가 필요로하는 동작대상에는 사용할 수없는 문제점이 있었다.Therefore, the conventional method has caused a delay in the scan time according to the command processing of the central processing unit. Accordingly, there is a problem in that it cannot be used for an operation target that requires fast control.

또한 상기 중앙 처리장치가 명령어 하나당 10μsec이상의 시간을 할애하여 전체 스캔 시간이 증가하였으므로 동작대상의 오동작을 종종 유발하였다.In addition, since the central processing unit dedicates a time of 10 μsec or more per instruction to increase the total scan time, it often causes a malfunction of an operation target.

따라서 본 발명이 목적은 상기와 같은 문제점을 감안하여 PLC의 명령어 처리를 하드웨로 처리하여 빠른 제어를 할 수 있는 PLC의 명령어 처리방법을 제공함에 있다.Accordingly, an object of the present invention is to provide a command processing method of a PLC capable of fast control by processing the command processing of the PLC in consideration of the above problems.

본 발명의 다른 목적은 PLC의 스캐닝 타임을 줄일 수 있는 PLC의 명령어 처리방법을 제공함에 있다.Another object of the present invention is to provide a command processing method of a PLC that can reduce the scanning time of the PLC.

상기의 목적을 달성하기위한 본 발명은 PLC의 내부에 명령어 처리수단을 구비하여 명령어를 처리함을 그 특징으로 한다.The present invention for achieving the above object is characterized by having a command processing means inside the PLC to process the command.

이하 본 발명을 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

제1도는 본 발명에 따른 하드웨어 블럭도로서, 어드레스버스 및 데이타 버스에 각각 연결된 어드레스버퍼(10) 및 데이타버퍼(11)와, 상기 어드레스버퍼(10)에 연결되어 명령코드를 저장하기위한 제1-2메모리(12,13)와, 상기 제2메모리(13)에 연결되어 상기 명령코드 결과를 저장하기위한 제3-4메모리(14,15)와, 상기 어드레스버퍼(10) 및 데이타 버퍼(11)에 연결되어 PLC의 명령코드를 처리하여 중앙처리장치로 출력하기위한 HSO(Hardware Solving Unit)(20)와, 상기 데이타 버스와 상기 HSU(20)간에 연결되어 상기 HSU(20)이 명령처리 결과를 래치하기위한 버퍼래티(16)로 구성된다.1 is a hardware block diagram according to an embodiment of the present invention, wherein an address buffer 10 and a data buffer 11 connected to an address bus and a data bus, respectively, and a first code connected to the address buffer 10 for storing command codes are shown in FIG. -2 memory (12, 13), 3-4 memory (14, 15) connected to the second memory (13) for storing the command code results, the address buffer (10) and data buffer ( 11) is connected to the HSO (Hardware Solving Unit) 20 for processing and outputting the command code of the PLC to the central processing unit, the HSU (20) is connected between the data bus and the HSU (20) command processing It consists of a buffer lattice 16 for latching the result.

제2도는 본 발명의 흐름도로서, 데이타 버퍼를 통하여 명령어의 해석 요구 입력이 되었는가를 판단하는 제1과정과, 상기 제1과정으로부터 명령코드가 입력되었으면 명령코드를 해석하기 위한 제2과정과, 상기 제2과정으로부터 중앙처리장치의 개입 요구 명령인가를 판단하는 제3과정과, 상기 제3과정으로부터 요구명령이 아니면 프로그램카운터를 1증가시키고 제2과정으로 리턴하기 위한 제4과정과, 상기 제3과정으로부터 명령코드의 처리가 완료인가를 판단하기 위한 제5과정과, 상기 제5과정으로부터 완료이면 사용자 프로그램의 처리결과를 출력하고 완료가 아니면 상기 중앙처리장치로 인터럽트를 발생시키는 제6과정을 이루어진다.2 is a flow chart of the present invention, a first step of determining whether a request for interpretation of a command is input through a data buffer, a second step of interpreting a command code if a command code is input from the first step, and A third step of judging whether the central processing unit requires an intervention request command from the second step, a fourth step of increasing the program counter by one and returning to the second step if the request command is not a request from the third step, and the third step; A fifth step for determining whether the processing of the command code is completed from the step; and a sixth step for outputting the processing result of the user program if it is completed from the fifth step and generating an interrupt to the central processing unit if not. .

이하 본 발명으 상술한 구성에 의거 제1도 및 제2도를 참조하여 상세히 설명하면, 먼저 상기 PLC내의 중앙처리장치는 68000CPU를 사용하였으며 제1도의 HSU(20)는 XC3030-PC84를 이용하였다. 제1도에서 상기 HSC(20)는 PLC내의 중앙처리 장치와 입출력장치 사이에 결합되어 상기 중앙처리 장치로 부터의 명령코드를 처리하기 위한 것이다.Hereinafter, the present invention will be described in detail with reference to FIGS. 1 and 2 according to the above-described configuration. First, the central processing unit in the PLC uses 68000 CPUs, and the HSU 20 of FIG. 1 uses XC3030-PC84. In FIG. 1, the HSC 20 is coupled between the central processing unit and the input / output device in the PLC to process the command code from the central processing unit.

그러므로 상기 중앙처리 장치에서는 명령코드처리는 상기 HSU(20)로 하여금 처리하게하고 명령코드처리 이외의 시스템 운용을 하게된다. 따라서 사용자의 명령코프로그램인 명령코드가 입력되면 상기 중앙처리장치는 어드레스 버스를 통해 명령코드의 번지 지정을 하여 어드레스 버퍼(10)에 출력시킨다.Therefore, in the central processing unit, command code processing causes the HSU 20 to process and system operation other than command code processing. Therefore, when a command code that is a user's command code program is input, the CPU processes the address code of the command code through the address bus and outputs the address code to the address buffer 10.

또한 명령데이타를 상기 데이타 버퍼(11)에 출력한다.In addition, command data is output to the data buffer 11.

그러면 상기 HSU(20)는 데이타 버퍼(11)에 출력된 명령데이타를 제1-2메모리(12,13)에 기억저장한다.The HSU 20 then stores and stores the command data output to the data buffer 11 in the 1-2 memory 12,13.

여기서 상기 HSU(20)의단자의 명령인에이블 신호에 의해 상기 명령코드는 프로세싱 되어진다.Where the HSU 20 The command code is processed by the command enable signal of the terminal.

상기 제3-4메모리(14,15)는 프로세싱된 명령코드의 처리결과를 기억저장 시키게 된다. 또한 버퍼래치(16)는의 단자클럭에의해 상기 명령처리 결과를 래치 입력하게되며 이는 데이타 버스를 통하여 상기 중앙처리장치로 해석 결과를 출력하게된다.The third and fourth memories 14 and 15 store and store the processing result of the processed command code. In addition, the buffer latch 16 The command processing result is latched by the terminal clock and outputs the analysis result to the CPU through the data bus.

이를 제2도를 참조하면, (2a)에서 명령코드입력을 판단하여 입력이면(2b)에서 HSU솔빙을 실시하고(2c)에서 개입 요구 명령어인가를 판단하여 인터럽트가 아니면(2d)에서 프로그램카운터를 1증가하고 다시(2b)로 리턴한다. 또한 (2c)에서 인터럽트이면 (2f)에서 명령코드의 입력이 끝인가를 판단하여 끝이면 (2h)에서 종료하게 된다.Referring to FIG. 2, the command code input is determined in (2a), and if it is an input (2b), HSU solving is performed (2c). It increments 1 and returns to (2b). If it is an interrupt in (2c), it is determined whether the input of the command code is completed in (2f), and if it is finished, it ends in (2h).

상기 (2f)에서 끝이 아니면(2g)에서 인터럽트를 발생시키게 되며 이는(2a)로 리턴한다.If it is not the end (2g) in (2f), an interrupt is generated, which returns to (2a).

한편 상기 HSU(20)는 입력클럭에 의하여 4클럭당 1스텝으로 솔빙할 수 있게 설계되었다. 여기서 종래의 스캐닝 타임에 비하여 약 20배 정도의 바른 스캐닝 타임이 얻어지게 된다. 따라서 상술한 바와같이 본 발명은 사용자의 명령코드를 하드웨어에 의해 처리할수 있으므로 PLC의 명령어 처리속도가 증가되는 이점이 있으므로 빠른 제어를 필요로 하는 동작대상을 오동작없이 제어할 수 있는 장점이 있다.On the other hand, the HSU 20 is designed to solve in one step per four clocks by the input clock. Here, a correct scanning time of about 20 times as compared with the conventional scanning time is obtained. Therefore, as described above, since the present invention can process the user's command code by hardware, there is an advantage in that the instruction processing speed of the PLC is increased, so that an operation object requiring fast control can be controlled without malfunction.

Claims (1)

HSU(20)를 내부에 구비한 PLC의 명령어 처리 방법에 있어서, 데이타 버퍼를 통하여 명령 코드 해석 요구가 입력되었는가를 판단하는 제1과정과, 상기 제1과정으로부터 명령코드가 입력되었으면 명령코드를 해석하기 위한 제2과정과, 상기 제2과정으로부터 중앙처리장치의 개입 요구 명령어가 걸려 있는가를 판단하는 제3과정과, 상기 제3과정으로부터 개입 요구 명령이 아니면 프로그램카운터를 1증가시키고 제2과정으로 리턴하기 위한 제4과정과, 상기 제3과정으로부터 명령코드의 처리가 완료인가를 판단하기 위한 제5과장과, 상기 제5과정으로부터 완료이면 사용자 프로그램의 처리결과를 출력하고 완료가 아니면 상기 중앙처리장치로 인터럽트를 발생시키는 제6과정으로 이루어짐을 특징으로 하는 PLC의 명령어 처리 방법.In a command processing method of a PLC having an HSU 20 therein, a first process of determining whether a command code interpretation request is input through a data buffer, and a command code is interpreted if a command code is input from the first process. And a third step of determining whether or not an intervention request command of the central processing unit is caught from the second step, and if not an intervention request command from the third step, increases the program counter by one and returns to the second step. And a fifth section for determining whether the processing of the command code is completed from the third step, and outputting the processing result of the user program if the processing is completed from the fifth step. The instruction processing method of the PLC, characterized in that the sixth step of generating an interrupt.
KR1019900016894A 1990-10-22 1990-10-22 Command processing method of plc KR930005707B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019900016894A KR930005707B1 (en) 1990-10-22 1990-10-22 Command processing method of plc

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019900016894A KR930005707B1 (en) 1990-10-22 1990-10-22 Command processing method of plc

Publications (2)

Publication Number Publication Date
KR920008565A KR920008565A (en) 1992-05-28
KR930005707B1 true KR930005707B1 (en) 1993-06-24

Family

ID=19305005

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019900016894A KR930005707B1 (en) 1990-10-22 1990-10-22 Command processing method of plc

Country Status (1)

Country Link
KR (1) KR930005707B1 (en)

Also Published As

Publication number Publication date
KR920008565A (en) 1992-05-28

Similar Documents

Publication Publication Date Title
US4870562A (en) Microcomputer capable of accessing internal memory at a desired variable access time
EP0272705B1 (en) Loosely coupled pipeline processor
JPH06103507B2 (en) Pulse input / output processor and microcomputer using the same
US4747045A (en) Information processing apparatus having an instruction prefetch circuit
KR930005707B1 (en) Command processing method of plc
US4807178A (en) Programmable sequence controller having indirect and direct input/output apparatus
KR920003905Y1 (en) Circuit improving execution speed of plc
KR0161830B1 (en) The scan time reducing method for plc
KR920004728B1 (en) High-speed execution system
US5524221A (en) Next instruction pointer calculation system for a microcomputer
KR100246628B1 (en) Clock less counter
JP2000250779A (en) Programmable controller
KR920006970B1 (en) Programmable logic controller
JP2792778B2 (en) Programmable controller
KR910002318B1 (en) Logic interpreter with pipe-line architecture
JP3074809B2 (en) Programmable controller
JP3118824B2 (en) Microprocessor
KR950007937B1 (en) The inside resister circuit of plc gate array
KR20010011683A (en) Central Processing Unit
KR940001013B1 (en) Image processing apparatus and system thereof
KR0157456B1 (en) User determined function of robot controller
JP2532072Y2 (en) Pattern generator
KR19980067078A (en) Pielsi
JPS6367604A (en) Process signal converter
JPH01284926A (en) Instruction reading system for arithmetic unit

Legal Events

Date Code Title Description
A201 Request for examination
G160 Decision to publish patent application
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20020527

Year of fee payment: 10

LAPS Lapse due to unpaid annual fee