KR100348196B1 - Sequence control method - Google Patents

Sequence control method Download PDF

Info

Publication number
KR100348196B1
KR100348196B1 KR1019960029506A KR19960029506A KR100348196B1 KR 100348196 B1 KR100348196 B1 KR 100348196B1 KR 1019960029506 A KR1019960029506 A KR 1019960029506A KR 19960029506 A KR19960029506 A KR 19960029506A KR 100348196 B1 KR100348196 B1 KR 100348196B1
Authority
KR
South Korea
Prior art keywords
task
output
transition
token
routine
Prior art date
Application number
KR1019960029506A
Other languages
Korean (ko)
Other versions
KR980010676A (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 KR1019960029506A priority Critical patent/KR100348196B1/en
Publication of KR980010676A publication Critical patent/KR980010676A/en
Application granted granted Critical
Publication of KR100348196B1 publication Critical patent/KR100348196B1/en

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • 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
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/11Plc I-O input output
    • G05B2219/1157I-O used either as input or as output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13085Plc controls several machines in sequence
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/15Plc structure of the system
    • G05B2219/15079Multitasking, real time multitasking

Abstract

PURPOSE: A method for controlling sequence is provided to improve the suitability by allowing each step of an SFC(Sequence Flow Control) to control the whole flow without using a separate scheduler. CONSTITUTION: A step of an SFC is made as an independent task which is multi-processed by a multiprocessing operating system(300). The task comprises a routine for receiving a token, a routine for performing a transition according to an input transient condition, a routine for performing a corresponding internal step operation, and a routine for transferring a token to a task corresponding to an output transient condition. Input/output transient information of each step and input/output step information of each transition are set(310). A task generated according to the input/output transient information and the input/output step information is performed(320).

Description

시퀀스 제어방법{Sequence control method}Sequence control method

본 발명은 시퀀스 제어방법에 관한 것으로서, 특히 시퀀스 흐름제어기 설계 및 구현에 있어 PLC용 프로그래밍 언어의 국제표준인 IEC 1131-3의 SFC로 표기된 프로그램의 흐름을 제어하기 위한 방법에 관한 것이다.The present invention relates to a sequence control method, and more particularly, to a method for controlling a flow of a program represented by SFC of IEC 1131-3, which is an international standard of programming language for PLC, in designing and implementing a sequence flow controller.

일반적으로 제어시스템(control system)내의 각 단위요소들은 내부에서 각각의 시퀀스 흐름제어(sequence flow control)를 하게 된다. 그리고 일반적인 제어 소프트웨어의 전형적인 기능으로는 작업의 순서를 정하는 것, 시스템의 상태를 감시(monitor)하는 것, 실시간으로 시스템의 동적인 상태를 결정하는 것 등이 있다. 기존의 LLD(Ladder Logic Diagram)는 이러한 시스템의 작업순서를 구성하는데 이용되어 왔다. 그것들은 PLC(Programmable Logic Controller)의 입출력 프로시져(procedure)들을 지정하고, 이들을 반복적으로 수행하는 일들을 해왔다. 그러나 상기 LLD는 시스템의 크기가 커짐에 따라 그 복잡성이 훨씬 심해져서 문제가 발생했을 경우 해당 문제를 찾는 일이 상당히 어려웠고, 시스템의 사양이 변하게 되면 대부분의 내용을 바꾸어야하는 경우가 많았다.In general, each unit element in the control system has its own sequence flow control. Typical functions of general control software include sequencing tasks, monitoring the state of the system, and determining the dynamic state of the system in real time. Conventional Ladder Logic Diagrams (LLDs) have been used to organize the workflow of these systems. They have specified the input and output procedures of a programmable logic controller (PLC), and have done their work repeatedly. However, as the size of the system increases, the complexity of the LLD becomes much more severe. Therefore, when a problem occurs, it is difficult to find the problem, and when the specifications of the system change, most of the contents have to be changed.

이러한 LLD의 한계를 극복하기 위해 PLC 업체들은 여러 가지의 프로그래밍 언어들을 개발해 왔다. 이러한 여러 가지의 언어들 사이의 호환성과 규격통일을 위해 IEC(International Electrotechnical Commission)에서 IEC 1131을 만들게 되었고, 이 규격중에 전체 시스템의 흐름을 표시하는 언어들 중의 하나가 순자기능챠트 (Soquential Function Chart:이하 SFC라 함)이다. 그러나 상기 SFC 내부구조가 복잡해지거나 서로 다른 성격의 분기가 중첩되면 전체 흐름을 이어가는데 어려움이 있고, 스케쥴러(scheduler)와 같은 별도의 제어기를 두어 작업 스텝을 관리해야 하는 번거로움이 있다. 그리고 작업 스텝(step)이 많아질수록 상기 스케쥴러의 부하(load)도 함께 늘어나 스케쥴러의 부하로 인해 정작 필요한 각 스텝을 실행할 시간이 부족하여 작업능률이 저하되는 문제점이 있다.To overcome this limitation of LLD, PLC companies have developed several programming languages. The International Electrotechnical Commission (IEC) created IEC 1131 for compatibility and harmonization of these various languages, and one of the languages that represents the flow of the entire system is the Soquential Function Chart: Hereinafter referred to as SFC). However, when the internal structure of the SFC is complicated or branches having different characteristics overlap, it is difficult to continue the entire flow, and there is a need to manage a work step by having a separate controller such as a scheduler. In addition, as the number of work steps increases, the load of the scheduler increases as well, resulting in insufficient work efficiency due to insufficient time to execute each step necessary due to the load of the scheduler.

