- Posts: 3
- Thank you received: 0
Functions do not execute, rtapi_print_msg do not print anything
- GingerPotato
- Topic Author
- Offline
- New Member
-
Less
More
8 years 10 months ago #103047
by GingerPotato
Hi all!
I am working on driver. Inside .hal I add functions like:
In code I export it with:
Unfortunately function my_function do not execute.
Looking further I start thinking that nothing in my driver doesn't execute: none of rtapi_print_msg prints in terminal, parameters (pins) changed in code (inside rtapi_app_main) are not changed in linuxcnc.
On the other hand, changing function name without its changing in .hal cause error, so some part of code is being executed.
What can I do?
I am working on driver. Inside .hal I add functions like:
Code:
loadrt my-driver
addf my-driver.func servo-thread
Code:
rtapi_snprintf(name, HAL_NAME_LEN, "%s.func", NAME);
hal_export_funct(name, my_function, NULL, 0, 0, comp_id)
Unfortunately function my_function do not execute.
Looking further I start thinking that nothing in my driver doesn't execute: none of rtapi_print_msg prints in terminal, parameters (pins) changed in code (inside rtapi_app_main) are not changed in linuxcnc.
On the other hand, changing function name without its changing in .hal cause error, so some part of code is being executed.
What can I do?
Please Log in to join the conversation.
- GingerPotato
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
8 years 10 months ago #103048
by GingerPotato
Replied by GingerPotato on topic Functions do not execute, rtapi_print_msg do not print anything
I could send whole driver and configuration packed if someone would be able to look at it
Please Log in to join the conversation.
8 years 10 months ago #103146
by rodw
Replied by rodw on topic Functions do not execute, rtapi_print_msg do not print anything
Sounds like you are not using halcompile. It will make your life so much easier and there will be no need for the export_func
Please Log in to join the conversation.
8 years 10 months ago #103151
by andypugh
Replied by andypugh on topic Functions do not execute, rtapi_print_msg do not print anything
If you are using RTAI then your rtapi_print will probably end up in dmesg, not at the terminal.
Please Log in to join the conversation.
Time to create page: 0.083 seconds
