FC_CalcStoppingDistance - General Information
Type: |
Function |
Available as of: |
V1.5.3.0 |
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).
The function FC_CalcStoppingDistance calculates the stopping distance.
To consider system delays this method does not use the specified velocity to start the stopping process but the velocity half a Sercos cycle later assuming a constant acceleration (specified as input).
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 |
General library-independent statement on the diagnostic. A value not equal to ET_Diag.Ok corresponds to a diagnostic message. |
- |
- |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = ET_Diag.Ok -> Status message q_etDiag <> ET_Diag.Ok -> Diagnostic message |
- |
- |
|
q_etAccChar |
Characteristic of the acceleration phases |
- |
- |
Data type |
Description |
---|---|
LREAL |
Calculated stopping distance. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
Ok |
0 |
Ok |
|
InputParameterInvalid |
12 |
Acc is outside the valid range. |
|
InputParameterInvalid |
13 |
Dec is outside the valid range. |
|
InputParameterInvalid |
14 |
Jerk is outside the valid range. |
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. |
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. |
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. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The calculation has been completed successfully.