IMDHMIControls LibraryShop main store

Troubleshooting

Reading IO-Link ISDU parameters over PROFINET acyclic record data

PLC programming Published 8 min read

Short answer

If cyclic IO-Link process data exchanges normally, leave out the connect section of IOL_CALL and address the identification and ISDU calls with the hardware ID of the proxy submodule for the target port, read straight from the PROFINET device configuration. A valid connect result such as 8 proves only that a lookup succeeded, not that it selected your port's submodule.

On this page
  1. Why does cyclic I/O work while IO-Link parameter reads fail?
  2. Which function block reads IO-Link parameters over PROFINET in CODESYS?
  3. Does IOL_CALL need the connect section when process data already runs?
  4. Why does IolInfo report an error when cnct.ID is valid and equals 8?
  5. Where do I find the hardware ID of the IO-Link proxy submodule?
  6. Which index and subindex does an ISDU parameter read use?
  7. How do I verify an ISDU read reached the right device and port?
  8. What else breaks acyclic IO-Link reads when the cyclic image is fine?
  9. Which fix applies to which symptom?
  10. Questions asked

Cyclic IO-Link process data can exchange perfectly while every parameter read fails, because the two travel on different PROFINET channels. When IOL_CALL or IOL_IdentificationAndDiagnosis returns an error on IolInfo even though the I/O image is healthy, the fault sits in the addressing inputs of the acyclic call, and one comparison settles it: take the hardware ID of the proxy submodule for the target port from the PROFINET device configuration in the controller project and use that value as the ID input, with the connect section left out because the device is already in data exchange. A connect result that comes back valid, even at a clean value like 8, proves only that a lookup succeeded, not that it found the submodule your port lives behind. Work the sections below in the order you hit them.

Cyclic process data and ISDU parameters travel on two different channels, so a healthy I/O image proves the PROFINET application relationship but says nothing about the acyclic path; the fault sits in the parameter call's addressing inputs, not in the connection.

Process data rides the cyclic I/O image and refreshes every bus cycle; parameters ride acyclic record-data requests that the controller exchanges between the cyclic frames. The master acts as a proxy: each request names a proxy submodule, and the master forwards it to the device on the port you selected. A request that names the wrong submodule, port or index draws an error from the master or the device while the cyclic image continues untouched. A cyclic image that instead goes stale is a separate failure with its own path, covered step by step in Why IO-Link hub outputs stay off despite a valid process image.

Observation What it means Next check
Cyclic process data valid Application relationship established; the controller owns the device Skip the connect section
cnct.ID valid, value 8 The lookup resolved an ID; this does not prove it addresses the right submodule Compare 8 with the port submodule's hardware ID in the device configuration
IolInfo errors with and without the connect part The connect part is not the common factor; the shared inputs are Verify proxy submodule ID, port, index, subindex
Identity read returns another device's IDs The ID addresses a different port's submodule Use the target port's own hardware ID

The master also has to support and route that acyclic channel at all; the page on why IO-Link ISDU access requires a supported acyclic path explains what the proxy path must provide before any call lands.

The PROFINET blocks live in the ProfinetCommon library, in its IO-Link folder: IOL_IdentificationAndDiagnosis for identity reads and IOL_CALL for reads and writes at a chosen index and subindex, and the IO-Link blocks written for EtherCAT target a different fieldbus so they will not reach a PROFINET proxy. Adding the PROFINET controller to the project tree pulls ProfinetCommon into the Library Manager automatically. Run IOL_IdentificationAndDiagnosis first: it takes the fewest inputs and proves the path before you commit to a parameter-specific call through IOL_CALL.

Does IOL_CALL need the connect section when process data already runs? #

Leave the connect section out: a device that already exchanges cyclic process data is in data exchange with the controller, and the block's own help marks that part as necessary only when it is not, so running it just adds one more ID to get wrong.

