WO2020197011A1 - Memory mapping method for mixing programming language and language defined by manufacturer - Google Patents

Memory mapping method for mixing programming language and language defined by manufacturer Download PDF

Info

Publication number
WO2020197011A1
WO2020197011A1 PCT/KR2019/012078 KR2019012078W WO2020197011A1 WO 2020197011 A1 WO2020197011 A1 WO 2020197011A1 KR 2019012078 W KR2019012078 W KR 2019012078W WO 2020197011 A1 WO2020197011 A1 WO 2020197011A1
Authority
WO
WIPO (PCT)
Prior art keywords
language
memory
mapping
program
function
Prior art date
Application number
PCT/KR2019/012078
Other languages
French (fr)
Korean (ko)
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 CN201980094633.4A priority Critical patent/CN113632016A/en
Publication of WO2020197011A1 publication Critical patent/WO2020197011A1/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/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/054Input/output
    • 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
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/408Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by data handling or data format, e.g. reading, buffering or conversion of data
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/4093Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by part programming, e.g. entry of geometrical information as taken from a technical drawing, combining this with machining and material information to obtain control information, named part programme, for the NC machine
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/4093Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by part programming, e.g. entry of geometrical information as taken from a technical drawing, combining this with machining and material information to obtain control information, named part programme, for the NC machine
    • G05B19/40931Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by part programming, e.g. entry of geometrical information as taken from a technical drawing, combining this with machining and material information to obtain control information, named part programme, for the NC machine concerning programming of geometry
    • G05B19/40936Defining geometry with a high level language

Definitions

  • the present invention is a method of configuring a memory so that a language defined by a manufacturer can be used in a user function/function block of a programming language (language defined in IEC61131-3) while maintaining a method of calling instructions of a language defined by the manufacturer (MK language). It relates to a memory mapping method to support mixed use of programming language and language defined by manufacturer by improving.
  • PLC programmable logic controller
  • PLC processes inputs sequentially by a program and controls connected external devices using the output results.
  • PLC when an input signal enters through a switch, etc., it is processed internally by the operation technology inside the program, and the result is finally displayed on the output coil. And the output operation of the control target controls the entire system.
  • IEC61131-3 LD (ladder diagram), IL (Instruction List), ST (structured text), FBD (Function Block Diagram), hereafter referred to as IEC language
  • IEC language the language defined in IEC61131-3
  • IL Instruction List
  • ST structured text
  • FBD Fluor Block Diagram
  • MK Manufacturing-K product
  • the programming language basically has a-contact switch, b-contact switch, timer, and logical operation instructions, and functional blocks having various other functions such as communication can be configured in various ways depending on the company.
  • the programming language used is different for each user, and the operating system (O/S) is configured for each program language on one hardware (H/W).
  • 1 is an embodiment of a program written in MK language by a user using a PADT (Program And Debugging Tool).
  • the characteristic of MK language is a method of assigning a variable type to a command without specifying the operation classification according to the data type such as Byte, Word, Double Word, and Floating as the input variable type.
  • the word type operation uses an ADD instruction such as "-ADD D00000 D00002 D00004-". And for double word type operation, use DADD instruction like "- DADD D00000 D00002 D00004-".
  • the input data is the same as D00000, D00002, D00004.
  • a memory for a timer (T0000) is separately allocated and used.
  • FIG. 2 is an embodiment of a program written by a user in the IEC-61131-3 language using a PADT (Program And Debugging Tool).
  • the characteristic of the IEC language is a method of determining an operation by assigning a type to an input variable for the operation classification according to the data type.
  • a timer memory is separately allocated and used inside the command without a separate memory.
  • 3 is an embodiment showing the project structure of a PADT supporting the IEC language.
  • User function/function block can be created by using basic command to apply to special application by user in addition to basic command (Addition, Subtraction, Multiplication, Division) supported by PLC.
  • the function/function block created by the user can be implemented by using the corresponding user function/function block when the same function is used in another project like a function in C language.
  • FIG. 4 is an embodiment showing a window for designating a variable to be used in a user function/function block in FIG. 3.
  • Figure 4(a) is an embodiment of data types supported by the IEC language (BOOL, BYTE, WORD, DWORD, arrays (in the case of array variables, it is possible to designate each type)), and Figure 4(b) is an array variable. It is an example of a method of generating a variable of, and FIG. 4(c) shows an example of a variable generated through FIGS. 4(a) and 4(b).
  • IEC language BOOL, BYTE, WORD, DWORD, arrays (in the case of array variables, it is possible to designate each type))
  • Figure 4(b) is an array variable. It is an example of a method of generating a variable of
  • FIG. 4(c) shows an example of a variable generated through FIGS. 4(a) and 4(b).
  • FIG. 5 is an embodiment of a program that implements an ADD instruction in a user function/function block using the variable defined in FIG. 4.
  • An object of the present invention is to increase the user's maintenance convenience and increase the familiar programming language so that other users can cooperate when performing a project jointly, thereby shortening the execution period and reducing costs.
  • User functions supported by the IEC language This is to provide a memory mapping method that integrates the language defined by the manufacturer into the IEC language using the function block function.
  • an object of the present invention is to provide a memory mapping method that maintains a method of calling instructions in a language (MK language) defined by a manufacturer in order to solve the first problem in the related art.
  • MK language a language defined by a manufacturer
  • an object of the present invention is a method of configuring a memory so that a language defined by a manufacturer can be used in a user function/function block of a programming language (language defined in IEC61131-3) in order to solve the second and third problems in the related art. It is to provide a memory mapping method to support mixing of programming language and language defined by the manufacturer by improving.
  • the memory mapping method for mixing a program language and a language defined by a manufacturer is: (A) A language setting window that supports a second language in a user function/function block of the first language is added to the PADT (Program And Debugging Tool).
  • PADT Program And Debugging Tool
  • Step to do (B) creating a program in the user function/function block in the second language selected in the added language setting window; (C) generating a mapping table for mapping the first language and the second language to each other through a table generator; (D) mapping a variable to be used in the program to a second language set in the language setting window of the PADT based on the generated mapping table through a mapping processor; And (E) converting programs written in different languages into one language based on the variables mapped by the mapping processor through the assemble conversion unit.
  • the first language is the IEC language is a programming language, and includes a language defined in IEC61131-3 (LD (ladder diagram), IL (Instruction List), ST (structured text), FBD (Function Block Diagram)), and the
  • the second language is a language defined by a manufacturer and may include the MASTER-K product language (MK language).
  • mapping table may be generated by classifying the user function/function block into memory to be used in the second language, classification, size, type, memory start address, and allocated memory address.
  • mapping table may include redefining the same memory name used in the first language and the second language; Mapping the memory used in the first language and the second language as a block size and increasing the number to a memory name by 1:1; It may include the step of designating a variable of the same name used in the first language and the second language for each type.
  • mapping table may designate a variable type used when a user function/function block is used in the first language.
  • a program of the second language written in the user function/function block based on the mapped variable through the assemble conversion unit may be converted by calling the program in the first language using a mapping table.
  • step (E) may include specifying a size of a memory block and mapping a memory name by increasing a number of 1:1; Designating a variable of the same name for each type; And converting programs written in different languages into one language.
  • the memory mapping method for mixing a program language and a language defined by a manufacturer includes the steps of receiving a program written in a first language and a program written in a second language into a PADT (Program And Debugging Tool); Assigning a size of a memory block to a function-type user function/function block through a mapping processing unit, mapping a number to a memory name by 1:1, and specifying a variable of the same name for each type; Calling the second language program written in the user function/function block from the first language through the assemble conversion unit and converting the second language program into a first language program; And implementing a program converted into the first language together with the program written in the first language, and operating organically in the IEC project.
  • PADT Program And Debugging Tool
  • the memory mapping method for mixing the programming language according to the present invention and the language defined by the manufacturer can obtain the effect of executing a project regardless of the language when users jointly create PLC programs in IEC and MK languages, respectively. have.
  • 1 is an embodiment of a program written in MK language by a user using a PADT (Program And Debugging Tool).
  • FIG. 2 is an embodiment of a program written by a user in the IEC-61131-3 language using a PADT (Program And Debugging Tool).
  • 3 is an embodiment showing the project structure of a PADT supporting the IEC language.
  • FIG. 4 is an embodiment showing a window for designating a variable to be used in a user function/function block in FIG. 3.
  • FIG. 5 is an embodiment of a program implementing an ADD instruction in a user function/function block by using the variable defined in FIG. 4.
  • FIG. 6 is an embodiment showing a window for designating a variable to be used in a user function/function block in the project structure of a PADT in a programming device for PLC.
  • FIG. 7 is a block diagram showing the configuration of the programming device for PLC in FIG. 6.
  • FIG. 8 is a diagram showing a mapping table between a memory defined in the IEC language generated by the table generator of FIG. 7 and a memory used in the MK language.
  • 9 is an embodiment showing the converted result by calling MK language program written in user function/function block from IEC language.
  • FIG. 6 is an embodiment showing a window for designating a variable to be used in a user function/function block in the project structure of a PADT in a programming device for PLC.
  • 7 is a block diagram showing the configuration of a programming device for a PLC
  • FIG. 8 is a diagram showing a mapping table between a memory defined in the IEC language generated by the table generator of FIG. 7 and a storage used in the MK language.
  • the programming apparatus for PLC may include a table generation unit 100, a mapping processing unit 200, and an assemble conversion unit 300. Further, the programming device for PLC may further include an input/output unit (not shown) for input/output of data such as a keypad, a monitor, and a touch screen.
  • the programming device for PLC adds a language setting window that supports MK (MASTER-K) language in the user function/function block of the IEC language to the PADT (Program And Debugging Tool). As such, the programming device for PLC confirms that the function/function block will be written in MK language when the user selects the MK language in the language setting window of the PADT.
  • MK MASTER-K
  • the IEC language is a programming language, and includes the languages defined in IEC61131-3 (LD (ladder diagram), IL (Instruction List), ST (structured text), FBD (Function Block Diagram)), and MK language is from the manufacturer. It can be a defined language (MASTER-K product in case of LS Industrial Systems).
  • the programming device for PLC creates a table to map MK language and IEC language to each other. Using the created table, it is possible to map the variable type used when using the user function/function block in the existing IEC language to the MK language.
  • the table can be classified into variable type, variable, type, and memory allocation as shown in Table 1 below, and mapped 1:1 or registered as an array.
  • MK language is a method that is directly assigned to memory. It cannot be used in the case of a timer, a variable divided by type (current value (Word), set value (Word), status value (bit)) with the same variable name must be provided, but the variable type designation method of user function/function block is one. You cannot specify multiple types for the name of.
  • a table capable of supporting a manufacturer's language in the following three aspects may be generated by the table generation unit 100 of FIG. 7.
  • %MW0000 memory name can be redefined as M0000, even if the memory name defined in the IEC language and the memory name defined by the manufacturer are the same, they can be mixed, and the programmer can designate and use the purpose in their own language.
  • FIG. 8 is a diagram showing a mapping table between a memory defined in the IEC language generated by the table generator of FIG. 7 and a memory used in the MK language.
  • the mapping table may be generated by classifying the memory to be used in the second language of the user function/function block, classification, size, type, memory start address, and allocated memory address.
  • the mapping table is saved so that the variable type used when using the user function/function block in the existing IEC language can be designated in order to make the memory configuration method the same as the MK language.
  • the mapping processing unit 200 is a part that performs a program process, and the first function selected in the MK language can be programmed in the MK language, and the second function selected in the IEC language can be programmed in the IEC language.
  • mapping processing unit 200 maps the variables to be used in the program to the MK language set in the language setting window of the PADT based on the mapping table shown in FIG. 8. If the mapping table of FIG. 8 is supported, the program written in the MK language shown in FIG. 1 can be applied to the IEC language without modification.
  • the assemble conversion unit 300 is a part that performs a compilation process, and compiles each MK language or IEC language programmed from the mapping processing unit 200 to translate into machine language, and integrates each translated machine language into one machine language. Let it.
  • the assemble conversion unit 300 designates the size of a memory block using a variable mapped by the mapping processing unit 200, and maps the memory name by increasing the number by 1:1. And, by designating a variable of the same name for each type, programs written in different languages are converted into one language. That is, the assemble conversion unit 300 calls and converts the MK language program written in the user function/function block from the IEC language using the mapping table.
  • the assemble conversion unit 300 converts the program of the MK language written in the user function/function block to be called in the IEC language and operated organically.
  • 9 is an embodiment showing the converted result by calling MK language program written in user function/function block from IEC language.
  • the PADT Program And Debugging Tool
  • the PADT inputs a program written in the MK language shown in Fig. 1 from the first user and the second user inputs a program written in the IEC language shown in Fig. 2 Receive.
  • the size of the memory block is designated to the user function/function block in the form of a function through the mapping processing unit 200, and mapped by increasing the number to the memory name by 1:1, and a variable of the same name is designated for each type.
  • the MK language program written in the user function/function block is called from the IEC language and converted into the IEC language program 301.
  • the PADT Program And Debugging Tool
  • the PADT implements the program 301 converted to the IEC language in the assemble conversion unit 300 together with the program written in the IEC language of FIG. 2 so that it can be operated organically in the IEC project. do.
  • PADT Program And Debugging Tool

