MC_StepReferencePulseDetection_BkPlcMc
The function block is used to reference an incremental position measuring system. The function block outputs the position of the reference pulse to the outside via RecordedPosition. No position is set.
Inputs
VAR_INPUT
Execute: BOOL;
Direction: MC_Direction_BkPlcMc;
Velocity: LREAL;
Acceleration: LREAL;
Deceleration: LREAL;
Jerk: LREAL;
SetPosition: LREAL;
TorqueLimit: LREAL;
TimeLimit: TIME;
DistanceLimit: LREAL;
BufferMode: MC_BufferMode_BkPlcMc:=Aborting_BkPlcMc;
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The homing is initiated by a rising edge at this input. |
Direction | MC_Direction_BkPlcMc | The direction is specified via MC_Direction_BkPlcMc. |
Velocity | LREAL | [mm/s] The required motion velocity in actual value units of the axis per second. |
Acceleration | LREAL | [mm/s2] The required acceleration in actual value units of the axis per square second. If this parameter is 0.0, it is replaced by a default value from the axis parameters. |
Deceleration | LREAL | [mm/s2] The required deceleration in actual value units of the axis per square second. If this parameter is 0.0, it is replaced by a default value from the axis parameters. |
Jerk | LREAL | [mm/s3] The required jerk in actual value units of the axis per square second. If this parameter is 0.0, it is replaced by a default value from the axis parameters. |
SetPosition | LREAL | Required position on the referencing cam. |
TorqueLimit | LREAL | reserved |
TimeLimit | TIME | After this time, the referencing is canceled with error. At zero, time monitoring is disabled. |
DistanceLimit | LREAL | After this distance, the referencing will be aborted with an error. At zero, the distance monitoring is disabled. |
BufferMode | MC_BufferMode_BkPlcMc | reserved |
Inputs/outputs
VAR_INOUT
Axis: Axis_Ref_BkPlcMc;
END_VAR
Name | Type | Description |
---|---|---|
Axis | Axis_Ref_BkPlcMc | Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred. |
Outputs
VAR_OUTPUT
Done: BOOL;
Busy: BOOL;
Active: BOOL;
CommandAborted: BOOL;
Error: BOOL;
ErrorID: UDINT;
RecordedPosition: LREAL;
END_VAR
Name | Type | Description |
---|---|---|
Done | BOOL | Successful processing is indicated here |
Busy | BOOL | Indicates that a command is being processed. |
Active | BOOL | Readiness for operation is indicated here. |
CommandAborted | BOOL | Here an abort of the command is indicated. |
Error | BOOL | The occurrence of an error is indicated here. |
ErrorID | UDINT | An encoded error message is provided here. |
RecordedPosition | LREAL | [mm] Determined position at the reference pulse. |
Behavior of the function block
On a rising edge at Execute the function block checks the transferred axis interface. During this process, problems may be detected and reported:
- At Direction, MC_Positive_Direction_BkPlcMc, MC_Negative_Direction_BkPlcMc, is accepted
The parameters Velocity, Acceleration, Deceleration and Jerk are transferred to MC_MoveVelocity_BkPlcMc. After the cam has been detected, the position is communicated via RecordedPosition and a MC_Halt_BkPlcMc stops the movement. If no reference pulse is detected within DistanceLimit or TimeLimit the referencing is aborted with an error
During processing, the function block reports Busy and Active. After successful position setting, Done is reported back. If a subordinate function block reports an error, this is reported via Error and ErrorID.