MLFB_HomeFindHomeInput
Description
The motor starts to move according to the direction setting. The home position has been found as soon as the home-switch becomes active during a motion in direction of the direction setting. The command position of the drive will immediately be set to the position value and the motor ramps down to velocity 0. The hardware limit switches are monitored during the homing procedure. The drive behaves as follows in case that a hardware limit switch is active before the home-switch has been activated: The motor changes the direction until the home switch is crossed. The motor ramps down to zero velocity and reverses direction again after crossing the home-switch. The home-switch will now be activated according to the direction setting and the home-position has been found. The command position of the drive will immediately be set to the position value and the motor ramps down to zero velocity.
Arguments
Input
ibExecute |
Description |
Start homing, edge-triggered |
Data type |
BOOL |
|
iAxisID |
Description |
ID of Axis block of Pipe Network |
Data type |
DINT |
|
iPosition |
Description |
Reference position |
Data type |
LREAL |
|
ibDirection |
Description |
0=positive, 1=negative |
Data type |
BOOL |
|
iVelocity |
Description |
Reference speed |
Data type |
LREAL |
|
iAcceleration |
Description |
Reference acceleration |
Data type |
LREAL |
|
iDeceleration |
Description |
Reference deceleration |
Data type |
LREAL |
|
ibHomeInput |
Description |
Home input, high-active |
Data type |
BOOL |
|
ibPosLimitSwitch |
Description |
Positive limit switch, high-active |
Data type |
BOOL |
|
ibNegLimitSwitch |
Description |
Negative limit switch, high-active |
Data type |
BOOL |
|
iTimeout |
Description |
Time monitoring (T#0ms: off) |
Data type |
TIME |
Output
obDone |
Description |
Done bit |
||||||||||||
Data type |
BOOL |
|||||||||||||
obActive |
Description |
Active bit |
||||||||||||
Data type |
BOOL |
|||||||||||||
obError |
Description |
Error bit |
||||||||||||
Data type |
BOOL |
|||||||||||||
oErrorID |
Description |
Error identifier, see list here
|
||||||||||||
Data type |
DINT |
Example
ST
//Call homing function on Axis1 with preset velocity, accel, and decel values
//Start in negative direction, change if limit switch seen before home switch
//after seeing home switch, set axis position to zero
Inst_MLFB_HomeFindHomeInput( StartHomeRoutine,
PipeNetwork.AXIS1,
0,
TRUE,
100,
1000,
1000,
HomeDigitalInput,
PositiveLimitSwitch,
NegativeLimitSwitch,
T#30s ); HomeDone := Inst_MLFB_HomeFindHomeInput.obDone;
Function Block Diagram
FFLD