Overview of the Sinumerik 840D ShopMill/ShopTurn Program Model
The Siemens SINUMERIK 840D sl/840D pl platform supports two fundamentally different programming workflows on the same CNC kernel: classic ISO-style G-code (sometimes called "standard programming") and the higher-level ShopMill (milling) or ShopTurn (turning) workstep programming environment. ShopMill and ShopTurn expose a graphically-driven, conversational programming interface to the operator, but they do not run the program in that form. Internally, the workstep program is translated into a long block-form NC program that mixes standard G-code with proprietary internal markers. The marker ;*GP* is one of those internal markers.
Operators who load a ShopMill-generated program in the editor for the first time routinely see lines such as ;*GP*, ;*HD*, or ;*RO* and ask what they mean. They are not standard G/M/T functions, they are not documented in the standard Programming Manual, and they are not part of the ISO 6983 or DIN 66025 dialect that the 840D also supports. They are ShopMill/ShopTurn-internal syntax elements that should be left untouched. The remainder of this reference explains the marker, the surrounding ShopMill program structure, and the rules for handling these blocks in the field.
What the ;*GP* Marker Actually Is
The token ;*GP* is an internal placeholder emitted by the ShopMill or ShopTurn code generator. It is placed in the generated NC program to mark a specific structural point that the runtime expects to find in the block sequence. Field experience with the 840D sl and 840D pl control shows that these markers always appear:
- Prefixed by a semicolon, so that the line is treated as a comment by the NC interpreter.
- Wrapped in asterisks, with a two-letter code between the asterisks.
- On its own line, often immediately after a contour definition block, a tool change, or a workpiece reference definition.
Because the leading ; turns the line into a comment per the Sinumerik comment conventions, the interpreter ignores the textual content. The marker is therefore not "executed" in the conventional sense. Its purpose is structural: it delimits regions of the program that the ShopMill/ShopTurn runtime, the contour calculator, and certain cycles use to determine the current machining context. The marker survives the round trip from the conversational editor through the post-processor and back into the editor view, which is why operators see it when they reopen a program that was originally authored in ShopMill or ShopTurn.
The two letters between the asterisks are not arbitrary. Siemens uses a small set of fixed mnemonics, of which the most frequently encountered are GP, HD, and RO. The exact semantic meaning of each mnemonic is part of the internal ShopMill/ShopTurn syntax and is not published in the open Programming Manual. Service engineers and integrators identify the markers empirically, by their position in the block sequence, and treat them as opaque tokens.
Comment Syntax in Sinumerik NC Code
The semicolon prefix is the standard Sinumerik comment delimiter. A line beginning with ; (or a block in which ; is the first non-whitespace character) is treated as a comment and is not parsed for motion or modal commands. The 840D also supports parentheses for inline comments in some contexts, but for line-level structural markers ShopMill and ShopTurn use the semicolon exclusively.
The relevant rules from the SINUMERIK 840D sl Programming Manual (Basics) are summarized below.
| Syntax | Behavior | Notes |
|---|---|---|
; comment |
Full line is ignored by the interpreter | Used by ShopMill/ShopTurn for internal markers such as ;*GP*
|
... with trailing ; comment
|
Trailing text is ignored | Operator can append notes to a motion block |
(comment) |
Inline comment in some cycles and in SPF/MAC files | Less common in ShopMill output |
Because ;*GP* starts with ;, it cannot influence motion. Removing the line has no effect on the interpreter, but it does break the structural handshake expected by the ShopMill/ShopTurn runtime. This distinction is the entire reason the marker is written as a comment rather than as an executable call.
ShopMill and ShopTurn Program Generation Workflow
Understanding where ;*GP* comes from requires understanding the two-stage generation pipeline used by these workstep editors.
- The operator authors the program in the ShopMill or ShopTurn conversational interface, defining a blank, a workpiece reference, a contour, a tool list, and a sequence of machining steps (roughing, finishing, drilling, tapping, etc.).
- On save, the workstep program is serialized into the standard NC program file format (
.MPFfor the main program, plus optional.SPFsubroutine files). - When the program is opened or simulated, the ShopMill/ShopTurn runtime reads the file, parses the structural markers, and rebuilds the workstep tree for display.
The internal markers are emitted during step 2. They include:
-
;*GP*markers that delimit contour groups or geometric placeholders -
;*HD*markers that are typically associated with header or contour-handling regions -
;*RO*markers associated with roughing or rotational references, depending on context
The two-letter mnemonics correspond to internal labels used by the code generator. They are not part of the public Siemens NC language and they are not covered by the standard Programming Manual or the Cycles Manual. The only reliable documentation available to a field engineer is the behavior of the markers as observed in working programs.
Related Internal Markers in ShopMill/ShopTurn Output
The three markers most commonly seen together in a ShopMill or ShopTurn program are listed in the table below. This list is based on field experience with 840D sl controls running ShopMill 6.x/7.x and ShopTurn 6.x/7.x; the exact set may vary slightly by software version and option bit.
| Marker | Observed position | Operator-visible effect | Edit recommendation |
|---|---|---|---|
;*GP* |
Adjacent to contour definitions and geometry placeholders | None on motion; affects ShopMill/ShopTurn tree display | Do not delete |
;*HD* |
At the start of a contour handling region or header block | None on motion; structural only | Do not delete |
;*RO* |
Within roughing sequences or rotational references | None on motion; structural only | Do not delete |
Additional markers do exist and may appear in programs that use specific cycles, multi-channel synchronization, or ShopMill option packages. The same rule applies to all of them: they are emitted by the code generator and the workstep editor expects to find them when the file is reopened. Manual deletion of any of these lines typically does not affect execution, but it does corrupt the round-trip behavior of the workstep editor and can cause ShopMill/ShopTurn to flag the program as modified or to lose contour metadata.
Contour Programming and Where the Markers Cluster
The GP marker in particular tends to appear in the vicinity of the contour definition blocks. A ShopMill milling program typically contains one or more contour sections, each introduced by a label and a sequence of geometric statements. The skeleton of a typical contour section is shown below, with the internal marker line preserved.
;CONTOUR / 001
;*GP*
G1 X0 Y0
G1 X50 Y0
G1 X50 Y50
G1 X0 Y50
G1 X0 Y0
;*HD*
;END CONTOUR / 001
The exact line numbers, mnemonics, and surrounding comments depend on the ShopMill/ShopTurn build. In ShopTurn programs the analogous structure is a contour definition for the turned profile, with GP markers appearing at points where the contour calculator expects to subdivide geometry for stock removal calculations.
Two operational points follow from this structure:
- The contour calculator reads the contour as a stream of
G1/G2/G3motion statements plus the structural markers. The markers are not used by the calculator itself; they are used by the editor to re-create the workstep display. - If the program is loaded in a third-party CAM post-processor, the markers are simply comments and are ignored. If it is then re-loaded into the ShopMill/ShopTurn editor on the control, the absence of the markers will be reported as a non-fatal warning, and the contour may still execute correctly but will no longer round-trip cleanly into the workstep tree.
Why You Should Not Manually Edit ;*GP* or Related Markers
Editing the line itself (changing the letters between the asterisks) does nothing to the motion of the program. Deleting the line is also harmless to the motion of the program. The harm is to the workstep editor, the simulation, and the documentation chain. Specifically:
- Round-trip integrity. ShopMill/ShopTurn checks for the presence of expected structural markers when a file is reloaded. If the markers are missing or corrupted, the editor may refuse to open the file in workstep view, or it may open the file but show a reduced workstep tree without the contour graphics.
- Simulation accuracy. The 3D simulation view in the workstep editor uses the structural markers to align tool paths, stock representations, and contour graphics. Removing them does not change the path, but the simulation may no longer show the contour overlay correctly.
- Versioning and archiving. Programs that are stored in a network archive, a tooling database, or a DNC system are often identified partly by their internal structure. A program that has had its markers stripped may be flagged as "imported" or "non-native" by downstream tools.
- Service diagnostics. When Siemens support is contacted about a ShopMill or ShopTurn program, one of the first checks is the presence and order of these internal markers. A program that has been edited at the line level is harder to diagnose.
;*GP*, ;*HD*, and ;*RO* lines untouched, even if they look out of place.Identifying Internal Markers in Existing Programs
On the 840D sl HMI, a ShopMill- or ShopTurn-generated program can usually be distinguished from a hand-written G-code program by the following structural cues:
- Program header lines that begin with
; ShopMillor; ShopTurnand a version string. - Contour definition blocks wrapped in
;CONTOUR / ...and;END CONTOUR / ...comments. - Internal markers of the form
;Xwhere X is a two- or three-letter code, includingGP,HD, andRO. - Use of cycle calls such as
CYCLE83,CYCLE84,CYCLE95,CYCLE97, and the ShopMill-specific contour cycles. - Workpiece reference lines such as
G54...G59followed by a long comment block describing the blank geometry.
Field engineers who work with both 840D sl and 840D pl controls should be aware that the same ShopMill/ShopTurn workstep engine runs on both, so the marker set is essentially identical across the two hardware variants.
Sinutrain and Offline Programming Considerations
SinuTrain is the Siemens offline programming environment that emulates the 840D sl HMI on a standard PC. When a ShopMill or ShopTurn program is opened in SinuTrain, the same ;X markers are visible in the editor view, and the same round-trip rules apply. SinuTrain is in fact the recommended way to inspect a ShopMill/ShopTurn program in detail, because the editor exposes the marker lines in a way that the on-machine editor tends to collapse into a generic "comments" view.
One of the most common paths to discovering a ;GP line for the first time is via SinuTrain: a user opens a sample program on the SinuTrain installation CD, scrolls through the source, and encounters a line that does not appear in the standard programming manual. The first response is usually to assume the line is a typo or a leftover; the correct response is to recognize it as a structural marker and leave it alone. The SINUMERIK 840D/840Di/810D/FM-NC Cycles documentation, available from Siemens Industry Online Support, describes the cycles that ShopMill/ShopTurn wrap around, and is the closest official reference for the broader program model. See the SINUMERIK 840D/840Di/810D/FM-NC Cycles PDF for the canonical cycle reference.
Comparison: ShopMill/ShopTurn vs. Standard G-Code Programming on the 840D
The presence or absence of ;GP-style markers is one of the cleanest ways to tell the two programming models apart on the same control.
| Attribute | ShopMill / ShopTurn | Standard G-code (DIN 66025 / ISO 6983 dialect) |
|---|---|---|
| Authoring interface | Conversational workstep editor | Plain text NC editor |
| Program format | Workstep tree compiled to NC with internal markers | Plain NC blocks |
Internal markers (GP, HD, RO) |
Present | Not present |
| Cycle calls |
CYCLE83, CYCLE95, contour cycles, etc. |
Optional; programmer-written or macro |
| Comment syntax |
; comment (mandatory for markers) |
; comment or (comment)
|
| Round-trip to workstep editor | Requires markers to be intact | Not applicable |
| Third-party CAM post-processor compatibility | Loose; markers are ignored | Tight; strict dialect expectations |
Field Notes and Practical Diagnostics
Over many years of working on 840D sl installations, a small set of field rules has proven reliable when dealing with ;GP and its siblings:
- If the NC interpreter runs the program without alarm but the ShopMill/ShopTurn editor refuses to open it in workstep view, the first thing to check is whether the marker lines are still present in the file. A binary diff against a known-good backup is the fastest way to confirm.
- If a program was round-tripped through a third-party text editor and the markers are present but the order has been scrambled, the workstep editor will still open the file but may show steps in the wrong order. Restoring the original block order is the fix.
- If a program was post-processed by a CAM system that does not emit the markers, the program will execute correctly but will not be editable in the workstep editor. This is by design; the workstep editor is not the right tool for CAM output.
- If a
;GPline appears in a program that is otherwise plain G-code (no ShopMill header, no contour comments, no cycle calls), the file is most likely a ShopMill/ShopTurn program whose header has been stripped. Treat the file as a ShopMill/ShopTurn artifact and preserve the markers. - If the markers are needed for a documentation or comparison tool, copy the file with the markers intact and use a diff tool that ignores comment lines for motion comparison.
Troubleshooting Matrix
| Symptom | Likely cause | Check | Fix |
|---|---|---|---|
| Workstep editor reports "program cannot be displayed" | Markers stripped or reordered | Compare file to last good backup | Restore markers in original order |
| 3D simulation shows no contour overlay | Markers corrupted in contour region | Inspect ;CONTOUR block structure |
Recreate contour via workstep editor |
| NC runs but ShopMill tree is empty | File imported from CAM without markers | Check for GP/HD/RO markers |
Re-author contour in workstep editor, or accept plain G-code |
| Operator wants to add a comment to a marker line | Confusion with comment syntax | Recognize that the line is already a comment | Add a separate ; ... line nearby, do not modify the marker |
| Program triggers alarm 027020 "block not interpretable" | Marker line not the cause; check the surrounding motion block | Read the line referenced in the alarm | Fix the motion block, leave the marker untouched |
Summary
The token ;GP on a SINUMERIK 840D sl/840D pl is an internal structural marker emitted by the ShopMill and ShopTurn code generator. It is rendered as a comment so that the NC interpreter ignores it, and it exists so that the workstep editor can round-trip the program back into a graphical tree. The same rule applies to the related markers ;HD and ;RO. The marker set is part of the internal ShopMill/ShopTurn syntax and is not documented in the open programming manuals; the closest official reference is the cycles documentation on Siemens Industry Online Support, linked above. The correct field practice is to leave the markers in place, make any edits through the workstep editor wherever possible, and consult a known-good backup if the markers have been disturbed.
FAQ
What does ;GP mean in a Sinumerik 840D program?
;GP is an internal structural marker emitted by the ShopMill or ShopTurn code generator. The leading semicolon makes it a comment, so the NC interpreter ignores the line. Its purpose is to let the workstep editor round-trip the program back into a graphical tree, not to control motion.
Is ;GP documented in the Siemens programming manual?
No. The marker is part of the internal ShopMill/ShopTurn syntax and is not described in the standard SINUMERIK 840D sl Programming Manual or the operator documentation. The closest official reference is the SINUMERIK 840D/840Di/810D/FM-NC Cycles PDF on Siemens Industry Online Support, which covers the surrounding cycle structure.
What happens if I delete the ;GP line from a program?
The NC interpreter will run the program unchanged, because the line is a comment. The ShopMill/ShopTurn workstep editor, however, may refuse to open the file in workstep view or may open it with a degraded tree. Always leave the marker in place and edit the program through the workstep editor when possible.
Are ;HD and ;RO the same kind of marker?
Yes. They are siblings of ;GP in the same internal ShopMill/ShopTurn marker set. They are all rendered as comments and they all exist to support round-trip behavior in the workstep editor. They are typically associated with different regions of the generated program, and the same "do not edit" rule applies to all of them.
Where can I see a ;GP line for the first time on a PC?
Open one of the sample ShopMill or ShopTurn programs shipped with the SinuTrain installation media in the SinuTrain editor. The sample programs are the easiest place to see the marker lines in context, and they let you inspect the block structure without putting a real machine into a non-native state.