4 processing of phase-angle signals, 1 arithmetic (l_aritph), Processing of phase−angle signals – Lenze DDS Function library Drive User Manual

Page 48: Arithmetic (l_aritph), Function library lenzedrive.lib, 4 processing of phase−angle signals

Advertising
background image

2.4.1

Arithmetic (L_ARITPH)

Function library LenzeDrive.lib

Processing of phase−angle signals

2−38

L

LenzeDrive.lib EN 1.7

2.4

Processing of phase−angle signals

2.4.1

Arithmetic (L_ARITPH)

This FB calculates a phase output signal from two phase input signals.

L _ A R I T P H

± 2

3 0

d n O u t _ p

b y F u n c t i o n

d n I n 1 _ p

/

+

-

*

x

y

d n I n 2 _ p

Fig. 2−49

Arithmetic (L_ARITPH)

VariableName

DataType

SignalType

VariableType

Note

dnIn1_p

Double Integer

position

VAR_INPUT

dnIn2_p

Double Integer

position

VAR_INPUT

dnOut_p

Double Integer

position

VAR_OUTPUT

The signal is limited to ±2

30

.

byFunction

Byte

VAR CONSTANT RETAIN

Selection of the function

Parameter codes of the instances

VariableName

L_ARITPH1

SettingRange

Lenze

byFunction

C1010

0 ... 3, 14, 21, 22

1

Function

Selection of the function

Arithmetic function

Limiting of the
result

Note

byFunction = 0

dnOut_p = dnIn1_p

without

dnOut_p is not limited.

byFunction = 1

dnOut_p = dnIn1_p + dnIn2_p

2

30

byFunction = 2

dnOut_p = dnIn1_p − dnIn2_p

2

30

byFunction = 3

dnOut_p = (dnIn1_p

ž dnIn2_p) / 2

30

2

30

(remainder not considered)

byFunction = 14

dnOut_p = dnIn1_p / dnIn2_p

2

30

(remainder not considered)

byFunction = 21

dnOut_p = dnIn1_p + dnIn2_p

without

with overflow

byFunction = 22

dnOut_p = dnIn1_p − dnIn2_p

without

with overflow

·

byFunction = 21/22:
Please note, that an overflow may occur, and then the numerical value of dnOut_p does not
match the result.

·

byFunction = 14:
If the denominator = 0, then dnOut_p =

±2

30

The sign depends on the sign of dnIn1_p.

Advertising