Skip to content

EDS export does not synchronize [DeviceInfo].RevisionNumber with object 0x1018:03 #226

Description

@wdfk-prog

Describe the bug

When exporting an XDD project to EDS, CANopenEditor writes a RevisionNumber
value in the [DeviceInfo] section that does not match the default value of
the CANopen identity object 0x1018:03.

In the project, the default value of 0x1018:03 Revision number is:

0x00010000

However, the exported EDS contains:

[DeviceInfo]
RevisionNumber=0

while the same EDS contains:

[1018sub3]
ParameterName=Revision number
DefaultValue=0x00010000

The Device Info page in CANopenEditor v4.2.3-0-gc1071ab does not provide a
field for editing [DeviceInfo].RevisionNumber, so the mismatch cannot be
corrected through the GUI.

To reproduce

  1. Open or create an XDD project.
  2. Set object 0x1018:03 Revision number default value to 0x00010000.
  3. Open the Device Info page and note that there is no editable
    Revision Number field.
  4. Export the project to EDS.
  5. Open the generated EDS file.
  6. Compare:
    • [DeviceInfo].RevisionNumber
    • [1018sub3].DefaultValue
  7. Optionally validate the EDS with Lely dcf-tools 2.4.2:
dcfchk -n 1 -p project.eds

Actual behavior

The exported EDS contains inconsistent identity revision values:

[DeviceInfo]
RevisionNumber=0
[1018sub3]
DefaultValue=0x00010000

A strict EDS/DCF checker reports that the revision number in [DeviceInfo]
differs from the revision number in the identity object.

Expected behavior

One of the following behaviors would solve the issue:

  1. Automatically export [DeviceInfo].RevisionNumber from the default value
    of 0x1018:03; or
  2. Provide an editable Revision Number field in the Device Info page and
    keep it synchronized with 0x1018:03; or
  3. Report a validation error before export when the two values differ.

The preferred behavior is to keep the two values synchronized automatically,
because both fields describe the same device identity revision.

Environment

  • CANopenEditor: v4.2.3-0-gc1071ab
  • Project format: XDD
  • Export format: EDS
  • 0x1018:03 default value: 0x00010000
  • Validation tool: Lely dcf-tools 2.4.2

Additional context

The MCU firmware generated from the same object dictionary also exposes
0x1018:03 = 0x00010000, so manually changing the object to zero would make
the EDS inconsistent with the actual device.

I can provide a minimal XDD/EDS pair if required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions