FC_CalcPurePositioningDistance

 

FC_CalcPurePositioningDistance - General Information

Overview

Type:

Function

Available as of:

V1.5.3.0

Task

Calculate the positioning distance and 3 duration times of a motion movement with maximum 3 phases starting with present velocity and acceleration ending in dedicated velocity and acceleration based on maximum acceleration, deceleration and jerk value during transistion phase.

Description

The function FC_CalcPurePositioningDistance calculates the position increment if the movement is required to change from v0, a0 to v1,a1.

Normally this change in done with three phases.

In the first phase the initial acceleration is changed to either i_lrAcc or i_lrDec.

In the second phase the movement applies a constant acceleration.

And in the third phase the acceleration is changed to the required final value.

If the required velocity increment is too small, either i_lrAcc or i_lrDec will not be reached at all and thus the second phase vanishes.

Interface

Input

Data type

Description

Range

Default value

i_lrV0

LREAL

Initial velocity in units/s

-1.8x10308...1.8x10308

-

i_lrA0

LREAL

Initial acceleration in units/s2

-1.8x10308...1.8x10308

-

i_lrV1

LREAL

Final velocity in units/s

-1.8x10308...1.8x10308

-

i_lrA1

LREAL

Final deceleration in units/s2

-1.8x10308...1.8x10308

-

i_lrAcc

LREAL

The maximum absolute acceleration value in units/s2, if the movement change has to be done with positive acceleration.

+1x10-12...1.8x10308

-

i_lrDec

LREAL

The maximum absolute acceleration value in units/s2, if the movement change has to be done with negative acceleration (deceleration).

+1x10-12...1.8x10308

-

i_lrJerk

LREAL

The absolute value of the jerk in units/s3

+1x10-12...1.8x10308

-

Output

Data type

Description

Range

Default value

q_lrT1

LREAL

Time of the initial acceleration change

0...1.8x10308

-

q_lrT2

LREAL

Time of constant acceleration

0...1.8x10308

-

q_lrT3

LREAL

Time of the final acceleration change.

0...1.8x10308

-

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to a diagnostic message.

-

-

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Diagnostic message

-

-

q_etAccChar

ET_AccelerationCharacteristic

Characteristic of the acceleration phases

-

-

Return Value

Data type

Description

LREAL

Position increment for transition movement

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

Ok

Ok

0

Ok

InputParameterInvalid

AccRange

12

Acc is outside the valid range.

InputParameterInvalid

DecRange

13

Dec is outside the valid range.

InputParameterInvalid

JerkRange

14

Jerk is outside the valid range.

AccRange

Enumeration name:

AccRange

Enumeration value:

12

Description:

Acc is outside the valid range.

Issue

Cause

Solution

-

The input for the acceleration threshold is not positive.

Apply a positive value to input i_lrAcc.

DecRange

Enumeration name:

DecRange

Enumeration value:

13

Description:

Dec is outside the valid range.

Issue

Cause

Solution

-

The input for the deceleration threshold is not positive.

Apply a positive value to input i_lrDec.

JerkRange

Enumeration name:

JerkRange

Enumeration value:

14

Description:

Jerk is outside the valid range.

Issue

Cause

Solution

-

 The input for the jerk threshold is not positive.

Apply a positive value to input i_lrJerk.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The calculation has been completed successfully.