본 발명은 상술한 문제점을 해결하기 위해 창출된 것으로서, 상기 SFC로 표기된 순차 프로그램을 수행함에 있어 별도의 스케쥴러없이 SFC 각 스텝들이 전체의 흐름을 자체적으로 제어하면서 수행될 수 있도록 하기 위해 상기 SFC의 각 스텝들을 별도의 타스크(task)로 생성하여 상기 타스크간에 프로그램의 수행을 위한 정보를 주고 받으면서 전체의 흐름을 자체적으로 제어하는 시퀀스 제어방법을 제공함에 그 목적이 있다.The present invention was created to solve the above-mentioned problems, and in order to perform each step of the SFC without having a separate scheduler in executing the sequential program labeled as SFC to control the entire flow itself, It is an object of the present invention to provide a sequence control method for generating steps as a separate task and controlling the entire flow itself while exchanging information for performing a program between the tasks.

도 1은 IEC 1131-3에서 제시한 PLC용 프로그래밍 언어들 중의 하나인 SFC로 표기된 프로그램의 한 예를 도시한 것이다.Figure 1 shows an example of a program labeled SFC, which is one of the programming languages for PLC presented in IEC 1131-3.

도 2는 SFC의 스텝에 해당되는 타스크의 일예를 도시한 것이다.2 illustrates an example of a task corresponding to a step of an SFC.

도 3은 본 발명에 따른 시퀀스제어방법에 대한 큰 흐름을 흐름도로 도시한 것이다.3 is a flowchart illustrating a large flow for the sequence control method according to the present invention.

상기의 목적을 달성하기 위한 본 발명에 따른 SFC의 시퀀스 제어방법은Sequence control method of the SFC according to the present invention for achieving the above object

상기 SFC내의 스텝을 다중처리 운영체계에 의해 다중처리되는 독립된 타스크로 만드는 과정;Making the steps in the SFC into independent tasks that are multiprocessed by a multiprocessing operating system;

상기 각 스텝의 입/출력천이정보와 각 천이의 입/출력 스텝정보를 설정하는 과정: 및Setting input / output transition information of each step and input / output step information of each transition: and

상기 설정된 각 스텝의 입/출력천이조건정보와 각 천이의 입/출력 스텝정보에 따라 상기 생성된 타스크를 실행시키는 과정을 포함함이 바람직하다.And executing the generated task according to the input / output transition condition information of each set step and the input / output step information of each transition.

그리고 상기 타스크는 토큰을 수신하는 루틴, 입력천이 조건에 따라 천이를 수행하는 루틴. 해당 스텝 내부의 동작을 수행하는 루틴 및 출력천이조건에 상응하는 타스크에게 토큰을 전달하는 루틴을 포함함이 바람직하다.And the task is a routine for receiving a token and performing a transition according to an input transition condition. It is preferable to include a routine for performing an operation in the corresponding step and a routine for transmitting a token to a task corresponding to an output transition condition.