The application relationship already exists here, and nothing in the connect part can improve it. If the I/O image itself is dead, you have a connection fault instead, and no acyclic call will land until it is fixed; the checklist in Fix PROFINET connect errors between a controller and an S7-1200 walks that side step by step.

Why does IolInfo report an error when cnct.ID is valid and equals 8? #

A valid cnct.ID of 8 means the name-to-ID lookup succeeded, nothing more; 8 is only correct if your device configuration lists 8 as the proxy submodule for the port you are reading, and in practice a resolved value frequently points at the wrong submodule.

Each submodule in a PROFINET device carries its own hardware ID, an integer fixed by the device configuration. The block's help text describes the ID input as addressing the IO-Link proxy submodule, which can be the master or the device behind one of its ports, and the ID inside the connect structure is not guaranteed to be the same object the identification call wants. A lookup can therefore succeed and still be aimed at the wrong submodule, which returns an error or another device's data while your target waits. Test by varying one input at a time: the ID, then the port, then the index, then the subindex.

Open the device in the controller project's PROFINET device configuration and read the hardware ID shown for the submodule that represents the target port's IO-Link proxy; that integer, taken before any connect structure runs, is the value the identification and call blocks expect.

Multi-port masters carry one proxy submodule per port in the module list, so the ID is port-specific, and the help text's note that the proxy can be the master itself or a device means you should follow whichever object it names for your call. Keep the station name input identical to the configured PROFINET device name, since the controller matches names as strings, and write the ID as a constant taken from the configuration rather than as a value carried over from a connect attempt that happened to resolve.

Which index and subindex does an ISDU parameter read use? #

Take the index and subindex from the device's IODD; the identity objects exist on every IO-Link device, with the vendor ID at ISDU index 16 and the device ID at index 17, so start there, then move to the parameter index, subindex and length the IODD lists.

Those two reads prove the path with objects no device may omit. After that, the parameter you want lives where the IODD says it lives: index, subindex, data type and length all come from that file, which also gives the scale factor that turns returned bytes into engineering units. An index the device does not implement returns an error that looks exactly like an addressing fault, so a failure right after a good identification read is usually a guessed index, not a broken path. The same index-driven pattern covers analog channels behind hub ports; a walkthrough of ISDU analog hub setup follows one mapping from IODD entry to decoded value.

How do I verify an ISDU read reached the right device and port? #

Prove the path with a known-value read: trigger IOL_IdentificationAndDiagnosis on a port whose device IODD you have, and expect the returned vendor and device IDs to match that IODD exactly; anything else means the ID addressed another port's submodule.

Reads are passive, but run the checks on a machine you can stop: a mis-addressed ID can return another port's parameter values, and that is not data you want feeding a running process.

  • Compile the project and expect no unresolved references to ProfinetCommon.
  • Trigger IOL_IdentificationAndDiagnosis on a port whose device IODD you have, and expect the error output to clear with the vendor and device IDs matching that IODD.
  • Repeat on a second port, changing only the port-dependent ID, and expect the returned identity to change; if it does not, the ID still addresses the first submodule.
  • Read one parameter whose value is visible on the device display or in the IODD defaults, and expect the identical value with the length and type the IODD states.
  • Watch the cyclic image while acyclic reads execute, and expect no I/O disturbance and no new PROFINET diagnostic entries.

Worked example, with illustrative numbers except where the standard fixes them: say the device configuration lists the port 3 proxy submodule with hardware ID 10, and the IODD lists a measured-value parameter at ISDU index 112, subindex 1, type UINT16, scale factor 0.01. After identification succeeds through the vendor ID at index 16, the parameter read returns two bytes, 0x07 0xD0. Decode big-endian: 7 × 256 + 208 = 2000, and 2000 × 0.01 = 20.00 in the IODD's engineering units, matching the 20.00 on the device display. Length of 2 bytes matches UINT16, index 112 exists, port 3 answered, so both the path and the decode are proven.

