User program (User_PRG)

The user program is created once, initially, by automatic code generation. Since the program is not overwritten with each subsequent creation, this is the appropriate place for integrating user programs.

The program is divided into the actions described in the following. These actions differ in the time at which they are called during the program sequence.

INIT

The user program can be initialized in the INIT action. This action is synchronized with the INIT action of the SEW_PRG system program. Processing of the MOVIKIT® software modules does not begin until the variable xInitDone is set to "TRUE".

MAIN

In the MAIN action, the user can insert program code and call additional programs. The MAIN action is called in the TaskMain task before the MAIN actions of the software modules.

HIGHPRIO

In the HIGHPRIO action, the user can insert program code and call additional programs. The HIGHPRIO action is called in the TaskHighPrio task before the HIGHPRIO actions of the software modules.

ReadActualValues

The ReadActualValues action is run in order to read the process input data image and in this way to make it available consistently.

WriteSetpointValues

The WriteSetpointValues action is run to write the process output data image in order to apply all values at the same time.