You are on page 1of 29

TIA Step by step for PLC Programming

AND gate

Select or drag and drop the AND block from the bit logic operations then write the input
address

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
2

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
In case an extra input needed you will use extra input by selecting from the above bar

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
To negate an input

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
To branch another output

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
OR Gate

.
Select the OR block from the bit logic operations then write the input address

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
In case an extra input needed you will use extra input by selecting from the above bar

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
8

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Assign Block

It assigns the value of the input in the output

Input (I) Output (Q)


0 0
1 1
0 0

You can select the assign block from two options:


a) Select the assign block from the bit logic operations
b) From the above menu

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
SR Block

It is just a SR flip flop where the Set and Reset blocks are integrated in the same block.
The dominant signal will be the reset signal.

S R Output
0 0 0
1 0 1
0 0 1
0 1 0
0 0 0
1 1 0

10

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
11

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
RS Block

It is the same function like the SR block except in the case where both signals are 1, the
dominant is the set signal.

R S Output
0 0 0
1 0 0
0 0 0
0 1 1
0 0 1
1 1 1

12

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Set Block

When the input signal value becomes 1 it sets the value signal of the output becomes 1,
and remains 1 until it is reset.
Input (I) Output (Q)
0 0
1 1
0 0

13

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Reset Block

When the input signal becomes 1, the output signal value will be 0.
Assume that the output signal value is 1.
Input (I) Output (Q)
0 1
1 0
0 0

14

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
On Delay
Timer

When there is a positive edge at the input signal, the timer output delays for a
predefined value then it will copy the remaining input signal.

The on delay timer can be selected from Timer operations folder (Sematic Timers) [SD
timer]

15

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
16

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Off Delay
Timer

When there is a positive edge at the input signal, the timer output will be one, after the
negative edge of the input signal; the output will remain one for a predefined signal.

The OFF delay timer can be selected from Timer operations folder (Simatic Timers) [SF
timer]

17

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
18

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Retentive ON
delay timer

It is the same as the on delay timer except that it needs a separate reset signal.

19

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
20

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Comparator

It is used to compare between 2 values; the first one will be the counter value which is
saved in memory word MWn, the second one is the integer value to be compared with.
Depending on the condition the output will be either zero or one.

Select the required condition for comparison and the type of the variable for
example “integer number” as shown below.

21

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Select the type of the comparision (table 1)

22

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Table 1

Symbol Condition
> Greater than
== Equal
<> Not Equal
< Less than
>= Greater than or equal
<= Less than or equal

23

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Count Up
Counter

Count up is used as a counter which increments up by 1.


Count up can be selected from Counter Operations folder, Simatic Counters, S-CU

1 Name of the counter C1, C2, C3,……..


2 CU Input signal to be counted
3 R Reset signal
4 CV Counter value to be saved to
memory word “MWn”

24

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
For the signals S & PV, they are used in order to start counting from another number
rather than zero.

S (Enable Signal) In order to enable counting


from the required number
PV (Put value) C#n

25

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Count Down
Counter

The same concept as the count up except that it increment down by 1, the least value
for the counter is 0. So the counter value will need to be initiated by a number to start
counting down from it.

26

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Count up
down
Counter

(CU & CD)

The counter up down, is counting up and down at the same time depending on the
signals CU & CD.

27

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
Extended
Pulse Timer

When there is a positive edge at the input signal, the output signal will be 1 for a
predefined time value.

The extended timer can be selected from Timer operations folder (Simatic Timers) [SE
timer]

28

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department
29

Dr. Hisham El Sherif Mechatronics Lab MCTR704


Mechatronics Department

You might also like