anybody have the source code of the PID component?
- awesomepanda
- Offline
- New Member
- Posts: 9
- Thank you received: 0
Thanks!
Best Regards!
Please Log in or Create an account to join the conversation.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Instal..._or_8_04_from_source
Please Log in or Create an account to join the conversation.
I want to write a controlling component.Even though it's difficult, I think the PID component is a good example for me.If anybody have the source code of the PID component
This is an Open Source project, so the source is freely available to all.
The specific component you want is here:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...89d8c917be31f9a1efa6
It lives in src/hal/components in the source tree.
You probably want to read:
linuxcnc.org/docs/2.4/html/hal_comp.html
As that pid component is written in straight C so the important parts are wrapped in support code. The whole component would be about 30 lines written in comp.
Please Log in or Create an account to join the conversation.
- awesomepanda
- Offline
- New Member
- Posts: 9
- Thank you received: 0
I know we can use "comp" to create hal component easily.But I want to use C to write a component.
I have read the source code of the PID component written by C .It's using some header files like: #include "rtapi.h",#include "rtapi_app.h",#include "rtapi_string.h",#include "hal.h" and so on.
Although I can guess the use of some functions offered in header files,some is difficult to guess their use.If I can't know the use of the functions exactly,it's imposible to write my component with C .
Can some people offer a list of the funtions and their use in the header files that I mentioned above.
I never heard "git" before ,and not familiar with it.It seems that andypugh offered me the source code of the PID component by using it.Can I find the header files there ?I tried ,failed.
Best Regards!
Please Log in or Create an account to join the conversation.
Why? I write a lot of drivers for LinuxCNC, I use comp wherever possible, not just for convenience, but for maintainability.I know we can use "comp" to create hal component easily.But I want to use C to write a component.
The documentation is the source code, in this case. Your only choice is to download the source, and read it. (or look at it on gitweb)Can some people offer a list of the funtions and their use in the header files that I mentioned above.
git.linuxcnc.orgI never heard "git" before ,and not familiar with it.It seems that andypugh offered me the source code of the PID component by using it.Can I find the header files there ?I tried ,failed.
click "tree" for the LinuxCNC version you are interested in.
look in src/rtapi
Please Log in or Create an account to join the conversation.
Can some people offer a list of the functions and their use in the header files that I mentioned above.
Best Regards!
There is no list of functions and their use you simply have to read and understand the source code. If your a C programmer this should be a trivial task.
John
Please Log in or Create an account to join the conversation.
www.linuxcnc.org/docview/html/
Please Log in or Create an account to join the conversation.