0% found this document useful (0 votes)
58 views87 pages

The Concept of Logic Algebra

This document discusses the concept of logic algebra. It begins by explaining that logical information can be represented by either 1 or 0, with 1 representing true/yes and 0 representing false/no. Logic algebra, proposed in 1847, operates on these logic variables. The number of possible variable combinations is 2^n where n is the number of variables. There are then 2^N possible logic functions, where N is the number of combinations. The document provides tables to illustrate this for up to 3 variables. It then discusses the basic logic operations of disjunction, conjunction, and inversion and provides tables to illustrate them. Finally, it introduces the four basic laws of Boolean algebra - commutative, associative, distributive, and inversion

Uploaded by

Afag Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views87 pages

The Concept of Logic Algebra

This document discusses the concept of logic algebra. It begins by explaining that logical information can be represented by either 1 or 0, with 1 representing true/yes and 0 representing false/no. Logic algebra, proposed in 1847, operates on these logic variables. The number of possible variable combinations is 2^n where n is the number of variables. There are then 2^N possible logic functions, where N is the number of combinations. The document provides tables to illustrate this for up to 3 variables. It then discusses the basic logic operations of disjunction, conjunction, and inversion and provides tables to illustrate them. Finally, it introduces the four basic laws of Boolean algebra - commutative, associative, distributive, and inversion

Uploaded by

Afag Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 87

1

Lecture 1
The concept of logic algebra

While processing information two kinds of variables are used :


1) information presented by numbers;
2) information presented by logic gates.
The information given by numbers characterizes the quantitative indicators of the
system. Logical information determines the state of the system. The logic variables
show the following two opposite situations: yes / no; true / false (True / False); joined
/ opened and so on. These symbols are indicated by the symbols "1" and "0" for short.
It should be noted that these symbols do not have numerical values, that is,
quantitative indicators. The operations on logic variables are based on logic algebra.
This algebra was proposed by Irish mathematician J. Bull in the middle of the
nineteenth century (1847). That is why logic algebra is sometimes called Bull
algebra.
As mentioned, each variable (or argument) in a logical algebra can take two
situations: "1" or "0". Depending on the number of variables, the number of possible
variants can be specified as follows:
N  2n , (1.1)
where n is the number of variables; N is the number of possible variants of
variables.
And the number of logical functions corresponding to the number of possible
variants of variables is:
  M  2        
N
                                                                 (1.2)
is defined by the expression.
The following tables summarize the numbers of N and M and the logic functions
for different values of variables (n).

Table 1.1
N 1 2 3 4 Note
N 2 4 8 16 N  2n
M 4 16 256 65536 M  2N
Table 1.2
n=1 M=4
N= 2 X Y1 Y2 Y3 Y4
0 0 1 0 1
1 0 0 1 1
2

Table 1.3
n=2 M = 16
X X Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
N =4

1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

Table 1.4
n=3 M = 256
X X X Y Y Y Y Y Y Y Y
Y Y Y . . Y Y
1 2 3 1 2 3 4 5 6 7 8 9 10 11 .. .. 255 256
0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1
1 0 0 0 0 1 1 0 0 1 1 0 0 1 1 1
0 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1
N =8

1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1
0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1
1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1
0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1
1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1

The following logical operations are used in logic algebra:


1) Disjunction operation. This operation implements the OR logic. Table 1.5
shows the results of this operation for two variables, the electrical contact equivalent
and the conventional sign.
Analytical presentation for “OR” operation is as follows:
                                Y = X1  X2
(1.3)
As can be seen from Table 1.5, the operations on X1 and X2 formally resemble the
binary numbering system (except 1 + 1 = 1). Therefore, they call this operation a
logical addition operation:
                                            Y = X1 + X2
2) Conjunction operation. This operation implements the "AND" logic. The
logical results of the AND operation for the two variables, the concept of electrical
contact, and the conventional sign are shown in Table 1.6. Analytical representation
of the AND operation is as follows:
                                   Y = X1  X2 (1.4)
As can be seen from Table 1.6, the logical operations on X1 and X2 are similar to
the binary number production operations. That is why they call this operation logical
production:
                             Y = X1 * X2 = X1 X2.
3

3) Inversion operation. This operation implements the "NO" ("HET", "NOT")


logic. The inversion operation is analytically expressed as follows:
Y= X (1.5)
A table description of this operation, the concept of electrical contact, and the
conventional symbol are given in Table 1.7.
More complex logical transformations can be made using "AND", "AND", "NO"
logical operations. The following identities for logical algebra conjunctions and
designing operations are presented (Tables 1.8 and 1.9).
convention
al sign

Table 1.5
Contact
equivavalent

convention Table 1.6


Contact al sign
equivavalent

convention Table 1.7


al sign
Contact
equivavalent
4

Cədvəl 1.8
Contact equivavalent of disjunction operation

Table 1.9

Contact equivavalent of disjunction operation

Lecture 2

The basic laws of boolean algebra

Boolean algebra is mainly based on 4 laws. These laws are as follows:


1) Commutative laws (переместиельный закон)
X1 + X2 = X2 + X1; X1 * X2 = X2 * X1. (1.6)
2) Associative laws (сочетательный закон)
( X1+X2) + X3 = X1+(X2+X3); (1.7)
(X1*X2)*X3= X1*(X2*X3) (1.8)
3) Distributive laws(распределительный закон)
(X1+X2)*X3=(X1*X3)+(X2*X3) (1.9)
5

(X1*X2)+X3=(X1+X3)*(X2+X3) (1.10)
4) Inversion (de Morqan) laws(закон инверсии)
X 1* X 2  X 1  X 2; (1.11)
X 1  X 2  X 1* X 2 (1.12)
Commmutative , associative and distributive laws for logical addition matches
with that of ordinary algebra. That is why there is no need to prove them. The
distributive laws for logical multiplication and inversion doesnot match with that of
ordinary algebra. To prove these kind of equations table method is used.at the same
time they can be proved by analytical and logical methods. For example,for
distributive:
(X1*X2)+X3=(X1+X3)*(X2+X3)=X1*X2+X1*X3+
+X3*X2+X3*X3=X1*X2+X1*X3+X3*X2+X3=X1*X2+
+(X1+X2+1)*X3=X1*X2+1*X3=(X1*X2)+X3;
The below equationscan be derived basedon distributive laws:
(X1*X2)+(X1* X 2 )=X1*(X2+ X 2 )=X1*1=X1; (X1+X2)*(X1+ X 2 )=X1*X1+X1*
X 2 +X2*X1+X2* X 2 =
=X1+X1*( X 2 +X2)+0=X1+X1*1=X1+X1=X1;
X1+(X1*X2)=X1*(1+X2)=X1*1=X1;
X1*(X1+X2)=X1*X1+X1*X2=X1+X1*X2=
=X1*(1+X2)=X1*1=X1;
X1+( X 1 *X2)=X1*1+ X 1 *X2=X1(1+ X2)+ X 1 *X2=X1+X1*X2+ X 1
*X2=X1+X2(X1+ X 1 )=X1+X2;
X1*( X 1 +X2)=X1* X 1 +X1*X2=0+X1*X2=X1*X2.
Lets look at below examples to prove the inversion laws:
1) Let us denote by D that any course process takes place. In order for this process
to occur, it is necessary to have a teacher (M) and a student's participation (T). The
interpretation is logically expressed as follows:
                                          D = M * T
This expression can also be written as below:
D  M *T (1.13)
At the same time, for the classroom to fail ( D ) it is enough for the student ( T ) or the
teacher ( M ) to be absent. This comment can be logically written as follows:
D = M +T (1.14)
Based on expressions (1.13) and (1.14) below equation can be written
M *T = M + T (1.15)
2) lets assume that ,we have both electric heaters(E) and water radiator(R) for
heating any room (İ). For heating the room, it is enough to connect an electric heater
(E) or a radiator (R). So :
İ=E+R və ya I = E  R (1.16)
In order not to heat it is necessary not to connect the electric heater () and the
radiator at the same time,
I = E*R (1.17)
6

Based on both (1.16) and (1.17) expressions


E  R =E*R (1.18)
(1.15) and (1.18) express the expressions (1.11) and (1.12)

Lecture 3

Analytic form of boolean functions

As can be seen from the tables (1.1) - (1.4) as the number of boolean variables
increases their description in table form becomes more and more difficult.For
example, for 3 variables it will be 256 and for 4 variables it will be 65536. That is
why to express the logic functions with analytic equations is more convinent. The
most convinent method is the standard way of describing the logic function. The
basis of standard description is elementary conjunction and disjunction .
When said elementar conjunction (minterm), the all possible variants of products
of logic variablesare considered (table 1.10).
When said elementary disjunction(maxterms) all possible variants of logical sums
of logic variables (table 1.10).
As can be seen from the table 1.10 elementary conjunction returns 1 only in
minterms from all possible variants. And elementary disjunction returns 0 only in
maxterms from all possible variantsElementar dizyunksiya isə giriş arqumentlərinin
bütün mümkün variantlarında ancaq bir halda sıfır qiymətini (maksterm) alır. If
boolean expression is expressed only with inversion, disjunction and conjunction
then this kind of boolean function is called normal function.
The boolean expression can be given in both disjunctive and conjunctive forms.
Disjunctive normal form means the sum of minterms (elementary conjunctions).For
example, Y=X1*X2+ X 1 *X2. Conjunctive normal form means the product of
maxterms (elementary conjunctions). For example, (X1+X2)*( X 1 +X2). The number
of elementary conjunctions and disjunctions are called its rank.
7

Table 1.10

The
values of The values of the elementar The values of the elementar
the conjunctions disjunctions
literals

X1 X2 Y= X 1 Y=X1* X 2 Y= X 1 * X 2 Y= X 1 + Y=X1+ Y= X 1 +
Y=X1*X2*X2 Y=X1+X2 +X2 +X2 +X2
0 0 0 0 0 1 0 1 1 1
1 0 0 0 1 0 1 0 1 1
0 1 0 1 0 0 1 1 0 1
1 1 1 0 0 0 1 1 1 0
8

For example, the expression Y=X* X 2 *X3 is a three variable elementary


conjunction, and the expression Y= X 1 +X2+X3+X4 is 4 variable elementary
disjunction.
If boolean expression contains elementary conjunctions that have the same
ranks and if they are connected by disjunctions then , such function is called “ Full
disjunctive normal form=FDNF” . If boolean expression contains elementary
disjunctions that have the same ranks and if they are connected by conjunctions
then , such function is called “ Full conjunctive normal form=FCNF”
It is proven in boolean algebra that, any boolean function except Y=0 and any
boolean function except Y=1 can be expressed with FDNF and FCNF respectively.
Assume that the values of 3 variable logic function are given in table 1.11.
Lets note the minterms corresponding to values “1” in boolean expression and
maxterms corresponding to “0” in boolean expression. The sum of minterms (FDNF)
will be the analytic expression of boolean function. At the same time, the product of
maxterms (FCNF) will the analytic expression of boolean function. It should be noted
that, both forms of boolean function is exactly same with each other.

Table 1.11
The values
The
of literals
value Minter Makster FDNF
of m m and
functio FCNF
n
X1 X2 X3 Y
0 0 0 1 X1* X 2 _
* X3
FDNF:
1 0 0 0 _ X1 Y= X 1 *
+X2+X X 2 * X 3 +
3 X 1 *X2*
X 3 +X1*
0 1 0 1 X 1 *X2 _
X2* X 3 +
* X3 X1* X 2 *
1 1 0 1 X1*X2 _ X3+
* X3 X1*X2*
0 0 1 0 _ X1+X2 X3;
+ X3

1 0 1 1 X1* X 2 _
*X3 MKNF:
0 1 1 0 _ Y=( X 1 +
X1+ X 2
9

+ X3 X2+X3)
*
1 1 1 1 X1*X2 _ (X1+X2
*X3 + X 3 )*
(X1+ X 2
+ X 3)

X1 X2 Y
0 0 0
1 0 0
0 1 1
1 1 1

İn above table 2 values for the result of 2 logic variables(X1, X2). Using these
values lets write analytic expression of this logic function. The FDNF form will be
like below:
Y= X 1 X2 + X1X2.
Lets simplfy this expression Н= X 1 X2 + X1X2=X2( X 1 +X2)=X2*1=X2
The analytic form of this logic function in FCNF form will be like below:
Y=(X1 +X2)( X 1 +X2).
Lets simplfy this expression:
Y=(X1 +X2)( X 1 +X2) =X1 X 1 +X1X2 + X2 X 1 + X2X2=
=0+X1X2 + X2 X 1 +X2 =X2(X1+ X 1 )= X2*1=X2.
As can be seen from the obtained equations both forms of logic functions are
exactly same with each other.

Lecture 4

Simplification of logic functions

If the logical function of any process is presented in a table, then the analytical
expression of that function is obtained by writing MDNF or MKNF forms. To
simplify the obtained analytical expression, it is necessary to use the basic rules of
logic function to minimize it.
10

İn order to minimize the logic expression Karnaugh-Veitch method is also used.the


use of this method is convinent if the number of variables are no more than 4. Figure
1.1 shows a Karnaugh map with 4, 6, and 16 cells, respectively, for two, three, and
four arguments.

Table 1.1

1 should be written into the cells of Karnaugh map where the minterms of logic
function returns 1 . To minimize the logic expression by this method you should
follow the below rules:
1) If the "1" is located in rows and columns corresponding to the adjacent cell, then
the conjunctions corresponding to these "1"-s will be reduced to one grouped term,
and in this conjunction variables of the same character are stored.
2) if the cells in which 1-s have been stored make square form then the
corresponding conjunctions are reduced by 2 rank. In this conjunction the variables of
the same type are stored.
3) if conjunction contains only 1 cell then logic expression remains same.
Example: simplfy the 3 variable logic expression corresponding table 1.12s.
Lets write down analytic expression of logic function corresponding to Table 1.12
Table 1.12.
X1 X2 X3 Y
0 0 0 0
1 0 0 0
0 1 0 0
1 1 0 1
0 0 1 1
1 0 1 1
0 1 1 0
1 1 1 1
11

Y=X1X2 X 3 + X 1 X 2 X3+X1 X 2 X3+X1X2X3 (1.19)

Let’s first simplfy this expression by using the basic laws of booean algebra

Y=X1X2 X 3 + X 1 X 2 X3+X1 X 2 X3+X1X2X3=X1X2 X 3 + +X1X2X3+ X 1 X 2


X3+X1 X 2 X3=X1X2( X 3 +X3)+
+ X 2 X3( X 1 +X1)=X1X2*1+ X 2 X3*1=
=X1X2+ X 2 X3. (1.20)

Lets analyze the simplification of that function by appling Karnaugh map.

X1 X1
X3 1
X3 1 1 1
X2 X2 X2

The terms that return 1-s in the Karnaugh map are X1X2 X 3 and X1X2X3. İf we
reduce these conjunctions by 1 rank and keep the same variables we will get the term
X1X2. The cells in which 1-s have been stored are conjunctions X1 X 2 X3 , X 1 X 2
X3. İf we decrease these conjunctions by 1 rank and keep the same variables we will
get conjunction X 2 X3. As a result , the function simplified by using Karnaugh map
is shown below.
Y= X1X2+ X 2 X3 (1.21)
This expression is same with the expression (1.20). So, the logic funtion written with
the expression (1.19) can be expressed as boolean expression 1.20 or 1.21 after
simplification process.
Examples:
1. simplfy the functions of boolean algebra.
* Y= X 1 X2+X1X2=X2( X 1 +X1)=X2;
* Y=X1+X1X2+X3=X1(1+X2)+X3=X1+X3;
* Y= X 1 X 2 +X1 X 2 = X 2 ( X 1 +X1)= X 2 ;
Y=X1( X 1 +X2)+X2( X 2 +X3)+X3=X1 X 1 +X1X2+X2 X 2 +X2X3+X3=0+X1X2+0+X
2X3+X3=X1X2+X3(X2+1)=
12

=X1X2+X3;

2. Prove the equalities of boolean algebra


* X1(X1+X2)=X1; X1X1+X1X2=X1+X1X2=X1(1+X2)=X1.
*(X1+X2)(X1+ X 2 )=X1; X1X1+X1 X 2 +X2X1+X2 X 2 =X1+X1( X 2 +X2)=
X1+X1=X1.
*X1+X1X3=(X1+X2)(X1+X3);
(X1+X2)(X1+X3)=X1X1+X1X3+X2X1+X2X3=
=X1+X1X3+X2X3+X2X3=X1(1+X3+X2)+X2X3=
=X1+X2X3.

3. Simplfy the logic expressions

*Y= X 1 X2+X1 X 2 +X1X2= X 1 X2+X1( X 2 +X2)= X 1 X2+X1= X 1 X2+X1(1+X2)=


