KR101216916B1 - Method and system for converting fbn based plc code into a general program code - Google Patents

Method and system for converting fbn based plc code into a general program code Download PDF

Info

Publication number
KR101216916B1
KR101216916B1 KR1020110014871A KR20110014871A KR101216916B1 KR 101216916 B1 KR101216916 B1 KR 101216916B1 KR 1020110014871 A KR1020110014871 A KR 1020110014871A KR 20110014871 A KR20110014871 A KR 20110014871A KR 101216916 B1 KR101216916 B1 KR 101216916B1
Authority
KR
South Korea
Prior art keywords
function
class
pou
user
unit
Prior art date
Application number
KR1020110014871A
Other languages
Korean (ko)
Other versions
KR20120095512A (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 KR1020110014871A priority Critical patent/KR101216916B1/en
Publication of KR20120095512A publication Critical patent/KR20120095512A/en
Application granted granted Critical
Publication of KR101216916B1 publication Critical patent/KR101216916B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Programmable Controllers (AREA)

Abstract

본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법은 FBN의 펑션 블록(Function Block)이 분류되는 S1 단계, S1 단계에서 분류된 펑션 블록에서 실행부분이 추출되는 S2 단계, S2 단계에서 추출된 펑션 블록의 실행부분에서 정적인 부분과 동적인 부분이 구분되는 S3 단계, S3 단계에서 구분된 정적인 부분과 동적인 부분이 결합되어 베이스 클래스(Base Class)가 생성되는 S4 단계 및 펑션 블록에 사용자 정의 변수 또는 사용자 정의 알고리즘이 있는 경우, S4 단계의 베이스 클래스를 수정하여 사용자 정의 POU(Program Organization Unit) 클래스가 생성되는 S5 단계를 포함한다.
IEC 61499 FBN과 C언어 코드와의 호환성을 지원하여, 분야가 상의한 엔지니어들이 쉽게 접근할 수 있는 개발환경을 제공한다.
Method for converting the FBN-based PLC code into a general-purpose program code according to the present invention is S1 step FBN function block (Function Block) classification, S2 step S2 step, S2 step S2 extraction In step S3, where the static and dynamic parts are separated from the execution part of the function block extracted from S3, and the S4 step and the function where the static and dynamic parts separated in the S3 step are combined to create a base class. If the block has a user-defined variable or a user-defined algorithm, the step S5 includes generating a user-defined POU class by modifying the base class of the step S4.
Support for compatibility with IEC 61499 FBN and C-language code provides a development environment that is easily accessible to engineers in the field.

Description

FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법 및 시스템{METHOD AND SYSTEM FOR CONVERTING FBN BASED PLC CODE INTO A GENERAL PROGRAM CODE}TECHNICAL AND SYSTEM FOR CONVERTING FBN BASED PLC CODE INTO A GENERAL PROGRAM CODE

본 발명은 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법 및 시스템에 관한 것이다. 특히 본 발명은 FBN 기반의 PLC 코드를 C++ 언어로 변환하는 방법 및 시스템에 관한 것이다.The present invention relates to a method and system for converting FBN-based PLC code into general-purpose program code. In particular, the present invention relates to a method and system for converting FBN-based PLC code into a C ++ language.

종래의 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 61499는 Function Block diagram Network(FBN)을 비롯한 다양한 모델링 기법을 제시하고 있지만, 범용 PC에서 동작 가능하도록 범용 프로그래밍 언어와의 호환기법을 제공하지 않기 때문에 문제가 된다.IEC 61499 proposes a variety of modeling techniques, including the Function Block Diagram Network (FBN), but it is problematic because it does not provide a compatible programming language for general purpose PCs.

본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법 및 시스템은 다음과 같은 해결과제를 목적으로 한다.Method and system for converting FBN-based PLC code into general-purpose program code according to the present invention aims at the following problems.

첫째, IEC 61499 FBN(Function Block diagram Network) 기반의 그래픽 코드를 범용 PC에서 동작 가능하도록 하고자 한다.First, we want to make graphic code based on IEC 61499 Function Block diagram Network (FBN) work on general purpose PC.

둘째, FBN 기반의 코드를 범용 PC에서 동작가능한 C++ 코드로 변환하고자 한다.Second, we want to convert FBN-based code into C ++ code that can run on general purpose PC.

셋째, 변환된 FBN 프로세스 객체들을 효과적으로 관리하고자 한다.Third, we want to effectively manage the converted FBN process objects.

본 발명의 해결과제는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 해결과제들은 아래의 기재로부터 당업자에게 명확하게 이해되어 질 수 있을 것이다.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.

본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법은 FBN(Function Block diagram Network)의 펑션 블록(Function Block)이 분류되는 S1 단계, S1 단계에서 분류된 펑션 블록에서 실행부분이 추출되는 S2 단계, S2 단계에서 추출된 펑션 블록의 실행부분에서 정적인 부분과 동적인 부분이 구분되는 S3 단계, S3 단계에서 구분된 정적인 부분과 동적인 부분이 결합되어 베이스 클래스(Base Class)가 생성되는 S4 단계 및 펑션 블록에 사용자 정의 변수 또는 사용자 정의 알고리즘이 있는 경우, S4 단계의 베이스 클래스를 수정하여 사용자 정의 POU(Program Organization Unit) 클래스가 생성되는 S5 단계를 포함한다.The method of converting FBN-based PLC code into general-purpose program code according to the present invention includes extracting an execution part from a function block classified in a step S1 and a step S1 in which a function block of a function block diagram network (FBN) is classified. In step S2, the static part and the dynamic part are separated from the execution part of the function block extracted in the step S2, the static part and the dynamic part separated in the S3 step are combined to form a base class. If the generated S4 step and the function block has a user-defined variable or a user-defined algorithm, the base class of the step S4 is modified to include a step S5 to create a user-defined Program Organization Unit (POU) class.

본 발명에 따른 S1 단계는 펑션 블록이 이벤트 I/O와 데이터 I/O로 분류되는 S1-1 단계 및 펑션 블록에서 사용자 정의 I/O가 분류되는 S1-2 단계를 포함한다.The step S1 according to the present invention includes a step S1-1 in which the function block is classified into event I / O and data I / O, and a step S1-2 in which the user-defined I / O is classified in the function block.

본 발명에 따른 S4 단계는 정적인 부분과 동적인 부분이 각각 클래스 파일로 구성되는 S4-1 단계 및 동적인 부분의 클래스 파일이 정적인 부분의 클래스 파일을 상속받아 베이스 클래스가 생성되는 S4-2 단계를 포함한다.In the step S4 according to the present invention, in step S4-1 in which the static part and the dynamic part are respectively composed of class files, and the base class is generated by inheriting the class file of the static part from the class file of the dynamic part. Steps.

본 발명에 따른 S5 단계는 베이스 클래스의 알고리즘 수행 함수가 가상함수로 구성되는 S5-1 단계 및 S4 단계에서 생성된 베이스 클래스를 상속받는 사용자 정의 POU 클래스가 생성되는 S5-2 단계를 포함한다.The step S5 according to the present invention includes a step S5-1 in which the algorithm execution function of the base class is composed of virtual functions and a step S5-2 in which a user-defined POU class that inherits the base class generated in step S4 is generated.

본 발명에 따른 사용자 정의 POU 클래스는 사용자 정의 변수 및 사용자 정의 알고리즘을 실행 함수에 선언하고, 베이스 클래스의 가상함수를 호출하는 형태로 실행함수가 구성되는 것을 특징으로 한다.The user-defined POU class according to the present invention is characterized in that the execution function is configured in the form of declaring the user-defined variables and user-defined algorithm in the execution function, and calling the virtual function of the base class.

본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법은 베이스 클래스 또는 POU 클래스로 변환된 FBN을 관리하는 S6 단계를 더 포함할 수 있다.The method of converting FBN-based PLC code into general-purpose program code according to the present invention may further include a step S6 of managing the FBN converted into a base class or POU class.

본 발명에 따른 S6 단계는 S5 단계의 사용자 정의 POU가 타입 캐스팅을 통해 베이스 POU로 변환되는 S6-1 단계, S6-1 단계에서 변환된 베이스 POU에 펑션 맵핑을 적용하여 펑션 레코드(Function Record)가 생성되는 S6-2 단계, S6-2 단계의 펑션 레코드가 광역 펑션 테이블(Global Function Table)에 등록되는 S6-3 단계, S6-3 단계에서 등록된 펑션 레코드가 펑션 블록 간의 연결 관계에 따라 관계설정이 되는 S6-4 단계, 등록된 펑션 레코드가 스케쥴링되는 S6-5 단계를 포함한다.In step S6 according to the present invention, a function record is applied by applying a function mapping to the base POU converted in the step S6-1 and the step S6-1 in which the user-defined POU of the step S5 is converted into the base POU through type casting. Function records registered in step S6-3 and step S6-3 in which the function records of steps S6-2 and S6-2 are registered in the global function table are set according to the connection relationship between the function blocks. Step S6-4, and step S6-5 in which the registered function record is scheduled.

본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템은 FBN(Function Block diagram Network)을 입력받아 펑션 블록(Function Block: FB)을 분류하는 FB분류부, FB분류부에서 분류된 펑션 블록에서 실행부분을 추출하는 실행부추출부, 실행부추출부에서 추출된 펑션 블록의 실행부분에서 정적인 부분과 동적인 부분을 구분하는 실행부구분부, 실행부구분부에서 구분된 정적인 부분과 동적인 부분을 결합하여 베이스 클래스(Base Class)를 생성하는 베이스생성부 및 펑션 블록에 사용자 정의 변수 또는 사용자 정의 알고리즘이 있는 경우, 베이스 클래스를 수정하여 사용자 정의 POU(Program Organization Unit) 클래스를 생성하는 POU생성부를 포함한다.The system for converting the FBN-based PLC code into a general-purpose program code according to the present invention receives a function block diagram network (FBN) to classify the function block (FB), FB classification unit, the function classified in the FB classification unit Execution part extractor that extracts the execution part from the block, Execution part division that separates the static part and dynamic part from the execution part of the function block extracted from the execution part extraction part, and static part separated from the execution part part If there is a user-defined variable or user-defined algorithm in the base generator and function block that combines dynamic parts to create a base class, modify the base class to create a custom program organization unit (POU) class. It includes a POU generation unit.

본 발명에 따른 FB분류부는 펑션 블록을 이벤트 I/O와 데이터 I/O로 분류하고, 펑션 블록에서 사용자 정의 I/O를 분류하는 것을 특징으로 한다.The FB classification unit according to the present invention may classify a function block into event I / O and data I / O, and classify a user-defined I / O in the function block.

본 발명에 따른 베이스생성부는 정적인 부분과 동적인 부분을 각각 클래스 파일로 구성하고, 동적인 부분의 클래스 파일이 정적인 부분의 클래스 파일을 상속받도록 하여 베이스 클래스를 생성하는 것을 특징으로 한다.The base generation unit according to the present invention comprises a static part and a dynamic part, respectively, as a class file, and the dynamic part class file is characterized by generating a base class by inheriting the class file of the static part.

본 발명에 따른 POU생성부는 베이스 클래스의 알고리즘 수행 함수를 가상함수로 구성하고, 베이스 클래스를 상속받는 사용자 정의 POU 클래스를 생성하는 것을 특징으로 한다.The POU generation unit according to the present invention is characterized by configuring the algorithm performing function of the base class as a virtual function and generating a user-defined POU class that inherits the base class.

본 발명에 따른 사용자 정의 POU 클래스는 사용자 정의 변수 및 사용자 정의 알고리즘을 실행 함수에 선언하고, 베이스 클래스의 가상함수를 호출하는 형태로 실행함수가 구성되는 것을 특징으로 한다.The user-defined POU class according to the present invention is characterized in that the execution function is configured in the form of declaring the user-defined variables and user-defined algorithm in the execution function, and calling the virtual function of the base class.

본 발명에 따른 베이스 클래스 또는 POU 클래스로 변환된 FBN을 관리하는 FBN관리부를 더 포함하는 것을 특징으로 한다.It further comprises an FBN management unit for managing the FBN converted to a base class or POU class according to the present invention.

본 발명에 따른 FBN관리부는 사용자 정의 POU에 타입 캐스팅을 수행하여 베이스 POU로 변환하는 타입캐스팅부, 타입캐스팅부에서 변환된 베이스 POU에 펑션 맵핑을 적용하여 펑션 레코드(Function Record)를 생성하는 레코드생성부, 레코드생성부에서 생성된 펑션 레코드를 광역 펑션 테이블(Global Function Table)에 등록하는 테이블등록부, 테이블등록부에서 등록된 펑션 레코드를 펑션 블록 간의 연결 관계에 따라 관계설정을 수행하는 관계설정부 및 관계설정부에서 관계가 설정된 펑션 레코드를 스케쥴링하는 스케쥴링부를 포함하는 것을 특징으로 한다.The FBN management unit according to the present invention performs a type casting to the user-defined POU to convert the base POU to the type casting unit, the function generated by applying a function mapping to the base POU converted in the type casting unit to generate a function record (Function Record) And a table register that registers the function records generated by the record generator in a global function table, and a relationship setter and a relationship setter that perform the relationship setting according to the connection relationship between the function blocks registered in the table register. It characterized in that it comprises a scheduling unit for scheduling a function record in which the relationship is set.

본 발명은 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 포함한다.The present invention includes a computer readable recording medium having recorded thereon a program for executing on a computer a method for converting an FBN based PLC code into a general program code.

본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법 및 시스템은 다음과 같은 효과를 갖는다.Method and system for converting FBN-based PLC code to general-purpose program code according to the present invention has the following effects.

첫째, IEC 61499 FBN과 C언어 코드와의 호환성을 지원하여, 분야가 상의한 엔지니어들이 쉽게 접근할 수 있는 개발환경을 제공한다.First, it supports the compatibility of IEC 61499 FBN and C language code, providing a development environment that can be easily accessed by engineers in the field.

둘째, 전용 하드웨어에서 동작하던 PLC 프로그램을 임베디드 PC 또는 범용 PC에서 동작 가능하게 하여 프로그램의 재사용성 및 데이터의 신뢰성을 높인다. Second, the PLC program used in the dedicated hardware can be operated in the embedded PC or the general purpose PC, thereby increasing the reusability of the program and the reliability of the data.

본 발명의 효과는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 효과들은 아래의 기재로부터 당업자에게 명확하게 이해되어 질 수 있을 것이다.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은 본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법의 개략적인 순서를 도시한 순서도이다.
도 2는 FBN을 구성하는 기본적인 펑션 블록을 도시한 블록도이다.
도 3은 본 발명의 방법을 개략적으로 도시한 구성도이다.
도 4는 본 발명의 S6 단계에 대한 구체적인 순서를 도시한 순서도이다.
도 5는 생성된 POU를 펑션 레코드로 맵핑하는 단계 및 펑션 테이블에 등록하여 프로세스를 등록하는 과정을 도시한 블록도이다.
도 6은 등록된 펑션 레코드를 펑션 테이블에서 호출하여 프로세스를 처리하는 과정을 도시한 블록도이다.
도 7은 본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템에 대한 개략적인 구성을 도시한 블록도이다.
1 is a flowchart illustrating a schematic procedure of a method for converting an FBN-based PLC code into a general-purpose program code according to the present invention.
2 is a block diagram showing a basic function block constituting the FBN.
3 is a schematic diagram illustrating a method of the present invention.
4 is a flowchart showing a specific sequence for step S6 of the present invention.
5 is a block diagram illustrating a process of mapping a generated POU to a function record and registering a process by registering a function POU.
6 is a block diagram illustrating a process of processing a process by calling a registered function record in a function table.
7 is a block diagram illustrating a schematic configuration of a system for converting FBN-based PLC code into general-purpose program code according to the present invention.

본 명세서에서 사용되는 용어에서 단수의 표현은 문맥상 명백하게 다르게 해석되지 않는 한 복수의 표현을 포함하는 것으로 이해되어야 하고, "포함한다" 등의 용어는 설시된 특징, 개수, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 의미하는 것이지, 하나 또는 그 이상의 다른 특징들이나 개수, 단계 동작 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 배제하지 않는 것으로 이해되어야 한다.As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It is to be understood that the present invention means that there is a part or a combination thereof, and does not exclude the presence or addition possibility of one or more other features or numbers, step operation components, parts or combinations thereof.

이하에서는 도면을 참조하면서 FBN(Function Block diagram Network) 기반의 PLC(Programmable Logic Controller) 코드를 범용 프로그램 코드로 변환하는 방법 및 시스템에 관하여 구체적으로 설명하겠다.Hereinafter, a method and system for converting a programmable logic controller (PLC) code based on a function block diagram network (FBN) into a general program code will be described in detail with reference to the accompanying drawings.

이하 본 발명에서의 변환 결과물인 범용 프로그램 코드는 C++ 언어인 것으로 가정하고 설명한다. 다만, 해당분야의 통상의 지식을 가진 자가 이해할 수 있는 바와 같이, C++ 코드 외에 사용가능한 범용 프로그램 코드가 결과물이 될 수 있음은 자명하다.Hereinafter, it is assumed that the general purpose program code resulting from the conversion in the present invention is a C ++ language. However, as can be understood by those skilled in the art, it is obvious that general program code usable in addition to C ++ code may be the result.

도 1은 본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법의 개략적인 순서를 도시한 순서도이다.1 is a flowchart illustrating a schematic procedure of a method for converting an FBN-based PLC code into a general-purpose program code according to the present invention.

본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법은 FBN의 펑션 블록(Function Block)이 분류되는 S1 단계, S1 단계에서 분류된 펑션 블록에서 실행부분이 추출되는 S2 단계, S2 단계에서 추출된 펑션 블록의 실행부분에서 정적인 부분과 동적인 부분이 구분되는 S3 단계, S3 단계에서 구분된 정적인 부분과 동적인 부분이 결합되어 베이스 클래스(Base Class)가 생성되는 S4 단계 및 펑션 블록에 사용자 정의 변수 또는 사용자 정의 알고리즘이 있는 경우, S4 단계의 베이스 클래스를 수정하여 사용자 정의 POU(Program Organization Unit) 클래스가 생성되는 S5 단계를 포함한다.Method for converting the FBN-based PLC code into a general-purpose program code according to the present invention is S1 step FBN function block (Function Block) classification, S2 step S2 step, S2 step S2 extraction In step S3, where the static and dynamic parts are separated from the execution part of the function block extracted from S3, and the S4 step and the function where the static and dynamic parts separated in the S3 step are combined to create a base class. If the block has a user-defined variable or a user-defined algorithm, the step S5 includes generating a user-defined POU class by modifying the base class of the step S4.

FBN의 펑션 블록의 객체를 분류별로 분류하는 과정이 선행되는 것이 바람직하다. S1 단계는 펑션 블록이 이벤트 I/O와 데이터 I/O로 분류되는 S1-1 단계 및 펑션 블록에서 사용자 정의 I/O가 분류되는 S1-2 단계를 포함할 수 있다.The process of classifying the objects of the function block of the FBN by classification is preferably preceded. The step S1 may include a step S1-1 in which the function block is classified into event I / O and data I / O, and a step S1-2 in which the user-defined I / O is classified in the function block.

이러한 분류가 수행된 후 펑션 블록(FB)에서 실질적인 실행부분을 추출하여, 변환을 위한 구성을 특정하게 된다. 도 2에 도시된 바와 같이, 펑션 블록은 크게 FB Head와 FB Body로 나누어진다. FB Head는 이벤트 입출력 및 장치 초기화와 같은 FB 운용에 관련된 정보들이 정의되고, FB Body는 데이터 입출력 및 사용자 정의 내부 변수설정, 실질적인 실행 알고리즘과 같은 FB의 실질적인 기능이 정의된다. 다수의 FB가 모여 FBN을 구성하게 된다.After this classification is performed, the actual execution part is extracted from the function block FB to specify a configuration for conversion. As shown in FIG. 2, the function block is largely divided into an FB Head and an FB Body. FB Head defines information related to FB operation such as event input / output and device initialization, and FB Body defines actual functions of FB such as data input / output, user defined internal variable setting, and actual execution algorithm. Multiple FBs come together to form an FBN.

도 3에 도시된 바와 같이, 범용 PC에서 컴파일 가능한 C++ 프로그램 코드로 변환하기 위하여 FB의 부분을 크게 변환이 불가능한 정적인 부분과 제한적인 변환이 가능한 동적인 부분으로 나누었다. 변환이 불가능한 정적인 부분은 FB 식별자 설정, 이벤트 입출력, 장치 초기화(하드웨어 주소 맵핑)와 같은 작업을 실행한다. 제한적인 변환이 가능한 동적인 부분은 데이터 입출력, 사용자 정의 내부변수 선언, 실질적인 실행 알고리즘이 정의된다. 동적인 부분에서 변환이 가능한 부분은 사용자 정의 내부변수 선언 및 알고리즘 부분에 사용자 정의 알고리즘을 추가가능 하다. S3 단계에서 S2 단계에서 추출된 펑션 블록의 실행부분에서 정적인 부분과 동적인 부분이 구분된다.As shown in FIG. 3, in order to convert C ++ program code that can be compiled in a general-purpose PC, a part of the FB is divided into a static part that can not be largely converted and a dynamic part that can be limited in a limited conversion. The static part that cannot be translated performs tasks such as setting the FB identifier, event I / O, and device initialization (hardware address mapping). Dynamic parts with limited conversion are defined for data I / O, user-defined internal variable declarations, and actual execution algorithms. In the dynamic part, the convertible part can add a user-defined algorithm to the user-defined internal variable declaration and the algorithm part. In the step S3, the static part and the dynamic part are distinguished from the execution part of the function block extracted in the S2 step.

S4 단계는 정적인 부분과 동적인 부분이 각각 클래스 파일로 구성되는 S4-1 단계 및 동적인 부분의 클래스 파일이 정적인 부분의 클래스 파일을 상속받아 베이스 클래스가 생성되는 S4-2 단계를 포함한다.Step S4 includes steps S4-1 in which the static part and the dynamic part are respectively composed of class files, and step S4-2 in which the base class is generated by inheriting the class file of the static part by the class file of the dynamic part. .

정적인 부분과 동적인 부분은 각각 클래스 파일로 구성한다. 구성된 클래스 파일은 동적인 부분이 정적인 부분을 상속받아 실행 가능한 베이스 클래스를 생성한다. 베이스 클래스는 Basic FB일 경우 별도의 수정 없이 바로 실행 가능한 프로그램 코드로 동작한다.The static and dynamic parts consist of class files respectively. The constructed class file creates an executable base class whose dynamic part inherits the static part. In case of Basic FB, base class operates as program code that can be executed immediately without any modification.

그러나 사용자 정의 변수 추가 및 사용자 정의 알고리즘이 추가된 경우, 베이스 클래스를 수정하여 사용자 정의 POU(Program Organization Unit)를 구성한다. 베이스 클래스의 실질적인 알고리즘 수행 함수를 가상함수로 구성하고, 베이스 클래스를 상속받는 새로운 사용자 정의 POU 클래스를 만든다. 생성된 사용자 정의 POU 클래스의 실행 함수 부분에 사용자 정의 변수 및 알고리즘을 선언하고, 베이스 클래스의 가상함수를 호출하는 형태로 사용자 정의 POU의 실행 함수를 구성한다. However, if you add custom variables and add custom algorithms, modify the base class to construct a custom program organization unit (POU). The actual algorithm execution function of the base class is composed of virtual functions, and a new user-defined POU class is inherited from the base class. Declare user-defined variables and algorithms in the execution function part of the created user-defined POU class, and compose the execution function of the user-defined POU by calling the virtual function of the base class.

즉 S5 단계는 베이스 클래스의 알고리즘 수행 함수가 가상함수로 구성되는 S5-1 단계 및 S4 단계에서 생성된 베이스 클래스를 상속받는 사용자 정의 POU 클래스가 생성되는 S5-2 단계를 포함한다.That is, step S5 includes step S5-1 in which the algorithm execution function of the base class is composed of virtual functions and step S5-2 in which a user-defined POU class that inherits the base class generated in step S4 is generated.

전술한 바와 같이, 사용자 정의 POU 클래스는 사용자 정의 변수 및 사용자 정의 알고리즘을 실행 함수에 선언하고, 베이스 클래스의 가상함수를 호출하는 형태로 실행함수가 구성된다.As described above, the user-defined POU class declares a user-defined variable and a user-defined algorithm in an execution function, and the execution function is configured in a form of calling a virtual function of the base class.

사용자 정의 POU는 그 형태가 다양하기 때문에 작업 리스트에서 모든 정보를 관리하기 힘들다. 따라서, 본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법은 베이스 클래스 또는 POU 클래스로 변환된 FBN을 관리하는 S6 단계를 더 포함할 수 있다.Custom POUs come in a variety of forms, making it difficult to manage all the information in the work list. Therefore, the method for converting the FBN-based PLC code into a general program code may further include a step S6 of managing the FBN converted into the base class or the POU class.

FBN에서 지원하는 FB 타입은 베이스 클래스 형태의 타입만 지원하고, 사용자 정의 POU는 베이스 클래스 타입을 상속받아 구성한다. 생성된 사용자 정의 POU는 다시 베이스 클래스 타입으로 캐스팅시켜 작업 리스트에 등록하는 형태로 다양한 형태의 POU를 관리한다. 작업리스트에 등록한 POU는 베이스 클래스 타입이지만 실제로 실행되는 알고리즘은 사용자 정의 POU의 주소를 지시하기 때문에 기능적으로는 사용자 정의 POU가 실행된다.FB type supported by FBN supports only base class type, and user defined POU inherits base class type and configures. The created user-defined POU is again cast to the base class type and registered in the work list to manage various types of POU. Although the POU registered in the worklist is of base class type, the user-defined POU is functionally executed because the algorithm actually executed indicates the address of the user-defined POU.

도 4는 본 발명의 S6 단계에 대한 구체적인 순서를 도시한 순서도이다.4 is a flowchart showing a specific sequence for step S6 of the present invention.

S6 단계는 S5 단계의 사용자 정의 POU가 타입 캐스팅을 통해 베이스 POU로 변환되는 S6-1 단계, S6-1 단계에서 변환된 베이스 POU에 펑션 맵핑을 적용하여 펑션 레코드(Function Record)가 생성되는 S6-2 단계, S6-2 단계의 펑션 레코드가 광역 펑션 테이블(Global Function Table)에 등록되는 S6-3 단계, S6-3 단계에서 등록된 펑션 레코드가 펑션 블록 간의 연결 관계에 따라 관계설정이 되는 S6-4 단계, 등록된 펑션 레코드가 스케줄링되는 S6-5 단계를 포함한다.In step S6, in step S6-1, in which the user-defined POU in step S5 is converted into a base POU through type casting, in step S6, a function record is generated by applying a function mapping to the base POU converted in step S6-1. S6-3, in which function records in step 2 and S6-2 are registered in the global function table, S6--3 in which the function records registered in step S6-3 and S6-3 are established according to the connection relationship between function blocks Step 4, step S6-5 in which the registered function record is scheduled.

도 5는 생성된 POU를 펑션 레코드로 맵핑하는 단계 및 펑션 테이블에 등록하여 프로세스를 등록하는 과정을 도시한 블록도이다.5 is a block diagram illustrating a process of mapping a generated POU to a function record and registering a process by registering a function POU.

생성된 POU는 펑션 맵핑 과정을 통해 펑션 레코드를 생성한다. 펑션 레코드에는 해당 POU의 우선순위, POU의 주소값, POU의 베이스 클래스 타입, POU의 연결 정보 테이블이 저장된다. 펑션 레코드 형태가 광역 펑션 테이블(Global Function Table)에 등록되어 POU를 관리하는 구조이다.The generated POU creates a function record through a function mapping process. The function record stores the priority of the corresponding POU, the address value of the POU, the base class type of the POU, and the connection information table of the POU. The function record type is registered in the global function table to manage the POU.

FB는 다른 FB들과 서로 데이터 및 이벤트 입출력 부분에서 연결 관계를 가질 수 있다. 펑션 레코드의 연결 테이블(Connection Table)에 연결 관계를 나타내기 위한 정보를 저장한다. 연결 테이블에는 소속된 펑션 레코드의 주소, 입력이 되는 변수 정보를 갖는 FB 주소값, 출력이 되는 변수 정보를 갖는 FB 주소값, 입출력 타입을 나타내는 변수 타입 값이 저장된다.  The FB may have a connection relationship with other FBs in data and event input / output parts. Stores information for indicating a connection relationship in the connection table of the function record. The connection table stores the address of the function record to which it belongs, the FB address value with the variable information to be input, the FB address value with the variable information to be output, and the variable type value indicating the input / output type.

광역 펑션 테이블에 등록된 펑션 레코드는 우선순위에 기반을 둔 FCFS(First Come First Served)방식으로 스케줄링 될 수 있다. Function records registered in the wide area function table may be scheduled in a FCFS (First Come First Served) method based on priority.

도 6은 등록된 펑션 레코드를 펑션 테이블에서 호출하여 프로세스를 처리하는 과정을 도시한 블록도이다.6 is a block diagram illustrating a process of processing a process by calling a registered function record in a function table.

펑션 레코드는 각각이 독립적으로 동작하는 프로세스이다. 펑션 레코드의 fCode 정보로 맵핑할 베이스 클래스 타입을 파악한다. 펑션 맵핑 과정을 통해 베이스 클래스 타입으로 맵핑한 후 pFunction에 등록된 사용자 정의 POU 실행함수를 호출한다. 실행함수가 호출되는 순간 해당 FB가 갖는 고유의 기능을 수행하게 된다.Function records are processes that operate independently of each other. Determine base class type to map with fCode information of function record. After mapping to base class type through function mapping process, call user-defined POU execution function registered in pFunction. As soon as the execution function is called, it executes its own function.

FB가 연결 관계를 갖는다는면 POU 실행함수의 실행이 완료된 후 관련 정보를 업데이트 한다. 연결 맵핑(Connection Mapping) 과정을 통해 연결 테이블에 저장된 FB의 연결 정보들을 업데이트 한다. If the FB has a connection, the relevant information is updated after the execution of the POU execution function. Through the connection mapping process, the connection information of the FBs stored in the connection table is updated.

연결 관계를 갖는 FB들은 실행 완료된 POU의 연결된 결과 값으로 일괄 업데이트 된다. 이 과정은 Atomic 하게 실행됨 으로서, 변수 간 잘못된 참조현상을 방지한다. 연결 맵핑 과정을 끝마치면, 다음 펑션 레코드를 호출하는 방식으로 작업을 진행한다.FBs with linked relationships are updated in batches with the linked result values of the executed POU. This process is done atomically to prevent incorrect references between variables. When you're done with the connection mapping process, you work by calling the next function record.

이하 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템에 대해 설명하도록 한다. 전술한 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법과 동일한 내용은 간략하게 설명하기로 한다.Hereinafter, a system for converting an FBN-based PLC code into a general program code will be described. The same content as the method for converting the above-described FBN-based PLC code into general-purpose program code will be briefly described.

도 7은 본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템(100)에 대한 개략적인 구성을 도시한 블록도이다.FIG. 7 is a block diagram showing a schematic configuration of a system 100 for converting FBN-based PLC code into general-purpose program code according to the present invention.

본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템은 FBN(Function Block diagram Network)을 입력받아 펑션 블록(Function Block: FB)을 분류하는 FB분류부(110), FB분류부(110)에서 분류된 펑션 블록에서 실행부분을 추출하는 실행부추출부(120), 실행부추출부(120)에서 추출된 펑션 블록의 실행부분에서 정적인 부분과 동적인 부분을 구분하는 실행부구분부(130), 실행부구분부(130)에서 구분된 정적인 부분과 동적인 부분을 결합하여 베이스 클래스(Base Class)를 생성하는 베이스생성부(140) 및 펑션 블록에 사용자 정의 변수 또는 사용자 정의 알고리즘이 있는 경우, 베이스 클래스를 수정하여 사용자 정의 POU(Program Organization Unit) 클래스를 생성하는 POU생성부(150)를 포함한다.The system for converting the FBN-based PLC code into a general program code according to the present invention receives the FBN (Function Block diagram Network) FB classification unit 110, FB classification unit (Function Block (FB) classification) Execution part extraction unit 120 for extracting the execution part from the function block classified in 110), execution part classification for distinguishing the static part and the dynamic part in the execution part of the function block extracted from the execution part extraction unit 120 User-defined variables or user definitions in the base generator 140 and function blocks that combine the static and dynamic parts separated by the part 130 and the execution part separator 130 to generate a base class. If there is an algorithm, the base class is modified to include a POU generation unit 150 for generating a user-defined Program Organization Unit (POU) class.

FB분류부(110)는 펑션 블록을 이벤트 I/O와 데이터 I/O로 분류하고, 펑션 블록에서 사용자 정의 I/O를 분류한다.The FB classification unit 110 classifies the function block into event I / O and data I / O, and classifies the user-defined I / O in the function block.

베이스생성부(140)는 정적인 부분과 동적인 부분을 각각 클래스 파일로 구성하고, 동적인 부분의 클래스 파일이 정적인 부분의 클래스 파일을 상속받도록 하여 베이스 클래스를 생성한다.The base generator 140 configures the static part and the dynamic part as class files, respectively, and generates the base class by allowing the dynamic part class file to inherit the static part class file.

POU생성부(150)는 베이스 클래스의 알고리즘 수행 함수를 가상함수로 구성하고, 베이스 클래스를 상속받는 사용자 정의 POU 클래스를 생성한다.The POU generation unit 150 configures an algorithm performing function of the base class as a virtual function and generates a user-defined POU class that inherits the base class.

사용자 정의 POU 클래스는 사용자 정의 변수 및 사용자 정의 알고리즘을 실행 함수에 선언하고, 베이스 클래스의 가상함수를 호출하는 형태로 실행함수가 구성된다.The user-defined POU class declares user-defined variables and user-defined algorithms in the execution function, and calls the base function's virtual function to form the execution function.

본 발명에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템은 베이스 클래스 또는 POU 클래스로 변환된 FBN을 관리하는 FBN관리부(160)를 더 포함할 수 있다.The system for converting an FBN-based PLC code into a general program code may further include an FBN manager 160 for managing an FBN converted into a base class or a POU class.

FBN관리부는 사용자 정의 POU에 타입 캐스팅을 수행하여 베이스 POU로 변환하는 타입캐스팅부(161), 타입캐스팅부에서 변환된 베이스 POU에 펑션 맵핑을 적용하여 펑션 레코드(Function Record)를 생성하는 레코드생성부(162), 레코드생성부에서 생성된 펑션 레코드를 광역 펑션 테이블(Global Function Table)에 등록하는 테이블등록부(163), 테이블등록부에서 등록된 펑션 레코드를 펑션 블록 간의 연결 관계에 따라 관계설정을 수행하는 관계설정부(164) 및 관계설정부에서 관계가 설정된 펑션 레코드를 스케줄링하는 스케줄링부(165)를 포함한다.The FBN management unit performs a type casting on a user-defined POU to convert it into a base POU, and a record generation unit that generates a function record by applying a function mapping to the base POU converted by the type casting unit. 162, a table register 163 for registering a function record generated by the record generator in a global function table, and performing a relationship setting according to a connection relationship between function blocks registered in a table register; A relationship setting unit 164 and a scheduling unit 165 for scheduling a function record for which a relationship is set in the relationship setting unit.

