Справочник Пользователя для Mitsubishi Electronics FX2NC

Скачать
Страница из 382
FX Series Programmable Controllers
STL Programming 3
3-2
3.2
How STL Operates
As previously mentioned, STL is a system which
allows the user to write a program which functions
in much the same way as a flow chart, this can be
seen in the diagram opposite.
STL derives its strength by organizing a larger
program into smaller more manageable parts.
Each of these parts can be referred to as either a
state or a step. To help identify the states, each is
given a unique identification number. These
numbers are taken from the state relay devices
(see page 4-6 for more details).
3.2.1
Each step is a program
Each state is completely isolated from all other states within the whole program. A good way to
envisage this, is that each state is a separate program and the user puts each of those
programs together in the order that they require to perform their task. Immediately this means
that states can be reused many times and in different orders. This saves on programming time
AND cuts down on the number of programming errors encountered.
A Look Inside an STL
On initial inspection the STL program looks as if it is a rather basic flow diagram. But to find out
what is really happening the STL state needs to be put ‘under a microscope’ so to speak.
When a single state is examined in more detail, the sub-program can be viewed.
With the exception of the STL instruction, it will be
immediately seen that the STL sub-program looks
just like ordinary programming.
The STL instruction is shown as a ‘fat’ normally
open contact.
All programming after an STL instruction is only
active when the associated state coil is active.
The transition condition is also written using
standard programming.
This idea re-enforces the concept that STL is really
a method of sequencing a series of events or as
m e n tio n e d   e a rl ie r  ‘of  jo in ing  l ot s   of   s maller
programs together’.
M8002
X0
X1
S 0
S 26
X0
X1
X15
S 22
S 27
T0
T7
S 22
T0
1
2
STL
S 22
SET S 27
T0
Y22
K20
2
1
T0