Introduction to Industrial Automation


   Programming Mathematical Operations



Download 43,9 Mb.
Pdf ko'rish
bet331/440
Sana01.01.2022
Hajmi43,9 Mb.
#294756
1   ...   327   328   329   330   331   332   333   334   ...   440
Bog'liq
Introduction to Industrial Automation by Stamatios Manesis, George

7.5.5   Programming Mathematical Operations

Programming a mathematical operation in an automation application does not present any diffi-

culty. Regardless of the type of mathematical operation, it is only required to “load” the two num-

bers (among them the operation will be applied) in two corresponding registers, and then invoke 

the corresponding instruction to execute the mathematical operation. In most cases, the instruction 

of the arithmetic operation is accompanied by the declaration of the type of numbers such as real, 

integer, etc. The only point that someone needs to be aware of is the issue of the sequence in which 

registers are loaded. The mathematical operation is made with the first number from the content of 

the register 2 (i.e., the first one loaded first) and the second number from the content of the register 1 

(i.e., the second one loaded last). When the mathematical operation refers to a single number (e.g., 

ABS), then it will obviously be performed on the content of the register 1. Figure 7.60 is illustrative 

of how the subtraction of two integers is performed. The result of the mathematical operation is 

always present in register 1, so that by using the T instruction (remember that the transfer instruc-

tion always acts on register 1) the result can be transferred to another location in the memory of the 

PLC. In the subtraction example, the result is transferred to the MW 100, while the other three 

basic numerical operations are dealt in the same way. Examples of automation programs with a need 

for mathematical operations are described in Section 7.5.6. Finally, it should be noted that currently 

M

1



M

2

M



3

S

W



1

W

2



M

4

W



3


Download 43,9 Mb.

Do'stlaringiz bilan baham:
1   ...   327   328   329   330   331   332   333   334   ...   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