IMDHMIControls LibraryShop main store

Troubleshooting

Why a PROFINET submodule has no IEC diagnostic object

Industrial networks Published 7 min read By IMDHMI controls team

Short answer

A missing association between a configured PROFINET submodule and its IEC diagnostic object is generated, or not, by the engineering environment's controller integration, not by your project. In native CODESYS the submodule carries a CAADiagDeviceDefault object; the tested pairing, a controller vendor's environment at 3.6.3 with its PROFINET controller component at 4.6, left submodules without one while device and module objects remained. Compare device descriptions, libraries and the controller component first, and keep cyclic I/O health separate from submodule diagnostic access.

On this page
  1. Two readings to keep separate
  2. Count what each environment exposes
  3. Compare the inputs both tools use
  4. Read the function block's input contract
  5. Keep cyclic I/O health apart from diagnostic coverage
  6. The decision for each finding
  7. Prove the repair before it ships
  8. Questions asked

When a configured PROFINET submodule carries no associated IEC object while its device and module objects appear as usual, the binding was not generated by the engineering environment's controller integration, and it is not a setting your project forgot. In the tested pairing - a controller vendor's CODESYS-based environment at release 3.6.3 with its PROFINET controller component at version 4.6 - the submodule-level binding is missing while standard device and module objects remain; the same configuration in native CODESYS associates each submodule with an object of type CAADiagDeviceDefault, the diagnostic library's default device object, which a program can pass to a diagnostic function block. Work the problem through device description revisions, diagnostic library versions and the controller component, in that order, and never through the cable. Keep two readings separate throughout: whether cyclic I/O works, and whether your application can reference the submodule diagnostically.

Two readings to keep separate #

The IEC-object association is a project-level binding: it connects a configured element of the device tree to an instance in the IEC 61131-3 program that a diagnostic function block can read. Communication status is a runtime reading from the controller. A station can exchange process data cleanly and still lack a callable diagnostic object, and an absent object proves nothing on its own about the physical submodule.

Run the first pass in this order:

  1. Reopen the configured submodule in the device tree and record whether an IEC object is associated with it, noting the instance name and type wherever one exists.
  2. Read the controller's online status and record which device and module diagnostics the integration does expose.
  3. Observe the submodule's process data under normal operation to confirm cyclic exchange on its own terms.
  4. Record the environment release, the PROFINET controller component version, and every installed device description and diagnostic library version.
  5. Match your case to a row of the table before changing anything.

Replacing cables, renaming the device or repeating the download does not create an application-facing object. None of those actions touches the generation step, so keep them out of the first hour.

What you see What it means Next move
No submodule object, cyclic I/O healthy The application cannot reference that submodule diagnostically; process data is a separate question Compare the inputs both tools use
No submodule object, device also reports trouble A communication fault and a missing object at once Clear the communication fault first, then recount
Object exists, function block rejects it The fault has moved to the input contract Read the block's declaration

Count what each environment exposes #

Example, with invented station sizes so the arithmetic is visible - substitute your own counts. Take one PROFINET adapter with two modules, each module carrying two submodules, so the station holds four submodules. Count application-facing diagnostic associations only, not process-data channels.

PROFINET structures the station as device, module and submodule at numbered slots and subslots; the GSDML description file a device vendor supplies is what lets an engineering tool build that tree. The IEC-object association is a separate layer: it decides whether your program holds an instance for each element.

Level Native CODESYS Vendor environment, tested pairing
Device 1 1
Module 2 2
Submodule 4 0
Total 7 3

Native CODESYS: 1 + 2 + 4 = 7 associations. The vendor environment at the tested pairing: 1 + 2 + 0 = 3. Missing: 7 - 3 = 4, the four submodule associations, which is 4 of 7, about 57% of that station's application-facing diagnostic surface. The count assumes device and module levels bind in both tools, as reported for standard PROFINET devices and modules. Every submodule you add widens the gap by one association; an integration that also skipped the module level would leave the total at 1.

Compare the inputs both tools use #

Keep the working native CODESYS project as a controlled comparison, not as a reason to abandon the production toolchain. Record, before editing anything:

  • The device description identity and revision installed in each project; compare the installed files, never the displayed device name.
  • Device, module and submodule selection, including slot and subslot placement.
  • The association at each level, with instance name and type wherever one exists; in native CODESYS confirm the submodule type is CAADiagDeviceDefault.
  • The diagnostic libraries each project references, with their versions.
  • The controller component version each environment integrates.

A description file decides what a tool can integrate and expose: the same dependency that leaves an EtherCAT device's analog inputs unknown without its device description files applies to a PROFINET station and its GSDML file. If any input differs, align it in a test project and repeat the count. If every input matches and only the submodule associations differ, the gap sits in the controller integration itself, and the decision path below applies.

Read the function block's input contract #

Open the diagnostic function block's declaration before passing any object name. A text name, an object reference and an interface are three different contracts, and the declaration names the one it wants.

  • Declaring your own instance of the diagnostic type, even one named after the submodule, does not attach it to the submodule's diagnostic data; the binding is the environment's generated association, not a variable name.
  • Check whether the interface carried by an available device or module object exposes child or submodule diagnostics, and how it identifies its target.
  • Compile one test call against an existing, supported object before touching production diagnostic logic; a clean build proves the call compiles, not that the returned status belongs to the intended submodule.
  • If the block requires the missing submodule instance, no alternate instance name will help. The integration has to expose the object or offer a different supported access path.

