MCFB_StepRefPulse
Description
This function block performs homing by searching for Zero pulse (also called Marker or reference pulse) in encoder. The reference pulse appears once per encoder revolution. The advantage in using Reference PulseWhen the step gets activated, the action is activated for a single execution, and possibly once again when the step is deactivated for homing is the higher accuracy and precision that can be achieved compared to traditional optical, mechanical or magnetic sensors.
The following figure shows the function block I/O:
Figure 7-237: MCFB StepRefPulse
Arguments
Input
Execute |
Description |
Request the homing step procedure at rising edgeA rising edge is the transition of a digital signal from low to high. It is also called positive edge |
||||||||||||||
Data type |
BOOL |
|||||||||||||||
Range |
[0 , 1] |
|||||||||||||||
Unit |
N/A |
|||||||||||||||
Default |
— |
|||||||||||||||
AxisID |
Description |
Name of a declared instance of the AXIS_REF library function |
||||||||||||||
Data type |
||||||||||||||||
Range |
[1 , 256] |
|||||||||||||||
Unit |
N/A |
|||||||||||||||
Default |
— |
|||||||||||||||
Direction |
Description |
Define the axis homing direction
|
||||||||||||||
Data type |
BOOL |
|||||||||||||||
Range |
[0 , 1] |
|||||||||||||||
Unit |
N/A |
|||||||||||||||
Default |
— |
|||||||||||||||
SwitchMode |
Description |
Switch state to complete homing
|
||||||||||||||
Data type |
DINT |
|||||||||||||||
Range |
[0 , 3] |
|||||||||||||||
Unit |
N/A |
|||||||||||||||
Default |
— |
|||||||||||||||
Velocity |
Description |
Commanded velocity for the homing move |
||||||||||||||
Data type |
LREAL |
|||||||||||||||
Range |
— |
|||||||||||||||
Unit |
User unit/sec |
|||||||||||||||
Default |
— |
|||||||||||||||
Acceleration |
Description |
Commanded acceleration for the homing move |
||||||||||||||
Data type |
LREAL |
|||||||||||||||
Range |
— |
|||||||||||||||
Unit |
User unit/sec2 |
|||||||||||||||
Default |
— |
|||||||||||||||
Deceleration |
Description |
Commanded deceleration for the homing move |
||||||||||||||
Data type |
LREAL |
|||||||||||||||
Range |
— |
|||||||||||||||
Unit |
User unit/sec2 |
|||||||||||||||
Default |
— |
|||||||||||||||
Description |
Commanded jerkIn physics, jerk is the rate of change of acceleration; more precisely, the derivative of acceleration with respect to time for the homing move (if zero, then trapezoidal acc/dec is used) |
|||||||||||||||
Data type |
LREAL |
|||||||||||||||
Range |
— |
|||||||||||||||
Unit |
User unit/sec3 |
|||||||||||||||
Default |
— |
|||||||||||||||
SetPosition |
Description |
Value of the absolute position to be set when the homing move is done |
||||||||||||||
Data type |
LREAL |
|||||||||||||||
Range |
— |
|||||||||||||||
Unit |
User unit |
|||||||||||||||
Default |
— |
|||||||||||||||
TorqueLimit |
Description |
Maximum torqueTorque is the tendency of a force to rotate an object about an axis. Just as a force is a push or a pull, a torque can be thought of as a twist applied for the homing move |
||||||||||||||
Data type |
LREAL |
|||||||||||||||
Range |
— |
|||||||||||||||
Unit |
User unit |
|||||||||||||||
Default |
— |
|||||||||||||||
TimeLimit |
Description |
Maximum time for homing move to complete. If exceeded the homing procedure will error out. 0= no time limit |
||||||||||||||
Data type |
TIME |
|||||||||||||||
Range |
— |
|||||||||||||||
Unit |
sec |
|||||||||||||||
Default |
— |
|||||||||||||||
DistanceLimit |
Description |
Maximum distance for homing move to complete. If exceeded the homing procedure will error out. 0= no distance limit |
||||||||||||||
Data type |
LREAL |
|||||||||||||||
Range |
— |
|||||||||||||||
Unit |
User unit |
|||||||||||||||
Default |
— |
|||||||||||||||
BufferMode |
Description |
Define the homing move start action
|
||||||||||||||
Data type |
SINT |
|||||||||||||||
Range |
[0 , 5] |
|||||||||||||||
Unit |
N/A |
|||||||||||||||
Default |
— |
Output
Done |
Description |
Indicates the move completed successfully. The Command Position has reached the endpoint |
||||||||||||||
Data type |
BOOL |
|||||||||||||||
Unit |
N/A |
|||||||||||||||
Busy |
Description |
High from the moment the Execute input is one-shot to the time the move is ended |
||||||||||||||
Data type |
BOOL |
|||||||||||||||
Unit |
N/A |
|||||||||||||||
Active |
Description |
Indicates this move is the active move |
||||||||||||||
Data type |
BOOL |
|||||||||||||||
Unit |
N/A |
|||||||||||||||
CommandAborted |
Description |
Indicates the move was aborted |
||||||||||||||
Data type |
BOOL |
|||||||||||||||
Unit |
N/A |
|||||||||||||||
Error |
Description |
Indicates an invalid input was specified or the move was terminated due to an error |
||||||||||||||
Data type |
BOOL |
|||||||||||||||
Unit |
N/A |
|||||||||||||||
ErrorID |
Description |
Indicates the error if Error output is set to TRUE
|
||||||||||||||
Data type |
INT |
|||||||||||||||
Unit |
N/A |
Usage
This function Block performs homing by searching for Zero pulse (also called Marker or reference pulse) in encoder. The reference pulse appears once per encoder revolution.
- Home is commanded by user in the desired homing direction at the programmed velocity.
- First occurrence of the Reference Pulse, HomingThe Homing procedure allows, based on a position measurement, to set a position offset to the motor in order to ensure it is physically at the home position is finished
- TorqueTorque is the tendency of a force to rotate an object about an axis. Just as a force is a push or a pull, a torque can be thought of as a twist is limited. Time and Distance Limits can cause error if exceeded
- This FunctionA function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. modifies actual position and sets to the “SetPosition” input value at the end
It is common that a first approach is performed against a mechanical sensorA sensor is a type of transducer that converts one type of energy into another for various purposes including measurement or information transfer at higher velocity, and after a Reference Pulse, at a lower velocity. This is a traditional 2-Step homing (Coarse by external Switch in reverse and Fine by Reference Pulse in forward).
Related Functions
Example
Structured Text
PositiveDirection :=0; Velocity :=10000.0; SetPosition :=0.0; TorqueLimit :=50.0; TimeLimit :=T#10s; DistanceLimit :=10000.0;
Inst_MCFB_StepRefPulse( True, Axis1, PositiveDirection, Velocity, 1000, 1000, 0, SetPosition, TorqueLimit, TimeLimit, DistanceLimit, 0 );
HomeComplete :=Inst_MCFB_StepRefPulse.Done; HomeBusy :=Inst_MCFB_StepRefPulse.Busy; HomeActive :=Inst_MCFB_StepRefPulse.Active; HomeAborted :=Inst_MCFB_StepRefPulse.CommandAborted; HomeError :=Inst_MCFB_StepRefPulse.Error; HomeErrorID :=Inst_MCFB_StepRefPulse.ErrorID;
|
Ladder Diagram
Function Block Diagram