Resolving SIMOTION G-Code LGCode Library Compilation Errors

David Krause10 min read
Motion ControlSiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Resolving SIMOTION G-Code LGCode Library Compilation Errors

When integrating the SIMOTION G-Code Interpreter (LGCode technology package) into a SIMOTION SCOUT project, engineers frequently encounter a cascade of compilation failures that originate in protected library sources such as dProtected, fAuxFct, fTangential, fInterpolator, fParser, fMathAndBoolParser, and fInterpreter. These errors terminate with the generic status code 0xbe03ffff ("Unspecified error") and prevent the controller from accepting the program download. This reference documents the root causes, the diagnostic workflow, and the remediation steps required to bring the G-Code technology package into a compilable state on a SIMOTION V4.x or V5.x controller.

1. SIMOTION G-Code Interpreter Overview

The SIMOTION G-Code Interpreter is a standard Siemens technology package that enables G-code (DIN 66025 / ISO 6983) programming of kinematic systems controlled by SIMOTION. The interpreter accepts standard G/M/T commands and translates them into SIMOTION motion commands through the LGCode library. According to the official Siemens application description, the package provides function blocks for parsing, interpolation, tangential control, auxiliary functions, and a protected runtime module that encapsulates the interpreter core.

The library is delivered as part of the SIMOTION G-Code technology package (order number 6FC5860-1YC...) and is installed through SCOUT's Technology Packages management. Once the package is installed, the sources appear in the LIBRARIES branch of the project navigator. The LGCode library contains the following key sources:

Source Name Role Protection State
dProtected Protected data container (axes, variables, configuration) Encrypted
fAuxFct Auxiliary function (M/S/T) dispatcher Compiled only
fTangential Tangential control / tool orientation FB Compiled only
fInterpolator Path interpolator and look-ahead Compiled only
fParser G-code line parser and tokenizer Compiled only
fMathAndBoolParser Mathematical and Boolean expression evaluator Compiled only
fInterpreter Top-level interpreter state machine Compiled only
Important: The dProtected source is delivered in encrypted form. Its source code is never visible inside SCOUT and is only available as a precompiled object. Attempting to open or modify it produces exactly the symptom pattern described in the source post.

2. Symptom Pattern of the Failure

The original error log demonstrates a characteristic cascade that begins with the protected source and propagates to every dependent source:

Error    LIBRARIES\LGCode\dProtected     Error occurred in source 'dProtected' while compiling: 7 error(s), 0 warning(s) detected
Info     LIBRARIES\LGCode                Source 'dProtected' could not be compiled.
Info     LIBRARIES\LGCode                Source 'fAuxFct' could not be compiled.
Info     LIBRARIES\LGCode                Source 'fTangential' could not be compiled.
Info     LIBRARIES\LGCode                Source 'fInterpolator' could not be compiled.
Info     LIBRARIES\LGCode                Source 'fParser' could not be compiled.
Info     LIBRARIES\LGCode                Source 'fMathAndBoolParser' could not be compiled.
Info     LIBRARIES\LGCode                Source 'fInterpreter' could not be compiled.
Error                                  Errors have occurred during create procedure.
Error                                  Error on: Compilation
Error                                  Unspecified error (ret = 0xbe03ffff)

The presence of seven reported errors in dProtected combined with the "could not be compiled" informational notes on every other LGCode source is the diagnostic fingerprint of a missing, unregistered, or version-mismatched technology package, not of a user-editable source defect. The terminal status 0xbe03ffff is the SCOUT compiler's catch-all code that is raised when the underlying builder returns a non-specific failure after a fatal sub-error has already been logged above it.

3. Root Cause Analysis

The cascade of failures is rarely caused by the user's project. The root causes, ordered by frequency observed in the field, are listed below.

3.1 Unregistered LGCode Technology Package

If the technology package is present in the SCOUT library directory but is not registered to the project, SCOUT cannot resolve the type definitions referenced by dProtected and the downstream sources. The result is a type-resolution error storm that surfaces as 7+ errors in dProtected.

3.2 Version Mismatch Between SCOUT and Technology Package

SIMOTION SCOUT is version-coupled to technology packages. A V5.4 SP1 LGCode package will not load on a V5.3 SCOUT or vice versa. The version table below summarises supported pairings as of the SIMOTION V5.x maintenance window.

SCOUT Version LGCode TP Version Status
SCOUT V5.2 SP1 LGCode V5.2.x Supported
SCOUT V5.3 LGCode V5.3.x Supported
SCOUT V5.4 / V5.4 SP1 LGCode V5.4.x Supported
SCOUT V5.5 / V5.6 LGCode V5.5.x / V5.6.x Supported
Mixed V5.3 / V5.4 — Not supported

3.3 License / Authorization Missing

Although the compiler can build the LGCode sources, the runtime needs a valid license key on the CFast card. A missing license does not normally break compilation but can mask type-definition resolution if SCOUT cannot introspect the package metadata. Verify the license through Online > Accessible Nodes > SIMOTION > Licensing.

3.4 Damaged or Partial Installation

Anti-virus quarantine, interrupted Setup, or copying the library folders manually instead of running the SCOUT setup frequently leaves the dProtected object in an inconsistent state. SCOUT then fails to bind symbols and emits the cascade.

3.5 Inadvertent Edit Attempt on a Protected Source

If a user double-clicks a compiled-only source such as fInterpreter SCOUT may present the source in read-only mode, but dragging the source out of the library or attempting Source > Compile on it directly with an unsaved stub still produces the same error pattern.

4. Diagnostic Workflow

Follow this ordered procedure to localise the failure before applying any corrective action.

  1. Open SCOUT and load the affected project.
  2. Select Project > Right-click > Properties > Technology Packages. Verify that an LGCode entry is listed and that its version matches the SCOUT version (see table above).
  3. Expand the Project Navigator > LIBRARIES > LGCode tree. Confirm that dProtected, fAuxFct, fTangential, fInterpolator, fParser, fMathAndBoolParser, and fInterpreter are all present and that no source shows a red exclamation mark icon.
  4. Enable detailed compiler logging: Options > Settings > Compiler > Show detailed compiler errors. This is the same setting referenced in the discussion and is the single most effective step to obtain meaningful diagnostics.
  5. Select only the dProtected source in the navigator and run Source > Compile (not Compile All). SCOUT now lists every individual sub-error with file name and line number.
  6. Cross-reference each sub-error with the technology package version. Sub-errors of the form "type 'xyz' unknown" or "import 'abc' not found" point to missing technology packages; sub-errors of the form "declaration of '...' is not compatible with import '...'" point to a version mismatch.
  7. Capture the full .log from Project > Logs > Compile.log for Siemens support if the diagnosis is not yet conclusive.

5. Step-by-Step Remediation

Once the root cause is known, apply the matching procedure.

5.1 Re-Register the Technology Package

  1. Close SCOUT completely.
  2. Navigate to Control Panel > Programs and Features and confirm the LGCode technology package is installed. If absent, mount the SCOUT installation medium and select SIMOTION SCOUT > Modify > Technology Packages > LGCode.
  3. Re-launch SCOUT, open the project, and select Project > Right-click > Technology Packages > Register. Pick the LGCode package that matches the SCOUT version.
  4. Re-run Project > Compile and download.

5.2 Reinstall the LGCode Library from SCOUT Setup

  1. Close SCOUT.
  2. Run the SCOUT setup (setup.exe) and choose Repair for the LGCode technology package.
  3. Delete the local library cache: %USERPROFILE%\AppData\Roaming\Siemens\Automation\SCOUT\~LIBRAR~\LGCode.
  4. Restart SCOUT and re-open the project; SCOUT will re-extract the library from the package.
  5. Compile the project.

5.3 Align SCOUT and Technology Package Versions

  1. In SCOUT, open Help > About and note the exact SCOUT build number (e.g. V5.4.0.10).
  2. Open the LGCode readme.htm from C:\Program Files\Siemens\Automation\SCOUT\TechnologyPackages\LGCode and identify the supported SCOUT build range.
  3. If versions do not match, request the matching package from the Siemens Industry Online Support portal at https://support.industry.siemens.com under entry ID 84980638 - Handling with SIMOTION.
  4. Install the matching package and re-compile.

5.4 Remove a Stale Stub on dProtected

  1. Select dProtected in the navigator.
  2. Press Delete and choose Remove from project only. Do not choose Delete from disk.
  3. Right-click the LGCode library node and select Restore default sources. SCOUT re-imports the pristine, encrypted dProtected from the installed package.
  4. Re-compile.

5.5 Enable Detailed Compiler Errors (Sustained Practice)

Independent of the corrective action, leave the Show detailed compiler errors option active for the duration of any future G-code project. The flag is found at:

Options > Settings > Compiler > [x] Show detailed compiler errors

With this option active the compiler prints the underlying sub-errors (symbol resolution, type-binding, or version mismatches) that would otherwise be summarised by the generic 0xbe03ffff status.

6. Verification

