RPI4 Raspbian 64 bit & LinuxCNC

More
4 years 10 months ago #229102 by virencq
I have compiled 2.9 with doble step hal.pi.gpio.c.
Mine version have weared DRO and have some errors popped up frequently.
Elovalvo you are genius in doing so.
Please compile 2.9 version with that.

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

More
4 years 9 months ago - 4 years 9 months ago #230728 by elovalvo

I have compiled 2.9 with doble step hal.pi.gpio.c.
Mine version have weared DRO and have some errors popped up frequently.
Elovalvo you are genius in doing so.
Please compile 2.9 version with that.

Good News.
I recompiled version 2.9.0pre of Linuxcnc for ARM64 and the .deb files are available here
LinucCNC 2.9.0pre .deb files

It is necessary to copy to the '/usr/lib/linuxcnc/modules' folder the hal_pi_gpio files (old and new) that are attached to this post
forum.linuxcnc.org/9-installing-linuxcnc...-bit-linuxcnc#230690

where the methods of use are explained and also a test of operation by halrun of two servos.
Last edit: 4 years 9 months ago by elovalvo.
The following user(s) said Thank You: virencq

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

More
4 years 9 months ago #230783 by COFHAL
the libks for download those files not work.

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

More
4 years 9 months ago #230838 by elovalvo

the libks for download those files not work.

Are you sure? I tried and they work

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

More
4 years 8 months ago #235772 by euridium
Hello,

i have been reading and testing a  pi4 64bit image for a while trying to get decent latency results. 
I have read as much as i can on the forums, articles, etc and i've been running linuxcnc on PCs using software stepping for quite a while (but no expert!)

I would like to move the PC with parallel port (step and direction) to a PI4 with GPIO - 
smaller foot print.
It's running a small CNC milling machine (taig)  - i appricate that the rapids might not be speedy, but thats OK just now.

However, i am strugging to get a decent latency histogram reliably over 12 hours or so.
running a 80,000 base, i get  latency of around -+40us.

I am running the latest elovalvo image (i have tried both raspbian (debian buster) & the ubuntu)
I have disabled wireless and bluetooth &  sound, running "isolcpus=1,2,3 idle=poll"  

does anyone have any suggestions on how i can further reduce the latency to a 20us (ish) on the histogram with a 80,000 base (or lower if possible) ?

OR, am i not quite understanding,  and a 40us latency is perfectly fine with a 80,000 base?  for software stepping over GPIO.
i appriciate the hal_gpio now has a double step option.

i'm yet to try and linux cnc directly at present - was trying to get a decently base + latency first.

Any help greatly appricated!
 

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

More
4 years 7 months ago - 4 years 7 months ago #238020 by elovalvo
I recently bought a Raspberry Pi 400 and took care of installing LinuxCNC.

First I noticed that the revision was new (c03131), not yet reported on the site :
www.raspberrypi.com/documentation/comput...ry-pi-revision-codes
 
It was therefore necessary to modify the cpuinfo.c and hal_pi_gpio.c 
cpuinfo.c
hal_pi_gpio.c

Also since Linux kernel 5.15 has been released, and is now the default branch of raspberrypi/linux, I prepared Raspberry Pi OS (bullseye 64-bit) with Preempt_RT kernel
( github.com/kdoren/linux/releases/tag/rpi_5.15.27-rt35 )

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.15.27-rt35-v8+ #1 SMP PREEMPT_RT Fri Mar 11 16:34:20 GMT 2022 aarch64 GNU/Linux

I then compiled and installed the latest version of LinuxCNC (linuxcnc-uspace_2.9.0~pre0_arm64).
The files .deb (installable with gdebi) are available at this link:
linuxcnc-uspace_2.9.0~pre0_arm64_deb.zip

If you want to avoid the whole installation procedure of the various elements, the microSD image of this installation is available at this link

linucnc-2.9.0pre-bullseye_arm64rt.zip

I then mounted the SD on three raspberry Pi models, whose characteristics (obtained with the 'pinout' command) are as follows:

a) Raspberry Pi 4 Model B Rev 1.1 2GB

Revision : b03111
SoC : BCM2711
RAM : 2GB
Storage : MicroSD
USB ports : 4 (of which 2 USB3)
Ethernet ports : 1 (1000Mbps max. speed)
Wi-fi : True
Bluetooth : True
Camera ports (CSI) : 1
Display ports (DSI): 1


b) Raspberry Pi 4 Model B Rev 1.1 4GB

Revision : c03111
SoC : BCM2711
RAM : 4GB
Storage : MicroSD
USB ports : 4 (of which 2 USB3)
Ethernet ports : 1 (1000Mbps max. speed)
Wi-fi : True
Bluetooth : True
Camera ports (CSI) : 1
Display ports (DSI): 1


c) Raspberry Pi 400 Rev 1.1 4GB

Revision : c03131
SoC : BCM2711
RAM : 4GB
Storage : MicroSD
USB ports : 3 (of which 2 USB3)
Ethernet ports : 1 (1000Mbps max. speed)
Wi-fi : True
Bluetooth : True
Camera ports (CSI) : 0
Display ports (DSI): 0

The first tests of operation gave good results.
In particular, these are the graphs obtained through the
latency-histogram --nobase --sbinsize 1000 --show

a)

b)

c)

Also in the case of the Pi 400 it is possible to reduce the servo cycle up to 35us without generating the 'Unexpected realtime delay' error.

Last edit: 4 years 7 months ago by elovalvo.
The following user(s) said Thank You: andypugh, Skippy1, tommylight, Elco, mwiktowy, JT, rdtsc, Rabin

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

Time to create page: 0.121 seconds
Powered by Kunena Forum