-
-
Notifications
You must be signed in to change notification settings - Fork 629
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
sdo callbacks #18
Comments
Hi Check out CO_OD_configure() You can register a callback function for a specific index, which seems to be exactly what you want. There are examples throughout the code for how to use it. //Jens |
Hi, |
It seems the function CO_OD_configure() is not available in CANopenNode V4, or I am I missing something? |
In V4 there is completely new Object Dictionary interface. See example in https://github.com/CANopenNode/CANopenSocket. |
So if I understand correctly. To create a callback function on an SDO write, using OD_extension_init a custom write function can be created which can call a callback function and OD_writeOriginal can then be used to perform the actual write. Is this the best approach? |
In general you don't need OD_writeOriginal, you also don't need variable to be stored in OD memory, if you have custom write callback. |
Hi,
I want to trigger some events via canopen sdo messages, like writting to index 0x2000 should start some measurement. As I can see, there is no callback functionality per OD entry, so I wonder what is the recomended way to figure out which OD entry has changed and call right handler?
The text was updated successfully, but these errors were encountered: