KR20160141938A - Method for driving scan program using plc - Google Patents

Method for driving scan program using plc Download PDF

Info

Publication number
KR20160141938A
KR20160141938A KR1020150077580A KR20150077580A KR20160141938A KR 20160141938 A KR20160141938 A KR 20160141938A KR 1020150077580 A KR1020150077580 A KR 1020150077580A KR 20150077580 A KR20150077580 A KR 20150077580A KR 20160141938 A KR20160141938 A KR 20160141938A
Authority
KR
South Korea
Prior art keywords
input
program
output refresh
scan
execution
Prior art date
Application number
KR1020150077580A
Other languages
Korean (ko)
Other versions
KR102259094B1 (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 KR1020150077580A priority Critical patent/KR102259094B1/en
Publication of KR20160141938A publication Critical patent/KR20160141938A/en
Application granted granted Critical
Publication of KR102259094B1 publication Critical patent/KR102259094B1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Abstract

The present invention relates to a method for driving a scan program for a programmable logic controller (PLC), and more specifically, to a method for driving a scan program for a PLC, wherein the scan program enables at least one time of an input/output refresh operation in a process of executing a calculation program for a part of programs needed in a process for driving a scan program for a PLC. In the method for driving a scan program for a PLC according to an embodiment of the present invention, each scan program is operated by executing a calculation program and an OS program in order, and multiple scan programs are executed in order. The method for driving a scan program for a PLC according to an embodiment of the present invention comprises: an input/output refresh setting step of setting an input/output refresh command to execute at least one time of an input/output refresh operation in a process of executing a calculation program for the at least one scan program; and an input/output refresh execution step of executing an input/output refresh operation in the middle of executing the calculation program of the scan program corresponding to the input/output refresh command set via the input/output refresh setting step. According to the present invention a more efficient PLC system can be realized.

Description

PLC용 스캔 프로그램의 구동 방법{METHOD FOR DRIVING SCAN PROGRAM USING PLC}METHOD FOR DRIVING SCAN PROGRAM USING PLC [0002]

본 발명은 PLC(Programmable Logic Controller)용 스캔 프로그램의 구동 방법에 관한 것으로, 보다 상세하게는, PLC용 스캔 프로그램의 구동 과정에 있어 필요한 일부 프로그램에 대해 연산 프로그램의 수행 과정 중 1회 이상의 입출력 리프레시(refresh) 동작이 수행 가능하도록 하는 PLC용 스캔 프로그램의 구동 방법에 관한 것이다.
The present invention relates to a method of driving a scan program for a programmable logic controller (PLC), and more particularly, to a method of operating a scan program for a programmable logic controller refresh operation of the PLC is enabled to be performed.

PLC(Programmable Logic Controller)는 다양한 기능의 모듈들이 모여 유기적으로 시스템을 구성하고, 사용 목적에 따라 소규모 공장에서부터 대규모 플랜트까지 각종 제어기기들을 총괄 관리하는 핵심 제품이다. PLC를 구성하는 각각의 모듈들은 CPU에 의해 제어되는데, 이와 같은 CPU는 모듈 제어 기능 이외에 각종 연산 프로그램(사용자 프로그램)의 관리 및 시스템 진단 등과 같은 주요 기능들을 담당한다. 이 가운데 연산 프로그램의 관리 기능은, 사용자 등에 의해 작성된 다양한 펑션(function, 명령어)들로 작성된 연산 프로그램의 연산 결과를 바탕으로 관련 모듈들과의 데이터 입출력을 제어하는 등의 과정에 의해 이루어진다.PLC (Programmable Logic Controller) is a core product that collectively manages various control devices from small scale plant to large scale plant according to purpose of use by organizing system with various function modules gathered. Each of the modules constituting the PLC is controlled by a CPU. In addition to the module control function, such a CPU takes charge of main functions such as management of various operation programs (user programs) and system diagnosis. Among them, the management function of the operation program is performed by controlling data input / output with the related modules based on the operation result of the operation program created by various functions (commands) created by the user or the like.

이를 좀 더 상세히 설명하면, 일반적인 PLC 시스템에서 CPU가 시스템을 1회 제어하는 구성의 단위를 통상 스캔(scan)이라 하며, CPU에 의한 시스템의 제어 과정에서 수행되는 여러 프로그램들 각각을 스캔 프로그램이라 한다. 각각의 스캔 프로그램은, 다시 사용자에 의해 설정된 프로그램이 수행되는 연산 프로그램 수행 부분과 CPU 본연의 기능이 수행되는 OS 프로그램 수행 부분으로 이루어진다. 연산 프로그램 수행 부분은 사용자 등에 의해 설정됨으로써 프로그램 본연의 목적에 맞게 다양한 펑션을 통해 사칙연산이나 논리연산 등과 같은 연산이 이루어지도록 하는 영역이며, OS 프로그램 수행 부분은 CPU에 의해 모듈 제어, 연산 프로그램의 관리 및 시스템 진단 등의 기능 수행이 이루어지는 영역이다.To describe this in more detail, a unit of a configuration in which a CPU controls a system once in a general PLC system is referred to as a normal scan, and each of a plurality of programs executed in a process of controlling the system by a CPU is referred to as a scan program . Each of the scan programs includes an operation program execution portion in which the program set by the user is again executed and an OS program execution portion in which the function of the CPU is performed. The operation program execution part is set by a user or the like so that operations such as arithmetic operation and logical operation are performed through various functions according to the purpose of the program itself. The OS program execution part is controlled by the CPU, And system diagnosis are performed.

각각의 연산 프로그램 수행에 따른 연산의 결과로 가공된 데이터는, OS 프로그램 수행 부분을 통해 이루어지는 연산 프로그램의 관리 기능에 의해 각각의 해당 모듈들로 전달되고(출력), 아울러 타 모듈들에서 새로 업데이트 된 관련 데이터가 존재한다면 이러한 데이터들을 가져오기도(입력) 하는데, 이와 같은 기능을 흔히 입출력 리프레시(refresh) 기능이라 부른다.The data processed as a result of the arithmetic operation performed by each arithmetic program is transferred (output) to each of the corresponding modules by the management function of the arithmetic program executed through the OS program executing section, This function is often referred to as an input / output refresh function.

그런데 이와 같은 통상의 스캔 프로그램은, 프로그램이 1회 수행되는 동안 OS 프로그램 수행 부분에서 오직 1회의 입출력 리프레시 작업만이 이루어지도록 설정됨으로써, 비효율적인 데이터의 입출력 동작으로 인한 시스템의 비효율적 작동이 빈번히 발생된다는 문제점이 있다. 다시 말해, 연산 프로그램의 수행 결과, OS 프로그램 수행 시 이루어지는 단 1회의 입출력 리프레시 과정에서 처리되기 어려운 용량의 데이터가 발생되는 등의 경우, 복수의 스캔 프로그램이 순차적으로 처리되어지는 PLC 시스템의 특성상 모든 스캔 프로그램들에 대한 처리가 이루어진 후에야 비로소 나머지 데이터에 대한 입출력 작업이 다시 수행될 수밖에 없게 된다. However, such a normal scan program is set such that only one input / output refresh operation is performed in the OS program executing part during one execution of the program, thereby causing inefficient operation of the system due to inefficient data input / output operations There is a problem. In other words, in the case where data of a capacity that is difficult to process in a single input / output refresh process performed during execution of an OS program is generated as a result of execution of an operation program, due to the characteristics of a PLC system in which a plurality of scan programs are sequentially processed, The input / output operations for the remaining data can not be performed again until the processing for the programs is completed.

이는 그 자체로도 프로그램의 지연 처리와 같은 문제를 발생시키지만, 해당 데이터의 입출력 데이터를 이용해 다시 연산을 수행해야만 하는 타 스캔 프로그램들에게까지 처리 지연의 영향이 미친다는 점을 생각하거나, 나아가, 2회의 입출력 리프레시 작업으로도 모든 데이터의 처리가 불가능해 수차례의 입출력 작업이 요구되는 경우까지 감안한다면, 1회의 스캔 프로그램 수행 기간 동안 오직 1회의 입출력 리프레시 작업만이 가능할 수 있도록 강제되어지는 통상의 스캔 프로그램의 구조가 상당히 비효율적임을 쉽게 파악할 수 있다.Although this causes problems such as delay processing of the program itself, it is thought that the processing delay is influenced by the processing delay to other scan programs which must perform the operation again using the input / output data of the data, It is impossible to process all the data even when the I / O refresh operation for the I / O is not performed. Therefore, if the I / O operation is required several times, the normal scan, which is forced to perform only one I / O refresh operation during one scan program execution period It is easy to see that the structure of the program is quite inefficient.

따라서, 본 발명에서는 입출력 리프레시 기능이 개선된 스캔 프로그램의 구동을 통해, 결과적으로, 보다 효율적인 PLC 시스템을 구현하기 위한 방안을 제시하고자 한다.
Accordingly, the present invention proposes a scheme for implementing a more efficient PLC system through driving of a scan program having an improved input / output refresh function.

본 발명은 전술한 문제점을 해결하기 위하여 안출된 것으로, PLC용 스캔 프로그램의 구동 과정에 있어 필요한 일부 프로그램에 대해 연산 프로그램의 수행 과정 중 1회 이상의 입출력 리프레시 동작이 수행 가능하도록 하는 PLC용 스캔 프로그램의 구동 방법을 제공하는 것을 목적으로 한다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and it is an object of the present invention to provide a scan program for a PLC which enables one or more input / output refresh operations during execution of an operation program for some programs required for driving a scan program for PLC And a method of driving the same.

본 발명의 목적은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.
The objects of the present invention are not limited to the above-mentioned objects, and other objects and advantages of the present invention which are not mentioned can be understood by the following description and more clearly understood by the embodiments of the present invention. It will also be readily apparent that the objects and advantages of the invention may be realized and attained by means of the instrumentalities and combinations particularly pointed out in the appended claims.

상기한 목적을 달성하기 위한 본 발명의 PLC용 스캔 프로그램의 구동 방법은, 각각의 스캔 프로그램은 연산 프로그램 및 OS 프로그램의 순차적 수행에 의해 구성되고, 복수의 상기 스캔 프로그램이 순차적으로 수행되도록 구성되는 PLC용 스캔 프로그램의 구동 방법에 있어서, 적어도 1 이상의 상기 스캔 프로그램에 대해 연산 프로그램의 수행 중 1회 이상의 입출력 리프레시 동작이 수행되도록 입출력 리프레시 명령이 설정되는 입출력 리프레시 설정 단계 및 상기 입출력 리프레시 설정 단계를 통해 설정된 입출력 리프레시 명령에 대응되도록 상기 스캔 프로그램의 연산 프로그램 수행 중간에 입출력 리프레시 동작이 수행되는 입출력 리프레시 수행 단계를 포함하여 구성될 수 있다.According to an aspect of the present invention, there is provided a method of driving a scan program for a PLC, the method comprising: sequentially executing a plurality of scan programs; Output refresh setting step in which an input / output refresh command is set so that at least one input / output refresh operation is performed during execution of an operation program for at least one of the scan programs; and an input / output refresh setting step set through the input / output refresh setting step And an input / output refresh operation in which an input / output refresh operation is performed during execution of an operation program of the scan program so as to correspond to an input / output refresh command.

이때, 상기 입출력 리프레시 설정 단계를 통해 선택되는 상기 적어도 1 이상의 스캔 프로그램은, 베이스 번호 및 슬롯 번호를 포함하는 파라미터(parameter)의 입력에 의해 특정되도록 구성될 수 있다.At this time, the at least one scan program selected through the input / output refresh setting step may be specified by inputting a parameter including a base number and a slot number.

여기서, 상기 입출력 리프레시 설정 단계를 통해 설정되는 입출력 리프레시 명령은, 상기 연산 프로그램의 수행 중간에 이루어지는 상기 입출력 리프레시 명령의 수행 시점(時點)에 대한 정보를 포함할 수 있으며, 이 경우, 상기 입출력 리프레시 명령의 수행 시점 정보는, 해당 연산 프로그램의 동작 개시로부터의 경과 시간, 또는 해당 연산 프로그램에 포함된 서브(sub) 프로그램과의 상호 대응 관계를 기준으로 설정되는 것이 바람직할 수 있다.The input / output refresh command set through the input / output refresh setting step may include information on the execution time point of the input / output refresh command in the middle of execution of the operation program. In this case, The execution time information of the operation program may be set based on the elapsed time from the start of the operation of the operation program or the mutual correspondence relationship with the sub program included in the operation program.

혹은, 상기 입출력 리프레시 수행 단계를 통해 수행되는 입출력 리프레시 동작은, 상기 입출력 리프레시 설정 단계를 통해 설정된 해당 연산 프로그램 내에서의 입출력 리프레시 동작 횟수(回數) 정보에 대응되도록 해당 연산 프로그램의 수행 시간을 균분(均分)한 시점에 이루어지도록 구성되는 것도 가능하다.
Alternatively, the input / output refresh operation performed through the input / output refresh execution step may be performed in such a manner that the execution time of the operation program is adjusted to correspond to the input / output refresh operation count information in the operation program set through the input / (Equal to) a time point.

전술한 바와 같은 본 발명의 PLC용 스캔 프로그램의 구동 방법에 의하면, 필요에 따라 스캔 프로그램의 연산 프로그램 수행 중간에 입출력 리프레시 작업의 수행이 이루어질 수 있도록 설정 가능하게 됨으로써, 대규모 데이터의 입출력을 위해 전체 시스템의 동작이 지연되는 등과 같은 PLC 시스템의 구조적 문제를 해결할 수 있게 되어, 결과적으로 보다 효율적인 PLC 시스템의 구현이 가능하게 되었다는 등의 장점이 있다.
According to the driving method for the PLC scan program of the present invention as described above, it is possible to set the input / output refresh operation to be performed during the execution of the operation program of the scan program, if necessary, It is possible to solve the structural problem of the PLC system such as the delay of the operation of the PLC system. As a result, it is possible to realize a more efficient PLC system.

도 1 내지 도 3은 통상의 PLC 시스템에 구비되는 스캔 프로그램의 개념적 구성을 나타낸 설명도이다.
도 4는 본 발명의 일 실시예에 따른 PLC용 스캔 프로그램의 구동 방법을 설명하기 위한 순서도이다.
도 5 및 도 6은 도 4에 적용되는 스캔 프로그램의 개념적 구성을 나타낸 설명도이다.
도 7은 도 6에 적용되는 입출력 리프레시 파라미터를 설명하기 위한 구성 일예시도이다.
도 8은 도 7에 따른 입출력 리프레시 동작 순서를 나타낸 설명도이다.
1 to 3 are explanatory diagrams showing a conceptual configuration of a scan program provided in a normal PLC system.
4 is a flowchart illustrating a method of driving a scan program for a PLC according to an embodiment of the present invention.
FIGS. 5 and 6 are explanatory views showing a conceptual configuration of a scan program applied to FIG.
7 is an exemplary diagram for illustrating input / output refresh parameters applied to FIG.
8 is an explanatory diagram showing the procedure of the input / output refresh operation according to FIG.

전술한 목적, 특징 및 장점은 첨부된 도면을 참조하여 상세하게 후술되며, 이에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 상세한 설명을 생략한다. The above and other objects, features, and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings, which are not intended to limit the scope of the present invention. In the following description, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail.

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하기로 한다. 도면에서 동일한 참조부호는 동일 또는 유사한 구성요소를 가리키는 것으로 사용된다.
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 denote the same or similar elements.

도 1 내지 도 3은 통상의 PLC 시스템에 구비되는 스캔 프로그램의 개념적 구성을 나타낸 설명도이다.1 to 3 are explanatory diagrams showing a conceptual configuration of a scan program provided in a normal PLC system.

먼저 도 1을 참조하면, 통상의 PLC 시스템에 구비되는 스캔 프로그램(110)은 연산 프로그램(120) 및 OS 프로그램(130)으로 구성됨을 확인할 수 있다. First, referring to FIG. 1, it can be seen that a scan program 110 included in a normal PLC system is composed of an operation program 120 and an OS program 130.

연산 프로그램(120)은 특별한 목적에 따라 사용자 등에 의해 설정된 펑션들의 조합으로 이루어질 수 있으며 사칙 연산, 논리 연산 또는 BCD 연산 등을 수행하게 되고, OS 프로그램(130)은 모듈 제어, 연산 프로그램의 관리 및 시스템 진단 등과 같은 기능을 수행하게 된다.The operation program 120 may be a combination of functions set by a user or the like according to a specific purpose and may perform a four-ary operation, a logical operation, or a BCD operation, and the OS program 130 may perform a module control, Diagnosis, and the like.

도 2에 시간 도메인을 기준으로 도 1과 같은 스캔 프로그램이 실제 수행되는 상태를 나타내었다. 도 2를 참조하면, PLC 시스템을 구성하는 각각의 스캔 프로그램들(110)은 순차적으로 수행이 이루어지게 됨을 확인할 수 있는데, 즉, 스캔 프로그램1(110)의 연산 프로그램(120) 및 OS 프로그램(130)이 차례대로 수행되고 나면, 바로 이어서 스캔 프로그램2의 연산 프로그램 및 OS 프로그램의 수행이 이루어지며, 이와 같이 스캔 프로그램n까지의 수행이 모두 마무리되면 다시 스캔 프로그램1부터 순차적인 프로그램의 동작 수행이 시작된다. FIG. 2 shows a state in which the scan program shown in FIG. 1 is actually performed based on the time domain. Referring to FIG. 2, it can be seen that each of the scan programs 110 constituting the PLC system is sequentially executed. That is, the operation program 120 of the scan program 110 and the OS program 130 ), The operation program and the OS program of the scan program 2 are executed immediately. When the execution of the scan program n is completed, the operation of the sequential program starts again from the scan program 1 do.