Beyond the ID itself, three habits break acyclic reads that cyclic operation never exposes: a guessed index, continuous triggering, and changing several inputs between attempts, and each has a one-line fix.

  • Changing several inputs between attempts: vary the ID, then the port, then the index, then the subindex, one at a time, so each result tells you exactly one thing.
  • Triggering requests continuously: edge-trigger the execute and wait for done or error before re-arming, because the master serves the acyclic channel one request at a time; the pacing matches any record read, as an acyclic PROFINET record read walkthrough shows.
  • Trusting a single error bit: read the block's documented error outputs instead of relying on IolInfo alone, because they separate an addressing fault from a device-side rejection.

Which fix applies to which symptom? #

Every symptom above maps to one fix: an unproven or borrowed ID gets replaced from the device configuration, a failing read after good identification gets new index data from the IODD, and a dead cyclic image gets treated as a connection fault before any parameter call is retried.

  • Cyclic image fine, IolInfo error every time: re-address the calls with the target port's proxy submodule hardware ID from the device configuration and drop the connect section.
  • cnct.ID valid at 8: treat it as a candidate only; use it only if the device configuration lists 8 for that port's submodule.
  • Identification returns another device's vendor or device ID: the ID in the call belongs to a different port; take the target port's own.
  • Identification succeeds, the parameter read still errors: the addressing is right and the index is wrong; take index, subindex and length from the IODD.
  • No cyclic data either: fix the connection first, because no acyclic call works without an established application relationship.

Questions asked

How do I find the IOL_CALL example code in CODESYS?

Expand ProfinetCommon in the Library Manager to its IO-Link folder and open IOL_CALL: the block's documentation tab carries ready-made example code you can copy into a test POU as a starting point, then trim it to the inputs your master actually needs.

Can I write ISDU parameters over the same acyclic path?

Yes. Writes ride the same record-data channel to the same proxy submodule, so a path proven with identification reads is already the path a parameter write uses. Keep the write edge-triggered, wait for done or error before the next request, and check the IODD for whether the parameter accepts writes while the device is in data exchange with the controller.

What happens to device parameters after a device replacement or power cycle?

IO-Link defines a data storage concept for exactly this case: masters that support it hold the device's parameter set and re-download it to a replacement device on the same port after startup. Where the master does not support it, the controller re-writes the parameters at startup through the same ISDU writes, so keeping the write logic in the project pays off twice.

Do I need the IODD imported into the controller project to read parameters?

No. The record call itself needs only the proxy submodule ID, the port, the ISDU index, the subindex and the expected length, all supplied from your program. The IODD is where you look those values up, and it supplies the data type and scale factor you need to decode the bytes that come back.

Why does the parameter read take several bus cycles to complete?

Record requests ride between the cyclic frames rather than inside them, so a read completes over several bus cycles and returns asynchronously through the block's done output. Size alarm and logging logic around that delay, and keep fast-changing values in the cyclic process image, where they refresh every bus cycle.

Keep reading

  • Troubleshooting

    Fix robot Profinet output writes over OPC UA

    Set the Profinet Internal Device Input Size and Output Size to 64 bytes each, under Controller tab, Configuration, I/O System, Profinet Internal Device, and robot output writes reach the PLC array. The failing direction, not the OPC UA status number, identifies the cause: a Bad-class write with the other direction working means the output byte image is missing.

    Industrial networks

  • How-to

    Run Logix 5000 PID loops in a periodic task

    No. Thirty PID instructions in a FOR loop in a continuous task, with no timer, execute once per scan at a varying interval, so their loop update time setting never matches reality. Move the routine into a periodic task whose period equals the shared update time, and write that same period into every loop's .UPD.

    PLC programming

  • Troubleshooting

    When a CODESYS TON works in structured text but not ladder

    The structured text routine counts because its four statements run in sequence inside one scan; the ladder version fails when the reset network clears Timer.Q before the addition samples it, or an unconditional reset restarts the timer every cycle. Put the call, the Q test, the addition and the reset of the same TON instance in one ladder network, left to right in that order, and it counts exactly one B per interval.

    PLC programming