FX Series Programmable Controllers STL Programming 3
3-4
Initial Steps
For an STL pro
ram which is to be activated
on the initial power up of the PLC, a tri
er
similar to that shown opposite could be used,
i.e. usin
M8002 to drive the settin
of the
initial state.
The STL step started in this manner is often
referred to as the initial step. Similarl
, the
step activated first for an
STL sequence is
also called the initial step.
3.3.3 Terminating an STL Program
Once an STL pro
ram has been started the pro
rammable controllers CPU will process all fol-
lowin
instructions as bein
part of that STL pro
ram. This means that when a second pro-
ram scan is started the normal instructions at the be
innin
of the pro
ram are considered to
be within the STL pro
ram. This is obviousl
incorrect and the CPU will proceed to identif
a
pro
rammin
error and disable the pro
rammable controllers operation.
This scenario ma
seem a little stran
e but it does make sense when it is considered that the
STL pro
ram must return control to the ladder pro
ram after STL operation is complete. This
means the last step in an STL pro
ram needs to be identified in some wa
.
Returning to Standard Ladder
This is achieved b
placin
a RET or RETurn
instruction as the last instruction in the last
STL step of an STL pro
ram block.
This instruction then returns pro
rammin
con-
trol to the ladder sequence.
STL
S005
M8002
SET S005
X001
X000
X012
X013
Y000
Y011
Y014
STL
S005
M8002
SET S005
X001
X000
X012
X013
Y000
Y011
Y014
RET
Note: The RET instruction can be used to separate STL pro
rams into sections, with stan-
dard ladder between each STL pro
ram. For displa
of STL in SFC st
le format the RET
instruction is used to indicate the end of a complete STL pro
ram.