또한 본 발명의 다른 실시예로서, 전술한 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법이 컴퓨터에서 실행되는 프로그램 형태로 구현될 수 있다. 따라서 본 발명은 컴퓨터에서 본 발명의 방법을 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체 형태로 구현가능하다.In addition, as another embodiment of the present invention, the method for converting the above-described FBN-based PLC code into general-purpose program code may be implemented in the form of a program executed in a computer. Accordingly, the present invention can be implemented in the form of a computer-readable recording medium having recorded thereon a program for executing the method of the present invention on a computer.

본 실시예 및 본 명세서에 첨부된 도면은 본 발명에 포함되는 기술적 사상의 일부를 명확하게 나타내고 있는 것에 불과하며, 본 발명의 명세서 및 도면에 포함된 기술적 사상의 범위 내에서 당업자가 용이하게 유추할 수 있는 변형 예와 구체적인 실시예는 모두 본 발명의 권리범위에 포함되는 것이 자명하다고 할 것이다.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 all fall within the scope of the present invention.

100 : FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템
110 : FB분류부 120 : 실행부추출부
130 : 실행부구분부 140 : 베이스생성부
150 : POU생성부 160 : FBN관리부
161 : 타입캐스팅부 162 : 레코드생성부
163 : 테이블등록부 164 : 관계설정부
165 : 스케줄링부
100: System to convert FBN based PLC code into general purpose program code
110: FB classification unit 120: execution unit extraction unit
130: execution section classification section 140: base generation section
150: POU generation unit 160: FBN management unit
161: type casting unit 162: record generation unit
163: table registration unit 164: relationship setting unit
165: scheduling unit

Claims (15)

FBN(Function Block diagram Network)의 펑션 블록(Function Block)이 분류되는 S1 단계;
상기 S1 단계에서 분류된 펑션 블록에서 실행부분이 추출되는 S2 단계;
상기 S2 단계에서 추출된 펑션 블록의 실행부분에서 정적인 부분과 동적인 부분이 구분되는 S3 단계;
상기 S3 단계에서 구분된 정적인 부분과 동적인 부분이 결합되어 베이스 클래스(Base Class)가 생성되는 S4 단계; 및
펑션 블록에 사용자 정의 변수 또는 사용자 정의 알고리즘이 있는 경우, 상기 S4 단계의 베이스 클래스를 수정하여 사용자 정의 POU(Program Organization Unit) 클래스가 생성되는 S5 단계를 포함하는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법.
Step S1 of classifying a function block of a function block diagram network (FBN);
Step S2 of extracting an execution part from a function block classified in step S1;
A step S3 in which a static part and a dynamic part are distinguished from the execution part of the function block extracted in the step S2;
A step S4 of generating a base class by combining the static part and the dynamic part separated in the step S3; And
If there is a user-defined variable or a user-defined algorithm in the function block, the FBN-based PLC code, characterized in that it comprises a step S5 to modify the base class of step S4 to create a user-defined POU (Program Organization Unit) class How to convert to universal program code.
제1항에 있어서,
상기 S1 단계는
상기 펑션 블록이 이벤트 I/O와 데이터 I/O로 분류되는 S1-1 단계; 및
상기 펑션 블록에서 사용자 정의 I/O가 분류되는 S1-2 단계를 포함하는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법.
The method of claim 1,
The step S1
Step S1-1 in which the function block is classified into event I / O and data I / O; And
And converting the user defined I / O in the function block into a general program code.
제1항에 있어서,
상기 베이스 클래스에서 정적인 부분과 동적인 부분이 각각 클래스 파일로 구성되고, 상기 동적인 부분의 클래스 파일이 정적인 부분의 클래스 파일을 상속받는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법.
The method of claim 1,
A static part and a dynamic part of the base class are each composed of a class file, and the dynamic part class file inherits the class file of the static part into a general-purpose program code. How to convert.
제1항에 있어서,
상기 S5 단계는
베이스 클래스의 알고리즘 수행 함수가 가상함수로 구성되는 S5-1 단계; 및
상기 S4 단계에서 생성된 베이스 클래스를 상속받는 사용자 정의 POU 클래스가 생성되는 S5-2 단계를 포함하는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법.
The method of claim 1,
The step S5
Step S5-1 in which the algorithm performing function of the base class is composed of a virtual function; And
And a step S5-2 of generating a user-defined POU class that inherits the base class generated in step S4.
제4항에 있어서,
상기 사용자 정의 POU 클래스는 사용자 정의 변수 및 사용자 정의 알고리즘을 실행 함수에 선언하고, 베이스 클래스의 가상함수를 호출하는 형태로 실행함수가 구성되는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법.
5. The method of claim 4,
The user defined POU class declares a user defined variable and a user defined algorithm in an execution function and converts the FBN-based PLC code into a general-purpose program code, wherein the execution function is configured in a form of calling a virtual function of the base class. How to.
삭제delete 제1항에 있어서,
상기 S5 단계의 사용자 정의 POU가 타입 캐스팅을 통해 베이스 POU로 변환되는 S6-1 단계;
상기 S6-1 단계에서 변환된 베이스 POU에 펑션 맵핑을 적용하여 펑션 레코드(Function Record)가 생성되는 S6-2 단계;
상기 S6-2 단계의 펑션 레코드가 광역 펑션 테이블(Global Function Table)에 등록되는 S6-3 단계;
상기 S6-3 단계에서 등록된 펑션 레코드가 펑션 블록 간의 연결 관계에 따라 관계설정이 되는 S6-4 단계;
상기 등록된 펑션 레코드가 스케줄링되는 S6-5 단계가 포함된 S6 단계를 더 포함하는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법.
The method of claim 1,
Step S6-1 in which the user defined POU of step S5 is converted into a base POU through type casting;
Step S6-2 in which a function record is generated by applying a function mapping to the base POU converted in step S6-1;
A step S6-3 in which the function record of step S6-2 is registered in a global function table;
Step S6-4 in which the function record registered in the step S6-3 is set in relation to the connection relationship between the function blocks;
And a step S6 including a step S6-5 in which the registered function record is scheduled.
FBN(Function Block diagram Network)을 입력받아 펑션 블록(Function Block: FB)을 분류하는 FB분류부;
상기 FB분류부에서 분류된 펑션 블록에서 실행부분을 추출하는 실행부추출부;
상기 실행부추출부에서 추출된 펑션 블록의 실행부분에서 정적인 부분과 동적인 부분을 구분하는 실행부구분부;
상기 실행부구분부에서 구분된 정적인 부분과 동적인 부분을 결합하여 베이스 클래스(Base Class)를 생성하는 베이스생성부; 및
펑션 블록에 사용자 정의 변수 또는 사용자 정의 알고리즘이 있는 경우, 상기 베이스 클래스를 수정하여 사용자 정의 POU(Program Organization Unit) 클래스를 생성하는 POU생성부를 포함하는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템.
An FB classification unit that receives a function block diagram network (FBN) and classifies a function block (FB);
An execution unit extracting unit extracting an execution unit from the function blocks classified by the FB classification unit;
An execution unit division unit for distinguishing a static part and a dynamic part from the execution part of the function block extracted by the execution part extraction unit;
A base generation unit for generating a base class by combining the static part and the dynamic part separated from the execution part separator; And
If the function block has a user-defined variable or a user-defined algorithm, the general-purpose program code for the FBN-based PLC code, characterized in that it comprises a POU generation unit for modifying the base class to generate a user-defined Program Organization Unit (POU) class System to convert.
제8항에 있어서,
상기 FB분류부는 상기 펑션 블록을 이벤트 I/O와 데이터 I/O로 분류하고, 상기 펑션 블록에서 사용자 정의 I/O를 분류하는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템.
9. The method of claim 8,
The FB classification unit classifies the function block into event I / O and data I / O, and classifies a user defined I / O from the function block. .
제8항에 있어서,
상기 베이스생성부의 베이스 클래스에서 상기 정적인 부분과 동적인 부분이 각각 클래스 파일로 구성되고, 상기 동적인 부분의 클래스 파일이 정적인 부분의 클래스 파일을 상속받는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템.
9. The method of claim 8,
In the base class of the base generating unit, the static part and the dynamic part are each composed of a class file, and the class file of the dynamic part inherits the class file of the static part. A system that converts FBN-based PLC code into general-purpose program code.
제8항에 있어서,
상기 POU생성부는
상기 베이스 클래스의 알고리즘 수행 함수를 가상함수로 구성하고, 상기 베이스 클래스를 상속받는 사용자 정의 POU 클래스를 생성하는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템.
9. The method of claim 8,
The POU generation unit
A system for converting FBN-based PLC code into general-purpose program code, comprising: performing a virtual function of an algorithm execution function of the base class and generating a user-defined POU class that inherits the base class.
제11항에 있어서,
상기 사용자 정의 POU 클래스는 사용자 정의 변수 및 사용자 정의 알고리즘을 실행 함수에 선언하고, 베이스 클래스의 가상함수를 호출하는 형태로 실행함수가 구성되는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템.
The method of claim 11,
The user defined POU class declares a user defined variable and a user defined algorithm in an execution function and converts the FBN-based PLC code into a general-purpose program code, wherein the execution function is configured in a form of calling a virtual function of the base class. System.
삭제delete 제8항에 있어서,
상기 사용자 정의 POU에 타입 캐스팅을 수행하여 베이스 POU로 변환하는 타입캐스팅부;
상기 타입캐스팅부에서 변환된 베이스 POU에 펑션 맵핑을 적용하여 펑션 레코드(Function Record)를 생성하는 레코드생성부;
상기 레코드생성부에서 생성된 펑션 레코드를 광역 펑션 테이블(Global Function Table)에 등록하는 테이블등록부;
상기 테이블등록부에서 등록된 펑션 레코드를 펑션 블록 간의 연결 관계에 따라 관계설정을 수행하는 관계설정부; 및
상기 관계설정부에서 관계가 설정된 펑션 레코드를 스케줄링하는 스케줄링부가 포함된 FBN관리부를 더 포함하는 것을 특징으로 하는 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 시스템.
9. The method of claim 8,
A type casting unit converting the user-defined POU into a base POU by performing type casting;
A record generation unit generating a function record by applying a function mapping to the base POU converted by the type casting unit;
A table registration unit for registering the function record generated by the record generation unit in a global function table;
A relationship setting unit configured to perform a relationship setting on a function record registered in the table registration unit according to a connection relationship between function blocks; And
And a FBN management unit including a scheduling unit configured to schedule a function record for which a relationship is set in the relationship setting unit.
제1항, 제2항, 제3항, 제4항, 제5항 또는 제7항에 중 어느 한 항에 따른 FBN 기반의 PLC 코드를 범용 프로그램 코드로 변환하는 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.

A program for executing on a computer a method for converting an FBN-based PLC code according to any one of claims 1, 2, 3, 4, 5, or 7 into general-purpose program code. A computer-readable recording medium that records the data.

KR1020110014871A 2011-02-21 2011-02-21 Method and system for converting fbn based plc code into a general program code KR101216916B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020110014871A KR101216916B1 (en) 2011-02-21 2011-02-21 Method and system for converting fbn based plc code into a general program code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020110014871A KR101216916B1 (en) 2011-02-21 2011-02-21 Method and system for converting fbn based plc code into a general program code

Publications (2)

Publication Number Publication Date
KR20120095512A KR20120095512A (en) 2012-08-29
KR101216916B1 true KR101216916B1 (en) 2012-12-28

Family

ID=46885930

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020110014871A KR101216916B1 (en) 2011-02-21 2011-02-21 Method and system for converting fbn based plc code into a general program code

Country Status (1)

Country Link
KR (1) KR101216916B1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170015581A (en) * 2015-07-29 2017-02-09 주식회사 유디엠텍 Method of converting heterogeneous plc device information to common format of plc device information
KR101627769B1 (en) * 2015-12-17 2016-06-08 주식회사 유디엠텍 Apparatus and method of transforming text type of plc control program into common type of plc control program
CN111857028B (en) * 2020-06-24 2022-05-27 广州明珞汽车装备有限公司 PLC program generation method, system, equipment and storage medium
CN113311764A (en) * 2021-05-31 2021-08-27 东莞市木鸟自动化有限公司 Programmable controller based on single chip microcomputer as bottom carrier

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090083719A1 (en) 2007-09-20 2009-03-26 Delta Electronics, Inc. Method of compiling machine code program for programmable logic controller

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090083719A1 (en) 2007-09-20 2009-03-26 Delta Electronics, Inc. Method of compiling machine code program for programmable logic controller