Keep cyclic I/O health apart from diagnostic coverage #

Read what the integration does expose at device and module level, and decide what each level is worth to the operator. A parent object that reports an unhealthy device without naming the submodule earns a general alarm and is no substitute for submodule-specific reporting. If parent diagnostics expose submodule detail through a documented interface, test that interface as the alternate access path. When a scan cannot even read a device's identification, that is a communication fault with its own repair path, covered in fixing PROFINET device ID read errors in CODESYS scans.

Never translate an inaccessible diagnostic object into a healthy status. Give the operator three distinguishable states: covered and good, covered and faulted, diagnostics unavailable. An operator who cannot tell an unavailable channel from a confirmed-good one will read the first as the second.

The decision for each finding #

  • Inputs differ between the environments: align them in a test project and recount. If the association appears once descriptions, libraries and the component match, adopt the corrected inputs through your normal change process.
  • Inputs match and the association is still absent: the integration does not generate it. The permanent remedy is a supported diagnostic access path or an integration update. No corrected release has been identified for the tested pairing, so confirm the supported route with the controller vendor's support and state exactly which environment release and component version you run.
  • Coverage is needed today: keep the proven cyclic configuration, remove or isolate every call that requires a nonexistent object, never fabricate an object name, use documented parent-level diagnostics, and display the missing submodule coverage explicitly. Test outside production, then deploy through the normal change process.
  • An update is on the table: pair the engineering software to the controller deliberately - matching PLC software versions to controller firmware revisions is its own discipline - and weigh controller compatibility, diagnostic library dependencies and migration work before choosing a release. Do not update solely because native CODESYS creates the object.

Prove the repair before it ships #

Verify object identity and diagnostic behavior, not a clean build:

  1. Reopen the configured submodule and confirm the association exists and its type is the one the function block's declaration requires.
  2. Force a single submodule fault on a bench rig or an isolated station and confirm the application reports that submodule's own instance, not its parent. Force it on hardware that cannot run a machine, never on production equipment, and never trade a safety-relevant diagnostic for availability.
  3. Clear the fault and confirm the diagnostic returns to normal, with covered, faulted and unavailable still distinguishable on the display.
  4. Repeat the association count at every level as the acceptance check: the fixed project must show one association for every element your design intends to cover at the submodule level.

Questions asked

Does a missing IEC diagnostic object mean the submodule's process data is failing?

No. The association is an application-facing object the engineering environment generates; cyclic I/O is delivered by the controller integration independently of it. Read the controller's online status and the submodule's process data to judge communication. A station can exchange process data with no submodule-level diagnostic object, and it can also carry a separate communication fault, so judge the two readings on their own terms.

Can I declare an instance of the diagnostic type myself and pass it to the function block?

Declaring your own instance of the diagnostic type, or naming a variable after the configured submodule, does not attach that instance to the submodule's diagnostic data; the binding is the association the environment generates. The project can compile cleanly while the block reads status that belongs to nothing or to the wrong element. Use only objects the environment actually associated, and prove one call against a known element first.

Which versions were involved in this finding?

The tested pairing was one controller vendor's CODESYS-based engineering environment at release 3.6.3 with its PROFINET controller component at version 4.6. Native CODESYS associated the same submodules with the diagnostic library's default device object type. Treat that as one tested pair, not a proven affected range; no corrected release has been identified for it, so confirm the supported route with the controller vendor's support.

Should I move the project to native CODESYS to get the objects?

Not as the first move. The production toolchain belongs to the controller, and a toolchain change raises controller compatibility, diagnostic library dependencies and project migration questions that the missing object does not remove. Keep the proven cyclic configuration, use the parent-level diagnostics the environment does expose, and ask the controller vendor's support to identify the supported route for your version pair.

What is the decision when device descriptions or libraries differ between the two environments?

Align them in a test project and repeat the association count. If every input matches and only the submodule association is absent, stop reconfiguring: the integration itself does not generate it, and the remedy is a supported diagnostic access path or an integration update.

Keep reading

  • Troubleshooting

    Fix an S7-300 PROFIBUS gateway: module address above the image

    The PROFIBUS side is fine: the S7-300 accepted the GSD file and the telegram carries your values. The assigned module addresses sit above the CPU's process image, so ordinary I and Q access reads zeros. Move them into bytes 0 to 127, or read and write them with peripheral access.

    Industrial networks

  • Troubleshooting

    Troubleshoot CC-Link inputs working but no digital outputs

    Working inputs with dead outputs on a Version 1 remote device station are an RY mapping fault, not a broken link. Three occupied stations give RY offsets 00–5F — 96 bits at Y1000–Y105F — and the digital-output channels sit where the head station's output process image puts them, not where the inputs suggest. Set the master's rack entry to 32 points, confirm RY refreshes to Y1000, read the output image table, then trace one bit.

    Industrial networks

  • Troubleshooting

    Troubleshooting intermittent PROFIBUS dropouts on an S7-400 network

    Save and read the CPU diagnostic buffer before touching anything: the earliest OB86/OB85 entries, mapped against the physical segment drawing, tell you whether the losses share one repeater segment. On a bus that ran seven years and began failing after an encoder tie-in was relocated and re-terminated, one physical-layer fault at that tie-in or its segment's end termination explains all three DP indicators and the self-recovery.

    Industrial networks