SMC_ToolLengthCorr (FB)

 

FUNCTION_BLOCK SMC_ToolLengthCorr

This function block compensates the tool length offset (e.g. of a drill, commanded with G43) relative to the tool holder flange. In other words, it creates a shifted path by substracting the given tool length offset vector adToolLength from the machine's flange to the TCP from the set position pi, taking into account its current orientation. The orientation of the flange's coordinate system given by piIn.dA, piIn.dB, piIn.dC``gets inter­preted according to ``eOriConv. The following illustration shows a drill mounted to the flange with offset. Note, that in this common example the tool length points into negative z-direction.

SMC_ToolLengthCorr_1.png

With bForwardTrafo set to FALSE (default) this function block is intented to be used between SMC_Interpolator and a backward transformation:

Vflange= VTCP- RABC * Vtool

With bForwardTrafo set to TRUE this function block can also be used with a forward transformation:

VTCP= Vflange+ RABC * Vtool

Note

This function block does not perform a tool radius correction. Furthermore the tool length should not be changed while a tool radius correction is active, since this would lead to a jump in the path.

Note

If the tool length correction creates a path shifted in a 3D direction without having activated 3D mode, SMC_NCDecoder signals error |SMC_SMB_ONLY_3DMODE|.

InOut:

Scope

Name

Type

Initial

Comment

Inout Const

pi

SMC_PosInfo

The set position as calculated by SMC_Interpolator. The orientation A/B/C of the tool is epxected in degrees.

adToolLength

ARRAY [0..2] OF LREAL

The tool lenght offset vector Vtool from flange V:sub:'flange'to TCP V:sub:'TCP'.

Input

eOriConv

SMC_ORI_CONVENTION

SMC_ORI_CONVENTION.ZYZ

Defines the way the orientation piIn.dA, piIn.dB, piIn.dC  is interpreted. If the value is SMC_ORI_CONVENTION.ADDAXES, then no tool length correction will be performed.

bForwardTrafo

BOOL

FALSE

If TRUE, the calculated set position piOut is the input of the forward transformation instead of the backward transformation

Output

piOut

SMC_PosInfo