MLFB_HomeMoveUntilPosErrExceededThenZeroAngle

Pipe Network motion icon

 Function Block - Homing to the position error is exceeded plus zero angle.

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, 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.

iMaxPositionError

LREAL

 

 

 

 

 

 

Maximum position error.

iPeakCurrent

DINT

 

 

 

 

 

 

Peak current in mA.

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

  • Similar to the Move Until Position Error Exceeded method, the move until position error exceeded then find zero angle.
  • Mode follows the same steps, but upon completion of the move, it continues to move to find the zero angle reference of the motor.

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 and go until position error exceeds input value or time out
//afterterwards moves to zero angle and sets axis position to zero
//function block temporarily writes new max current value to 2 Amp while home routine active
Inst_MLFB_HomeMoveUntilPosErrExceededThenZeroAngle( StartHomeRoutine,
PipeNetwork.AXIS1,
0,
1,
100,
1000,
1000,
MaxPosError,
2000,
T#30s );

HomeDone := Inst_MLFB_HomeMoveUntilPosErrExceededThenZeroAngle.obDone;

See Also