On 05/17/2018 03:31 PM, Maxime Lemonnier wrote:
Just want to make sure I did not miss something in the doc. Suppose I wan't to register a python callback from the linuxcnc python module, e.g. once per servo thread, it is not possible, right?def my_function(): print("servo thread tick!") linuxcnc.something.set_callback(my_function);
You're right, that's not possible. Python modules do not run in realtime context, so they don't have a notion of the servo thread or the base thread.
If you write a realtime component (in C, or using the "halcompile" front end) its realtime function will get run once per whatever thread you "addf" it to, effectively becoming the callback you describe above.
-- Sebastian Kuzminsky ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
