I’m trying to run linuxcnc on AI64 looking for a natural upgrade path for the machinekit on BBB that we’re using since 2015.
Some months ago I manage to install the official image debian 11.3 2022-06-14, then upgrate to kernel 5.10.109-ti-arm64-r49 and install linuxcnc from debian packages (it’s a 2.9.0-pre0+git20221105).
Of course the system was not rt and then as expected the latency test exhibited very poor results both on base and servo thread (we don’t need soft stepgen: in BBB the axis are controlled by CAN with a driver running in the PRU, anyway the latency on servo was too high). But linuxcnc seems running ok: latency test runs and also the sim mode of linuxcnc.
Recently I’ve update to kernel 5.10.168-ti-arm64-r103 (still not rt, same results) then to 6.3.1-rt-arm64-k3-r16.
This latest is a preempt_rt kernel (the first and only one I was able to succesfully install on AI64) but results are not as expected: linuxcnc latency test starts but the results windows is not updating (all values are 0). Also when I start linuxcnc sim (the basic demo, axis.ini, that was normally runnig on “old” 5.10 non rt kernel) it ends with error window in the loading/init process.
So, despite to finally available rt kernel, linuxcnc is still not working (at all!) on AI64.
Any advise will be wellcome
these are the info and error log generated by linuxcnc:
linuxcnc.report (6,2 KB)
linuxcnc_info.txt (3,3 KB)
Without having that software installed and not having the source code to look at it is extremely difficult to diagnose.
You said servo, typically stuff running on stepper motor drives is fine for some applications running in desktop Linux. If you are running brushless servos with Linux and a desktop on top of that you can expect issues with latency (your controls exceed the performance of your SBC).
To avoid chasing your tail all day, split the system up. Run the less demanding user interface on the AI64 /desktop. Pass the compiled G code to your BBB and let it handle the motion control. I don’t see any hobby/maker software available that will do that for free. So if you need high IPM feed rates and extremely good positional accuracy that is what you will have to build.
actually we are not concerned about the feasibility of such a system, as I told in the last 7 years we used a BBB for that (and it’s working with a 1ms servo thread controlling closed loop brushless motors via CAN bus, in CNC milling application). And yeah, we are already using a splitted configuration with the BBB doing the control and user interface running on a separate unit.
Up to date, there are more than a thousand milling machines working with that system every day.
BBB do it with a single core Cortex-A8 @ 1GHz, with 2 200MHz PRUs, 512MB ram and 4GB flash.
BB-AI64 is a dual core Cortex-A72 @ 2GHz, with 2 C66x DSP @ 1.35GHz, 6x Cortex-R5F @ 1GHz, 12x PRUs, 4GB ram and 16GB flash… did I mention GB ethernet and CAN FD? And has the same I/O headers as BBB so it can be directly connected to the old “CNC cape”.
It’s superior to BBB in every section… with plenty of computational power and resources, so I expected it would perform better than BBB (and maybe allow the UI run on the same board with the control).
But at the moment I’m able to run linuxcnc only on a non RT kernel, so it is still useless
1 Like
Go into both boards using CLI and do
$ pstree
Longer the tree the greater the probability of high latency.
Also, I am assuming the original codebase is Python.
Python does not run multiple processes, so, it is only going to run on 1 core. To utilize the AI64 to its maximum potential the code would have to be in C or C++ so the processes and threads needed can be prioritized based upon many factors surrounding system requirements.
I tried so far.
I got the ./axis
build to display and crash but via vncserver.
I have not adapted a camera nor a display for such a feat. I would love to see what transpires from you guys goin’ back and forth, i.e. hence why I am posting now. I get updates!
Seth
P.S. I had a RT kernel too. I think w/ the updated Linux CNC, one would need a e-stop switch before moving forward w/ generic builds like I have currently but I am guessing. Still trying here!