Overview: CYCLE800 Swivel Persistence Across NC Reset
CYCLE800 is the Siemens swivel cycle for 5-axis and turn-mill machines. On a SINUMERIK 840D sl it computes and applies a frame rotation that aligns the tool plane to a tilted surface or to a swiveling milling head, writes the result into a settable frame (G54–G599), and selects the matching active plane (G17 / G18 / G19). The cycle is documented in the SINUMERIK 840D sl Programming Manual Cycles (PGZ) and is shipped as a Siemens standard cycle that machine builders (including DMG MORI on the CTX Gamma 2000 TC) overwrite or extend with their own compile cycle.
By design, most machine builders configure the NCK to retain the active swivel after NC reset and after M30. The intent is production-friendly: an operator who is re-running the same program does not have to re-enter the swivel data record before each run. The active data record remains visible on the work-offset page together with the active plane and the rotation angle, and the operator can re-select it from the HMI at any time. The retention behavior is documented in the PGZ manual under the "CYCLE800 startup" section, which states that the existing swivel data record is kept and can be re-selected (toggled).
The side effect is the symptom most teams hit in production: a new program calls CYCLE800 with a different data record, the controller sees an active swivel and refuses to overwrite it cleanly, and the operator is left with a "swivel data record already active" alarm and a work-offset page that still shows the previous plane. This reference covers the engineer-facing answer: detect the active swivel at NC startup by inspecting frame system variables, then clear the residual programmatically before the next CYCLE800 runs.
Three mechanisms are described, in order of safety:
- Detect the active swivel in NC code by reading
$P_UIFRand$P_CHBFRrotation components. - Programmatically clear the swivel by direct frame write, by ROT/AROT plus G500, or by a follow-up CYCLE800 deselect call.
- Wire the detect-plus-clear sequence into
PROG_EVENT.SPFso it fires automatically at every NC start.
$P_UIFR). The 840D sl parser is case-insensitive, but the Siemens manuals and the on-screen syntax checks in SINUMERIK Operate use upper case. OEM screens on a CTX Gamma 2000 TC may display them in lower case; the names are identical.CYCLE800 Cycle Mechanics on 840D sl
CYCLE800 is a compile cycle that lives in one of three NCK cycle directories. The search order at cycle call is fixed and is the same one the Siemens documentation uses for CYCLE800, CYCLE81, CYCLE832 and the rest of the cycle library.
| Directory | Owner | Use |
|---|---|---|
/coi/cst/cycles/ (or /nck/_N_CST_DIR) |
Siemens standard cycles | Stock CYCLE800 as shipped |
/coi/coa/cycles/ (or /nck/_N_CMA_DIR) |
Machine builder (OEM) cycles | DMG MORI's modified CYCLE800 on CTX Gamma TC |
/coi/cus/cycles/ (or /nck/_N_CUS_DIR) |
End user cycles | Shop-specific extensions |
The call form for the standard Siemens cycle is documented in the PGZ manual and is typically invoked as:
CYCLE800(_FR, _TC, _ST, _MODE, _NAME, _DMODE)
with the parameter meanings summarized below. The exact parameter set depends on the release of the cycle shipped with the firmware; always confirm against the active cycle on the machine by opening the cycle in the editor and matching the DEF line.
| Parameter | Meaning | Typical values on CTX Gamma 2000 TC |
|---|---|---|
_FR |
Settable frame number to write the swivel into | 1–30 (G54–G599 expanded range) |
_TC |
Tool carrier index (kinematic chain) | 1–n per machine configuration |
_ST |
Swivel type / strategy | 0 = axis-by-axis, 1 = solid angle, 2 = projection angle |
_MODE |
Call mode | 0 = new (overwrite), 1 = additive, 2 = change |
_NAME |
Swivel data record name (string) | e.g. "B_AXIS_TC", "TABLE_TC" |
_DMODE |
Display mode | 0 = hide, 1 = show in active work offset |
When the cycle finishes, the work-offset frame referenced by _FR contains the translation and rotation of the swiveled coordinate system, the plane is set to G17, G18, or G19 according to the new tool axis, and the active data record is remembered in the NCK. The operator can re-select it from the HMI work-offset page. The PGZ manual calls out this retention explicitly: the existing swivel data record is kept and can be toggled from the operator screen.
On reset, the NCK does not zero that frame. Reset and M30 are treated by the OEM as "I want to re-run the same setup", and the data is preserved. The PGZ manual documents the data-record behavior in the CYCLE800 startup section; the retention is configured by the machine builder at commissioning, not by an operator-accessible switch.
Frame System Variables for Swivel Detection
The 840D sl frame chain is documented in the Siemens Industry Online Support portal under the SINUMERIK 840D sl Programming Manual Basics (PGA) and in the SINUMERIK 840D sl Lists (Book 2) reference. The variables that matter for detecting an active CYCLE800 are:
| Variable | Type | Meaning | Where CYCLE800 writes |
|---|---|---|---|
$P_UIFR[n] |
Frame, settable | Settable frame n (G54–G599 range) | Primary write target, controlled by _FR
|
$P_IFRAME |
INT | Index of the currently active settable frame | Read this to know which UIFR slot to inspect |
$P_CHBFR[n] |
Frame, chain basic | Chain basic frame n (concatenated with UIFR) | Some OEM cycles write through the chain |
$P_NCBFR[n] |
Frame, NCK basic | NCK base frame | Rarely used by CYCLE800 directly |
$P_WPFR[n] |
Frame, workpiece | Workpiece-related frame (Siemens-specific) | OEM extensions may write here for traceability |
$P_PFRAME |
Frame | Currently active programmable frame | Holds ROT/AROT/TRANS results |
$P_CYCFR |
Frame | Cycle frame used by Siemens cycles | Used by CYCLE800 internally for its math |
$AC_PLANE |
INT | Active plane (17, 18, 19) | Reflects current G17 / G18 / G19 |
$P_UIFRNUM |
INT | Number of available UIFR slots | Use this to know the upper bound of n |
For a CTX Gamma 2000 TC the OEM cycle typically writes the rotation into the UIFR referenced by _FR, but it may also chain a small rotation into $P_CHBFR[$P_IFRAME] when the machine builder wants the operator's G54–G59 view to stay clean. Always inspect both.
Frame components are accessed with two indices: AX selects the axis and MI selects the component kind. The full table from the PGA / PGZ manuals is repeated here because off-by-one errors on MI are a common source of false negatives.
| Index | Value | Component |
|---|---|---|
| AX | 1 | X axis (linear mm, rotation deg) |
| 2 | Y axis | |
| 3 | Z axis | |
| MI | 0 | Setable translation (base offset) |
| 1 | Programmed translation | |
| 2 | Fine / accuracy component | |
| 3 | Measurement-system deviation | |
| 4 | Rotation (deg) | |
| 5 | Scaling (factor) | |
| 6 | Mirror flag (1 = mirrored, 0 = not) |
To check whether the active UIFR carries a swivel rotation, the relevant components are MI=4 on the three axes. The CTX Gamma 2000 TC B-axis swivel typically produces a non-zero value in $P_UIFR[$P_IFRAME, 1, 4] (X rotation in degrees) or, on machines with a table-mounted C-axis, in $P_UIFR[$P_IFRAME, 3, 4] (Z rotation).
Detecting an Active Swivel from NC Code
Use a small block of NC code at the top of the program (or in PROG_EVENT.SPF) to inspect the active frame and decide whether to clear. The example below reads the three rotation components of the active UIFR and of the active chain basic frame, then flags a swivel as active if any rotation magnitude exceeds a small tolerance.
; NC program - detect CYCLE800 swivel at startup
DEF REAL _RX_UIFR, _RY_UIFR, _RZ_UIFR
DEF REAL _RX_CHB, _RY_CHB, _RZ_CHB
DEF REAL _TOL = 0.0005
; Read rotations in degrees from active settable frame
_RX_UIFR = $P_UIFR[$P_IFRAME, 1, 4]
_RY_UIFR = $P_UIFR[$P_IFRAME, 2, 4]
_RZ_UIFR = $P_UIFR[$P_IFRAME, 3, 4]
; Read rotations in degrees from active chain basic frame
_RX_CHB = $P_CHBFR[$P_IFRAME, 1, 4]
_RY_CHB = $P_CHBFR[$P_IFRAME, 2, 4]
_RZ_CHB = $P_CHBFR[$P_IFRAME, 3, 4]
IF ABS(_RX_UIFR) > _TOL OR ABS(_RY_UIFR) > _TOL OR ABS(_RZ_UIFR) > _TOL \
OR ABS(_RX_CHB) > _TOL OR ABS(_RY_CHB) > _TOL OR ABS(_RZ_CHB) > _TOL
; Active CYCLE800 swivel detected in work-offset chain
MSG("Residual CYCLE800 swivel in frame " << $P_IFRAME << " - clearing")
; (clear block goes here, see next section)
ENDIF
The tolerance (_TOL = 0.0005 deg) is intentional. A clean G54–G59 frame has a true zero for the rotation components, but floating-point read-back can return sub-nanometer residue from previous AROT/ROT operations. 0.0005 deg is well below the smallest swivel increment the operator can enter on a CTX Gamma 2000 TC (the HMI shows angles in 0.001 deg steps) and will not trigger on floating-point noise.
Two refinements worth adding in production code:
- Read
$P_UIFRNUMfirst to learn the upper bound ofn, then loop over all settable frames, not just the active one. A previous program may have left a swivel in a non-active frame that becomes active on the next G55 / G56 select. - Use
IF $AC_PLANE <> 17 GOTOF _NO_SWIVELas a fast pre-check. CYCLE800 almost always leaves the plane different from G17 on a 5-axis machine; if you are still on G17 and the rotation values are zero, you can skip the more expensive checks. Do not rely on plane alone, because some B-axis swivels keep G17 active for a 90 deg B rotation around X.
Programmatic Reset of CYCLE800 Data
Three methods are usable in an NC program. Pick the one that matches what your OEM allows and what the channel MDs permit for direct frame writes.
Method A: Direct write to $P_UIFR and $P_CHBFR
The most surgical method. Issue ROT to clear the active programmable frame, then zero the rotation components of the active settable frame and the active chain basic frame. This is the recommended approach when the operator's G54–G59 base offsets must not be touched.
; Clear CYCLE800 swivel residue
ROT
AROT X0 Y0 Z0
IF $P_IFRAME > 0
$P_UIFR[$P_IFRAME, 1, 4] = 0
$P_UIFR[$P_IFRAME, 2, 4] = 0
$P_UIFR[$P_IFRAME, 3, 4] = 0
$P_CHBFR[$P_IFRAME, 1, 4] = 0
$P_CHBFR[$P_IFRAME, 2, 4] = 0
$P_CHBFR[$P_IFRAME, 3, 4] = 0
ENDIF
$P_UIFR[n, ax, mi] requires that the target frame n is not write-protected. Frames configured as fine offset or as scratch frame in the channel MDs can reject direct writes. If the controller raises a frame-protection alarm, switch to Method B.Method B: SETFR / G500 plus Programmable Frame Clear
SETFR(n, m) selects settable frame m in the G-group of frames 1–30. The cleanest way to drop a residual swivel without touching the operator's base offsets is to deselect the settable frame entirely with G500 and clear the programmable overlay with ROT.
; Anchor on a known-clean deselected state
G500
ROT
AROT X0 Y0 Z0
With G500 active, $P_IFRAME reads 0 and the settable frame component is bypassed, so any residual rotation in G54 no longer affects the kinematics. The next CYCLE800 call writes into the frame it is configured for (via the _FR parameter) and the residual is overwritten. Method B is the safest when the channel MDs block direct frame writes.
Method C: Re-Call CYCLE800 with a Deselect Strategy
Per the PGZ manual, you can deselect the active swivel by calling CYCLE800 with a data record configured for deselect, or by calling the cycle with a parameter combination that puts the machine back to a known un-swiveled state. On a CTX Gamma 2000 TC the typical DMG MORI approach is to use the cycle's retract or unload sequence, which is usually wrapped behind a machine-specific M function (often in the M40–M45 series for head change).
; Example - confirm against your machine's OEM documentation
CYCLE800(0, 0, 0, 0, "DESELECT", 0)
; Or, on DMG MORI:
M75 ; DMG MORI swivel retract (example only)
The exact parameter set is OEM-specific and is best confirmed in the machine's documentation, because the DMG MORI cycle typically wraps a proprietary M function around the CYCLE800 call. The Siemens-side general call form is in the PGZ manual; the wrapper M functions and the data-record names are DMG MORI territory and live in the machine's service documentation.
Startup Program Integration with PROG_EVENT.SPF
The 840D sl supports a program event cycle that fires at program start, end, and (depending on firmware) reset. The mechanism is documented in the Programming Manual Basics (PGA). You create a cycle named PROG_EVENT.SPF in the right cycle directory and the controller calls it automatically with an event ID that distinguishes the trigger.
| Event ID | Trigger | Recommended use |
|---|---|---|
| 1 | Program start (NC start) | Place swivel-detect-and-clear logic here |
| 2 | Program end (M30) | Optional cleanup; not needed for the reset problem |
| 3 | Reset / power-on (firmware dependent) | Use only if your firmware fires the event at NC reset |
Cycle body for a CTX Gamma 2000 TC that needs to clear residual swivel at every NC start:
PROC PROG_EVENT(INT _EV_ID)
DEF INT _EV_ID
DEF REAL _RX, _RY, _RZ, _TOL = 0.0005
IF _EV_ID == 1
; ---- Program start: clear residual CYCLE800 swivel ----
IF $P_IFRAME > 0
_RX = $P_UIFR[$P_IFRAME, 1, 4]
_RY = $P_UIFR[$P_IFRAME, 2, 4]
_RZ = $P_UIFR[$P_IFRAME, 3, 4]
IF ABS(_RX) > _TOL OR ABS(_RY) > _TOL OR ABS(_RZ) > _TOL
; Reset settable frame rotation
$P_UIFR[$P_IFRAME, 1, 4] = 0
$P_UIFR[$P_IFRAME, 2, 4] = 0
$P_UIFR[$P_IFRAME, 3, 4] = 0
ENDIF
; Reset chain basic frame rotation
$P_CHBFR[$P_IFRAME, 1, 4] = 0
$P_CHBFR[$P_IFRAME, 2, 4] = 0
$P_CHBFR[$P_IFRAME, 3, 4] = 0
ENDIF
; Drop any programmable overlay and deselect the active frame
ROT
AROT X0 Y0 Z0
G500
MSG("PROG_EVENT: residual CYCLE800 swivel cleared")
ENDIF
IF _EV_ID == 2
; ---- Program end: park the swivel head (DMG MORI OEM call) ----
; Insert your machine's swivel retract sequence here if needed
ENDIF
M17
Notes on the cycle:
- The cycle must end with
M17, not M30. M30 is a program-end marker and would create a recursive call into the same event. - The cycle must be stored in
/coi/cus/cycles/(or in/coi/coa/cycles/if shop policy places it there). The 840D sl searches for PROG_EVENT.SPF in the configured cycle directories at NCK start. - Calling SETFR is not strictly necessary if the goal is "any subsequent CYCLE800 starts clean". The next CYCLE800 call overwrites the active frame's rotation by definition.
- The MSG line appears in the operator message bar of SINUMERIK Operate and is invaluable when debugging the first install. Remove it for production if the message line is needed for other alarms.
DMG MORI CTX Gamma 2000 TC Specifics
The CTX Gamma 2000 TC is a turn-mill machine with a milling head on a B-axis (swivel rotary axis) and a C-axis on the main spindle. The control is a SINUMERIK 840D sl with PCU 50 or PCU 50.5 running SINUMERIK Operate. The B-axis and C-axis are configured as the swivel axes for CYCLE800, and the machine builder's cycle wraps additional M functions around the basic CYCLE800 call for head change and retraction.
DMG MORI's CYCLE800 differs from the Siemens standard in three ways that matter for the reset problem:
-
OEM compile cycle. DMG MORI ships its own CYCLE800 in the OEM directory with extended screen masks and a wider set of data records. The parameter names and data-record strings that the Siemens PGZ manual documents may not match the names on your HMI. The general call signature
CYCLE800(_FR, _TC, _ST, _MODE, _NAME, _DMODE)is preserved, but the string literals are OEM-specific. - Machine-specific M functions. DMG MORI wraps head-retract and tool-change operations behind proprietary M codes in the M40–M45 range (and similar). The clear-then-recall approach from Method A is a common pre-condition for these M codes; if the active swivel is not cleared, the next M call for head retract can refuse to execute with an OEM alarm that points back to CYCLE800.
-
Frame-write protection. The default commissioning of a CTX Gamma 2000 TC marks G54 as the machining frame and G55–G59 as the work offsets. Some sites also configure a swivel base frame in
$P_NCBFR[1]. Direct writes to protected frames can be rejected, so Method A and Method B need to be tuned per the active configuration.
For the OEM-specific bit, the authoritative source is the DMG MORI service documentation set that ships with the machine. The Siemens-side general behavior is in the PGZ manual. The two are compatible at the system-variable level, but the data-record names and the additional frame slots live on the DMG MORI side of the boundary.
Frame Component Index Reference
The double-index access $P_UIFR[n, AX, MI] is a frequent source of off-by-one errors. The full table (consolidated from the PGA and PGZ manuals):
| n | Frame | AX | Axis | MI | Component | Units |
|---|---|---|---|---|---|---|
| 0..30 | Settable (UIFR) | 1 | X | 0 | Base translation | mm |
| 0..30 | Settable (UIFR) | 1 | X | 1 | Programmed translation | mm |
| 0..30 | Settable (UIFR) | 1 | X | 2 | Fine / accuracy | mm |
| 0..30 | Settable (UIFR) | 1 | X | 3 | Meas-system deviation | mm |
| 0..30 | Settable (UIFR) | 1 | X | 4 | Rotation | deg |
| 0..30 | Settable (UIFR) | 1 | X | 5 | Scaling | factor |
| 0..30 | Settable (UIFR) | 1 | X | 6 | Mirror (1/0) | flag |
| 0..30 | Settable (UIFR) | 2 | Y | 0..6 | Same as X | mm / deg / factor |
| 0..30 | Settable (UIFR) | 3 | Z | 0..6 | Same as X | mm / deg / factor |
Same [AX, MI] structure applies to $P_CHBFR[n, AX, MI], $P_NCBFR[n, AX, MI], $P_WPFR[n, AX, MI], and $P_CYCFR[AX, MI]. $P_PFRAME, $P_OTFRAME, and $P_SETFRAME are accessed with the same AX, MI scheme but without an n index.
Verification and Commissioning Steps
Use this sequence on a CTX Gamma 2000 TC (or equivalent 840D sl turn-mill) to confirm the reset logic works end to end.
- Power on the machine. Wait for NCK ready and SINUMERIK Operate to load.
- Switch to the work-offset page. Note that G54 is the default and rotation reads 0.000 deg.
- Select a swivel data record from the OEM HMI, e.g. B_AXIS_TC. Confirm the work offset page now shows G54 rotation = 90.000 deg (or whatever the data record specifies).
- Run a test program that contains
CYCLE800(1, 1, 0, 0, "B_AXIS_TC", 0). The head swivels, the plane changes, and the work offset shows the rotation. - Press NC reset. The program is deselected, the head does not move, and the work offset page still shows the rotation. This is the OEM retention behavior and is expected.
- Run the new PROG_EVENT.SPF by pressing NC start on a small wrapper program. Verify that the work offset page now shows rotation = 0.000 deg after the startup event fires, and that the message line shows the "PROG_EVENT: residual CYCLE800 swivel cleared" string.
- Run a fresh
CYCLE800(1, 1, 0, 0, "C_AXIS_TABLE", 0)with a different data record. The cycle should accept the call without raising the "swivel already active" alarm. - Cycle power on the machine. Verify PROG_EVENT.SPF fires on the next NC start and clears the residual as expected.
- Run the operator's normal daily program set for one shift. Watch the alarm log for any "swivel" or CYCLE800-related entries.
- Back up the modified PROG_EVENT.SPF, the directory listing of the cycle directory, and the current $P_UIFR / $P_CHBFR snapshot from the HMI diagnostics screen. These three artifacts are the rollback package.
If step 6 fails (rotation still shown), check in order: (a) the cycle is in the right directory and named exactly PROG_EVENT.SPF; (b) the event ID is what the firmware expects (some 840D sl builds use event 1 for "start" and event 3 for "reset"); (c) the active settable frame at the time PROG_EVENT runs is the same frame CYCLE800 writes to (G54 in the default config); (d) channel MDs are not blocking direct frame writes.
Troubleshooting Matrix
| Symptom | Likely cause | Action |
|---|---|---|
| "Swivel data record already active" alarm at second CYCLE800 | Residual swivel not cleared between programs | Add PROG_EVENT.SPF clear block; or call Method B (G500 + ROT) at the top of every program |
| Work offset page shows rotation after NC reset | OEM retention is configured to keep swivel data | Document for operators; reset via PROG_EVENT or startup block |
| Direct write to $P_UIFR rejected with frame-protection alarm | Frame is write-protected by channel MD | Use ROT / AROT in a programmable frame, or G500 to deselect (Method B) |
| PROG_EVENT does not fire | Cycle not in search path, wrong name, or wrong directory | Store as PROG_EVENT.SPF in /coi/cus/cycles; verify cycle visibility from the HMI editor |
| Reset clears rotation but CYCLE800 still reports conflict | Swivel stored in chain frame $P_CHBFR, not UIFR | Inspect and clear $P_CHBFR[$P_IFRAME, ax, 4] too |
| Different data-record name than Siemens manual shows | DMG MORI OEM cycle has its own naming | Read the names from the cycle screen on the HMI; refer to DMG MORI service docs |
| Rotation components all read 0 but the alarm persists | Stale $P_CYCFR from a prior cycle or stale cycle name flag | Force a CYCLE800 deselect call (Method C); or zero the relevant $P_CYCFR components |
| Operator wants the swivel to stay across resets | OEM design intent | Do not use PROG_EVENT; instead have a separate SwivelReset program the operator calls manually between part families |
| Alarm only on first NC start of the day | PLC or NCK did not reload frames after power on | Check frame persist file (/_N_MPF_DIR/_N_SIEMENS_DATA_INI or equivalent) and channel MD for frame persistence |
| Head retract M function refuses to execute after reset | DMG MORI OEM wrapper requires a clean frame before retract | Add the Method A clear block before the M code that triggers head retract |
| Tolerance trips on floating-point noise |
_TOL set too small |
Keep _TOL = 0.0005 deg or larger; do not go below 0.0001 deg |
| Swivel data record name contains special characters | OEM uses spaces or punctuation in the record name | Quote the name string in the CYCLE800 call: CYCLE800(1, 1, 0, 0, "B AXIS TC", 0)
|
Lifecycle State Diagram
Field-Proven Cautions
-
Tolerance is essential. 0.0005 deg below the HMI resolution avoids false positives from floating-point residue in the frame read-back. Going below 0.0001 deg trips the check on perfectly clean frames because the read-back of
0.0in floating point is rarely exact. -
Always inspect both UIFR and CHBFR. Some shops configure CYCLE800 to write to the chain frame in order to keep G54 clean for the operator. Reading only
$P_UIFRleaves the chain frame as a hidden trap, and the next CYCLE800 will still report a conflict. - PROG_EVENT.SPF must not contain M30. An M30 at the end of PROG_EVENT will recurse into a fresh program-end event and can stall the NCK on some firmware versions. Use M17 to return from the event cycle.
- Do not blanket-reset on every event when the shop relies on persistence. Some production programs intentionally start with a swivel that the operator set up on the previous shift. Clearing it loses that setup. If the shop relies on the operator's setup persistence, put the clear logic in a dedicated reset program the operator runs only between part families, not in PROG_EVENT.SPF.
-
$P_IFRAMEcan be 0 (G500). Writing$P_UIFR[0, ax, mi] = 0is harmless but does nothing useful; the G500 frame slot is a no-op. Guard the write withIF $P_IFRAME > 0if the active frame can be 0 at startup. - PLC-side reset signals. The PLC can also clear swivel data via DB accesses to the NCK (for example through the NC-Variable interface / NCVAR selector). That is a different path; this article covers the NC-side path only. Use the PLC path only when you need to clear from a non-NC state, such as a mode change or a controlled emergency stop.
-
Alarm text is the faster first check. The Siemens-side alarm number for a CYCLE800 conflict is 61284 in many configurations; DMG MORI raises its own OEM alarms with their own numbering. Read the alarm text on the HMI first; the text usually points at the CYCLE800 line in the program and at the data record that is already active, which tells you whether the residual lives in
$P_UIFRor in$P_CHBFR. -
Back up before you ship the cycle. Snapshot
/coi/cus/cycles/PROG_EVENT.SPF(or wherever you store it) to the engineering server and to the machine's archive directory. If a future commissioning change regenerates the cycle directory, the PROG_EVENT.SPF is the first thing to be lost and the last thing the maintenance team will remember.
FAQ
What is CYCLE800 on a SINUMERIK 840D sl?
CYCLE800 is the Siemens swivel cycle for 5-axis and turn-mill machines. It computes a frame rotation that aligns the tool plane to a tilted surface or to a swiveling head, writes the result into a settable frame, and sets the active G17 / G18 / G19 plane. The cycle is documented in the SINUMERIK 840D sl Programming Manual Cycles (PGZ).
Why does my machine keep the active swivel data record after NC reset?
Machine builders, including DMG MORI on the CTX Gamma 2000 TC, configure the NCK to retain CYCLE800 data across reset and M30 so that an operator can re-run the same program without re-entering the swivel. The setting is a machine-data group set at commissioning, not a parameter the operator toggles. To clear the swivel between programs, you must do it explicitly in NC code (PROG_EVENT.SPF) or in PLC code via the NC-Variable interface.
Which system variable stores the active swivel on 840D sl?
CYCLE800 writes its rotation into the settable frame referenced by the _FR parameter, normally $P_UIFR[$P_IFRAME]. Inspect the rotation components with $P_UIFR[n, 1..3, 4] (degrees, one per axis). Some OEM configurations also write through $P_CHBFR[n]; both should be inspected and cleared on machines configured that way.
How do I clear an active CYCLE800 swivel at NC program start?
Use PROG_EVENT.SPF with event ID 1. Read $P_UIFR[$P_IFRAME, ax, 4] and $P_CHBFR[$P_IFRAME, ax, 4] for all three axes, then either (a) write zeros to those components, (b) issue ROT to clear the programmable frame overlay, and (c) call G500 to deselect the active settable frame. The cycle must end with M17. The full example is in the Startup Program Integration section above.
What is the difference between $P_UIFR and $P_CHBFR for swivel data?
$P_UIFR[n] is the settable frame that the operator sees as G54–G599. $P_CHBFR[n] is the chain basic frame that is concatenated with the settable frame at the tool. CYCLE800 typically writes into the UIFR, but DMG MORI and other OEMs may route the rotation through a CHBFR to keep the operator's G54–G59 display clean. For a complete reset, both must be inspected and cleared.
Can the PLC clear the CYCLE800 swivel on 840D sl?
Yes, via the NC-Variable interface (NCVAR selector) by writing to the same $P_UIFR and $P_CHBFR indices. This path is more invasive than the NC-side approach and should be reserved for integration with the machine's PLC-managed reset sequence. For most cases, the NC-side PROG_EVENT.SPF method is safer because it stays inside the part-program context.
Which CTX Gamma 2000 TC alarm indicates an active swivel conflict?
Siemens-side, the alarm is 61284 in many configurations ("data record already active" raised by CYCLE800). DMG MORI may also raise an OEM-specific alarm with their own number range. Always check the active alarm log on the HMI first; the alarm text usually points at the CYCLE800 line in the program and at the data record that is already active.
Why does my PROG_EVENT.SPF not fire on 840D sl?
Three usual reasons: the cycle is not in the NCK search path (it must be in /coi/cus/cycles/ or another configured cycle directory), the cycle file name is not exactly PROG_EVENT.SPF (case sensitive on some firmware), or the event ID in the IF branch does not match what your firmware uses (most 840D sl builds use event 1 for program start). Open the cycle in the HMI editor and confirm it is listed in the active cycle directory.