또한 상기 토큰을 수신하는 루틴의 토큰은 타스크 고유번호에 대한 정보를 포함하고, 상기 입력천이 조건에 따라 천이를 수행하는 루틴은 입력천이 개수를 검사하는 루틴. 상기 입력천이 개수가 한 개인 경우, 입력천이조건에 따라 천이를 수행하는 루틴 및 상기 입력천이 개수가 두 개 이상인 경우, 토큰을 전달한 타스크의 고유번호에 해당하는 타스크의 출력천이만 검사하는 루틴으로 이루어진다. 또한 출력천이조건에 상응하는 타스크에게 토큰을 전달하는 루틴은 출력 천이의 개수를 검사하는 루틴. 상기 출력천이 개수가 한 개인 경우, 출력천이조건이 참이면 통과하여 타스크의 모든 출력천이에 연결된 타스크에게 토큰을 전달하고, 거짓이면 참이될 때 기다리는 루틴 및 출력천이 개수가 두 개 이상인 경우, 출력천이 조건을 소정의 순서로 검사하면서 처음으로 참여되는 조건을 찾아 해당 천이의 출력 스텝 타스크에 토큰을 전달하는 루틴을 포함한다.The token of the routine for receiving the token includes information about a task unique number, and the routine for performing the transition according to the input transition condition checks the number of input transitions. When the number of input transitions is one, the routine performs a transition according to an input transition condition, and when the number of input transitions is two or more, a routine for checking only an output transition of a task corresponding to a unique number of a task that has passed a token. . In addition, the routine for passing the token to the task corresponding to the output transition condition is a routine for checking the number of output transitions. If the number of output transitions is one, if the output transition condition is true, the token is passed to the task connected to all output transitions of the task, and if the output transition is false, the routine and the number of output transitions waiting for the output are two or more. It includes a routine that checks the transition conditions in a predetermined order, finds the first participating condition, and passes the token to the output step task of the transition.

이하에서 첨부된 도면을 참조하여 본 발명을 상세히 설명한다. 도 1은 IEC 1131-3에서 제시한 PLC용 프로그래밍 언어들 중의 하나인 SFC로 표기된 프로그램의 한 예를 도시한 것이다. 도 1을 참조하여 상기 SFC에 대해 설명하면, 네모상자로 표시된 것(S1, S2, S3,...)을 SFC에서는 "스텝(step)"이라고 부르고, 가로로 짧게 그어진 막대(T1, T2, T3,...)로 표기되어 상기 스텝과 스텝을 연결하는 것을 "천이 (transition)"라고 한다. 각 스텝은 IEC 1131에서 제시된 다른 언어에 의해 시스템의 어떤 동작내지는 작업을 기술하게 되고, 천이는 도 1에서 C1, C2, C3,...등으로 표시된 주어진 "천이조건(transition condition)"을 검사하면서 다음 스텝으로 흐름을 연결시키는 기능을 한다. 이 때 천이조건이 "참(TRUE)"인 경우에만 다음 스텝으로 흐름이 진행될 수 있고, 거짓"(FALSE)"인 경우는 "참(TRUE)"이 될 때까지 그곳에 머물러 있게 된다. 이러한 조건은 하나의 이진 산술식(a boolean expression)으로 표현된다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. Figure 1 shows an example of a program labeled SFC, which is one of the programming languages for PLC presented in IEC 1131-3. Referring to FIG. 1, the SFCs are described as square boxes (S1, S2, S3,...) In the SFC and are referred to as "steps", and the bars T1, T2, T3, ...) and connecting the step with the step is referred to as "transition". Each step describes the operation of the system in different languages, as specified in IEC 1131, and the transition examines a given "transition condition", denoted by C1, C2, C3, ... in FIG. While connecting the flow to the next step. At this time, the flow can proceed to the next step only when the transition condition is "true", and when it is "false", it stays there until it is "true". This condition is represented by a boolean expression.

그리고 SFC에서 제공하는 흐름의 종류에는 크게 3가지가 있는데, 그 첫째로는 도 1에 도시된 'S1->T1->S2'와 같이 한 스텝(S1)이 완료되면, 다음 스텝으로 가기위한 천이조건(C1)을 검사하고, 상기 천이조건(C1)이 참이면 다음 스텝으로 진행되는 것이다. 두 번째 흐름으로는 도 1에 도시된 바를 참조하면, 'S2->T2->S3','S2->T2->S4', 'S2->T2->S5'와 같이 하나의 스텝이 완료된 후에 다음 천이조건을 검사하고, 상기 천이조건이 참일 경우, 여러개의 스텝이 동시에 수행되는 경우이다. 이 경우를 "동시분기(Simultaneous Branch)"라고 하고, 도 1에 도시된 횡으로 겹줄(100)로 표시된 것이 이에 해당한다. 이때, 동시에 수행되는 스텝들간에는 별도의 우선권(priority)이라든가 하는 제약은 전혀 없고, 동시에 독립적으로 수행된다. 마지막 세 번째 흐름의 경우는 도 1의 'S5->T4->S7' 또는 'S5->T5->S8' 또는 'S5->T6->S9'과 같이 여러개 중에 하나의 작업만을 수행하는 경우이다. 이와 같은 경우를 "선택분기(Selection Branch)"라 하고, 도 1에서는 횡으로 한줄로 표시깃(110)이 이에 해당한다. 이 때 흐름의 연결은 S5 스텝 수행후에 연결된 다음 조건에 해당하는 길로 흐름이 연결된다.In addition, there are three types of flows provided by the SFC. Firstly, when one step S1 is completed as shown in FIG. 1, the transition to the next step is performed. The condition C1 is checked and if the transition condition C1 is true, the process proceeds to the next step. Referring to FIG. 1 as a second flow, one step is completed as 'S2-> T2-> S3', 'S2-> T2-> S4', and 'S2-> T2-> S5'. After that, the next transition condition is checked, and when the transition condition is true, several steps are performed at the same time. This case is referred to as a "Simultaneous Branch", and this corresponds to the horizontal line 100 shown in FIG. At this time, there is no restriction such as separate priority between the steps performed at the same time and is performed independently at the same time. In case of the last third flow, when only one operation is performed, such as 'S5-> T4-> S7' or 'S5-> T5-> S8' or 'S5-> T6-> S9' of FIG. to be. Such a case is referred to as a "selection branch", and the display feather 110 corresponds to a horizontal line in FIG. 1. At this time, the flow is connected after the execution of the step S5.

