LinuxCNC on Raspberry Pi 4

More
11 Sep 2022 16:04 #251685 by armin-f
Replied by armin-f on topic LinuxCNC on Raspberry Pi 4
I bought mine start of September iirc.
Generally I didn't find an 8GB version on stock, 4GB type go for around €180-€200 now, and I bought mine for €75 from a reseller in Vienna, Austria, that had 3 on stock. I had to buy a bundle with a good aluminium cooling case, power supply, an SD-Card and mini-HDMI cable, costing me €123 in total, including VAT. Maybe my board was on storage for some time, since the Revision is 1.5 (last is 7 ?).

Let's say, I was lucky, and sorry for the swearing - I'll be delighted, to fill the CAPTCHA this time. Did you ever wonder, why it's always traffic related pictures, and not, how to spot a super-yacht among fisher boats, or rich people on golf courses or such?

Cheers Armin

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

More
11 Sep 2022 16:24 #251686 by armin-f
Replied by armin-f on topic LinuxCNC on Raspberry Pi 4
Apart from the specific memory/register mapping and handling of the GPIO pins, everything I try to achieve should be usable 1:1 on any other arm64 based board that is supported by the Linux Kernel, not just the Raspberry Pi. If it's not the Cortex A72 processor, the pins might be slightly different or other processor pins routed to the jumper.

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

More
12 Sep 2022 11:41 #251732 by andypugh
Replied by andypugh on topic LinuxCNC on Raspberry Pi 4

Let's say, I was lucky, and sorry for the swearing - I'll be delighted, to fill the CAPTCHA this time. 

Which CAPTCHA?
 

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

More
18 Sep 2022 22:48 #252307 by armin-f
Replied by armin-f on topic LinuxCNC on Raspberry Pi 4
Hi,
So far, in order to post something, I had to check a "I'm not a robot"-box and was presented with pictures of buses, passenger crossing and stuff. Looks like no longer.
Thanks, Armin

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

More
18 Sep 2022 23:24 - 18 Sep 2022 23:31 #252309 by armin-f
Replied by armin-f on topic LinuxCNC on Raspberry Pi 4
Meanwhile I managed to compile a 5.15.65 RT-patched kernel (5.15.65-rt49), and it is running on the Pi right now.
The critical configuration (make menuconfig) prerequisites I found are:
* disable KVM (Virtualization)
* enable expert mode (General setup > Configure standard kernel features (expert users))
It's not required to change anything within the expert configuration, that I'm aware of.
Without these, you don't see the entry "General setup > Preemption Model > Fully Preemptible Kernel (Real-Time)".
Otoh, selecting the 'Fully Preemptible Kernel' forces a lot of other settings.
In order to get the installation clean, I built the Debian kernel packages and installed them.
To start the kernel, I added the lines
kernel=vmlinuz-5.15.65-rt49-ajf
ramfsfile=initrd.img-5.15.65-rt49-ajf
to the top of /boot/config.txt and rebooted the system.
To do away with a lot of stuff not useful on the Raspberry Pi 4B, I modified the configuration in a lot of other places too. I can provide a link to my ".config"-file, if you like, for use and criticism.

Then I cloned the git repository of LinuxCnC, read through some READMEs, configure --help and tried this configuration:
./configure --with-realtime=uspace --disable-gtk --disable-nls --disable-build-documentation --prefix=/usr/local --without-libusb-1.0 --without-libmodbus --enable-non-distributable=yes [--with-tclConfig=/usr/lib/tcl8.6/tclConfig.sh
--with-tkConfig=/usr/lib/aarch64-linux-gnu/tk8.6/tkConfig.sh]
([...] optional). Now I'm stuck with some python-tcl-tk issue. It turns out, that the default Python on my system is 3.9, while the package 'python-tk' depends on Python 2.7, I believe.
There's also a clash between license GPL v2 and [L]GPL v3 in the dependency tree, that can be evaded by '--enable-non-distributable=yes'. Package 'libreadline-gplv2-dev' is not available in Debian bullseye.

