Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Jack H.Integration and automation of manufacturing systems.2001.pdf
Скачиваний:
80
Добавлен:
23.08.2013
Размер:
3.84 Mб
Скачать

page 191

 

 

 

FRD

 

 

 

 

Source A D9:0

 

 

 

 

 

 

 

Dest. N7:0

 

 

 

 

 

 

 

 

 

 

 

 

 

TOD

 

 

 

 

Source A N7:1

 

 

 

 

 

 

 

Dest. D9:1

 

 

 

 

 

 

 

 

 

 

 

 

 

DEG

 

 

 

 

Source A F8:0

 

 

 

 

 

 

 

Dest. F8:2

 

 

 

 

 

 

 

 

 

 

 

 

 

RAD

 

 

 

 

Source A F8:1

 

 

 

 

 

 

 

Dest. F8:3

 

 

 

 

 

 

Addr.

before

after

N7:0

0000000000000000

 

0000011100000001

N7:1

0000001000100100

 

0000001000100100

F8:0

3.141

 

3.141

 

F8:1

45

 

45

 

F8:2

0

 

180

 

F8:3

0

 

0.785

 

D9:0

0000 0000 0000 0000

0000 0101 0100 1000

D9:1

0001 0111 1001 0011

0001 0111 1001 0011

7.15 LOGICAL FUNCTIONS

7.15.1 Comparison of Values

page 192

These functions act like input contacts. The equivalent to these functions are if-then statements in traditional programming languages.

Basic comparison functions in a PLC-5 include,

CMP(expression) - compares two values for equality

EQU(value,value) - equal

NEQ(value,value) - not equal

LES(value,value) - less than

LEQ(value,value) - less than or equal

GRT(value,value) - greater than

GEQ(value,value) - greater than or equal

• The comparison function below compares values at locations A and B. If they are not equal,

the output is true. The use of the other comparison functions is identical.

 

 

 

 

 

O:012

 

 

NEQ

 

 

 

 

 

 

 

 

 

 

A N7:03

 

 

 

 

 

 

 

 

 

 

 

 

B N7:02

 

 

04

 

 

 

 

 

O:012

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMP

 

 

 

 

 

 

OR

 

expression

 

 

 

 

 

 

 

 

 

N7:03 <> N7:02

 

04

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• More advanced comparison functions in a PLC-5 include,

MEQ(value,mask,threshold) - compare for equality using a mask LIM(low limit,value,high limit) - check for a value between limits

• Examples of these functions are shown below.