Programming the FM 351
6-10
FM 351 Positioning Module
C79000-G7076-C351-02
Program Structure
Figure 6-2 shows the structure of a user program for controlling a channel of the
module cyclically after a single startup initialization. The return value (RET_VAL) of
FC ABS_CTRL is used in the user program for general error evaluation.
An independent and simultaneous startup is possible for each further channel as
shown in Figure 6-2.
Initialization:
Call FC ABS_INIT
Set job data and job trigger bits
Set control signals
Call FC ABS_CTRL
Evaluate return value (RET_VAL) of FC ABS_CTRL
<0 =0 >0
General
non-specified
reaction to:
data error,
programming error
Evaluate
data of read jobs and
return signals
Cyclic call
(e.g. OB1)
Single call
(e.g. OB100)
Are jobs still
unfinished?
Yes
No
Next job
Next cycle
If applic.
Error Jobs done
Jobs being
executed
Figure 6-2 General Program Structure