Using the 'Calculate' instruction (S7-1200, S7-1500) - STEP 7

Creating FBD programs

ft:publication_title
Creating FBD programs
Product
STEP 7
Version
V20
Publication date
11/2024
Language
en-US
Using the "Calculate" instruction

Requirement

A network is available.

Procedure

Proceed as follows to use the "Calculate" instruction:

  1. Open the "Instructions" task card.

  2. Navigate to "Math functions > CALCULATE" in the "Basic instructions" pane.

  3. Use drag-and-drop to move the element to the desired place in the network.

    The instruction "Calculate" will be inserted for the data type with a placeholder expression and question mark.

  4. Enter the data type for the calculation.

  5. Enter the operands for the calculation.

    Note

    The calculation is run with the inputs of the "Calculate" instruction. If you want to use constants you must also insert appropriate inputs for them.

  6. Click on the "Edit 'Calculate' instruction" button to replace the placeholder expression with the correct expression.

    The "Edit 'Calculate' instruction" dialog will open.

  7. Enter the required expression in the "OUT:= " text box.

    Note

    In the "Example" area you can find an example of a valid expression and possible instructions that you can use.

    To determine a value with the help of Pythagoras' theorem, for example, enter "OUT := SQRT (SQR (IN1) + SQR (IN2))".

  8. Confirm your entry with "OK".