K2: Axis Types, Coordinate Systems, Frames
10.5 Frames
Basic Functions
780
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
Programming
The
ADDFRAME()
function calculates the target frame, which is specified by the
STRING
. The target frame is
calculated in such a way that the new complete frame appears as a chain of the old complete frame and the
transferred frame, e.g.:
ERG = ADDFRAME(TMPFRAME,"$P_SETFRAME")
The new complete frame is calculated to be:
$P_ACTFRAME
new
= $P_ACTFRAME
old
: TMPFRAME
If a current frame has been specified as a target frame, then the new complete frame becomes active at the
preprocessing stage. If the target frame is a data management frame, then the frame is not operative until it is
explicitly activated in the part program.
The function does not set any alarms, but returns the error codes via the return value. The cycle can react
according to the error codes.
Parameter 1:
Type:
FRAME
Additively measured or calculated frame
Parameter 2:
Type:
STRING
Strings for current frames:
"$P_CYCFRAME", "$P_ISO4FRAME",
"$P_PFRAME", "$P_WPFRAME",
"$P_TOOLFRAME", "$P_IFRAME",
"$P_CHBFRAME[0..16]", "$P_NCBFRAME[0..16]",
"$P_ISO1FRAME", "$P_ISO2FRAME",
"$P_ISO3FRAME",
"$P_EXTFRAME", "$P_SETFRAME"
"$P_PARTFRAME"
Strings for data management frames:
"$P_CYCFR", "$P_ISO4FR, "$P_TRAFR",
"$P_WPFR",
"$P_TOOLFR", "$P_UIFR[0..99]",
"$P_CHBFR[0..16]", "$P_NCBFR[0..16]",
"$P_ISO1FR, "$P_ISO2FR, "$P_ISO3FR,
"$P_EXTFR", "$P_SETFR", "$P_PARTFR"
Function value:
Type:
INT
Value:
Significance:
0
OK
1
Specified target (string) is wrong
2
Target frame is not configured
3
Rotation in frame is not permitted