Also Published As

Publication number Publication date
KR20120095512A (en) 2012-08-29

Similar Documents

Publication Publication Date Title
CN112748908B (en) Method and device for developing Restful service based on SSM framework
US20110004564A1 (en) Model Based Deployment Of Computer Based Business Process On Dedicated Hardware
US8291372B2 (en) Creating graphical models representing control flow of a program manipulating data resources
WO2009082382A1 (en) Automated model generation for computer based business process
CN111176645A (en) Power grid big data application-oriented data integration management system and implementation method thereof
US9904524B2 (en) Method and device for visually implementing software code
KR101216916B1 (en) Method and system for converting fbn based plc code into a general program code
CN101604241A (en) A kind of code generating method of embedded system
US8701079B2 (en) Procedure and development environment for generation of an executable overall control program
CN104571026A (en) Platform and method for establishing whole-process metallurgical manufacturing execution system
CN103164206A (en) Software customization system based on software as a service (SAAS)
WO2017109791A1 (en) A system and method for building enterprise applications
CN104699503A (en) Method and device for replacing function execution logic in Android system
CN112363718A (en) Industrial application integration system based on micro-service architecture
CN111506314B (en) Project development method, device, server and medium
CN114912897A (en) Workflow execution method, workflow arrangement method and electronic equipment
KR20120095513A (en) Method and framework system for converting plc based control code to a general program code using xml interface
CN109144512A (en) A kind of method and system generating API
EP2930576A1 (en) Controlling a manufacturing plant with a MES system
Mandal et al. Modelling of business processes for software as a service
JP2011515755A (en) Development method and apparatus for reserved component container base software
CN103995699A (en) Electric power enterprise information system development method based on MDA
CN110956025A (en) Method based on process template multiplexing
Sailer et al. Distributed multi-core development in the automotive domain-a practical comparison of asam mdx vs. autosar vs. amalthea
López Martínez et al. Scheduling configuration of real-time component-based applications

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: 20151118

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee