-
Notifications
You must be signed in to change notification settings - Fork 197
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
Read PDO configuration from EDS OD #273
Comments
I think it is already supported. See subscribe(). |
Maybe I'm misunderstanding the API or doing something wrong, but if I call edit I shouldn't rule out that the EDS is not correct. I'm coming from CanFestival, which has their own OD format and we haven't validated the EDS contents. But the pdo mapping seems to be present in the EDS at least. |
Does your EDS actually contain values for the PDO configuration objects? It usually just describes the object dictionary, possibly with default values (like a class definition). It doesn't contain the actual values of the objects (as in a specific class instance for a specific node). Can you show an example of how that data is described in the EDS? Usually you can just declare your PDOs in Python code using If you have a different type of OD definition file (non-EDS), maybe you could implement an importer for it? |
Yes, the EDS contains the RPDO mapping in 1600, and TPDO mapping in 1A00. The [1600]
ParameterName=Receive PDO 1 Mapping
ObjectType=0x8
SubNumber=7
[1600sub0]
ParameterName=Number of Entries
ObjectType=0x7
DataType=0x0005
AccessType=rw
DefaultValue=6
PDOMapping=0
[1600sub1]
ParameterName=PDO 1 Mapping for an application object 1
ObjectType=0x7
DataType=0x0007
AccessType=rw
DefaultValue=538050576
PDOMapping=0
[2012]
ParameterName=MotorSpeed
ObjectType=0x7
DataType=0x0006
AccessType=rw
DefaultValue=0
PDOMapping=1 I'm not technically looking for the values, only the mapping of the object names. Which is what the above is providing. If using |
I think I've found a solution, sveinse@5631a03. Basically added an def read(self, from_od=False) -> None:
"""Read PDO configuration for this map using SDO or from OD.""" If |
@sveinse Thanks so much for your helpful input on this thread! I was also confused as to why However, I merged in the changes you showed on sveinse@5631a03 into my local copy of Highly appreciate you sharing your work. I personally think this work is worth opening a PR for in this repo. |
In my setup I read the PDO configuration from the remote node. To save bus traffic, how can I read the same PDO configuration from the EDS file? This remote note has static PDO configuration, so there no need to run SDOs to the remote to get it. I believe the EDS file contain the information.
The text was updated successfully, but these errors were encountered: