Mitsubishi Electronics FX Home Theater Server User Manual


 
FX Series Programmable Controllers STL Programming 3
3-11
3.7 Using STL To Select The Most
Appropriate Program
So far STL has been considered as a simple flow chartin
g
pro
g
rammin
g
lan
g
ua
g
e. One of
STL’s exceptional features is the abilit
y
to create pro
g
rams which can have several operatin
g
modes. For example certain machines require a selection of ‘manual’ and ‘automatic’ modes,
other machines ma
y
need the abilit
y
to select the operation or manufacturin
g
processes
required to produce products ‘A’, ‘B’, ‘C’, or ‘D’. STL achieves this b
y
allowin
g
multiple pro
g
ram
branches to ori
g
inate from one STL state. Each branch is then pro
g
rammed as an individual
operatin
g
mode, and because each operatin
g
mode should act individuall
y
, i.e. there should be
no other modes active; the selection of the pro
g
ram branch must be mutuall
y
exclusive. This
t
y
pe of pro
g
ram construction is called “Selective Branch Pro
g
rammin
g
”. An example
instruction pro
g
ram can be seen below, (this is the sub-pro
g
ram for STL state S20 onl
y
) notice
how each branch is SET b
y
a different contact.
A pro
g
rammin
g
construction to split the pro
g
ram flow between different branches is ver
y
useful
but it would be more useful if it could be used with a method to re
j
oin a set of individual
branches.
This t
y
pe of STL pro
g
ram construction is called a “First State Mer
g
e” simpl
y
because the first
state (in the example S29, S39 or S49) to complete its operation will cause the mer
g
in
g
state
(S50) to be activated. It should be noticed how each of the final STL states on the different
pro
g
ram branches call the same “
j
oinin
g
” STL state.
Y0
X0
X1 X2
S
Y
X
S
X
S
X
S
20
0
21
1
31
2
41
STL
OUT
LD
SET
LD
SET
SET
LD
0
S 21 S 31 S 41
S 20
Y10
S 29
X10
S 39 S 49
X11 X12
Y11
Y12
S 50
STL
OUT
S
Y
39
11
STL
OUT
S
Y
49
12
LD
SET
X
S
10
50
LD
SET
X
S
11
50
LD
SET
X
S
12
50
STL
OUT
S
Y
29
10