본 발명의 개념은 상기와 같은 SFC에 대해 각 스텝을 별도의 타스크로 만들고, 상기 타스크들을 멀티 타스킹 운영체제(multi-tasking operating system)상에서 다중처리하면서 흐름을 이어가는데 있다. 그리고 상기 스텝들은 제2도와 같은 구조를 가지는 타스크들로 만들어 별도의 흐름제어가 없이 타스크들끼리의 정보교환을 통해 전체 흐름을 구성하고자 하는 것이다.The concept of the present invention is to continue the flow by making each step a separate task for the SFC as described above, and multitasking the tasks on a multi-tasking operating system. In addition, the steps are made of tasks having a structure as shown in FIG. 2 to construct the entire flow through information exchange between tasks without separate flow control.

상기 개념을 기초로 하여, 상술한 SFC에 대해 상기 SFC를 구성하고 있는 각 스텝을 별도의 타스크로 구성하고자 할 때, 상기 타스크의 구조를 설명하기로 한다.Based on the above concept, when the steps constituting the SFC for the above-described SFC are to be configured as separate tasks, the structure of the task will be described.

도 2는 상기 타스크의 구조에 대한 바람직한 실시예를 도시한 것으로서, 상기 타스크는 입력천이 조건에 따라 토큰을 수신하는 토큰수신루틴(200), 입력천이조건에 따라 천이를 수행하는 천이루틴(210), 해당 스텝 내부의 동작을 수행하는 스텝동작루틴(220) 및 출력천이조건에 상응하는 타스크에게 토큰을 전달하는 토큰전달루틴(230)으로 이루어진다. 상기 토큰수신루틴(200)의 토큰은 상기 토큰을 보낸 타스크 고유번호에 대한 정보를 포함하고 있으며, 상기 천이루틴(210)은 입력천이 개수를 검사하는 루틴 및 상기 입력천이 개수가 두 개 이상인 경우, 토큰을 전달한 타스크의 고유번호에 해당하는 타스크의 출력천이만 검사하는 루틴으로 이루어진다. 또한, 상기 토큰전달 루틴(230)은 출력 천이의 개수를 검사하는 루틴. 상기 출력천이 개수가 한 개인 경우, 출력천이조건이 참이면 통과하여 타스크의 모든출력천이에 연결된 타스크에게 토큰을 전달하고, 거짓이면 참이될 때 기다리는 루틴 및 출력천이 개수가 두 개 이상인 경우, 출력천이 조건을 소정의 순서로 검사하면서 처음으로 참이되는 조건을 찾아 해당 천이의 출력 스텝 타스크에 토큰을 전달하는 루틴으로 이루어진다.2 illustrates a preferred embodiment of the structure of the task, wherein the task includes a token receiving routine 200 for receiving a token according to an input transition condition and a transition routine 210 for performing a transition according to an input transition condition. It comprises a step operation routine 220 for performing the operation inside the step and a token delivery routine 230 for transferring the token to the task corresponding to the output transition conditions. The token of the token receiving routine 200 includes information on the task unique number that sent the token, and the transition routine 210 is a routine for checking the number of input transitions and the number of input transitions is two or more, It consists of a routine that checks only the output transition of the task corresponding to the unique number of the task that delivered the token. In addition, the token transfer routine 230 checks the number of output transitions. If the number of output transitions is one, if the output transition condition is true, the token passes to the task connected to all output transitions of the task. If the output transition is false, the routine and the number of output transitions to wait for the output are true. It consists of a routine that checks the transition conditions in a predetermined order and finds the first true condition and passes the token to the output step task of the transition.

