Function Block Diagram Elements and How They Work (GS 4.2)

The STEP 7-Micro/WIN 32 Function Block Diagram (FBD) editor allows you to view the instructions as logic boxes that resemble common logic gate diagrams:

You can use the AND button (or the instruction tree) to insert an AND instruction.

You can use the OR button (or the instruction tree) to insert an OR instruction.

You can use the BOX button (or the instruction tree) to select any other FBD box.


The program logic is derived from the connections between these box instructions. That is, the output from one instruction (such as an AND box) can be used to enable another instruction (such as a timer) to create the necessary control logic.

This topic describes several ways that you can modify the inputs and outputs of FBD instructions:

Negating Inputs
You can negate a boolean (bit value) input, creating an inverted logic condition (the input becomes normally closed/ON instead of normally open/OFF).

Making Inputs or Outputs Immediate
You can turn a boolean (bit value) input or output into an immediate input/immediate output, so that the address is updated immediately instead of being updated at a fixed interval during the regular scan cycle of the program.

Adding or Removing Extra Inputs
You can also add extra inputs to an AND or OR instruction if your program logic requires. If you change your mind, you can remove the extra inputs and return the instruction to its default of 2 inputs.

Negating Inputs

Back to Top

You can negate a boolean (bit value) input, or toggle it back to a normal input:

1.Select the desired instruction (by clicking on it or pressing the ENTER key until a selection box appears around the instruction).

2.Use the TAB key to move to the input that you want to change (or click directly on the input).
Note: The selected input line is colored red; the lines of the inputs that are not selected are colored black.

3.Click on the Toggle Negate button, or press the F11 shortcut key, to toggle the input between normal and negated as desired.
Note: Normal inputs look like lines; negated inputs look like circles.

Note: The negate and immediate properties can be applied in combination to a parameter; they are not mutually exclusive.

Making Inputs or Outputs Immediate

Back to Top

You can change a boolean (bit value) input or output to an immediate I/O value, and you can toggle the immediate value back to a buffered value:

1.Select the desired instruction (by clicking on it or pressing the ENTER key until a selection box appears around the instruction).

2.Use the TAB key to move to the parameter that you want to change (or click directly on the parameter).
Note: The line of the input or output that you select is colored red; the lines to the inputs and/or outputs that are not selected are colored black.

3.Click the Toggle Immediate button, or press the CTRL + F11 shortcut keys, to toggle the parameter between buffered and immediate as desired.

Note: The negate and immediate properties can be applied in combination to a parameter; they are not mutually exclusive.

Adding or Removing Extra Inputs

Back to Top

You can add and remove extra inputs to AND or OR instructions:

1.Select the desired instruction (by clicking on it or pressing the ENTER key until a selection box appears around the instruction).

2.Click the Add Input button or press the PLUS SIGN shortcut key to add extra inputs. -OR-

3.Click the Remove Input button or press the MINUS SIGN shortcut key to remove extra inputs.

Note:

A 1 input AND box is supported. The 1 input AND box is the FBD program view of a single STL LD instruction or a single LAD contact. To place a 1 input AND box in your program, use a 2 input box and then delete 1 input with the remove input button .