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: How to Insert Block Calls in SCL Language?
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 > How to Insert Block Calls in SCL Language?

How to Insert Block Calls in SCL Language?

Explore the best practices for inserting block calls in SCL language and improve your programming in the TIA Portal.

Last updated: April 1, 2025 10:09 am
Viral Nagda
PLC Tutorials
No Comments
Share
6 Min Read
SHARE

In the last post, we saw how to write a repeat until statement in SCL language. In SCL language, you can directly insert function blocks through many shortcuts in the TIA Portal. This saves time in engineering and allows the programmers to quickly write and troubleshoot a program. If you know the correct syntax on how to write them, it will be a very powerful tool. In this post, we will see how to insert function block calls in the SCL language of the TIA Portal.

Contents
What is a function block in the SCL language?Calling a function block in SCL language

What is a function block in the SCL language?

A function block is an element through which you can write a single logic inside it, and call it in multiple instances. This can be explained with a simple example where you have 10 motors and all the motors are operating in the same logic. Instead of writing them 10 times, write it a single time in a function block, and call that in 10 different instances. Each instance will have its own set of inputs and outputs. Due to this, you can link 10 motors with the same logic, and get your work done. It is a common feature of PLC programming and is available in almost all the PLC vendor software.

In the TIA Portal, if we use function blocks, there are two types – single instances and multiple instances. When you call a function block, a DB will be created as a single instance. So, the values of the called function block will be stored in that DB. This is called a single instance. In multiple instances, a function block is called inside a function block. Each time you call, a DB will be created. So, multiple DBs will be created inside a single function block. This is called multiple instances, where the values of the called function block are stored in the instance DB of the calling function block.

For more information on function blocks in the TIA Portal, Click Here.

Calling a function block in SCL language

You can call both the types of instances in the SCL language program. We will call both the single instance and multiple instance function blocks.

How to Insert Block Calls in SCL Language?

Refer to the above image. First, we will see below how to call and write single instance function blocks. We create a function block in the program named FC_Test. Here, I declare two input variables (I1, I2) and one output variable (O1). We write a simple logic where, if both the inputs are on, then the output will turn on, otherwise will remain off.

Now, see the below image. In the function code or program of SCL_Test, we drag and drop the function block FC_Test. When you do, a DB will be asked to be created, which we name here as FC_Test_DB. Then, you need to enter the corresponding parameters inside the bracket. If you drag it one more time, a second DB will be created. So, the logic of FC_Test will be executed with two separate instances and work independently. In short, whenever you call a function block with a single instance type, a DB will be created where the corresponding values will be stored.

Calling a function block in SCL language

Refer to the below image. Next, we will see below how to call and write multiple instance function blocks. We create a function block in the program named FC_Test_2. Here, I declare one output variable (O2). Also, I call the earlier created function block of FC_Test two times. Due to this, two instances of that function block are created in the static parameter – FC_Test_Instance and FC_Test_Instance_1. We write a simple logic where, if the output of the first instance is on, then the output will turn on.

Siemens SCL functions

Now, see the below image. In the function code or program of SCL_Test, we drag and drop the function block FC_Test_2. When you do, a DB will be asked to be created, which we name here as FC_Test_DB_2. Then, you need to enter the corresponding parameters inside the bracket. If you drag it one more time, a second DB will be created. So, the logic of FC_Test_2 will be executed with two separate instances and work independently. In short, whenever you call a function block with a multiple instance type, an instance will be created inside the called function block, where the corresponding values will be stored in the static parameter.

PLC Examples for calling functions in SCL

Some important points to note down are:

  1. The syntax for a single instance is – <DBName> (Parameter List). The syntax for multiple instance is – <#InstanceName> (Parameter List)
  2. Input and in-out parameters have the assignment identifier “:=”, and the output parameter has the assignment identifier “>=”.
  3. Each parameter is separated by a comma.
  4. Every time a function block is updated, you can right-click the called function block and update it.

In this way, we end our series of SCL languages on the TIA Portal.

Read Next:

  • Highway Lights Program using RTC in PLC
  • PLC Logic for Washing Machine Automation
  • Burning System OMRON PLC Program Example
  • Analog Alarms using Functional Block Diagram
  • PLC Programming Motors with Fixed Priorities

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

Peripheral Inputs and Outputs in Siemens PLC
Real-Time Clock in Omron PLC? – CX Programmer
Automatic Curtain Control – PLC Programming Solution
Relay circuits
PLC Example on Switch Program with Timers
What is Namur Digital Input Card?
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

Parallel Tanks Level Control using PLC Ladder Diagram Tutorial
Smart Spray System using Wecon PLC
What Factors Affect the Choice of PLC Programming Software?
How to Connect Mitsubishi FX3U PLC with Weinview MT6071iE HMI?
Sequential PLC Programming for the Pneumatic Valves
Compare Online and Offline PLC Programs
Delta PLC Counter with Comparison
Why 24 Volts DC Power Supply is used? – Industrial Automation Systems

Keep Learning

Example of Automated Guided Vehicle with PLC

Example of Automated Guided Vehicle with PLC

Brands PLC communication interface and protocol

Communicating Between Siemens PLC and Other PLC Brands

PLC Program for an Alternate output circuit

PLC Program for Alternate Output Circuit with Latched Function

Online time of the PLC

System and Local Time in PLC

Operator Interface for SCADA System

Operator Interface for SCADA System

Communication Protocols in PLC

Various Communication Protocols in PLC

Difference between PLC and Computers

Difference between PLC and Computers

Select Security type Intouch

How to Add Security in InTouch SCADA?

Learn More

Sensor Based Projects List - Electronics & Electrical

350+ Sensor-Based Projects List – Electronics & Electrical

4-20mA Current Loop for Flow Transmitter and Control Valve Positioner

4–20 mA Process Control Loops

Calculate the Thermocouple Output millivolts

Calculate the Thermocouple Output millivolts

Process Plant Risk and Safety Management

Safety Roles & Responsibilities of Process Engineering (Detail Design)

Turbine Flow Meter Animation

Turbine Flow Meter – Principle, Advantages, Disadvantages

BJT Amplifiers Interview Questions & Answers

BJT Amplifiers Interview Questions & Answers

Ion Spectrometers Questions & Answers

Instrumentation of Ion Spectroscopy

Digital Electronics Multiple Choice Questions

Counter Implementation Objective Questions

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?