FC_CalcPureStoppingDistance

 

FC_CalcPureStoppingDistance - General Information

Overview

Type:

Function

Available as of:

??? V1.6.2.0

Task

Calculate distance and time for stopping (slow down completely) present movement based on present velocity, acceleration and boundary conditions (maximum acceleration, deceleration and jerk value).

Description

The function FC_CalcPureStoppingDistance calculates the stopping distance and stopping time. For this the present velocity, the present acceleration, and the boundary conditions (maximum acceleration, maximum deceleration, jerk) are required.

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_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_lrStoppingTime

LREAL

The time needed to stop

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

Calculated stopping distance.

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.