이때, 입출력 리프레시(R) 기능은 각 스캔 프로그램 마다 OS 프로그램(130)의 수행 중간에 1회 발생됨을 확인할 수 있다. 즉, 연산 프로그램(120)의 수행 결과 생성된 데이터에 대해 이와 같은 1회의 입출력 리프레시(R) 동작을 통해서만, 각 모듈들에 업데이트 된 데이터를 내보내거나(출력) 각 모듈들로부터 필요한 업데이트 데이터를 가져오게(입력) 된다. At this time, it can be confirmed that the input / output refresh (R) function occurs once in the middle of the execution of the OS program 130 for each scan program. That is, only the input / output refresh (R) operation is performed on the data generated as a result of the operation program 120, the updated data is output to each module (output), and necessary update data is retrieved from each module (Input).

따라서, 연산 프로그램의 수행 결과로 생성된 데이터의 용량 초과 등으로 인해 1회의 입출력 리프레시(R) 과정에서 모듈들로부터 즉각적으로 데이터를 가져오지 못하거나, 반대로 연산 결과를 각각의 모듈들에게 즉각적으로 반영하지 못하게 되는 경우, n번째 스캔 프로그램(스캔 프로그램n)까지의 수행이 모두 완료된 다음 다시 돌아오는 차례에 비로소 해당 작업을 마무리할 수 있어, 결과적으로 1 스캔의 지연이 발생될 수밖에 없다.Therefore, it is impossible to immediately fetch data from the modules in one input / output refresh (R) process due to exceeding the capacity of data generated as a result of execution of the operation program, or conversely, the operation result is instantly reflected It is possible to complete the operation until the nth scan program (scan program n) is completed and then the operation is completed again, resulting in a delay of one scan.

도 3은 각각의 스캔 프로그램 실행 순서를 설명하기 위한 개념도로써, 도 3에는 8베이스(base) × 12슬롯(slot)의 구성을 갖는 PLC 시스템을 나타내었다. 도3에 도시된 바와 같이, PLC 시스템은 베이스와 슬롯의 위치를 통해 일 스캔 프로그램의 수행이 이루어지는 해당 모듈을 특정할 수 있다. 또한, 이와 같은 다수의 모듈들에 대한 동작의 진행은, 우선 베이스 순서(① 행방향)에 따라 이루어지고 동일 베이스 내에서 슬롯의 순서(② 열방향)대로 이루어짐을 확인할 수 있다.FIG. 3 is a conceptual diagram for explaining the execution procedure of each scan program, and FIG. 3 shows a PLC system having a configuration of 8 base (base) × 12 slots. As shown in FIG. 3, the PLC system can identify a module through which the one-scan program is performed through the location of the base and the slot. In addition, it can be confirmed that the progress of the operation for such a plurality of modules is made according to the base sequence (the row direction) and the order of the slots (the column direction) in the same base.

따라서, 각각의 모듈들에서 이루어지는 입출력 리프레시(R) 동작 또한 베이스의 순서 내에서 슬롯의 순서에 따라 수행되며, 데이터의 용량 초과 등으로 인해 1회의 입출력 리프레시(R) 과정에서 적절한 데이터의 입출력 작업이 수행되지 못하는 경우, 8 × 12 모듈의 동작 수행 후 나머지 데이터에 대한 입출력 작업을 재시도 해야만 한다.
Therefore, the input / output refresh operation performed in each of the modules is also performed according to the order of the slots in the order of the bases, and appropriate data input / output operations in one input / output refresh (R) If not, the I / O operation for the remaining data must be retried after the operation of the 8 × 12 module.

도 4는 본 발명의 일 실시예에 따른 PLC용 스캔 프로그램의 구동 방법을 설명하기 위한 순서도이다.4 is a flowchart illustrating a method of driving a scan program for a PLC according to an embodiment of the present invention.

도 4를 참조하면, 본 발명의 일 실시예에 따른 PLC용 스캔 프로그램의 구동 방법은, 입출력 리프레시 설정 단계(S410) 및 입출력 리프레시 실행 단계(S420) 등을 포함하여 구성됨을 확인할 수 있다.Referring to FIG. 4, a method of driving a scan program for a PLC according to an exemplary embodiment of the present invention includes an input / output refresh setting step S410 and an input / output refresh execution step S420.

여기서 입출력 리프레시 설정 단계(S410)는, 연산 프로그램의 수행 결과로 대용량의 데이터 입출력이 요구되는 등의 스캔 프로그램에 대해, 연산 프로그램의 수행 중간에 입출력 리프레시 과정이 이루어질 수 있도록 설정하는 단계이며, 입출력 리프레시 수행 단계(S420)는, 입출력 리프레시 설정 단계(S410)에 따라 설정된 입출력 리프레시 동작이 해당 연산 프로그램의 수행 중간에 이루어지는 단계를 나타낸다.Herein, the input / output refresh setting step S410 is a step for setting an input / output refresh process to be performed during the execution of the operation program for a scan program such as a large amount of data input / output required as a result of execution of the operation program, The execution step S420 shows a step in which the input / output refresh operation set in accordance with the input / output refresh setting step S410 is performed in the middle of the execution of the operation program.

이하, 추가적인 도면을 통해 상기의 과정들에 대해 보다 상세히 설명할 수 있도록 한다.
BRIEF DESCRIPTION OF THE DRAWINGS The above process will be described in more detail with reference to additional drawings.

도 5 및 도 6은 도 4에 적용되는 스캔 프로그램의 개념적 구성을 나타낸 설명도이다.FIGS. 5 and 6 are explanatory views showing a conceptual configuration of a scan program applied to FIG.

먼저, 도 5를 참조하면, 본 발명의 일 실시예에 따른 PLC용 스캔 프로그램의 구동 방법에 적용되는 스캔 프로그램(510)은, 통상의 스캔 프로그램과 마찬가지로 연산 프로그램(520) 및 OS 프로그램(530)을 포함하여 구성됨을 확인할 수 있다. 여기서, 연산 프로그램(520)이 특별한 목적에 따라 사용자 등에 의해 설정된 펑션들의 조합으로 이루어질 수 있고, 사칙 연산, 논리 연산 또는 BCD 연산 등을 수행하게 되며, OS 프로그램(530)이 모듈 제어, 연산 프로그램의 관리 및 시스템 진단 등과 같은 기능을 수행하게 됨은 전술한 바와 같다.5, a scan program 510 applied to a method of driving a scan program for a PLC according to an embodiment of the present invention includes an operation program 520 and an OS program 530 in the same manner as a normal scan program, As shown in FIG. Here, the operation program 520 may be a combination of functions set by a user or the like in accordance with a specific purpose, performs an arithmetic operation, a logical operation or a BCD operation, and the OS program 530 may perform a module control, Management and system diagnosis are performed as described above.

하지만, 도 5에 도시된 바와 같은 스캔 프로그램(510)은, 연산 프로그램(520) 중에 입출력 리프레시의 설정 및 이에 따른 동작 수행이 가능할 수 있는 스캔 프로그램으로써, 보다 구체적인 구성을 도 6에 나타내었다.However, the scan program 510 as shown in FIG. 5 is a scan program that can set the input / output refresh in the operation program 520 and perform an operation according to the setting. More specific configuration is shown in FIG.

도 6을 참조하면, 각각의 연산 프로그램(510)은 실행 중간에 사용자의 설정 등에 의한 입출력 리프레시(UR) 동작 수행이 가능함을 확인할 수 있다.Referring to FIG. 6, it can be confirmed that each of the operation programs 510 can perform an input / output refresh operation (UR) operation by a setting of a user in the middle of execution.

다시 말해, 연산 프로그램(520)의 수행 결과 생성되는 데이터의 크기가 OS 프로그램(530)의 수행 중 실행되는 1회의 입출력 리프레시 작업만으로 처리하기 어려울 것으로 예상되는 등의 경우, 연산 프로그램(520)의 수행 중 적당한 시기에 사용자에 의해 설정된 입출력 리프레시(UR) 동작을 수행할 수 있도록 설정함으로써, 연산 프로그램(520)의 수행 중간에 해당 프로그램과 관련된 각각의 모듈들과의 상호 데이터 입출력 기능을 수행하도록 구성될 수 있다. 이때, 사용자에 의해 설정된 1회의 추가 입출력 리프레시(UR)만으로는 부족할 것으로 판단되는 등의 경우, 최적의 효율로 PLC 시스템이 동작 가능할 수 있도록, 필요에 따라 1 연산 프로그램 내에 2회 이상의 추가 입출력 리프레시(UR)가 이루어질 수 있도록 설정 가능함은 당연하다.In other words, when it is expected that the size of data generated as a result of execution of the operation program 520 is difficult to be processed only by one input / output refresh operation performed during execution of the OS program 530, Output function of each module related to the program in the middle of the execution of the operation program 520 by setting the input / output refresh operation (UR) set by the user at an appropriate time . In this case, when it is determined that only one additional input / output refresh (UR) set by the user is insufficient, the PLC system can be operated with the optimum efficiency by using two or more additional input / output refresh (UR ) Can be set to be performed.

도 6의 경우를 참조하면, 스캔 프로그램1에서는 연산 프로그램의 수행 중간에 사용자에 의해 설정된 1회의 입출력 리프레시(UR)가 수행되지만, 스캔 프로그램2의 경우 연산 프로그램의 수행 중간에 사용자에 의해 설정된 2회의 입출력 리프레시(UR)가 수행되도록 구성되었음을 확인할 수 있다. 즉, 스캔 프로그램1은 1 스캔 기간 동안 총 2회의 입출력 리프레시(UR1, R1)를 수행하게 되며, 스캔 프로그램2의 경우 1 스캔 기간 동안 총 3회의 입출력 리프레시(UR2, R1)를 수행하게 됨으로써, 1 스캔 기간의 지연에 따른 PLC 시스템의 비효율적 운용 등을 방지하도록 구성될 수 있다.6, in the scan program 1, one input / output refresh (UR) set by the user is performed during the execution of the operation program, but in the case of the scan program 2, It can be confirmed that the input / output refresh (UR) is configured to be performed. In other words, the scan program 1 performs a total of two input / output refreshes UR1 and R1 during one scan period. In the case of the scan program 2, three input / output refreshes UR2 and R1 are performed during one scan period, And inefficient operation of the PLC system due to a delay of the scan period.

