KOKILI OPTICSRELIABLE CONNECTIVITY Request a Quote

FC Block Interface

A Function (FC) block in Siemens S7 PLCs is a reusable code block that processes input parameters via IN, IN/OUT, and OUT interfaces, using temporary local memory without an associated instance data block.

Overview of FC Blocks

A Function (FC) is a code block designed to perform specific operations on input values, such as mathematical calculations or control logic, and can be called multiple times in a program for reuse . Unlike Function Blocks (FBs), FCs do not have an instance data block (DB); they rely on the local data stack for temporary data during execution. This means that any data calculated within an FC is not retained after the block finishes unless explicitly stored in global memory locations like M memory or a global DB .

FC Interface Types

FCs use three main interface types to handle parameters:

  • IN: Input-only parameters; the FC reads the value but cannot modify the caller's data.
  • IN/OUT: Input and output parameters; the FC can read and modify the caller's data directly.
  • OUT: Output-only parameters; the FC writes results back to the caller .

Parameter Passing Methods

Parameters can be passed in two ways:

  • Call-by-value: The actual parameter value is copied into the FC's input parameter (used for simple data types like INT, DINT, REAL). Modifications inside the FC do not affect the original variable .
  • Call-by-reference: The FC receives a reference (pointer) to the actual parameter (used for complex data types like STRUCT, ARRAY, STRING). Changes inside the FC directly modify the caller's data . For structured or complex data types, using IN/OUT with call-by-reference is recommended to avoid unnecessary memory usage and copying overhead .

Memory and Data Handling

  • Temporary data: Stored on the local stack during FC execution; cleared after the block finishes.
  • Permanent storage: To retain results, assign outputs to global memory or a global DB.
  • Elementary data types (E, A, M, P, L) are always passed as copies, not pointers .

Best Practices

  • Use FCs for operations that do not require persistent memory between calls.
  • For repeated control tasks requiring memory retention, consider using FBs with instance DBs.
  • Optimize parameter passing: simple types via call-by-value, complex types via call-by-reference to reduce memory usage . This structure allows FCs to be efficient, reusable, and suitable for frequently recurring tasks in S7-1200 and S7-1500 PLC programs.

Function (FC)

A function (FC) is a code block that typically performs a specific operation on a set of input values. The FC stores the

Getting Started With Function (FC) Programming in TIA Portal

What is an FC in TIA Portal? An FC (Function) is a reusable, stateless block of logic in TIA Portal. It has no internal memory (unlike

Siemens Tia Portal – Different Instances of Calling a Function Block

Creating function blocks inside your code will require associating a data block with each FB call you to make in your

What is Fibre Channel? History, layers, components and design

Why Fibre Channel? Fibre Channel offers point-to-point, switched and loop interfaces to deliver lossless, in-order, raw

Fibre Channel Protocol

• Fibre Channel''s FC-0 level describes/specifies the physical interface characteristics, including transmission media,

Fibre Channel

Fibre Channel was designed as a serial interface to overcome limitations of the SCSI and HIPPI physical

Inside a Modern Fibre Channel Architecture – Part 1

FC-0 the physical interface (FC-0) consists of transmission media, transmitters, and receivers and their interfaces

What should you watch out for in STEP 7 (TIA Portal) when

The calling block can directly access the operand which is specified as the actual parameter. Writing a parameter in the

Tia Portal – Different Instances of Calling a Function Block

In this article, we will talk about PLC data block instances of different function block types in Siemens Tia Portal and

Siemens BLOCK_FB BLOCK_FC Dynamic FB/FC Call Tutorial –

Rather than hardcoding FB or FC references, you pass a block number as a parameter, allowing a single calling block

Fc Blocking

Potential blocking reagents include 1) specific anti-Fc receptor antibodies, 2) excess purified IgG, and 3) excess (unpurified) IgG in

Fc Blocking in Flow Cytometry

Discover why Fc blocking is essential in flow cytometry. Prevent false positives and reduce background caused by Fc receptor binding.

Fibre Channel Protocol

Fibre Channel consists of the following layers: FC-0 -- The interface to the physical media FC-1 -- The encoding and decoding of data

Function block (FB)

A function block (FB) is a code block that uses an instance data block for its parameters and static data. FBs have variable memory

Passing parameters to blocks

Function Blocks (FB) and Functions (FC) have three different interface types: IN IN/OUT OUT FBs and FCs receive

Function blocks (FB)

Function blocks are code blocks that store their input, output and in-out parameters permanently in instance data blocks, so that they

Still Have a Technical Question?

Our team can help review your product selection.

Ask Our Team