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 subtracting 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 interpreted 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.
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
piThe set position as calculated by SMC_Interpolator. The orientation A/B/C of the tool is expected in degrees.
adToolLengthARRAY [0..2] OF LREAL
The tool lenght offset vector Vtool from flange Vflange to TCP VTCP.
Input
eOriConvSMC_ORI_CONVENTION.ZYZ
Defines the way the orientation
piIn.dA,piIn.dB,piIn.dCis interpreted. If the value is SMC_ORI_CONVENTION.ADDAXES, then no tool length correction will be performed.bForwardTrafoBOOLFALSE
If TRUE, the calculated set position
piOutis the input of the forward transformation instead of the backward transformationOutput
piOut