여기서, 도면에 도시되지는 않았으나, 본 발명의 실시예에 따른 PLC용 스캔 프로그램의 구동 방법은, 사용자의 설정에 의해 연산 프로그램의 수행 중간에 이루어지는 입출력 리프레시 동작의 시기에 대한 설정이 가능하도록 구성되는 것이 바람직할 수 있다. 즉, 입출력 리프레시 설정 단계(S410)를 통해 설정되는 입출력 리프레시 명령에, 입출력 리프레시 수행 시점(時點)에 대한 정보를 포함하도록 구성될 수 있다.Although not shown in the drawing, a method for driving a scan program for a PLC according to an embodiment of the present invention is configured to enable setting of a timing of an input / output refresh operation performed during execution of an operation program according to user settings May be preferred. That is, the input / output refresh command may be configured to include information on an input / output refresh execution time point set through the input / output refresh setting step S410.

이 경우, 입출력 리프레시 수행 시점에 대한 정보는, 해당 연산 프로그램의 동작 개시로부터의 경과 시간, 또는 해당 연산 프로그램에 포함된 서브(sub) 프로그램과의 상호 대응 관계 등을 기준으로 설정될 수 있을 것이다.In this case, the information on the execution time of the input / output refresh may be set based on the elapsed time from the start of the operation of the operation program or the mutual correspondence relationship with the sub program included in the operation program.

다시 말해, 사용자의 설정에 의해 연산 프로그램 수행 중 입출력 리프레시 동작이 이루어지도록 명령을 입력하는 과정에서, 해당 입출력 리프레시가 어느 시점에 수행될 것인지에 대한 구체적인 정보가 함께 입력될 수 있다. 그리고 이와 같은 수행 시점에 대한 정보는 해당 연산 프로그램의 동작 개시로부터의 절대적인 시간 정보로 표현되거나, 혹은, 해당 연산 프로그램을 구성하는 사칙 연산 프로그램(펑션), 논리 연산 프로그램 또는 BCD 연산 프로그램 등과 같은 서브 프로그램에 대응되도록, <어느 서브 프로그램의 종료 후>나 <어느 서브 프로그램의 동작 개시 전>, 아니면 <어느 서브 프로그램의 1차 연산 결과 산출 후> 등으로 표현되어 입력될 수 있다.In other words, in the process of inputting the instruction so that the input / output refresh operation is performed during the execution of the operation program by the user's setting, detailed information about the time at which the input / output refresh is to be performed can be input together. The information on the execution time may be represented by absolute time information from the start of operation of the corresponding operation program or may be expressed as a sub-operation program such as a four-ary operation program (function), a logical operation program or a BCD operation program , &Quot; before the start of any sub-program, &quot; or &quot; after calculation of the result of primary operation of any sub-program &quot;, or the like.

이때, 일 연산 프로그램 내에서 2회 이상의 입출력 리프레시 동작이 수행되도록 설정되는 경우라면, 당연히 각각의 입출력 리프레시에 대해 별도의 수행 시점 정보 입력이 가능하도록 구성될 수 있다.At this time, if the input / output refresh operation is set to be performed two or more times in one operation program, it is naturally possible to separately input execution time information for each input / output refresh.

한편, 사용자에 의해 연산 프로그램의 수행 중 동작하도록 설정되는 입출력 리프레시에 대해 별도의 수행 시점 정보가 입력되지 않는다면, 이때에는 해당 연산 프로그램 내에서의 입출력 리프레시 동작 횟수(回數) 정보에 대응되도록 해당 연산 프로그램의 수행 시간을 균분(均分)한 시점에 입출력 리프레시 동작이 수행되도록 구성될 수 있다. 다시 말해, 가령 1 연산 프로그램 내에 1회의 입출력 리프레시가 수행되도록 설정되는 경우라면, 해당 연산 프로그램에 할당된 수행 시간의 중간에서 입출력 리프레시가 수행될 수 있으며, 2회의 입출력 리프레시가 수행되도록 설정되는 경우라면, 해당 연산 프로그램에 할당된 수행 시간의 3균분 시점 마다 입출력 리프레시가 수행되도록 구성될 수 있다.On the other hand, if separate execution time information is not inputted to the input / output refresh set to be performed by the user during the execution of the operation program, the corresponding operation time count information corresponding to the input / The input / output refresh operation can be performed at a time point when the program execution time is equalized. In other words, if input / output refresh is set to be performed once in one operation program, input / output refresh can be performed in the middle of the operation time allocated to the operation program, and if the input / output refresh is set to be performed twice , And input / output refresh may be performed at every three time points of the execution time allocated to the operation program.

하지만 이상에서 설명한 입출력 리프레시의 수행 시점과 관련된 사항은 본 발명의 바람직한 실시를 위한 예시일 뿐이며, 본 발명의 PLC용 스캔 프로그램의 구동 방법에 적용되는 사용자 설정 입출력 리프레시의 수행 시점 결정에 관해 통상의 어떠한 방식이 적용되더라도 무방할 수 있음은 통상의 기술자에 있어 자명할 것이다.
However, the items related to the execution time of the input / output refresh described above are only examples for the preferred embodiment of the present invention, and any of the conventional methods for determining the execution time of the user- It will be obvious to a person skilled in the art that the method may be applied even if it is applied.

도 7은 도 6의 실시예에 적용되는 입출력 리프레시 파라미터를 설명하기 위한 구성 일예시도이고, 도 8은 도 7에 따른 입출력 리프레시 동작 순서를 나타낸 설명도이다.FIG. 7 is an exemplary diagram for explaining input / output refresh parameters applied to the embodiment of FIG. 6, and FIG. 8 is an explanatory diagram showing an input / output refresh operation sequence according to FIG.

도 7을 참조하면, 사용자 설정 입출력 리프레시를 수행하기 위한 파라미터는 베이스 번호 및 슬롯 번호 등을 포함함을 알 수 있다. Referring to FIG. 7, it can be seen that parameters for performing user-set input / output refresh include a base number, a slot number, and the like.

앞서 도 3을 통해 확인한 바와 같이, PLC 시스템을 구성하는 각각의 모듈들은 베이스 번호 및 슬롯 번호를 통해 특정 가능한 바, 각각의 모듈을 통해 수행되는 각각의 스캔 프로그램들의 특정을 위해서도 이들 베이스 번호 및 슬롯 번호 정보만으로 충분할 수 있기 때문이다.3, each of the modules constituting the PLC system can be identified through the base number and the slot number. For the specification of the respective scan programs performed through the respective modules, these base numbers and slot numbers This is because information is sufficient.

도 7의 경우, 1베이스의 3슬롯, 2베이스의 4 및 10슬롯, 4베이스의 2슬롯, 5베이스의 8슬롯, 그리고 7베이스의 11슬롯에 해당하는 스캔 프로그램에서, 연산 프로그램의 수행 중 1회씩의 사용자 설정 입출력 리프레시 작업이 수행되도록 설정됨을 확인할 수 있다. 그리고, 이와 같은 파라미터 정보에 따라 입출력 리프레시 설정 단계(S410)를 통해 사용자 설정 입출력 리프레시가 설정되면, PLC 시스템에 구비된 스캔 프로그램의 수행 중 해당 베이스의 슬롯에 대응되는 스캔 프로그램의 연산 프로그램이 동작되는 과정에서 입출력 리프레시 수행 단계(S420)가 자동으로 이루어질 수 있다.7, in a scan program corresponding to 3 slots of 1 base, 4 slots and 10 slots of 2 bases, 2 slots of 4 bases, 8 slots of 5 bases, and 11 slots of 7 bases, It can be confirmed that the user-set input / output refresh operation is set to be performed. When the user-set input / output refresh is set through the input / output refresh setting step S410 according to such parameter information, the operation program of the scan program corresponding to the slot of the corresponding base is operated during the execution of the scan program provided in the PLC system The input / output refresh execution step S420 may be performed automatically.

여기서, 각각의 입출력 리프레시에 대한 수행 시점 정보 설정을 위한 파라미터의 추가가 가능할 수 있음은 당연하다.It is needless to say that it is possible to add parameters for setting the execution time point information for each input / output refresh.

도 8은, 도 7과 같이 설정된 사용자 설정 입출력 리프레시 작업의 수행 순서를 나타낸 설명도이다. 각각의 스캔 프로그램이 베이스의 순서 내에서 슬롯의 순서에 따라 수행됨은 앞서 설명한 바 있다.Fig. 8 is an explanatory diagram showing a procedure for performing a user-set input / output refresh operation set as shown in Fig. Each scan program is performed according to the order of the slots in the order of the bases, as described above.

이상과 같은 본 발명의 실시예에 따른 PLC용 스캔 프로그램의 구동 방법은, 필요에 따라 일부 이상의 스캔 프로그램에 대해 연산 프로그램의 수행 중 추가적인 입출력 리프레시 동작이 이루어지도록 설정 가능하도록 함으로써, 대규모 데이터의 입출력을 위해서는 전체 시스템의 동작이 지연되는 등과 같은 PLC 시스템의 구조적 문제를 해결할 수 있다는 등의 장점을 제공할 수 있다.The method of driving a scan program for a PLC according to an embodiment of the present invention allows setting of an additional input / output refresh operation during execution of an operation program for a part or more of scan programs, if necessary, It is possible to solve the structural problem of the PLC system such as the delay of the operation of the entire system.

이때, 연산 프로그램의 수행 중간에 이루어지는 입출력 리프레시 동작은, 사용자의 설정에 따라 1회 이상 수 회가 이루어지도록 구성될 수 있으며, 이와 같은 입출력 리프레시 동작의 구체적인 수행 시점 등에 대한 정보가 다양한 방식에 따라 사용자에 의해 특정 가능할 수 있음 등에 대해서는 전술한 바 있다.
At this time, the input / output refresh operation performed during the execution of the operation program may be configured to be performed several times or more depending on the setting of the user. Information on the specific execution time and the like of the input / And the like can be specified by the above description.

전술한 바와 같은 본 발명은, 본 발명이 속하는 기술 분야의 통상의 기술자에게 있어 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하므로, 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니다.
The present invention is not limited to the above-described embodiments, and various changes, substitutions, and alterations can be made hereto without departing from the scope of the present invention. But the present invention is not limited thereto.

110, 510: 스캔 프로그램 120, 520: 연산 프로그램
130, 530: OS 프로그램
110, 510: scan program 120, 520: operation program
130, 530: OS program

Claims (5)

