IMDHMIControls LibraryShop main store

Explainer

Why CODESYS package libraries will not import into SoMachine

PLC programming Published 7 min read

Short answer

SoMachine and EcoStruxure Machine Expert ship without the package manager that installs CODESYS Store package downloads, so the import cannot be forced from inside the tool. The supported route is source-level reuse: copy the function block source, its data types and its dependencies into the Schneider project, compile on the target, and keep the controller on its documented Schneider tool.

On this page
  1. What a CODESYS package download is
  2. Why the import path is missing in SoMachine and Machine Expert
  3. The route that works: source-level reuse
  4. Where source reuse stops
  5. Worked example: porting one OSCAT block into a SoMachine 4.3 project for an M241
  6. Controller support is a separate decision
  7. The decision, case by case
  8. Questions asked

A CODESYS Store package download does not import into SoMachine or EcoStruxure Machine Expert, and no setting inside either tool changes that: Schneider's engineering environments are built on the CODESYS platform but ship without the package manager that installs those downloads. The supported route to the code you want is source-level reuse — carry the function block source, its data types and its dependencies into the Schneider project, compile on the target, and test the result before it runs a machine. Keep the controller itself programmed by the tool Schneider documents for it. This page explains what a package download contains, why the import path is absent, how a clean source port works, and where each route stops.

What a CODESYS package download is #

A .package file is a distribution container for the CODESYS V3.5 ecosystem, not a library file. The CODESYS Store hands out the latest CODESYS V3.5 versions, SoftPLC systems and add-ons in this format, and a single download can mix several kinds of content: source libraries, compiled libraries, device descriptions, editor extensions and example projects. Installing one is a tool-level operation — the package manager of a CODESYS-based IDE unpacks the container and registers its contents in that IDE's repositories — while referencing a library inside a project is a later operation that assumes the install already happened.

That distinction decides the whole question. If your download holds readable POUs, source-level reuse can carry them into any project built on the IEC 61131-3 languages. If it holds a compiled library or components bound to one development environment, the container is the only supported way in — and the container is exactly what the Schneider tools do not accept.

Why the import path is missing in SoMachine and Machine Expert #

SoMachine and EcoStruxure Machine Expert are customized builds of the CODESYS platform aimed at Schneider controllers — the M241, M251 and M262 are the usual targets — and their tool-level layer is trimmed to what Schneider documents. The package-install command of the standalone CODESYS IDE is not part of the Schneider menus, and the compiled-library import of vanilla CODESYS is not offered either, so a direct install attempt has nowhere to land. Treat the exact menu inventory as release-specific: check the help of your installed version before you plan around its functions.

The split shows up at the project level too. Schneider publishes a FAQ on whether a CODESYS .pro project file can be opened with SoMachine or EcoStruxure Machine Expert — entry FA347699 — and that entry exists precisely because the file formats do not interchange across the tools; its per-release answer is the authoritative one for your version. Installation packaging draws the same boundary: EcoStruxure Machine Expert installs through the Schneider Electric Software Installer, not through a CODESYS setup.

What the tools share is the engine underneath — the editors, the compilers and the IEC 61131-3 languages. Your logic stays readable ST, ladder or FBD and can be exported and carried. The engine is common; the distribution channels and tool-level functions are not.

The route that works: source-level reuse #

Source-level reuse rebuilds the block inside the Schneider project from readable code, so the compile happens on the tool that must support the target. The job has a fixed shape:

  1. List the dependency closure: the function block itself, every data type it names, every global variable list, every subordinate function and every library reference.
  2. Get source, not a container: open the publisher's source distribution or export the POUs from a project where they exist in readable form.
  3. Create matching objects in the Schneider project — same names, same interface — and carry the code over.
  4. Compile on the Schneider target. A download aimed at the newest CODESYS V3.5 may use language features an older Schneider release's compiler rejects; the compiler error names the construct, and your release's documentation states what it supports.
  5. Bench-test the rebuilt block before it drives real outputs. Reused library code is unvalidated for your machine: an example block carries no obligation toward your risk assessment, so prove it in your project first.

For the carry-over mechanics, migrating derived function blocks to Machine Expert shows the pattern end to end, and a PLC function block for gripper open and close control is a worked example of the interface discipline a portable block needs.

Where source reuse stops #

The route fails in three places, and each failure has the same response: stop and pick a different component.

  • Compiled-only code. If the block bottoms out in a compiled library, there is no source to carry, and renaming the container's extension changes nothing inside the file. Ask the publisher for a source distribution or use an equivalent from your tool's documented library set.
  • Missing dependencies. If the closure includes a runtime service your Schneider target does not document — specialized motion, CNC or similar add-on functions — the port stops there. Writing around one missing service is routine; rebuilding a subsystem is not.
  • Target-specific calls. Blocks that touch controller I/O, file access or communication functions need each call checked against your release's library inventory. The function families exist on both sides, but not under one guaranteed name list.

One boundary while you work: the trimmed tool layer is the vendor's product decision, not an obstacle course. No install-folder edits or file tricks to re-enable functions the build hides — the supported inputs are packages installed per their publisher's instructions in the tool that documents them.

Worked example: porting one OSCAT block into a SoMachine 4.3 project for an M241 #

