KR101074966B1 - Framework system for developing control program based on iec 61131-3 and method using the same - Google Patents

Framework system for developing control program based on iec 61131-3 and method using the same Download PDF

Info

Publication number
KR101074966B1
KR101074966B1 KR1020100029520A KR20100029520A KR101074966B1 KR 101074966 B1 KR101074966 B1 KR 101074966B1 KR 1020100029520 A KR1020100029520 A KR 1020100029520A KR 20100029520 A KR20100029520 A KR 20100029520A KR 101074966 B1 KR101074966 B1 KR 101074966B1
Authority
KR
South Korea
Prior art keywords
iec
control
framework
code
language
Prior art date
Application number
KR1020100029520A
Other languages
Korean (ko)
Other versions
KR20110109690A (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 KR1020100029520A priority Critical patent/KR101074966B1/en
Publication of KR20110109690A publication Critical patent/KR20110109690A/en
Application granted granted Critical
Publication of KR101074966B1 publication Critical patent/KR101074966B1/en

Links

Images

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/045Programme control other than numerical control, i.e. in sequence controllers or logic controllers using logic state machines, consisting only of a memory or a programmable logic device containing the logic for the controlled machine and in which the state of its outputs is dependent on the state of its inputs or part of its own output states, e.g. binary decision controllers, finite state controllers
    • 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/13Plc programming
    • G05B2219/13018Conversion ladder diagram to decision system, machine code, language
    • 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/13123C language

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

본 발명은 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크(Framework) 제공 방법으로서, IEC 61131-3에 명시된 펑션 블록(Function Block)을 비주얼한 블록 다이어그램으로 구현하는 단계, 블록 다이어그램을 그래픽 코드화하는 단계, 그래픽 코드가 IEC 61131-3의 제약조건에 따라 올바르게 작동하는지 검증하는 단계, 검증된 그래픽 코드를 객체 저장소에 저장하는 단계, 저장된 그래픽 코드를 C언어 코드 템플릿을 사용하여 C언어 제어 코드로 변환하는 단계를 거쳐 C 언어 제어 코드를 생성하고 C언어 기반의 제어코드를 타켓 PC로 전송하는 단계, 전송된 코드를 C언어 기반의 제어코드를 C언어 기반의 프레임워크에 적용하는 단계, 및 적용된 제어코드를 제어 프레임워크에 맞춰 프로세싱하는 단계를 포함하는 것을 특징으로 한다.
본 발명은 IEC 61131-3 기반의 펑션 블록을 블록 다이어그램으로 시각화하여 상이한 분야의 엔지니어들이 손쉽게 이해할 수 있는 제어 프로그램 개발을 위한 프레임워크 제공 방법 및 시스템을 제공한다.
The present invention is a method for providing a framework for developing a control program based on IEC 61131-3, and implementing a function block specified in IEC 61131-3 as a visual block diagram, and graphicly encoding the block diagram. Verifying that the graphic code operates correctly according to the constraints of IEC 61131-3, storing the verified graphic code in an object store, and converting the stored graphic code into C language control code using the C language code template. Generating a C language control code and converting the C language based control code to the target PC, applying the transmitted code to the C language based framework, and applying And processing the control code according to the control framework.
The present invention provides a method and system for providing a framework for developing a control program that can be easily understood by engineers in different fields by visualizing a function block based on IEC 61131-3 in a block diagram.

Description

IEC 61131―3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템 및 제공 방법{FRAMEWORK SYSTEM FOR DEVELOPING CONTROL PROGRAM BASED ON IEC 61131-3 AND METHOD USING THE SAME}Framework system and development method for developing control program based on IC 11111-3 {FRAMEWORK SYSTEM FOR DEVELOPING CONTROL PROGRAM BASED ON IEC 61131-3 AND METHOD USING THE SAME}

본 발명은 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 및 프레임워크 제공방법에 관한 것이다. 본 발명은 특히 IEC 61131-3 기반의 펑션 블록(Function Block)을 비쥬얼한 블록 다이어그램으로 제공하고, 그래픽 코드를 C언어 기반의 텍스트 코드로 변환하는 프레임워크 시스템 및 제공방법에 관한 것이다.The present invention relates to a framework and a framework providing method for developing a control program based on IEC 61131-3. The present invention relates in particular to a framework system and method for providing a functional block based on IEC 61131-3 as a visual block diagram and converting a graphic code into a C language based text code.

종래의 PLC(Programmable Logic Controller)프로그래밍 환경에 따른 소프트웨어에서 릴레이 로직 기반의 레더(Ladder) 프로그래밍 방식은 일반적인 시스템 프로그래머들이 접근하기 힘들고, 텍스트 기반의 제어 프로그램밍 방식은 기존의 제어 엔지니어들이 접근하기 힘들다는 문제점이 있었다.In the software according to the conventional PLC (Programmable Logic Controller) programming environment, the relay logic based ladder programming method is difficult for general system programmers, and the text based control programming method is difficult for traditional control engineers to access. There was this.

한편 국제표준 IEC 61131-3은 산업현장 전반에 걸쳐 널리 사용되고 있지만, 오류분석 및 해석 처리 기능이 떨어지고, 처리 태스크(Task)가 복잡해 질수록 데이터의 신뢰성이 떨어진다는 문제점이 있었다.On the other hand, the international standard IEC 61131-3 is widely used throughout the industrial site, but has a problem that the error analysis and analysis processing functions are inferior, and the more complicated the task, the less reliable the data.

본 발명에 따른 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템 및 제공 방법은 다음과 같은 해결과제를 목적으로 한다.Framework system and method for providing a control program based on IEC 61131-3 according to the present invention aims to solve the following problems.

첫째, 제어 프로그램 개발을 위한 프레임워크에서 IEC 61131-3 기반의 펑션 블록을 시각화하여 분야가 상이한 엔지니어들이 쉽게 접근하게 한다.First, the IEC 61131-3 based function block is visualized in the framework for control program development, making it easy for engineers from different disciplines to access.

둘째, IEC 61131-3으로 처리하기 힘든 문제점은 C언어 기반의 텍스트 코드를 제공하여 오류분석 및 데이터 신뢰성을 높이고자 한다.Second, the problem that cannot be handled by IEC 61131-3 is to provide C language-based text codes to improve error analysis and data reliability.

셋째, IEC 61131-3으로 처리하기 힘든 구성요소들 간의 동기화 문제, 태스크들의 우선순위 문제를 효과적으로 해결하고자 한다.Third, we will effectively solve the problem of synchronization between components and priority of tasks that are difficult to deal with with IEC 61131-3.

넷째, 특히 IEC 61131-3 기반의 산업용 로봇제어 프로그램 개발을 위해 상기 해결과제를 제시하고자 한다.Fourthly, in order to develop an industrial robot control program based on IEC 61131-3, the above problems are presented.

본 발명의 해결과제는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 해결과제들은 아래의 기재로부터 당업자에게 명확하게 이해되어 질 수 있을 것이다.The solution to the problem of the present invention is not limited to those mentioned above, and other solutions not mentioned can be clearly understood by those skilled in the art from the following description.

본 발명은 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크의 제공방법에 관한 것이다.The present invention relates to a method for providing a framework for developing a control program based on IEC 61131-3.

본 발명에 따른 프레이워크의 제공방법은 IEC 61131-3에 정의된 복수의 펑션 블록이 각각 블록 다이어그램으로 시각화되는 S1 단계를 포함한다.The method for providing a framework according to the present invention includes a step S1 in which a plurality of function blocks defined in IEC 61131-3 are visualized in a block diagram, respectively.

본 발명에 따른 프레이워크의 제공방법은 시각화된 각 블록 다이어그램 및 태스크가 그래픽 코드로 변환되는 S2 단계를 포함한다.The method for providing a framework according to the present invention includes the step S2 of converting each visualized block diagram and task into graphic code.

본 발명에 따른 프레이워크의 제공방법은 그래픽 코드가 C언어 제어 코드로 변환되는 S3 단계를 포함한다.The method for providing a framework according to the present invention includes a step S3 of converting a graphic code into a C language control code.

본 발명에 따른 프레이워크의 제공방법은 C언어 제어 코드가 타켓 PC로 전송되는 S4 단계 및 전송된 C 언어 제어 코드가 제어 프레임워크에 프로세싱되는 S5 단계를 포함한다.The method for providing a framework according to the present invention includes a step S4 in which the C language control code is transmitted to the target PC and a step S5 in which the transmitted C language control code is processed in the control framework.

본 발명에 따른 프레이워크의 제공방법은 S2 단계와 S3단계 사이에 S2 단계에서 변환된 그래픽 코드가 IEC 61131-3의 제약조건을 만족하는지 검증하는 단계를 더 포함한다.The method for providing a framework according to the present invention further includes verifying whether the graphic code converted in step S2 between steps S2 and S3 satisfies the constraint of IEC 61131-3.

본 발명에 따른 프레이워크의 제공방법은 검증 결과 IEC 61131-3의 제약조건을 만족하지 않는 경우 S2 단계를 재수행하고, 검증 결과 제약 조건을 만족하면 S3 단계를 수행하는 것을 포함한다.The method for providing a framework according to the present invention includes performing the step S2 again if the verification result does not satisfy the constraint of IEC 61131-3, and performing the step S3 if the verification result constraint is satisfied.

본 발명에 따른 S3 단계는 그래픽 코드가 객체 저장소(130)에 저장되는 S3-1 단계를 포함한다.Step S3 according to the present invention includes step S3-1 in which the graphic code is stored in the object store 130.

본 발명에 따른 S3 단계는 저장된 그래픽 코드 정보가 기준 C언어 코드 템플릿을 통해 C언어 제어 코드로 변환되는 S3-2 단계를 포함한다.Step S3 according to the present invention includes step S3-2 in which the stored graphic code information is converted into a C language control code through a reference C language code template.

본 발명에 따른 S3-1 단계의 객체 저장소(140)는 태스크가 저장되는 태스크 테이블(141), 펑션이 저장되는 객체 테이블(142), 블록 다이어그램의 그래픽 정보가 저장되는 드로우 테이블(143), 변수 정보가 저장되는 변수 테이블(144) 및 변수들의 연결관계를 저장하는 커넥션 테이블(145)을 포함한다.The object store 140 of step S3-1 according to the present invention includes a task table 141 in which a task is stored, an object table 142 in which a function is stored, a draw table 143 in which graphic information of a block diagram is stored, and a variable. A variable table 144 in which information is stored and a connection table 145 in which connection relationships between variables are stored.

본 발명에 따른 S3-2 단계의 기준 C언어 코드 템플릿은 펑션 블록의 기능에 따라 C언어 기반 코드로 만들어지는 것이 바람직하다.The reference C language code template of step S3-2 according to the present invention is preferably made of C language based code according to the function of the function block.

본 발명에 따른 S5 단계는 C언어 기반의 제어코드가 컴파일되어 C 객체로 변환되는 단계를 포함한다.The step S5 according to the present invention includes a step of compiling the C language-based control code and converting it into a C object.

본 발명에 따른 S5 단계는 컴파일된 C 객체의 펑션 주소 및 변수 주소가 제어 스레드(310)의 객체 테이블(311)에 등록되는 단계를 포함한다.Step S5 according to the present invention includes registering a function address and a variable address of the compiled C object in the object table 311 of the control thread 310.

본 발명에 따른 S5 단계는 제어 스레드(310)가 펑션 주소 및 변수 주소를 각각 제어 프레임워크의 펑션 테이블(330) 및 변수 테이블(340)에 등록하는 단계를 포함한다.Step S5 according to the present invention includes a step in which the control thread 310 registers the function address and the variable address in the function table 330 and the variable table 340 of the control framework, respectively.

본 발명에 따른 S5 단계는 C 객체가 제어 프레임워크에 프로세싱되는 단계를 포함한다.Step S5 according to the present invention includes the step of processing the C object into the control framework.

본 발명에 따른 S5 단계는 C 객체로 표현된 펑션 블록이 제어 프레임워크의 우선순위 테이블에 저장된 우선순위에 따라 순서대로 프로세싱되는 것을 포함한다.Step S5 according to the present invention includes that the function blocks represented by the C objects are processed in order according to the priority stored in the priority table of the control framework.

본 발명의 다른 실시예는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템에 관한 것이다.Another embodiment of the present invention relates to a framework system for developing a control program based on IEC 61131-3.

본 발명에 따른 프레임워크 시스템은 IEC 61131-3에 정의된 펑션 블록이 블록 다이어그램으로 시각화되는 블록 다이어그램 생성부(110)를 포함한다.The framework system according to the present invention includes a block diagram generator 110 in which a function block defined in IEC 61131-3 is visualized as a block diagram.

본 발명에 따른 프레임워크 시스템은 블록 다이어그램 및 태스크가 그래픽 코드로 변환되는 비쥬얼 인터페이스(120)를 포함한다.The framework system according to the present invention includes a visual interface 120 in which block diagrams and tasks are converted into graphic code.

본 발명에 따른 프레임워크 시스템은 그래픽 코드가 C언어 제어 코드로 변환되는 변환부(150)를 포함한다.The framework system according to the present invention includes a conversion unit 150 for converting a graphic code into a C language control code.

본 발명에 따른 프레임워크 시스템은 C언어 제어코드를 호스트 PC(100)에서 타겟 PC(200)로 전송하는 전송부(160)를 포함한다.The framework system according to the present invention includes a transmission unit 160 for transmitting the C language control code from the host PC 100 to the target PC 200.

본 발명에 따른 프레임워크 시스템은 전송된 C언어 제어 코드가 프로세싱되는 제어 프레임워크(300)를 포함한다.The framework system according to the present invention includes a control framework 300 in which the transmitted C language control codes are processed.

본 발명에 따른 비쥬얼 인터페이스(120)는 변환된 그래픽 코드가 IEC 61131-3의 제약조건을 만족하는지 검증하는 검증부(130)를 포함한다.The visual interface 120 according to the present invention includes a verification unit 130 that verifies whether the converted graphic code satisfies the constraint of IEC 61131-3.

본 발명에 따른 비쥬얼 인터페이스(120)는 검증부(130)의 검증 결과 상기 변환된 그래픽 코드가 IEC 61131-3의 제약조건을 만족하지 않는 경우 시각화된 블록 다이어그램을 그래픽 코드로 재변환하는 것을 포함한다.The visual interface 120 according to the present invention includes reconverting the visualized block diagram into graphic code when the converted graphic code does not satisfy the constraint of IEC 61131-3 as a result of the verification of the verification unit 130. .

본 발명에 따른 변환부(150)는 그래픽 코드가 각각의 데이터 속성에 따라 저장되는 객체 저장소(140)를 더 포함한다.The conversion unit 150 according to the present invention further includes an object store 140 in which graphic codes are stored according to respective data attributes.

본 발명에 따른 프레임워크 시스템은 타겟 PC로 전송된 C언어 제어코드가 컴파일되어 C 객체로 변환되는 컴파일부(210)를 더 포함한다.The framework system according to the present invention further includes a compiling unit 210 in which the C language control code transmitted to the target PC is compiled and converted into a C object.

본 발명에 따른 제어 프레임워크(300)는 컴파일된 C 객체로 표현된 펑션 블록에 따른 우선순위가 저장된 우선순위 테이블(320)을 포함한다.The control framework 300 according to the present invention includes a priority table 320 in which priorities are stored according to function blocks represented by compiled C objects.

본 발명에 따른 제어 프레임워크(300)는 컴파일된 C 객체의 펑션 주소가 저장되는 펑션 테이블(330)을 포함한다. The control framework 300 according to the present invention includes a function table 330 in which function addresses of compiled C objects are stored.

본 발명에 따른 제어 프레임워크(300)는 컴파일된 C 객체의 변수 주소가 저장되는 변수 테이블(340)을 포함한다.The control framework 300 according to the present invention includes a variable table 340 in which variable addresses of compiled C objects are stored.

본 발명에 따른 제어 프레임워크(300)는 컴파일된 C 객체로 표현된 펑션 블록의 상기 변수 테이블에 대한 접근 정보를 저장하는 액세스 테이블(350)를 포함한다.The control framework 300 according to the present invention includes an access table 350 for storing access information on the variable table of the function block represented by the compiled C object.

본 발명에 따른 제어 프레임워크(300)는 컴파일된 C 객체의 펑션 주소 및 변수주소를 각각 펑션 테이블(330) 및 변수 테이블(340)에 등록하는 제어 스레드(310)를 포함한다.The control framework 300 according to the present invention includes a control thread 310 for registering the function address and the variable address of the compiled C object in the function table 330 and the variable table 340, respectively.

본 발명은 IEC 61131-3 기반의 펑션 블록을 블록 다이어그램으로 시각화하여 상이한 분야의 엔지니어들이 손쉽게 이해할 수 있는 제어 프로그램 개발을 위한 프레임워크 제공 방법 및 시스템을 제공한다.The present invention provides a method and system for providing a framework for developing a control program that can be easily understood by engineers in different fields by visualizing a function block based on IEC 61131-3 in a block diagram.

본 발명은 IEC 61131-3의 펑션 블록을 C언어 기반의 텍스트 코드 변환하고 제어 프레임워크에서 프로세싱하여 오류분석 및 데이터 신뢰성이 높은 제어 프로그램 개발을 위한 프레임워크 제공 방법 및 시스템을 제공한다.The present invention provides a method and system for providing a framework for developing a control program with high error analysis and data reliability by converting a function block of IEC 61131-3 into C language-based text code conversion and processing in a control framework.

본 발명은 IEC 61131-3의 펑션 블록을 C언어 기반의 텍스트 코드 변환하고 제어 프레임워크에서 펑션 블록 요소들 간을 동기화하고, 태스크들의 우선순위를 부여하는 제어 프로그램 개발을 위한 프레임워크 제공 방법 및 시스템을 제공한다.The present invention provides a method and system for providing a framework for developing a control program for converting a function block of IEC 61131-3 into C language based text code, synchronizing function block elements in a control framework, and assigning priorities to tasks. To provide.

본 발명은 특히 IEC 61131-3 기반의 산업용 로봇제어 프로그램 개발을 위한 The present invention is specifically for the development of industrial robot control program based on IEC 61131-3

제어 프로그램 개발을 위한 프레임워크 제공 방법 및 시스템을 제공한다.Provide framework and method for system development for control program.

본 발명의 효과는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 효과들은 아래의 기재로부터 당업자에게 명확하게 이해되어 질 수 있을 것이다.The effects of the present invention are not limited to those mentioned above, and other effects not mentioned can be clearly understood by those skilled in the art from the following description.

도 1은 본 발명 프레임워크 제공 방법을 도시한 블록 다이어그램이다.
도 2는 본 발명의 전체적인 프레임워크 구조를 도시한 블록 다이어그램이다.
도 3은 펑션 블록 다이어그램을 객체 저장소에 등록하는 과정을 도시한 블록 다이어그램이다.
도 4는 객체 저장소에 저장된 데이터를 C언어 기반의 제어코드로 변환하는 과정을 도시한 블록 다이어그램이다.
도 5는 컴파일된 C언어 기반의 제어코드를 제어 프레임워크에 등록하는 과정을 도시한 블록 다이어그램이다.
도 6은 서로 다른 영역에 있는 제어 스레드들이 변수 정보를 참조하는 과정을 도시한 다이어그램이다.
1 is a block diagram illustrating a method for providing a framework of the present invention.
2 is a block diagram illustrating the overall framework structure of the present invention.
3 is a block diagram illustrating a process of registering a function block diagram in an object store.
4 is a block diagram illustrating a process of converting data stored in an object store into a C language-based control code.
FIG. 5 is a block diagram illustrating a process of registering a compiled C language-based control code with a control framework.
6 is a diagram illustrating a process in which control threads in different areas refer to variable information.

이하에서는 도면을 참조하면서 본 발명에 따른 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법 및 프레임워크 시스템에 관하여 구체적으로 설명하겠다.Hereinafter, a framework providing method and framework system for developing a control program based on IEC 61131-3 according to the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명이 제안하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한프레임워크 제공 방법을 도시한다.1 illustrates a method for providing a framework for developing a control program based on IEC 61131-3 proposed by the present invention.

IEC 61131-3에 정의된 복수의 펑션 블록(Function Block)이 각각 블록 다이어그램으로 시각화되는 S1 단계는 IEC 61131-3의 기능을 활용하여 구현된다. 다른 실시예로 펑션 블록과 같은 함수를 시각화(Visualization)하는 별도의 프로그램 또는 장치를 통해 시각화될 수 있다.The step S1, in which each of the plurality of function blocks defined in IEC 61131-3 is visualized in a block diagram, is implemented using the functions of IEC 61131-3. In another embodiment, it may be visualized through a separate program or device that visualizes a function such as a function block.

시각화된 각 블록 다이어그램 및 태스크는 호스트 PC(100)의 비쥬얼 인터페이스(Visual Interface, 120)를 통해 그래픽 코드로 변환된다(S2 단계). 이 S2 단계를 통해 블록 다이어그램이란 시각 데이타가 컴퓨터가 처리 가능한 코드로 변환된다. 이 그래픽 코드는 호스트 PC(100)에서 C언어 제어코드로 변환된다(S3 단계).Each visualized block diagram and task are converted into graphic codes through the visual interface 120 of the host PC 100 (step S2). In this step S2, the block diagram is transformed into visual data that can be processed by a computer. This graphic code is converted into a C language control code in the host PC 100 (step S3).

상기와 같이 그래픽 코드를 곧바로 C언어 제어코드로 변환할 수도 있지만, 변환된 그래픽 코드가 IEC 61131-3의 제약조건을 만족하는지 검증하는 것이 바람직하다. IEC 61131-3의 제약조건이란 결국 그래픽 코드가 IEC 61131-3의 FBD 언어 문법에 맞는지 검증하는 것이다. As described above, the graphic code can be directly converted into a C language control code, but it is desirable to verify that the converted graphic code satisfies the constraints of IEC 61131-3. The constraint of IEC 61131-3 is to verify that the graphic code conforms to the FBD language grammar of IEC 61131-3.

한편 검증 결과 조건을 만족하지 않는다면 부적합한 그래픽 코드로 변환된 블록 다이어그램 또는 태스크를 그래픽 코드로 변환하는 S2 단계를 재수행하고, 조건을 만족한다면 다음 단계인 S3 단계를 수행하게 된다.On the other hand, if the verification result does not satisfy the condition, the step S2 of converting the block diagram or task converted into the inappropriate graphic code into the graphic code is performed again. If the condition is satisfied, the next step S3 is performed.

이제 그래픽 코드는 호스트 PC(100)의 변환부(150)에서 C언어 제어코드로 변환된다(S3 단계). S3 단계는 그래픽 코드가 각각의 데이터 속성에 따라 객체 저장소(Object Repository, 140)에 저장되는 단계(S3-1 단계) 및 저장된 그래픽 코드가 기준 C 언어 코드 템플릿(template)을 통해 C언어 제어 코드로 변환되는 단계(S3-2 단계)를 포함한다.Now, the graphic code is converted into the C language control code in the conversion unit 150 of the host PC 100 (step S3). In step S3, the graphic code is stored in the object repository 140 according to each data property (step S3-1) and the stored graphic code is transferred to the C language control code through the reference C language code template. A step of converting (step S3-2) is included.

S3-1 단계에서는 그래픽 코드의 데이터 속성에 따라 제어 프레임워크(300)의 테이블들에 저장된다. 즉 태스크(Task)는 태스크 테이블(Task Table, 141), 펑션은 객체 테이블(Object Table, 142), 블록 다이어 그램의 그래픽 정보는 드로우 테이블(Draw Table, 143), 사용되는 모든 변수 정보는 변수 테이블(Variable Table, 144) 및 변수들의 연결관계는 커넥션 테이블(Connnection Table, 145)에 각각 저장된다.In the step S3-1 is stored in the tables of the control framework 300 according to the data attribute of the graphic code. That is, a task is a task table (141), a function is an object table (142), a graphic of a block diagram is a draw table (143), and all of the variable information used is a variable table. (Variable Table, 144) and the connection relationship between the variables are stored in the Connection Table (145), respectively.

변수들의 연결관계는 외부 변수(External Variable) 또는 내부 변수(Internal Variable) 중 하나 이상을 통해 연결되게 된다. 하나의 실시예는 별도의 연결관계를 나타내는 외부 변수(External variable)를 선언하는 것이다. 이러한 방법으로 구성된 연결관계는 연결된 구성요소들 간에 총제적인 연결관계를 갖는 것이므로 펑션 블록이나 태스크의 정의에 따라 다수의 내부변수(Internal variable) 정보를 참조할 수 있다. Variables are linked through at least one of an external variable and an internal variable. One embodiment is to declare an external variable that represents a separate connection. Since the connection relationship configured in this way has an overall connection relationship between the connected components, a plurality of internal variable information can be referred to according to the definition of the function block or task.

또 다른 실시예는 구성요소가 갖는 내부 변수를 직접 참조하여 연결관계를 형성하는 것으로 이러한 방법은 참조의 범위가 연결된 변수로 한정된다.Another embodiment is to form a connection by directly referring to internal variables of a component, and this method is limited to variables to which the scope of the reference is linked.

S3-2 단계에서 저장된 그래픽 코드가 기준 C언어 코드 템플릿을 통해 C언어 제어 코드로 변환된다. 기준 C언어 코드 템플릿은 펑션 블록 기능 및 블록들 간의 연관성에 따라 C언어 기반 코드로 사전에 작성된다. The graphic code stored in the step S3-2 is converted into the C language control code through the reference C language code template. The reference C language code template is pre-written in C language based code according to the function block function and the association between the blocks.

이 기준 C언어 코드 템플릿은 다른 프로그래밍 언어에서 일반적으로 제공되는 코드 템플릿과 같은 역할을 하는 것으로서, 특정한 펑션 블록의 그래픽 코드가 입력되면 자동으로 같은 기능을 갖는 C 언어 제어 코드(함수)로 변환되는 것이다.This reference C language code template serves as a code template generally provided in other programming languages. When a graphic code of a specific function block is input, it is automatically converted into a C language control code (function) having the same function. .

구체적인 동작을 살펴보면, 그래픽 코드 정보의 변수 종류에 따른 변수 세트(Variable Set)가 선언되고 필요한 메모리 영역이 할당되어 그래픽 코드가 C언어 제어코드로 변환된다. 변수 세트 선언은 변수 선언 코드를 통해 동적으로 생성되고 이를 실행하는 함수 부분은 미리 그 형식이 정의되어 코드 템플릿화 되어 준비된다. Looking at the specific operation, a variable set according to the variable type of graphic code information is declared, a required memory area is allocated, and the graphic code is converted into a C language control code. Variable set declarations are created dynamically through variable declaration code, and the part of the function that executes them is pre-defined and prepared as a code template.

이를 통해 펑션 블록의 내용이 수정되거나 새로운 펑션 블록이 추가되더라도 템플릿으로 정의된 코드를 수정함으로써 프로그램 재컴파일의 부담을 덜어준다. S1에서 S3 단계를 통해 IEC 61131-3에 정의된 펑션 블록이 C 언어 제어 코드로 변환된다.Through this, even if the function block contents are modified or a new function block is added, the code defined by the template is modified to relieve the burden of recompiling the program. Through the steps S1 to S3, the function blocks defined in IEC 61131-3 are converted into C language control codes.

변환된 C 언어 제어 코드가 타겟 PC(200)의 제어 프레임워크 상에서 프로세싱되어야 오류 분석, 구성 요소간의 동기화 등의 문제를 해결할 수 있는 기반이 마련된다. 이를 위해 먼저 C언어 제어 코드는 호스트 PC(100)의 송신부(161)에서 타켓 PC의 수신부(162)로 전송되고(S4 단계), 타겟 PC의 제어 프레임워크에서 프로세싱된다(S5 단계).The converted C language control code must be processed on the control framework of the target PC 200 to provide a foundation for solving problems such as error analysis and synchronization between components. To this end, the C language control code is first transmitted from the transmitting unit 161 of the host PC 100 to the receiving unit 162 of the target PC (step S4) and processed in the control framework of the target PC (step S5).

S5 단계는 먼저 전송된 C 언어 제어 코드가 컴파일러를 통해 C 객체로 컴파일되는 단계, 컴파일된 C 객체의 펑션 주소 및 변수 주소가 제어 스레드(Control Thread, 310)의 객체 테이블(311)에 등록되는 단계, 제어 스레드(310)가 펑션 주소 및 변수 주소를 각각 제어 프레임워크의 펑션 테이블(330) 및 변수 테이블(340)에 등록하는 단계 및 C 객체가 제어 프레임워크에 프로세싱되는 단계를 포함한다. In step S5, the transmitted C language control code is first compiled into a C object through a compiler, and a function address and a variable address of the compiled C object are registered in the object table 311 of the control thread 310. The control thread 310 registers the function address and the variable address in the function table 330 and the variable table 340 of the control framework, respectively, and the C object is processed in the control framework.

본 발명에 따른 C 언어 제어 코드가 컴파일되는 단계는 반드시 S5 단계에 포함되지 않아도 무방하다. 예를 들어 호스트 PC에서 C 언어 제어 코드가 생성된 후 컴파일되어도 본 발명의 목적을 달성할 수도 있을 것이다. 즉 호스트 PC에서 C언어 제어 코드가 생성된 후 컴파일되는 단계를 가지는 것은 본 발명의 또 다른 실시예가 될 수 있다.The step of compiling the C language control code according to the present invention may not necessarily be included in the step S5. For example, even if the C language control code is generated and compiled on the host PC, the object of the present invention may be achieved. That is, it may be another embodiment of the present invention to have the C language control code generated in the host PC and then compiled.

구체적으로 컴파일된 C 객체가 제어 스레드의 객체 테이블에 자신의 펑션 주소 및 변수 주소를 등록하고, 제어 스레드는 등록된 펑션 주소 및 변수 주소 데이타를 기준으로 각각 제어 프레임 워크의 펑션 테이블 및 변수 테이블에 등록한다. 제어 프레임워크(300)는 제어 스레드(310)의 객체 컨트롤러(312)를 통해 C 객체를 실행, 대기 또는 중지 상태로 만든다. 즉 제어 프레임워크(300)는 C 객체의 현재 상태를 설정하여 프로세싱 과정을 제어한다. Specifically, the compiled C object registers its function address and variable address in the object table of the control thread, and the control thread registers in the function table and variable table of the control framework based on the registered function address and variable address data, respectively. do. The control framework 300 puts the C object into a running, waiting or suspended state through the object controller 312 of the control thread 310. That is, the control framework 300 controls the processing process by setting the current state of the C object.

또한 제어 프레임워크(300)는 우선순위 테이블(320)을 이용하여 펑션 블록들 종류에 따라 C 객체 프로세싱 순서를 제어한다. 우선순위 테이블은 프레임워크의 프로세싱 전 또는 프로세싱 과정 중에 펑션 블록에 대한 우선순위를 설정하여 C 객체를 프로세싱하는데 이용된다.
In addition, the control framework 300 controls the C object processing order according to the type of function blocks using the priority table 320. The priority table is used to process C objects by setting priorities for function blocks before or during processing of the framework.

이하 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템에 대해 상세히 설명하고자 한다. 다만, 전술한 프레임워크 제공방법과 공통되는 설명은 생략하고 시스템에 있어 핵심적인 구성을 중심으로 설명한다.Hereinafter, a framework system for developing a control program based on IEC 61131-3 will be described in detail. However, descriptions common to the above-described framework providing method will be omitted and will be described based on the core configuration of the system.

도 2는 본 발명의 전체적인 프레임워크 구조를 도시한다. 본 발명의 프레임워크 구조는 크게 2가지 부분으로 구성된다. 호스트 PC(100)의 구성은 IEC61131-3 기반의 시각화 프로그래밍(Visual Programming) 및 C 언어 기반의 제어코드를 생성하고, 타겟 PC(200)의 구성은 생성된 제어코드를 제어 프레임워크 환경으로 가져와 태스크들을 프로세싱한다.2 illustrates the overall framework structure of the present invention. The framework structure of the present invention is largely composed of two parts. The configuration of the host PC 100 generates control codes based on IEC 61131-3 based Visual Programming and C language, and the configuration of the target PC 200 imports the generated control codes into the control framework environment and performs tasks. Process them.

호스트 PC는 IEC 61131-3에 정의된 펑션 블록이 블록 다이어그램으로 시각화되는 블록 다이어그램 생성부(110), 블록 다이어그램 및 태스크가 그래픽 코드로 변환되는 비쥬얼 인터페이스(120), 그래픽 코드가 C언어 제어 코드로 변환되는 변환부(150) 및 변환된 C언어 제어코드를 타겟 PC(200)로 전송하는 송신부(161)를 포함한다.The host PC includes a block diagram generator 110 in which function blocks defined in IEC 61131-3 are visualized as block diagrams, a visual interface 120 in which block diagrams and tasks are converted into graphic codes, and graphic codes as C language control codes. The conversion unit 150 and the transmission unit 161 for transmitting the converted C language control code to the target PC (200).

제어 프로그램 개발을 위한 프레임워크 시스템에서도 비쥬얼 인터페이스(120)가 그래픽 코드를 생성한 후 곧바로 변환부(150)로 C 언어 제어코드를 전달해도 된다. 다만 변환된 그래픽 코드가 IEC61131-3 조건에 부합하는지 검증부(130)를 통해 검증하는 것이 바람직하다. In the framework system for developing the control program, the visual interface 120 may generate the graphic code and then immediately transfer the C language control code to the conversion unit 150. However, it is preferable to verify through the verification unit 130 whether the converted graphic code conforms to the IEC61131-3 conditions.

만약, 검증부(130)의 검증결과 조건을 만족하지 않는다면, 부적법한 블록 다이어그램 또는 태스크는 비쥬얼 인터페이스(130)에서 재변환을 수행한다.If the verification result condition of the verification unit 130 is not satisfied, an invalid block diagram or task performs reconversion in the visual interface 130.

변환부(150)는 저장된 정보를 바탕으로 미리 정의된 기준 C언어 코드 템플릿을 사용하여 C언어 기반의 제어코드를 생성한다. 기준 C언어 코드 템플릿을 사용하여 곧바로 변환하는 것도 가능하겠지만 빠르고 효과적인 변환을 위해 변환부에 객체저장소(140)를 포함하는 것이 바람직하다.The conversion unit 150 generates the control language based on the C language using a predefined reference C language code template based on the stored information. It may be possible to convert directly using a reference C language code template, but it is preferable to include the object store 140 in the conversion unit for fast and effective conversion.

도 3은 비쥬얼 인터페이스(110)에서 작성된 태스크 및 펑션 블록 그래픽 코드를 객체 저장(130)소에 저장하는 방법의 전체적인 절차를 도시한다. 3 shows the overall procedure of a method for storing the task and function block graphic code created in the visual interface 110 in the object storage 130.

그래픽 코드의 종류에 따라 각 태스크는 객체 저장소(130)의 태스크 테이블(131)에 저장되고, 펑션 블록과 같이 특화된 기능을 갖는 펑션들은 객체 테이블(132)에 저장되고, 블록 다이어 그램의 그래픽 정보는 드로우 테이블(133)에 저장되고, 이들이 갖는 모든 변수 정보는 변수 테이블(134)에 저장되고, 변수들의 연결관계는 커넥션 테이블(135)에 저장된다. According to the type of graphic code, each task is stored in the task table 131 of the object store 130, and functions having specialized functions such as function blocks are stored in the object table 132, and the graphic information of the block diagram is Stored in the draw table 133, all the variable information they have is stored in the variable table 134, the connection relationship of the variables are stored in the connection table (135).

커넥션 테이블을 통해 태스크, 펑션 블록 및 프로그램은 연결관계를 형성할 수 있다.Connection tables allow tasks, function blocks, and programs to form connections.

펑션 블록은 몇 개의 데이터 입력 변수(Data Input variable)와 한 개의 태스크 입력 변수(Task Input variable)을 갖는다. 한 개의 태스크가 펑션 블록과 연결되어 있고 연결관계는 태스크 입력 변수를 통하여 나타낸다. 데이터 입력 변수는 고정된 값을 갖거나, 다른 펑션 블록의 변수 값을 참조할 수 있다. The function block has several data input variables and one task input variable. One task is connected to a function block and the connection relationship is represented through task input variables. The data input variable may have a fixed value or may refer to a variable value of another function block.

펑션 블록의 결과는 데이터 출력 변수(Data Output variable)에 저장하며, 이 변수를 읽어 태스크는 다음 작업을 결정한다. 태스크와 펑션 블록 간의 처리과정 성공여부 또는 성공한 처리결과는 태스크 출력 변수(Task Output variable)에 저장된다.The result of the function block is stored in a Data Output variable, which is read and the task determines the next task. The success or failure of the process between the task and the function block is stored in a task output variable.

도 4는 객체 저장소(140)에 저장된 그래픽 코드 정보를 기준 C언어 코드 템플릿에 맞게 분류하는 과정을 도시하는 것으로서, IEC61131-3 구성요소들 중에서 펑션 블록을 변환하는 과정을 도시한다. FIG. 4 illustrates a process of classifying graphic code information stored in the object store 140 according to a reference C language code template, and illustrates a process of converting a function block among IEC61131-3 components.

펑션 블록이 갖는 변수들의 종류에 따라 변수 세트가 선언되는데, 도 4의 펑션 블록은 2개의 데이터 입력(data input)과 1개의 데이터 출력(data output)을 갖고, 자료형은 각각 data_input_variable_set, data_output_variable_set으로 2개의 구조체가 선언되며, 이 형태로 선언된 data_i_set, data_o_set은 고유한 메모리 영역을 갖는다. A variable set is declared according to the types of variables of the function block. The function block of FIG. 4 has two data inputs and one data output, and data types are data_input_variable_set and data_output_variable_set, respectively. The structure is declared, and data_i_set and data_o_set declared in this form have their own memory area.

실질적인 펑션 블록 연산은 doExec함수에서 실행한다. 펑션 블록의 변수들은 다른 구성요소들이 참조할 수 있기 때문에, 별도의 메모리 공간에 데이터를 복사해서 처리한 후, 변수를 업데이트 하는 구조이다. 참조 변수에 접근하는 Access_val_set과 Upd_val_set 함수는 동기화(synchronization)처리를 담당한다. The actual function block operation is executed by the doExec function. Since variables in the function block can be referred to by other components, they are structures that update the variables after copying and processing data in a separate memory space. The Access_val_set and Upd_val_set functions that access the reference variable are responsible for the synchronization process.

도 4의 변수 선언 코드는 동적으로 생성되고, 이를 실행하는 함수 부분은 미리 그 형식을 정의하여 코드 템플릿화하여 확장성이 높다. 펑션 블록의 내용이 수정되거나 새로운 펑션 블록이 추가되더라도 템플릿으로 정의된 코드를 수정하면 프로그램 재컴파일의 부담을 덜어주게 된다.The variable declaration code of FIG. 4 is dynamically generated, and a function part for executing the same is highly extensible by defining a template in advance and formatting the code. Even if the content of the function block is modified or a new function block is added, modifying the code defined by the template will relieve the burden of recompiling the program.

생성된 C언어 기반 제어코드는 전송부(160)를 통해 타겟 PC로 전송되는데, 전송부(160)는 호스트 PC의 송신부(161)와 타겟 PC의 수신부(162)를 포함한다. 구체적으로 호스트 PC의 송신부(161)를 통해 타겟 PC의 수신부(162)로 전송된다. The generated C language-based control code is transmitted to the target PC through the transmitter 160. The transmitter 160 includes a transmitter 161 of the host PC and a receiver 162 of the target PC. In more detail, it is transmitted to the receiving unit 162 of the target PC through the transmitting unit 161 of the host PC.

타켓 PC의 컴파일부(210)는 전송된 C 언어 제어 코드를 컴파일하여 C 객체를 생성한다. C언어 제어 코드는 생성된 이후에 컴파일되면 충분하므로 컴파일부(2310)가 반드시 타겟 PC에 포함되는 것으로 한정되지는 않는다. 도 2에서 점선으로 컴파일부를 도시한 것은 호스트 PC에서 컴파일이 되는 실시예를 보여준다. 다만, 효율적인 프로세싱 과정을 위해 타겟 PC에 존재하는 것이 바람직하다. Compiler 210 of the target PC compiles the transmitted C language control code to generate a C object. Since the C language control code is sufficient to be compiled after being generated, the compilation unit 2310 is not limited to being included in the target PC. In FIG. 2, the compiling unit is illustrated by a dotted line, which shows an embodiment of compiling in a host PC. However, it is desirable to exist in the target PC for efficient processing.

이후 컴파일된 C 객체가 제어 프레임 워크에 등록되는 절차가 도 5에 도시된다. 상세한 절차는 전술한 제어 프로그램 개발을 위한 프레임워크 제공방법과 동일하므로 생략한다.Then, the procedure in which the compiled C object is registered in the control framework is shown in FIG. 5. The detailed procedure is omitted because it is the same as the framework providing method for the control program development described above.

변환된 C 제어코드가 프로세싱되는 제어 프레임워크(300)는 펑션 블록에 따른 우선순위가 저장된 우선순위 테이블(320), 컴파일된 C 객체의 펑션 주소가 저장되는 펑션 테이블(330), 컴파일된 C 객체의 변수 주소가 저장되는 변수 테이블(340), 컴파일된 C 객체로 표현된 펑션 블록의 변수 테이블에 대한 접근 정보를 저장하는 액세스 테이블(350) 및 컴파일된 C 객체의 펑션 주소 및 변수주소를 각각 펑션 테이블(330) 및 변수 테이블(340)에 등록하는 제어 스레드(310)를 포함한다. The control framework 300 in which the converted C control code is processed includes a priority table 320 storing a priority according to a function block, a function table 330 storing a function address of a compiled C object, and a compiled C object. The variable table 340 in which the variable address of the variable is stored, the access table 350 storing the access information for the variable table of the function block represented by the compiled C object, and the function address and variable address of the compiled C object are respectively functions. And a control thread 310 that registers with the table 330 and the variable table 340.

제어 스레드 간에 관련된 프로세스를 처리하기 위해 C 객체의 변수를 서로 참조할 수도 있다. 도 6은 서로 다른 제어 스레드에서 실행되는 C 객체의 변수 참조 과정을 도시한다. 상세히 설명하면 다음과 같이 4개의 과정으로 이루어진다. ① 제어 스레드 A는 참조할 변수를 제어 프레임워크의 변수 테이블에서 검색한다. ② 참조할 변수를 선택하면 변수 테이블은 해당 변수를 갖는 제어 스레드 B에게 접근 요청을 보낸다. ③ 제어 스레드 B는 이에 대한 응답을 변수 테이블에 전송하고, 변수 테이블은 해당 변수의 접근상태를 수정한다. ④ 제어 스레드 B는 제어 스레드 A에 변수정보를 제공한다. You can also reference variables in C objects to each other to handle related processes between control threads. 6 illustrates a variable reference process of C objects executed in different control threads. In detail, it consists of four processes as follows. (1) Control thread A looks up the variable table of the control framework for reference. ② If you select a variable to refer to, the variable table sends an access request to the control thread B that has the variable. ③ The control thread B sends a response to the variable table, and the variable table modifies the access state of the variable. (4) Control thread B provides variable information to control thread A.

접근 상태에 대한 정보는 액세스 테이블(350)에 저장되어 어떤 펑션 블록이 변수 테이블에 접근할 수 있는지에 대한 정보를 저장한다.Information about the access state is stored in the access table 350 to store information about which function block can access the variable table.

결국 타겟 PC는 C언어 제어 코드를 프로세싱하여 IEC61131-3으로 처리하기 힘든 오류분석, 구성요소들 간의 동기화, 태스크들의 우선순위 등의 문제를 효과적으로 처리할 수 있게 된다.As a result, the target PC can process C-language control codes to effectively handle problems such as error analysis, synchronization between components, and task priorities that are difficult to handle with IEC61131-3.

본 실시예 및 본 명세서에 첨부된 도면은 본 발명에 포함되는 기술적 사상의 일부를 명확하게 나타내고 있는 것에 불과하며, 본 발명의 명세서 및 도면에 포함된 기술적 사상의 범위 내에서 당업자가 용이하게 유추할 수 있는 변형 예와 구체적인 실시 예는 모두 본 발명의 권리범위에 포함되는 것이 자명하다고 할 것이다.The embodiments and drawings attached to this specification are merely to clearly show some of the technical ideas included in the present invention, and those skilled in the art can easily infer within the scope of the technical ideas included in the specification and drawings of the present invention. Modifications that can be made and specific embodiments will be apparent that both are included in the scope of the invention.

100: 호스트 PC 110: 블록 다이어그램 생성부
120: 비쥬얼 인터페이스 130: 검증부
140: 객체 저장소 141: 태스크 테이블
142: 객체 테이블 143: 드로우 테이블
144: 변수 테이블 145: 커넥션 테이블
150: 변환부 160: 전송부
161: 호스트 PC의 송신부 162: 타겟 PC의 수신부
200: 타겟 PC 210: 컴파일부
300: 제어 프레임워크 310: 제어 스레드
311: 제어 스레드의 객체 테이블 312: 제어 스레드의 객체 컨트롤러
320: 우선순위 테이블 330: 펑션 테이블
340: 변수 테이블 350: 액세스 테이블
100: host PC 110: block diagram generation unit
120: visual interface 130: verification unit
140: Object Store 141: Task Table
142: object table 143: draw table
144: variable table 145: connection table
150: converter 160: transmitter
161: transmitting unit of the host PC 162: receiving unit of the target PC
200: target PC 210: compilation unit
300: control framework 310: control thread
311: Object Table of the Control Thread 312: Object Controller of the Control Thread
320: priority table 330: function table
340: variable table 350: access table

Claims (22)

IEC 61131-3에 정의된 복수의 펑션 블록이 블록 다이어그램 생성부를 통해 각각 블록 다이어그램으로 시각화되는 S1 단계;
상기 시각화된 각 블록 다이어그램 및 태스크가 비쥬얼 인터페이스부를 통해 그래픽 코드로 변환되는 S2 단계;
상기 그래픽 코드가 변환부를 통해 C언어 제어 코드로 변환되는 S3 단계;
상기 C언어 제어 코드가 전송부를 통해 타켓 PC로 전송되는 S4 단계; 및
상기 전송된 C 언어 제어 코드가 제어 프레임워크를 통해 제어 프레임워크에 프로세싱되는 S5 단계;를 포함하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법.
A step S1 in which a plurality of function blocks defined in IEC 61131-3 are visualized as a block diagram through a block diagram generator;
Step S2, wherein the visualized block diagrams and tasks are converted into graphic codes through a visual interface unit;
Step S3 of converting the graphic code into a C language control code through a conversion unit;
S4 step of transmitting the C language control code to the target PC through the transmission unit; And
And S5 of processing the transmitted C language control code to a control framework through a control framework.
제1항에 있어서,
상기 S2 단계와 S3단계 사이에 상기 S2 단계에서 변환된 그래픽 코드가 검증부를 통해 IEC 61131-3의 제약조건을 만족하는지 검증하는 단계를 더 포함하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법.
The method of claim 1,
Developing a control program based on IEC 61131-3 further comprising verifying that the graphic code converted in step S2 between step S2 and step S3 satisfies the constraints of IEC 61131-3 through a verification unit. How to provide a framework for your project.
제2항에 있어서,
상기 검증 결과 IEC 61131-3의 제약조건을 만족하지 않는 경우 S2 단계를 재수행하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법.
The method of claim 2,
If the verification results do not satisfy the constraints of IEC 61131-3, the method for providing a framework for developing a control program based on IEC 61131-3, characterized in that the step S2 is re-executed.
제2항에 있어서,
상기 검증 결과 IEC 61131-3의 제약조건을 만족하는 경우 상기 S3 단계를 수행하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법.
The method of claim 2,
If the verification result satisfies the constraint of IEC 61131-3, the method for providing a framework for developing a control program based on IEC 61131-3, characterized in that performing the step S3.
제1항에 있어서,
S3 단계는
상기 그래픽 코드가 객체 저장소(130)에 저장되는 S3-1 단계; 및
상기 저장된 그래픽 코드 정보가 기준 C언어 코드 템플릿을 통해 C언어 제어 코드로 변환되는 S3-2 단계;
를 포함하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법.
The method of claim 1,
S3 phase
Step S3-1 in which the graphic code is stored in an object store 130; And
Step S3-2 in which the stored graphic code information is converted into a C language control code through a reference C language code template;
Framework providing method for developing a control program based on IEC 61131-3, comprising a.
제5항에 있어서,
상기 S3-1 단계의 객체 저장소는 태스크가 저장되는 태스크 테이블, 펑션이 저장되는 객체 테이블, 블록 다이어그램의 그래픽 정보가 저장되는 드로우 테이블, 변수 정보가 저장되는 변수 테이블 및 변수들의 연결관계를 저장하는 커넥션 테이블을 포함하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법.
The method of claim 5,
The object store of step S3-1 includes a task table storing a task, an object table storing a function, a draw table storing graphic information of a block diagram, a variable table storing variable information, and a connection storing variables Framework providing method for developing a control program based on IEC 61131-3 characterized in that it comprises a table.
제6항에 있어서,
상기 변수들의 연결관계는 외부 변수 또는 내부 변수 중 어느 하나 이상을 통해 연결되는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법.
The method of claim 6,
The connection relationship between the variables is provided with a framework for developing a control program based on IEC 61131-3, characterized in that connected via any one or more of external or internal variables.
제5항에 있어서,
상기 S3-2 단계의 기준 C언어 코드 템플릿은 펑션 블록의 기능에 따라 C언어 기반 코드로 만들어진 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법.
The method of claim 5,
The reference C language code template of the step S3-2 is a framework for developing a control program based on IEC 61131-3, characterized in that the C language based code is made according to the function of the function block.
제1항에 있어서,
상기 S5 단계는
상기 C언어 기반의 제어코드가 컴파일되어 C 객체로 변환되는 단계;
상기 컴파일된 C 객체의 펑션 주소 및 변수 주소가 제어 스레드의 객체 테이블에 등록되는 단계;
상기 제어 스레드가 상기 펑션 주소 및 변수 주소를 각각 제어 프레임워크의 펑션 테이블 및 변수 테이블에 등록하는 단계; 및
상기 C 객체가 제어 프레임워크에 프로세싱되는 단계;
를 포함하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법.
The method of claim 1,
The step S5
Converting the C language-based control code into a C object;
Registering a function address and a variable address of the compiled C object in an object table of a control thread;
Registering, by the control thread, the function address and the variable address in a function table and a variable table of a control framework, respectively; And
Processing the C object into a control framework;
Framework providing method for developing a control program based on IEC 61131-3, comprising a.
제9항에 있어서,
상기 C언어 기반의 제어코드가 컴파일되어 C 객체로 변환되는 단계가 S5 단계에서 수행되지 않고, 호스트 PC에서의 S3 단계 이후에 실행되는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법.
10. The method of claim 9,
The frame for developing a control program based on IEC 61131-3, characterized in that the step of compiling the C language-based control code and converting it into a C object is executed after step S3 in the host PC, instead of being performed in step S5. How to deliver the work.
제9항에 있어서,
상기 C 객체가 제어 프레임워크에 프로세싱되는 단계는
C 객체로 표현된 펑션 블록이 제어 프레임워크의 우선순위 테이블에 저장된 우선순위에 따라 순서대로 프로세싱되는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 제공 방법.
10. The method of claim 9,
The processing of the C object to the control framework
A method for providing a framework for developing a control program based on IEC 61131-3, wherein a function block represented by a C object is processed in order according to a priority stored in a priority table of a control framework.
IEC 61131-3에 정의된 펑션 블록이 블록 다이어그램으로 시각화되는 블록 다이어그램 생성부;
상기 블록 다이어그램 및 태스크가 그래픽 코드로 변환되는 비쥬얼 인터페이스;
상기 그래픽 코드가 C언어 제어 코드로 변환되는 변환부;
상기 변환된 C언어 제어코드를 호스트 PC에서 타겟 PC로 전송하는 전송부; 및
상기 전송된 C언어 제어 코드가 프로세싱되는 제어 프레임워크;
를 포함하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템.
A block diagram generator for visualizing a function block defined in IEC 61131-3 as a block diagram;
A visual interface for converting the block diagrams and tasks into graphic codes;
A conversion unit for converting the graphic code into a C language control code;
A transmission unit for transmitting the converted C language control code from a host PC to a target PC; And
A control framework in which the transmitted C language control codes are processed;
Framework system for the development of IEC 61131-3 based control program comprising a.
제12항에 있어서,
상기 비쥬얼 인터페이스는 변환된 그래픽 코드가 IEC 61131-3의 제약조건을 만족하는지 검증하는 검증부를 포함하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템.
The method of claim 12,
The visual interface includes a verification unit for verifying whether the converted graphic code satisfies the constraints of IEC 61131-3. The framework system for developing a control program based on IEC 61131-3.
제13항에 있어서,
상기 비쥬얼 인터페이스는 상기 검증부의 검증 결과 상기 변환된 그래픽 코드가 IEC 61131-3의 제약조건을 만족하지 않는 경우 시각화된 블록 다이어그램을 그래픽 코드로 재변환하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템.
The method of claim 13,
The visual interface converts the visualized block diagram into a graphic code if the converted graphic code does not satisfy the constraints of IEC 61131-3 as a result of the verification unit. Framework system for development.
제12항에 있어서,
상기 변환부는 그래픽 코드가 각각의 데이터 속성에 따라 저장되는 객체 저장소를 더 포함하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템.
The method of claim 12,
The conversion unit is a framework system for developing a control program based on IEC 61131-3, characterized in that the graphic code further comprises an object store is stored according to each data property.
제15항에 있어서,
상기 객체 저장소는 태스크가 저장되는 태스크 테이블, 펑션이 저장되는 객체 테이블, 블록 다이어그램의 그래픽 정보가 저장되는 드로우 테이블, 변수 정보가 저장되는 변수 테이블 및 변수들의 연결관계를 저장하는 커넥션 테이블을 포함하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템.
16. The method of claim 15,
The object store includes a task table storing a task, an object table storing a function, a draw table storing graphic information of a block diagram, a variable table storing variable information, and a connection table storing a connection relationship between variables. Framework system for the development of control programs based on IEC 61131-3.
제16항에 있어서,
상기 변수들의 연결관계는 외부 변수 또는 내부 변수 중 어느 하나 이상을 통해 연결되는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템.
The method of claim 16,
The connection relationship between the variables is a framework system for developing a control program based on IEC 61131-3, characterized in that connected via any one or more of external or internal variables.
제12항에 있어서,
상기 변환부는 저장된 그래픽 코드 정보가 기준 C언어 코드 템플릿을 통해 C언어 제어 코드로 변환되는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템.
The method of claim 12,
The conversion unit is a framework system for developing a control program based on IEC 61131-3, characterized in that the stored graphic code information is converted into a C language control code through a reference C language code template.
제18항에 있어서,
상기 기준 C언어 코드 템플릿은 펑션 블록의 기능에 따라 C언어 기반 코드로 만들어진 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템.
The method of claim 18,
The reference C language code template is a framework system for developing a control program based on IEC 61131-3, characterized in that the C language based code according to the function of the function block.
제12항에 있어서,
상기 타겟 PC로 전송된 C언어 제어코드가 컴파일되어 C 객체로 변환되는 컴파일부를 더 포함하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템.
The method of claim 12,
The framework system for developing a control program based on IEC 61131-3, further comprising a compilation unit for compiling the C language control code transmitted to the target PC and converting the C language control code into a C object.
제12항에 있어서,
상기 호스트 PC에서 변환된 C언어 제어코드가 컴파일되어 C 객체로 변환되는 컴파일부를 더 포함하는 것을 특징으로 하는 IEC 61131-3 기반의 제어 프로그램 개발을 위한 프레임워크 시스템.
The method of claim 12,
The framework system for developing a control program based on IEC 61131-3, further comprising a compilation unit for compiling the C language control code converted by the host PC into a C object.
제20항 또는 제21항에 있어서,
상기 제어 프레임워크는
상기 컴파일된 C 객체로 표현된 펑션 블록에 따른 우선순위가 저장된 우선순위 테이블;
상기 컴파일된 C 객체의 펑션 주소가 저장되는 펑션 테이블;
상기 컴파일된 C 객체의 변수 주소가 저장되는 변수 테이블;
상기 컴파일된 C 객체로 표현된 펑션 블록의 상기 변수 테이블에 대한 접근 정보를 저장하는 액세스 테이블; 및
상기 컴파일된 C 객체의 펑션 주소 및 변수주소를 각각 펑션 테이블 및 변수 테이블에 등록하는 제어 스레드;
를 포함하는 것을 특징으로 하는 제어 프로그램 개발을 위한 프레임워크 시스템.
The method of claim 20 or 21,
The control framework
A priority table storing priorities according to function blocks represented by the compiled C objects;
A function table that stores a function address of the compiled C object;
A variable table in which a variable address of the compiled C object is stored;
An access table for storing access information of the variable table of the function block represented by the compiled C object; And
A control thread for registering a function address and a variable address of the compiled C object in a function table and a variable table, respectively;
Framework system for development of a control program comprising a.
KR1020100029520A 2010-03-31 2010-03-31 Framework system for developing control program based on iec 61131-3 and method using the same KR101074966B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100029520A KR101074966B1 (en) 2010-03-31 2010-03-31 Framework system for developing control program based on iec 61131-3 and method using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100029520A KR101074966B1 (en) 2010-03-31 2010-03-31 Framework system for developing control program based on iec 61131-3 and method using the same

Publications (2)

Publication Number Publication Date
KR20110109690A KR20110109690A (en) 2011-10-06
KR101074966B1 true KR101074966B1 (en) 2011-10-18

Family

ID=45026814

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100029520A KR101074966B1 (en) 2010-03-31 2010-03-31 Framework system for developing control program based on iec 61131-3 and method using the same

Country Status (1)

Country Link
KR (1) KR101074966B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101771834B1 (en) * 2016-01-07 2017-08-25 두산중공업 주식회사 Optimization System for Power Plant

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107765571B (en) * 2017-06-28 2019-11-08 北京光年无限科技有限公司 The data processing method and Development Framework of intelligent robot Development Framework
CN108732983A (en) * 2017-06-30 2018-11-02 北京猎户星空科技有限公司 A kind of electronic equipment control method, device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009009505A (en) 2007-06-29 2009-01-15 Jtekt Corp Plc
JP2009245194A (en) 2008-03-31 2009-10-22 Fuji Electric Systems Co Ltd Programmable controller, programmable controller support apparatus, and programmable controller system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009009505A (en) 2007-06-29 2009-01-15 Jtekt Corp Plc
JP2009245194A (en) 2008-03-31 2009-10-22 Fuji Electric Systems Co Ltd Programmable controller, programmable controller support apparatus, and programmable controller system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101771834B1 (en) * 2016-01-07 2017-08-25 두산중공업 주식회사 Optimization System for Power Plant

Also Published As

Publication number Publication date
KR20110109690A (en) 2011-10-06

Similar Documents

Publication Publication Date Title
Zoitl et al. IEC 61499 architecture for distributed automation: The ‘glass half full’view
CN111736954B (en) Multi-intelligent contract virtual machine implementation method, multi-intelligent contract virtual machine and system
CN101872184A (en) Programming and control method of sequence control diagram of programmable controller
Mühe et al. On reverse-engineering the KUKA Robot Language
US20190196798A1 (en) Executable program creation device, executable program creation method, and executable program creation program
KR101074966B1 (en) Framework system for developing control program based on iec 61131-3 and method using the same
JP2001022412A (en) Programming device, programmable controller, and computer readable recording medium storing program
WO2024131553A1 (en) Industrial control software development method and apparatus, and computing device
JP2016224557A (en) Program creation support device, program, and determination method
JP2019211823A (en) Support device and support program
US11169510B2 (en) Engineering system and method for planning an automation system
Thapa et al. Auto-generation of IEC standard PLC code using t-MPSG
JP5212508B2 (en) Debug device
Wang et al. Formal modelling of PLC systems by BIP components
Julius et al. A model-driven approach for transforming GRAFCET specification into PLC code including hierarchical structures
Bengtsson et al. Developing control logic using aspect-oriented programming and sequence planning
Burzlaff et al. Towards automating service matching for manufacturing systems: Exemplifying knowledge-driven architecture composition
Aiello et al. An agile methodology for manufacturing control systems development
Djukić et al. Run-time code generators for model-level debugging in domain-specific modeling
Bohlender et al. Leveraging Horn clause solving for compositional verification of PLC software
JP3464417B2 (en) Test display method of screen data for control device
WO2022190418A1 (en) Development assitance device, development assitance method, and development assitance program
Zhou et al. Formal Verification of ST Programs using CSP
JP2007133622A (en) Engineering tool and program conversion method
KR100423742B1 (en) Exclusive control system by sequential function chart

Legal Events

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

Payment date: 20140923

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20151109

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee