10 homing mode operation example, Programming – Lenze PM94P01C User Manual
Page 84

PM94P01C
82
Programming
2.15.10
Homing Mode Operation example
The following steps are needed to execute the homing operation from the user program or under interface control.
1. Set Fast homing speed:
Variable #242
2. Set Slow homing speed:
Variable #243
3. Set Homing accel/decel:
Variable #239
4. Set home offset:
a. In User Units
Variable #240
b. In encoder pulses
Variable #241
5. Set Home Switch Input
Variable #246
6. Select Home Method
Variable #244
‘HOME’ is the logical command to set VAR_START_HOMING. Writing the word ‘HOME’ within the user program will
result in the homing operation commencing. After initiating the HOME command with firmware 3.60 (and later) the user
program will not execute subsequent lines of code until after homing is completed (similar to MOVE P). If either using
firmware prior to 3.60 or if user initiates homing in the indexer program via the statement VAR_START_HOMING=1,
then it is recommended to immediately follow that statement with the following code:
WAIT UNTIL VAR_EXSTATUS & 0x400000 == 0x400000.
Doing this ensures no further lines of code will be executed until homing is complete.
;Program start-------------------------------------------------------------------
;
;
UNITS=1
;rps
Accel=1000
Decel=1000
MaxV =20
;some program statements…
;
;
;Homing specific set up..
VAR_HOME_FAST_VEL=
10
;rps
VAR_HOME_SLOW_VEL=
1
;rps
VAR_HOME_ACCEL=
100
;rps/sec^2
VAR_HOME_OFFSET=
0
;no offset from sensor
VAR_HOME_SWITCH_INPUT=
4
;
input B1 (0-A1, 1-A2…3-A4,4-B1,…11-C4)
VAR_HOME_METHOD=
4
;see table 22
ENABLE
HOME
;starts homing sequence
WAIT UNTIL VAR_EXSTATUS & 0x400000 == 0x400000 ;wait for homing complete
;Drive homed
;Program statements…
END