Temporary Variables

Top  Previous  Next

 

Saving temporary results that are only needed within a block (OB, FC, FB) you can declare temporary variables. Calling a block these temporary storages have no defined value. That is why you have to note that you have to assign a value to them before the first read-access. After the process of the block the here saved values are not available anymore.

In the STEP®5 – world this task was done by a marker area that was called ‘Smear Marker’, which could be used by different program parts at the same time if there was a lack of markers.

The nice thing about temporary variables is their name. As smear markers were used in different meanings it was only possible to give them the not very expressive comment ‘Smear Marker’. But the temporary variables can be named according to their content.

 

Internally the temporary variables are saved on the stack.

 

Static Variables

 

Functions

Function Block

Organization Block

Data Types