Siemens SINUMERIK Frames Explained: TRANS, ROT, SCALE and MIRROR Coordinate Transformations (840D sl / 828D)

4 August 2026

Mentor CNC Editör Ekibi

What Is a Frame on Siemens SINUMERIK?

On SINUMERIK controls a frame is a data record that defines the transition from one coordinate system to another. It carries an offset (translation), a rotation, a scale factor and a mirroring component. The control knows where the workpiece sits and which way it faces entirely through frames.

In the shop this means you do not have to clamp the part in exactly the same place and at exactly the same angle every time. If the part ends up 40 mm to the right and tilted by 7°, you do not rewrite the program — you move the coordinate system onto the part. The program stays the same; the coordinate system moves.

As the source document puts it: using frames, coordinate systems can be translated, rotated, mirrored and scaled, so that the coordinate plane is aligned to the workpiece surface. The result is a clear reduction in programming time and cost.

Who is this page for? Programmers moving from Fanuc to Siemens, mould and die makers, operators running 3+2 axis work, and anyone machining multiple parts or pallet setups. Everything Fanuc splits between G52, G68 and its mirror functions is gathered on SINUMERIK under a single concept — the frame.

The coordinate system chain: from MCS to WCS

To understand what a frame does you need to know which coordinate systems the control stacks on top of each other. The frame chain in the Job Planning manual runs as follows:

MCS (Machine coordinate system) └─ home position offset BCS (Basic coordinate system) └─ kinematic transformation (TRANSMIT, TRACYL, TRAORI…) └─ handwheel (DRF) offset, superimposed motion, external zero offset BZS (Basic zero system) └─ chained array of basic frames (channel-specific and/or NCU global) SZS (Settable zero system) └─ G54 … G599 settable frame WCS (Workpiece coordinate system) └─ system frames (TOROT/TOFRAME, workpiece reference points) └─ programmable frame (TRANS, ROT, SCALE, MIRROR) └─ frame for cycles

The X, Y and Z values you write in the part program belong to the topmost system, the WCS. Every step in between is a frame, and they all stack. This is exactly why G54 and TRANS do not cancel each other — they add up.

The most common misconception “G54 is already active, so writing TRANS cancels it” is wrong. TRANS sits on top of G54. If your work zero suddenly shifts by 100 mm, the cause is usually a programmable frame left over from the previous program and never cleared.

Types of frame

The source document groups the possible frames as follows:

TypeHow it is activatedWhat it is for
Basic frame (basic offset)G500 and the basic frame variablesOffsets shared by all parts: fixture, pallet or clamping datum
Settable framesG54, G55, G56, G57, G505 … G599The classic work offset, measured and entered at the panel
Programmable framesTRANS, ROT, SCALE, MIRROR and their additive versionsTemporary translation, rotation, scaling and mirroring inside the program
System framesManaged by the control (TOROT/TOFRAME, measuring, external zero offset, cycles)Measuring cycles, alignment to tool orientation, preset, transformations inside cycles

The active total frame: $P_ACTFRAME

The workpiece coordinate system currently valid in the channel is described by $P_ACTFRAME, which results from chaining all frames acting in the channel in a fixed sequence:

$P_ACTFRAME = $P_PARTFRAME : $P_SETFRAME : $P_EXTFRAME : $P_ACTBFRAME : $P_IFRAME : $P_GFRAME : $P_TOOLFRAME : $P_WPFRAME : $P_TRAFRAME : $P_PFRAME : $P_ISO4FRAME : $P_CYCFRAME

Two of these variables show up constantly in daily work:

  • $P_IFRAME — the active settable frame. After G54 is programmed, $P_IFRAME contains the translation, rotation, scaling and mirroring defined by G54. It corresponds to $P_UIFR[$P_IFRNUM].
  • $P_PFRAME — the active programmable frame. It is the frame that results from programming TRANS/ATRANS, ROT/AROT, SCALE/ASCALE, MIRROR/AMIRROR, or from assigning CTRANS, CROT, CMIRROR or CSCALE. It defines the reference between the settable zero system (SZS) and the workpiece coordinate system (WCS).

Whenever one of these frames changes, the control recalculates the current total frame $P_ACTFRAME automatically.

Programmable frame commands

The source document sorts programmable frames into five groups. The table below shows which command is absolute and which is additive:

GroupAbsoluteAdditiveAssignment to a frame variable
Offset — coarse (translation)TRANS, G58ATRANSCTRANS
Offset — fineG59CFINE
RotationROT, ROTSAROT, AROTSCROT, CROTS
ScalingSCALEASCALECSCALE
MirroringMIRRORAMIRRORCMIRROR
How the names work A leading A stands for “additive”: AROT does not delete the previous rotation, it adds to it. A leading C means the command is used to assign a value to a frame variable; CTRANS on its own moves nothing, it produces frame data.

TRANS and ATRANS — translation

TRANS writes an absolute translation into the programmable frame: previously programmed programmable frame components are replaced. ATRANS adds to the current state.

; machining one pocket in four positions N10 G54 G17 G90 N20 TRANS X100 Y50 ; absolute translation, position 1 N30 L10 ; pocket subprogram N40 ATRANS X120 ; additive: now X220 Y50 N50 L10 N60 ATRANS Y80 ; now X220 Y130 N70 L10 N80 TRANS ; clear the programmable frame N90 G0 Z200 M30

The subprogram (here L10) never changes; only the coordinate system moves. The same approach is used for pallet work, multi-station fixtures and repeating hole patterns.

G58 and G59 — axial coarse and fine offset

The source document classifies G58 as the coarse component of the axial zero offset and G59 as the fine component. The total offset is the sum of the coarse and the fine offset. The fine offset first has to be enabled by machine data:

MD18600 $MN_MM_FRAME_FINE_TRANS = 1 ; fine offset enabled

In practice the fine offset is where small measurement-driven corrections are entered, so the main offset stays untouched.

ROT and AROT — rotation

ROT rotates the coordinate system about the geometry axes and works absolutely; AROT adds to the existing rotation. The Job Planning manual states the value ranges explicitly:

RotationValue range
Rotation around 1st geometry axis−180° … +180°
Rotation around 2nd geometry axis−90° … +90°
Rotation around 3rd geometry axis−180° … +180°

The middle axis being limited to ±90° is not arbitrary: SINUMERIK describes rotation about three axes in RPY notation (Roll–Pitch–Yaw), where the middle angle is mathematically restricted to ±90°. The same logic applies to the “solid angle” mode of CYCLE800, where the sequence is fixed — first Z, then Y.

; a pocket rotated by 30 degrees in the XY plane N10 G54 G17 G90 N20 TRANS X80 Y60 N30 ROT Z30 ; 30 degrees about Z, absolute N40 L10 N50 AROT Z90 ; additive: 120 degrees in total N60 L10 N70 ROT ; clear the rotation N80 TRANS ; clear the translation
Rotation and manual traverse Once the coordinate system is rotated, jogging “X” no longer moves the machine X axis — it moves the workpiece X axis. With a rotated frame active you will see two machine axes move at once while jogging a single axis. That is not a fault; it is the frame doing its job.

ROTS, AROTS and CROTS — rotation with solid angles

ROTS and AROTS are defined as “programmable frame rotations with solid angles“. With plain ROT you give a separate angle per axis; with ROTS you define the position of the plane in space instead. When a drawing dimensions an inclined face relative to two axes, ROTS works directly from that information. CROTS performs the same operation as an assignment to a frame variable.

SCALE and ASCALE — scaling

SCALE applies a scale change on the specified axes; ASCALE works additively. In mould and die work this is used for shrinkage allowance, model enlargement and trial parts.

Two traps in scaling 1. Different scale factors on different axes turn circles into ellipses, distort radii and make tool radius compensation behave unexpectedly. If you do not want contour distortion, use the same factor on all axes. 2. Scaling does not scale the cutter. The part grows by 2%, the tool does not; the relationship between pocket width and tool diameter changes. Verify that the tool still fits the scaled geometry before you run the program.

MIRROR and AMIRROR — mirroring

MIRROR reverses direction on the specified axis, so a single program can machine both the left-hand and the right-hand version of a symmetrical part. The Job Planning manual defines CMIRROR as “mirror on a coordinate axis”, and MI is the mirroring component of a frame.

Mirroring is the riskiest frame operation Mirroring an axis reverses the machining direction. Climb milling and conventional milling swap places, the direction of circular interpolation changes, and the side on which tool radius compensation acts changes with it. Always verify a mirrored program by simulation and in single block, and confirm visually which side the cutter compensation has moved to.

Clearing and suppressing frames