After each corrective step, verify the fix with the following checks.

  1. Compile > Compile All completes with status 0 errors, 0 warnings. The compile log no longer contains the dProtected sub-error block.
  2. Open Online > Accessible Nodes, establish a connection to the target SIMOTION device, and confirm the Technology Packages view shows the LGCode package as loaded.
  3. Create a small test G-code program with a single linear move, for example:
G90 G54 G01 X100.0 Y0.0 F1000
M30

Save, compile, and download. The runtime should report "Program status: active" and the actual position should track the commanded X100.0 coordinate within the configured position tolerance.

  1. Check Diagnostics > System logbook on the controller for any residual warnings related to LGCode. A clean logbook confirms the technology package has loaded its runtime stubs successfully.

7. Error Code Reference

Code Layer Meaning Typical Cause
0xbe03ffff SCOUT compiler driver Unspecified compiler failure (catch-all) Sub-compiler reported fatal error already logged above; SCOUT returns generic status to caller
7 error(s), 0 warning(s) in dProtected Library compiler Type or symbol resolution failed inside the protected source Missing or version-mismatched technology package, or corrupted encrypted object
"Source 'xxx' could not be compiled" Library compiler Dependent source skipped One of its imported units failed; resolve the upstream error first

8. Preventive Measures

  • Install technology packages exclusively through the SCOUT setup wizard; do not copy folder structures manually.
  • Maintain a single SCOUT version across the engineering team and pin the matching LGCode TP version in the project documentation.
  • Activate Show detailed compiler errors on every SCOUT installation used for G-code projects.
  • Exclude SCOUT library directories from anti-virus real-time scanning to prevent the encryption layer of dProtected from being altered.
  • Archive the Compile.log together with the project archive; the log is the primary input for Siemens support when escalating the issue.

9. Escalation Path

If the cascade persists after applying the procedures above, escalate through the official Siemens channel:

  1. Open a support request on the Siemens Industry Online Support portal at https://support.industry.siemens.com referencing entry 84980638 - Handling with SIMOTION.
  2. Attach the Compile.log, the SCOUT About information, the LGCode TP version, and the SIMOTION controller firmware version.
  3. Provide the device order number (6AU1xxx or 6FC5xxx) and the version of the CFast card. Siemens support will issue a hotfix package or a corrected setup if a known defect matches the symptom pattern.

10. Related Standards and References

Background context for engineers new to G-code on SIMOTION is provided by the following official resources. The G-code dialect implemented by the LGCode interpreter follows the conventions described in DIN 66025 / ISO 6983 G-code (Wikipedia overview). For virtual validation of the G-code program before deploying it to the controller, a third-party G-code simulator such as RoboDK G-Code Simulators can be used to visualise the path, although final acceptance must always be performed on the actual SIMOTION runtime.

FAQ

Why does the LGCode library report 7 errors in dProtected and then fail to compile fInterpreter, fParser, and the other sources?

The errors originate in the protected source dProtected, which exports the type definitions used by every other LGCode source. When dProtected cannot be compiled SCOUT cannot resolve those type imports in fAuxFct, fTangential, fInterpolator, fParser, fMathAndBoolParser, and fInterpreter, so all of them are reported as "could not be compiled". Fix the upstream dProtected error and the downstream sources compile normally.

What does the compiler return code 0xbe03ffff mean in the SIMOTION G-Code context?

0xbe03ffff is SCOUT's catch-all "Unspecified error" status returned by the build driver after a fatal sub-error has already been logged. It is not a stand-alone diagnostic. Activate Options > Settings > Compiler > Show detailed compiler errors to expose the underlying type-resolution or version-mismatch message that triggered it.

Can I open the dProtected source to see what is failing inside?

No. The dProtected source is delivered encrypted and is never visible inside SCOUT. Do not attempt to edit, export, or re-import it. If the compiler reports errors inside dProtected, the root cause is almost always a missing or version-mismatched technology package, not a defect in the source itself.

How do I match the LGCode technology package version to my SCOUT installation?

Open Help > About in SCOUT to record the exact build number (for example V5.4 SP1). Then open the readme.htm shipped with each LGCode package under C:\Program Files\Siemens\Automation\SCOUT\TechnologyPackages\LGCode and install the package whose supported SCOUT build range contains your version. Mismatched versions are a primary cause of the cascade.

Where do I find the official Siemens documentation for the SIMOTION G-Code Interpreter?

The canonical Siemens application description is published as Industry Online Support entry 84980638 - Handling with SIMOTION. Use the Siemens Industry Online Support portal at https://support.industry.siemens.com to download the matching technology package and any SCOUT hotfixes.

Back to blog