Function Block MLFB_HomeFindHomeFastInputModuloPipe Network motion icon

Description

This Application Specific FunctionClosed A 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. 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 inputClosed 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 then the position value is set. The hardware limit switches are monitored during the homing procedure.

The drive behaves as follows in case that a hardware limit switch is active before the home-switch has been activated: The motor changes the direction until the home switch is crossed. This function is to be used when the axis is set-up in Modulo mode.

 

The following figure shows the function block I/O:

UDFB HomeFindHomeFastInputModulo

Figure 7-240: MLFB HomeFindHomeFastInputModulo

 

Arguments

Input

ibExecute

Description

Request the homing step procedure at rising edgeClosed A 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

AXIS_REF

 

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

Value

Description

0

clockwise rotation

1

counterclockwise rotation

 

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

iDeceleration

Description

Commanded deceleration for the homing move

 

Data type

LREAL

 

Range

 

Unit

User unit/sec2

 

Default

ibLimitSwitchMode

Description

Limit switch state to complete homing

Value

Description

0

Rising edge of switch

1

Falling edge of switch

 

Data type

BOOL

 

Range

[0 , 1]

 

Unit

N/A

 

Default

ibPosLimitSwitch

Description

The positive direction limit switch input I/O point

 

Data type

BOOL

 

Range

[0 , 1]

 

Unit

N/A

 

Default

ibNegLimitSwitch

Description

The negative direction limit switch input I/O point

 

Data type

BOOL

 

Range

[0 , 1]

 

Unit

N/A

 

Default

iTimeout

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

ibFastInputNumber

Description

Limit switch state to complete homing.

Value

Description

0

Fast InputClosed 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 Number 1

1

Fast Input Number 2

 

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

Value

Description

1

Axis in Error State

2

Axis is Not Enabled

3

Timeout Exceeded

4

SDO Read/Write Error

5

Input Parameter out of Range

 

Data type

DINT

 

Unit

N/A

Usage

This homing procedure performs a homing function searching for sensorClosed 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 user in the desired homing direction at the selected Velocity
  • If LimitSwitch is found ‘On’ on rising ‘Execute’, then the process is started in the opposite direction as specified, LimitSwitch is search for ‘Off’ (or On, depending on LimitSwitchMode setting) Edge (released), and process is restarted again in original direction. This ensures that the end conditions are always the same
  • The Timeout can cause an error if exceeded

Related Functions

MLFB_HomeFindHomeFastInput

MLFB_HomeFindLimitFastInput

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_fbHomeFindHomeFastInputModulo(True, Axis1, Position, Direction, Velocity, Acceleration, Deceleration, PosLimitSwitch, NegLimitSwitch, Timeout, FastInputNumber, CycleTime);

 

HomeComplete :=inst_fbHomeFindHomeFastInputModulo.Done;

HomeActive :=inst_fbHomeFindHomeFastInputModulo.Active;

HomeError :=inst_fbHomeFindHomeFastInputModulo.Error;

HomeErrorID :=inst_fbHomeFindHomeFastInputModulo.ErrorID;

 

(* PosLimitSwitch and NegLimitSwtch are declared I/O points *)

 

Ladder Diagram

UDFB HomeFindHomeFastInputModulo: LD example

Function Block Diagram

UDFB HomeFindHomeFastInputModulo: FBD example

Go back to the top of the page [Top]