Any ideas?

Kind Regards, Armin
Last edit: 18 Sep 2022 23:31 by armin-f.

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

More
19 Sep 2022 07:32 #252319 by rodw
Replied by rodw on topic LinuxCNC on Raspberry Pi 4
From one of the developers over the weekend

On 9/14/22 15:35, Rod Webster wrote:
>
raspi.debian.net/tested-images/

This is awesome!

I tried the "2022-08-08" Bookworm image for Raspberry Pi 4.  The image
is for the arm64 architecture.  Everything seems to work fine on a
Raspberry Pi 4B, including wifi, GUI, and the serial console.

After `apt-get install linuxcnc-uspace linux-image-rt-arm64` and a
little bit of tweaking, I'm now getting latencies around 150 µs, which
is not as good as the Raspbian Buster armhf image at  linuxcnc.org  (~70
µs latency) but probably acceptable.

It's neat that there are several easy(-ish), usable options for LinuxCNC
on Raspberry Pi now.

You probably neet to run sudo tasksel to get a gui.
The following user(s) said Thank You: seuchato

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

More
21 Sep 2022 19:49 #252532 by armin-f
Replied by armin-f on topic LinuxCNC on Raspberry Pi 4
@rodw
Thank you for the hint.
Can you please tell me, what version of LinuxCNC the package is?
And do you know, if it works with PlasmaC?

Since I expect, to need some compilation to modify PlasmaC for oxy-fuel cutting, and to write a new HAL driver, to directly use the RPI gpio-pins to read the encoders and drive servo amplifiers, I'll not be able to avoid compilation.
Still it is good to know, that someone was able, to get 64bit working on bookworm.
If the python-tk package is based on python3 there, this may be the critical difference for a successful configuration of LinuxCNC.

Yesterday I was able to get an old BARCO encoder to work with lab-power supplies and an oscilloscope, so I believe, that this route makes sense for me.
I believe, that it's best, to use interrupt service routines to process the state changes of the encoder channels. While it may be possible to poll the state in the fast thread, it's less reliable and a waste of resources. Turning the encoder by hand yesterday, I got pulse frequencies in the kHz range. It also was apparent, that the pulses don't have a 50% duty cycle, nor is the A<->B offset half the pulse distance. It's more like 30%. So one may get some additional precision, by accounting for that in an offset table that contains the true distances of all state transitions relative to some "master edge".

I'm not worried about the GUI right now - I might even run the machine headless, since it's out in the open under a canopy.

Kind Regards, Armin

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

More
22 Sep 2022 09:07 #252557 by rodw
Replied by rodw on topic LinuxCNC on Raspberry Pi 4
Go with Debian Bookworm, follow the instructions and you should end up with 2.9 so QTPlasmac is included.
I have not done this for a few months.

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

More
30 Oct 2022 05:07 #255424 by dannym
Replied by dannym on topic LinuxCNC on Raspberry Pi 4
OK I was excited to see this was possible, I downloaded linuxcnc-2.8.2-pi4-arm64 and put it on the SD for my RPi 4 8GB. Got that "the board requires newer software" message reported earlier.

What's the status? Is there a reliable image? Can we reliably keep the latency down enough for one with a Mesa card across ethernet?

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

More
30 Oct 2022 06:06 - 30 Oct 2022 06:19 #255425 by dannym
Replied by dannym on topic LinuxCNC on Raspberry Pi 4

From one of the developers over the weekend

On 9/14/22 15:35, Rod Webster wrote:
>
raspi.debian.net/tested-images/
 


 
I tried the top build "022.08.0812 (Bookworm)44 (4GB)"
On my 8GB RPi 4.  I see the boot log scrolling past then the screen loses HDMI signal.  The red LED on the RPi 4 went out, only a blinking green LED left.  Should I start trying other builds?
 
Last edit: 30 Oct 2022 06:19 by dannym.

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

Time to create page: 0.301 seconds
Powered by Kunena Forum