9300 servo plc – Lenze DDS Target 9300 Servo PLC V8.x User Manual
Page 73

9300 Servo PLC
System blocks
2.12
MCTRL_MotorControl (node number 131)
2−67
L
9300 Servo PLC EN 5.1
Function sequence
1. The TP is activated via a signal change at a digital input (X5/E1 ... E4) or via a zero pulse at the
incremental encoder input X8 or the resolver input X7.
2. If a TP has occurred, 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. Then 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.
·
For more detailed information about the use of the digital inputs X5/E1 ... E3 for touch probe,
please refer to the "Function library LenzeTpDrv.lib" Manual.
MCTRL_nNAct_v
·
The value MCTRL_nNAct_v is scaled in increments per millisecond.
(INT) 16384 corresponds to 15000 rpm. See chapter 1.2.7, "Signal types and scalings".
(
·
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 a safe 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 saved 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 derived from this value, then it must be multiplied by
SYSTEM_nTaskInterval / 4 to get the result in increments per
10 ms, as in the example.
Example: In a 1−ms task SYSTEM_nTaskInterval has the value 4 (4 x 0.250 s = 1 ms)
·
In the Lenze FBs this process is already implemented.