Abstract

The present invention is to provide a memory mapping method for integrating a language defined by a manufacturer into an IEC language by using a user function/function block function supported by the IEC language, whereby the maintenance convenience for a user is improved, and a familiar programming language is improved to enable collaboration when another user jointly executes a project, so that an execution period and costs can be reduced.

Description

프로그램 언어와 제조사에서 정의한 언어의 혼용을 위한 메모리 매핑 방법Memory mapping method for mixing programming language and language defined by manufacturer
본 발명은 제조사에서 정의한 언어(MK 언어)의 명령어를 호출하는 방식을 유지하면서 프로그램 언어(IEC61131-3에서 정의한 언어)의 사용자 펑션/펑션블록에서 제조사에서 정의한 언어를 사용할 수 있도록 메모리를 구성하는 방법을 개선하여 프로그램 언어와 제조사에서 정의한 언어의 혼용을 지원하기 위한 메모리 매핑 방법에 관한 것이다.The present invention is a method of configuring a memory so that a language defined by a manufacturer can be used in a user function/function block of a programming language (language defined in IEC61131-3) while maintaining a method of calling instructions of a language defined by the manufacturer (MK language). It relates to a memory mapping method to support mixed use of programming language and language defined by manufacturer by improving.
PLC(programmable logic controller)는 산업 플랜트의 자동 제어 및 감시에 사용하는 제어 장치이다. PLC는 입력을 프로그램에 의해 순차적으로 논리 처리하고 그 출력 결과를 이용해 연결된 외부장치를 제어한다. PLC는 스위치 등을 통해 입력신호가 들어가면 프로그램 내부의 동작 기술에 의해 내부에서 처리되고 결과물은 최종적으로 출력코일에 나타난다. 그리고 출력된 제어 대상의 동작이 전체 시스템을 제어하게 된다.PLC (programmable logic controller) is a control device used for automatic control and monitoring of industrial plants. PLC processes inputs sequentially by a program and controls connected external devices using the output results. In PLC, when an input signal enters through a switch, etc., it is processed internally by the operation technology inside the program, and the result is finally displayed on the output coil. And the output operation of the control target controls the entire system.
프로그램 내부의 동작은 IEC61131-3에서 정의한 언어(LD(ladder Diagram), IL(Instruction List), ST(structured Text), FBD(Function Block Diagram), 이후 IEC 언어로 칭함)와 제조사에서 정의한 언어(LS산전의 경우 MASTER-K제품, 이후 MK 언어로 칭함)로 기술한다. The internal operation of the program is the language defined in IEC61131-3 (LD (ladder diagram), IL (Instruction List), ST (structured text), FBD (Function Block Diagram), hereafter referred to as IEC language) and the language defined by the manufacturer (LS In the case of prenatal, it is described as MASTER-K product, hereafter referred to as MK language).
프로그램 언어는 기본적으로 a-접점 스위치, b-접점 스위치, 타이머, 논리연산 명령어를 가지며, 통신 등 기타 다양한 기능을 갖는 기능 블록은 업체에 따라 다양하게 구성될 수 있다. The programming language basically has a-contact switch, b-contact switch, timer, and logical operation instructions, and functional blocks having various other functions such as communication can be configured in various ways depending on the company.
그러나 프로그램 언어는 사용자마다 사용하는 프로그램 언어가 달라 하나의 하드웨어(H/W)에 프로그램 언어 별로 운영체제(O/S)를 구성하는 형태를 취하고 있다. However, the programming language used is different for each user, and the operating system (O/S) is configured for each program language on one hardware (H/W).
도 1은 사용자가 PADT(Program And Debugging Tool)을 이용하여 MK 언어로 작성한 프로그램의 실시예이다. 1 is an embodiment of a program written in MK language by a user using a PADT (Program And Debugging Tool).
이때, MK 언어의 특징은 Byte, Word, Double Word, Floating 등 데이터 타입에 따른 연산 구분을 입력 변수의 타입으로 지정하지 않고 명령어에 변수 타입을 부여하는 방식이다. At this time, the characteristic of MK language is a method of assigning a variable type to a command without specifying the operation classification according to the data type such as Byte, Word, Double Word, and Floating as the input variable type.
즉, 도 1에서 도시하고 있는 것과 같이, Add 연산의 경우 Word 타입 연산은 "-ADD D00000 D00002 D00004-"과 같이 ADD 명령을 사용한다. 그리고 Double Word 타입 연산은 "- DADD D00000 D00002 D00004-"과 같이 DADD 명령을 사용한다. That is, as shown in FIG. 1, in the case of the Add operation, the word type operation uses an ADD instruction such as "-ADD D00000 D00002 D00004-". And for double word type operation, use DADD instruction like "- DADD D00000 D00002 D00004-".
여기에서 입력 데이터는 D00000, D00002, D00004로 동일함을 확인할 수 있다. 또한 일반적으로 제공하는 Timer 명령의 경우 타이머용 메모리(T0000)를 별도로 할당하여 사용하고 있다.Here, it can be seen that the input data is the same as D00000, D00002, D00004. Also, in the case of a commonly provided Timer command, a memory for a timer (T0000) is separately allocated and used.
도 2는 사용자가 PADT(Program And Debugging Tool)을 이용하여 IEC-61131-3 언어로 작성한 프로그램의 실시예이다.2 is an embodiment of a program written by a user in the IEC-61131-3 language using a PADT (Program And Debugging Tool).
이때, IEC 언어의 특징은 데이터 타입에 따른 연산 구분을 입력 변수에 타입을 지정하여 연산을 결정하는 방식이다. At this time, the characteristic of the IEC language is a method of determining an operation by assigning a type to an input variable for the operation classification according to the data type.
도 2에서 도시하고 있는 것과 같이, 동일 명령어(예, ADD)에 대해 입력 데이터가 %MW0, %MW1인 경우에는 Word 연산을 수행하고, %MD0, %MD1인 경우에는 Double Word 연산을 수행한다.As shown in FIG. 2, when input data is %MW0 and %MW1 for the same instruction (eg, ADD), a Word operation is performed, and when %MD0 and %MD1, a Double Word operation is performed.
또한 일반적으로 제공하는 Timer 명령의 경우 별도의 메모리 없이 명령어 내부에 타이머용 메모리를 별도 할당하여 사용하고 있다.In addition, in the case of a commonly provided Timer command, a timer memory is separately allocated and used inside the command without a separate memory.
도 3은 IEC 언어를 지원하는 PADT의 프로젝트 구조를 나타낸 실시예이다.3 is an embodiment showing the project structure of a PADT supporting the IEC language.
도 3에서 도시하고 있는 것과 같이, IEC 언어에서는 사용자 펑션/펑션 블록을 지원하고 있음을 알 수 있다. 사용자 펑션/펑션블록은 PLC에서 지원하는 기본 명령어(Addition, Subtraction, Multiplication, Division) 외에 사용자가 특수 어플리케이션에 적용하기 위해 기본 명령어를 이용하여 작성할 수 있다. As shown in FIG. 3, it can be seen that the IEC language supports user functions/function blocks. User function/function block can be created by using basic command to apply to special application by user in addition to basic command (Addition, Subtraction, Multiplication, Division) supported by PLC.
사용자가 작성한 펑션/펑션블록은 C언어에서 함수처럼 다른 프로젝트에서 동일한 기능을 사용할 경우 해당 사용자 펑션/펑션 블록을 이용하여 구현할 수 있다.The function/function block created by the user can be implemented by using the corresponding user function/function block when the same function is used in another project like a function in C language.
도 4는 도 3에서 사용자 펑션/펑션블록에서 사용할 변수를 지정하는 창을 나타낸 실시예이다.4 is an embodiment showing a window for designating a variable to be used in a user function/function block in FIG. 3.
도 4(a)는 IEC 언어에서 지원하는 데이터 타입(BOOL, BYTE, WORD, DWORD, 어레이(어레이 변수의 경우에도 타입별로 지정 가능))의 실시예이고, 도 4(b)는 어레이 변수일 경우의 변수 생성 방법의 실시예이며, 도 4(c)는 도 4(a) 및 도 4(b)를 통해 생성된 변수의 실시예를 보여주고 있다. Figure 4(a) is an embodiment of data types supported by the IEC language (BOOL, BYTE, WORD, DWORD, arrays (in the case of array variables, it is possible to designate each type)), and Figure 4(b) is an array variable. It is an example of a method of generating a variable of, and FIG. 4(c) shows an example of a variable generated through FIGS. 4(a) and 4(b).
그리고 도 5는 도 4에서 정의한 변수를 이용하여 사용자 펑션/펑션블록에서 ADD 명령을 구현한 프로그램의 실시예이다.And FIG. 5 is an embodiment of a program that implements an ADD instruction in a user function/function block using the variable defined in FIG. 4.
이처럼, 종래에는 프로그램 언어와 제조사에서 정의한 언어가 서로 상이한 차이를 나타내고 있습니다. As such, in the past, the programming language and the language defined by the manufacturer show different differences.
즉, 프로그램 언어와 제조사에서 정의한 언어는 첫째, 명령어를 사용하는 방법(예, ADD, DADD(MK언어)와 ADD(IEC언어))에 차이가 있다. 둘째, 메모리를 사용하는 방법(예, M0000(MK언어)과 %MW0000(IEC언어))에 차이가 있다. 그리고 셋째, 메모리 구성(예, MK 언어의 경우 타이머(T0000)존재)에서 차이가 있다.In other words, there is a difference between the programming language and the language defined by the manufacturer in the way of using commands (eg, ADD, DADD (MK language) and ADD (IEC language)). Second, there is a difference in how to use the memory (eg, M0000 (MK language) and %MW0000 (IEC language)). And third, there is a difference in the memory configuration (eg, the existence of a timer (T0000) in the case of MK language).
이러한 차이로 인해, 현재까지 대부분의 PLC는 두 언어를 지원하기 위해 하나의 하드웨어(H/W)에 언어 별로 상이한 운영체제(O/S)를 개발, 관리하고 있다. 이에 따라, 사용자 마다 상이한 언어에 익숙한 경우 공동 작업이 어려운 문제점이 있었다. Due to this difference, most PLCs have developed and managed different operating systems (O/S) for each language on one hardware (H/W) to support two languages. Accordingly, when each user is familiar with a different language, there is a problem that it is difficult to collaborate.
또한 IEC 언어에서만 지원하는 명령어가 있을 경우 MK 언어를 사용하는 사용자는 직접 구현해야 하는 번거로운 문제점이 있었다.In addition, if there is a command supported only in the IEC language, there is a cumbersome problem that users using the MK language must implement.
본 발명의 목적은 사용자의 유지 보수 편의성을 높이고 익숙한 프로그램 언어가 다른 사용자가 공동으로 프로젝트를 수행할 때 협업할 수 있도록 함으로써 높여 수행 기간 단축과 비용 절감 효과를 얻고자 IEC 언어에서 지원하는 사용자 펑션/펑션 블록 기능을 이용하여 제조사에서 정의한 언어를 IEC 언어에 통합하는 메모리 매핑 방법을 제공하는 것이다.An object of the present invention is to increase the user's maintenance convenience and increase the familiar programming language so that other users can cooperate when performing a project jointly, thereby shortening the execution period and reducing costs. User functions supported by the IEC language This is to provide a memory mapping method that integrates the language defined by the manufacturer into the IEC language using the function block function.
또한 본 발명의 목적은 종래의 첫 번째 문제점을 해결하기 위해, 제조사에서 정의한 언어(MK 언어)의 명령어를 호출하는 방식을 유지하는 메모리 매핑 방법을 제공하는 것이다.In addition, an object of the present invention is to provide a memory mapping method that maintains a method of calling instructions in a language (MK language) defined by a manufacturer in order to solve the first problem in the related art.
또한, 본 발명의 목적은 종래의 두 번째 및 세 번째 문제점을 해결하기 위해, 프로그램 언어(IEC61131-3에서 정의한 언어)의 사용자 펑션/펑션블록에서 제조사에서 정의한 언어를 사용할 수 있도록 메모리를 구성하는 방법을 개선하여 프로그램 언어와 제조사에서 정의한 언어의 혼용을 지원하기 위한 메모리 매핑 방법을 제공하는 것이다.In addition, an object of the present invention is a method of configuring a memory so that a language defined by a manufacturer can be used in a user function/function block of a programming language (language defined in IEC61131-3) in order to solve the second and third problems in the related art. It is to provide a memory mapping method to support mixing of programming language and language defined by the manufacturer by improving.
본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.The objects of the present invention are not limited to the above-mentioned objects, and other objects and advantages of the present invention that are not mentioned can be understood by the following description, and will be more clearly understood by examples of the present invention. In addition, it will be easily understood that the objects and advantages of the present invention can be realized by the means shown in the claims and combinations thereof.
본 발명에 따른 프로그램 언어와 제조사에서 정의한 언어의 혼용을 위한 메모리 매핑 방법은 (A) PADT(Program And Debugging Tool)에 제1 언어의 사용자 펑션/펑션블록에서 제2 언어를 지원하는 언어 설정창을 추가하는 단계; (B) 상기 추가된 언어 설정창에서 선택된 제2 언어로 사용자 펑션/펑션블록에 프로그램이 작성되는 단계; (C) 테이블 생성부를 통해 상기 제1 언어와 제2 언어를 서로 매핑시키기 위한 매핑 테이블을 생성하는 단계; (D) 매핑 처리부를 통해 상기 생성된 매핑 테이블을 기반으로 PADT의 언어 설정창에 설정된 제2 언어로 프로그램에서 사용할 변수를 매핑하는 단계; 및 (E) 어셈블 변환부를 통해 상기 매핑 처리부에서 매핑된 변수를 기반으로 서로 다른 언어로 작성된 프로그램을 하나의 언어로 변환하는 단계를 포함할 수 있다.The memory mapping method for mixing a program language and a language defined by a manufacturer according to the present invention is: (A) A language setting window that supports a second language in a user function/function block of the first language is added to the PADT (Program And Debugging Tool). Step to do; (B) creating a program in the user function/function block in the second language selected in the added language setting window; (C) generating a mapping table for mapping the first language and the second language to each other through a table generator; (D) mapping a variable to be used in the program to a second language set in the language setting window of the PADT based on the generated mapping table through a mapping processor; And (E) converting programs written in different languages into one language based on the variables mapped by the mapping processor through the assemble conversion unit.
또한, 상기 제1 언어는 IEC 언어는 프로그램 언어로서, IEC61131-3에서 정의한 언어(LD(ladder Diagram), IL(Instruction List), ST(structured Text), FBD(Function Block Diagram)를 포함하고, 상기 제2 언어는 제조사에서 정의한 언어로서, MASTER-K제품 언어(MK 언어)를 포함할 수 있다.In addition, the first language is the IEC language is a programming language, and includes a language defined in IEC61131-3 (LD (ladder diagram), IL (Instruction List), ST (structured text), FBD (Function Block Diagram)), and the The second language is a language defined by a manufacturer and may include the MASTER-K product language (MK language).
또한, 상기 매핑 테이블은 사용자 펑션/펑션블록의 제2 언어에서 사용할 메모리, 구분, 크기, 타입, 메모리 시작 주소, 할당된 메모리 주소로 분류하여 생성할 수 있다.In addition, the mapping table may be generated by classifying the user function/function block into memory to be used in the second language, classification, size, type, memory start address, and allocated memory address.
또한, 상기 매핑 테이블의 생성은 상기 제1 언어 및 상기 제2 언어에서 사용되는 동일 메모리 이름을 재정의하는 단계; 상기 제1 언어 및 상기 제2 언어에서 사용되는 메모리를 블록 사이즈로 지정하여 1:1로 메모리 이름에 숫자를 증가시켜 매핑하는 단계; 상기 제1 언어 및 상기 제2 언어에서 사용되는 동일이름의 변수를 타입 별로 지정하는 단계를 포함할 수 있다.In addition, the generation of the mapping table may include redefining the same memory name used in the first language and the second language; Mapping the memory used in the first language and the second language as a block size and increasing the number to a memory name by 1:1; It may include the step of designating a variable of the same name used in the first language and the second language for each type.
또한, 상기 매핑 테이블은 제1 언어에서 사용자 펑션/펑션블록 사용 시 사용하던 변수 타입을 지정할 수 있다. In addition, the mapping table may designate a variable type used when a user function/function block is used in the first language.
또한, 상기 (E) 단계는 어셈블 변환부를 통해 상기 매핑된 변수를 기반으로 사용자 펑션/펑션블록에 작성한 제2 언어의 프로그램을 매핑 테이블을 이용하여 제1 언어에서 호출하여 변환할 수 있다.Further, in step (E), a program of the second language written in the user function/function block based on the mapped variable through the assemble conversion unit may be converted by calling the program in the first language using a mapping table.
또한, 상기 (E) 단계는 메모리 블록의 사이즈를 지정하여 1:1로 메모리 이름에 숫자를 증가시켜 매핑하는 단계; 동일이름의 변수를 타입 별로 지정하는 단계; 및 서로 다른 언어로 작성된 프로그램을 하나의 언어로 변환하는 단계를 포함할 수 있다.In addition, the step (E) may include specifying a size of a memory block and mapping a memory name by increasing a number of 1:1; Designating a variable of the same name for each type; And converting programs written in different languages into one language.
또한, 본 발명에 따른 프로그램 언어와 제조사에서 정의한 언어의 혼용을 위한 메모리 매핑 방법은 PADT(Program And Debugging Tool)에 제1 언어로 작성된 프로그램과 제2 언어로 작성된 프로그램을 입력받는 단계; 매핑 처리부를 통해 함수 형태의 사용자 펑션/펑션블록에 메모리 블록의 사이즈를 지정하여 1:1로 메모리 이름에 숫자를 증가시켜 매핑하고, 동일이름의 변수를 타입 별로 지정하는 단계; 어셈블 변환부를 통해, 사용자 펑션/펑션블록에 작성한 제2 언어의 프로그램을 제1 언어에서 호출하여 제1 언어의 프로그램으로 변환하는 단계; 및 상기 제1 언어로 작성된 프로그램과 함께, 상기 제1 언어로 변환된 프로그램을 함께 구현하여, IEC 프로젝트에서 유기적으로 동작하는 단계를 포함할 수 있다. In addition, the memory mapping method for mixing a program language and a language defined by a manufacturer according to the present invention includes the steps of receiving a program written in a first language and a program written in a second language into a PADT (Program And Debugging Tool); Assigning a size of a memory block to a function-type user function/function block through a mapping processing unit, mapping a number to a memory name by 1:1, and specifying a variable of the same name for each type; Calling the second language program written in the user function/function block from the first language through the assemble conversion unit and converting the second language program into a first language program; And implementing a program converted into the first language together with the program written in the first language, and operating organically in the IEC project.
본 발명에 따는 프로그램 언어와 제조사에서 정의한 언어의 혼용을 위한 메모리 매핑 방법은 각각 IEC 언어와 MK 언어를 사용자들이 공동으로 PLC 프로그램을 작성할 경우 언어에 구애 받지 않고 프로젝트를 수행할 수 있는 효과를 얻을 수 있다. The memory mapping method for mixing the programming language according to the present invention and the language defined by the manufacturer can obtain the effect of executing a project regardless of the language when users jointly create PLC programs in IEC and MK languages, respectively. have.
또한 현재 하나의 하드웨어(H/W)에 2개의 언어 지원을 위한 운영체제(O/S) 개발로 소요되는 시간과 경비를 절약할 수 있다.In addition, it is possible to save time and expenses by developing an operating system (O/S) for supporting two languages on one hardware (H/W).
상술한 효과와 더불어 본 발명의 구체적인 효과는 이하 발명을 실시하기 위한 구체적인 사항을 설명하면서 함께 기술한다. In addition to the above-described effects, specific effects of the present invention will be described together with explanation of specific matters for carrying out the present invention.
도 1은 사용자가 PADT(Program And Debugging Tool)을 이용하여 MK 언어로 작성한 프로그램의 실시예이다. 1 is an embodiment of a program written in MK language by a user using a PADT (Program And Debugging Tool).
도 2는 사용자가 PADT(Program And Debugging Tool)을 이용하여 IEC-61131-3 언어로 작성한 프로그램의 실시예이다.2 is an embodiment of a program written by a user in the IEC-61131-3 language using a PADT (Program And Debugging Tool).
도 3은 IEC 언어를 지원하는 PADT의 프로젝트 구조를 나타낸 실시예이다.3 is an embodiment showing the project structure of a PADT supporting the IEC language.
도 4는 도 3에서 사용자 펑션/펑션블록에서 사용할 변수를 지정하는 창을 나타낸 실시예이다.4 is an embodiment showing a window for designating a variable to be used in a user function/function block in FIG. 3.
도 5는 도 4에서 정의한 변수를 이용하여 사용자 펑션/펑션블록에서 ADD 명령을 구현한 프로그램의 실시예이다.5 is an embodiment of a program implementing an ADD instruction in a user function/function block by using the variable defined in FIG. 4.
도 6은 PLC용 프로그래밍 장치에서 PADT의 프로젝트 구조에서 사용자 펑션/펑션블록에서 사용할 변수를 지정하는 창을 나타낸 실시예이다.6 is an embodiment showing a window for designating a variable to be used in a user function/function block in the project structure of a PADT in a programming device for PLC.
도 7은 도 6에서 PLC용 프로그래밍 장치의 구성을 나타낸 블록도이다.7 is a block diagram showing the configuration of the programming device for PLC in FIG. 6.
도 8은 도 7의 테이블 생성부에서 생성된 IEC 언어에서 정의한 메모리와 MK 언어에서 사용하는 메몰 간의 매핑 테이블을 나타낸 도면이다.FIG. 8 is a diagram showing a mapping table between a memory defined in the IEC language generated by the table generator of FIG. 7 and a memory used in the MK language.
도 9는 사용자 펑션/펑션블록에 작성한 MK 언어의 프로그램을 IEC 언어에서 호출 하여 변환된 결과를 나타낸 실시예이다.9 is an embodiment showing the converted result by calling MK language program written in user function/function block from IEC language.
전술한 목적, 특징 및 장점은 첨부된 도면을 참조하여 상세하게 후술되며, 이에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 상세한 설명을 생략한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하기로 한다. 도면에서 동일한 참조부호는 동일 또는 유사한 구성요소를 가리키는 것으로 사용된다.The above-described objects, features, and advantages will be described later in detail with reference to the accompanying drawings, and accordingly, one of ordinary skill in the art to which the present invention pertains will be able to easily implement the technical idea of the present invention. In describing the present invention, if it is determined that a detailed description of known technologies related to the present invention may unnecessarily obscure the subject matter of the present invention, a detailed description will be omitted. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numerals are used to indicate the same or similar elements.
이하에서 어떤 구성요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 상기 구성요소들은 서로 직접적으로 연결되거나 또는 접속될 수 있지만, 각 구성요소 사이에 다른 구성요소가 "개재"되거나, 각 구성요소가 다른 구성요소를 통해 "연결", "결합" 또는 "접속"될 수도 있는 것으로 이해되어야 할 것이다.Hereinafter, when a component is described as being "connected", "coupled" or "connected" to another component, the components may be directly connected or connected to each other, but other components are "connected" between each component. It is to be understood that intervening" or each component may be "connected", "coupled" or "connected" through other components.
이하에서는, 본 발명의 몇몇 실시예에 따른 프로그램 언어와 제조사에서 정의한 언어의 혼용을 위한 메모리 매핑 방법을 설명하도록 한다. Hereinafter, a memory mapping method for mixing a programming language and a language defined by a manufacturer according to some embodiments of the present invention will be described.
도 6은 PLC용 프로그래밍 장치에서 PADT의 프로젝트 구조에서 사용자 펑션/펑션블록에서 사용할 변수를 지정하는 창을 나타낸 실시예이다. 그리고 도 7은 PLC용 프로그래밍 장치의 구성을 나타낸 블록도이고, 도 8은 도 7의 테이블 생성부에서 생성된 IEC 언어에서 정의한 메모리와 MK 언어에서 사용하는 메몰 간의 매핑 테이블을 나타낸 도면이다.6 is an embodiment showing a window for designating a variable to be used in a user function/function block in the project structure of a PADT in a programming device for PLC. 7 is a block diagram showing the configuration of a programming device for a PLC, and FIG. 8 is a diagram showing a mapping table between a memory defined in the IEC language generated by the table generator of FIG. 7 and a storage used in the MK language.
이때, PLC용 프로그래밍 장치는 도 7에서 도시하고 있는 것과 같이, 테이블 생성부(100), 매핑 처리부(200), 어셈블 변환부(300)를 포함할 수 있다. 그리고 PLC용 프로그래밍 장치는 키패드 및 모니터, 터치스크린 등과 같은 데이터 입출력을 위한 입출력부(미도시)를 더 포함할 수 있다.In this case, as illustrated in FIG. 7, the programming apparatus for PLC may include a table generation unit 100, a mapping processing unit 200, and an assemble conversion unit 300. Further, the programming device for PLC may further include an input/output unit (not shown) for input/output of data such as a keypad, a monitor, and a touch screen.
도 6에서 도시하고 있는 것과 같이, PLC용 프로그래밍 장치는 PADT(Program And Debugging Tool)에 IEC 언어의 사용자 펑션/펑션블록에서 MK(MASTER-K) 언어를 지원하는 언어 설정창을 추가한다. 이처럼, PLC용 프로그래밍 장치는 사용자로부터 PADT의 언어 설정창에 MK 언어가 선택되면 해당 펑션/펑션블록이 MK 언어로 작성될 것임을 확인한다.As shown in FIG. 6, the programming device for PLC adds a language setting window that supports MK (MASTER-K) language in the user function/function block of the IEC language to the PADT (Program And Debugging Tool). As such, the programming device for PLC confirms that the function/function block will be written in MK language when the user selects the MK language in the language setting window of the PADT.
이때, IEC 언어는 프로그램 언어로서, IEC61131-3에서 정의한 언어(LD(ladder Diagram), IL(Instruction List), ST(structured Text), FBD(Function Block Diagram)를 포함한다. 그리고 MK 언어는 제조사에서 정의한 언어(LS산전의 경우 MASTER-K제품)일 수 있다.At this time, the IEC language is a programming language, and includes the languages defined in IEC61131-3 (LD (ladder diagram), IL (Instruction List), ST (structured text), FBD (Function Block Diagram)), and MK language is from the manufacturer. It can be a defined language (MASTER-K product in case of LS Industrial Systems).
그리고 PLC용 프로그래밍 장치는 MK 언어와 IEC 언어를 서로 매핑 시키기 위한 테이블을 생성한다. 생성된 테이블을 이용하여, 기존의 IEC 언어에서 사용자 펑션/펑션블록 사용 시 사용하던 변수 타입을 MK 언어로 매핑할 수 있도록 할 수 있다.And the programming device for PLC creates a table to map MK language and IEC language to each other. Using the created table, it is possible to map the variable type used when using the user function/function block in the existing IEC language to the MK language.
테이블을 이용하여, MK 언어의 M0000~M0099를 지원하기 위해서는 테이블을 다음 표 1와 같이 변수 종류, 변수, 타입 및 메모리 할당 등으로 분류하여 1:1로 매핑하거나 어레이로 등록할 수 있다. To support M0000~M0099 of MK language using a table, the table can be classified into variable type, variable, type, and memory allocation as shown in Table 1 below, and mapped 1:1 or registered as an array.
변수 종류Variable type 변수variable 타입type 메모리 할당Memory allocation
VAR_GLOBALVAR_GLOBAL _M0000_M0000 WORDWORD %MW0%MW0
VAR_GLOBALVAR_GLOBAL _M0001_M0001 WORDWORD %MW1%MW1
그러나, 1:1 매핑은 많은 시간 소요와 수정이 용이하지 못한 단점이 있고, "VAR_GLOBAL/_M0000/ARRAV[0..99]/%MW0"와 같이 어레이로 지정할 경우 메모리에 직접 지정 방식인 MK 언어에서 사용이 불가능하다. 또한 타이머의 경우 동일한 변수명으로 타입별(현재값(Word), 설정값(Word), 상태값(bit))로 구분된 변수를 제공하여야 하나 사용자 펑션/펑션블록의 변수 타입 지정 방식으로는 하나의 이름에 여러 타입을 지정할 수 없다.However, 1:1 mapping takes a lot of time and is not easy to modify, and when designating as an array such as "VAR_GLOBAL/_M0000/ARRAV[0..99]/%MW0", MK language is a method that is directly assigned to memory. It cannot be used in In addition, in the case of a timer, a variable divided by type (current value (Word), set value (Word), status value (bit)) with the same variable name must be provided, but the variable type designation method of user function/function block is one. You cannot specify multiple types for the name of.
따라서, 본 발명은 다음 3가지 측면에서 제조사 언어를 지원할 수 있는 테이블을 도 7의 테이블 생성부(100)에서 생성할 수 있다. Accordingly, according to the present invention, a table capable of supporting a manufacturer's language in the following three aspects may be generated by the table generation unit 100 of FIG. 7.
첫째로, 동일 메모리 이름을 재정의하여 사용할 수 있도록 한다. 즉, 프로그램 언어와 제조사에서 정의한 언어는 메모리를 사용하는 방법(예, M0000(MK 언어)과 %MW0000(IEC 언어))에 차이가 있기 때문이다.First, redefine and use the same memory name. That is, it is because there is a difference between the programming language and the language defined by the manufacturer in how to use the memory (eg, M0000 (MK language) and %MW0000 (IEC language)).
따라서, %MW0000 메모리 이름을 M0000로 재정의할 수 있다면 IEC 언어에서 정의된 메모리 이름과 제조사에서 정의한 메모리 이름이 동일하여도 혼용이 가능하여 프로그래머에 따라 자신의 언어로 용도를 지정하여 사용할 수 있게 된다. Therefore, if the %MW0000 memory name can be redefined as M0000, even if the memory name defined in the IEC language and the memory name defined by the manufacturer are the same, they can be mixed, and the programmer can designate and use the purpose in their own language.
둘째로, 하나의 이름으로 비트/워드를 모두 쓸 수 있기 때문에 메모리를 배열로 지정하면 호환이 안되는 경우가 있다. 따라서 메모리 블록의 사이즈를 지정하여 1:1로 메모리 이름에 숫자를 증가시켜 매핑하는 기능을 지원한다.Second, since all bits/words can be written under one name, there are cases in which memory is not compatible with arrays. Therefore, it supports the function of specifying the size of the memory block and mapping it by increasing the number to the memory name 1:1.
셋째로, 동일이름의 변수를 타입 별로 지정할 수 있도록 하여 다양한 타입을 동일 이름으로 사용하는 프로그램 언어를 지원할 수 있게 한다. 즉, 프로그램 언어와 제조사에서 정의한 언어는 동일 이름으로 명령어를 사용하는 방법(예, ADD, DADD(MK 언어)와 ADD(IEC 언어))에 차이가 있기 때문이다.Third, it is possible to designate a variable with the same name for each type, so that it is possible to support programming languages that use various types with the same name. That is, because there is a difference between the programming language and the language defined by the manufacturer in how to use commands with the same name (eg, ADD, DADD (MK language) and ADD (IEC language)).
도 8은 도 7의 테이블 생성부에서 생성된 IEC 언어에서 정의한 메모리와 MK 언어에서 사용하는 메몰 간의 매핑 테이블을 나타낸 도면이다.FIG. 8 is a diagram showing a mapping table between a memory defined in the IEC language generated by the table generator of FIG. 7 and a memory used in the MK language.
이때, 매핑 테이블은 사용자 펑션/펑션블록의 제2 언어에서 사용할 메모리, 구분, 크기, 타입, 메모리 시작 주소, 할당된 메모리 주소로 분류하여 생성할 수 있다. 그리고 매핑 테이블은 메모리 구성 방식을 MK 언어와 동일하게 하기 위해 기존의 IEC 언어에서 사용자 펑션/펑션블록 사용 시 사용하던 변수 타입을 지정할 수 있도록 저장된다.In this case, the mapping table may be generated by classifying the memory to be used in the second language of the user function/function block, classification, size, type, memory start address, and allocated memory address. In addition, the mapping table is saved so that the variable type used when using the user function/function block in the existing IEC language can be designated in order to make the memory configuration method the same as the MK language.
매핑 처리부(200)는 프로그램 과정을 수행하는 부분으로, MK 언어로 선택된 제1 함수가 MK 언어로 프로그래밍할 수 있으며, 또한 IEC 언어로 선택된 제2 함수가 IEC 언어로 프로그래밍 할 수 있다.The mapping processing unit 200 is a part that performs a program process, and the first function selected in the MK language can be programmed in the MK language, and the second function selected in the IEC language can be programmed in the IEC language.
그리고 매핑 처리부(200)는 도 8에서 나타낸 매핑 테이블을 기반으로 PADT의 언어 설정창에 설정된 MK 언어로 프로그램에서 사용할 변수를 매핑한다. 도 8의 매핑 테이블이 지원되면 도 1에서 도시하고 있는 MK 언어로 작성된 프로그램을 수정 없이 IEC 언어로 적용할 수 있다. In addition, the mapping processing unit 200 maps the variables to be used in the program to the MK language set in the language setting window of the PADT based on the mapping table shown in FIG. 8. If the mapping table of FIG. 8 is supported, the program written in the MK language shown in FIG. 1 can be applied to the IEC language without modification.
즉, 사용자마다 사용하는 프로그램 언어가 달라 제1 사용자는 도 1에서 도시하고 있는 MK 언어로 프로그램을 작성하고, 제2 사용자는 도 2에서 도시하고 있는 IEC 언어로 프로그램을 작성하는 경우에도, 매핑 처리부(200)를 통해 MK 언어로 작성된 프로그램을 수정 없이 IEC 언어로 적용할 수 있게 된다.That is, even when the program language used for each user is different, the first user creates a program in the MK language shown in FIG. 1, and the second user writes a program in the IEC language shown in FIG. 2, the mapping processing unit Through (200), programs written in MK language can be applied in IEC language without modification.
이어서 어셈블 변환부(300)는 컴파일 과정을 수행하는 부분으로, 매핑 처리부(200)로부터 프로그래밍된 MK 언어 또는 IEC 언어를 각각 컴파일링시켜 기계어로 번역해 주며, 각각 번역된 기계어를 하나의 기계어로 통합시킨다.Subsequently, the assemble conversion unit 300 is a part that performs a compilation process, and compiles each MK language or IEC language programmed from the mapping processing unit 200 to translate into machine language, and integrates each translated machine language into one machine language. Let it.
즉, 어셈블 변환부(300)는 매핑 처리부(200)에서 매핑된 변수를 이용하여 메모리 블록의 사이즈를 지정하여 1:1로 메모리 이름에 숫자를 증가시켜 매핑한다. 그리고, 동일이름의 변수를 타입 별로 지정함으로써, 서로 다른 언어로 작성된 프로그램을 하나의 언어로 변환한다. 즉, 어셈블 변환부(300)는 사용자 펑션/펑션블록에 작성한 MK 언어의 프로그램을 매핑 테이블을 이용하여 IEC 언어에서 호출하여 변환한다.That is, the assemble conversion unit 300 designates the size of a memory block using a variable mapped by the mapping processing unit 200, and maps the memory name by increasing the number by 1:1. And, by designating a variable of the same name for each type, programs written in different languages are converted into one language. That is, the assemble conversion unit 300 calls and converts the MK language program written in the user function/function block from the IEC language using the mapping table.
이를 통해, 어셈블 변환부(300)는 사용자 펑션/펑션블록에 작성한 MK 언어의 프로그램이 IEC 언어에서 호출하여 유기적으로 동작할 수 있도록 변환한다.Through this, the assemble conversion unit 300 converts the program of the MK language written in the user function/function block to be called in the IEC language and operated organically.
도 9는 사용자 펑션/펑션블록에 작성한 MK 언어의 프로그램을 IEC 언어에서 호출 하여 변환된 결과를 나타낸 실시예이다.9 is an embodiment showing the converted result by calling MK language program written in user function/function block from IEC language.
도 9에서 도시하고 있는 것과 같이, PADT(Program And Debugging Tool)은 제1 사용자로부터 도 1에서 도시하고 있는 MK 언어로 작성된 프로그램과 제2 사용자는 도 2에서 도시하고 있는 IEC 언어로 작성된 프로그램을 입력 받는다.As shown in Fig. 9, the PADT (Program And Debugging Tool) inputs a program written in the MK language shown in Fig. 1 from the first user and the second user inputs a program written in the IEC language shown in Fig. 2 Receive.
이후, 매핑 처리부(200)를 통해 함수 형태의 사용자 펑션/펑션 블록에 메모리 블록의 사이즈를 지정하여 1:1로 메모리 이름에 숫자를 증가시켜 매핑하고, 동일이름의 변수를 타입 별로 지정한다.Thereafter, the size of the memory block is designated to the user function/function block in the form of a function through the mapping processing unit 200, and mapped by increasing the number to the memory name by 1:1, and a variable of the same name is designated for each type.
그리고 어셈블 변환부(300)를 통해, 사용자 펑션/펑션블록에 작성한 MK 언어의 프로그램을 IEC 언어에서 호출하여 IEC 언어의 프로그램(301)으로 변환한다.In addition, through the assemble conversion unit 300, the MK language program written in the user function/function block is called from the IEC language and converted into the IEC language program 301.
그리고 PADT(Program And Debugging Tool)은 도 2의 IEC 언어로 작성된 프로그램과 함께, 어셈블 변환부(300)에서 IEC 언어로 변환된 프로그램(301)을 함께 구현하여, IEC 프로젝트에서 유기적으로 동작할 수 있도록 한다.In addition, the PADT (Program And Debugging Tool) implements the program 301 converted to the IEC language in the assemble conversion unit 300 together with the program written in the IEC language of FIG. 2 so that it can be operated organically in the IEC project. do.
이에 따라, PADT(Program And Debugging Tool)은 각각 IEC 언어와 MK 언어를 사용자들이 공동으로 PLC 프로그램을 작성할 경우 언어에 구애 받지 않고 프로젝트를 수행할 수 있게 된다.Accordingly, PADT (Program And Debugging Tool) can perform a project regardless of language when users jointly create PLC programs in IEC language and MK language, respectively.
이상과 같이 본 발명에 대해서 예시한 도면을 참조로 하여 설명하였으나, 본 명세서에 개시된 실시 예와 도면에 의해 본 발명이 한정되는 것은 아니며, 본 발명의 기술사상의 범위 내에서 통상의 기술자에 의해 다양한 변형이 이루어질 수 있음은 자명하다. 아울러 앞서 본 발명의 실시 예를 설명하면서 본 발명의 구성에 따른 작용 효과를 명시적으로 기재하여 설명하지 않았을 지라도, 해당 구성에 의해 예측 가능한 효과 또한 인정되어야 함은 당연하다.As described above with reference to the drawings illustrated for the present invention, the present invention is not limited by the embodiments and drawings disclosed in the present specification, and various by a person skilled in the art within the scope of the technical idea of the present invention. It is obvious that transformation can be made. In addition, even if not explicitly described and described the effects of the configuration of the present invention while describing the embodiments of the present invention, it is natural that the predictable effects of the configuration should also be recognized.

Claims (8)

  1. (A) PADT(Program And Debugging Tool)에 제1 언어의 사용자 펑션/펑션블록에서 제2 언어를 지원하는 언어 설정창을 추가하는 단계;(A) adding a language setting window supporting a second language in a user function/function block of the first language to a PADT (Program And Debugging Tool);
    (B) 상기 추가된 언어 설정창에서 선택된 제2 언어로 사용자 펑션/펑션블록에 프로그램이 작성되는 단계;(B) creating a program in the user function/function block in the second language selected in the added language setting window;
    (C) 테이블 생성부를 통해 상기 제1 언어와 제2 언어를 서로 매핑시키기 위한 매핑 테이블을 생성하는 단계;(C) generating a mapping table for mapping the first language and the second language to each other through a table generator;
    (D) 매핑 처리부를 통해 상기 생성된 매핑 테이블을 기반으로 PADT의 언어 설정창에 설정된 제2 언어로 프로그램에서 사용할 변수를 매핑하는 단계; 및(D) mapping a variable to be used in the program to a second language set in the language setting window of the PADT based on the generated mapping table through a mapping processor; And
    (E) 어셈블 변환부를 통해 상기 매핑 처리부에서 매핑된 변수를 기반으로 서로 다른 언어로 작성된 프로그램을 하나의 언어로 변환하는 단계를 포함하는 메모리 매핑 방법.(E) converting programs written in different languages into one language based on variables mapped by the mapping processing unit through an assemble conversion unit.
  2. 제1 항에 있어서,The method of claim 1,
    상기 제1 언어는 IEC 언어는 프로그램 언어로서, IEC61131-3에서 정의한 언어(LD(ladder Diagram), IL(Instruction List), ST(structured Text), FBD(Function Block Diagram)를 포함하고,In the first language, the IEC language is a programming language, and includes a language defined in IEC61131-3 (LD (ladder diagram), IL (Instruction List), ST (structured text), FBD (Function Block Diagram)),
    상기 제2 언어는 제조사에서 정의한 언어로서, MASTER-K제품 언어(MK 언어)를 포함하는 메모리 매핑 방법.The second language is a language defined by a manufacturer, and a memory mapping method including a MASTER-K product language (MK language).
  3. 제1 항에 있어서,The method of claim 1,
    상기 매핑 테이블은 사용자 펑션/펑션블록의 제2 언어에서 사용할 메모리, 구분, 크기, 타입, 메모리 시작 주소, 할당된 메모리 주소로 분류하여 생성하는 메모리 매핑 방법.The mapping table is generated by classifying the memory to be used in the second language of the user function/function block, classification, size, type, memory start address, and allocated memory address.
  4. 제3 항에 있어서,The method of claim 3,
    상기 매핑 테이블의 생성은The creation of the mapping table
    상기 제1 언어 및 상기 제2 언어에서 사용되는 동일 메모리 이름을 재정의하는 단계;Redefining the same memory name used in the first language and the second language;
    상기 제1 언어 및 상기 제2 언어에서 사용되는 메모리를 블록 사이즈로 지정하여 1:1로 메모리 이름에 숫자를 증가시켜 매핑하는 단계;Mapping the memory used in the first language and the second language as a block size and increasing the number to a memory name by 1:1;
    상기 제1 언어 및 상기 제2 언어에서 사용되는 동일이름의 변수를 타입 별로 지정하는 단계를 포함하는 메모리 매핑 방법.And designating a variable of the same name used in the first language and the second language for each type.
  5. 제4 항에 있어서,The method of claim 4,
    상기 매핑 테이블은 제1 언어에서 사용자 펑션/펑션블록 사용 시 사용하던 변수 타입을 지정하는 메모리 매핑 방법.The mapping table is a memory mapping method for designating a variable type used when a user function/function block is used in a first language.
  6. 제1 항에 있어서, The method of claim 1,
    상기 (E) 단계는 Step (E)
    어셈블 변환부를 통해 상기 매핑된 변수를 기반으로 사용자 펑션/펑션블록에 작성한 제2 언어의 프로그램을 매핑 테이블을 이용하여 제1 언어에서 호출하여 변환하는 메모리 매핑 방법.A memory mapping method in which a program of a second language written in a user function/function block is called and converted from a first language using a mapping table based on the mapped variable through an assemble conversion unit.
  7. 제1 항에 있어서,The method of claim 1,
    상기 (E) 단계는 Step (E)
    메모리 블록의 사이즈를 지정하여 1:1로 메모리 이름에 숫자를 증가시켜 매핑하는 단계;Specifying a size of a memory block and mapping a memory name by increasing a number of 1:1;
    동일이름의 변수를 타입 별로 지정하는 단계; 및Designating a variable of the same name for each type; And
    서로 다른 언어로 작성된 프로그램을 하나의 언어로 변환하는 단계를 포함하는 메모리 매핑 방법.A memory mapping method comprising converting programs written in different languages into one language.
  8. PADT(Program And Debugging Tool)에 제1 언어로 작성된 프로그램과 제2 언어로 작성된 프로그램을 입력받는 단계;Receiving a program written in a first language and a program written in a second language into a PADT (Program And Debugging Tool);
    매핑 처리부를 통해 함수 형태의 사용자 펑션/펑션블록에 메모리 블록의 사이즈를 지정하여 1:1로 메모리 이름에 숫자를 증가시켜 매핑하고, 동일이름의 변수를 타입 별로 지정하는 단계;Assigning a size of a memory block to a function-type user function/function block through a mapping processing unit, mapping a number to a memory name by 1:1, and specifying a variable of the same name for each type;
    어셈블 변환부를 통해, 사용자 펑션/펑션블록에 작성한 제2 언어의 프로그램을 제1 언어에서 호출하여 제1 언어의 프로그램으로 변환하는 단계; 및Calling the second language program written in the user function/function block from the first language through the assemble conversion unit and converting the program into the first language program; And
    상기 제1 언어로 작성된 프로그램과 함께, 상기 제1 언어로 변환된 프로그램을 함께 구현하여, IEC 프로젝트에서 유기적으로 동작하는 단계를 포함하는 메모리 매핑 방법.And implementing a program converted into the first language together with the program written in the first language, and operating organically in the IEC project.
PCT/KR2019/012078 2019-03-25 2019-09-18 Memory mapping method for mixing programming language and language defined by manufacturer WO2020197011A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201980094633.4A CN113632016A (en) 2019-03-25 2019-09-18 Memory mapping method for mixed use of programming language and manufacturer defined language

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020190033539A KR102268795B1 (en) 2019-03-25 2019-03-25 A Method of Memory Mapping for Mixing Programming Language and Manufacturer-defined Language
KR10-2019-0033539 2019-03-25

Publications (1)

Publication Number Publication Date
WO2020197011A1 true WO2020197011A1 (en) 2020-10-01

Family

ID=72610631

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/012078 WO2020197011A1 (en) 2019-03-25 2019-09-18 Memory mapping method for mixing programming language and language defined by manufacturer

Country Status (3)

Country Link
KR (1) KR102268795B1 (en)
CN (1) CN113632016A (en)
WO (1) WO2020197011A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116775038A (en) * 2023-06-26 2023-09-19 国电南京自动化股份有限公司 Runtime system supporting simultaneous or independent operation of IEC and C++ tasks

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091671A1 (en) * 2003-10-24 2005-04-28 Microsoft Corporation Programming interface for a computer platform
KR100976324B1 (en) * 2008-05-22 2010-08-16 엘에스산전 주식회사 Method for writing program of Programmable Logic Controller using Programmable And Debugging Tool
JP5867540B2 (en) * 2013-04-26 2016-02-24 キヤノンマーケティングジャパン株式会社 PROGRAM GENERATION DEVICE, PROGRAM GENERATION DEVICE CONTROL METHOD, AND PROGRAM
KR101734306B1 (en) * 2016-02-24 2017-05-18 주식회사 핀인사이트 Multi program code automatic developing system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8694959B2 (en) * 2008-09-30 2014-04-08 Ics Triplex Isagraf Inc. Multi language editor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091671A1 (en) * 2003-10-24 2005-04-28 Microsoft Corporation Programming interface for a computer platform
KR100976324B1 (en) * 2008-05-22 2010-08-16 엘에스산전 주식회사 Method for writing program of Programmable Logic Controller using Programmable And Debugging Tool
JP5867540B2 (en) * 2013-04-26 2016-02-24 キヤノンマーケティングジャパン株式会社 PROGRAM GENERATION DEVICE, PROGRAM GENERATION DEVICE CONTROL METHOD, AND PROGRAM
KR101734306B1 (en) * 2016-02-24 2017-05-18 주식회사 핀인사이트 Multi program code automatic developing system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Programmable Logic Controlle r", XGB STANDARD/ECONOMIC TYPE MAIN UNIT (IEC), 31 December 2017 (2017-12-31), Retrieved from the Internet <URL:http://commandcontrol.ir/wp-content/uploads/2017/12> [retrieved on 20191227] *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116775038A (en) * 2023-06-26 2023-09-19 国电南京自动化股份有限公司 Runtime system supporting simultaneous or independent operation of IEC and C++ tasks

Also Published As

Publication number Publication date
CN113632016A (en) 2021-11-09
KR102268795B1 (en) 2021-06-23
KR20200113405A (en) 2020-10-07

Similar Documents

Publication Publication Date Title
CN110663222B (en) Processing process data
WO2020197011A1 (en) Memory mapping method for mixing programming language and language defined by manufacturer
DE69333479D1 (en) Hierarchical connection method and device
CN103760810A (en) Remote measuring terminal controller
WO2019194369A1 (en) Apparatus for testing intelligent electronic device and method for testing intelligent electronic device by using same
WO2022114423A1 (en) Plc for providing space-efficient input/output interface
WO2016017943A1 (en) Master pattern generation method and apparatus for determining normal operation of automated process
CN203909545U (en) Remote telemetering terminal controller
CN209086709U (en) The happy high platform of industry
WO2022114612A1 (en) Gateway device for heterogeneous communication protocol data communication and method for setting same
WO2020071639A1 (en) Program development system and development method using same
WO2021149948A1 (en) Method for setting parameters of plc system
WO2021125452A1 (en) Plc analog module comprising hart pass-through interface
JP2016110220A (en) Programmable logic controller and control method therefor
Ma et al. Study of PLC communication technology based on profibus-DP
RU2749103C1 (en) Industrial programmable controller
WO2021182785A1 (en) Method for preventing device interference between plc program blocks
CN114401306B (en) Remote collaborative embedded development system and method
CN104238383A (en) Control system and method for controlling control system
JP3497423B2 (en) Display device for control, control system, and recording medium on which program is recorded
CN110278146B (en) Data conversion method for upper control system and remote equipment
RU198149U1 (en) CPU industrial programmable controller
JPH04359324A (en) Computer system
Kaftan PLC Basic Course with SIMATIC S7
WO2023090608A1 (en) Battery management apparatus and communication method therefor in battery rack system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19921867

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19921867

Country of ref document: EP

Kind code of ref document: A1