FC_RampToJerk

 

FC_RampToJerk - General Information

Overview

Type:

Function

Available as of:

V1.0.3.0

Versions:

Current version

Task

Conversion of a value from ramp to jerk

Description

The ramp, i.e. the specification on how quickly a specific acceleration is reached, is converted to jerk.

The unit of the jerk, that is the change in acceleration over time, is units/s3.

The unit ramp is defined as follows:

Ramp = 100 -> The acceleration changes by i_lrAccBase within 1.0 seconds.

Ramp = 50 -> The acceleration changes by i_lrAccBase within 0.5 seconds.

Ramp = 150 -> The acceleration changes by i_lrAccBase within 1.5 seconds.

Interface

Input

Data type

Description

i_lrRamp

LREAL

Specification on how quickly the acceleration i_lrAccBase is reached.

For a definition of ramp, please refer to the functional description.

i_lrAccBase

LREAL

Change in acceleration used as basis for calculation.

If i_lrAccBase = 0, ten times the gravitational acceleration (Gc_lrGravityAcc) is used as basis for calculation.

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to an 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

Return Value

Data type

Description

LREAL

Value of the input i_lrRamp in jerk.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

InputParameterInvalid

AccBaseRange

260

AccBase is outside the valid range.

InputParameterInvalid

RampRange

259

Ramp is outside the valid range.

AccBaseRange

Enumeration name:

AccBaseRange

Enumeration value:

260

Description:

AccBase is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrAccBase, an invalid value has been transferred.

The following must apply: i_lrAccBase >= 0

If i_lrAccBase = 0, ten times the gravitational acceleration (Gc_lrGravityAcc) is used as basis for calculation.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The conversion has been completed successfully.

RampRange

Enumeration name:

RampRange

Enumeration value:

259

Description:

Ramp is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrRamp, a negative value has been applied.

At the input i_lrRamp, a value greater than 0 must be transferred.