MLFB_HomeFindHomeInput

Pipe Network motion icon

 Function Block - Homing to a home switch.

Inputs

Input

Data Type

Range

Unit

Default

Description

ibExecute

BOOL

FALSE, TRUE

N/A

No default

Start homing, edge-triggered.

iAxisID

DINT

 

 

 

 

 

 

ID of the axis block of the Pipe Network.

iPosition

LREAL

 

 

 

 

 

 

Reference position.

ibDirection

BOOL

0 to 1

 

 

N/A

No default

Defines the axis homing direction.

  • 0 (zero) = Positive.
  • 1 = Negative.

iVelocity

LREAL

 

 

 

 

 

 

Reference speed.

iAcceleration

LREAL

 

 

 

 

 

 

Reference acceleration.

iDeceleration

LREAL

 

 

 

 

 

 

Reference deceleration.

ibHomeInput

BOOL

 

 

N/A

No default

Home input, high-active.

ibPosLimitSwitch

BOOL

 

 

N/A

No default

Positive limit switch, high-active.

ibNegLimitSwitch

BOOL

 

 

N/A

No default

Negative limit switch, high-active.

iTimeout

TIME

 

 

 

 

 

 

Time monitoring (T#0ms: off).

Outputs

Output

Data Type

Range

Unit

Description

obDone

BOOL

FALSE, TRUE

N/A

Done bit.

obActive

BOOL

FALSE, TRUE

N/A

Active bit.

obError

BOOL

FALSE, TRUE

N/A

Error bit.

oErrorID

DINT

 

 

N/A

Error identifier:

ErrorID

Description

1

Axis in error.

2

Axis is not enabled.

3

Timeout exceeded or expired.

4

SDO read / write error.

5

Input parameter out of range.

Remarks

  • 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 hardware limit switches are monitored during the homing procedure.
  • The drive behaves this way in case 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 0 (zero) velocity and reverses direction again after crossing the home-switch.
    • The home-switch is now activated according to the direction setting and the home-position has been found.
  • The command position of the drive is immediately set to the position value and the motor ramps down to 0 (zero) velocity.

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

//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;

See Also