Professional Documents
Culture Documents
com/difference-between-fc-and-fb-in-siemens/
In this article, we are going to see the difference between FC and FB blocks in
the siemens plc system. So let’s start the blog.
Table of Contents
1 of 10 13/12/2023, 14:41
Difference between FC and FB in Siemens PLC https://instrumentationblog.com/difference-between-fc-and-fb-in-siemens/
•
•
•
•
Function (FC) and Function Block (FB) both are used to optimize user
programming. The main use of FC and FB is to divide and organize the user
program into smaller parts that can be easily understood. It helps in
maintenance and troubleshooting.
FC and FB can be created by the user and used as a user library. So, users have
to just write it once, and can be used as many times as required. This also
reduces and rationalizes the resources of the CPU, such as memory occupation.
2 of 10 13/12/2023, 14:41
Difference between FC and FB in Siemens PLC https://instrumentationblog.com/difference-between-fc-and-fb-in-siemens/
Temp variables de�ned in the FC are stored in the local data stack, which will
be lost after the execution of FC.
3 of 10 13/12/2023, 14:41
Difference between FC and FB in Siemens PLC https://instrumentationblog.com/difference-between-fc-and-fb-in-siemens/
The above image shows the FC blocks for the motor starter. All the parameters
such In, Out, In-Out have to �ll with the address.
A Function Block(FB) is a logic block with memory. This block can also be
created by the user and called as many times as required. The difference is
whenever we called a Function Block(FB), it creates a DB as its memory. This
DB is called an instance data block.
We can also assign different parameters in the function block as In, Out, In-
Out, Temp, and Stat, which is an additional parameter in the FB. Data saved in
the instance data block is not lost after the execution of the FB. Static variables
are stored in the instance data block. However, Temp data is stored in the local
data stack which is lost after the execution of FB.
4 of 10 13/12/2023, 14:41
Difference between FC and FB in Siemens PLC https://instrumentationblog.com/difference-between-fc-and-fb-in-siemens/
The above image shows the Function Block(FB) for the control valve operation.
You need not enter all the parameters with the address. FB will generate an
instance data block with each call.
⇒ We can program FC or FB with FBD, LAD, STL, and SCL. The FB has
additional capabilities to program in Graph.
⇒ Whenever we called for FB, it generated an instance Data Block(DB) with it.
There is no such necessity for FC.
5 of 10 13/12/2023, 14:41
Difference between FC and FB in Siemens PLC https://instrumentationblog.com/difference-between-fc-and-fb-in-siemens/
⇒ In FC, we can not leave any parameters such In, Out, In-Out blank. Since all
the formal parameters in FC do not save in any memory and as a result there is
no initial value assigned to them. In FB, we can leave any of the parameters
such as In, Out, In-Out with no address.
I hope you like this article about the difference between FC and FB in Siemens
PLC programming blocks. Please share this blog with your colleagues and
friends!
•
•
•
6 of 10 13/12/2023, 14:41
Difference between FC and FB in Siemens PLC https://instrumentationblog.com/difference-between-fc-and-fb-in-siemens/
This was exactly the kind of info i was looking for thank you
Reply
7 of 10 13/12/2023, 14:41
Difference between FC and FB in Siemens PLC https://instrumentationblog.com/difference-between-fc-and-fb-in-siemens/
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I
comment.
Control Valve
Electrical
Flow Measurement
Instrumentation
Interview QnAs
Level Measurement
PLC Tutorials
Pressure Measurement
What is PLC
redundancy?
Three Phase
8 of 10 13/12/2023, 14:41
Difference between FC and FB in Siemens PLC https://instrumentationblog.com/difference-between-fc-and-fb-in-siemens/
Induction Motor
Control using
PLC
How to
communicate a
PLC system
with SCADA via OPC UA?
How does a FC
function work
in Siemens
PLC?
What is a PLC
Rack or PLC
Chassis?
Read Real
Time Clock
value in
Siemens PLC
Search …
InstrumentationBlog.com
9 of 10 13/12/2023, 14:41
Difference between FC and FB in Siemens PLC https://instrumentationblog.com/difference-between-fc-and-fb-in-siemens/
InstrumentationBlog.com
Advantages of Pneumatic
Systems in Automotive
Industries
Communication Protocols
10 of 10 13/12/2023, 14:41