4 difference (l_phdiff), Difference (l_phdiff), Function library lenzedrive.lib – Lenze DDS Function library Drive User Manual
Page 51: Processing of phase−angle signals

Function library LenzeDrive.lib
Processing of phase−angle signals
2.4.4
Difference (L_PHDIFF)
2−41
L
LenzeDrive.lib EN 1.7
2.4.4
Difference (L_PHDIFF)
This FB adds a phase−angle signal to the phase setpoint. A setpoint/actual value comparison is also
possible.
+
-
L _ P H D I F F
d n O u t _ p
d n S e t _ p
d n A d d _ p
b E n _ b
n I n _ v
b R e s e t _ b
I n t e r v a l T i m e
T A S K
Fig. 2−52
Difference (L_PHDIFF)
VariableName
DataType
SignalType
VariableType
Note
dnSet_p
Double−integer
position
VAR_INPUT
Provision of a position setpoint
dnAdd_p
Double−integer
position
VAR_INPUT
Adaptive position value for an actual position
bEn_b
Bool
binary
VAR_INPUT
TRUE = Adaptive position value is added on.
nIn_v
Integer
velocity
VAR_INPUT
Provision of the actual speed for conversion/calculation
of the position value
bReset_b
Bool
binary
VAR_INPUT
TRUE = Actual phase−angle integrator is set to 0.
dnOut_p
Double−integer
position
VAR_OUTPUT
Signal is not limited.
Functional sequence
If bEn_b = TRUE :
1. The speed (rpm) signal at nIn_v is integrated by the phase−angle integrator.
2. The phase−angle signal at dnAdd_p is added to the integrated speed signal in each task cycle.
3. The result of the phase−angle integrator is subtracted from the phase−angle signal at dnSet_p
and then output at dnOut_p.
If bEn_b = FALSE
1. The speed (rpm) signal at nIn_v is integrated by the phase−angle integrator.
2. The result of the phase−angle integrator is subtracted from the phase−angle signal at dnSet_p
and then output at dnOut_p.
Note!
The phase−angle integrator derives a position from a speed.
·
In nIn_v the speed can be defined (16384
º 15000 rpm ).
·
(INT)65536 corresponds to one encoder turn.