System modules – Lenze ECSCAxxx User Manual
Page 365

System modules
MCTRL_MotorControl (node number 131)
Touch probe (TP)
l
365
EDBCSXA064 EN 3.2
Function sequence
1. The TP is activated in an edge−controlled manner via the digital input X6/DI2 or via a
zero pulse from the master frequency input X8 or the resolver input X7.
2. If a TP has been effected, MCTRL_bActTPReceived_b is set = TRUE.
3. After the start of the task, MCTRL_dnActIncLastScan_p indicates the number of
increments [inc/ms] counted since the TP.
4. Following, MCTRL_bActTPReceived_b is set = FALSE.
)
Note!
It is necessary that all three outputs (MCTRL_nNAct_v,
MCTRL_bActTPReceived_b and MCTRL_dnActIncLastScan_p) are processed in
the task, even if just one signal is required.
MCTRL_nNAct_v (actual speed value)
ƒ
The polarity of the digital input X6/DI2 configured under C0114/2 has no influence
on the edge evaluation.
ƒ
The value MCTRL_nNAct_v is scaled to increments per millisecond [inc/ms].
– (INT) 16384 corresponds to 15000 rpm. See chapter "Signal types and scaling"
(
¶ 27).
ƒ
For every task in which MCTRL_nNAct_v is used, the operating system creates an
individual integrator that is reset after every start of the task (task−internal process
image).
ƒ
For reliable TP generation, MCTRL_nNAct_v must not be used in the PLC_PRG.
Example: MCTRL_nNAct_v in a 10 ms task:
ƒ
When the 10 ms task starts, the value of the integrator is stored in a local area of the
task and the integrator is reset. The value in the local area gives an average value in
increments per 1 ms.
ƒ
If a position value is to be calculated from the average value, the average value has
to be multiplied by (SYSTEM_nTaskInterval / 4) in order to obtain increments per
10 ms.
– At a 10 ms task, the value of SYSTEM_nTaskInterval is ’40’ (40 × 0.25 ms = 10 ms).
– See also chapter "SYSTEM_FLAGS (system flags)" (
¶ 373).
ƒ
The Lenze function blocks already implement this procedure.