MLFB_HomeFindLimitFastInputModulo
Function Block A function block groups an algorithm and a set of private data. It has inputs and outputs. - Fast homing to a limit switch: Modulo mode.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
ibExecute |
BOOL |
0, 1 |
N/A |
No default |
Request the homing step procedure at the rising edge A rising edge is the transition of a digital signal from low to high. It is also called positive edge. |
iAxisID |
AXIS_REF |
1, 256 |
N/A |
No default |
Name of a declared instance of the AXIS_REF library function. See AXIS_REF Structure for more information. |
iPosition |
LREAL |
No range |
User units |
No default |
Offset position applied after home switch is found. |
ibDirection |
BOOL |
0, 1 |
N/A |
No default |
Defines the axis homing direction.
|
iVelocity |
LREAL |
No range |
User unit/sec |
No default |
Commanded velocity for the homing move. |
iAcceleration |
LREAL |
No range |
User unit/sec2 |
No default |
Commanded acceleration for the homing move. |
iDeceleration |
LREAL |
No range |
User unit/sec2 |
No default |
Commanded deceleration for the homing move. |
ibLimitSwitchMode |
BOOL |
0, 1 |
N/A |
No default |
Limit switch state to complete homing.
|
iTimeout |
TIME |
No range |
Sec |
No default |
Maximum time for homing move to complete.
|
ibFastInputNumber |
BOOL |
0, 1 |
N/A |
No default |
Limit switch state to complete homing. |
iCycleTime |
LREAL |
No range |
Microseconds |
No default |
Either 250, 500, or 1000. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
obDone |
BOOL |
|
N/A |
Indicates the move completed successfully. |
||||||||||||
obActive |
BOOL |
|
N/A |
Indicates this move is the Active move. |
||||||||||||
obError |
BOOL |
|
N/A |
Indicates either:
|
||||||||||||
oErrorID |
DINT |
|
N/A |
Indicates the error if the Error output is set to TRUE. Error identifier:
|
Remarks
- Performs a single-axis home to a limit switch connected to a High Speed Input.
- This function is used when the axis is set-up in Modulo mode.
- The motor starts to move according to the direction setting.
- The home position has been found as soon as the fast input The 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 the position value is set.
This image shows the function or function block I/O.
Figure 6-89: MLFB HomeFindLimitFastInputModulo
Usage
- This procedure performs a homing function searching for a sensor A 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 the user in the designated homing direction at the selected or programmed Velocity.
- The Timeout can cause an error if exceeded.
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
Direction:= 0;
Position:=1000;
Velocity:=1000;
Acceleration:=10000;
Deceleration:=10000;
SwitchMode:=0;
Timeout:=T#100;
FastInputNumber:=0;
CycleTime:=1000;
inst_fbHomeFindLimitFastInputModulo(True, Axis1, Position, Direction, Velocity, Acceleration, Deceleration, LimitSwitchMode, Timeout, FastInputNumber, CycleTime);
HomeComplete :=inst_fbHomeFindLimitFastInputModulo.Done;
HomeActive :=inst_fbHomeFindLimitFastInputModulo.Active;
HomeError :=inst_fbHomeFindLimitFastInputModulo.Error;
HomeErrorID :=inst_fbHomeFindLimitFastInputModulo.ErrorID;
See Also