각각의 스캔(scan) 프로그램은 연산 프로그램 및 OS(Operating System) 프로그램의 순차적 수행에 의해 구성되고, 복수의 상기 스캔 프로그램이 순차적으로 수행되도록 구성되는 PLC(Programmable Logic Controller)용 스캔 프로그램의 구동 방법에 있어서,
적어도 1 이상의 상기 스캔 프로그램에 대해 연산 프로그램의 수행 중 1회 이상의 입출력 리프레시(refresh) 동작이 수행되도록 입출력 리프레시 명령이 설정되는 입출력 리프레시 설정 단계; 및
상기 입출력 리프레시 설정 단계를 통해 설정된 입출력 리프레시 명령에 대응되도록 상기 스캔 프로그램의 연산 프로그램 수행 중간에 입출력 리프레시 동작이 수행되는 입출력 리프레시 수행 단계;를 포함하는 PLC용 스캔 프로그램의 구동 방법.
Each of the scan programs is constituted by a sequential execution of an operation program and an OS (Operating System) program, and is configured to sequentially execute a plurality of the scan programs, and a method of driving a scan program for a PLC (Programmable Logic Controller) As a result,
An input / output refresh setting step of setting an input / output refresh command so that at least one of the scan programs is subjected to one or more input / output refresh operations during execution of an operation program; And
And an input / output refresh operation in which an input / output refresh operation is performed during execution of an operation program of the scan program so as to correspond to the input / output refresh command set through the input / output refresh setting step.
제 1 항에 있어서,
상기 입출력 리프레시 설정 단계를 통해 선택되는 상기 적어도 1 이상의 스캔 프로그램은, 베이스 번호 및 슬롯 번호를 포함하는 파라미터(parameter)의 입력에 의해 특정되는 것을 특징으로 하는 PLC용 스캔 프로그램의 구동 방법.
The method according to claim 1,
Wherein the at least one scan program selected through the input / output refresh setting step is specified by inputting a parameter including a base number and a slot number.
제 1 항 또는 제 2 항에 있어서,
상기 입출력 리프레시 설정 단계를 통해 설정되는 입출력 리프레시 명령은, 상기 연산 프로그램의 수행 중간에 이루어지는 상기 입출력 리프레시 명령의 수행 시점(時點)에 대한 정보를 포함하는 것을 특징으로 하는 PLC용 스캔 프로그램의 구동 방법.
3. The method according to claim 1 or 2,
Wherein the input / output refresh command set through the input / output refresh setting step includes information on an execution time point of the input / output refresh command in the middle of execution of the operation program.
제 3 항에 있어서,
상기 입출력 리프레시 명령의 수행 시점 정보는, 해당 연산 프로그램의 동작 개시로부터의 경과 시간, 또는 해당 연산 프로그램에 포함된 서브(sub) 프로그램과의 상호 대응 관계를 기준으로 설정되는 것을 특징으로 하는 PLC용 스캔 프로그램의 구동 방법.
The method of claim 3,
Wherein the execution time information of the input / output refresh command is set based on an elapsed time from an operation start of the operation program or a mutual correspondence relationship with a sub program included in the operation program. How to program.
제 1 항 또는 제 2 항에 있어서,
상기 입출력 리프레시 수행 단계를 통해 수행되는 입출력 리프레시 동작은,상기 입출력 리프레시 설정 단계를 통해 설정된 해당 연산 프로그램 내에서의 입출력 리프레시 동작 횟수(回數) 정보에 대응되도록 해당 연산 프로그램의 수행 시간을 균분(均分)한 시점에 이루어지는 것을 특징으로 하는 PLC용 스캔 프로그램의 구동 방법.
3. The method according to claim 1 or 2,
Wherein the input / output refresh operation performed through the input / output refresh execution step includes a step of setting the execution time of the corresponding arithmetic operation program to be equal to the operation time of the arithmetic operation program so as to correspond to the input / output refresh operation count information in the arithmetic operation program set through the input / Wherein the step of generating the scan program comprises the steps of:
KR1020150077580A 2015-06-01 2015-06-01 Method for driving scan program using plc KR102259094B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020150077580A KR102259094B1 (en) 2015-06-01 2015-06-01 Method for driving scan program using plc

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150077580A KR102259094B1 (en) 2015-06-01 2015-06-01 Method for driving scan program using plc

Publications (2)

Publication Number Publication Date
KR20160141938A true KR20160141938A (en) 2016-12-12
KR102259094B1 KR102259094B1 (en) 2021-06-01

Family

ID=57573986

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150077580A KR102259094B1 (en) 2015-06-01 2015-06-01 Method for driving scan program using plc

Country Status (1)

Country Link
KR (1) KR102259094B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020213853A1 (en) * 2019-04-15 2020-10-22 엘에스일렉트릭(주) Plc system, and method for controlling input/output refresh period thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002358104A (en) * 2001-03-30 2002-12-13 Omron Corp Programmable controller and method for controlling the same
JP2014127055A (en) * 2012-12-27 2014-07-07 Jtekt Corp Peripheral device of plc

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002358104A (en) * 2001-03-30 2002-12-13 Omron Corp Programmable controller and method for controlling the same
JP2014127055A (en) * 2012-12-27 2014-07-07 Jtekt Corp Peripheral device of plc

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020213853A1 (en) * 2019-04-15 2020-10-22 엘에스일렉트릭(주) Plc system, and method for controlling input/output refresh period thereof
JP2022529260A (en) * 2019-04-15 2022-06-20 エルエス、エレクトリック、カンパニー、リミテッド PLC system and its input / output refresh cycle control method

Also Published As

Publication number Publication date
KR102259094B1 (en) 2021-06-01

Similar Documents

Publication Publication Date Title
Tommelein Collaborative takt time planning of non-repetitive work
US10324438B2 (en) Sequence-control programming apparatus, sequence-control programming method, and operating system
US9921560B2 (en) Control device, control system, tool device, and collection instruction program
CN104375804B (en) Multithreading executes processor and its operating method
US9557897B2 (en) Apparatus and method for inputting cutting shape using interactive program in computer numerical control machine tool
JP6375666B2 (en) Programming tools for PLC and PLC
US10493625B2 (en) System for generating sets of control data for robots
US8869123B2 (en) System and method for applying a sequence of operations code to program configurable logic circuitry
JP6444971B2 (en) Work planning device
JP2012194681A (en) Control device and system program
CN110114732A (en) Programmable controller, managing device and control system
JP2018502391A (en) Computer-implemented method for displaying a user interface
JP2020004408A5 (en)
KR20160141938A (en) Method for driving scan program using plc
JP2018020406A (en) Simulation device
WO2010044189A1 (en) Apparatus and method for controlling machine tool
JP2020166414A (en) Development aid device, method of controlling the same, information processing program, and recording medium
JP2009282755A (en) Simulation apparatus
KR20160014786A (en) System construction assist device, method, and recording medium
KR101782252B1 (en) Fixed cycle operation method for plc system
CN103901810B (en) Optimizing system and method for user application of PLC
JP6591116B1 (en) Programmable logic controller CPU unit, programmable logic controller, method, and computer
JP6260445B2 (en) Simulation device
JP5951041B2 (en) Programmable display
JP5401222B2 (en) Scheduling method and schedule display method

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