SMC_CalcDirectionFromVector (FB)

 

FUNCTION_BLOCK SMC_CalcDirectionFromVector

By use of this function the orientation (dAlpha) of the tool can be calcu­lated.

Note

For detailed information on transformation function blocks see the survey on SM_Trafo_POUs.

InOut:

Scope

Name

Type

Initial

Comment

Input

v

SMC_VECTOR3D

Tangent vector v. In general, v will be identical to the output vecActTangent of the interpolator.

eDir

SMC_VECTORDIR

SMC_tangential

Input eDir specifies, whether the direction has to be calculated parallel to a path tangent (SMC_tangential), or oppositely (SMC_opp_tangential) or orthogonally to the path (SMC_orthogonal_r (right to the path tangent) resp. SMC_orthogonal_l (left to the path tangent)).

Output

dDir

LREAL

The angle dDir is measured in degrees. It will remain constant during standstill of the interpolator, i.e. when v is the zero vector. eDir is mostly either used as set value at SMC_ControlAxisByPos for a directional axis or as input dAlpha for the transformation.