Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: Difference Between FC and FB in Tia Portal
Share
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > Difference Between FC and FB in Tia Portal

Difference Between FC and FB in Tia Portal

Learn the difference between FC and FB in TIA Portal, including how they handle memory and their role in Siemens PLC programming.

Last updated: May 7, 2025 11:24 am
Viral Nagda
PLC Tutorials
No Comments
Share
8 Min Read
SHARE

So, you are working in the TIA Portal software of Siemens, and are new to function blocks and function codes in them. You will be required sometimes to write a program where you will need to use your own function blocks, to reduce your programming task. TIA Portal provides two options for writing your own libraries – using a function block or a function call. Both need a clear understanding of when to use them, otherwise, you will run your library in the wrong way. So, in this post, we will see the difference between a function call and a function block in the TIA Portal software for writing logic.

Contents
What is a user-defined library in PLC programming?What is a function block in TIA Portal?What is a function call in TIA Portal?FB vs. FC in TIA Portal

What is a user-defined library in PLC programming?

First of all, let us understand why we are discussing this topic. A PLC has two types of libraries – predefined and user-defined. A predefined library is one that is already developed by the PLC manufacturer and comes built-in with the software, like timers and counters. A user-defined library is one that can be developed by the programmer according to their needs, basically meaning that it is customisable. So, it will also have its set of inputs and outputs, similar to how you see the input and output of a timer. The only difference is that the IOs will have their own name defined by the user, and the logic written inside will also be defined by the user. Both these libraries can be called multiple times, known as multiple instances, where you can use the same logic multiple times, and that too independently of each other.

For example, you are using timers in the program four times, each called by different logic, and the output goes in different ways. Similarly, you are using your own libraries four times, each called by different logic, and the output goes in different ways.

What is a function block in TIA Portal?

Let us first start with a function block. Refer to the image below. A function block is represented by a blue symbol, as shown in the left-hand bar with the name we highlighted, for example, Motor_Avail_Logic. It has the following parameters: input, output, inout, static, temp, and constant. So basically, you can link your own inputs and outputs, and create a logic inside the function block. Once you take a new FB, it will ask you to create a new instance DB or data block. This means that each FB will have its own data block for storing the values. Every instance of an FB is thus defined by its own data block.

What is a function block in TIA Portal?

In FB, you have the main advantage of retaining the current values inside each of its instances used, which are independent. Due to this, it is ideal for logic that is used multiple times in the same way, and requires storing its last values even after a power off. But as it is a function block, it is of no use in the logic if any of its instance is not used in the program. This is because, like a normal logic section that you write and call in a task configuration, this is not a normal logic section but a function block.

More details about Function Blocks Here:

Function Blocks in PLC (FBs) – What You Need To Know?
Function block in Siemens PLC - TIA Portal Courses Online

What is a function call in TIA Portal?

Let us now proceed with a function call. Refer to the image below. A function call is represented by a green symbol, as shown in the left-hand bar with the name we highlighted, for example – Auto_Mode_New.

It has the following parameters: input, output, inout, return, temp, and constant. So basically, you can link your own inputs and outputs, and create a logic inside the function call. Once you take a new FC, it will not ask you to create a new instance DB or data block. This means that each FC will not have its own data block for storing the values. Every instance of an FC is thus not defined by its own data block.

What is a function call in TIA Portal

In FC, you have the main point of not retaining the current values inside each of its instances, which are independent. Due to this, it is ideal for logic that is used multiple times in the same way, and does not store its last values after power off. But as it is a function call, it is of no use in the logic if it is not called in the task configuration of the CPU. This means that FC is a normal logic section that we use in the program to write logic, and can also as a purpose of a function block with multiple instances, the difference being that it will not have it’s own DB and not be able to store the last hold values inside each of it’s instances.

Read More Information on Functions Here:

What are Functions in PLC Programming? (FCs)

FB vs. FC in TIA Portal

  1. A function block instance uses its own set of DB for storing the values inside it and retaining them, whereas a function call instance does not use its own set of DB for storing the values inside it and retaining them.
  2. A function call needs to be made in the task configuration CPU to use it in the program, which is not the case with the function block. If FB is to be used in the program, then at least one instance must be created. So, once you call FC, then write a logic inside it and either keep it as it is, or further use its multiple instances in the other parts of the program.
  3. As FB uses data blocks, memory consumed in CPU is more than FC which does not use data blocks or retains values. So everytime a FC instance is called, it will have to recalculate all the logic once again from the current inputs, as it does not know which were the last values. So, it will require inputs every time for executing their instances, which is not the case with FB.
  4. The execution speed of FB is slower than FC, because no instance DB is used in FC and also not required to store the last values.

In this way, we saw the difference between FC and FB in the TIA Portal.

Read Next:

  • PID in Studio 5000 Function Blocks
  • Door Lock with Delay PLC Exercise Problem
  • ESG in Industrial PLC Automation Systems
  • Everything You Need to Know About PLC Battery
  • Automation System for Hazardous Environments

Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !

Continue Reading

Automatic Door Operation PLC Programming and Simulation
How to Configure Analog Inputs and Outputs in Delta PLC?
Allen Bradley Math Functions
Timers in Codesys – Timer ON, Timer OFF, Pulse Timer
Product Painting PLC Program using Omron CX-Programmer
Timers in PLC Programming – Siemens Tia Portal Tutorials
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

Machine Indicator Lights: PLC Programming Solution
PLC Selective Execution of the Application – Example Program
Importance of Grounding Electronic Equipment
OPC in Old PLC Systems
Example of Flip-Flop PLC Program for Lamps Application
Types of Failures in Industrial Automation Systems
Medium-Level PLC Exercise for Students in Automation
PLC Application for Stamping Operation – Example Programming

Keep Learning

plc-analog-signals-wiring-techniques

PLC Analog Signals Wiring Techniques

Omron PLC washing machine automation

Omron PLC Logic for Washing Machine Automation

Draw a Ladder Logic to control a bulb using push buttons in PLC

Concept of Latching in PLC

CPU Communication Ports in Siemens PLC

Types of CPU Communication Ports in Siemens PLC

AI AO DI DO Questions

AI, AO, DI, DO Questions (PLC I/O Types)

Upgrading and Migration of PLC Systems

Upgrading and Migration of PLC Systems

Comparison of Control Loops - Open, Closed, Cascade, Feedforward, Ratio

Comparison of Control Loops – Open, Closed, Cascade, Feedforward, Ratio

Programming with Schneider PLC

Mail Box Automation: Programming with Schneider PLC

Learn More

Acceptable Earth Resistance Values

Acceptable Earth Resistance Values

Why Three-phase Voltage is 440 Volts

Why Three-phase Voltage is 440 Volts?

Distributed Network Protocol Communication

DNP3 Communication Protocol Overview

What is WHCP?

Rotary Liquid Seal Ring Air Compressor

Rotary Compressors

Various Types of Sensors Used in Water Treatment Plant

Various Types of Sensors used in Water Treatment Plant

Chemical Reactor Vessel P and ID

Wrong Operation Internals Destroyed Demineralization Mixed Bed Vessel

Arduino Zero

What is Arduino? Different Models of Arduino Controllers

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?