8 comparison (l_cmp), Comparison (l_cmp), Function library lenzedrive.lib – Lenze DDS Function library Drive User Manual

Page 23: Analog signal processing

Advertising
background image

Function library LenzeDrive.lib

Analog signal processing

2.2.8

Comparison (L_CMP)

2−13

L

LenzeDrive.lib EN 1.7

2.2.8

Comparison (L_CMP)

This FB compares two integer values with each other. You can use comparators to implement
threshold switches.

L _ C M P

n I n 1 _ a

b O u t _ b

b y F u n c t i o n

n H y s t e r e s i s

n W i n d o w

n I n 2 _ a

Fig. 2−11

Comparison (L_CMP)

VariableName

DataType

SignalType

VariableType

Note

nIn1_a

Integer

analog

VAR_INPUT

nIn2_a

Integer

analog

VAR_INPUT

bOut_b

Bool

binary

VAR_OUTPUT

byFunction

Byte

VAR CONSTANT RETAIN

Comparison function for the inputs

nHysteresis

Integer

VAR CONSTANT RETAIN

Hysteresis function

nWindow

Integer

VAR CONSTANT RETAIN

Window function

Parameter codes of the instances

VariableName

L_CMP1

L_CMP2

L_CMP3

SettingRange

Lenze

byFunction

C0680

C0685

C0690

1 ... 6

6

nHysteresis

C0681

C0686

C0691

0.00 ... 100.00 %

1.00

nWindow

C0682

C0687

C0692

0.00 ... 100.00 %

1.00

Function

Selection of the function

Comparison function

byFunction = 1

nIn1_a = nIn2_a

byFunction = 2

nIn1_a > nIn2_a

byFunction = 3

nIn1_a < nIn2_a

byFunction = 4

½nIn1_a ½ = ½nIn2_a ½

byFunction = 5

½nIn1_a ½ > ½nIn2_a ½

byFunction = 6

½nIn1_a ½ < ½nIn2_a ½

Advertising