assignment list tia portal

An Introduction to Basic Ladder Logic Instructions in Siemens Tia Portal

assignment list tia portal

Introduction

Siemens offers one of the most intuitive and user-friendly development environments. This makes it a great starting point for those who want to start practicing PLC programming . 

In this tutorial, we will explore the basic instructions available in the Siemens environment (defined by the IEC 61131-3 standard) by programming a simple box sorting machine in LADDER in TIA Portal. The purpose is to show how these instructions can be used in a real application.

Prerequisites

To follow along with this tutorial, you will need an installation of TIA Portal . We will be using TIA Portal v17, but you can use any other version.

No other hardware or software is required. 

Defining the specifications of the box sorting machine

The machine we’re building is a system where small and large boxes are fed in the entry of the machine and sorted by size (we assume only two kinds of boxes: larges and smalls). 

It is equipped with two push buttons (one for starting the machine and the other for stoping it) and two PhotoElectric (PE) digital sensors. One sensor is placed above the other to detect whether it’s a large or small box that’s entering (large boxes are taller than the small ones). Large boxes continue straight to the large box accumulator via Conveyor A while small ones are pushed (with a pneumatic cylinder controlled by a solenoid valve) towards Conveyor B which leads to a small box accumulator. Each conveyor is actuated by its motor at a constant speed.

assignment list tia portal

This machine must respect the following specifications.

  • If a small box enters: only the low sensor must turn on. The travel time from the position of the sensors to the large box accumulator is 5 seconds.
  • If a large box enters, both sensors must turn on. The travel time from the sensors to the pneumatic cylinder is 2 seconds then the one from Conveyor B to the small box accumulator is 5 seconds.
  • Counting the number of small/large boxes and their total.
  • Calculate the percentage of small/large boxes.
  • The machine must stop once at 1000 boxes.

The following chart summarizes the machines working.

assignment list tia portal

We assume that all parts are wired as shown in the next two figures.

assignment list tia portal

Both motors are asynchronous triphased motors. Each one is controlled by a contactor (KM1 and KM2).

assignment list tia portal

The start button, stop button, and both sensors (PE_Low and PE_High) are wired to 4 PLC digital inputs (from I 0.0 to I 0.3). The two contractors (KM1 and KM2) and the solenoid valve coils are wired to 3 PLC digital outputs (from Q 0.0 to Q 0.2).

Creating a new project in TIA Portal

Now that we have defined all the machine’s specifications, we can start writing our PLC program.

Start by launching TIA Portal. Then, on the first screen, click on “Create a new project”, give it a name (“Box sorting machine” in this instance), and click on “Create”.

assignment list tia portal

Then, on the next view click on “Configure a device”.

assignment list tia portal

Once on the device configuration, click on “Add a new device”, open the folders “Controllers -> SIMATIC S7-1500 -> CPU -> CPU 1511-1 PN”, and select the 6ES7 511-1AK02-0AB0 CPU. 

Choosing this CPU specifically is not mandatory, you are free to choose the CPU you want. We simply selected the latest version of the simplest S7-1500 CPU.

assignment list tia portal

Let the software initiate the project until the project’s interface appears.

Open the “Program blocks” folder on the Project tree then double click on “Main [OB1]”

assignment list tia portal

This is the main block of the project (OB1 for Organization Block 1). This is a cyclic block which means that all instructions that are programmed inside will be executed repetitively as long as the CPU is in RUN mode. We will program using only this block for more simplicity.

On the right side of the screen, you can find the instructions list. This can be accessed any time by clicking on the “Instructions” side tab. 

In this tutorial, we will be focusing only on the basic instructions. They contain all the tools we need to satisfy all the requirements we set.

assignment list tia portal

Programming bit logic operations in TIA Portal

Open the “Bit Logic Operations” folder then drag and drop a normally open contact and a Set instruction on the line of Network 1.

