Information Technology Reference
In-Depth Information
no_tr
tr
no_tr
N
0 s,
T
tr
all
5 s,
{ no_tr,tr }
X
0 s,
all
all
Fig. 5.
PLC-Automaton for the lter
FES
react as fast as possible to the input values. However in the state with output
T
the inscriptions are 5
s
and
fno; no trg
. This species that in this state the
automaton should ignore all inputs
for 5 seconds. This realises
the lter requirement of
FES
discussed in Section 4. On the other hand, the
automaton should react to an input
Error
as fast as possible by switching to the
state with output
no
and
no tr
X
. As fast as possible means here within 2
"
PLC
seconds.
6
Programs: Structured Text
For PLCs several dedicated programming notations have been devised. The one
resembling most clearly other imperative programming languages is ST (
Struc-
tured Text
)[19,26].
Fig. 6 shows an ST program
PRG FES
implementing the PLC-Automaton of
Fig. 5. In ST timers are declared as variables of a special type
TP
. The program
PRG FES
contains a declaration of such a variable called
timer
. The statement
timer
(
IN
:=
TRUE
;
PT
:=
t
#
5
:
0s
)
switches the timer on and sets it to 5 seconds. This statement is executed when
entering state 1. The condition
NOT timer.Q
is true as soon as the
timer
has
expired. This condition has to be met in order to react to the input
no tr
by
switching to state 0. The statement
timer
(
IN
:=
FALSE
;
PT
:=
t
#
0
:
0s
)
switches the
timer
o. It is executed when leaving state 1.
7
Semantic Link
We have now discussed three levels of abstraction for real-time systems, each
one with its own notation: requirements, design specications, and programs.
How can these notations be linked together in a correct way ? To this end, we
instantiate the logic-based approach outlined in Section 2.
Search WWH ::
Custom Search