Professional Documents
Culture Documents
Figure 4-a illustrates the type declaration of a ( 2 4) as well as specic NCES parts: event link
t ;p
function block on the example of INTEGRAL-REAL from the transition 1 to transition 2, and condition
t t
function block borrowed from the draft of IEC 1499 link from the place 3 to transition 1 . The event
p t
(Table 2.2.1 and Annex H), and Figure 4-b shows arc ( 1 2) forces transition 2 to re simultaneously
t ;t t
its Execution Control Chart and internal algorithms, with 1 if it is enabled. In general, a transition having
t
illustrating the rules stated above. Functionality of several incoming event arcs res (when it is enabled)
the block is quite trivial - it integrates the function when at least one of the event inputs is true (one
given by the value of the input XIN (of type REAL) of the driving transitions res). Firing of such de-
driven by the event input EX, providing the result pendent transitions occurs simultaneously, which is
as an output XOUT. Initial value 0 is set to XOUT called as transition step. In the example the transi-
by the algorithm INIT, which is called driven by the tion step is = [ 1 2].
TR t ;t
signal INIT, and then every occurrence of EX event The condition arc ( 3 1 ) adds an additional con-
p ;t
adds to XOUT value of XIN integrated over the time dition on the enableness of 1 - along with marking
t
Thanks to the simple functionality, we use this abled. So, in the state, described by the marking
example to illustrate the rules of transformation of P = f 1 3g (state is dened by the set of places,
p ;p
function blocks to the model. The same rules can having non-zero marking) the net exhibits the follow-
obviously be applied to blocks with much more so- ing behavior: spontaneous transition 1 is enabled, t
As far as the IEC1499 function blocks concerned, enabled but cannot re spontaneously because of in-
we are interested in verication of temporal and qual- coming event arc. However, when 1 res, it drives t
itative liveness and safety properties expressed in t2 to re too. So the next state of the net would
terms of timing and sequencing of input and output be = f 2 4g which is terminal, since no more
P p ;p
3. t
The hierarchy of structures provided in the standard In our model, we implement the behavior of event
implies the corresponding way of modeling - we go- input and event input variables by two NCES pre-
ing to start from the simplest basic functional blocks, sented in Figure 3-a,b.
a) b) c)
Figure 3: a)Event input state machine and its NCES model; b) Event input variable model; c)Operation of execution control
state machine modeled by NCES.
Operation of the Execution Control Chart is de- plays the place 1 , 2 - it ensures that new transition
S
scribed in the IEC1499 by means of the state machine evaluation is done after the event variables used in
shown in Figure and Table 2.2.2.2-2 of the draft. It is the previously cleared transition have been reset.
represented by the NCES model in Figure 3-c. Sim- For structural clearness we connect the correspond-
ilar to the event input state machine, the state ma- ing EI-SM and EIVS modules by the event arc "Set
chine of execution control also denes a Mealey au- EI" though originally this operation was initiated by
tomaton with input and output symbols associated the state machine ECO-SM (the following behavior
with arcs. The table of conditions and operations is dened in the standard: rst event X occurs and
is presented in Table 2. It requires some comments forces transition of EI-SM from S0 to S1, then it is-
since there are multiple operations associated with sues "Invoke ECC" which is input of ECO-SM. The
some transition arcs. Sequence of the operations and latter must issue the "Set EI" for the event input
their timing seem to be important. Thus transition variable X). Implementing exactly this requirement
t1 is driven by the event "Invoke ECC" and has the would need one ECO-SM model for each event input.
following associated operations: Instead, we change the sequence of the transitions as
follows: rst event X occurs, then EI-SM issues "Set
1. Set EI variables and sample associated vari- EI" event signal which forces transition in the EIVS
ables; of X, and the latter invokes ECO-SM.
2. Conrm input(s) mapped; Building the NCES model for execution control
chart is described in the next section.
3. Evaluate transitions;
First operation sends an event signal to the model of
corresponding event input variable, second - to the
5 Model of Execution Control
state machine implementing the corresponding event The draft of IEC1499 states that "the operation of
input, and the third sends activation signal to the the ECC shall be functionally equivalent to the rules
NCES model of Execution Control Chart. It is essen- of evolution for Sequential Function Charts (SFCs)
tial to ensure that the latter signal is issued after the given in subclause 2.6.5 of IEC 1131-3".
rst operation has been completed, because value of The ECC is a simplied sequential function chart
event input variable might be used for evaluation of (SFC), where the only initial state is present, and
transitions in the model of ECC. To ensure this func- each transition has exactly one source and target
tionality we initiate the rst operation in the model state. As a consequence, in ECC only one active
of event input (EI-SM). By means of event arc "Set state can be present at every time instance.
EI" it forces transition in the Event Input Variable The execution control chart is transformed into
Storage, which, in turn invokes the ECO-SM model. an NCES model, which consists of the corresponding
Finally, the latter issues the signal "Evaluate transi- "modules" for each state, action, and transition, and
tions". Though basic structure of ECO-SM model is has an additional module, named Transition Evalu-
similar to the original ECO SM (places 0, 1, 2 cor-
S S S ation Monitor (further abbr. TEM), which insures
respond to the states 0, 1, 2), we introduce an ad-
S S S the issuance of either of the output signals "A tran-
ditional "transitional" place in the ECO-SM model sition clears" or "No transitions clear", required by
(marked 0 , 1), which ensures that variable setting
S the EC state machine.
is completed before the transition evaluation. Since
the transition from 0 , 1 to 1 is not forced by any
S S
The standard sets the followingrules concerning tran- Figure 4: Type declaration of INTEGER-REAL function
block (a), its execution control chart (b).
sitions between states of EC:
1. Each EC transition shall have an associated response to the forcing signal "Evaluate transitions"
Boolean condition, equivalent to a Boolean ex- and to issue the corresponding signal.
pression utilizing one or more event input vari- Figure 5-a shows an example of TEMs binding to
ables, input variables, output variables, or in- the NCES model of ECC. Structure of the TEM is
ternal variables of the function block. shown in detail in Figure 5-b. Places in the TEM
2. Evaluation of an EC transition condition is dis- have the following meaning:
abled until ALL the algorithms associated with 1p - ECC is ready to "Evaluate transitions"
its predecessor EC state have completed their 2p - Transitions are being evaluated;
execution. 3p - No transition cleared so far;
4p - A transition cleared;
3. "Evaluation of transitions" consists of evalu- Transitions in the TEM have the following nota-
ating the conditions at all the EC transitions tion:
following the active EC state and clearing the 1t - TEM turns into evaluation mode;
rst EC transition (if any) for which a TRUE 2t - Transition clears, return to the initial state;
condition is found. "Clearing the EC transi- 3t - Clearance is established;
tion" consists of deactivating its predecessor 4t - No clearance of transition is proved;
EC state and activating its successor EC state. The input signal "Evaluate transitions" is directly
The order in which the EC transitions follow- connected to every transition which models an ECC
ing an active EC state are to be evaluated may transition. Every such a transition has a single out-
be provided by software tools. put event link, all of which are merged at the tran-
sition 3 of TEM. In our example all the transitions
t
The model has event input "Evaluate transitions" have the conditions expressed only in terms of con-
and is also connected to the event input variable dition variables.
modules. Input signal "Evaluate transitions" is con- In case if any of such transitions clears, it imme-
nected to every transition of ECC. The latter are diately forces 3 to re and moves the token from
t
transformed into NCES transitions with condition p4 to 3 . Simultaneously, the token of 1 moves to
p p
input from the Boolean expression. (Implementation p2 driven by the original "Evaluate transition" sig-
of Boolean expressions in NCES was in detail illus- nal. Thus, in the next state places 2 and 3 will
p p
trated in [3]). Besides, a transition has an event out- be marked and transition 2 becomes enabled and is
t
put, which is connected to the "Transition Clears" forced to re by the arc from 3. Therefore, it will
p
input of TEM. The main purpose of TEM is to de- re, issuing event T ransitionC lears and returning a
tect a situation when no ECC transition clears in token to the initial state.
a)
a)
b)
Figure 5: NCES model of the Execution Control Chart of the signal "Algorithms complete" provided the signal
the INTEGRAL-REAL function block (a) and NCES imple- "Schedule algorithms" is issued.
mentation of the Transition Evaluation Monitor (b) If more than one action is associated with a state,
then their execution follows the evaluation rules for
SFC given by IEC1131-3. Since the notion of action
Otherwise, if the initial signal "Evaluate Tran- qualier is not mentioned in IEC1499, we assume
sitions" causes no subsequent ring of ECC transi- that each action has the null qualier ( ), which
N
tions, a token moves from 1 to 2 , but another token
p p means that all the actions have to be started simul-
remains in 4. It will cause 4 to re and issue the
p t taneously.
signal "No transitions clear". A model of such a state is shown in Figure 6-a,b.
Models of each action can be further detailed using
5.2 States denition of its particular algorithm. In the NCES in
Figure 6-b it is assumed, that conditions "ACTION-
An EC state can have zero or more associated EC ac- completed" are issued by the corresponding NCES
tions. Each action can have an associated algorithm
i
g
8 Acknowledgement
as shown in Figure 6. First, the event signal EX The work is supported by the Deutsche Forschungs-
forces to re the following set of transitions: 0 = TR
gemeinschaft under the reference Ha 1886/10-1.
[ 6 12 13]. The following sequence of states and
References
t ;t ;t
draft
f2 1 3 52 8 3613 1514 2717 203 21 23 25 26 27 29 31g
s TR t ;t ;t s
p ;p ;p ;p ;p ;p ;p ;p ;p ;p ;p ;p ;p ;p ;p
Algorithm MAIN completed: [2] International Standard IEC 1131-3, Programmable Con-
! =[ ]! : trollers - Part 3, Bureau Central de la Commission Elec-
f3 1 3 53 7 2912 1614 3117 3420 1121 234 24 26 27 30 31g
s TR t ;t ;t ;t ;t s