상기 타스크의 내부동작을 설명하면, 먼저 상기 토큰수신 루틴(200)에서 타스크 고유번호에 대한 정보를 포함하고 있는 토큰을 기다리고 있다가 토큰이 오면 이를 수신한다. 그리고 나서 천이루틴(210)을 통해 입력천이 개수를 검사하여, 상기 입력천이 개수가 한 개인 경우에는, 입력천이조건을 검사하여 '참(TRUE)'이면 통과하고, '거짓(FALSE)'이면 '참'이될 때 까지 기다린다. 만일 상기 입력천이 개수가 두 개 이상인 경우에는 토큰을 전달한 타스크의 고유번호(id)를 이용하여 해당하는 타스크의 출력천이만 검사하여, '참'이면 통과하고 '거짓'이면 '참'이 될 때까지 기다린다. 그리고 나서 해당 스텝 내부의 동작을 수행한다.Referring to the internal operation of the task, the token receiving routine 200 first waits for a token including information on the task unique number and receives the token when it comes. Then, the number of input transitions is checked through the transition routine 210. If the number of input transitions is one, the input transition condition is checked and passed if 'TRUE', and if 'FALSE', Wait for it to be true. If the number of input streams is two or more, only the output transition of the corresponding task is examined using the unique number (id) of the task that delivered the token. Wait until Then the operation inside the step is performed.

상기 수행한 다음에는 출력 천이의 개수를 검사한다. 만일 상기 출력천이 개수가 한 개인 경우에는, 출력천이 조건을 검사하여 출력천이조건이 '참'이면 통과하고 '거짓'이면 참이될 때까지 기다린다. 참이되면 이 타스크의 모든 출력천이에 연결된 타스크들에게 토큰을 전달한다. 만일 출력천이 토큰속에는 상기 토큰을 보내는 타스크의 고유번호(id)가 들어있다. 만일 출력천이 개수가 두 개 이상인 경우에는 맨 왼쪽 출력천이조건으로부터 차례로 검사하면서 처음으로 '참'이되는 조건을 찾아 해당 천이의 출력 스텝 타스크에 토큰을 전달한다. 이 때 토큰속에는 이 토큰을 보내는 타스크의 고유번호가 들어있다.After the above, the number of output transitions is checked. If the number of output transitions is one, the output transition condition is examined and passed if the output transition condition is 'true' and waited until it is true. If true, the token is passed to the tasks connected to all transitions of this task. If the output transition token contains the unique number (id) of the task that sends the token. If the number of output transitions is more than one, the first step is to find the condition that becomes 'true' first from the leftmost output transition condition, and transfer the token to the output step task of the transition. At this time, the token contains the unique number of the task that sends the token.

한편 상술반 바와 같은 구조를 갖는 타스크를 이용하여, IEC 1131-3 SFC을 기반으로 하여 별도의 흐름제어가 없이 타스크들끼리의 정보교환을 통해 시퀀스를 제어하는 방법을 설명하기로 한다.Meanwhile, a method of controlling a sequence by exchanging information between tasks without separate flow control based on the IEC 1131-3 SFC using a task having the structure as described above will be described.

도 3은 본 발명에 따른 시퀀스제어방법에 대한 큰 흐름을 흐름도로 도시한 것으로서, 상기 시퀀스제어방법은 상기 SFC내의 스텝을 다중처리 운영체제에 의해 다중처리되는 독립된 타스크로 만드는 과정(300), 상기 각 스텝의 입/출력천이정보와 각 천이의 입/출력 스텝정보를 설정하는 과정(310) 및 상기 설정된 각 스텝의 입/출력천이조건정보와 각 천이의 입/출력 스텝정보에 따라 상기 생성된 타스크를 실행시키는 과정(320)으로 이루어진다.3 is a flowchart illustrating a large flow of a sequence control method according to the present invention. The sequence control method includes a step 300 of making the steps in the SFC into independent tasks that are multi-processed by a multiprocessing operating system. A task 310 for setting input / output transition information of steps and input / output step information of each transition, and the generated task according to the input / output transition condition information of each set step and input / output step information of each transition. A process 320 is executed.

