Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use physical value in PDO callback #578

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

Open
gennartan opened this issue Apr 30, 2025 · 0 comments
Open

Use physical value in PDO callback #578

gennartan opened this issue Apr 30, 2025 · 0 comments

Comments

@gennartan
Copy link

I have an EDS file describing a VARIABLE with a Factor 1e-3.

When reading the physical value using SDO, the factor is properly applied.
When receiving the value through PDO and using the .phys attribute, I get the raw value.

Currently I have a workaround, I simply read the raw value and re-apply the conversion after reception of the PDO. I would like to be able to use the Factor attribute to avoid duplicating the Canopen device parameters at different locations.

Here is the EDS file.

...

[3300]
ParameterName=Battery
ObjectType=0x9
SubNumber=4

[3300sub0]
ParameterName=Number of entries
ObjectType=0x7
DataType=0x0005
AccessType=ro
DefaultValue=4
PDOMapping=0

[3300sub1]
ParameterName=Vbat pin
ObjectType=0x7
DataType=0x0006
AccessType=ro
DefaultValue=0
PDOMapping=0
Factor=1e-3
Unit=V

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant