Samples
12-13
FM 351 Positioning Module
C79000-G7076-C351-02
User program FB1 (USER_PROG):
The user program accesses the data in the module-specific data blocks
(USER_DB) with the form <blockname>.<symbolic name>. This means that the
user program can operate exactly one channel. The DB number specified in the
user program call is simply passed on so that FC_ ABS_CTRL is supplied with
values. With this type of programming, you can access data in the data block using
symbolic names. Indirect addressing of more than one channel is part of the
sample program 6 “MultiChannels”.
The user program executes a sequence of steps made up as follows:
Step 0: The positioning module is initialized. The jobs with the corresponding data
are set that will be executed when the module is started up.
Step 1: The program waits for the jobs set in step 0 to be processed.
Step 2: The values set for the incremental dimension “USER_DB”.TRG_INC_1 is
entered in the incremental dimension table. The incremental dimension table is
then written to the module. The control signals for the first incremental approach
are sent at the same time. FC ABS_CTRL make sure that the order of execution
from step 2 in correct.
Step 3: The program waits for the execution of the set write job.
Step 4: The program waits for the “PEH” return signal and the updated position
values from the first incremental approach.
Step 5: The values set for the second incremental approach, switchover
difference, and switch-off difference are entered in the channel DB. The second
incremental approach with incremental dimension number 255 is then started with
“USER_DB”.START_INC_2 .
Step 6: The program waits for the execution of the set jobs.
Step 7: If an error occurs in the execution, the sequence of steps is stopped.