assignment list tia portal

  • The normally open contact is a bit interrogation. By adding this instruction, we are asking the state of the associated bit. If its state is 1, the program proceeds to execute the rest of the line. If its state is 0, the instructions after will not be executed 
  • The Set instruction changes the state of a bit to 1. It stays at 1 as long as no other instruction changes its state.

Now we have to associate a bit address to each instruction. First thing is to give it a tag. Click on the red question marks above the instructions and write the name as shown in the next figure.

assignment list tia portal

As you can see, there’s a red line under our tags. This is normal because we didn’t define these tags yet. It can be done by right-clicking on the tag then clicking on “Define tag”.

assignment list tia portal

A small window will open asking you to define the data section, data type, and memory address of the tag. Define it as a Global input BOOL. Once done, the first physical address available will be automatically attributed to this tag. In our case, it is “%I0.0”. Once done, click on “Define”.

assignment list tia portal

NB: You can access the list of all your tags at any time by opening the “PLC tags” folder in the Project tree and double-clicking on “Default tag table”.

assignment list tia portal

Repeat the same actions to define the “auto_mode” tag. Define it as Global memory.

assignment list tia portal

As you can see, there’s no longer a red line under our tags and the right memory address is shown above them. 

With these instructions, any time we press the Start button, the state of the memory bit “Auto_mode” will be set to 1. We will use the state of the “Auto_mode” bit as a condition to allow the functions we’ll program to be executed.

Now we need to add instructions that will change the state of “Auto_mode” to 0 when we press the stop button. To do so, drag and drop a normally open contact and a Reset Instruction to the Network 2.

assignment list tia portal

Define the “Stop” tag for the NO contact as a Global input BOOL (its address will be automatically set to “I 0.1”) and assign “Auto_mode” to the Reset instruction.

assignment list tia portal

  • The reset instruction changes the state of its associated bit to 0. As for the Set instruction, its state will stay at 0 until we change it with another instruction.

Now with Network 2, each time we press the stop button, the “Auto_mode” bit will be set to 0. 

We are done with the buttons, it’s time to program the sensors. As we said earlier, the condition to detect a large box is having both sensors turned on. And the condition to detect a small box is having only the low sensor turned on and the high turned off. Let’s start by adding two NO contacts in Network 3, naming them “PE_Low” and “PE_High”, and defining their tags as Global input BOOL.

assignment list tia portal

After this, add an assignment instruction right after the contacts. You can the assignment instruction in the “Bit logic operations” folder.

assignment list tia portal

Drag and drop the instruction, name it “Large_box” and define it as a Local temp BOOL. 

assignment list tia portal

  • The assignment instruction copies the logic state of the previous instructions executed before. If the previous logic result is 1, the associated bit will be set to 1. If the previous logic result is 0, the associated bit will be set to 0. 

This way, each time both sensors are at 1, the “Large_Box” will be set 1. Telling us that a large box just passed through the sensors.

Let’s do the same but for small boxes. Repeat the same actions we just did but use a normally close contact for “PE_High”. You can find the normally closed contact in the “Bit logic operations” folder.

assignment list tia portal

Use the “Small_box” tag name for the assignment instruction.

assignment list tia portal

  • The normally closed contact is a bit interrogation. By adding this instruction, we are asking the state of the associated bit. If its state is 0, the program proceeds to execute the rest of the line. If its state is 1, the instructions after will not be executed.

In this case, the “Small_box” bit will be set to 1 only if “PE_Low” is at 1 and “PE_High” is at 0.

Programming timers in TIA Portal

Okay, we defined all the conditions bits we need. Now let’s start programming the behavior of the pusher and motors. Since the specifications require a time-based control, we will use timers to activate them.

First, we will define the conveyor’s A behavior (large boxes). add two normally open contacts to Network 4. And define them as “Auto_mode” and “Large_box”.

assignment list tia portal

From the “Timer operations” folder, drag and drop a TP instruction.

assignment list tia portal

Upon dropping the instruction, a “Call options” window will open, asking you to create a DB (Data Block) that will contain all the timer’s information. Simply name the DB “timerA_DB” and click on OK.

assignment list tia portal

NB: This window will open each time you’ll create a timer or a counter. Let the DB’s number be set automatically.

assignment list tia portal

  • The TP timer is a pulse timer instruction. It is activated by receiving a 1 at the IN input and sets the output Q at 1 during an amount of time specified in the PT input and returns the current time in the ET output. If the IN input is set to 1 multiple time while the counter is active, it does not affect the current time value.

The PT input requires a TIME data type. To define a TIME data, you have to write “T#” then specify a time duration with its unit. For this case, we want the timer to run for 5 seconds. So we have to write “T#5s”.

assignment list tia portal

If the instruction is kept like that, it’ll cause a malfunction in the machine. Since resetting the input does not reset the current time, this means that if multiple large boxes pass within 5 seconds, the Q output will be set to 1 for 5 seconds once only. To avoid that, we just have to add a “Reset timer” instruction just before the IN input. You can find the “Reset timer” instruction in the “Timer operations 

assignment list tia portal

Assign the reset timer function to “timerA_DB”.

assignment list tia portal

This way, any time the IN input would be set to 1, it will reset the timer just before. 

NB: This logic will be applied for all other timers used in the rest of this tutorial.

Now we just have to add an assignment instruction right after the Q output. Name it “Motor1” and define it as a Global output BOOL.

assignment list tia portal

Great, now motor 1 will be turned on following our specifications.

Let’s build the machine’s behavior for small boxes. Since we already have an “Auto_mode” bit interrogation, no need to add another one. We can simply add a new branch right after the interrogation. You can find the open branch instruction in the “General” folder.

assignment list tia portal

In this new branch, we will build the first step of conveyor B behavior. Which is turning on conveyor A for 2 seconds (moving the box from the sensors to the pusher’s position). Name the timer “timerB_DB” and define the assignment instruction as “Motor1”. 

assignment list tia portal

Let’s do the second step which is activating the solenoid valve after 2 seconds have passed. To do this, we’ll add another branch right after the “Large_box” integration and this time, we’ll use a TON timer (found in the “Timer operations” folder). Name the timer “timerC_DB”, Set PT at 2 seconds, and define “Solenoid_valve” as a Global output BOOL.

assignment list tia portal

  • The TON timer is an on-delay timer instruction. It is activated by receiving a 1 at the IN input and sets the output Q at 1 after the amount of time specified in the PT input has passed and returns the current time in the ET output. If the IN input is set to 1 multiple time while the counter is active, it does not affect the current time value.

With this timer, the solenoid valve is going to be activated after 2 seconds passed since the sensors detected the small box. 

For the third step, we need motor 2 to be activated for 5 seconds at the same time as the activation of the pusher. Add a new branch right after the output of “timerC_DB”. Then add a simple TP timer (with its reset), name it “timerD_DB”, and set it at 5 seconds. Right after, add an assignment instruction, name it “Motor2” and define it as a Global output BOOL.

assignment list tia portal

Programming counters in TIA Portal

Now with the machine’s behavior achieved, let’s add counters to measure the number of large and small boxes. First, add an “Auto_mode” NO contact followed by two branches: one leading to a “Large_box” NO contact and the other to a “Small_box” NO contact in Network 6 as shown in the next figure.

assignment list tia portal

Right after the “Large_box” contact, add a CTU (CounterUp) instruction and name it “CounterL_DB” (in the call options window). You can find it in the “counter operations” folder.

assignment list tia portal

  • The CTU instruction counts the number of times the CU input is set to 1. It starts counting from the value in the PV input and returns the actual counter value in the CV output. You can reset the counter to its first value by setting a 1 in the R input.

Let the PV input at 0 (as a constant) and assign the “Stop” bit to the  R input.

assignment list tia portal

Go ahead and repeat the same step for the counter after the “Small_box” contact.

assignment list tia portal

To retrieve the current counter values, we have to assign integer tags to the CV outputs. Define the two tags “num_L” and “num_S” as Global memory INTs as shown in the next figure.

assignment list tia portal

Programming math and conversion instructions in TIA Portal

In this part of the tutorial, we’re gonna take the counter values we just programmed and do some math with them to calculate: the total number of boxes and the percentage of large/small boxes.

First, we will calculate the total number of boxes which is the sum of the number of large and small boxes. To do this, add an “Auto_mode” NO contact to Network 7 followed by an ADD instruction. You can find it in the “Math functions” folder. 

assignment list tia portal

Assign “num_L” to IN1 and “num_S” to IN2 then define “total_box” as a Global memory INT to OUT.

assignment list tia portal

  • The ADD instruction sums the numerical values in IN1 and IN2 inputs and returns the result in the OUT output. The summed inputs and the output result have the same data type.

Now let’s calculate the percentages of large and small boxes. To do so, we must first convert “num_L”, “num_S” and “total_box” from INTs to REALs. To do this, add an “Auto_mode” NO contact followed by a CONVERT instruction to Network 8. You can find it in the “Conversion operations” folder. 

assignment list tia portal

  • The CONVERT instruction converts the data type set in the IN input to another data type returned in the OUT output. The nature of the conversion is determined by the “??? to ???” slots (For example INT to REAL).

Set the conversion to be an “INT to REAL”, assign “num_L” to the IN input, and define “num_L_real” as a Global memory Real.

assignment list tia portal

Go ahead and repeat the same steps for “num_S” and “total_box”.

assignment list tia portal

To calculate the large boxes percentage, we have to divide the number of large boxes by the number of the total number of boxes then multiply the result by 100.

Add an “Auto_mode” NO contact in Network 9 followed by a DIV (Divide) instruction. You can find it in the “Math functions” folder.

assignment list tia portal

Define “division” as a Local temp REAL and make sure that the type of division is recognized as real.

assignment list tia portal

  • The DIV instruction divides the value in IN1 by the value in IN2 and returns the result in OUT. IN1, IN2, and OUT have the same data type and it is set by the DIV type slot.

Now we have to multiply the value in “division” by 100 to obtain a percentage. For this, add a MUL (Multiply) instruction. You can find it in the “Math functions” folder.

assignment list tia portal

Assign the inputs and outputs as shown in the next figure.

assignment list tia portal

  • The DIV instruction multiplies the value in IN1 by the value in IN2 and returns the result in OUT. IN1, IN2, and OUT have the same data type and it is set by the MUL type slot.

NB: You must write 100.0 instead of simply 100 for it to be recognized as a real number. Otherwise, it will take it as an integer.

Now that we calculated the percentage of large boxes “percent_large”, we can repeat these steps and calculate the percentage of small boxes. Or, we can simply subtract the percentage of large boxes from 100%. Since there are only two types of boxes, it is way easier to just do a subtraction. For this, add a SUB instruction (found in the “Math functions”) and define the inputs and output as shown in the next figure.

assignment list tia portal

  • The SUB instruction subtracts the value in IN2 from the value in IN1 and returns the result in the OUT output. IN1, IN2, and OUT have the same data type and it is set by the SUB type slot.

Programming comparison and move instructions in TIA Portal

In some cases, you’ll need to trigger events when a counter reaches a certain value. In our case, we want to stop the machine when the total number of boxes reaches 1000. 

We can achieve this by simply using an “Auto_mode” reset instruction preceded by a CMP == instruction. You can find it in the “Comparator operations” folder.

assignment list tia portal

  • The CMP instruction compares the upper value to the bottom one according to a certain condition (in our case, equality ==). If the condition is verified, the program proceeds to execute the rest of the line. If it’s not, the instructions after will not be executed. Both compared values must have the same data type.

Here, when the value of “total_box” equals 1000, the reset instruction activates and sets the value of “Auto_mode” to 0.

One last thing to conclude this tutorial is to reset to 0 the values of the reals we created once the machine is stopped to prevent a memory overlap on the next starting. To do this, we will use the MOVE instruction. 

Add an “Auto_mode” reset instruction preceded by a MOVE instruction in Network 10. You can find it in the “Move operations” folder.

assignment list tia portal

  • The Move function copies the value from its input to its output. The input and the output must have the same data type.

assignment list tia portal

Click twice on the yellow star in the MOVE instruction to add two more outputs. and fill the tags as shown in the next figure.

assignment list tia portal

This way each time the machine is stopped, it will bring back the values of the reals to 0.

In this tutorial, you learned how to program, step-by-step, a simple machine using only basic instructions in TIA Portal. 

Siemens has gone to great lengths to make its development environment as enjoyable to use for beginners as it is for veterans. Thanks to the IEC 61131 standardization, all instructions that we have explored in this tutorial will be similar in other development environments such as RSLogix 5000.

As an exercise, you could try to reproduce this project using other environments from other PLC manufacturers to fully discover all the subtle differences between them.

assignment list tia portal

Related tutorials

Siemens g120x/xa drive configuration with hmi template, plc programming using schneider electric’s machine expert, first look at schneider electric’s machine expert software.

assignment list tia portal

Skip to Content

Skip over Site Identifier

  • Region and language  Service & Support
  • Deutsch Deutsch

Service & Support

Skip over Generic Navigation

  • Contact Contact
  • Support Request Support Request

Skip over Search

Skip over Site Explorer

Site Explorer Site Explorer

  • Product Support

assignment list tia portal

Inputs or outputs are used that do not exist in the configured hardware.

Created by: autogen_756614 at: 5/31/2016 4:10 pm (9 replies), rating (0) thanks 3, all about step 7 (tia portal), presales info, catalog and ordering system online, technical info, contact & partners, follow us on.

IMAGES

  1. 11. How to Use the Assignment List in TIA Portal

    assignment list tia portal

  2. 12. How to Use the Assignment List in TIA Portal

    assignment list tia portal

  3. 14. How to Use the Assignment List in TIA Portal

    assignment list tia portal

  4. TIA Portal Quickstart #11 The Assignment list

    assignment list tia portal

  5. ELE 203 Siemens TIA Portal Assignment List

    assignment list tia portal

  6. TIA Portal Examples

    assignment list tia portal

VIDEO

  1. Assignment border design

  2. simple and beautiful project corner design/new model pencil colour project design

  3. TIA Portal Quickstart #11 The Assignment list

  4. TIA Portal SCL Example (Part 7)

  5. TIA Portal

  6. TIA Portal Exporter software setting solution

COMMENTS

  1. Assignments list of PLC

    Hi,I have one strange situation about assignment list of PLC. I am just start working with PLC and still didn't define any tags and variables. But my assignment list is full of address, picture is in attachment. ... All about STEP 7 (TIA Portal) Presales info Catalog and ordering system online Technical info Support ...

  2. How To Find Assignment List || Input|Output|Bit Memory || In ...

    #SIEMENS#Step7#TIA_Portal#AssignmentList#ReferenceData#ProgramInfo_____I hope you enjoy watching my video. Have a goo...

  3. An Introduction to Statement List (STL) Programming in Siemens TIA Portal

    The "AN" is a negated "AND" bit interrogation. When used alone, the RLO is set to 1 if the interrogated bit is at 0. In this case, if "PE_Low" is at 1 AND "PE_High" is at 0, the RLO is set to 1. Programming STL jumps, timers, and counters in TIA Portal. Fill in (by typing or copy-pasting) the content of Network 5 as follows.

  4. PLC Programming Smart Tips

    Subscribe to this channel for more Videos and Tutorials 😊See also : https://youtu.be/Mpwa4AVvxVoPLC programming smart tips in TIA Portal software. In this s...

  5. TIA Portal Quickstart #11 The Assignment list

    About Press Copyright Contact us Creators Advertise Developers Terms Privacy Policy & Safety How YouTube works Test new features NFL Sunday Ticket Press Copyright ...

  6. PDF TIA Portal Programming 1

    Automation - SIMATIC S7 with TIA Portal TIA Portal Programming 1 General Information Course Code: SCT-PTTIAP1A Length: 4½ Days Audience This course is for SIMATIC S7-1500, S7-1200, S7-300, ... Assignment List iii. Call Structure iv. Dependency Structure g. Comparing Online/Offline Blocks h. TRACE Analyzer Function . Title: All Text to E-MAIL

  7. The Complete Practical Guide to Siemens Tia Portal Programming

    Introduction. TIA Portal is a software and tools package developed by Siemens, which aims to integrate multiple development tools for automation devices from the unification and remodelling of preexisting software such as Simatic Step 7, Simatic WinCC, and Sinamics Starter. The environments are responsible for programming, developing, and ...

  8. PDF Automation

    a. HMI Programming in STEP 7 TIA Portal b. Supported Devices c. Inserting a Comfort Panel in a Project d. Creating and Editing Screens 10. Reference Data a. Cross-Reference Tool in STEP 7 TIA Portal b. Assignment List c. Call Structure View d. Program Structure Filtering 11. System Diagnostics a. Diagnostic Tools in STEP 7 TIA Portal b. CPU ...

  9. PDF Statement List (STL) for S7-300 and S7-400 Programming

    Statement List (STL) for S7-300 and S7 -400 Programming Reference Manual, 04/2017, A5E41492943-AA 3 Preface Purpose This manual is your guide to creating user programs in the Statement List programming language STL. The manual also includes a reference section that describes the syntax and functions of the language elements of STL.

  10. PDF Programming Guideline for S7-1200/1500

    Legal information Programming Guideline for S7-1200/1500 Entry ID: 81318674, V1.6, 12/2018 2 G 8 d Legal information Use of application examples

  11. An Introduction to Basic Ladder Logic Instructions in Siemens Tia Portal

    Start by launching TIA Portal. Then, on the first screen, click on "Create a new project", give it a name ("Box sorting machine" in this instance), and click on "Create". Figure 2.1: Creating a new project in TIA Portal. Then, on the next view click on "Configure a device". Figure 2.2: Selecting "Configure a device".

  12. Text and Graphic lists Siemens TIA Portal Tutorial

    1- Firstly, make a Graphic list> go to project tree then> Text and Graphic lists > click on Graphic lists tap, create a new one of type "Value/Range". Text/Graphics will change depending on the Selection tap, where " bit" (1,0) type is used with digital signals where two options are either 1 or 0. "Value/Range" type is used with ...

  13. S7-1200 : Assignment List (8)

    http://plcsemwatchdog.blogspot.comTraining video for new PLC S7-1200 from SIEMENS . See my blog about Industrial Automation .

  14. PDF Tech tip: PLC assignment list exchange SIEMENS STEP 7 TIA Portal (SDF)

    Export from EPLAN and import into TIA Portal. All format elements that were declared as "Ignored text" were exported as empty text elements during the data export from EPLAN. During the data import into the TIA Portal all assignments are newly generated as assignments. There is no synchronization with already existing entries!

  15. PDF TechTip: PLC assignment list exchange SIEMENS STEP 7 TIA Portal (MS Excel)

    Export the desired assignments with the above scheme into a CSV file. Open the CSV file with Excel. Correct the name of the worksheet to. Save the table as an Excel file (*.xlsx). PLC Tags (Note blank!). Import the Excel file just created into TIA Portal.

  16. How can I see the memory map?

    Hello, In TIA PORTAL the way to see the memory map is very simple. First, select your PLC folder, then: In the footer toolbar you will see "Overview", then click on it, then you will do a double click on the "Program info" icon, it will open, select the aba "Assignment list". Now you will see all Input, Output, Bit memory, Timers and Counter in ...

  17. ELE 203 Siemens TIA Portal Assignment List

    Siemens TIA Portal Assignment List

  18. Inputs or outputs are used that do not exist in the ...

    Hi All,I'm getting the following warning message while compiling my program:,Inputs or outputs are used that do not exist in the configured hardware.,,,3:41:54 PMI have clicked on 'Go To' and I've landed by the Assignment list where I've indeed found my p