
B–61863E/15
2. STEP SEQUENCE BASICSSTEP SEQUENCE FUNCTION
985
In the step sequence method, a program is created (edited) in units of
subprograms. The edited source program is compiled andconverted to an
executable ROM–format program, thenlinked, as shown in Fig. 2.2 (a).
A ROM–format program is a kind of a modular program, created using
conventional subprograms. A step sequence block is also a type of a
subprogram. Step sequence blocks are linked to the end of the first level
to third level ladder programs, together with other ladder subprograms.
In the same way as in the ladder method, a program is activated at certain
intervals, namely every 8 ms, as shown in Fig. 2.2 (b). The first level and
second level ladders are executed for a certain period (T ms), then the third
level ladder is executed for the remaining time. The period in which the
first level and second level ladders are executed varies with the PMC
model and the setting of the system parameter (LADDER EXEC).
Whether the third level ladder can be used depends on the PMC model.
8msec 8msec 8msec
T msec T msec T msec
°division °division °finished
First level
Second level
Third level
(depends on
the PMC model)
tn–8 tn+0 tn+8 tn+16
Fig. 2.2 (b) Execution of program cyclically
After the first level ladder has been executed, the second level ladder i
executed for the remaining time. If the second level ladder cannot be fully
executed within one execution period, it is suspended part–way, with the
remainder being executed in the nextperiod. This type of execution is
called divided execution. Where the second level ladder is divided varies
with the execution time of the first level ladder and that of the executed
instructions of the second level ladder. Divided execution is divided into
two types, divided system and undivided system. In the divided system,
the position where the second level ladder is divided is determined in
advance, a divided instruction code being inserted at that position. In the
undivided system, in contrast, where the second level ladder is divided is
not determined in advance, the ladder being automatically divided upon
the determined period elapsing. A PMC which allows step sequence
programming executes the second level ladder in undivided system.