In our latest video we teach you how to write PLC program from starting hardware to testing application. We use TIA Portal V20, but any TIA version can be use for your training.
Info about Tia portal downloads in this link
Model link will be attached here.
In our video PLC training we go through following:
- Creation of PLC
- adding hardware for SEW drives
- importing IO list
- Writing code in ladder logic LAD
- Writing code in SCL.
- Using UDT – user defined data
- Organizing program structure
- Testing application.
Application is for conveyors which feed product from upper levels to the lift. Lift brings product to ground floor and conveyors are taking it away.
For who is this TIA Portal tutorial ?
Mainly for beginners starting PLC programming with TIA Portal. But it can be useful for experienced programmers who want to learn more about SCL, or have example of lift software and orders handling.

8 drives used in PLC training.
Function block has interface described in table below:
Type | Section | Function | Available in |
Input parameters | Input | Parameters whose values are read by the block. | Functions, function blocks and some types of organization blocks |
Output parameters | Output | Parameters whose values are written by the block. | Functions and function blocks |
In/out parameters | InOut | Parameters whose values are read by the block when it is called, and whose values are written again by the block after execution. | Functions and function blocks |
Return value | Return | Value that is returned to the calling block. | Functions |
Temporary local data | Temp | Tags that are used to store temporary intermediate results. Temporary local data is retained for only one cycle. If you use temporary local data, you have to make sure that the values are written within the cycle in which you want to read them. Note: If you use temporary local data in functions (FC) with standard access, initialize the data before use. Otherwise, the values could be random. | Functions, function blocks and organization blocks Note: Temporary local data is not shown in instance data blocks. |
Static local data | Static | Tags that are used for storage of static intermediate results in the instance data block. Static data is retained until overwritten, which can be after several cycles. The names of the blocks, which are called in this code block as multiple instance, will also be stored in the static local data. | Function blocks |
Constant | Constant | Constants with declared symbolic names that are used within the block. | Functions, function blocks and organization blocks Note: Local constants are not shown in instance data blocks. |
Siemens Programming
SIEMENS PLC TRAINING

Some instruction used in our TIA Portal tutorial for SCL programming
IF <condition> THEN
<instructions1>
ELSE
<Instructions2>
END_IF;
If the condition is satisfied, the instructions1 programmed after the THEN are executed. If the condition is not satisfied, the instructions2 programmed after the ELSE are executed. Then the execution of the program continues with the next instruction after the END_IF.
FOR DO LOOP
The instruction “Run in counting loop” causes repeated execution of a program loop until a loop variable lies within a specified value range.
The number of runs cannot be changed while the program is running.
For performance reasons, the run tag should be declared in the block interface in the “Temp” section. It is not possible to change the run tag from within the loop.
FOR <Run_tag> := <Start_value> TO <End_value> BY <Increment> DO
<Instructions>;
END_FOR;
WHILE DO LOOP
The instruction “Run if condition is met” causes a program loop to be repeatedly executed as long as the implementation condition is satisfied.
WHILE <Condition> DO
<Instructions>;
END_WHILE;