Function Block MLFB_HomeFindHomeFastInputPipe Network motion icon

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 inputClosedThe 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.

The following figure shows the function block I/O:

UDFB HomeFindHomeFastInput

Figure 7-201: MLFB HomeFindHomeFastInput

Arguments

Input

ibExecute

Description

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

ibHomeSwitchMode

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 InputClosedThe 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 sensorClosedA 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_HomeFindHomeFastInputModulo

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

 

HomeComplete :=inst_fbHomeFindHomeFastInput.Done;

HomeActive :=inst_fbHomeFindHomeFastInput.Active;

HomeError :=inst_fbHomeFindHomeFastInput.Error;

HomeErrorID :=inst_fbHomeFindHomeFastInput.ErrorID;

 

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

 

Ladder Diagram

UDFB HomeFindHomeFastInput: LD example

Function Block Diagram

UDFB HomeFindHomeFastInput: FBD example

Go back to the top of the page [Top]