Function BlockMLFB_HomeMoveUntilPosErrExceededThenZeroAnglePipe Network motion icon

Description

UDFB HomeMoveUntilPosErrExceededThenZeroAngle

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.

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

iMaxPositionError

Description

Maximum position error

 

Data type

LREAL

iPeakCurrent

Description

Peak current in mA

 

Data type

DINT

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

ErrorID Description
1 Axis in error
2 Axis not enabled
3 Timeout expired
4 SDO read/write error
5 Input parameter out of range
 

Data type

DINT

Example

ST

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

Function Block Diagram

FFLD

Go back to the top of the page [Top]