FC_DoubleCrankTransformation - General Information
Type: |
Function |
Available as of: |
V1.0.3.0 |
Versions: |
Current version |
Transformation of a double crank
From the input-side angle of a double crank this function calculates the output-side angle (kinematic transformation) and from the input-side impressed torque, it calculates the resulting output-side torque (mechanical transformation). The meaning of the quantities involved can be taken from the following figure. The angles are measured in the mathematically positive sense (anti-clockwise), starting from the positive X direction. It must be noted here that in the case of some double cranks - due to the mechanical situation - not all input-side angles can be moved to. Moreover it must be taken into account that, as a rule, there are two associated output-side angles for one input-side angle i.e. that the reverse transformation is not clear (see parameter i_diSector). It is the task of the user to select the angle that is reasonable for the application.
As the double crank is a symmetrical mechanism, no separate functions for forward and reverse transformation are required. The reverse transformation is obtained by the following change of the parameters: i_lrRadius1 -> i_lrRadius2, i_lrRadius2 -> i_lrRadius1, i_lrXOffset -> - i_lrXOffset, i_lrYOffset -> - i_lrYOffset.
NOTE: This function only serves for calculating the transformation of the crank. A transfer of position set values to axes does not take place. An advantage of this method is that the function can be combined with other mechanical calculation POUs without any problems.
Input |
Data type |
Description |
---|---|---|
i_lrRadius1 |
LREAL |
Length of the input-side radius, value range: > 0.0 |
i_lrPushRod |
LREAL |
Length of the connecting push rod, value range: > 0.0 |
i_lrRadius2 |
LREAL |
Length of the output-side radius, value range: > 0.0 |
i_lrXOffset |
LREAL |
X-offset between input-side and output-side revolute joint. This value is provided with a sign. |
i_lrYOffset |
LREAL |
Y-offset between input-side and output-side revolute joint. This value is provided with a sign. |
i_diSector |
DINT |
As already explained above, the double crank transformation is not unique as a rule, that is, there exist two output-side angles which are associated with the input-side angle i_lrAngularPosition1. If i_diSector = 1, then the first of the two solutions is output to q_lrAngularPosition2; if i_diSector = 2, then the second solution is output. |
i_lrAngularPosition1 |
LREAL |
Angle specified on the input side |
i_lrTorque1 |
LREAL |
Torque specified on the input side |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value not equal to ET_Diag.Ok corresponds to an 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_lrAngularPosition2 |
LREAL |
Output-side angle calculated from i_lrAngularPosition1. If several solutions exist, the parameter i_diSector determines which will be output. |
q_lrTorque2 |
LREAL |
Output-side torque calculated from i_lrTorque1. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
InputParameterInvalid |
68 |
AngularPosition1 is outside the valid range |
|
InputParameterInvalid |
64 |
PushRod is outside the valid range. |
|
InputParameterInvalid |
29 |
Radius1 is outside the valid range. |
|
InputParameterInvalid |
30 |
Radius2 is outside the valid range. |
|
InputParameterInvalid |
67 |
XOffset is outside the valid range. |
|
InputParameterInvalid |
174 |
YOffset is outside the valid range. |
Enumeration name: |
AngularPosition1Range |
Enumeration value: |
68 |
Description: |
AngularPosition1 is outside the valid range |
Issue |
Cause |
Solution |
---|---|---|
- |
The outputs q_lrLinearPosition2 and q_lrTorque2 cannot be calculated for the value defined for i_lrAngularPosition1. |
Verify i_lrAngularPosition1 Verify all parameters that are part of the calculation: i_lrRadius1, i_lrPushRod, i_lrRadius2, i_lrXOffset, i_lrYOffset, i_diSector |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The transformation has been completed successfully.
Enumeration name: |
PushRodRange |
Enumeration value: |
64 |
Description: |
PushRod is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_lrPushRod, a negative value has been applied. |
At the input i_lrPushRod, a value greater than 0 must be transferred. |
Enumeration name: |
Radius1Range |
Enumeration value: |
29 |
Description: |
Radius1 is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_lrRadius1, a negative value has been applied. |
At the input i_lrRadius1, a value greater than 0 must be transferred. |
Enumeration name: |
Radius2Range |
Enumeration value: |
30 |
Description: |
Radius2 is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_lrRadius2, a negative value has been applied. |
At the input i_lrRadius2, a value greater than 0 must be transferred. |
Enumeration name: |
XOffsetRange |
Enumeration value: |
67 |
Description: |
XOffset is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_lrXOffset, a number whose value is smaller than Gc_lrZeroTolerance has been applied. |
i_lrXOffset must not be 0. |
Enumeration name: |
YOffsetRange |
Enumeration value: |
174 |
Description: |
YOffset is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_lrYOffset, a number whose value is smaller than Gc_lrZeroTolerance has been applied. |
i_lrYOffset must not be 0. |