Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBC <=> XLSX initial_value #781

Open
nexulm opened this issue Apr 11, 2024 · 4 comments
Open

DBC <=> XLSX initial_value #781

nexulm opened this issue Apr 11, 2024 · 4 comments
Assignees
Labels

Comments

@nexulm
Copy link

nexulm commented Apr 11, 2024

InitValue is transmitted to .xslx by converting .dbc to .xlsx with parameter:
--additionalSignalAttributes initial_value

How can I get the InitialValue back from the generated .xlsx row "signal.initial_value" back to the dbc?

So far, it seems for me that this functionality isn't integrated in the code?

@ebroecker ebroecker self-assigned this Apr 11, 2024
@ebroecker
Copy link
Owner

Hi @nexulm

it is implemented, but maybe it does not work.
Have to have a look on it

@ebroecker
Copy link
Owner

Hy @nexulm - in deed - it was not implemented while switching to openpyxl, but should work just now

@nexulm
Copy link
Author

nexulm commented Jun 21, 2024

It seems that the existing additional column "signal.initial_value" of the xlsx source file isn't used. Initial_value is always "0", only a few inital_value which are depending on the offset are showing another value than "0". But in this cases the offset calculation is the seems to be the reason to have the same value (initial_value = offset). For all signals the converted dbc shows initial_value = offset although the xlsx source has different values in the corresponding columns (signal.iniital_value and signal.offset)
The script is called with these parameters:

python3 -m canmatrix.cli.convert --dbcImportEncoding=utf-8 \
--dbcImportCommentEncoding=utf-8 \
--dbcExportEncoding=utf-8 \
--dbcExportCommentEncoding=utf-8 \
--additionalSignalAttributes is_signed,factor,offset,min,max,initial_value,GenSigStartValue \
--additionalFrameAttributes size,DiagRequest,DiagResponse,ApplMessage,NmAsrMessage,GenMsgSendType \
"$path/$param_file_wo_extension.xlsx" "$path/$param_file_wo_extension.dbc"

@ebroecker ebroecker added in_work and removed merged labels Jun 21, 2024
ebroecker pushed a commit that referenced this issue Jun 27, 2024
@ebroecker
Copy link
Owner

Hi @nexulm

could be fixed in branch: https://github.com/ebroecker/canmatrix/tree/issue_781

Additional: You don't need '--additionalSignalAttributes ... --additionalFrameAttributes ...' while importing xlsx files, they are only needed for export.

@ebroecker ebroecker added the bug label Jun 27, 2024
ebroecker added a commit that referenced this issue Jul 15, 2024
* possible quick fix for issue #781 (DBC <=> XLSX initial_value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants