KR20040056253A - high speed interrupt unit for PLC - Google Patents

high speed interrupt unit for PLC Download PDF

Info

Publication number
KR20040056253A
KR20040056253A KR1020020082829A KR20020082829A KR20040056253A KR 20040056253 A KR20040056253 A KR 20040056253A KR 1020020082829 A KR1020020082829 A KR 1020020082829A KR 20020082829 A KR20020082829 A KR 20020082829A KR 20040056253 A KR20040056253 A KR 20040056253A
Authority
KR
South Korea
Prior art keywords
interrupt
unit
input
cpu
state
Prior art date
Application number
KR1020020082829A
Other languages
Korean (ko)
Other versions
KR100467408B1 (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 KR10-2002-0082829A priority Critical patent/KR100467408B1/en
Publication of KR20040056253A publication Critical patent/KR20040056253A/en
Application granted granted Critical
Publication of KR100467408B1 publication Critical patent/KR100467408B1/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
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/11Plc I-O input output
    • G05B2219/1157I-O used either as input or as output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13086Priority interrupt
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/14Plc safety
    • G05B2219/14041Influence of execution of interrupts

Landscapes

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

Abstract

PURPOSE: A high speed interrupt unit provided with an input and output function for use in a programmable logic controller is provided to realize one chip by implementing operation of interrupt circuit with VHDL(very high speed integrated circuits hardware description language). CONSTITUTION: A high speed interrupt unit provided with an input and output function for use in a programmable logic controller includes an input signal use selection switch, an input voltage direction selection switch, an input voltage setting switch, an input unit, a bus driver and a control processor. The control processor utilizes the inner memory area to transmit the CPU unit and the status. The CPU unit records the WY00 region of address 0X00 which is referred by the interrupt unit and consisted of an interrupt acknowledge(IA), an interrupt end bit(IEB) and an enable/disable(ED) data. The interrupt unit records the WX10 region of the address 0X10 which is referred by the CPU unit and are composed of a rising/falling edge(UD), a channel No., response(RSP) and an interrupt available(AV) data. And, the interrupt unit records the WX11 region of the address 0X11 which is referred by the CPU unit and consisted of the c0 to cn-1 channels of current input status of data.

Description

입출력 기능이 구비된 피엘씨용 고속 인터럽트 유닛 {high speed interrupt unit for PLC}High speed interrupt unit for PLC with I / O function

본 발명은 입출력 기능이 구비된 PLC용 고속 인터럽트 유닛에 관한 것으로서, 보다 상세히는 PLC(Programmable Logic Controller), 특히 POSFA PLC 등의 특수 유닛의 하나인 고속 인터럽트 유닛으로서 입출력 기능까지 수행할 수 있는 인터럽트 유닛에 관한 것이다.The present invention relates to a high-speed interrupt unit for a PLC having an input / output function, and more particularly, an interrupt unit capable of performing an input / output function as a high-speed interrupt unit, which is one of a special unit such as a programmable logic controller (PLC), in particular, a POSFA PLC. It is about.

일반적으로 인터럽트 유닛(Interrupt Unit)은 외부의 특수 상황에 대한 신호를 PLC 측에 전달하여 PLC에 순간적으로 고속 응답을 필요로 하는 인터럽트 입력신호가 입력될 때, 현재 수행 중인 시퀀스 프로그램(Sequence Program)을 일시 정지하고, 미리 준비된 인터럽트 루틴을 먼저 수행하도록 하는 PLC의 특수 유닛이다. 즉, 인터럽트 유닛은 외부 기기의 이상 동작, 위험 순간 등 현재 수행 중인 시스템 동작에 우선하여 해결하여야 하는 상황에 대한 비상용 유닛이라 할 수 있다. 따라서, 인터럽트 유닛은 언제나 안정적으로 다운되는 일 없이 동작하여야 하며, 입력 신호에 대하여 주어진 시간 이내에 재빨리 반응하여야만 한다.In general, the interrupt unit transmits a signal for an external special situation to the PLC side, and when the interrupt input signal requiring a high-speed response is input to the PLC momentarily, a interrupt program is executed. A special unit of PLC that pauses and executes a prepared interrupt routine first. That is, the interrupt unit may be referred to as an emergency unit for a situation that must be solved in advance of a system operation currently being performed, such as an abnormal operation or a dangerous moment of an external device. Therefore, the interrupt unit must always operate without being reliably down and must respond quickly to the input signal within a given time.

종래의 PLC, 특히 POSFA PLC용 인터럽트 유닛은 8비트 마이크로프로세서를 기반으로 하여 설계되어 있었으며, 전체 동작은 소프트웨어적으로 구현되어 있었다.Interrupt units for conventional PLCs, in particular POSFA PLCs, were designed based on an 8-bit microprocessor and the entire operation was implemented in software.

따라서 PLC의 마이크로프로세서가 동작을 정지하였을 경우에는 인터럽트 유닛으로서의 구실을 못하는 경우가 발생할 수 있었다. 이것은 마이크로프로세서에서 돌아가는 시스템 소프트웨어의 알고리즘 구현이 개발자의 능력에 따라서 다르고, 이에 따라 성능이 달라져서 동작의 안정성 보장이 없는 점, 그리고 범용으로 개발된 마이크로프로세서의 기능 중 일부를 이용하여 특수 유닛으로 사용하는 점 등으로 인해 원래 인터럽트 유닛의 구실을 못 하는 경우가 발생하는 것이다.Therefore, when the microprocessor of the PLC stops operating, it may not serve as an interrupt unit. This is because the algorithm implementation of the system software running on the microprocessor depends on the developer's ability, and thus the performance is not guaranteed to guarantee the stability of the operation, and it is used as a special unit using some of the functions of the general purpose developed microprocessor. This may cause the original interrupt unit not to function due to lighting.

또한, 이러한 이유로 하여 미츠비시 등의 외국제 인터럽트 유닛은 마이크로프로세서가 없는 순수한 로직, 즉 하드웨어 구성만으로 구성되어 있는 경우도 있었으나, 이들은 오로지 인터럽트 유닛 전용으로만 사용 가능하였기 때문에 입출력을 위해서는 입출력 모듈을 별도로 마련하여야 하였다는 불편함이 있었고, 내부의 데이터의 동작 상태를 쉽게 알 수 없어서 디버깅에 어려움이 있었으며, 인터럽트 입력 전압도 12V 또는 24V로 고정되어 있고, 인터럽트 신호의 검출에 있어서도 라이징 엣지 또는 폴링 엣지의 어느 한 쪽으로 고정되어 있어서 다양한 인터럽트 소스로부터의 신호를 받아들이는데 불편함이 있었다.For this reason, foreign-made interrupt units such as Mitsubishi may be composed of pure logic without a microprocessor, that is, only hardware configuration. However, since they were only used for interrupt units only, separate input / output modules were provided for input / output. It was inconvenient to do it, and it was difficult to debug because the operation status of the internal data could not be easily known, and the interrupt input voltage was fixed at 12V or 24V, and any of the rising edge or the falling edge was also detected in the detection of the interrupt signal. Fixed on one side, it was inconvenient to accept signals from various interrupt sources.

그리고, 입출력 모듈의 경우에도 미리 마련되어 있는 채널을 전부 사용하지 않는 경우에도 불필요한 채널까지 모두 열려 있어야 하였기 때문에 간단하게 온오프할 수 있는 기능이 없었다.In addition, even in the case of the input / output module, even if all channels provided in advance were not used, all unnecessary channels had to be opened, and thus there was no simple on / off function.

본 발명은 상기와 같은 문제점을 해소하기 위하여 안출된 것으로서, 종래의 PLC용 인터럽트 유닛이 마이크로프로세서를 이용하여 구현됨으로써 가지는 불안정성 문제점을 해결하기 위하여 마이크로프로세서가 없는 순수한 하드웨어적 로직에 의해서 VHDL(Very High Speed Integrated Circuits Hardware Description Language)을 이용하여 원칩(one chip)으로 구현하고, 디버깅을 위하여 내부 데이터 상태를 쉽게 표시하며, 다양한 인터럽트 소스로부터의 신호 처리를 위하여 인터럽트 입력 전압을 선택할 수 있고, 인터럽트 신호의 검출에 있어서도 라이징 엣지 또는 폴링 엣지를 선택할 수 있으며, 인터럽트 유닛의 기본 기능 이외에 필요한 입출력 채널에 대하여 선택하여 입출력(I/O : Input/Output) 유닛으로도 사용을 할 수있도록 하는 입출력 기능이 구비된 피엘씨용 고속 인터럽트 유닛을 제공하려는 것이다.The present invention has been made to solve the above problems, VHDL (Very High) by the pure hardware logic without a microprocessor to solve the instability problem that the conventional interrupt unit for PLC is implemented by using a microprocessor Speed integrated circuits can be implemented in one chip using Hardware Description Language, easily display the internal data state for debugging, select the interrupt input voltage for signal processing from various interrupt sources, and Rising edge or polling edge can be selected for detection, and I / O function that can be used as input / output (I / O) unit by selecting necessary input / output channels in addition to basic function of interrupt unit High speed interrupt for PL Intended to provide a unit.

도 1은 인터럽트 유닛의 기본 블럭도이다.1 is a basic block diagram of an interrupt unit.

도 2는 본 발명에 의한 개발 보드 실시예를 나타내는 도면이다.2 is a view showing a development board embodiment according to the present invention.

도 3은 입력부 단자 및 배선도이다.3 is an input terminal and a wiring diagram.

도 4는 타이밍도이다.4 is a timing diagram.

도 5는 인터럽트 유닛이 CPU와 데이터를 주고 받으면서 동작하는 전체 루틴을 설명하는 도면이다.5 is a diagram illustrating an entire routine in which an interrupt unit operates while exchanging data with a CPU.

도 6은 VHDL 내부 구조도이다.6 is a VHDL internal structure diagram.

도 7은 VHDL 외부 회로도이다.7 is a VHDL external circuit diagram.

도 8a 및 도 8b는 본 발명을 통하여 구현한 실시예의 실물의 예시도이다.8A and 8B are exemplary views of actual embodiments of the present invention.

도 9는 입출력 신호를 전달하는 방법을 설명하기 위한 도면이다.9 is a diagram for describing a method of transmitting an input / output signal.

상기와 같은 기술적 과제를 달성하기 위하여 본 발명의 인터럽트 유닛은 전체 동작은 VHDL을 이용하여 원칩으로 구현하였으며, 기존의 인터럽트 유닛이 가지는 문제점을 해결하고 새로운 기능을 추가하였다.In order to achieve the above technical problem, the interrupt unit of the present invention is implemented in one chip using VHDL, and solves problems of the existing interrupt unit and adds new functions.

즉, 초고속 PLC용 인터럽트 유닛에 있어서,That is, in the interrupt unit for the high speed PLC,

각 인터럽트 입력 채널의 기능을 이네이블과 디스에이블 중에서 선택하는 입력신호 사용 선택 스위치부(DIP_SW1)와,An input signal use selection switch unit (DIP_SW1) for selecting a function of each interrupt input channel between enable and disable;

각 인터럽트 신호의 엣지 방향을 선택하는 입력전압 방향 선택 스위치부(DIP_SW2)와,An input voltage direction selector switch (DIP_SW2) for selecting the edge direction of each interrupt signal;

각 인터럽트 신호 전압의 레벨을 선택하는 입력전압 설정 스위치부(Jump1)와,An input voltage setting switch unit (Jump1) for selecting the level of each interrupt signal voltage;

미리 정해진 갯수(n)의 채널의 입력을 받는 입력부와,An input unit for receiving input of a predetermined number n of channels,

컴팩트 PLC 백플레인과 연결되는 어드레스, 데이터, IRQ1 등의 버스 드라이버부와,A bus driver section for address, data, IRQ1, etc. to be connected to the compact PLC backplane,

VHDL을 이용하여 원칩(One Chip)으로 구현한 제어 처리부로 구성되며,Consists of a control processing unit implemented in one chip using VHDL,

특히 상기 제어 처리부는 CPU 유닛과 상태 전달을 위하여 내부 기억장소를 이용하며,In particular, the control processing unit uses an internal storage for transferring status with the CPU unit,

어드레스 0x00의 WY00 영역은 CPU 유닛이 기록하고, 인터럽트 유닛이 참조하는데, IA(Interrupt Acknowledge), IEB(Interrupt End Bit), ED(Enable/Disable) 데이터로 구성되고,The WY00 area at address 0x00 is written by the CPU unit and referenced by the interrupt unit, and is composed of Interrupt Acknowledge (IA), Interrupt End Bit (IEB), and Enable / Disable (ED) data.

어드레스 0x10의 WX10 영역은 인터럽트 유닛이 기록하고, CPU 유닛이 참조하는데, U/D(Rising/falling Edge), Channel NO., RSP(Response), AV(Interrupt Available) 데이터로 구성되며,The WX10 area at address 0x10 is written by the interrupt unit and referenced by the CPU unit, and is composed of rising / falling edge (U / D), Channel NO., RSP (Response), and AV (Interrupt Available) data.

어드레스 0x11의 WX11 영역은 인터럽트 유닛이 기록하고, CPU 유닛이 참조하는데, c0 내지 c n-1의 채널 현재 입력 상태의 데이터로 구성되고,The WX11 area at address 0x11 is written by the interrupt unit and referenced by the CPU unit, and is composed of data of the channel current input state of c0 to c n-1,

또한, 상기 제어처리부에서는In the control processing unit,

상기 ED가 1인 경우에 외부 인터럽트 신호가 발생했는지 판단하는 단계와,Determining whether an external interrupt signal is generated when the ED is 1;

외부 인터럽트 신호가 발생하지 않았으면 큐를 검사하는 단계로 진행하고, 외부 인터럽트 신호가 발생했으면 다시 Int Busy를 검사하여 현재 수행중인 인터럽트가 있는지 확인하는 단계와,If the external interrupt signal did not occur, go to the step of checking the queue, if the external interrupt signal has occurred, check the Int Busy again to see if there is an interrupt currently running,

현재 수행중인 인터럽트가 있으면 큐에 입력하고, 현재 수행중인 인터럽트가 없으면 U/D(Rising/falling Edge), Channel NO., RSP(Response), AV(Interrupt Available)를 갱신함으로써 내부 파라미터(WX10)를 설정하고, 입력 상태를 갱신함으로써 내부 파라미터(WX11)를 설정한 후 인터럽트 신호를 발생시키고 CPU의 IA를 검출(WY00)하는 단계와,If there is an interrupt currently being executed, it is entered into the queue, and if there is no interrupt currently being executed, the internal parameter (WX10) is updated by updating the rising / falling edge (U / D), Channel NO., RSP (Response) and AV (Interrupt Available). Setting an internal parameter (WX11) by updating the input state, generating an interrupt signal and detecting the CPU IA (WY00);

CPU의 IA가 검출되면 Int Busy=1, AV=0, Int=0으로 설정하고, 인터럽트의 종료를 확인하는 IEB를 검출하는 단계와,If IA of the CPU is detected, setting Int Busy = 1, AV = 0, Int = 0, and detecting the IEB confirming the termination of the interrupt;

IEB가 검출되면 RSP=1, Int Busy=0으로 설정하고, 큐를 검색하는 단계와,If IEB is detected, set RSP = 1, Int Busy = 0, search for queue,

큐에 대기중인 인터럽트가 없으면 다시 외부 인터럽트의 검출단계로 복귀하고, 큐에 대기중인 인터럽트가 있으면 우선순위가 가장 높은 인터럽트를 처리한 후 Int Busy 여부를 검색하는 단계로 복귀하는 동작을 하도록 구성됨을 특징으로 하는 입출력 기능이 구비된 피엘씨용 고속 인터럽트 유닛이다.If there is no interruption in the queue, the process returns to the external interrupt detection step, and if there is an interruption in the queue, the process returns to the step of searching for Int Busy after processing the interrupt having the highest priority. It is a high-speed interrupt unit for PLC equipped with an input / output function.

또한, 일실시예에 의하면 이에 더하여 내부 데이터 동작 상태의 디버깅을 위하여 LED 표시모드를 선택하는 스위치부(DIP_SW3)와,In addition, according to an embodiment, the switch unit (DIP_SW3) for selecting the LED display mode for debugging the internal data operation state,

상기 선택 스위치부(DIP_SW3)의 선택 상태에 따라서 내부 데이터 상태를 표시하는 LED부를 더욱 포함하여 구성되는데,According to the selection state of the selection switch unit (DIP_SW3) further comprises an LED unit for displaying the internal data state,

상기 LED 표시모드는 2비트(m1, m0)로서, (m1, m0)=00이면 인터럽트 동작, 01이면 WY00상태, 10이면 WX10상태, 11이면 WX11상태를 표시하도록 구성됨을 특징으로 하는 입출력 기능이 구비된 피엘씨용 고속 인터럽트 유닛이다.The LED display mode is 2 bits (m1, m0), and the input / output function is configured to display interrupt operation when (m1, m0) = 00, WY00 state if 01, WX10 state if 10, and WX11 state if 11. It is a high speed interrupt unit for PLC.

이하, 상기와 같은 구성을 가지는 본 발명의 인터럽트 유닛을 첨부된 도면을 참조하면서 보다 상세히 설명한다.Hereinafter, an interrupt unit of the present invention having the above configuration will be described in more detail with reference to the accompanying drawings.

본 발명의 장치는 PLC, 특히 POSFA PLC 용으로 개발된 인터럽트 유닛으로서, 그 기본 동작은 기존의 POSFA 인터럽트 유닛의 기본 개념을 바탕으로 설계하였으며, 보다 향상된 기능을 수행할 수 있도록 개선된 내용을 포함하고 있다. 내부 회로의 핵심 부분은 ALTERA의 PLD에 VHDL로 구현하여 원칩화를 실현하여 고속 동작 및 동작의 안정화를 실현하였다.The apparatus of the present invention is an interrupt unit developed for a PLC, in particular a POSFA PLC, the basic operation of which is designed based on the basic concept of the existing POSFA interrupt unit, and includes an improved content to perform more advanced functions. have. The core part of the internal circuit is realized by VHDL in ALTERA's PLD to realize one-chip and high speed operation and stabilization of operation.

도 1은 인터럽트 유닛의 기본 블럭도이고, 도 2는 본 발명에 의한 개발 보드 실시예를 나타내는 도면이다.1 is a basic block diagram of an interrupt unit, and FIG. 2 is a diagram showing a development board embodiment according to the present invention.

여기서, 입력은 n채널, 예컨대 16채널이며, 포트커플러(photo coupler)를 통해 내부 회로와 외부 입력 신호를 차단하였다. 입력 신호는 스위치부, 예컨대 점퍼(Jump1)에 의해 입력 전압 레벨을 선택할 수 있도록 되어 있으며, 예컨대 12V와 24V를 선택하여 입력할 수 있도록 하였다. 물론 입력 전압의 극성을 공통 GND 또는 공통 VCC로 사용할 수 있도록 하였다.Here, the input is n-channel, for example, 16-channel, and cut off the internal circuit and the external input signal through a port coupler (photo coupler). The input signal is selectable by the switch unit, for example, jumper Jump1, so that the input voltage level can be selected. For example, 12V and 24V can be selected and inputted. Of course, the polarity of input voltage can be used as common GND or common VCC.

또한, 스위치부(DIP_SW1)를 통하여 16 채널 중 원하는 채널을 선택하여 사용할 수 있도록 하였으며, 뿐만 아니라 다른 스위치부(DIP_SW2)를 통하여 인터럽트 신호의 엣지(Edge) 방향을 선택할 수 있도록 하였다. 또한 일실시예에 의하면 LED를 통해 모두 미리 정해져 있는 가짓수, 예컨대 4가지 상태의 디스플레이(Display)가 가능하도록 하여, 입력의 상태 및 내부 메모리 상태를 확인할 수 있도록 하였다.In addition, it is possible to select and use a desired channel among the 16 channels through the switch unit DIP_SW1, as well as to select the edge direction of the interrupt signal through the other switch unit DIP_SW2. In addition, according to an embodiment of the present invention, all of the predetermined number of LEDs, for example, four states of display, are enabled through the LED, so that the state of the input and the state of the internal memory can be checked.

점프(Jump) 및 딥스위치(dip switch)의 동작에 따른 인터럽트 유닛의 내부 동작 내용은 다음의 표 1과 같다.The internal operation of the interrupt unit according to the operation of the jump and dip switch is shown in Table 1 below.

스위치switch 내용Contents Jump1Jump1 입력전압 선택 Jump [연결: 12V, 단락: 24V]Input Voltage Selection Jump [Connection: 12V, Short: 24V] Jump2Jump2 ALTERA 칩 프로그램 다운로드시 사용 [위: 3.3V, 아래: 5V]Used to download ALTERA chip programs [Up: 3.3V, Down: 5V] Jump3Jump3 Compact PLC Back Plane 연결시 /WR 신호 연결선 선택 [위: C10 연결, 아래: B16 연결]Select / WR signal cable when Compact PLC Back Plane is connected [Up: C10 connection, bottom: B16 connection] Dip_SW1Dip_SW1 인터럽트 채널 Enable/Disable 선택 스위치[Up: Disable(사용 안함), Down: Enable(사용)]Interrupt Channel Enable / Disable Selection Switch [Up: Disable, Down: Enable] Dip_SW2Dip_SW2 인터럽트 신호 Edge 방향 선택 스위치[Up: Falling Edge, Down: Rising Edge에서 동작]Interrupt Signal Edge Direction Selector Switch [Operation at Up: Falling Edge, Down: Rising Edge] Dip_SW3Dip_SW3 LED Display Mode 선택 스위치(왼쪽에서 오른쪽으로 m1, m0)m1, m0 = 00: Interrupt 동작01: WY00 상태10: WX10 상태11: WX11 상태LED Display Mode selection switch (m1, m0 from left to right) m1, m0 = 00: Interrupt operation 01: WY00 state 10: WX10 state 11: WX11 state

이하, 각 부분의 테마별로 보다 상세히 설명한다.Hereinafter, each theme will be described in more detail.

◈ 입력부◈ Input

다음과 같은 동작을 수행하며, VHDL로 구현되어 있다.The following operation is performed and implemented in VHDL.

□입력 채널 : n채널, 예컨대 16채널Input channel: n channels, for example 16 channels

□입력 전압 : 전압 레벨을 선택 가능, 예컨대 12V와 24V 겸용Input voltage: selectable voltage level, for example, 12V and 24V

[입력 선택 점퍼(Jump1) On : 12V (8mA), Off : 24V (17mA)][Input select jumper (Jump1) On: 12V (8mA), Off: 24V (17mA)]

□입력 채널 : 입력 채널 순서 및 외부 배선 방법은 도 3과 같다.Input channel: Input channel order and external wiring method are the same as in FIG.

□입력 신호 방식 선택 DIP 스위치(DIP_SW2)Input signal method selection DIP switch (DIP_SW2)

→UP : Falling Edge 에서 동작→ UP: Operation at Falling Edge

→Down : Rising Edge 에서 동작→ Down: Operation at Rising Edge

□입력 Enable /Disable 선택 DIP 스위치(DIP_SW1)Input Enable / Disable Selection DIP Switch (DIP_SW1)

→UP : Disable→ UP: Disable

→Down : Enable→ Down: Enable

□Enable을 선택한 채널에 대하여 인터럽트 동작을 수행한다. 한편, Enable / Disable 선택과 관계 없이, 입력 신호는 WX11에는 1(입력 high) 또는 0(입력 low)으로 표시된다. 이 경우 LED 상태 선택 DIP 스위치(DIP_SW3)를 11로 두고 LED로 입력 상태를 확인할 수 있다.Executes an interrupt operation for the channel selected for Enable. On the other hand, regardless of Enable / Disable selection, the input signal is displayed as 1 (input high) or 0 (input low) in WX11. In this case, set the LED status selection DIP switch (DIP_SW3) to 11 and check the input status with the LED.

◈ 인터럽트 우선순위◈ Interrupt Priority

인터럽트 수행 중에, 혹은 동시에 여러 인터럽트가 발생할 때에는 인터럽트 우선 순위에 따라서 우선 순위가 높은 인터럽트부터 처리하며, 역시 VHDL로 구현되어 있다.When several interrupts occur during execution or at the same time, interrupts with higher priority are processed according to interrupt priority, and it is also implemented in VHDL.

즉, (우선순위 가장 높다) 0 > 1 > 2 > ...... > 15 (가장 낮다)I.e. (highest priority) 0> 1> 2> ......> 15 (lowest)

의 순서이다.Is in order.

예를 들면,For example,

인터럽트 5번 수행 중 3번 입력 시 --> 5번 수행을 마친 후 바로 3번 수행.If input 3 during interrupt 5,-> execute 3 times after finishing 5 times.

인터럽트 5번 수행 중 6번 입력 시 --> 5번 수행을 마친 후 바로 6번 수행.If you input 6 during interrupt 5, it executes 6 times after finishing 5 times.

인터럽트 5번 수행 중 6, 7, 1, 2 입력 시 --> 5번 수행 후 1, 2, 6, 7 순으로 수행If you input 6, 7, 1, 2 during interrupt 5,-> 5 times and then 1, 2, 6, 7

하도록 구성된다.Is configured to.

◈ 인터럽트의 출력◈ Interrupt output

□인터럽트 출력 : IRQ1로 출력되며, Low Active 신호이다.□ Interrupt output: It is output by IRQ1 and it is a low active signal.

INT 신호는 Open Collector 회로로 구성되어, 동시에 여러 개의 인터럽트 유닛 사용이 가능하다.INT signal is composed of Open Collector circuit, so that several interrupt units can be used at the same time.

□LED 표시 : 스위치부(DIP_SW3)의 상태에 따라서 다음의 표 2와 같은 상태 출력(Low Active).□ LED display: According to the state of switch part (DIP_SW3), status output as shown in Table 2 below (Low Active).

m1, m0m1, m0 LED 상태LED status 0, 00, 0 interrupt 처리 상태 표시.각 채널별로 독립적으로 동작하며, interrupt 입력신호가 들어오면 켜지고, interrupt 루틴이 끝나면 꺼진다.Interrupt processing status indication, operating independently for each channel, turned on when the interrupt input signal comes in, and turned off when the interrupt routine ends. 0, 10, 1 WY00 내부 값이 표시된다. 1: 켜짐, 0: 꺼짐WY00 internal value is displayed. 1: on, 0: off 1, 01, 0 WX10 내부 값이 표시된다. 1: 켜짐, 0: 꺼짐The WX10 internal value is displayed. 1: on, 0: off 1, 11, 1 WX11 내부 값이 표시된다. 1: 켜짐, 0: 꺼짐The WX11 internal value is displayed. 1: on, 0: off

◈ CPU 유닛과의 입출력 신호 전달 방법◈ I / O signal transfer method with CPU unit

CPU 유닛과는 다음의 표 3 및 도 9와 같은 내부 기억 장소를 이용하여 인터럽트 상태를 전달한다. 인터럽트 유닛의 ID는 디폴트로 예컨대 0x0C로 설정되어 있으며, 다른 모듈과 마찬가지로 특정 번지, 예컨대 0xFE 번지를 통해 확인할 수 있다.The CPU unit communicates the interrupt status by using an internal storage location as shown in Table 3 and Fig. 9 below. The ID of the interrupt unit is set to 0x0C by default, and like other modules, it can be confirmed through a specific address, for example, 0xFE address.

영역domain AddressAddress 내용Contents WY00WY00 0x000x00 PLC CPU 가 쓰고 Interrupt Unit이 참조ED: Enable Disable인터럽트 유닛 전체 동작 Enable 표시인터럽트 동작 중 Zero 로 Clear 되면 대기 중인 다른 인터럽트 신호가 모두 지워진다.IEB: Interrupt End Bit인터럽트 동작이 끝났음을 알리는 신호IA: Interrupt Acknowledge인터럽트 신호가 인식되었음을 알리는 신호The PLC CPU writes and the Interrupt Unit is referred to. ED : Enable Disable Interrupt Unit Total Operation Enable Indication When the interrupt is cleared to zero during interrupt operation, all other interrupt signals that are waiting are cleared. IEB : Interrupt End Bit Signal indicating the end of interrupt operation IA : Interrupt Acknowledge Signal indicating that the interrupt signal has been recognized WX10WX10 0x100x10 interrupt Unit 이 쓰고 PLC CPU 가 참조U/D: Up Rising / Down Falling Edge입력되는 신호가 Rising 혹은 Falling Edge 인지 알리는 신호 [0: Rising Edge, 1: Falling Edge]Channel No. : 입력 채널 번호 표시Ch. 0 : 0x0 ... Ch. 15 : ~ 0xFRSP: ResponseCPU가 IEB 신호로 내부 인터럽트 루틴 끝남을 알리면 바로 1 로 만든다.AV: Available인터럽트가 걸리면 바로 1로 set 된다. 다수의 인터럽트 유닛을 사용할 경우 인터럽트가 걸린 유닛을 나타내기 위해 사용한다. U / D : Up Rising / Down Falling Edge Signal indicating whether input signal is Rising or Falling Edge [0: Rising Edge, 1: Falling Edge] Channel No. : Input channel number display Ch. 0: 0x0 ... Ch. 15: ~ 0xF RSP : When ResponseCPU notifies the end of internal interrupt routine by IEB signal, it is set to 1 immediately. AV : Set to 1 immediately after Available interrupt. When using multiple interrupt units, it is used to indicate the interrupted unit. WX11WX11 0x110x11 interrupt Unit 이 쓰고 PLC CPU 가 참조 c0 ~ c15: 채널별로 현재 입력 상태를 나타낸다.High 이면 1 이 되고 low 인 경우 0이 됨.The interrupt unit writes and is referenced by the PLC CPU. c0 to c15: It indicates the current input status for each channel. If it is High, it is 1 and if it is low, it is 0.

◈ 타이밍도◈ Timing Diagram

인터럽트 유닛의 전체 타이밍도는 도 4와 같다.The overall timing diagram of the interrupt unit is shown in FIG.

외부 인터럽트 신호가 발생하면 인터럽트 유닛에서 내부적으로 Interrupt BUSY 신호가 발생하고, 인터럽트 동작 완료 후 Interrupt BUSY가 사라진다. 인터럽트 유닛에서 WX10, WX11, WY00에 각각 값이 상기 표 3과 같이 정해지면 하나의 인터럽트에 대해 전체 동작이 완료된다.When an external interrupt signal occurs, the interrupt unit internally generates an interrupt BUSY signal. After the interrupt operation is completed, the interrupt BUSY disappears. In the interrupt unit, when the values of WX10, WX11, and WY00 are determined as shown in Table 3, the entire operation is completed for one interrupt.

인터럽트 유닛은 WY00의 세번째 비트 ED 값이 1인 경우에 한하여 인터럽트 동작을 수행하며, 다른 채널의 인터럽트가 대기하고 있는 경우 ED 값이 0이 되면 대기하고 있는 값은 모두 지워진다.The interrupt unit performs the interrupt operation only when the third bit ED value of WY00 is 1, and when the ED value is 0 when the interrupt of another channel is waiting, all waiting values are deleted.

인터럽트 유닛이 CPU와 데이터를 주고 받으면서 동작하는 전체 루틴은 도 5와 같다.The entire routine in which the interrupt unit operates while exchanging data with the CPU is illustrated in FIG. 5.

◈ 회로도◈ Circuit diagram

인터럽트 유닛의 내부 핵심 동작은 VHDL 언어로 작성되었으며, ALTERA 3256 을 이용하여 하나의 칩으로 만들어졌다.The internal core operation of the interrupt unit is written in the VHDL language and is made on one chip using ALTERA 3256.

VHDL 내부는 도 6과 같은 구조로 구성되어 있는데, 가장 안쪽에 인터럽트 신호를 큐에 넣고 소팅(sorting)하여 우선 순위에 따라 서비스를 할 수 있도록 하는 intqueue.VHD가 있으며, 인터럽트 전체 스케쥴을 관장하는 inteschd.VHD가 다음 레이어에 있다. 외부 회로와의 인터페이스 부분은 cpuif.VHD가 담당하며, 최종적으로 top.gdf 회로가 도 7과 같이 구성되어 있다.The inside of the VHDL has the structure as shown in FIG. 6, and there is an intqueue.VHD that queues and sorts the interrupt signal in the innermost so that services can be performed according to priority, and inteschd manages the entire schedule of interrupts. .VHD is in the next layer. Cpuif.VHD is in charge of the interface with the external circuit, and the top.gdf circuit is finally configured as shown in FIG.

그리고, 도 8a 및 도 8b는 본 발명에 의하여 구현된 일실시예의 보드 전·후면의 예시도이다.8A and 8B are exemplary views of front and rear boards according to an embodiment embodied by the present invention.

상기와 같은 본 발명의 인터럽트 유닛에 의하면 종래의 PLC용 인터럽트 유닛이 가지는 문제점을 근본적으로 해결할 수 있으며, 원하는 채널만을 선택적으로 사용할 수 있고, 인터럽트 유닛 이외에 입출력 유닛으로도 사용할 수 있으며, 또한, 스위치와 LED에 의하여 동작 상태를 쉽게 파악하고 디버깅 할 수 있고, 내부 회로의 전체 동작 핵심 부분은 ALTERA의 PLD에 VHDL(Very High Speed Integrated Circuits Hardware Description Language)로 구현하여 원칩(One chip)화를 실현하여 고속 동작 및 동작의 안정화를 실현하는 매우 획기적인 효과가 있다.According to the interrupt unit of the present invention as described above, it is possible to fundamentally solve the problem of the conventional interrupt unit for PLC, selectively use only a desired channel, and can be used as an input / output unit in addition to the interrupt unit, and furthermore, The operation status can be easily identified and debugged by LED, and the whole operation core part of the internal circuit is realized in VHDL (Very High Speed Integrated Circuits Hardware Description Language) in ALTERA's PLD to realize one chip. There is a very significant effect of realizing the operation and stabilization of the operation.

Claims (2)

입출력 기능이 구비된 피엘씨용 고속 인터럽트 유닛에 있어서,In the high-speed interrupt unit for PLC equipped with input / output function, 각 인터럽트 입력 채널의 기능을 이네이블과 디스에이블 중에서 선택하는 입력신호 사용 선택 스위치부(DIP_SW1)와,An input signal use selection switch unit (DIP_SW1) for selecting a function of each interrupt input channel between enable and disable; 각 인터럽트 신호의 엣지 방향을 선택하는 입력전압 방향 선택 스위치부(DIP_SW2)와,An input voltage direction selector switch (DIP_SW2) for selecting the edge direction of each interrupt signal; 각 인터럽트 신호 전압의 레벨을 선택하는 입력전압 설정 스위치부(Jump1)와,An input voltage setting switch unit (Jump1) for selecting the level of each interrupt signal voltage; 미리 정해진 갯수(n)의 채널의 입력을 받는 입력부와,An input unit for receiving input of a predetermined number n of channels, 컴팩트 PLC 백플레인과 연결되는 어드레스, 데이터, IRQ1 등의 버스 드라이버부와,A bus driver section for address, data, IRQ1, etc. to be connected to the compact PLC backplane, VHDL을 이용하여 원칩(One Chip)으로 구현한 제어 처리부로 구성되며,Consists of a control processing unit implemented in one chip using VHDL, 특히 상기 제어 처리부는 CPU 유닛과 상태 전달을 위하여 내부 기억장소를 이용하며,In particular, the control processing unit uses an internal storage for transferring status with the CPU unit, 어드레스 0x00의 WY00 영역은 CPU 유닛이 기록하고, 인터럽트 유닛이 참조하는데, IA(Interrupt Acknowledge), IEB(Interrupt End Bit), ED(Enable/Disable) 데이터로 구성되고,The WY00 area at address 0x00 is written by the CPU unit and referenced by the interrupt unit, and is composed of Interrupt Acknowledge (IA), Interrupt End Bit (IEB), and Enable / Disable (ED) data. 어드레스 0x10의 WX10 영역은 인터럽트 유닛이 기록하고, CPU 유닛이 참조하는데, U/D(Rising/falling Edge), Channel NO., RSP(Response), AV(InterruptAvailable) 데이터로 구성되며,The WX10 area at address 0x10 is recorded by the interrupt unit and referenced by the CPU unit, and is composed of rising / falling edge (U / D), channel NO., RSP (response), and AV (InterruptAvailable) data. 어드레스 0x11의 WX11 영역은 인터럽트 유닛이 기록하고, CPU 유닛이 참조하는데, c0 내지 c n-1의 채널 현재 입력 상태의 데이터로 구성되고,The WX11 area at address 0x11 is written by the interrupt unit and referenced by the CPU unit, and is composed of data of the channel current input state of c0 to c n-1, 또한, 상기 제어처리부에서는In the control processing unit, 상기 ED가 1인 경우에 외부 인터럽트 신호가 발생했는지 판단하는 단계와,Determining whether an external interrupt signal is generated when the ED is 1; 외부 인터럽트 신호가 발생하지 않았으면 큐를 검사하는 단계로 진행하고, 외부 인터럽트 신호가 발생했으면 다시 Int Busy를 검사하여 현재 수행중인 인터럽트가 있는지 확인하는 단계와,If the external interrupt signal did not occur, go to the step of checking the queue, if the external interrupt signal has occurred, check the Int Busy again to see if there is an interrupt currently running, 현재 수행중인 인터럽트가 있으면 큐에 입력하고, 현재 수행중인 인터럽트가 없으면 U/D(Rising/falling Edge), Channel NO., RSP(Response), AV(Interrupt Available)를 갱신함으로써 내부 파라미터(WX10)를 설정하고, 입력 상태를 갱신함으로써 내부 파라미터(WX11)를 설정한 후 인터럽트 신호를 발생시키고 CPU의 IA를 검출(WY00)하는 단계와,If there is an interrupt currently being executed, it is entered into the queue, and if there is no interrupt currently being executed, the internal parameter (WX10) is updated by updating the rising / falling edge (U / D), Channel NO., RSP (Response) and AV (Interrupt Available). Setting an internal parameter (WX11) by updating the input state, generating an interrupt signal and detecting the CPU IA (WY00); CPU의 IA가 검출되면 Int Busy=1, AV=0, Int=0으로 설정하고, 인터럽트의 종료를 확인하는 IEB를 검출하는 단계와,If IA of the CPU is detected, setting Int Busy = 1, AV = 0, Int = 0, and detecting the IEB confirming the termination of the interrupt; IEB가 검출되면 RSP=1, Int Busy=0으로 설정하고, 큐를 검색하는 단계와,If IEB is detected, set RSP = 1, Int Busy = 0, search for queue, 큐에 대기중인 인터럽트가 없으면 다시 외부 인터럽트의 검출단계로 복귀하고, 큐에 대기중인 인터럽트가 있으면 우선순위가 가장 높은 인터럽트를 처리한 후 Int Busy 여부를 검색하는 단계로 복귀하는 동작을 하도록 구성됨을 특징으로 하는 입출력 기능이 구비된 피엘씨용 고속 인터럽트 유닛.If there is no interruption in the queue, the process returns to the external interrupt detection step, and if there is an interruption in the queue, the process returns to the step of searching for Int Busy after processing the interrupt having the highest priority. PLC high-speed interrupt unit with input / output function. 제1항에 있어서, 이에 더하여 내부 데이터 동작 상태의 디버깅을 위하여 LED 표시모드를 선택하는 스위치부(DIP_SW3)와,The method of claim 1, further comprising: a switch unit (DIP_SW3) for selecting an LED display mode for debugging an internal data operation state; 상기 선택 스위치부(DIP_SW3)의 선택 상태에 따라서 내부 데이터 상태를 표시하는 LED부를 더욱 포함하여 구성되는데,According to the selection state of the selection switch unit (DIP_SW3) further comprises an LED unit for displaying the internal data state, 상기 LED 표시모드는 2비트(m1, m0)로서, (m1, m0)=00이면 인터럽트 동작, 01이면 WY00상태, 10이면 WX10상태, 11이면 WX11상태를 표시하도록 구성됨을 특징으로 하는 입출력 기능이 구비된 피엘씨용 고속 인터럽트 유닛.The LED display mode is 2 bits (m1, m0), and the input / output function is configured to display interrupt operation when (m1, m0) = 00, WY00 state if 01, WX10 state if 10, and WX11 state if 11. High speed interrupt unit for PLC.
KR10-2002-0082829A 2002-12-23 2002-12-23 high speed interrupt unit for PLC KR100467408B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2002-0082829A KR100467408B1 (en) 2002-12-23 2002-12-23 high speed interrupt unit for PLC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2002-0082829A KR100467408B1 (en) 2002-12-23 2002-12-23 high speed interrupt unit for PLC

Publications (2)

Publication Number Publication Date
KR20040056253A true KR20040056253A (en) 2004-06-30
KR100467408B1 KR100467408B1 (en) 2005-01-24

Family

ID=37348654

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2002-0082829A KR100467408B1 (en) 2002-12-23 2002-12-23 high speed interrupt unit for PLC

Country Status (1)

Country Link
KR (1) KR100467408B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101273824B1 (en) * 2009-03-10 2013-06-11 엘에스산전 주식회사 Event processing module and plc system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101273824B1 (en) * 2009-03-10 2013-06-11 엘에스산전 주식회사 Event processing module and plc system

Also Published As

Publication number Publication date
KR100467408B1 (en) 2005-01-24

Similar Documents

Publication Publication Date Title
US5555510A (en) Automatic computer card insertion and removal algorithm
US5551012A (en) Single socket upgradeable computer motherboard with automatic detection and socket reconfiguration for inserted CPU chip
KR100734158B1 (en) Flexible interrupt controller that includes an interrupt force register
KR100597734B1 (en) Memorydrive and method of controlling the same
EP0720092A1 (en) Microprocessor with debugging system
US4455620A (en) Direct memory access control apparatus
EP0165517A2 (en) Emulator for non-fixed instruction set VLSI devices
US5042002A (en) Programmable controller with a directed sequencer
JP2003256352A (en) Usb control circuit capable of automatically switching channels
EP0712078A1 (en) Data processor with transparent operation during a background mode and method therefor
KR100467408B1 (en) high speed interrupt unit for PLC
US6857029B2 (en) Scalable on-chip bus performance monitoring synchronization mechanism and method of use
CN111245206B (en) Frequency converter IGBT drive control method and control device
EP0779582B1 (en) Data processor having bus controller
EP0565866B1 (en) Large-scale integrated circuit device
CN107748626B (en) PS/2 keyboard and mouse switching and monitoring equipment based on system on programmable chip
EP0472274A1 (en) Data processing apparatus having connectors to receive system components
Grisham et al. An optically isolated digital interface for the SKED system
US7307456B2 (en) Automatic status assignment logic circuit apparatus for bay devices
KR950000439Y1 (en) Auto-setting apparatus of serial communicational port
CN219739991U (en) Power supply circuit and power supply device
US5860013A (en) Flexible interrupt system for an integrated circuit
US20030009614A1 (en) Method for selecting an expansion device in a computer unit, a circuit board, and a computer
KR940003845B1 (en) Communication path bus selecting method
JP3064024B2 (en) Line monitor for remote monitoring and control system

Legal Events

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

Payment date: 20130111

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20140110

Year of fee payment: 10

LAPS Lapse due to unpaid annual fee