CommandEffect
TRANS / ROT / SCALE / MIRROR (with no values)Clears the corresponding programmable frame component
G500Deactivates all settable frames; the basic frames remain active
G53Suppresses the zero offset non-modally
G153Suppression including basic frames
SUPAThe widest suppression: suppression of the current zero offset including programmed offsets, system frames, handwheel (DRF) offsets, external zero offset and overlaid movement

Using SUPA or G53 for moves to the tool change position, a reference point or a fixed service position keeps those moves free of any active frame.

Qualification Whether each command has to stand alone in its block, the exact clearing behaviour when the command is written without values, and the non-modal behaviour of G53/G153/SUPA can differ in detail with the control version and the machine manufacturer’s configuration. These points appear only in summary form in the two sources used here; the Fundamentals programming manual for your control is the authority for exact syntax.

Frame variables: what sits behind G54

The G54 values you enter at the panel are stored in frame variables. The Job Planning manual gives the mapping directly:

Active settable frameData storage frameCorresponding command
$P_IFRAME =$P_UIFR[0]G500
$P_UIFR[1]G54
$P_UIFR[2]G55
$P_UIFR[3]G56
$P_UIFR[4]G57
$P_UIFR[5]G505
$P_UIFR[99]G599

In other words, programming G54 makes $P_UIFR[1] the active frame. This table is the starting point for anyone who wants to read or write work offsets from inside a program.

Writing a frame is not the same as activating it $P_UIFR[n] and $P_CHBFR[n] are data storage frames. A value written to them from the program is not immediately active in the channel. It becomes active only when G500, G54 … G599 is executed. By contrast, a value written to $P_IFRAME is included in the calculation immediately. This is the usual explanation for “I wrote the value but the machine still runs on the old one”.

Basic frames: $P_CHBFRAME, $P_BFRAME, $P_UBFR

  • $P_CHBFRAME[n] — the active channel-specific basic frames; they define the reference between the basic coordinate system (BCS) and the basic origin system (BOS/BZS).
  • $P_BFRAME — the current first basic frame in the channel. The manual states the identities $P_BFRAME = $P_CHBFRAME[0] and $P_UBFR = $P_CHBFR[0]; both older variables are retained for compatibility reasons.
  • $P_ACTBFRAME — the chained complete basic frame; this variable is read-only.

The number of basic frames per channel is configured with MD28081 $MC_MM_NUM_BASE_FRAMES. The standard configuration is designed for at least one basic frame per channel, a maximum of eight basic frames is supported, and in addition there can be eight NCU global basic frames in the channel.

Which frame survives a reset?

The manual ties this to machine data:

MD20110 RESET_MODE_MASK Bit0 = 1 and Bit14 = 1 → $P_UBFR (basic frame) acts Bit0 = 1 and Bit5 = 1 → $P_UIFR[$P_UIFRNUM] (settable frame) acts

“Does G54 stay active after Reset or not?” is answered by those bits — and that is why the behaviour differs from machine to machine.

Assigning values to frames: CTRANS, CROT, CSCALE, CMIRROR

To assign values to a frame directly in the program, the C functions are used. The manual gives the syntax as:

$P_PFRAME = CTRANS(X,<offset>, Y,<offset>, Z,<offset>, …) $P_PFRAME = ROT(X,<angle>, Y,<angle>, Z,<angle>, …) $P_UIFR[..] = CROT(X,<angle>, Y,<angle>, Z,<angle>, …) $P_PFRAME = CSCALE(X,<scale>, Y,<scale>, Z,<scale>, …) $P_PFRAME = CMIRROR(X, Y, Z)
FunctionMeaning
CTRANSTranslation of the specified axes
CROTRotation around the specified axes
CSCALEScale change on the specified axes
CMIRRORDirection reversal on the specified axis
CFINEAssignment of a fine offset to a FRAME variable

The chaining operator ” : “

The chaining operator combines several operations on one frame; they are processed successively from left to right:

$P_PFRAME = CTRANS(X,10,Y,20,Z,5) : CROT(Z,45) : CMIRROR(Y)

That single line translates the coordinate system by X10 Y20 Z5, then rotates it 45° about Z, then mirrors it in Y. Order matters — the operations are applied in the sequence written.

Frames can also be chained with each other:

$P_IFRAME = $P_UIFR[15] : $P_UIFR[16] ; the result frame from chaining two settable data storage ; frames is assigned to the active settable total frame ; example: $P_UIFR[15] = offset, $P_UIFR[16] = rotation$P_UIFR[3] = $P_UIFR[4] : $P_UIFR[5] ; the result is written to a different settable data storage frame

The manual also names the classic application: describing several workpieces arranged on a pallet that are to be machined in the same process. The frame components hold intermediate values for the pallet task and are chained to generate the various workpiece zeros.

Defining your own frame variable: DEF FRAME

In addition to the predefined frame variables, you can define your own:

DEF FRAME PALETTE PALETTE = CTRANS(…) : CROT(…) ; chained offset and rotation assigned to the PALETTE frame variableDEF FRAME SETTING_1 SETTING_1 = CTRANS(X,10) $P_PFRAME = SETTING_1 ; activate the frameDEF FRAME SETTING_4 SETTING_4 = $P_PFRAME ; buffer the current frame … $P_PFRAME = SETTING_4 ; fetch the buffered frame back

The last pattern is particularly useful: buffer the current frame before entering a subprogram and restore it on exit, so the subprogram cannot corrupt the coordinate system of the main program.

Reading and changing frame components: TR, FI, RT, SC, MI

You can access an individual value inside a frame instead of the whole frame:

ComponentMeaning
TRTranslation (coarse offset)
FITranslation fine (fine offset)
RTRotation
SCScale modification
MIMirroring
R10 = $P_UIFR[$P_UIFRNUM, X, RT] ; angle of rotation about X from the currently valid ; settable zero offset, assigned to R10 R12 = $P_UIFR[25, Z, TR] ; Z offset from set frame no. 25, assigned to R12 R15 = $P_PFRAME[Y, TR] ; Y offset of the current programmable frame, assigned to R15 $P_PFRAME[X, TR] = 25 ; modify the X offset of the current programmable frame ; X25 applies immediately

$P_UIFRNUM holds the number of the currently set frame, which allows “work on whichever offset is active” style programming. On multi-part jobs this lets a single subprogram serve every offset.

External zero offset: $AA_ETRANS

The external zero offset is a linear offset between the basic coordinate system (BCS) and the basic origin system (BOS/BZS), and it can be driven by the PLC. Depending on machine data it acts in one of two ways:

MD28082 $MC_MM_SYSTEM_FRAME_MASK, Bit1Behaviour
0$AA_ETRANS[axis] is written directly by PLC, HMI or NC program and acts directly as the offset value.
1The active system frame $P_EXTFRAME and the data storage frame $P_EXTFR are activated. All traversal movements in the channel are stopped, a preprocessing stop with subsequent reorganization (STOPRE) is performed, the offset is written to both frames, the active total frame $P_ACTFRAME is recalculated, the offset is retracted in the programmed axes, and the interrupted motion or NC program continues.

The interface signal DB31, ... DBX3.0 going from 0 to 1 activates the offset. This is the mechanism used for parts moving on a conveyor, drifting fixtures and automation cells.

PRESETON and PRESETONS — setting a new actual value

Both procedures set a new actual value in the machine coordinate system (MCS) for one or more axes. This corresponds to a zero offset of the MCS of the axis and does not cause the axis to be traversed. Both initiate a preprocessing stop with synchronization, and the actual position is assigned to the axis only at standstill.

PRESETON (<axis_1>, <value_1> [, <axis_2>, <value_2>, … <axis_8>, <value_8>]) PRESETONS(<axis_1>, <value_1> [, <axis_2>, <value_2>, … <axis_8>, <value_8>])

The difference between them is a safety matter:

PRESETONPRESETONS
Referencing statusLost — the machine axis is reset to “not referenced / synchronized”Unchanged
Preprocessing stopYesYes
Alone in the blockYesYes
RestrictionThe manual recommends using it only for axes that do not require a reference pointPossible only for certain encoder types and referencing modes
PRESETON destroys the referencing status The manual’s own caution is explicit: setting a new actual value in the machine coordinate system with PRESETON resets the referencing status of the machine axis to “not referenced / synchronized”. To restore the original machine coordinate system, the measuring system of the machine axis must be referenced again, for example through active referencing from the part program (G74). Losing the reference affects the validity of software limits and protection zones — do not use this command in a production program without the machine manufacturer’s approval.

PRESETONS is possible only if the active measuring system satisfies:

  • MD30240 $MA_ENC_TYPE[measuring system] = 0 (simulated encoder) or 1 (raw signal encoder)
  • MD34200 $MA_ENC_REFP_MODE[measuring system] = 0 (no reference point approach possible) or 1 (referencing for incremental, rotary or linear measuring systems: zero pulse on the encoder track)

MEAFRAME — frame calculation from three measuring points in space

MEAFRAME supports measuring cycles: it calculates a frame from three ideal points and the corresponding measured points.

The problem it solves is familiar from mould work and large-part machining. When a workpiece is positioned for machining, its position relative to the Cartesian machine coordinate system is generally both offset and rotated. Exact machining or measuring would otherwise require either a costly physical adjustment of the part or a change to the motions defined in the part program. MEAFRAME is the third way: three points whose ideal positions are known are probed, and the control calculates the difference as a frame.

MEAFRAME(<ideal points>, <measuring points>, <quality>)
ParameterMeaning
<ideal points>2-dim. REAL array containing the three coordinates of the ideal points
<measuring points>2-dim. REAL array containing the three coordinates of the measured points
<quality>VAR REAL variable that returns information on the quality of the FRAME calculation

What the quality value tells you

ValueMeaning
−1The ideal points are almost on a straight line: the frame could not be calculated, the returned FRAME variable contains a neutral frame
−2The measuring points are almost on a straight line: the frame could not be calculated, a neutral frame is returned
−4The calculation of the rotation matrix failed for a different reason
≥ 0.0Sum of distortions (distances between the points) required to transform the measured triangle into a triangle congruent to the ideal triangle

The manual explains it as follows: in order to map the measured coordinates onto the ideal coordinates using a rotation and a translation, the triangle formed by the measured points must be congruent to the ideal triangle. This is achieved by a compensation algorithm that minimizes the sum of squared deviations. Because the effective distortion can be used to judge the quality of the measurement, MEAFRAME returns it as an additional variable.

Point selection decides the result A quality value of −1 or −2 means the three points were chosen almost on one straight line. The wider the triangle the three points form, the more stable the calculation. A rotation angle derived from a small, narrow triangle amplifies measurement error.

Using the MEAFRAME result

MEAFRAME returns an offset frame. If this offset frame is chained to the settable frame that was active when the function was called (for example $P_UIFR[1] with G54), a settable frame is provided for further conversions and machining. If the offset frame has to apply at a different position in the frame chain, or if other frames are active before the settable frame, the ADDFRAME function can be used to chain it into one of the channel basic frames or a system frame.

Prerequisite for chaining with ADDFRAME The manual is explicit: the following must not be active in the frames — mirroring with MIRROR and scaling with SCALE. Furthermore, the input parameters for the setpoints and actual values are workpiece coordinates, and these coordinates must always be specified metrically or in inches (G71/G70) and radius-related (DIAMOF) in the basic system of the control.

A controlled application example

The manual’s example program does not activate the calculated frame blindly — it applies limit checks first. This approach is worth copying exactly:

DEF FRAME CORR_FRAME DEF REAL FIT_QUALITY = 0 DEF REAL ROT_FRAME_LIMIT = 5 ; permits max. five degree rotation DEF REAL FIT_QUALITY_LIMIT = 3 ; permits max. three mm offset between ; the ideal and the measured triangleN200 CORR_FRAME = MEAFRAME(IDEAL_POINT, MEAS_POINT, FIT_QUALITY) N230 IF FIT_QUALITY < 0 SETAL(65000) GOTOF NO_FRAME ENDIF N240 IF FIT_QUALITY > FIT_QUALITY_LIMIT SETAL(65010) GOTOF NO_FRAME ENDIF N250 IF CORR_FRAME[X,RT] > ROT_FRAME_LIMIT ; limiting the 1st RPY angle SETAL(65020) GOTOF NO_FRAME ENDIF N260 IF CORR_FRAME[Y,RT] > ROT_FRAME_LIMIT ; limiting the 2nd RPY angle SETAL(65021) GOTOF NO_FRAME ENDIF N270 IF CORR_FRAME[Z,RT] > ROT_FRAME_LIMIT ; limiting the 3rd RPY angle SETAL(65022) GOTOF NO_FRAME ENDIF N300 $P_IFRAME = CORR_FRAME ; activate sample frame with settable frame N700 G500 ; deactivate settable frame NO_FRAME: M0 M30

The logic is simple: if the measurement is poor, the distortion too large, or the calculated rotation greater than expected, the program raises an alarm and stops instead of machining from a bad frame. Every probing routine that sets a work offset automatically should carry checks like these.

NCU global frames and the rotation restriction

Only one set of NCU global frames is used for all channels on each NCU. They can be read and written from all channels and are activated in the respective channel.

Rotations cannot be used with global frames In the manual’s words: with global frames there is no geometrical relationship between the axes, so it is not possible to perform rotations or to program geometry axis identifiers. Programming a rotation with global frames produces the alarm: 18310 Channel %1 Block %2 Frame: rotation not allowed Global frames and channel-specific frames can be chained, and the resulting frame contains all frame components including the rotations for all axes; however, the assignment of a frame with rotation components to a global frame is denied with the same alarm.

Related machine data

Machine dataMeaning
MD28081 $MC_MM_NUM_BASE_FRAMESNumber of basic frames in the channel (min. 1, max. 8)
MD18601 $MN_MM_NUM_GLOBAL_USER_FRAMESReconfiguration of settable frames as global frames
MD18600 $MN_MM_FRAME_FINE_TRANSEnable of the fine offset (= 1)
MD20110 RESET_MODE_MASKWhich frame remains effective after reset
MD28082 $MC_MM_SYSTEM_FRAME_MASKBehaviour of the system frames (Bit1: external zero offset)

Selecting basic frames: $P_CHBFRMASK and $P_NCBFRMASK

These two system variables select which basic frames are included in the calculation of the “complete” basic frame. The value is interpreted as a bit mask. The variables can only be programmed in the program and read via the OPI.

$P_NCBFRMASK = ‘H81’ ; $P_NCBFRAME[0] : $P_NCBFRAME[7] $P_CHBFRMASK = ‘H11’ ; $P_CHBFRAME[0] : $P_CHBFRAME[4]

After a reset and in the basic setting, both variables take the value of $MC_CHBFRAME_RESET_MASK.

Frame commands on SINUMERIK 828D

The 828D availability table in the Job Planning manual shows that the frame-related commands are standard on PPU240.3/241.3, PPU260.3/261.3 and PPU280.3/281.3, in both the turning and the milling versions:

Command groupStatus on 828D
TRANS, ATRANS, CTRANSStandard (all PPU versions, turning + milling)
ROT, AROT, ROTS, AROTS, CROT, CROTSStandard
SCALE, ASCALE, CSCALEStandard
MIRROR, AMIRROR, CMIRRORStandard
CFINE, TR, SC, MIStandard
MEAFRAME, ADDFRAME, INVFRAMEStandard
SUPAStandard
TOROT, TOROTX, TOROTY, TOROTZ, TOFRAME, TOFRAMEX/Y/Z, TOROTOFStandard
TCOFR, TCOFRX, TCOFRY, TCOFRZ, TCOABSMilling versions only; not available on turning versions
TRAORINot available on 828D
TRANSMIT, TRACYLOption

The practical conclusion: the whole of frame programming is available on 828D. It is not a 840D sl privilege. The boundary starts at multi-axis orientation transformation (TRAORI).

Frames and swivelling the plane (CYCLE800)

Swivelling a plane with CYCLE800 sets up a frame. The source document is unambiguous: when the coordinate system is swivelled, the previously set zero offset is automatically swivelled with it. You do not have to re-establish G54.

The same document summarises the value of frames in mould making: the coordinate system is first translated and then rotated onto an inclined surface, after which you no longer have to take the inclination into account while programming. All machining cycles can be programmed as usual, perpendicular to the workpiece surface — using a drilling cycle, for example.

The CYCLE800 graphical dialogue used to align machine axes with workpiece axes must be installed on the control. The source document notes that in its own edition this dialogue was available on 840D only; today’s 828D also provides the swivel cycle, and the availability table above supports this.

Frame or CYCLE800? If you are machining an inclined face on a machine with rotary axes, use CYCLE800: the cycle also moves the rotary axes. If you only want to rotate the coordinate system without moving any rotary axis — for example the part was clamped 3° out and the surface is to be machined flat — ROT/AROT is enough.

The most common frame mistakes on the shop floor

  1. Not clearing the frame at the end of the program. The next program starts with the leftover translation or rotation. Make it a habit to end programs with TRANS, ROT or G500.
  2. Writing a data storage frame and forgetting to activate it. Writing $P_UIFR[n] is not enough; the value is not active until G54 … G599 or G500 is executed.
  3. Running a mirrored program without simulation. MIRROR reverses the machining direction; cutter compensation side and circular direction change with it.
  4. Using different scale factors per axis. Circles distort and radii no longer hold size.
  5. Not protecting the tool change move from frames. Without SUPA or G53, the move to the tool change position shifts with the active frame.
  6. Programming a rotation in a global frame. You will get alarm 18310; global frames do not accept rotations.
  7. Using PRESETON in a production program. It destroys the axis reference and forces re-referencing.
  8. Activating a MEAFRAME result without limit checks. A bad probe measurement turns straight into a bad work offset.
  9. Not knowing the reset behaviour. Which frame survives a reset depends on the MD20110 RESET_MODE_MASK bits, and it differs from machine to machine.

Frequently asked questions

What is the difference between TRANS and G54?

G54 is a settable frame: entered at the panel, retained independently of the program, stored in $P_UIFR[1]. TRANS is a programmable frame written inside the program, and it sits on top of G54. They do not cancel each other; they add.

How many frames can be active at once?

In principle every step of the chain is active at the same time: basic frames, the settable frame, system frames and the programmable frame. The result is combined in $P_ACTFRAME.

What is the SINUMERIK equivalent of Fanuc G68 (coordinate rotation)?

ROT / AROT. Where Fanuc cancels the rotation with G69, SINUMERIK clears it by writing ROT with no values.

What is the SINUMERIK equivalent of Fanuc G52 (local coordinate system)?

TRANS / ATRANS.

If I change a frame inside a subprogram, do I corrupt the main program?

Yes. The remedy is to buffer the current frame in a FRAME variable before entering the subprogram and restore it on exit: DEF FRAME SETTING_4 → SETTING_4 = $P_PFRAME → … → $P_PFRAME = SETTING_4.

How do I machine four parts on a pallet with one program?

By building a frame for each part and chaining them. That is exactly the method described in the manual: the frame components hold intermediate values for the pallet task and are chained to generate the various workpiece zeros. In practice you either chain $P_UIFR[n] offsets or shift your own DEF FRAME variable inside a loop.

Why can I not enter the rotation angle I want?

Because rotation around the second geometry axis is limited to −90° … +90°. That is a mathematical consequence of RPY notation, not a fault.

Is a work offset taken with a measuring cycle also a frame?

Yes. Measuring cycles write their result into system frames, and those are part of the $P_ACTFRAME chain. A frame calculated from three points with MEAFRAME enters the same chain.

Mentor CNC note: Frames change the coordinate system, which means the same program code produces motion in a different place and in a different direction. When trying a new frame for the first time, run it with the workpiece removed, in single block and at a reduced feed override, and verify the direction of motion visually. Simulation is mandatory for programs that use mirroring or scaling. The command behaviour, value ranges and machine data on this page are based on the Siemens sources listed below; they can differ with the control version, the machine manufacturer’s configuration and the machine kinematics. The machine manufacturer’s documentation always takes precedence. This page is for training purposes and does not replace the official manuals.

Sources

  • Siemens AG — SINUMERIK Advanced CNC Operation & Programming (Turkish edition), 05/2010: Section 3.2 What are frames? (coordinate systems, frame types, use of frames, machining on an inclined plane, table of programming components), Section 3.3 Swivelling — CYCLE800 (automatic swivelling of the preset zero offset)
  • Siemens AG — SINUMERIK 840D sl / 828D Job Planning, Programming Manual, 01/2015, document no. 6FC5398-2BP40-5BA2: Chapter 6 Coordinate transformations (frames) — 6.1 coordinate transformation via frame variables, 6.1.1 $P_CHBFRAME / $P_IFRAME / $P_PFRAME / $P_ACTFRAME, 6.2 value assignments to frames (CTRANS, CROT, CSCALE, CMIRROR, chaining, TR/FI/RT/SC/MI, DEF FRAME), 6.3 coarse and fine offsets (CTRANS, CFINE), 6.4 external zero offset ($AA_ETRANS), 6.5 PRESETON, 6.6 PRESETONS, 6.7 MEAFRAME, 6.8 NCU global frames; Chapter 20.1 Operations and 20.2 Operations: Availability for SINUMERIK 828D