TB_Home2

Darstellung in FBD

General Information

With this module, the connected Motion Control axis is referenced with reference mode "Referencing to the encoder zero pulse/angle".With this module, the connected Motion Control axis is referenced with reference mode "Referencing to device-side limit switch of travel distance".

The parameters specified in user units are converted to the units required for Motion Control, and the MC_HomeInit_ZeroPulse module is executed. The referencing method "Referencing to encoder zero pulse/angle" is set at the drive here. Referencing and the subsequent positioning to the specified home position then occur.

If the axis was already referenced, immediate positioning to the home position can be carried out (when x_RefFull = FALSE) instead of the full referencing.

Motion Control commands used: MC_HomeInit_ZeroPulse, MC_Home, MC_MoveRelative.

Details of the reference mode are contained in the application manual "Motion Control according to PLCopen".

Note:
The TB_Init module must be executed before this module is used.

Recommended Task: Cyclic
Libraries used: MOTION_CONTROL_xxbd00 or higher
ARITHMETIC_xxbd00 or higher
TECH_TYPES_xxbd05 or higher

InOut Parameter

Marking: Data type: Description:
di_Pos DINT Actual mechanical position of the axis in user units.
_StdPar StdParType Internal default parameters of the axis.
_Axis AXIS_REF Motion Control axis.

Input Parameter

Marking: Data type: Description:
x_Enable BOOL TRUE: Enabling of the module.
i_Direction INT Search direction of the limit switch. FALSE = negative direction, TRUE = positive direction.
ud_Velocity UDINT Velocity for positioning to home position in user units/s. Note: The zero pulse search always occurs at the reference velocity configured in the drive.
ud_Velocity UDINT Velocity for positioning to home position in user units/s. Note: The zero pulse search always occurs at the reference velocity configured in the drive.
ud_Acceleration UDINT Acceleration for positioning to home position in user units/s2. Note: The zero pulse search always occurs at the reference acceleration configured in the drive.
ud_Deceleration UDINT Deceleration for positioning to home position in user units/s2. Note: The zero pulse search always occurs at the reference deceleration configured in the drive.
ui_TimeOut UINT Time monitoring of referencing in ms.
di_RefPos DINT Reference position of the axis in user units. This is the mechanical position at the zero pulse of the encoder. Once referencing is carried out, this position is set as the reference position.
di_HomePos DINT Mechanical home position (home setting) of the axis in user units. Once referencing is carried out, the axis is located at this mechanical position.
x_RefFull BOOL TRUE: The entire referencing procedure (zero pulse search and subsequent positioning to di_HomePos) is always carried out.
FALSE: If the axis is already referenced, only positioning to di_HomePos occurs.

Output Parameter

Marking: Data type: Description:
x_Active BOOL TRUE: Module is enabled (x_Enable = TRUE) and active.
x_Running BOOL TRUE: Homing in progress.
x_HomeDone BOOL TRUE: Referencing completed successfully.
x_HomeOK BOOL TRUE: Drive is referenced.
x_Error BOOL TRUE: The module has identified an error. See table i_Result.
i_Result INT Message number of the module. See table below.
i_Results Description:
>0 Reported error of the Motion Control modules used. See Motion Control error list.
0 No errors active.
-100 Default parameters invalid. General parameters must be set with the TB_Init module before the module is used.
-101 Position outside the period. A home position was specified, which was outside the period specified at the TB_Init module.
-102 Search direction invalid. Search direction may only be zero or one.
-111 Reference velocity is zero!
-112 Reference acceleration is zero!
-113 Reference deceleration is zero!
-999 No technology license. Use PLC with technology license.