Inputs, with their origin:

  • Engineering tool: SoMachine 4.3, the release installed for this project.
  • Target controller: an M241, the PLC the project downloads to.
  • Wanted code: one OSCAT function block. OSCAT publishes readable source, so its closures are carryable — this is the case the source route exists for.
  • The example closure: the block's body with its interface, 2 supporting data types (an enum for the block states and a struct for its parameters) and 1 global variable list of constants. These counts are the illustration's own inputs; your block's closure may be larger, and the same arithmetic applies to whatever it holds.

Rule in words: a SoMachine project compiles only when every object the block's code names exists in that project or in a library the project references, so the number of objects to carry over equals the dependency closure.

Arithmetic: 1 function block + 2 data types + 1 GVL = 4 objects.

Result: 4 objects to create in the project's POU tree, each filled with the corresponding source.

Decision and threshold: create the 4 objects, reference any remaining library by its documented name in your release, and compile once on the M241 target. The port is complete at zero compile errors on the Schneider target — not when the code is pasted. If the compiler reports a reference the closure cannot supply, such as a compiled-only library, the source route stops for that block: go back and choose a different component instead of improvising inside the tool.

Controller support is a separate decision #

Wanting the Store's library ecosystem is not, by itself, a reason to take a Schneider controller off Schneider's tool. Programming one of those controllers from the standalone CODESYS IDE requires the controller to be a supported target of that exact installation: device description, communication path, download, debug and runtime services. Without a manufacturer-documented combination, a project may build in the editor and still have no supported path to the machine.

Before evaluating anything, record the exact model and installed firmware from the controller's diagnostics, then check Schneider's documentation for the supported engineering combinations of your release. Until a pure-CODESYS path is documented for your hardware, commissioning stays in SoMachine or EcoStruxure Machine Expert. If the library ecosystem genuinely decides a new machine's controller choice, treat that as a controller-selection question and revalidate I/O, communications, tasks and machine behavior for whatever you pick.

The decision, case by case #

  • You downloaded a package from the CODESYS Store and want it on a Schneider controller: do not import — the tool has no package path. Check the download's contents; if source is inside, port it.
  • The code exists as readable source and compiles on your release: port it, compile to zero errors on the target, bench-test it, done.
  • The component is compiled-only or its closure bottoms out in a service your target does not document: stop. Use your tool's documented libraries or write the function yourself.
  • Pure CODESYS for the controller appeals: only with a documented supported target for that controller and firmware; otherwise no.
  • Renaming files or editing install folders tempts you: never — it yields an unsupported installation and solves nothing the source route does not solve better.

Questions asked

Will a future EcoStruxure Machine Expert release install CODESYS Store packages?

Plan around the behavior that exists: no package-install path, so Store code reaches a Schneider project as ported source. Each Machine Expert release notes file and help system tells you what that version imports, and those, not rumor, are the evidence to plan on. A menu that reappears only after an unofficial tweak proves nothing. Keep source-level reuse as the baseline workflow until a release documents package support.

Why does controller firmware matter for tool choice?

Target support is documented per controller and firmware pair, not per model alone. A controller sitting at an older firmware revision can fall outside the supported combinations of a newer engineering tool even though the model matches, so read the installed firmware from the controller diagnostics before you commit to a tool or a port. Schneider's compatibility tables and firmware notes are the source to check.

Is OSCAT code free to copy into a commercial machine project?

OSCAT distributes its blocks as readable source with license terms attached, and those terms, not habit, decide what commercial use allows. Read the terms that ship with the library you downloaded and keep whatever attribution they require. License compliance is separate from the technical port: code that compiles cleanly is not automatically code you may ship.

How do I tell what a package download contains before planning a port?

Read the publisher's component list for the download before touching the IDE. The list names the libraries, device descriptions, editor extensions and examples inside, and a container mixing source with compiled content is common, so only the source part ports. If the publisher publishes no component breakdown, treat the download as compiled-only until you can inspect its contents in a tool that documents the format.

Keep reading

  • How-to

    Trigger a Raspberry Pi camera capture from CODESYS

    Trigger the Pi camera from CODESYS by starting from the shipped Camera.project example, passing only the arguments (no raspistill prefix), and resetting the trigger Boolean on the done feedback. The JPEG lands in /root/ and comes out through the CODESYS file browser; stop the camera stream first, because the camera is a single-owner device.

    PLC programming

  • Explainer

    Editing a CODESYS Raspberry Pi PROFINET controller project

    A Raspberry Pi running CODESYS Control executes the compiled application you download to it; it cannot import GSDML, rebuild the project, or safely change I/O or OPC UA mappings on its own. Keep the CODESYS Development System on Windows as the editing tool, deploy builds to the Pi, and reserve the runtime on the controller for execution.

    PLC programming

  • How-to

    How to migrate derived function blocks to Machine Expert

    No tool converts Control Expert derived function blocks into Machine Expert. Migrate them as a manual code port: copy the Structured Text body, rebuild every declaration and dependency by hand, resolve the two environments' differences, and test each block; blocks written in other languages are recreated. IEC 61131-3 keeps the language portable, not the project or the libraries.

    PLC programming