Jump - Start

Edit mode

Run and online mode

Online mode

This function block, together with a jump destination block, will realize a jump within a program.

In this way the program execution can be manipulated at will. The output MYDEST has to be connected to a jump destination block, otherwise the download to the target system will fail.

If the input MAKEJMP is HIGH the program will jump to the connected destination block, otherwise the normal working sequence is processed.

A jump can be made forward or backward to an earlier function block. Backward jumps can easily generate infinite loops. A so called Watchdog is used to keep the overall system working. It is used to limit the number of backward jumps for a single cycle. For this case, an internal variable counts the number of backward jumps. If the limit is reached, the function block interrupts the execution of its thread. Therefore other threads with a lower priority can be executed. Then the watchdog counter will be reset and the program continues its run where it stops. Only the program where this function block belongs to will be interrupted, parallel working programs are not affected.

An example and more explanations about program execution and working sequence can be found in the chapter Introduction.

Parameters

The parameter dialog can be used to specify the maximum number of backward jumps the Watchdog counter allows in a single cycle. The parameter dialog can be opened only at run mode and only if the function block will perform a backward jump.

Signals

Name I/O Type(s) Function
MAKEJMP I BIT Perform jump
MYDEST O DBCTRL Connection to jump destination

Visualization

A gray triangle, visible in run mode and online observation, indicates the jump direction. A forward jump points to the right and a backward jump points to the left.

During Online observation the arrows in the symbol are colored differently. Gray arrows indicate that this function block was never used. A green arrow to the right site indicates that the working sequence has not been modified and no jump was executed. A red arrow downwards indicates that the working sequence has been modified and the program continues at the destination function block. A yellow arrow downwards indicates that a modification of the working sequence is scheduled but in this program cycle the function block is not reachable. For example another jump function block could skip this program part.

If the function block is not connected properly, the symbol will be depicted red.

Comments

The use of these jump blocks can lead to a very complex and complicated program execution. Therefore it is easily possible to create unwanted effects. So these jump blocks should only used with care.