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

How to create custom canopen linux node with its own object dictionary #1

Open
Prasannajnaeyulu opened this issue Jun 27, 2021 · 9 comments

Comments

@Prasannajnaeyulu
Copy link

Prasannajnaeyulu commented Jun 27, 2021

Hi
It’s not an issue rather a question or help. I wanna create a CANOpen node using our own Object Dictionary .eds file. So just generating OD.c and OD.h files using Object dictionary editor and replace these new OD.c, OD.h and .eds files with the one available in CANOpennode/example and make and install the CANOpen Linux device project would do the job or something else I need to do. Can someone please advice? Thanks.

@Prasannajnaeyulu Prasannajnaeyulu changed the title How to create custom How to create custom canopen linux node with its own object dictionary Jun 27, 2021
@CANopenNode
Copy link
Owner

Yes, you are right. You can also check https://github.com/CANopenNode/CANopenDemo/tree/master/demo

@Prasannajnaeyulu
Copy link
Author

Ok. But the Object Dictionary editor from this library is not working with our can device eds file it is throwing errors. Whereas other editors able to load the file properly ( say, vector caneds is able to load successfully but it doesn't has capability to export OD.c and OD.h files). I have to make this library Object Dictionary works with our eds files so that I am able to generate required OD.c and OD.h files. Any Idea what's wrong with this library Object Dictionary?
image

But I couldn't see any problem with the entry in .eds file

[2003sub1]
ParameterName=Valve1
ObjectType=0x8
DataType=0x0001
AccessType=rwr
DefaultValue=0
ObjFlags=1
Description="Control of the valve"```

@CANopenNode
Copy link
Owner

I'm not the author of the eds parser, I'm not sure about the problem.

Please check the parser here:
https://github.com/CANopenNode/CANopenEditor/blob/2e8a14a17a7ee183225e8df7958908ce1f2b0b5f/libEDSsharp/eds.cs#L2333

@Prasannajnaeyulu
Copy link
Author

Thanks for the reference. I will look into that.

@CarmenMFM
Copy link

Hello!
I have created a CANOpen node using our own Object Dictionary using EDSEditor.
However, when i put OD.h and OD.c in CANOpennode/example and sudo make in linux terminal i have next error.

ERROR_OD

Can someone please help me? Thanks!

@AndreaRoberti
Copy link

Hi all,
We are facing the same error described by @CarmenMFM . Any update?
We notice that importing our EDS file with the editor, the generated files do not contain the define macro (OD_CNT_HB_PROD or _EM_PROD)

Thanks in advance

@CANopenNode
Copy link
Owner

There is no automation, when importing own EDS file. CANopenNode requires some custom properties to be set, especially in communication section. It is best to use original CANopenNode project file and add own objects. See https://github.com/CANopenNode/CANopenNode/tree/master#object-dictionary-editor

@OmarAtomica
Copy link

Hello i have created my own Od.c & Od.h using the object dictionary editor from my .eds file however i still don't understand how can i use the canopen library with other bits of my code for example i want to build an application layer that utilizes the features of the canOpen node to operate a motor controller , so how can i integrate these codes together ?

@CANopenNode
Copy link
Owner

Please see CANopenDemo.

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

5 participants