IMDHMIControls LibraryShop main store

Troubleshooting

Why the GSDML install route decides CODESYS device repository entries

Industrial networks Published 7 min read

Short answer

Install the sensor's GSDML through the device repository, not through the generate-device-from-GSDML command. On four engineering machines the generate route left two with a device that scanned but could not be inserted under the PROFINET controller; installing the same file through the repository fixed them. Extra Ethernet adapters and another fieldbus-instance license do not fix a bad repository entry.

On this page
  1. The scan proves the network, not the repository
  2. The install route and the generate route are different commands
  3. Set the parent hierarchy before blaming the license
  4. Repair steps
  5. What does not fix it
  6. The bench record behind the route
  7. After the sensor inserts
  8. Questions asked

Install the sensor's GSDML through Tools -> Device Repository, not through Tools -> Miscellaneous -> Generate PROFINET device from GSDML. When a PROFINET sensor answers a scan but refuses to be added under the PROFINET controller, the network, the license and the IP plan are not the fault: the engineering station lacks a correctly created repository entry for the device, and the generate command is the import route that leaves stations in that state. On four engineering machines given the same GSDML file, the generate route failed on two and the repository install succeeded on all four. The repair below needs no new hardware, no new license and no network change.

The scan proves the network, not the repository #

A PROFINET scan and a project insertion answer two different questions. The scan asks the network what is connected: it queries devices over the PROFINET interface and lists every device that answers, with its name and address. Insertion asks the engineering station to build a device object inside the tree, and that build consumes an installed device description of the class the selected parent accepts. The two checks fail independently, which is how a sensor can answer a scan flawlessly and still be refused at the tree.

That split, a wire that answers and a project that does not, is the same boundary as why ping succeeds but the PROFINET device is not found. When the scan finds the sensor but the add dialog refuses it, wiring, switching, IP reachability and the device name are already proven. Stop checking them; the repository is the open question.

The add list is also filtered by the selected parent. Under the Ethernet adapter the tree offers interface-class entries; under the PROFINET IO controller it offers PROFINET IO devices. A description created as the wrong class never appears under the controller. The entry was not deleted between the two views: it was never the right class for that insertion point.

The install route and the generate route are different commands #

GSDML, General Station Description Markup Language, is the XML device-description format that the PROFINET specification from PROFIBUS & PROFINET International defines for every device. It declares the device identity, the modules and submodules the device accepts, and the layout of its cyclic input and output data. The manufacturer supplies the file; the engineering tool builds the tree entry from it. Devices built into the catalog ship with the tool, so a third-party sensor needs its file installed first. No installed file, or a file imported as the wrong object, means no insertable device.

CODESYS exposes two GSDML commands, and they do different things:

  • Tools -> Device Repository, then Install: registers the file in the repository as a PROFINET IO device, the class the tree offers under an IO controller.
  • Tools -> Miscellaneous -> Generate PROFINET device from GSDML: a separate command that creates a device object from the file. It is not the route that fills the repository with an insertable IO-device entry, and on every machine in the bench record below where insertion failed, it is the route that had been used.

Route every device GSDML through the repository. Keep the file itself unchanged while you switch routes: change the file and the route together and you can no longer tell which change fixed the fault. If the repository install reports an error, stop there; that is a file problem, cleared with the manufacturer's original file before any project work continues.

Set the parent hierarchy before blaming the license #

On a RevPi-class CODESYS runtime or any other target, the tree order is the same: the Ethernet adapter represents the physical interface and carries the station's IP address, the PROFINET IO controller sits beneath it, and the sensors are children of the controller. The behavior that looks wrong, an IP address assignable to the adapter but not to the devices, is correct. On the controller side the interface owns the address; the controller then assigns each IO device its name and parameters. Every sensor on the network shares that one adapter and one controller.

A fieldbus-instance license does not belong in this fault either. Instance limits cap how many protocol stacks a runtime runs, not which descriptions appear in the add list and not whether a scanned device can be inserted. See what counts as a fieldbus instance in CODESYS licensing. If the license were the binding limit, the failure would appear when adding or running the controller, not when inserting a device beneath an already-added one.

Repair steps #

Work on the station that will maintain the machine, and change one thing at a time.

  1. Save a project backup, and note the CODESYS engineering version and runtime version.
  2. Get the sensor manufacturer's GSDML for the exact model and firmware revision, and keep the file name as delivered.
  3. Open Tools -> Device Repository and run Install on that file. Confirm the install completes without an error message.
  4. Search the repository for the device by manufacturer or type and confirm the entry exists in the right variant. Where several revisions are installed, use the one that matches the sensor label.
  5. In the tree, select the Ethernet adapter bound to the sensor network and confirm its interface and IP address.
  6. Add the PROFINET IO controller beneath that adapter if it is not there already.
  7. Insert one sensor beneath the controller. The freshly installed entry must now appear in the add list; get this first device in before touching any other.
  8. Configure that sensor: device name, the modules and submodules its description allows, and the I/O mapping to the program.
  9. Only after the first sensor inserts and configures cleanly, repeat the last two steps for the remaining sensors, download the project, and check the controller's online diagnostics: every device running and process data cycling.

What does not fix it #

These were tried or suspected in the fault record behind this article, and none of them changed the outcome:

  • Adding a second Ethernet adapter. The adapter is an interface, the sensors share one adapter and one controller, and a second interface supplies no device descriptions.
  • Enabling another fieldbus instance. Instance count governs running stacks, and this failure happens before any stack is started.
  • Retyping IP addresses. The insertion failure is a description problem, not an address problem, and no address edit creates a missing repository entry.
  • Rescanning. The scan already succeeded, and repeating it cannot change what the repository holds.

The bench record behind the route #

Four engineering machines, one GSDML file, both routes. With the generate command the device inserted on 2 machines and refused on 2: 2 / 4 = 50 percent of the stations unusable on that route. The same 2 machines then installed the identical file through Tools -> Device Repository, with the file, network, adapters and licenses untouched: 4 - 2 = 2 machines repaired, and the combined record is 2 + 2 = 4 of 4 stations inserting the sensor under the controller.

Two limits on that record, so it is read correctly: no CODESYS version or build number was captured with it, so treat it as a route decision, not a defect pinned to a named release; and it shows the generate command is the wrong tool for this purpose, not that every machine fails on it.

Decision: install every device GSDML through Tools -> Device Repository, Install. If insertion still fails after a clean repository install of the manufacturer's original file, compare the installed variant against the sensor label and capture the exact insertion message. The next fault to suspect is a variant or revision mismatch, not an adapter, an address or a license.

After the sensor inserts #

Insertion, configuration and a running device close this fault. A sensor that then drops off the cyclic connection while still answering ping is a later, different problem in the runtime connection: the repository is correct by then, and the diagnosis starts from fixing PROFINET devices lost but still pingable in CODESYS V3.

Questions asked

Where do I get the GSDML file for a PROFINET sensor?

From the sensor manufacturer. Device makers publish a GSDML for each product family, and often per firmware revision, in the support or download area for the exact model. Match the file to the order number and firmware printed on the device label, keep the file name exactly as delivered, and archive the file with the project records. A file copied from a different variant, renamed after download, or edited before install commonly causes install errors or entries that do not match the connected device.

Can the same GSDML file be used in other engineering tools?

Yes. GSDML is the PROFINET-wide description format, not a CODESYS-only format, so the manufacturer's file for the sensor works in any PROFINET engineering tool that accepts GSDML. Each tool still needs the file installed into its own device catalog before the device can be configured, and an install-side validation error in any of them usually points at the file, meaning wrong variant, renamed, or damaged, rather than at the project.

Does one PROFINET instance license cover several sensors?

Yes. One PROFINET controller instance runs many IO devices beneath it, so a license permitting one PROFINET instance covers all the sensors on that single controller network. Instance counts limit how many separate protocol stacks the runtime runs at the same time, for example PROFINET together with a second fieldbus, not how many devices sit under one controller. A device visible on the network but refused at insertion is a device-description problem, and no license change alters that outcome.

The repository install itself reports an error. What now?

Treat it as a file problem, not a project problem. The usual causes are a file for a different device variant or firmware revision than the sensor on the network, a file renamed or edited after download, or an incomplete download. Do not delete existing repository entries yet. Get a fresh copy from the manufacturer for the exact model and revision, keep its delivered name, and install again. Record the exact error text, the CODESYS version and the file name before requesting support.

Keep reading

  • Troubleshooting

    Fix a Raspberry Pi PROFINET device not reachable in TIA Portal

    Discovery in TIA Portal's name-assignment dialog proves only that the Pi's link is visible. Reachability arrives when the CODESYS runtime lets the S7-1200 write the adapter address: set Adapter.0.EnableSetIpAndMask=1 under [SysSocket] in /etc/CODESYSControl_User.cfg, restart the runtime, and retry name assignment on a current runtime.

    Industrial networks

  • Troubleshooting

    Fix CODESYS PROFINET IP-change error on an S7-1200 link

    The station shows in the scan because DCP discovery answers, but the connection fails because the CODESYS runtime refuses the IP address the controller assigns. Enable the IP-address update for the bound Ethernet interface in the runtime's .cfg configuration and restart the runtime; the error names the fix itself. If you would rather not enable it, set matching fixed addresses on both sides.

    Industrial networks

  • Troubleshooting

    Fix PROFINET device ID read errors in CODESYS scans

    A device that answers DCP discovery can still fail the later RPC-based identity read, so the scan reports it cannot read the ID number. Capture one failed scan with the controller diagnostic log and let the trace pick the fix: adapter binding, a filter on the path, a rule for the returning process, or a runtime mismatch.

    Industrial networks