MC_StepBlockLagBased
This function block performs the search for a physical object that mechanically blocks the movement.
To avoid mechanical damage, the movement is usually performed with reduced torque ("TorqueLimit").
The condition for successful completion of the sequence consists of two parts.
First, the lag error must be above the specified "LagLimit" and second, the actual velocity for the time "DetectionVelocityTime" must be below the "DetectionVelocityLimit".
Inputs
VAR_INPUT
Execute : BOOL;
Direction : MC_Home_Direction;
Velocity : LREAL;
Acceleration : LREAL;
Deceleration : LREAL;
Jerk : LREAL;
SetPosition : LREAL;
DetectionVelocityLimit : LREAL;
DetectionVelocityTime : TIME;
TimeLimit : TIME;
DistanceLimit : LREAL;
TorqueLimit : LREAL;
LagLimit : LREAL;
BufferMode : MC_BufferMode;
Options : ST_Home_Options3;
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The command is executed with a rising edge at the Execute input. |
Direction | Enumeration that defines the initial direction of movement for the search procedure. | |
Velocity | LREAL | Maximum travel velocity (>0). |
Acceleration | LREAL | Acceleration (≥0). If the value is 0, the standard acceleration from the axis configuration in the System Manager is used. |
Deceleration | LREAL | Deceleration (≥0). If the value is 0, the standard deceleration from the axis configuration in the System Manager is used. |
Jerk | LREAL | Jerk (≥0). If the value is 0, the standard jerk from the axis configuration in the System Manager is used. |
SetPosition | LREAL | Position value that the axis position is set to. |
DetectionVelocityLimit | LREAL | Limit velocity that must be adhered to (value must be below this) for the time DetectionVelocityTime in order to detect driving against the fixed stop. |
DetectionVelocityTime | TIME | Time for detecting the velocity undershoot when driving against the fixed stop. |
TimeLimit | TIME | Exceeding this time leads to the search procedure being aborted. |
DistanceLimit | LREAL | Exceeding this distance in relation to the start position leads to the search procedure being aborted. |
TorqueLimit | LREAL | The motor torque is limited to this value, in relation to the weight counterbalance that is potentially parameterized in the drive, in order to avoid mechanical damage. |
LagLimit | LREAL | Position lag value which, if exceeded, leads to detection of driving against the fixed stop. |
BufferMode | MC_BufferMode | Currently not implemented. |
Options | DisableDriveAccess: Set to FALSE for Beckhoff drives, usually to TRUE for third-party drives (see info). InstantLagReduction: When referencing to a mechanical fixed stop, the sudden stop produces a lag error in the NC axis, which is dissipated with the parameterized dynamic values in the further course. This can lead to an assumed delay when observing the sequence, but it is useful with "soft" fixed stops in particular. The lag error is dissipated abruptly by setting this flag. |
![]() | If DisableDriveAccess = TRUE, the user is responsible for modifying and reconstructing required drive parameters. The parameters required for the intended homing sequence must be agreed with the manufacturer of the third-party drive. |
/
Inputs/Outputs
VAR_IN_OUT
Axis : AXIS_REF;
Parameter : MC_HomingParameter;
END_VAR
Name | Type | Description |
---|---|---|
Axis | Axis data structure of the type AXIS_REF, which uniquely addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state. | |
Parameter | MC_HomingParameter | Data structure of the type MC_HomingParameter, which must be transferred from function block to function block over the entire homing sequence. |
Outputs
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
Active : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
Done | BOOL | Becomes TRUE, if the command was completed successfully. |
Busy | BOOL | The Busy output becomes TRUE when the command is started with Execute and remains TRUE as long as the command is processed. If Busy becomes FALSE again, the function block is ready for a new order. At the same time one of the outputs, Done, CommandAborted or Error, is set. |
Active | BOOL | Indicates that the command is executed. |
CommandAborted | BOOL | Becomes TRUE, if the command could not be fully executed. |
Error | BOOL | Becomes TRUE, as soon as an error occurs. |
ErrorID | UDINT | If the error output is set, this parameter supplies the error number. |