이를 보다 상세히 설명하기로 한다. 제 2도에 도시한 바와 같이 일단 타스크가 생성되면, 상기 타스크의 토큰수신루틴에서 토큰을 기다리게 된다. 상기 토큰은 타스크들 사이에 동기를 맞추고, 정보를 전달하기 위한 도구로서 일반적인 멀티-타스킹 운영체제에서 제공되는 것이다. 상기 '토큰'이란 이름은 특별한 대상을 지칭하는 것은 아니고, 이러한 목적으로 사용되는 것들에 대한 통칭이다. 상기 토큰을 보내는 타스크에서 토큰의 내부에 임의의 정보를 담아 보낼수도 있다.This will be described in more detail. As shown in FIG. 2, once a task is created, a token is waited for in the token receiving routine of the task. The token is provided by a general multi-tasking operating system as a tool for synchronizing tasks and conveying information. The name 'token' does not refer to a particular object, but is a general term for those used for this purpose. The task of sending the token may send arbitrary information inside the token.

토큰을 받은 타스크는 자신의 입력천이 개수를 검사하게 되는데 도 1에 도시된 T1->S2 또는 T2->S3 등의 경우와 같이 개수가 "1"인 경우에는 해당 천이조건을 검사하여 그 조건이 '참'이면 다음으로 진행한다. 이때 도 1에서의 [S3 그리고 S10 그리고 S11->T11->S12의 경우와 같이 입력천이는 하나지만 그 천이에 연결된 스텝 타스크가 복수개인 경우는 그 개수에 해당하는 만큼의 토큰을 받게 된다. 즉, 그 개수만큼의 토큰을 받고나서 해당 천이조건을 검사한다는 뜻이다. 이는 앞서 설명한 "동시분기"의 경우인데, S3, S10, S11의 세 스텝 타스크가 모두 완료된 후에 천이조건을 검사하고 다음 스텝 타스크로 진행한다는 SFC의 사양을 만족시키고 있다.The task receiving the token checks the number of its own transitions. If the number is "1" as in the case of T1-> S2 or T2-> S3 shown in FIG. 1, the task checks the corresponding transition condition. If true, proceed to the next. In this case, as in the case of [S3 and S10 and S11-> T11-> S12 in FIG. 1, if there is one input transition but there are a plurality of step tasks connected to the transition, the token corresponding to the number is received. That is, after receiving the number of tokens, the transition condition is checked. This is the case of the "simultaneous branching" described above, which satisfies SFC's specification of checking the transition condition and proceeding to the next step task after all three step tasks S3, S10 and S11 are completed.

다음으로 도 1의 [T8 또는 T9 또는 T10]->S11와 같은 경우는 S11 타스크의 입력천이의 개수가 '3'개가 되는데, 이와 같이 복수개의 입력천이를 가지는 경우에는 앞서 받은 토큰을 검사하여 그 토큰을 어느 타스크가 보낸 것인지를 찾는다. 그리하여 그 타스크의 출력천이조건만을 검사하고 그 조건이 "참(TRUE)"이면 다음으로 진행한다. 이와 같은 경우는 앞에서 "선택분기"의 경우에 해당하는데, 작업의 흐름이 여러 분기(brnach)중에 하나로만 흘러온 경우이므로 토큰을 보낸 분기의 천이조건만 검사하면 되는 것이다.Next, in the case of [T8 or T9 or T10]-> S11 of FIG. 1, the number of input transitions of the S11 task is '3'. Find out which task sent the token. Thus, only the output transition condition of the task is checked, and if the condition is "TRUE", it proceeds to the next. This is the case of the "selective branch" above, where the flow of work flows into only one of several branches, so we only need to check the transition condition of the branch that sent the token.

입력천이에 대한 검사가 완료되고 나면 스텝내부의 작업을 수행하고, 이 작업이 완료되면 다음에 어느 스텝으로 흐름을 진행시킬 것인지를 결정하게 된다.즉, 이번에는 이 타스크의 출력천이 개수를 검사한다. 도 1의 S3->T11 또는 S10->T11의 경우처럼 이 개수가 "1"인 경우는 바로 그 천이조건을 검사하고 그 조건이 "참"이면 천이에 연결된 타스크로 토큰을 전달한다. 여기서 상기 토큰에는 보내는 타스크의 고유번호가 들어가 있게 된다. 이 때 도 1의 T2->[S3 그리고 S4 그리고 S5]의 경우처럼 출력천이에 연결된 타스크의 개수가 한 개 이상일 수도 있는데 그런 경우에는 복수개의 타스크를 모두에게 동일한 토큰을 전달하게 된다. 이는 앞서 설명된 "동시분기"에 해당하는 것이다.Once the input transition has been checked, the task inside the step is performed, and when this task is completed, the next step is to determine which step to proceed with the flow, this time checking the number of output transitions for this task. . As in the case of S3-> T11 or S10-> T11 of FIG. 1, if the number is "1", the transition condition is checked and if the condition is "true", the token is transmitted to the task connected to the transition. Here, the token contains the unique number of the sending task. In this case, as in the case of T2-> [S3 and S4 and S5] of FIG. 1, the number of tasks connected to the output transition may be one or more. In such a case, the same token is transmitted to all of the tasks. This corresponds to the "concurrent branch" described above.

출력천이의 개수가 복수개인 경우는 도 1의 S5->[T4 또는 T5 또는 T6]와 같은 경우인데, 이 때에는 맨 왼쪽의 천이조건부터 차례로 검사하여 맨 처음으로 "참"이 되는 천이에 연결된 타스크로 토큰을 보내면 된다. 이 역시 앞서 설명한 "선택분기"에 해당하는 부분인데, 그 사양대로 흐름이 진행되게 되어 있다. 상기 토큰에는 보내는 타스크의 고유번호가 들어 있어 받는 타스크가 이를 확인할 수 있다.When the number of output transitions is plural, it is the same as S5-> [T4 or T5 or T6] of FIG. 1, in this case, a task connected to the first transition to the first "true" by sequentially checking from the leftmost transition condition. Send a token to. This also corresponds to the "selective branch" described above, the flow is to proceed according to the specification. The token contains a unique number of the sending task can be confirmed by the receiving task.

상술한 바와 같이 본 발명에 의하면 SFC 내에서의 작업의 진행을 별도의 제어기 없이 자체적으로 진행시킬 수 있는 방법을 제시함으로써, SFC의 구조가 복잡해지거나 서로 다른 성격의 분기가 중첩되더라도 전체 흐름을 이어가는데 아무런 문제가 없다.As described above, according to the present invention, by providing a method of progressing the work in the SFC itself without a separate controller, the entire flow continues even if the structure of the SFC becomes complicated or branches of different characteristics overlap. There is no problem.

또한 SFC 내부 구조 변경에 따른 별도의 작업이 필요치 않으므로 상당히 유연하며, 확장성이 있고, 한 번 확인된 프로그램은 하나의 단위로 구성되어 다른 프로그램에서도 이용할 수 있어 재사용이 용이하고, 모듈화될 수 있는 구조를 가지고있다.In addition, since it does not require any additional work due to the internal structure of the SFC, it is very flexible, extensible, and once identified, the program is composed of one unit and can be used by other programs, making it easy to reuse and modular. Have

또한 토큰의 흐름을 추적하면 전체의 흐름을 파악하기가 쉽고, 응용프로그램의 개발단계에서 각 부분을 따로 시험해보기도 용이하며, 그림으로 표시된 내용을 직접 일대일로 변환함으로서 전체 구조파악이 용이하다.In addition, tracking the flow of tokens makes it easy to grasp the flow of the whole, it is easy to test each part separately in the development stage of the application, and it is easy to grasp the entire structure by directly converting the displayed contents into one-to-one.

Claims (5)

IEC 1131-3 SFC를 이용한 시퀀스 제어 방법에 있어서,In the sequence control method using the IEC 1131-3 SFC, 상기 SFC의 스텝을 다중처리 운영체제에 의해 다중처리되는 독립된 타스크로 만드는 과정:Making the steps of the SFC into independent tasks that are multiprocessed by a multiprocessing operating system: 상기 각 스텝의 입/출력천이정보와 각 천이의 입/출력 스텝정보를 설정하는 과정: 및Setting input / output transition information of each step and input / output step information of each transition: and 상기 설정된 각 스텝의 입/출력천이조건정보와 각 천이의 입/출력 스텝정보에 따라 상기 생성된 타스크를 실행시키는 과정을 포함함을 특징으로 하는 시퀀스 제어방법.And executing the generated task according to the input / output transition condition information of each set step and the input / output step information of each transition. 제 1항에 있어서, 상기 타스크는The method of claim 1, wherein the task is 토큰을 수신하는 루틴:Routine to receive tokens: 입력천이 조건에 따라 천이를 수행하는 루틴:Routines that perform transitions based on input transition conditions: 해당 스텝 내부의 동작을 수행하는 루틴: 및Routines that perform actions inside that step: and 출력천이조건에 상응하는 타스크에게 토큰을 전달하는 루틴을 포함함을 특징으로 하는 시퀀스 제어방법.And a routine for transmitting the token to the task corresponding to the output transition condition. 제 2항에 있어서, 상기 토큰을 수신하는 루틴의 토큰은3. The token of claim 2 wherein the token of the routine for receiving the token is 타스크 고유번호에 대한 정보를 포함하고,Contains information about the task's unique number, 상기 입력천이 조건에 따라 천이를 수행하는 루틴은The routine for performing the transition according to the input transition condition is 입력천이 개수를 루틴;The number of input transition routines; 상기 입력천이 개수가 한 개인 경우, 입력천이조건에 따라 천이를 수행하는 루틴; 및A routine for performing a transition according to an input transition condition when the number of input transitions is one; And 상기 입력천이 개수가 두 개 이상인 경우, 토큰을 전달한 타스크의 고유번호에 해당하는 타스크의 출력천이만 검사하는 루틴으로 이루어짐을 특징으로 하는 제어방법.If the number of the input stream is two or more, the control method comprising a routine for checking only the output transition of the task corresponding to the unique number of the task passing the token. 제 2항 또는 제 3항 중 어느 한 항에 있어서, 출력천이조건에 상응하는 타스크에게 토큰을 전달하는 루틴은The routine of claim 2 or 3, wherein the routine for transferring a token to a task corresponding to an output transition condition is 출력 천이의 개수를 검사하는 루틴:Routines to check the number of output transitions: 상기 출력천이 개수가 한 개인 경우, 출력천이조건이 참이면 통과하여 타스크의 모든 출력천이에 연결된 타스크에게 토큰을 전달하고, 거짓이면 참이될 때 기다리는 루틴: 및If the number of output transitions is one, the routine passes if the output transition condition is true, passes the token to the task connected to all the output transitions of the task, and if it is false, waits for it to be true: and 출력천이 개수가 두 개 이상인 경우, 출력천이 조건을 소정의 순서로 검사하면서 처음으로 참이되는 조건을 찾아 해당 천이의 출력 스텝 타스크에 토큰을 전달하는 루틴을 포함함을 특징으로 하는 시퀀스 제어방법.If the number of output transitions is more than one, the sequence control method comprising a routine for checking the output transition conditions in a predetermined order to find the first true condition and passing the token to the output step task of the transition. 제 4항에 있어서, 상기 출력스텝 타스크에게 전달되는 토큰은 타스크 고유번호에 대한 정보를 포함함을 특징으로 하는 시퀀스 제어방법.5. The method of claim 4, wherein the token delivered to the output step task includes information about the task unique number.
KR1019960029506A 1996-07-20 1996-07-20 Sequence control method KR100348196B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019960029506A KR100348196B1 (en) 1996-07-20 1996-07-20 Sequence control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019960029506A KR100348196B1 (en) 1996-07-20 1996-07-20 Sequence control method

Publications (2)

Publication Number Publication Date
KR980010676A KR980010676A (en) 1998-04-30
KR100348196B1 true KR100348196B1 (en) 2002-11-18

Family

ID=37488816

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019960029506A KR100348196B1 (en) 1996-07-20 1996-07-20 Sequence control method

Country Status (1)

Country Link
KR (1) KR100348196B1 (en)

Also Published As

Publication number Publication date
KR980010676A (en) 1998-04-30

Similar Documents

Publication Publication Date Title
US4742443A (en) Programmable controller with function chart interpreter
US4118789A (en) Program protection module for programmable controller
US5249274A (en) Simultaneous data-driven and demand-driven computational model for dynamically configured systems
US5295059A (en) Programmable controller with ladder diagram macro instructions
EP0383506A2 (en) Method and system for mutual exclusive resource control
US5291427A (en) Method for assisting the development of a set of communicating automata
EP0125044B1 (en) Microcomputer with interprocess communication
WO2017129242A1 (en) Deterministic concurrent test program executor for an automated test equipment
US5831997A (en) Pattern generating apparatus
US5564049A (en) Industrial controller programming method using external connection database
KR100348196B1 (en) Sequence control method
CA1235230A (en) Parallel register transfer mechanism for a reduction processor evaluating programs stored as binary directed graphs employing variable-free applicative language codes
US5239476A (en) Multi-level state language controller for multi-threaded machine control
US20070150861A1 (en) Method and system for software design that combines signal flow and object reference connections
Rzonca et al. Mini-DCS system programming in IEC 61131-3 Structured Text
JP3412667B2 (en) Scheduling method of fieldbus system
JPH0211037A (en) Method of controlling a plurality of peripheral elements from single control element and data processing system
US11188061B2 (en) Configuration of an automation system
KR100243331B1 (en) Sfc interpretation and sequence control method using it
KR930001070B1 (en) Programming supporting method and system
JP3813756B2 (en) Programmable controller
JPH11212608A (en) Automatic setting device for system configuration provided with communication parameter
KR100423742B1 (en) Exclusive control system by sequential function chart
JP3623052B2 (en) Device model generation method, system model generation method, and sequence control program generation method
JP2984913B2 (en) Programmable sequence control circuit

Legal Events

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

Payment date: 20070629

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee