PTOEnhancedHome Function Block

Function Description

The PTOEnhancedHome function block commands a move to the reference position similar to the PTOHome function block.

Homing is carried out using one of the following methods:

oShort Cam

oLong Cam Positive

oLong Cam Negative

oShort Cam with Positive Limit

oShort Cam with Negative Limit

oShort Cam with Marker(Z)

Additionally, the PTOEnhancedHome function block provides 2 additional features:

Origin compensation After reaching and stopping at the reference position, the axis moves by a set number of compensation pulses to a compensation position.

Origin offset Once the axis has reached the compensation position, the current position is set to the value defined in the input OffsetPosition.

The following diagram illustrates the compensation move, which is carried out once the axis has reached the reference position:

G-SE-0018529.1.gif-high.gif

 

 

For example, in the diagram above, if the position of point A = -4000, if needed, you can set this value to 0 using the origin offset feature.

NOTE:

oThe frequency represents the velocity. The 2 terms are equivalent.

oIf the target velocity cannot be reached before reaching the compensation position, the axis velocity will follow a triangular profile.

The PTOEnhancedHome function block requires the Origin input to be configured, otherwise the function block sets the Error output.

As soon as the value of the input OffsetPosition has been set, the output Done is set to TRUE.

Graphical Representation

G-SE-0018453.1.jpg

 

 

IL and ST Representation

To see the general representation in IL or ST language, refer to the chapter Function and Function Block Representation.

I/O Variables Description

The following table describes the input variables:

Inputs

Type

Comment

PTO_REF_IN

PTO_REF

Reference to the PTO channel.

To be connected to the PTO_REF of the PTOSimple or the PTO_REF_OUT of the Administrative or Motion output pins function blocks.

Execute

BOOL

On rising edge, starts the function block execution.

When FALSE, resets the outputs of the function block when its execution terminates.

HighVelocity

DWORD

Value of the maximum initial Homing search velocity in Hz.

Range: 1 Hz...100 kHz

LowVelocity ≤ HighVelocity ≤ Maximum frequency of the output

LowVelocity

DWORD

Value of the maximum final Homing approach velocity in Hz.

Range: 1 Hz...100 kHz

LowVelocity ≤ HighVelocity

HomingType

PTO_HOMING_TYPE

Defines the homing type.

Direction

PTO_DIRECTION

Direction of the move.

CompVelocity

DWORD

Target velocity during the compensation move in Hz.

Range: 1...Maximum frequency of the output

CompDirection

PTO_DIRECTION

Direction of the compensation move.

CompAcc

DWORD

Acceleration in Hz/ms or in ms (according to configuration).

Range Hz/ms: 1...Acc. max

Range ms: Acc. max...65000 (Maximum Software Limit)

CompDec

DWORD

Deceleration in Hz/ms or in ms (according to configuration).

Range Hz/ms: 1...Dec. max

Range ms: Dec. max...65000 (Maximum Software Limit)

Compensation

DWORD

Distance of the move in number of compensation pulses.

Range: 1...4,294,967,295

OffsetPosition

DINT

Value of the offset position.

NOTE: The acceleration and deceleration ramps cannot exceed 2,147,483,647 pulses.

The following table describes the output variables:

Outputs

Type

Comment

PTO_REF_OUT

PTO_REF

Reference to the PTO channel.

To be connected with the PTO_REF_IN input pin of the Administrative and Motion function blocks.

Status

PTO_ENHANCEDHOME_STATUS_TYPE

Defines the status of the axis movement.

Done

BOOL

TRUE = indicates that the command is finished.

Function block execution is finished.

Busy

BOOL

TRUE = indicates that the command is in progress.

CommandAborted

BOOL

TRUE = indicates that the command was aborted due to another move command.

Function block execution is finished.

Error

BOOL

TRUE = indicates that an error was detected.

Function block execution is finished.

ErrID

PTOPWM_ERR_TYPE

When Error is TRUE: type of the detected error.

NOTE: For more information about Done, Busy, CommandAborted and Execution pins, refer to General Information on Function Block Management.