run Linuxcnc on xenomai with EVL(the realtime core)

More
2 years 6 months ago #298593 by cgy

I take it you ran the linuxcnc as a RIP ?
sorry,do you mean “Real-time Is Preemptive”?If it is, I'm trying to do it like this.
According to the docs, building LinuxCNC should detect the Xenomai4 EVL real-time core, right? All my EVL tests have passed, so I'm not sure if the current setup is correct.

My current process is to build LinuxCNC according to the documentation and then start LinuxCNC. However, I get a message saying, "Note: Using POSIX non-realtime." Is this process correct? If not, what settings do I need to change to use EVL?

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #298596 by Cant do this anymore bye all
RIP means Run In Place, it's mentioned in the docs.

What method did you use to build Linuxcnc and then run an instance ?

When you built Linuxcnc did you have any xenomai develpoment files &\or libs installed ?
Did you build packagess & install the packages ?
Or did you just build Linuxcnc, run the script to setup the environment variables and run it from the command line ? Running from the menu will just run the prior installed package.

If you don't run the script to setup the environment variables or build and install new packages you will be running the prior version you installed.

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #298599 by cgy

RIP means Run In Place, it's mentioned in the docs.

What method did you use to build Linuxcnc and then run an instance ?

When you built Linuxcnc did you have any xenomai develpoment files &\or libs installed ?
Did you build packagess & install the packages ?
Or did you just build Linuxcnc, run the script to setup the environment variables and run it from the command line ? Running from the menu will just run the prior installed package.

If you don't run the script to setup the environment variables or build and install new packages you will be running the prior version you installed.

I uninstalled the previous LinuxCNC and rebuilt it following these steps. (By the way, I also installed all the dependencies shown by dpkg-checkbuilddeps.)
Code:
$ git clone https://github.com/LinuxCNC/linuxcnc.git linuxcnc-dev $ cd linuxcnc-dev/src $ ./autogen.sh $ ./configure --with-realtime=uspace $ make
Code:
$ sudo make setuid
Code:
$ source ../scripts/rip-environment $ runtests
This runtest has passed the majority of the tests, with only a few showing automatic skips. no errors.
And then I did this to run linuxcnc:
Code:
$ source ../scripts/rip-environment $ linuxcnc

As for Xenomai, I replaced the core, built and installed libevl according to the official website and other forum posts. I also passed the EVL test included with Xenomai, indicating that all Xenomai modules are successfully installed. The only issue is that the latency is slightly high, which should be due to the kernel configuration not being optimized to the fullest. However, this shouldn't have a major impact.
So, I'm currently running the latest build of LinuxCNC.

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #298607 by Cant do this anymore bye all
To be perfectly honest the only application where low latency is crucial is with software step generation.
If using a Mesa card or other external motion control card that only requires a servo thread the latency requirements are a bit looser, and in most instances the RT-PREEMPT kernel is fine.

What I am saying is that chasing down latency gets to a point where it is of no great issue and can be more academic than performance.

In saying that it is interesting to see someone going down a different path and to see the results.

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #298669 by rodw
I''ve forgotton where, but there is code that decides whether to build for rtapi or realtime.
There is a conditional that decides which type of thread to create for the servo thread. I think rtapi is decided by an environment variable.
My take was this needed to be changed to acommodate EVL and this code would need reviewing.
github.com/LinuxCNC/linuxcnc/tree/master/src/rtapi   

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #298747 by andypugh
It should be possible to run the linuxcnc-uspace debian package with Xenomai if you install the xenomai-uspace helper package.

Unfortunately I have not figured out how to build that package on demand, but it did get built until 2.8.4 on Jessie, Precise and Wheezy. You can find it here, for example:
www.linuxcnc.org/dists/wheezy/2.8-rtpreempt/binary-amd64/

Supoport for building these helper packages was probably removed in this commit: github.com/LinuxCNC/linuxcnc/commit/6f28...5d5904ffec3998a833ef
Which I would quite like to reverse, but that is not a trivial task this much further down the line.

It is still possible to build from source for RTAI (I do it all the time) and it might still work with Xenomai. Have you tried

./configure --with-realtime=path-to-xenomai

?

It might work, there is ertainly mention of Xenomai in the configure script:
github.com/LinuxCNC/linuxcnc/blob/db906d...rc/configure.ac#L143

Please Log in or Create an account to join the conversation.

Time to create page: 0.508 seconds
Powered by Kunena Forum