How to Use FB in PLC Programming

How to Use FB in PLC Programming

With any controller or computing device, being able to define a function once and reuse the function over and over is a great way to make your program more efficient and robust.

In Siemens TIA Portal, an FB, or Function Block, is used to define a function, or set of instructions, which can be executed on command from an organization block, or OB. The function block is executed each time it is called from an OB.

Subscribe Share
How to Use FB in PLC Programming
  • 1. What is an FB

    With any controller or computing device, being able to define a function once and reuse the function over and over is a great way to make your program more efficient and robust.

    In Siemens TIA Portal, an FB, or Function Block, is used to define a function, or set of instructions, which can be ...

  • 2. How To Create FB in TIA Portal

    With any controller or computing device, being able to define a function once and reuse the function over and over is a great way to make your program more efficient and robust.

    In Siemens TIA Portal, an FB, or Function Block, is used to define a function, or set of instructions, which can be ...

  • 3. How to configure the logic for the FB

    In Siemens TIA Portal, an FB, or Function Block, is used to define a function, or set of instructions, which can be executed on command from an organization block, or OB.

    The function block is executed each time it is called from an OB.

    In this video, we will learn:
    – how to configure th...

  • 4. Calling the FB from the OB and Defining the Data Block

    In Siemens TIA Portal, an FB, or Function Block, is used to define a function, or set of instructions, which can be executed on command from an organization block, or OB. The function block is executed each time it is called from an OB.

    In the previous videos in this series, we learned how to...

  • 5. Practical Example of Using an FB (Valve Control) - Part 1

    In the previous videos in this series, we learned how to create and configure the logic for an FB in the STEP7 programming environment.

    In this video, we will learn how an FB can be used in a practical way through creating the logic for an on/off valve with a command disagree alarm.

    In the ...

  • 6. Practical Example of using an FB (Valve Control) - Part 2

    In the previous video in this series, we created an FB in the STEP7 programming environment to open and close an on/off valve with 2 position feedback sensors.

    We also configured an alarm to indicate a command disagree alarm that is generated if the valve has not reached the commanded positi...

  • 7. Practical Example of using an FB (Valve Control) - Part 3

    In the previous video in this series, we learned how to create the logic in the Main OB1 to call an FB to control an on/off valve with a command disagree alarm.

    In this video, I will configure the Data Block, or DB, for the Function Block, compile the OB and simulate the operation of the valve...

  • 8. Practical Example of using an FB (Sequencer) - Part 1

    In the previous videos in the series “How to Use Function Blocks (or FB) in a PLC Program”, I showed you how to configure an FB and its associated Data Block, or DB, and how to call the FB from the main program.

    In this video, you will learn:

    – What a drum sequencer is, and,
    – How it can ...

  • 9. Practical Example of using an FB (Sequencer) - Part 2

    In this series, we have seen that a Function Block has many practical real-world automation applications.

    I showed you how an FB and its associated data block are configured.

    In this video, I will show you how to configure a single block in the step seven programming environment to perfor...

  • 10. Practical Example of using an FB (Sequencer) - Part 3

    In this video, I will show you how to configure additional input and output parameters in the DRUM sequencer block in the Sequencer FB, and how to configure the DRUM sequencer block to execute the recipe for the batch process.

  • 11. Practical Example of using an FB (Sequencer) - Part 4

    In this series, we have seen that a Function Block has many practical real-world automation applications.

    Today, we will continue to develop the example of the small batch process with a large mixing tank with an agitator, four-ingredient addition lines, and a bottom valve.

  • 12. Practical Example of using an FB (Sequencer) - Part 5

    In this video, we will configure the transition logic for Step 2.

    I will use the same construction as for the previous rung, but I will change the “compare equal” instruction to compare the step number to two. I have added the “BATCH_START” bit to a “SET OUTPUT” coil as before.

    The PIN ch...

  • 13. Practical Example of using an FB (Sequencer) - Part 6

    In this series, we have seen that a Function Block has many practical real-world automation applications. Today, I will complete the example of the small batch process with a large mixing tank with an agitator, four-ingredient addition lines, and a bottom valve.

    In the previous video, I show...

  • 14. Practical Example of using an FB (Sequencer) - Part 7

    In this series, we have seen that a Function Block has many practical real-world automation applications.

    Today, I will complete the example of the small batch process with a large mixing tank with an agitator, four-ingredient addition lines, and a bottom valve.

    In the previous video, I c...