FC_JerkToRamp

 

FC_JerkToRamp - General Information

Overview

Type:

Function

Available as of:

V1.0.3.0

Versions:

Current version

Task

Conversion of a value from jerk to ramp

Description

The jerk, i.e. the change in acceleration over time, is converted to ramp.

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_lrJerk

LREAL

Jerk (change in acceleration over time) in units/s3.

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_lrJerk in ramp.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

InputParameterInvalid

AccBaseRange

260

AccBase is outside the valid range.

InputParameterInvalid

JerkRange

14

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

JerkRange

Enumeration name:

JerkRange

Enumeration value:

14

Description:

Jerk is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrJerk, an invalid value has been applied.

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

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The conversion has been completed successfully.