IMDHMIControls LibraryShop main store

Troubleshooting

Why an imported CANopen PDO loads a zero COB-ID

Industrial networks Published 6 min read

Short answer

The imported EDS defaults left the ATV312's receive PDO with COB-ID 0x80000000 — bit 31 set, identifier zero — so CODESYS V2.3 compiled warning 1201, disabled the PDO, and the drive ignored the target velocity. Enter the pre-defined connection set values, receive 0x300 plus node ID and transmit 0x280 plus node ID (0x302 and 0x282 at node ID 2), recompile, and the mapped output word drives the speed.

On this page
  1. Read the duplicate-usage warning correctly
  2. Enter the identifiers the pre-defined connection set expects
  3. Worked example: the ATV312 at node ID 2
  4. Verify the command path end to end
  5. Questions asked

The imported EDS was the fault. In a CODESYS V2.3 project with a Schneider Altivar ATV312 as the only CANopen slave, importing the drive's EDS and keeping its default PDO entries produced warning 1201 at compile, and the drive read its status register happily while ignoring every speed reference written to the target velocity. Both symptoms share one cause: the receive-PDO entry held 0x80000000, the EDS's placeholder for a PDO declared unused, not a bus address. The fix is arithmetic, not network surgery: enter the real identifier from the pre-defined connection set, 0x302 on the receive PDO and 0x282 on the transmit PDO at this drive's node, recompile, and the mapped output word reaches the drive.

Read the duplicate-usage warning correctly #

Copy the compiler's full diagnosis out of the message window before touching anything:

warning 1201: PDO with COBId 16#0 on slave with node-ID 2 is disabled due to duplicate usage

Read it as a statement about configured objects, not about hardware on the wire. One slave owns several communication objects, and when two of them present the same identifier the compiler declares duplicate usage and disables the entries involved. A single slave can trigger this alone. The imported default entry 0x80000000 carries bit 31 set — the PDO-invalid flag defined in CiA 301 — over an 11-bit identifier of zero, and the compiler evaluates the field with that flag masked off, so it sees identifier 0 and reports 16#0. Two PDOs that both keep the default carry the same identifier, collide, and get disabled together. A second device, the panel, or an invisible node explains none of it: with one slave connected, the duplicate is inside that slave's own entry list.

Work the symptoms in order:

  • COBId 16#0 in the warning — the identifier portion of the entry is zero; the field is the EDS default placeholder, not an address on your bus.
  • Status register reads correctly — the drive-to-controller transmit path is alive, so the dead side is the command path.
  • Target velocity written, drive display stays at 0.0 — the application is writing into a PDO the compiler disabled.
  • Exactly one slave on the bus — a node-address clash cannot explain the warning, so stay inside the one slave's entries.

That last point separates this fault from why a CANopen coupler boots up but the PLC rejects it. There the master refuses the slave outright; here the slave boots, communicates, and simply has no valid identifier under which the command word can be published.

Enter the identifiers the pre-defined connection set expects #

CiA 301 gives every CANopen device a pre-defined connection set: four default transmit PDOs and four default receive PDOs, each identified by a function code plus the 7-bit node ID. The pair this ATV312 mapping uses is the second pair: function code 0x280 on the transmit side, 0x300 on the receive side. The rule in words — receive-PDO COB-ID equals the receive function code plus the node ID, transmit-PDO COB-ID equals the transmit function code plus the node ID, entered in hexadecimal with bit 31 clear. The pair-by-pair list of default identifiers is in COB-ID reference guide for PDO mapping and node addressing.

Apply it in this order:

  1. In the configurator, expand the slave's receive and transmit PDO settings — not just its node address — and record every entry's COB-ID, mapping and enable state.
  2. Find the receive PDO whose mapping carries the Drivecom command register and the target velocity; its COB-ID field shows the placeholder.
  3. Compute the real identifier as the receive function code plus the node ID and enter it in the notation the tool prints — the warning showed 16#0, so the field takes the 16# form.
  4. Recompile. The warning should be gone; if the compiler now flags a different PDO, give that pair the same treatment on the transmit side, transmit function code plus the node ID.
  5. Confirm the mapping still lists the command register and target velocity, then download and make the first live test at a low speed reference, with nobody exposed to the driven mechanics.

Replacing the placeholder does two jobs at once: it supplies the missing 11-bit identifier and clears the PDO-invalid flag, which is what re-enables the entry for the process image.

Worked example: the ATV312 at node ID 2 #

Inputs, and where each comes from:

  • Node ID 2, set on the drive and matching the configurator — confirmed by the warning's own text.
  • Function codes 0x300 (receive) and 0x280 (transmit) for the mapped PDO pair — from the CiA 301 pre-defined connection set.
  • Imported receive-PDO entry 0x80000000 — exactly as the EDS defaults loaded it.
  • The test write: a target velocity of 500, which the drive display ignored (0.0).

Rule: a usable default PDO identifier is the pair's function code plus the node ID, entered in hexadecimal with the invalid flag clear.

Arithmetic:

  • Receive: 0x300 + 2 = 0x302
  • Transmit: 0x280 + 2 = 0x282
  • Imported entry: 0x80000000 is the invalid flag (bit 31) over identifier 0, which is why the compiler reports 16#0.

Result: the receive PDO takes COB-ID 0x302 and the transmit PDO takes 0x282. After the edit and a recompile, warning 1201 disappears, the receive PDO compiles as enabled, and the same test write that previously left the display at 0.0 moves the drive.

Decision: every PDO you actually use carries a real identifier — function code plus node ID, bit 31 clear. An entry keeps the zero-identifier placeholder only when you deliberately leave that PDO unused; on a used PDO it is never a valid bus address, and no amount of rewiring or rescaling fixes it.

Verify the command path end to end #

A clean compile is the midpoint, not the finish. In the corrected project the target velocity mapped to output word QW25; your process image may allocate a different address, so read the address your own project generates and point the program's speed write at exactly that location — not at an internal variable left over from an earlier attempt.

Keep the directions straight while you check the rest. From the drive's perspective the receive PDO carries the Drivecom command register and the target velocity, and the transmit PDO carries the Drivecom status register and the control effort; do not swap the sides when entering identifiers. Once the receive entry compiled as enabled, the extended command register also mapped to an output word — with the placeholder in place the compiler had allocated nothing for added command objects, which is why earlier attempts produced no new outputs.

Prove both directions live. Change the drive state and watch the mapped status register follow it; a value that sits frozen while the drive runs means the transmit entry still needs its own computed identifier. If feedback stays absent after a clean compile, walkthrough for troubleshooting a TPDO1 COB-ID runs the identical check from the transmit side.

Close with the commissioning rule: importing the EDS declared the device to the configurator and proved nothing about the cyclic path — the same boundary the EtherNet/IP case draws in why an imported EDS does not prove EtherNet/IP cyclic I/O. Compute the identifiers, compile clean, then trust only the value that arrives at the drive.

Questions asked

Does warning 1201 mean two devices share a node ID?

Not by itself. The warning names a COB-ID that appears more than once in the configured object set, and one slave produces that collision alone when several PDO entries keep the zero identifier from their EDS defaults. A genuine node-address clash looks different on the wire: error frames and both devices dropping off the bus, not one clean compile-time message about a single PDO.

Do 0x302 and 0x282 work on every CANopen drive?

No. They are the second PDO pair at the drive's node, computed as 0x300 plus node ID on the receive side and 0x280 plus node ID on the transmit side. The first pair uses 0x200 and 0x180 instead, and the device's EDS decides which pair carries which objects. Compute from the node ID you actually set and confirm the pair against the drive's own documentation before entering anything.

Why did the extended command register refuse to map until the COB-ID was fixed?

The compiler allocates process-image output words only for PDOs that compile as enabled. While the receive entry carried the zero-identifier placeholder, added command objects had no enabled container, so no output word appeared in the process image at all. Once the entry held a real identifier and the project compiled clean, the extended command register mapped next to the target velocity and both reached the drive.

The drive still ignores the speed reference after a clean compile — what is left?

Check three things in order. Confirm the program writes the exact process-image address the corrected mapping generated, not an internal variable from an earlier attempt. Confirm no other assignment or forced value overwrites that address in the same scan. Then confirm the controller-side mapping matches the PDO contents the drive expects, object for object, including the byte order of the velocity value.

Keep reading

  • How-to

    Driving a WAGO 750-653 Modbus RTU module from CODESYS

    On a CODESYS Control Win V3 soft PLC, WagoAppPlcModbus cannot reach a 750-653 behind a 750-354 EtherCAT coupler, because those blocks need WAGO controller firmware. Drive the module's raw process image yourself: set the serial parameters, move each fragment with the control/status byte toggle handshake, and frame the Modbus RTU request and response in your task. Each fragment costs at least two task cycles, so a full transaction takes ten cycles or more.

    Industrial networks

  • Selection guide

    How to choose between Modbus, Profibus and CANopen

    Match the protocol to the PLC master that already exists, not to the datasheet that impressed you. Then fit the cable run to the bit rate, because CAN-based trunks shorten as speed rises, and mix protocols one segment at a time through gateways or the PLC itself. A fourteen-device example shows the arithmetic.

    Industrial networks

  • How-to

    How to install and run CODESYS fieldbus add-ons in ctrlX

    Install the fieldbus package from Tools → Add-on Installer, add the Ethernet adapter while online to the ctrlX OS target, then set the generated IO task to priority 30 and the service task to 39 before login. Keep PROFINET off eth0, and protect the engineering interface by configuring a second IP address on the controller.

    Industrial networks