The present disclosure relates to a sequence controller having a periodic execution type sequence control module which executes a regular processing function block in a predetermined control period, an irregular function block storage which holds an irregular function block generated by a user, and a time-sharing execution type sequence control module which executes the irregular function block called from the irregular function block storage in free time of the control period.
The control station 10 communicates with a higher-level device 50 forming a distributed control system through a control bus 40, communicates with field devices 71, 72, . . . 7N through a field bus 60 and controls these devices.
An engineering station 80 which communicates with the control station 10 and the higher-level device 50 is connected on the control bus 40 so that a builder 81 generates an operation/monitoring application operating on the higher-level device 50, a control application 20 operating on the control station 10 and a sequence function block operating on the sequence controller 30 and the higher-level device 50 and the control station 10 download these applications.
The sequence controller 30 has a timer control module 31, an event control module 32, a periodic execution type sequence control module 33, a time-sharing execution type sequence control module 34, and an irregular processing function block storage 35. The sequence controller 30 executes registered function blocks in accordance with execution order or processing priority prescribed on a table.
The event control module 32 requests the periodic execution type sequence control module 33 and the time-sharing execution type sequence control module 34 to execute predetermined sequence control based on the sequence execution order or processing priority at event timing notified by the timer control module 31.
The periodic execution type sequence control module 33 executes a regular processing function block in a predetermined control period. Although the regular processing function block has a processing function which is so fixed that a given regular process can be executed at a high speed, the regular processing function block does not support user's customization.
The time-sharing execution type sequence control module 34 executes an irregular function block called from the irregular processing function block storage 35 by using free time in the control period. The irregular processing function block can be customized freely by the user through the builder 81, downloaded into the irregular processing function block storage 35, and called and executed by the time-sharing execution type sequence control module 34.
The regular processing function block executed surely in a predetermined control period controls a sequence which performs processing determined periodically whereas the irregular processing function block controls a sequence which is so low in temporal restriction so that free time in the control period can be used and which needs to be customized freely.
The irregular processing function block is hereinafter referred to as SEBOL (SEquence and Batch Oriented Language) function block. SEBOL is a programming language which has characteristic specialized in batch control in addition to operation of a general programming language usually used.
The engineer can further select componentized function blocks from a component palette (not shown) or the like and pastes the selected componentized function blocks on a control drawing screen 92 so that the selected componentized function blocks are written in order of execution to thereby form a sequence.
The engineer delivers the contents written on the control drawing screen 92 to the execution link generating module 93 so that the execution link generating module 93 processes the contents to thereby generate a periodic execution link 94 and a time-sharing execution link 95. In the periodic execution link 94, an execution sequence of the regular processing function blocks (PID, SIO, PVI01, PVI02) to be processed by the periodic execution type sequence control module 33 is prescribed. In the time-sharing execution link 95, an execution sequence of SEBOL function blocks (SEBOL01, SEBOL02) to be processed by the time-sharing execution type sequence control module 34 is prescribed.
In the sequence controller 30, a plurality of program units perform processing in accordance with their processing priorities. The term “program units” used herein means programs to be executed in accordance with the high speed control period T1, the middle speed control period T2 and the basic control period T3 (e.g. 1 second) respectively.
In the high speed control period T1 shown in (A) of
Each of program units of the high speed, middle speed and basic control periods is composed of control drawings (92 in
Function blocks of each control period execute periodically determined processing respectively. The current processing is interrupted when processing timing of a function block having higher priority has come before completion of the processing. The interrupted processing is restarted after execution of higher-priority processing. Interruption of processing is performed in one of boundaries between function blocks (e.g. 101 to 105).
(D) of
Each program unit of free time processing is composed of function blocks 200. Each function block is composed of SEBOL function blocks each having lines in the programming language.
Each SEBOL function block is executed not by function block but by unit of SEBOL lines (e.g. 20 lines) forming the function block. After execution of one unit of SEBOL 20 lines, a next unit of SEBOL 20 lines of the function block is executed successively to thereby advance processing.
Such processing that a predetermined quantity of processing is to be executed at regular intervals (other blocks than SEBOL function blocks) is executed in the high speed, middle speed and basic control periods, whereas processing low in temporal restriction (SEBOL function blocks) is executed in the free time processing. The free time processing can be interrupted in each boundary between adjacent units of SEBOL 20 lines.
[Patent Document 1] JP-A-08-076836
[Non-Patent Document 1] CENTUM VP Reference SEBOL Edition, Document No. IM 33M01A30-40, Yokogawa Electric Corporation
The degree of freedom in user's writing and setting each SEBOL function block is so high that the processing time of the SEBOL function block varies widely. For this reason, the related art is provided on the assumption that the SEBOL function block is executed in a free time processing and when the whole of the SEBOL function block cannot be processed completely in the free time processing, the remaining processing is carried over to a free time processing of the next basic period. This has been regarded as a merit.
On the other hand, processing load in the high speed, middle speed and basic control periods is so heavy that there is a possibility that processing may be disabled for a long time when there is no free time existed. There is a problem that execution cannot be warranted when periodically determined processing is desired to be performed in the SEBOL function block.
Exemplary embodiments of the present invention provide a sequence controller which makes it possible to operate SEBOL function blocks in a control period in which a periodic execution type sequence control module executes regular processing function blocks.
A sequence controller according to an exemplary embodiment of the invention, comprises:
a periodic execution type sequence control module configured to execute each regular processing function block in a predetermined control period;
an irregular processing function block storage configured to hold an irregular processing function block generated by a user; and
a time-sharing execution type sequence control module configured to execute the irregular processing function block called from the irregular processing function block storage in free time of the control period,
wherein the periodic execution type sequence control module is configured to call the irregular processing function block from the irregular processing function block storage and to execute the irregular processing function block in the control period.
The periodic execution type sequence control module may be configured to perform execution in at least one of a basic control period, a middle speed control period and a high speed control period, the middle speed control period and the high speed control period being rapider than the basic control period.
The irregular processing function block may be executed in accordance with each program unit having a predetermined number of lines, and
switching from the irregular processing function block called and executed by the periodic execution type sequence control module in the control period to the regular processing function block may be executed after completion of processing of the last line of the program unit.
The irregular processing function block called and executed by the periodic execution type sequence control module in the control period may be formed so that repeated processing of the irregular processing function block is limited to one loop in the basic control period.
The irregular processing function block called and executed by the periodic execution type sequence control module in the control period may be formed so that processing of the irregular processing function block is interrupted in the basic control period when processing of jumping to a forward designated address is performed.
According to the embodiment of the invention, the following effects can be expected.
(1) Periodic execution type SEBOL used when periodically determined processing is to be performed on SEBOL function blocks can be provided as a new execution form in addition to the existing time-sharing execution type SEBOL used when temporal restriction is so low that there are a lot of processing contents in SEBOL function blocks.
A user can select one from the two execution forms of time-sharing execution type SEBOL and periodic execution type SEBOL in accordance with requirements of process control, so that the general purpose of SEBOL function blocks can be enhanced.
The invention will be described below in detail with reference to the drawings.
In
Here, the SEBOL function block SEBOL(P) is an SEBOL function block which will be called from the irregular processing function block storage 35 and executed by the periodic execution type sequence control module 300. The SEBOL function block SEBOL(T) is an SEBOL function block which will be called from the irregular processing function block storage 35 and executed by a time-sharing execution type sequence control module 34 in the same manner as in the related art.
Componentized function blocks are selected from a component palette (not shown) or the like and pasted on a control drawing screen 92′ so that the componentized function blocks can be written in order of execution to thereby configure a sequence.
The engineer delivers the contents written on the control drawing screen 92′ to an execution link generating module 93′ so that the execution link generating module 93′ processes the contents to thereby generate a periodic execution link 94′ and a time-sharing execution link 95′. In the periodic execution link 94′, order of execution of function blocks (PID, SEBOL(P), SIO, PVI01, PVI02) as a mixture of regular processing function blocks and an SEBOL function block to be processed by the periodic execution type sequence control module 300 is prescribed. In the time-sharing execution link 95′, order of execution of an SEBOL function block (SEBOL(T)) to be processed by the time-sharing execution type sequence control module 34 is prescribed.
With respect to an SEBOL function block which will be called from the irregular processing function block storage 35 and executed by the periodic execution type sequence control module 300, a user registers the SEBOL function block identified/written as SEBOL(P) on the execution sequence definition screen 91′ and the control drawing screen 92′, so that the execution link generating module 93′ registers the SEBOL function block in the periodic execution link 94′.
Because the periodic execution type sequence control module 300 cannot execute any SEBOL function block directly, the periodic execution type sequence control module 300 calls the SEBOL function block from the irregular processing function block storage 35 and executes the SEBOL function block when the SEBOL function block appears in the execution link of the high speed, middle speed and basic control periods.
Although the SEBOL function block substantially has the same operation in the case where the SEBOL function block is processed by the periodic execution type sequence control module 300 and in the case where the SEBOL function block is processed by the time-sharing execution type sequence control module 34, processing of the SEBOL function block is different in the following point.
Processing of the SEBOL function block (SEBOL(P)) operating in each of the high speed, middle speed and basic control periods is not interrupted according to units of SEBOL 20 lines but continued to the last. However, when there appears an instruction statement which means interruption because of processing timing of a higher-priority control period, access to an external device and the programming language, the processing of the SEBOL function block (SEBOL(P)) is interrupted.
Interruption is performed in a boundary between adjacent units of SEBOL 20 lines. With respect to interruption due to the higher-priority control period, the processing of the interrupted SEBOL function block is restarted in the same period after completion of execution for the higher-priority control period.
Although processing of the SEBOL function block according to the related art is interrupted regardless of the contents written in the programming language when there is no time left in the basic control period, there is a possibility that the periodic execution type SEBOL to be executed by the periodic execution type sequence control module 300 may have an infinite loop generated according to the contents written in the programming language to thereby make the processing endless because the periodic execution type SEBOL has such a specification that processing is continued to the last even if there is no time left in the basic control period.
Statement processing which may be conceived as a factor of generation of an infinite loop in the periodic execution type SEBOL is processing (while, repeat, for) of repeating under a specific condition and processing (goto) of jumping to a designated address.
As for these statement processes, the periodic execution type SEBOL therefore has such a specification that processing (while, repeat, for) of repeating is limited to one loop in the basic control period and that processing (goto) of jumping to a designated address is formed so that processing for the basic period is interrupted when jumping to a forward address is performed. Consequently, an infinite loop can be avoided in the periodic execution type SEBOL.
The buffer has such a specification that the buffer is released when there is a response to the request. Because the number of buffers is finite, the buffer overflows when the buffer takes a long time for receiving the response or when the request to the external device is issued more frequently than the buffer size. The overflowing request is stored in a queue 600. When the buffer full state is improved in accordance with the response from the external device, a process of transferring the overflowing request from the queue 600 to the buffer 500 is performed.
Although there is no problem in the time-sharing execution type SEBOL 400 in which the buffer 500 and the queue 600 are managed in accordance with a single program as shown in
As a result, there is a possibility that processing of the time-sharing execution type SEBOL 400 may not be performed at all. Accordingly, there is a possibility that an extreme difference in processing performance will be generated between the periodic execution type SEBOL 700 and the time-sharing execution type SEBOL 400.
The time-sharing execution type SEBOL 400 transmits/receives a request using the buffer 500 and the queue 600 for time-sharing execution type SEBOL. The periodic execution type SEBOL 700 transmits/receives a request using the buffer 800 and the queue 900 for periodic execution type SEBOL.
Because the time-sharing execution type SEBOL and the periodic execution type SEBOL have exclusive buffers and queues respectively as described above, requests from one side of the time-sharing execution type SEBOL and the periodic execution type SEBOL can be prevented from occupying all the buffers. Accordingly, it is possible to solve the problem that a difference in processing efficiency is generated between the time-sharing execution type SEBOL and the periodic execution type SEBOL.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the invention. Indeed, the novel system described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the system, described herein may be made without departing from the sprit of the invention. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and sprit of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2010-168218 | Jul 2010 | JP | national |