X 1 X2+X1+X1X2=X1+X2( X 1 +X1)=X1+X2;
*Y= X 1X 2 + X 1 X 2 +X1X2= X 1 + X 2 + X 1 X 2 +X1X2= X 1 (1+ X 2 )+ X 2 + X1X2=
= X 1 + X 2 + X1X2= X 1 (1+X2)+ X 2 (1+X1)+X1X2= X 1 +
+ X 1 X2+ X 2 + X 2 X1+
X1X2= X 1 +X2( X 1 +X1)+ X 2 (1+X1)= X 1 +X2+ X 2 =
= X 1 +1=1;
*Y=(X1+X2)(X1+ X 2 )( X 1 +X2)=
=(X1+X2)(X1 X 1 +X1X2+ X 2 X 1 + X 2 X2)=
=(X1+X2)(X1X2+ X 2 X 1 )=X1X1X2+X1 X 2 X 1 +X2X1X2+X2 X 2 X 1
=X1X2+X2X1=X1X2;
*Y= X 2 X 1 X3+ X 1 X2X3= X 1 X3( X 2 +X2)= X 1 X3;
*Y=X1 X 2 + X 1X 2 + X 3 = X1 X 2 + X 1 + X 2 + X 3 = X 2 (X1+1)+ X 1 + X 3 = X 2 + X 1 + X 3
= X 1X 2 X 3 ;
*Y= X 1 X2 X 3 + X 1 X2X3+X1X2 X 3 +X1X2X3= X 1 X2( X 3 +X3)+X1X2( X 3 +X3)=
X 1 X2+X1X2=X2( X 1 +X1)=X2;

Lecture 5

The overall information about programmable logic controllers

Programmable logic controllers are special electronic devices that can be


programmed and are used for automating technological processes . These devices are
also called PLC (proqrammable logic controller). Unlike computers PLC-s give
signals to the system according to input signals. First logic controllers were designed
in a module such that relays and contacts are connected to each other according to
certain. The very first PLC was produced in 1968 by Modicon-084 and had 4 kB
13

memory. Programmable logic controllers that have some certain limited capacity are
also called as programmable intellectual relays.
The name of some PLC-s and PIR produced by different companies have been
given below:
 PLC called ‘Simatic S5’ and ‘Simatic S7’ by Simens ;
 PLC called ‘Modicon’ by Schneider Electric;
 PLC called ‘LOGO’ by Simens
 PIR called ‘Zelio logic’ by Schneider Electric
 PIR called ‘EASY’ by Moeller;
The programming languages used for PLC and PIR are shown below:
Graphical languages:
 LD (Ladder Diagram) – relay, schematic language for electric contacts;
 FBD (Function Block Diaqram) – functional block diagram;
 SFC (Sequential Function Chart) – sequantial function chart;
Text languages:
- STL (Statement list) – operator sheet.

Introduction to Programmable Intellectual Relay called Zelio logic produced


by Schneider Electric.

The programme so called “Zelio Soft 2” is used in order to know the working
capacity and principle of this relay. “Greate new program” button is pressed to create
a new program and to select the module of programmable intellectual relay (picture
2.1).

Picture 2.1. A new window to create new program


14

Then the type of selected module is determined. For example, SR2B121BD


(picture 2.2). you can access the information about other parameters of the selected
module such as voltage , the number of input and output signals , the number of
discrete and analog inputs , programming languages from here.

Picture 2.2. the selection of type and module of Programmable Intellectual Relays

The programming language of the selected PIR (LADDER or FBD )is determined.
(picture 2.3).After programming language is selected the window according to
selection is opened. The window selected according to LADDER language is shown
in picture 2.4. Here, there are 1 column for placing windings and 5 columns for
placing contacts. The number of lines is 120. You can write your explanations at the
end of each line in the Comment box. The elements are placed at the bottom of screen
for writing programme. These elements serve for the following functions:
15

Picture 2.3. selection of programming language (LADDER)

- input signals;

- input switches;

- inbetween relays;

- meter comparators;

-output relays;

- analog comparators;

-timers;

- clocks;

-meters;

-fast meters;

-text block;

- illumination of display;
16

- summer/winter;
17

Picture 2.4. A new window to write program in LADDER language


18

If you bring the cursor onto each element you can see its name , quantity and
symbol. For example, in picture 20.4 the number of input signals and their syymbols
are shown.

Lecture 6

The elements used in LADDER program of Zelio Logic programmable


intelectual relays

