Introduction to Industrial Automation


  ◾   Introduction to Industrial Automation Ta



Download 43,9 Mb.
Pdf ko'rish
bet290/440
Sana01.01.2022
Hajmi43,9 Mb.
#294756
1   ...   286   287   288   289   290   291   292   293   ...   440
Bog'liq
Introduction to Industrial Automation by Stamatios Manesis, George

282

 



  Introduction to Industrial Automation



Ta

bl

e 7

.1

 

Pro

gr

am

m

in

g I

ns

tr

uc

ti

on

s i

n T

hr

ee B

as

ic L

an

gu

ag

es

Languag

e

Oper

and

Inst

ruc

tion Oper

at

ion

Boole

FBD

LAD

A

A



I, Q

, M, T


, C

Look f


or 1 

and


 per

form AND with previous RL

O

Boolean L



ogic 

Instructions

AN

A

I, Q



, M, T

, C


Look f

or 0 


and

 per


form AND with previous RL

O

O



O

I, Q


, M, T

, C


Look f

or 1 


and

 per


form OR with previous RL

O

ON



O

I, Q


, M, T

, C


Look f

or 0 


and

 per


form OR with previous RL

O

A(



AND logic of a comple

x (brack


eted) e

xpression

O(

OR logic of a comple



x (brack

eted) e


xpression

)

Termination of brack



eted e

xpression

=

Q,

 M



Assign v

alue 1 to the operand if RL

O = 1

Assign v


alue 0 to the operand if RL

O = 0


Activ

ation 


Instructions

S

S



S

Q

, M, C



Set, i.e., assign v

alue 1 to the operand, if RL

O = 1

Do nothing if RL



O = 0 

 

(Latch/Unlatch)



1

SX

T



T

T

Activ



ate timer T

 of kind X at positiv

e g

oing edg


e of RL

O

.



R

R

R



Q

, M, T


, C

Reset, i.e., assign v

alue 0 to the operand, if RL

O = 1


Do nothing if RL

O = 0


L

IB, IW


, QB, QW

MB, MW



Constant


Load the content of the operand or the v

alue of 


constant 

in 


the 

accumulator

, independentl

of 



RL

            



            

            

       

(Get/Put)

1

Complemental 



Instructions

(

C



ont

inued

)



Basic Programming Principles of PLCs 



 



283

Ta

bl

e 7

.1 (

C

on

ti

nu

ed



Pro

gr

am

m

in

g i

ns

tr

uc

ti

on

s i

n t

hr

ee b

as

ic la

ng

ua

ge

s

Languag

e

Oper

and

Inst

ruc

tion Oper

at

ion

Boole

FBD

LAD

T

IB, IW



, QB, QW

MB, MW



Transf

er the content of the accumulator to the operand 

independentl

y of RL


O

Complemental 

instructions

CU

C



xx

CU

C



xx

CU

C



Increase the content of the counter C

xx

 b



y 1 on positiv

going edg



e of RL

O

CD



C

xx

CD



C

xx

CD



C

Decrease the content of the counter C

xx

 b

y 1 on 



positiv

e g


oing edg

e of RL


O

≥, ≤, ≠


CMP ≥1

IN

1



IN

2

CMP ≥1



IN

1

IN



2

Accumulator

Per

form comparison betw



een the contents of tw

accumulators



JU

Label


JM

P

(JMP)



Label

Label


Jump to another program instruction (instead of the 

ne

xt instruction) unconditionall



y

JC

Label



JM

P

(JMP)



Label

Label


Jump to another program instruction (instead of the 

ne

xt instruction) if RL



O = 1

CALL


DB

YY

FB



XX

DB

YY



FB

XX

FB, FC



Call a F

unction Block or a F

unction

Notes:


(1) Alternativ

e terms instead of Set/Reset and L

oad/T

ransf


er respectiv

el

y



IB

 

=



 

Input By


te

 

CU



 

=

 



Counter Up

 

FB



 

=

 



Function Block

IW

 



=

 

Input W



ord

 

CD



 

=

 



Counter Down

 

FC



 

=

 



Function

QB

 



=

 

Output By



te

 

JMP



 

=

 



Jump

 

DB



 

=

 



Data Block (Data F

ile)


QW

 =

 



Output W

ord


 

JU

 



=

 

Jump Uncondionall



RL

O



 =

 

Result of L



ogic Operation

MB

 



=

 

Memor



y Bit By

te

 



JC

 

=



 

Junp Conditionall

y

MW

 =



 

Memor


y Bit W

ord


 

CMP


 

=

 



Compare


284

 



  Introduction to Industrial Automation

language. In the column of variables, the following notations are depicted with the corresponding 

explanations:

= Input


Q  = Output

*



=  Auxiliary memory bit (logic coil)

T  = Timer

C  = Counter

FB  =  POU function block

FC  =  POU function

IB 


=  Input byte

IW  =  Input word

QB  =  Output byte



QW  =  Output word

MB  =  Auxiliary memory byte



MW  =  Auxiliary memory word

Label  =  Alphanumeric label



Each PLC contains at least two accumulators with widths of two digital words each, starting 

from the least significant byte on the right to the most significant byte on the left, as shown in Figure 

7.8. The two words and the four bytes are marked with the initials L or H, representing “low” or 

“high” significance. The contents of the register 1 are modified by using the load instruction (abbre-

viation L). In the register, a byte, a word, or a double word can be loaded after the initial shift of 

the old content of register 1 to register 2, and the reset of register 1. Obviously, loading a numeric 

constant to the register creates an equivalent digital content of the constant in binary form, unless 

otherwise specified by the loading instruction (e.g., BCD code). The transfer instruction (abbrevia-

tion T) always transfers the contents of register 1 to where it is specified with the instruction.

In the column named “instruction operation”, the action performed by the CPU is summa-

rized when executing each instruction respectively. But before proceeding with the actions of the 

various programming instructions, it is necessary first to introduce and explain the term “result of 

instruction operation”.



7.4.1   The Result of an Instruction Execution

The term “result of a logic operation” (RLO) is characterized by the logical result created in the 

CPU after an instruction execution. Every time that an instruction is executed, a new RLO is cre-

ated that depends on the type of instruction and on the previous RLO, while the last one executed 

is erased afterwards. The concept of the RLO will be further explained with the help of the classic 

automation circuit presented in Figure 7.9. The activation of the relay C is dependent on the status 

of the three switching contacts S

1

, S



2

, and S


3

. Initially, it is assumed that the relay is not energized, 

and the status of the circuit branch needs to be examined. In this case, it is assumed further that 

the status of the three switching contacts (their status is not known in advance) when testing the 

*

 

The normal letter for the output notation is “O”, but since OR instruction in Boolean language uses the same 



letter, “Q” has been adopted in order to avoid any confusion.

† 

There are additional variables for double word (DW) with similar notation and handling that are omitted.



‡ 

An alphanumeric word called “label” is written in front of an instruction to define the point of program transi-

tion after a jump instruction execution.



Basic Programming Principles of PLCs 



 



285

circuit is exactly as indicated in Figure 7.9. It is initially examined with a simple voltmeter if there 

is any electrical voltage at the power supply. If voltage exists, the next step is to examine if there is 

voltage just after the contact S

1

. Since S



1

 is a closed contact, the voltmeter will show us the trend. 

Continuing the examination of this circuit branch, the next point to be checked is the one imme-

diately below the S

2

 contact, as shown in Figure 7.9. Since the S



2

 contact is open, the voltmeter will 

not show a voltage, and therefore it explains why the relay C is not energized. However, in the wired 

branch, the presence or absence of an electrical voltage, as well as the flow of the electric current, 

occurs naturally by itself and automatically as a consequence of the existence of a potential differ-

ence. In programmable logic, where the switching contacts are replaced by logical instructions, the 

role of the electrical voltage is carried out by the RLO. In the classic circuit, the relay C is activated 

if there is voltage at point A, i.e., in its ends as depicted in Figure 7.9. In programmable logic, the 

RLO is what determines—as a voltage—the result of the activating instructions. In this case, the 

output C (and hence the C relay connected to it) is activated only when RLO equals 1.

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

HH Byte

HL Byte


LH Byte

LL Byte


H Word

L Word


ZB 20

ZB 20


ZB 21

ZB 20


ZB 21

ZB 22


ZB 23

Accumulator 1

Load ΖΒ 20  

Load ΖW 20   

Load ΖDW 20   

= ΖW 20


= ΖDW 20

Where Ζ = I or Q or Μ, that is a Byte or Word of Inputs or Outputs or Memory Bits

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

ZB 20

ZB 20


ZB 21

ZB 20


ZB 21

ZB 22


ZB 23


Download 43,9 Mb.

Do'stlaringiz bilan baham:
1   ...   286   287   288   289   290   291   292   293   ...   440




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish