CANopenNode / CANopenEditor

CANopen Object Dictionary Editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unsigned32 Variable in TPDO doesn't have proper data length in bits

oliver99supergm opened this issue · comments

Hello,

I created a TPDO containing a UNSIGNED32 variable but the TPDO mapping parameter shows 16 bits not 32 as it should. I've attached screen shots of the variable definition, TPDO graphical representation, and 0x1A01 object showing that the 3rd application object ends in 0x10 not 0x20. I've also attached a zip containing the XDD file and the OD.c and OD.h that it generated.

0x1A01 Record
Battery Voltage Configuration
TPDO Page showing mapping ox 0x280 message with four byte Battery Voltage

2700-002.zip

Sorry, I can't reproduce it.
Could it be that the value in 0x1A01 has been changed manually?

When I use the "TX_Mapping" tab and select a row (to activate the "Save" button), the value is correct after saving.

Please try the latest bugfix branch.

Perhaps it was simply forgotten to save this change via the save button after adding the new 32-bit "Battery voltage" in the TX PDO mapping? Then when switching to tab Object directory the 16 bit value is still active in 0x1A01/3.

If I do not save in the TX PDO mapping and then save the entire project, I have exactly the described behaviour after reopening.

I will try to add a warning or something similar when ready assigned PDO data in the object dictionary changes.
But that doesn't sound trivial.

Are you saying I have to save the variable size change then go to the TX PDO Mapping page and hit save again there?

Yes: save the variable size change then go to the TX PDO Mapping page and just select a row (to activate the "Save" button), the value in 0x1A01/3 is correct after saving.

The mapped objects are only analysed again with "Save" and the mapping is generated.