MLFB_HomeFindLimitFastInput
Description
This function block performs a single-axis home to a limit switch connected to a High Speed Input. The motor starts to move according to the direction setting. The home position has been found as soon as the fast inputThe inputs are taken into account at each cycle depending on the system periodicity (for example each millisecond). Under certain circumstances this can be insufficient when more accuracy is needed, or if a quick response is required from the system. To fill the gap, a drive may have some Fast Input connections (generally one or two). When an event happens that triggers a Fast Input (e.g. when a sensor sends a rising edge), the detection of a signal occurs faster (which can be 1000 times more accurate than the system periodicity). Then the timestamp associated with this input can be provided to the IPC to take corrective action selected is triggered on the edge selected.
An absolute move is made to the triggered position, and then the position value is set.
The following figure shows the function block I/O:
Figure 7-228: MLFB HomeFindLimitFastInput
Arguments
Input
ibExecute |
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 |
— |
|||||||
iAxisID |
Description |
Name of a declared instance of the AXIS_REF library function |
||||||
Data type |
||||||||
Range |
[1 , 256] |
|||||||
Unit |
N/A |
|||||||
Default |
— |
|||||||
iPosition |
Description |
Offset Position Applied After Home Switch is found |
||||||
Data type |
LREAL |
|||||||
Range |
— |
|||||||
Unit |
User unit |
|||||||
Default |
— |
|||||||
ibDirection |
Description |
Define the axis homing direction
|
||||||
Data type |
BOOL |
|||||||
Range |
[0 , 1] |
|||||||
Unit |
N/A |
|||||||
Default |
— |
|||||||
iVelocity |
Description |
Commanded velocity for the homing move |
||||||
Data type |
LREAL |
|||||||
Range |
— |
|||||||
Unit |
User unit/sec |
|||||||
Default |
— |
|||||||
iAcceleration |
Description |
Commanded acceleration for the homing move |
||||||
Data type |
LREAL |
|||||||
Range |
— |
|||||||
Unit |
User unit/sec2 |
|||||||
Default |
— |
|||||||
ibLimitSwitchMode |
Description |
Limit switch state to complete homing
|
||||||
Data type |
BOOL |
|||||||
Range |
[0 , 1] |
|||||||
Unit |
N/A |
|||||||
Default |
— |
|||||||
ibFastInputNumber |
Description |
Limit switch state to complete homing.
|
||||||
Data type |
BOOL |
|||||||
Range |
[0 , 1] |
|||||||
Unit |
N/A |
|||||||
Default |
— |
|||||||
iCycleTime |
Description |
Ethercat Cycle Time 250, 500 or 1000 |
||||||
Data type |
LREAL |
|||||||
Range |
— |
|||||||
Unit |
microseconds |
|||||||
Default |
— |
Output
obDone |
Description |
Indicates the move completed successfully. The Command Position has reached the endpoint |
||||||||||||
Data type |
BOOL |
|||||||||||||
Unit |
N/A |
|||||||||||||
obActive |
Description |
Indicates this move is the active move |
||||||||||||
Data type |
BOOL |
|||||||||||||
Unit |
N/A |
|||||||||||||
obError |
Description |
Indicates an invalid input was specified or the move was terminated due to an error |
||||||||||||
Data type |
BOOL |
|||||||||||||
Unit |
N/A |
|||||||||||||
oErrorID |
Description |
Indicates the error if Error output is set to TRUE
|
||||||||||||
Data type |
DINT |
|||||||||||||
Unit |
N/A |
Usage
This homing procedure performs a homing function searching for sensorA sensor is a type of transducer that converts one type of energy into another for various purposes including measurement or information transfer using only High Speed Input Switches. (A High Speed Limit Switch has 1 “Off” (or “On”) area).
- Home is commanded by user in the desired homing direction at the selected Velocity.
- The Timeout can cause an error if exceeded
Related Functions
MLFB_HomeFindHomeFastInputModulo
MLFB_HomeFindLimitFastInputModulo
Example
Structured Text
Direction:= 0; Position:=1000; Velocity:=1000; Acceleration:=10000; Deceleration:=10000; SwitchMode:=0; Timeout:=T#100; FastInputNumber:=0; CycleTime:=1000;
inst_fbHomeFindLimitFastInput(True, Axis1, Position, Direction, Velocity, Acceleration, Deceleration, LimitSwitchMode, Timeout, FastInputNumber, CycleTime);
HomeComplete :=inst_fbHomeFindLimitFastInput.Done; HomeActive :=inst_fbHomeFindLimitFastInput.Active; HomeError :=inst_fbHomeFindLimitFastInput.Error; HomeErrorID :=inst_fbHomeFindLimitFastInput.ErrorID;
|
Ladder Diagram
Function Block Diagram