Intermediate relays:
These relays perfors certain functions at intermediate stages. However, they dont
have any connection to other devices. İn figure 2.5 the number of intermediate relays
(28) , contacts of PLC named as SR2B121BD and their symbols are shown. For
example, symbol M1 of intermediate relays M1 shows its contact and symbols in
remaining 4 cells show its windings. As seen from the figure each intermediate relay
has 4 different typed windings.it should be noted that, there is no limitation in the
number of contacts of relays. Windings perform the following functions:
[ this winding closes its contacts when power is given and opens when power is
removed;
performs the function of impulse type relay, that is, the contact switches its
position every time the winding is energized;
S (Set) this winding closes its contacts when energized and stays closed even after
power is removed;
R (Reset) when this winding is energized the relay will return to its original state.

Şəkil 2.5. The number of timers, contacts and their symbols


19

In order to get a clear view of the operation of the windings the intermediate relay,
it is necessary to collect the schematic depicted in Figure 2.6 and view it in the
"Simulation" mode.
It should be noted that the output windings of the relays have the same function as
(Q1-Q4).
Timers:
Figure 2.7 shows the number of timers, contacts and their symbols. As you can
see from the picture, the SR2B121BD PIR has 16 timers. Each timer has two
windings:
 Winding T. It performs basic functions of the timer;
 Winding R. This will reset the timer (Reset)
The contacts of each timer (T1-TG) are unlimited. To select the timer features and
settings, you need to highlight the "Parameters window" by pressing the right
button on the T or R windings. After this option, the window in Figure 2.8 opens.
As you can see from the picture, the timers perform 11 functions. For each
selected function, the window depicts diagrams corresponding to the timer
winding and contact. It should be noted that the diagram in the upper line refers to
the timer winding, and the diagram in the bottom line refers to the timer contact.
The timer that will be created when the timer operates is obtained by using the
Unit and Time buttons. The features that the timers implement are the following:

Picture 2.6. the program created in LADDER to analyze working principles of


windings of intermediate relays
20

Lecture 7

Timers

Figure 2.7.The number of timers , symbols of contacts and windings

Figure 2.8. the window for selecting functions and parameters of timers

Function A:
21

The contacts of timer is closed after time period of ‘t’ after power is given.when
power is removed contacts are opened.

Function a :

When impulse voltage is applied after time t contacts of timer is connected. To


open the timer contacts it is necessary to give impulse voltage to the Reset windings
Function C:

When power is applied contacts are connected. Contacts remain closed for time
period t after power is removed. Then after time t they are opened.

Function B:

As soon as you apply the impulse voltage contacts are closed and after time t they
are opened.

Function W:

Contacts are opened and closed after time t after power has been given and
removed.
Function D:
22

While the timer is energized, the contact of the timer opens with a time interval "t".
When the voltage of the timer is removed, the process ends and the timer contacts
remain open.
  Function PD :

After impulse voltage is applied to the timer winding, its contact is opened with a
"t" time interval. When the impulse voltage is applied to the R (Reset), the process
ends and the timer contacts remain open.
Function T:

Signals can be applied to the windings of the timers multiple times. If the
sum(t1+t2+t3) of periods that these signals continue is equal to the preset time t then
contacts of timer are connected. Contacts of timer will be opened when the impulse
voltage is applied to winding R. İf the signals is applied once to the main winding and
the time that it continues is equal to t then after time t it will be connected again.to
open contacts the impulse must be applied to winding R.

Function AC:

The contacts of timers are closed after time tA after the power is applied. After
time tB the power is removed contacts are opened.
Function L:
23

After power is applied to the winding of timer the contacts will be connected in
time tA and opened in time tB. This process continues periodically until voltage is
removed from its windings.
Function I:

After the impulse voltage is applied to the winding of the timer its contacts will be
connected in time tA and opened in time tB.this process will periodically continue
until impulse voltage is applied to the winding R of timer.
To analyze the timer operation, the program described in Figure 2.9 should be
explored in Simulation mode.
The following buttons illustrated in Figure 2.10 are used to select the timer
settings: The Unit button selects s-seconds, M-minutes, H-hour units. The numeric
values of these units are recorded using the Time button. If the "Latching" button is
as shown in the picture, it means that if the voltage is interrupted and restored, the
timer will resume its operation. Otherwise, that is , if there is no ‘v’ on the latching
button then timer will resume its work from beginning. If ‘v’ is placed on the latching
button then it is not possible to change selected parameters of timer from PIR panel.
24

Figure 2.9. The program written in LADDER to analyze the operation of timers.

Lecture 8

The elements of Zelio Logic programmable intellectual relays used in FBD


software language

Figure 2.3 shows the selection of LADDER software language. To select FBD
software language it is necessary to click the button “FBD” in section “Select the
programming type” from the window “Module selection” . Then following window is
popped up. (Figure 2.28).
In the figure, 8 inputs of the SR2B121BD PIR are shown on the left, and 4 outputs
on the left. The IE, I2, I3, and I4 inputs can only be discrete signals, and discrete and
analog signals may be sent the IB, IB, ID, IE inputs.
The symbols and total number of input signals are shown in figure 2.29

The symbol shows that it can be discrete input signals and can be set to inputs
(İ1, İ2, İ3, İ4). The options for discrete input pulses are displayed in the settings
window (Figure 2.30) to describe the field and input signals in different ways and to
write explanations.

Analog input signals can be placed at İB, İC, İD and İE inputs.

Figure 2.28. Area for writing FBD software


and inputs and outputs of PIR
25

Şəkil 2.29. overall view of input signals of PİR

Figure 2.30. parameters window of discrete input pulses


Parameters window of analog signals is shown in figure 2. Here , the area for
comments and the ways of describing analog signals have been shown.

İn case of need for filtering the discrete input signals before sending this
symbol is used. İn parameters window the parameters of the filter must be set. İn

case of need for filtering the analog input signals before sending this symbol is
used.in parameters window . cut-off frequency of analog signal must be set in
parameters window.
26

Figure 2.31. Parameters window of analog signals

Other input signals are placed in the program area. These input signals are as
follows:

- Signal that performs "ON" operation;

- Signal that performs "OFF" operation;

-control buttons on the PIR

- input signal that give only constant value;

-rectangular impulse generator that has a period of 1;

-input signal that gives 1 or 0 depending on summer and winter.


SR2B121BD PİR-has two types of output signal: area for comments and symbols

of output signals is shown in parameters window of output “OUT” . The


output LCD is used to turn on the display and is placed in programming area.
27

Figure 2.32. parameters window of output signals

Timers:
The symbol of A/C timers and its parameters window are shown in figure 2.33.
connection and disconnection time is adjustable.
The symbol of B/H timers and its parameters window are shown in figure 2.34. as
cann be seen from parameters window it has two functions :
- function B. In this case, the duration of the output signal (T), regardless of the
duration of the input signal, does not change.
-function H. In this case, the duration of the input signal must be greater than the
duration of the output signal (T).

Figure 2.33. the symbol of A/C timer


And its parameters window
28

Figure 2.34. the symbol and paramaeters window of B/H timer

Figure 2.35. the symbol and parameters window of Li timer

The symbol and parameters window of LI timer are shown in figure 2.35. this
timer has the following functions:
- Function Li. In this mode, during the duration of the input signal, the output signal
receives "1" and then "0" periodically, depending on the time of connection and
disconnection
- Function L. İn this mode during the duration of input signal output signal
becomes ‘0’ and ‘1’ periodically for connecting and disconnecting times respectively.
- İn Parameters window when “number of flashes” is pressed the number of
periods of output signal is shown. Note that connecting and disconnecting time is
29

considered beforehand. Timer stops after the number of periods which are set when
input signal is given are completed.
When you press the “Duration of flashes” button in the Settings window, you will
see the duration of the output signal, taking into account predicted connection and
disconnection times. When the timer is activated it stops after the preset time has
elapsed.
When you click the “Continuous of flashes” button in the Settings window, it is
assumed that the output signal will continue periodically, taking into account the
predefined connection and disconnection times. When the timer is activated, the
output signal continues periodically during the duration of the input signal.
The symbol of the BW-type timer and the settings window are shown in Figure
2.36. This timer has the following features:
- “from OFF to ON” –when input signal is sent to input there is an impulse
signal at the output;
- “from ON to OFF” - When the signal is removed from the timer input, the output
pulse is triggered;
- “from OFF to ON” and “from ON to OFF” – the output impulse is triggered
when input signal is given and when the input signal is removed

Figure 2.36. the symbol of BW timer and parameters window


30

To visualize the effect of output signal of BW timer following programm can be


used:

Figure 2.37. the program which shows the effect of output signal of BW timer

The connection program of “BİSTABİLE” impulse relay is shown in figure


2.38. this relay acts as impulse relay that is , every time input signal is sent output
signal changes its state.

Figure 2.38.the connection program of “BİSTABİLE” impulse relay

A / C Additional Input Time: This timer differs from the previous A / C timer
because it has a green line on the timer and has 4 inputs. The difference in the
working principle is that the values of connection and opening time for this kind of
timer is set in green inputs (figure 2.39).

Şəkil 2.39. A/C ipli əlavə girişli taymerin


qoşulma proqramı

B/H additional input timer: the differnece between this timer and previous one is
that you can set the connection value from green line in its side(figure 2.40).
31

Figure 2.40 . connection program for B/H additional input timer

Li additional input timer: the difference between this Li timer and previous Li
timer is that the values for parameters of the timer can be set from green inputs in its
side (Figure 2.41). It should be noted that incoming signals can be discrete or analog.

Figure 2.41. the connection program of Li additional input program


32

Lecture 10

Application Steps/Substeps Bar

Project
This is the first step in creating/opening an
application. The Application Steps/Substeps
Bar displays the name of the open application
in the top-right corner.
Describe
This is the second step in building the Twido
automation application. The Describe step lets
you select hardware resources from the catalog
and describe how equipment interconnect with
one-another via networks.
Program
This is the third step in setting up your Twido
application. It provides access to the following
3 substeps.
1.Configure
This substep lets you view/set:
 Hardware Configuration for
the base controller, expansion
modules, communication modules
and hardware options
 Data Objects Configuration
for Simple Objects, Function Blocks,
I/O Objects, and Professional
Objects
 Controller Behavior
 Application Program /
Password Protections

2.Program
33

Opens the default Program


Editor (Ladder or List) and
provides access to the Symbol
Editor.

3.Debug
Lets you manage the TwidoSuite-to-
PLC connection and provides access
to Animation Tables Editor and
Monitoring tasks.
Report
This is the final step in setting up your
application. It opens the Report Manager
window to select report components, configure
printing options, and export the application
report to HTML format.
Miscellaneous
Provides access General Help and information
About TwidoSuite.
Preference
Opens the User Preferences window.

Shows the Task-level Quick Help pages


34

Quick Access Bar

Return to previous

task, as you left it

Move back to next task, as

you left it

Save current project

Analyze Program
Launches and stops the Simulator.
35

Setting Preferences

Displaying Preferences

Click the Preference icon on the Steps bar to display the Preferences
window as shown below.

Preferences Window

Customize Project Preferences


 Set the default project directory path
 Set the default/customize projects
 Set the default program editor (Ladder or List)
 Set the autosave options
 Set the background color
 Set the default/custom project image
 Select the automatic/manual functional level management
method to implement at project start
 Add/update/remove connections by using the connections management
table
Creating and Editing a Program

Overvie
w
In this section, you will learn how to create and edit a program with
TwidoSuite.

To start TwidoSuite you need open the Application Launcher. Click

the icon located on your PC desktop.


The Application Launcher dialog box appears as shown below:

2
Create/Edit Program

From TwidoSuite Application Launcher, you have access to the following


modes:
 TwidoSuite Programming Mode
 TwidoSuite Monitoring Mode
 PLC Firmware Update utility

What's in this Chapter?


This chapter contains the following topics:

To Page
pic
Step 1: Create a New Project 25
Step 2: Describe Application 27
Step 3: Define Application I/O Wiring 30
Specifications
Step 4: Configure Hardware and Software 32
Resources
Step 5: Write the Program 37
Step 6: Test the Program 46
Step 7: Transfer and Run the Program 54
Step 8: Debug the Program 57
Step 9: Manage the Program Report 61
Step 1: Create a New Project

How to Start the Project Manager

Click the Project icon on the TwidoSuite workspace Steps bar to


display the Project window and create/open/edit a TwidoSuite project.

Project Window
How to Create a New Project
1. Click Create a new project in the "Project Management Actions Pane."
2. Enter a descriptive name for the project in the File Information
frame. A valid project name can contain up to 36 alphanumeric
characters (spaces allowed).
3. Specify the new path for the project directory or use the default path.
In the Directory text box, either enter directly the storage directory
path or click the Browse button located immediately to the right of the
Directory text box to locate the folder where the project files will be
stored.
4. Enter project authoring information in the Project Information
frame. This includes providing Author’s name, Department name,
project version number in Index field and Industrial Property.
5. In the Comments tab, include the name of the project and write
a brief description. Use the right scrollbar to read the complete
text.
6. If you are updating an existing project, click the Description tab
to view a thumbnail representation of the system architecture (see
Step 2: Describe Application, page 27).
7. Select the Image tab and click Modify to customize the project
picture, or use the default picture. The project picture is printed on the
front cover of the project report (see Step 9: Manage the Program
Report, page 61). A valid picture file must be in the .BMP format.
8. Click Create to save your changes to the new project file.
Note: If you are updating information of an existing project, click
Apply to save your changes.
Step 2: Describe Application

How to Start the Describe Feature

Click the Describe icon on the TwidoSuite workspace Steps bar to


display the Describe window.

Describe
Window In the Describe window, you declare the Twido automation system
elements selecting hardware resources from the catalog and describing
how equipment interconnect with one-another via networks.

Lecture 11

Elements of the Describe window:


 Graphic Pane: This is where you build the graphical representation of
your application by adding hardware elements. Drag selected
hardware elements from the catalog pane to the graphic pane to
gradually construct your automation system. You use the graphic pane
to declare networks and how equipment interconnect with one another,
as well.
 Describe tool bar: Use the Describe tool bar to manage the graphic
pane and elements.

a. Select page format


b.Zoom in
c. Zoom out
d.Select graphic element
e. Add a note
f. Configure element
g. Erase element
 Product catalog pane: This dockable pane displays the Twido
hardware elements catalog, including compact base and modular
controllers, expansion modules, options, network elements in a tree-
like structure.
The bottom part of the pane provides a short description of the selected
hardware element.
 Bill of materials pane: This dockable pane shows a bill of materials
of the hardware elements that currently make up the open project.
You can conveniently click Export to save the bill of materials to a
file in .CSV format.

How to Describe Your Application


1. Use drag-and-drop to place catalog elements in the graphic pane,
starting with the base controller (compact or modular), then adding
expansion modules and options as supported by the controller and as
required by your application.
2. Configure communication ports by double-clicking the ports graphical
represen- tation in the graphic pane.
3. Use drag-and-drop to place network elements available from the
catalog pane in the graphic pane.
4. Click to select a Twido communication port and drag the cursor to
draw the network links between the Twido base controller and
network elements. Connect network elements with one another in the
same manner to build network links.
NOTE: To find out more about describing applications, declaring
network elements and configuring networks, please refer to the
TwidoSuite Operation Guide - Online Help.
Automatic-Watering System Example
In this example, you will need to:
1. place a TWDLC•A10DRF 10 I/O compact base controller in the
Describe window and
2. add the RTC (real-time clock) option to the TWDLC•A10DRF
controller in the Describe window, as shown in the figure below.
Step 3: Define Application I/O Wiring Specifications

Introductio
n
Before you proceed with programming of your application, you must
set your application I/O wiring specifications.

I/O Wiring Specifications


It is good practice to draw up a small sketch of your application I/O
wiring. The following are I/O specifications for the automatic-
watering system: Input specifications
 %I0.0 input from water high level sensor in water tank
 %I0.1 input from water low level sensor in water tank
Output specifications
 %Q0.0 output to water pump actuator
 %Q0.1 output to irrigation control valve
RTC Specifications
 RTC option must be installed on Twido 10 I/O base controller.
I/O wiring specifications are outlined in the following wiring sketch:
Step 4: Configure Hardware and Software Resources

Introduction
Now that you have declared the hardware elements in the Describe step,
you will need to configure hardware and software resources.
To have access to hardware and software configuration options, select

Program  Configure on the TwidoSuite Steps bar.

Configure Hardware Resources


Select the Program  Configure  Configure Hardware task to open
the hardware configuration window.

Graphic Pane: Picture of the controller and its expansions


Configuration Pane: Description (with configuration) of the
currently selected hardware elements
Configurable hardware resources include:
 Base and remote controllers discrete inputs and outputs
 Expansion I/O modules parameters, such as analog modules
 AS-Interface module and slave devices parameters
 CANopen master module and slave devices parameters
 Options parameters
Automatic-Watering System Example
In this application example, you will find it useful to symbolize inputs
and outputs (see Step 3: Define Application I/O Wiring Specifications,
page 30).
To configure symbols for I/Os, follow these steps:
1. Select the Program  Configure  Configure Hardware task to
open the hardware configuration window.
2. Click once on the controller picture to select the TWDLCAA10DRF
controller in the graphic pane.
3. In the configuration pane, enter symbolic names for the I/Os you
want to symbolize, for example:
 WATER_HIGH_LEVEL, in %I0.0 symbol field
 WATER_LOW_LEVEL, in %I0.1 symbol field
 WATER_PUMP, in %Q0.0 symbol field
 IRRIGATION_VALVE, in %Q0.1 symbol field
Note: Symbols are in upper-case format by default. A valid symbol can
contain any combination of 32 characters: (A-Z),(0-9), and (_). No
spaces allowed.
4. Changes are effective as soon as the cursor leaves the current input or
output line.
Configure Software Resources
Select the Program  Configure  Configure Data task to open the
software configuration window.

Configurable software resources include:


 Simple objects
 Memory bits (%M)
 Memory words (%MW, %MD, %MF)
 Constants (%KW, %KD, %KF)
 Function blocks
 Timers
 Counters
 Drum controllers
 LIFO/FIFO registers
 Shift bit registers
 Step counters
 I/O objects
 Fast counters
 PLS/PWM pulse generators
 Very fast counters
 Advanced objects
 Schedule blocks
 PID
 Macro functions
NOTE: Internal memory objects such as system bits and words, memory
bits and words, and network exchange words are non-configurable
objects.
Automatic-Watering System Example
In this application example, you will need to configure two software objects:
 One Schedule Block (Real Time Clock 0) that will manage the
weekly watering schedule.
 One Counter (%C0) that will serve as a maintenance cycle counter.
NOTE: Configuring schedule blocks
 To support schedule blocks, make sure the RTC option is installed
on your TWDLCAA10DRF controller.
 Schedule blocks are non-programmable objects that do not need any
declaration in the Ladder or List program. You simply need to enable
them and configure their respective parameters.
To configure the Schedule Block (Real Time Clock 0), follow these steps:
1. Select the Program  Configure  Configure Data task to open
the software objects configuration window.
2. From the "Object Categories" frame, select Advanced objects.
Result: The list of available advanced function blocks for that
particular controller is displayed in the dedicated "Advanced objects"
frame below.
3. From the "Advanced objects" frame, select %SCH - Schedule
blocks. Result: The schedule blocks configuration window appears in
the center pane. Available schedule blocks (numbered 0 to 15) are
listed in a table.
4. Select the schedule block you want to configure in the table: Real
Time Clock 0. Result: By default, the schedule block is disabled and
all fields appear as non- configurable in the configuration window.
5. Click the Configured checkbox to activate the configuration fields
and follow these steps to configure the schedule block (the following
settings are given as an example only):
a. Enter the Output Bit address. In this application, this is the address
of the output terminal connected to the control valve of the
irrigation system:
%Q0.1
b.Select Start Month and End Month for starting and ending the
Schedule Block.
Range: January to December.
Time and End Time for setting the time of day for
c. starting and ending the Schedule Block.
Range: 00:00 to 23:59.
e. Select the Days of the Week to activate the
schedule block output. Checked boxes indicate the
days that the output device is activated.
6. Use the Up/Down keys to scroll through the list of
schedule blocks in the table or use the mouse pointer
to select a particular schedule block.
7. Changes are effective as soon as the cursor leaves
the current schedule block line.
Now that you have configured the schedule block,
follow these steps to configure the maintenance cycle
counter (%C0):
1. Select the Program  Configure  Configure Data
task to open the software
objects configuration window.
2. From the "Object Categories" frame, select Function
blocks.
Result: The list of available function blocks for that
particular controller is displayed in the dedicated
"Function blocks" frame below.
3. From the "Function blocks" frame, select Counters.
Result: The counters configuration table appears in the
center pane. Available counters range from #0 to #127.
4. Select the up/down counter you want to configure in the
table: %C0.
5. For the selected up/down counter set the
corresponding fields in the table, as follows (the
following settings are given as an example only):
Range: a. Click the Symbol text box and enter a
1 to 31
symbolic name for this counter:
(dependi
MAINTENANCE_REQUIRED (for
ng on
example.)
month
selection Note: Symbols are in upper-case format by
). default. A valid symbol can contain any
d. combination of 32 characters: (A-Z),(0-9), and (_).
No spaces allowed.
b.Select a Preset value: 100 (watering cycles, for
example.)
Range: 0 to 9999.
Default: through the list of counters in the table or use the
9999. mouse pointer to select a particular counter.
c. 7. Changes are effective as soon as the cursor leaves the
current counter line.
NOTE: Counters are programmable objects that need
to be declared in the Ladder or List program. It is at
that stage that you will specify whether the counter
used is a up or down counter.

6.
Lecture 12

Use the
Progra
m program which is the core of your Twido automation application.
Editor Major programming and configuration features include reversible
to ladder and list language programming.
develop
This section will focus on providing you the basics of Ladder language
the
programming in TwidoSuite program editor. For details on List
main
language programming and Ladder/List reversibility features, please
refer to the TwidoSuite Programming Guide on the CD-ROM.

To have access to the program editor, select Program  Program

on the TwidoSuite Steps bar and click Edit Program on the task bar.
NOTE: In program mode, the task bar provides access to the Symbol
Editor as well.

Program Edition Window


The Program Edition window features the Program Editor and five
browsers and tools available on the functions bar, as described in the
following figure:
Ladder Editor Elements
The Ladder Editor is a graphics-based, program editor used to view,
create and edit ladder programs.
When you select Ladder in the program tool bar drop-down list box, the
program editor switches to Ladder mode. The following figure describes
the various elements that make up the ladder editor:
Program Edition Tool Bars
3 ladder programming tool bars (see figure above) are available that allow
you to easily edit programs and graphically enter ladder instructions:
 Program Tool Bar
 Ladder Palette Tool Bar
 Extended Ladder Palette

Program Tool Bar

1 Toggle Ladder/List mode


2 Add section
3 Insert section
4 Add subroutine
5 Cut in 2 sections
6 Zoom ratio (default is 100%)
7 Cut
8 Copy
9 Paste
10Undo
11Redo
12Display in hexadecimal or decimal
13Display/Hide rung comments
14Display/Hide ladder elements comments
15Display/Hide symbols
Ladder Palette Tool Bar

1 Add rung
2 Insert rung
3 Add normally open contact
4 Add normally closed contact
5 Add coil
6 Add inverse coil
7 Add link
8 Remove link
9 Add Comparison block
10Add Operation block
11Add Timer block
12Add Counter block
13Add Jump or Subroutine Call
14Extended Ladder Palette buttons (see below)

Extended Ladder Palette

1 Contacts: Normally Open, Normally Closed, Rising Edge, Falling Edge


2 Special Contacts: XOR, XORN, XORR, XORF, OPN, SHORT
3 Coils: Normal Coil, Inverse Coil, Set Coil, Reset Coil
4 Special Coils: JMP/SR, RET, END, Grafcet Coil 1, Grafcet Coil 2
5 Basic Function Blocks: %FC, %VFC, %PLS, %PWM
6 Advanced Function Blocks: %MSG, %R, %SBR, %DR, %SC

Overview of Ladder Programming


You write a ladder program in the logical order required to control a
machine or process.
Sections/Subroutines
A TwidoSuite ladder program is made up of a sequence of sections and
subroutines containing ladder rungs. Sections and subroutines are
delimited by section/subroutine headers. They are numbered automatically
by the TwidoSuite software.
The following figure describes a typical section header (subroutine

headers are similar to this).


Rungs
A ladder rung is similar to a relay logic diagram. Each rung consists of
one network of linked graphical elements organized in a programming
grid starting with a potential bar on the left and ending with a potential
bar on the right.

The following figure describes a typical ladder rung.

NOTE: Programs are limited to a total of 128 sections and subroutines


with a maximum of 64 subroutines (SR0 to SR63).

Lecture 13

How to Edit a Program


The following procedure gives you the basics to start editing a ladder
program.
1. When you start writing a new program, press the Add Section icon

on the program tool bar at the following prompt.


Result: The first section is inserted in the ladder editor, displaying the
first empty rung, as shown below. (Note that a program must contain at
least one section.)
2. Double-click the section header to enter the following:
 Section title
 Comments
3. Double-click the rung header to enter the following:
 Rung title
 Comments
 Declare rung type: Standard, Label (%Li), or Grafcet step (Ini. step,
Start step, or Step post)
4. Select the empty horizontal link that runs between the rung left and
right power lines.
Result: The selected link is highlighted in blue..

5. Click the Normal contact icon (example) on the Ladder Palette to


insert the input graphical instruction.
Result: The normal contact is inserted in the leftmost part of the rung.

6. Repeat steps 4 to 5 to insert other graphical instructions, as needed.


7. A valid rung must always feature an output element (coil or operation
block). Click
the Coil icon (example) on the Ladder Palette to insert the output
graphical instruction.
Result: The coil element is inserted in the rightmost part of the rung.

Note: At this stage, you will note that the red color bar shows that the rung
is still invalid.
ou must specify an address to each element in the
8. Y rung. Click the address field above each element
a r the input contact and %Q0.0 for output coil
n (example). Note that you may also optionally
d specify a symbol and comment for each element.

e
n
t
e
r
Result: The yellow color bar indicates that this rung
t is valid, but has not been analyzed (compiled with the
h program) yet.
e 9. Click the Analyze icon to start the program
validation process and check for possible program
d errors in the Error list box.
e
NOTE: To find out more about program edition rules
s
and procedures, please refer to the TwidoSuite
i
Operation Guide - Online Help.
r
e
Example Program for the Automatic-Watering System
d
This section gives you the ladder program that applies
a to the automatic-watering system example. This
d application consists of 2 independent processes:
d  Water tank level management
r  Watering Count
e This wil require to create 2 sections in the program, one
s for each process.
s
Water tank level management section
.
Insert the first section of the program, and create the
E following program.
n
t
e
r

%
I
0 Description of the water tank level regulation
. process:
0 1 Whenever the water low-level is reached (%I0.1
is closed), the water-pump is started (%Q0.0 is
f
closed). Note that %I0.0 remains normally
o
c hed (%I0.0 is open), the water-pump is stopped
l (%Q0.0 coil is activated and %Q0.0 contact is
o closed). Note that the %Q0.0 contact allows to
s keep the water-pump running until the water high-
e level is reached.
d
.
2 W
h
e
n
e
v
e
r

t
h
e

w
a
t
e
r

h
i
g
h
-
l
e
v
e
l

i Save the Program


s

r
e
a
c
Project  Save current project task and click the Save button.
Result: The project files containing the application program are
saved to the disk in the project directory which location has been
Lecture 14
specified in the project file information
window.
NOTE: It is good practice to frequently save your project to the PC
disk as you are writing larger ladder/list instructions programs to
prevent any significant loss of work due to power shut-down or other
computer problems.
Once you
have finished
writing your
program, you
can save
your
program in
any of 2
ways:
 Provided
that you
have
already
given a
name to
your
application
and
specified
the project
directory
(see Step
1: Create a
New
Project,
page 25),
click the
Save
current
project
shortcut on
the Quick
Access Bar.

 Select
Step 6: Test the Program

Introductio
n
TwidoSuite offers a simulator function that enables you to test a newly
written program without loading it on a controller. The Twido
Simulator lets you run the program and test different parameters in
order to see if the expected responses are occurring.

Starting Twido Simulator


To start the Twido Simulator select Program  Program and click the
Twido Simulator button at the bottom right of the TwidoSuite screen.
Result:
 TwidoSuite switches automatically to Program  Debug 
Animate the program.
 The Twido Simulator overview window appears.
 The Dashboard pops up.
 If an RTC is configured or embedded, the Time Management
Panel is also displayed.
The Simulator loads the configuration you have created in the Describe
screen.
NOTE: Some functions of your application cannot be tested using the
Simulator.

Using Twido Simulator


Once the Simulator is launched you can use the functions that are available
in debug mode. These are:
 Animate the program
 Manage animation tables
 Check PLC
 Monitor hardware configuration
 Monitor software configuration
 Monitor described configuration
 Monitor the behavior
You can find more information on animating tables and managing
animation tables in Debug the Program (see page 58).
Twido Simulator Overview Window
The Twido simulator overview window shows the state of inputs/outputs of
all the described base controller and expansion modules.
The overview window is shown below:

1. Click to minimize to tray.


When the overview window is minimized, the Twido Simulator icon
appears in the status area (on the bottom right of your screen).
Double click on this icon to restore the overview window.
2. Inputs states:
 Click to set/reset the corresponding input
 Double click to open the discrete input settings window.
3. Outputs states: double click to open the output tracing window.
4. Click to always toggle the overview window on top
5. PWR LED: Indicates if the simulated PLC is powered up.
6. RUN LED: Indicates the state of the simulated PLC.
7. ERR LED: Indicates the state of the simulated PLC.
8. STAT LED: The operation of the STAT LED is defined by user logic
9. Base controller and expansion modules references
10. Expansion modules that cannot be simulated.
Right click on the Overview Window to expand the following contextual
menu:
 Time Management: Opens the Time Management panel.
 Output Tracing: Opens the Output Tracing window.
To access analog input settings, double click on the analog input
LED. To access discrete input settings, double click on the
discrete input LED.

Twido Simulator Dashboard


You can use the Twido Simulator dashboard to issue the following
commands to the controller:

 Run (in simulate mode)


 Stop
 Initialize
When the TwidoSuite application is in simulate mode, these commands can
be selected from the Twido Simulator dashboard shown below:

RUN, ERR, and STAT LEDs are simulated in the Twido Simulator
dashboard as they would appear on a connected base controller (for
details about these LEDs, see the Twido Hardware Reference Guide).
Using Twido Simulator Dashboard
To close the control panel dashboard:

To re-open the dashboard, click the button as shown below:

Expanding Twido Simulator Dashboard


To expand/reduce the control panel dashboard, click as shown below
The dashboard is then expanded as shown below. It may be reduced
again by clicking the same expansion/reduction button.

Time Management Panel


The Time Management Panel allows to control the timing of the
simulation (Action on the time management panel modifies the RTC
time accordingly and immediately), you can choose:
 The beginning and the end of the simulation
 To accelerate the simulation.
NOTE: The default initial time of the simulation is the time of
your PC. The default duration of the simulation is 7 days.
The Time Management Panel is shown below:

1. Beginning time: Time at the beginning of the simulation


2. Simulation Period:
 If this box is checked, then when end time is reached the simulator
stops and a window pops up with the following text: End Time
Reached! PLC switches to STOP even if you don’t click OK.
 If this box is not checked the simulation stays in RUN mode.
3. End time: Time at the end of the simulation
4. A cursor indicates the current time progression.
You can move manually the cursor to set current time.
 If the current time is former to the beginning time then the cursor
will go on "Beginning"
 If the current time is posterior to the end time then the cursor will go on
"End".
5. Simulator status:
 : Simulator in Stop mode
 : Simulator in Run mode
 : Simulator in fast forward
 : Simulator in fast rewind
6. Indicates the current time of the simulation
7. Back to beginning time
8. Fast rewind in time
9. Fast forward in time
10. Go to the end time.
11. Set the level of fast forward/rewind in time
Setting Simùlation Parameters
In order to run tests on your program, the Twido Simulator lets you set
the input values and the configure which outputs are traced.
You can set both the discrete inputs and analog inputs.
 To open the discrete input settings window, double-click on the
discrete input LED.
 To open the analog input settings window, double-click on the analog
input LED.
You can also configure up to 8 outputs to be traced traced. You open the
tracing configuration window by clicking the Configure button of the
output tracing window.

Output Traces with the Simulator


The outputs tracing window shows the variation of analog and discrete
outputs over time.
The outputs tracing window is shown below:

Stopping Twido Simulator


To stop the Twido Simulator, click the button at the bottom right of
the TwidoSuite screen.
After stopping the simulation TwidoSuite returns to the screen displayed
before starting Twido Simulator.
NOTE: It is not possible to backup the Twido Simulator program before
stopping.

Lecture 15

Step 7: Transfer and Run the Program

Introduction
In this section, you will find out how to transfer the program to the
Twido PLC and start running your program on the controller. Note that
a program must be saved before it can be transferred to the PLC.

Transfer the Program


In order to run your application for debugging, you must first transfer it
to the controller RAM.
Follow these steps to download your application program to the PLC:
1. If the PC is not yet connected to the controller, select a connection
from the connections table in Program  Debug  Connect task
and click Run.

Results: TwidoSuite tries to establish a connection with the controller


and performs synchronization checks between the PC and the PLC
applications.
 The Connection Test Table displays the results of 3 synchronization
checks.
Line 1: Comparison between the PC and the PLC
applications Line 2: Hardware compatibilty check
Line 3: Security check (if the PLC application is valid), otherwise
indicates if the PLC application is invalid.
 The Application Comparison Table is displayed only if both PC
and PLC application are not identical.
2. If the PC and PLC applications are different, select Transfer PC =>
Controller.

3. If the controller application is password protected, you are


prompted for a password. Enter the password and select OK to
continue the transfer.
4. If the controller is running, a warning box is displayed stating that to
continue the transfer, the controller must be stopped.
If the controller is stopped, the transfer begins. If the controller is
running, select OK to stop the controller and continue the transfer.
Select Cancel to close the box and cancel the transfer.
A warning dialog box is displayed indicating that the contents of the
controller application will be overwritten.
5. Select OK to continue the transfer.
An option can be set to protect the application (see Security Features in the
TwidoSuite Operation Guide - Online Help.)
NOTE: Symbols and program comments are not transferred to the
controller.

Run the
Program
Use the PLC Soft Control Panel to Run/Stop/Initialize a program that
has been downloaded to the PLC (see Transfer the Program, page 54.)
To run the program that you have just tranferred to the PLC, follow this
procedure:
1. If the connection between TwidoSuite and the PLC is not active,
select a connection from the connections table in Program 
Debug  Connect task and click OK to establish a connection.
2. When a successful connection is established between
TwidoSuite and the controller, the PLC Soft Control Panel
dialog box appears in the form of a dashboard, always on top of
your TwidoSuite workspace.
It features the following command buttons:
 RUN
 STOP
 INTIALIZE
3. Click RUN to execute the TwidoSuite application program currently
in controller’s RAM.
Note: Each command requires confirmation before execution.
Result: 3 soft panel LEDs (RUN, Error, Stat) provide live diagnostics.
(See
TwidoSuite Operation Guide -Online Help for details.)

Using the Control Panel Dashboard


The Control Panel Dashboard is used in the same way as the Dashboard
used for the Simulator, refer to Twido Simulator Dashboard (see page
48).
Step 8: Debug the Program

Overvie
w
TwidoSuite provides many options to help you debug and adjust your
program:
 Cross-Reference browser
 Animation tables
 Forcing I/Os
 Program animation

Cross-Referencing your Program


Introduction
Cross referencing makes it easier to locate several occurences of the same
program element throught the application, for debugging purposes.
It consists of selecting items in a program such as an address that you
want to track in an application. Once the items are selected, then a list is
generated displaying where the items are used in the application. Cross
referencing provides a useful list of the operands, symbols, lines and
operators used in all or part of an application.
Cross-Reference Browser

Select Program  Program on the TwidoSuite Steps bar .

Click Cross-Ref browser on the functions bar to display the cross-

reference browser. The cross-reference browser displays to the right of the


program window.
How to Cross-Reference your Application
This is a simple four-step procedure:
1. Click the specific program item you want to cross-reference.
Result: The cross-reference table is updated.
2. If you want to change the configuration settings of the cross-
referenced object, click the Configure shortcut in the Cross-
Reference browser.
Result: This brings up the hardware or software object configuration
screen with the cursor pointing on the cross-referenced object.
3. Configure the desired object in the hardware or software object
configuration table.
4. Click the button to return to the Cross-Reference browser.

Using Animation Tables


Use an animation table to view and adjust program variables online,
when the PLC is either in Run or Stop mode.
With an animation table, you can
 as the program is running, monitor the actual value of any
variable in the controller and compare against expected value,
 change the value of variables independent of calculated values, until
they are updated again,
 backup the current values of all variables in an animation table,
 restore to the controller the retained values of all variables in an
animation table,
 force inputs and outputs.
Elements of an Animation Table

For more details, please refer to Debugging Online via the Program
Animation in
TwidoSuite Operation Guide - Online Help.
Forcing
I/Os
Forcing I/Os means that you forcibly set the values of one or more
input or output bits to either 0 or 1.
NOTE: You can force I/Os when TwidoSuite is in online mode, with
the controller either in Run or Stop mode.
How to Force I/Os in an Animation Table
The animation table tool bar provides Force Commands:
 Force to 1
 Force to 0
 Clear Force
 Clear All Force
To force a value to 0 or 1, or clear a forced value:
1. Highlight a variable in the animation table.
2. Click the desired Force to 0, Force to 1 or Clear Force
command on the animation table tool bar.
Result: In the column labeled Current in the animation table, the
forced variable displays with a "F" prefix paired with the forced state
"0" or "1": "F 0" or "F 1".

Animating a Program
You can animate both Ladder and List programs when online. This
section describes how to animate a Ladder language program. For more
details, please refer to Animating a Program in TwidoSuite Operation
Guide - Online Help.
How to Animate a Ladder Program
1. Select the Program  Debug  Animate program task to open the
program editor in animated mode.
Result: The program editor displays animated ladder elements.
2. Watch the animated ladder elements during program execution.
How Ladder Animation Works
 You can watch the backlight of logical objects such as contacts, coils
and special objects turn on as their logical value becomes 1.
 You can keep track of data variables of fonction blocks, comparison
blocks and operation blocks, including current and preset values.
NOTE: Binary operands are displayed as 0 or 1, while all other values
are displayed in hexadecimal or decimal, depending on the format
selected in Preferences
(see page 22).
Display/hide the Animation tables
Click the icon in the functions bar to display/hide the Animation tables
in the lower part of the window.
Copying Rung Objects to an Animation Table

To copy rung objects to the selected animation table, press


(leftmost button on the animation table's tool bar) as shown in the figure
below.
Step 9: Manage the Program Report

Introductio
n
With TwidoSuite report, you create custom printouts and html exports
(to .htm file) by selecting report items from the report manager
browser.

Report
Manager
Use the report manager to select report components, configure printing
options, and export the application report to HTML format.

To access the Report Manager window, select the Report icon


on the TwidoSuite Steps bar.

How to Configure the Report


The report manager provides a tree-like structure view of the report items
and subitems that can be included in the report by checking the appropirate
boxes.

To configure the report, select an item from the report browser and set
the options that appear in the configuration window. For details on
report options, please refer to the TwidoSuite Operation Guide - Online
Help.
Page
Setup
Select the Report  Page Setup task to set the information you want
to display in page headers and footers, and the page margins as well.
You can configure your report pages to show up to nine different types
of information in three seperate fields per header and footer line,
including:
You can configure in your report page to show up to three different
type of information in three seperate fields per header and footer,
including:
 Print date
 Creation date
 Modification date
 Project name
 Any text (Free)
 No text (None)
 Page number/Total number of pages (Page i/n)
 Page number (Page i)
 TwidoSuite version
 File name

Print the
Report
Select the Report  Print task to prepare the report for sending to
the printer and/or to an HTML export file.
The print window allows you to:
 preview the report with several page format and zooming options,
 choose the destination printer and access the printer properties,
 repaginate your report according to selected printing options
 send your report for printing on the selected print device,
 export your report to a HTML file.
Monitoring an Application

Monitoring an Application

How to Start the Monitoring Utility


To start the TwidoSuite Monitoring Utility:
1. Open the Application Launcher by clicking the icon located on your PC
desktop.

Result: The Application Launcher dialog box appears as shown below.

2. From TwidoSuite Application Launcher, click Monitoring Mode


Monitoring Select Check PLC:

Monitoring
Features
you to perform the following tasks:
T 1. See memory information
h 2. Set RTC time
e 3. Configure RTC correction factor
4. See Ethernet statistics
M 5. Modify modem configuration
o For details on how to use the various monitoring
n features, please refer to Hardware Monitoring
i chapter in TwidoSuite Operation Guide - Online
t help.
o
r
i
n
g

U
t
i
l
i
t
y

a
l
l
o
w
s Lecture 9
plication Launcher constitutes the launch center for the TwidoSuite software
suite.
How to Start the
The TwidoSuite application comes in several language pairs available from the
Programou can either
Schneider Electric download site:
start the program via the
 English-French
TwidoSuite Application
Launcher:  English-German
 fro  English-Spanish
m  English-Italian
 English-Chinese(simplified)
Depending on which language pair you installed, it lets you run TwidoSuite in
English (default language) or the other installation language.
the Use the Application Launcher to start TwidoSuite in:
Sta
 Programming Mode
rt
 Monitoring Mode

 PLC Firmware Update
Pro
gra
ms

Sch
nei
der
Ele
ctri
c
Ap
pli
ca

Application Launcher
Options
T
h
e
A
p

 see What’s new? ,

 view the Video Demo .


NOTE: By default the Video Demo is shown at TwidoSuite startup.To disable this feature uncheck the box "Show
video at startup" at the bottom of the video screen.

TwidoSuite Application Launcher


The following figure shows an example of the TwidoSuite Application Launcher for the English-French installed
language pair:
Upgrading the Twido Firmware

Twido PLC Firmware Update


Overview

NOTE: The Schneider Electric Twido PLC is delivered with firmware installed. The procedures described for
loading new firmware are only required if an update is being made. Before replacing the firmware, you should
carefully study the corresponding instructions and contact the Schneider Electric support center.
When the TwidoSuite software is connected to the PLC, the firmware version that you are currently using for your
Twido PLC can be found via the Miscellaneous button:

The Twido Windows Executive Loader Wizard is a Windows-based program that guides you through the steps
needed to update the Firmware Executive in your Schneider Electric Twido programmable controller. The
Firmware Executive is the operating system that runs your applications and manages controller operation.
The wizard provides an intuitive, point-and-click user interface that guides you through the steps of the update
procedure. It provides directions to quickly download the latest version of the executive for your controller.
See the Executive Loader Wizard User Guide for detailed instructions. This guide can be accessed using the
Exec Loader utility online help.

Opening the Exec Loader Wizard


You can open the Executive Loader Wizard from the TwidoSuite Application Launcher by selecting the PLC Firmware
Update option (see Application Launcher Options ).
Firmware Upgrade

New Firmware (Basic Steps)


There are four steps required to upgrade your executive. The wizard provides a window for each step and online
help is available for each step. The following table summarizes each step:

Step Window Function


1 Welcome Introduces the Executive Loader Wizard.
2 Parameters Selects the correct executive file to transfer to your
controller, and selects the PC serial port to communicate
with the controller.
3 File and Device Compares the hardware IDs and the executive version
Properties information for the executive file and the controller.
4 Transfer Progress Monitors the transfer of the executive file to the controller.

NOTE: Loading the firmware may not be interrupted under any circumstances as it means the module can no
longer be accessed, including via the Executive Loader Wizard. Ensure that neither the communication connection
nor the main power input is disconnected or deactivated in any way and do not deactivate the procedure with
Abort.

35011385 05/2009
1
The TwidoSuite Interface

4
Overview

This section describes the TwidoSuite:


 main window workspace
 preferences settings
This section also provides a work flow for creating a TwidoSuite project (see
Application Steps/Substeps Bar, page 20).

What's in this Chapter?


This chapter contains the following topics:

Topic Page
Main Window 18
Setting Preferences 22
Main Window

TwidoSuite Workspace

Application steps bar: Displays TwidoSuite’s 4 Application Steps (icons and


titles),Project Name, Preference, Miscellaneous and Help
Pages buttons.
Program substeps bar: Displays the 3 Program substeps (Configure, Program,
Debug). It is showing only when the Program step is
selected.
Taskbar: Provides access to all the tasks that you can perform
under the selected application step or substep.
Functions bar: Provides access to special functions associated to the
selected task. 1
Quick access bar: Displays at all times Previous/Next commands, Save and
Analyze Program shortcuts.
Editors and Viewers: Editors and viewers are TwidoSuite windows that organize
programming and configuration controls for efficient
development of applications.
Error list box bar: Displays information about the application, the controller,
and TwidoSuite.

Display Options

Maximizes the main window

Minimizes the main window

Closes the TwidoSuite application


Docking button for the Application Steps bar

Resizes the main window

You might also like