Mitsubishi Electronics FX2C Home Theater Server User Manual


 
FX Series Programmable Controllers STL Programming 3
3-16
3.11 Programming Examples
3.11.1 A Simple STL Flow
This simple example is an excerpt from a semi-automatic loadin
g
-unloadin
g
ore truck pro
g
ram.
This example pro
g
ram has a built in, initialization routine which occurs onl
y
when the PLC is
powered from OFF to ON. This is achieved b
y
usin
g
the special auxiliar
y
rela
y
M8002.
This activates a Zone ReSeT (ZRST is applied
instruction 40) instruction which ensures all of
the operational STL states within the pro
g
ram
are reset. The pro
g
ram example opposite
shows an M8002/ZRST example.
The push button X0 acts as a start button and a mode selection button. The STL state S0 is
initialized with the ZRST instruction. The s
y
stem waits until inputs X0 and X2 are
g
iven and Y
13 is not active. In the scenario this means the ore truck is positioned at the ore dischar
g
e
point, i.e. above the position sensor X2. The ore truck is not currentl
y
dischar
g
in
g
its load, i.e.
the si
g
nal to open the trucks unloadin
g
doors (Y13) is not active and the start button (X0) has
been
g
iven. Once all of the points have been met the pro
g
ram steps on to state S21.
On this state the ore cart is moved (Y10) and positioned (X1) at the loadin
g
hopper. If the start
button (X0) is pressed durin
g
this sta
g
e the ore cart will be set into a repeat mode (M2 is reset)
where the ore truck is immediatel
y
returned to the loadin
g
hopper after dischar
g
in
g
its current
load. This repeat mode must be selected on ever
y
return to the loadin
g
station.
Once at the loadin
g
point the pro
g
ram steps onto state S22. This state opens the hoppers
doors (Y11) and fills the truck with ore. After a timed duration, state S23 is activated and the
truck returns (Y12) to the dischar
g
e point (X2).
Y13
X0
Y10
Y12
X2 X1
Y11
Loading hopper
Ore truck
Ore dischange point
Start button
M8002
ZRST S21 S25