Advanced Search

Search Results (Searched for: raspberry)

  • jairobbo
  • jairobbo
05 Feb 2025 06:49
Replied by jairobbo on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Hello everyone,

I started to work with linuxcnc only a few weeks ago, when I decided to upgrade my 3d printer with A and B axis.
Because my pi4 was starting to jitter I acquired a pi5. :) As one does.. :)

I etched the image 2.94 for pi5 to an SD card. Running this image, GPIO is not working.

halcmd loadrt hal_gpio help
Note: Using POSIX realtime
Invalid parameter `help'
<commandline>:0: waitpid failed /usr/bin/rtapi_app hal_gpio
<commandline>:0: /usr/bin/rtapi_app exited without becoming ready
<commandline>:0: insmod for hal_gpio failed, returned -1
cnc@raspberrypi:~$

I dont have the knowledge to troubleshoot this. Unfortunately. Maybe somebody here know how to solve this.

kind regards,
JAiro
  • rodw
  • rodw's Avatar
05 Feb 2025 04:12
Replied by rodw on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

You could also try installing Debian Trixie from the debian image now its available
raspi.debian.net/daily-images/

Note that this will not install a desktop, just a console but it will have a preempt_rt kernel available. I did do up a doc on doing this for Debian Bullseye which will basically be the same.

docs.google.com/document/d/1S0K-UBlXnsYC...b_0/edit?usp=sharing

The name for xfce package might have changed search the debian packages for XFCE to get the right name today.
  • rodw
  • rodw's Avatar
05 Feb 2025 04:05
Replied by rodw on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Once again thanks mate.

I'm going to play around with making an RPi5 image based on Trixie\Testing so I'll give it a whirl.

You might as well use the provided image becasue you basically end up with Trixie (with 6.1.2 kernel) and 2.9.4 already installed.
  • unknown
  • unknown
05 Feb 2025 02:36
Replied by unknown on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Once again thanks mate.

I'm going to play around with making an RPi5 image based on Trixie\Testing so I'll give it a whirl.
  • jm_mt
  • jm_mt
05 Feb 2025 01:30 - 05 Feb 2025 02:33

Ethercat installation from repositories - how to step by step

Category: EtherCAT

Is it safe to say the Linux Raspberrypi 6.12.11 #1 SMP PREEMPT_RT doesn't work with Etherlab Ethercat Master version 1.6.2. Trying to setup EtherCat on Pi5 with Debian.

I have issues starting the ethercat service.
sudo systemctl enable ethercat

Job for ethercat.service failed because the control process exited with error code.
See "systemctl status ethercat.service" and "journalctl -xeu ethercat.service" for details.

Here's what shows in the journal
Feb 05 12:13:12 raspberrypi ethercatctl[53739]: ERROR: No network cards for EtherCAT specified.
Feb 05 12:13:12 raspberrypi ethercatctl[53739]: Please edit /etc/ethercat.conf with root permissions and set MASTER0_DEVICE variable to either a network interface name (like eth0) or to a MAC addre>
Feb 05 12:13:12 raspberrypi systemd[1]: ethercat.service: Main process exited, code=exited, status=1/FAILURE

Looks like some files are missing or can't be found when trying to install the modules?
sudo make modules_install

returns

cnc@raspberrypi:~/ethercat$ sudo make modules_install make -C "/usr/src/linux-headers-6.12.11" M="/home/cnc/ethercat" INSTALL_MOD_DIR="ethercat" modules_install make[1]: Entering directory '/usr/src/linux-headers-6.12.11'   INSTALL /lib/modules/6.12.11/ethercat/examples/mini/ec_mini.ko   SIGN    /lib/modules/6.12.11/ethercat/examples/mini/ec_mini.ko At main.c:171: - SSL error:FFFFFFFF80000002:system library::No such file or directory: ../crypto/bio/bss_file.c:67 - SSL error:10000080:BIO routines::no such file: ../crypto/bio/bss_file.c:75 sign-file: ./certs/signing_key.pem   XZ      /lib/modules/6.12.11/ethercat/examples/mini/ec_mini.ko.xz   INSTALL /lib/modules/6.12.11/ethercat/master/ec_master.ko   SIGN    /lib/modules/6.12.11/ethercat/master/ec_master.ko At main.c:171: - SSL error:FFFFFFFF80000002:system library::No such file or directory: ../crypto/bio/bss_file.c:67 - SSL error:10000080:BIO routines::no such file: ../crypto/bio/bss_file.c:75 sign-file: ./certs/signing_key.pem   XZ      /lib/modules/6.12.11/ethercat/master/ec_master.ko.xz   INSTALL /lib/modules/6.12.11/ethercat/devices/ec_generic.ko   SIGN    /lib/modules/6.12.11/ethercat/devices/ec_generic.ko At main.c:171: - SSL error:FFFFFFFF80000002:system library::No such file or directory: ../crypto/bio/bss_file.c:67 - SSL error:10000080:BIO routines::no such file: ../crypto/bio/bss_file.c:75 sign-file: ./certs/signing_key.pem   XZ      /lib/modules/6.12.11/ethercat/devices/ec_generic.ko.xz   DEPMOD  /lib/modules/6.12.11 Warning: modules_install: missing 'System.map' file. Skipping depmod. make[1]: Leaving directory '/usr/src/linux-headers-6.12.11'

This seems to the affect other command later like sudo modprobe ethercat. When this run it returns
modprobe: FATAL: Module ethercat not found in directory /lib/modules/6.12.11

Almost looks like the module never gets built or compiled correctly?
EtherCAT's kernel module (.ko) doesn't appear in the modules when trying to search for it
sudo find /lib/modules/$(uname -r) -name "ethercat.ko"

This returns not found

I think tomorrow I'm just gonna try everything again with an old kernel version, just to get started.
  • royka
  • royka
04 Feb 2025 21:21 - 04 Feb 2025 23:39
Replied by royka on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

@unknown Nope until now it's only at the master branch, when I see time I'll do a pull request for the 2.9 branch. You could possibly build from the 2.9 branch and apply the following patch with: git apply ../linuxcnc-rt-detect-6.12.patch

forum.linuxcnc.org/media/kunena/attachme...rt-detect-6.12.patch

Or just put "LINUXCNC_FORCE_REALTIME=1" in front of the LinuxCNC command of set it as a permanent environment setting
  • Meichinger
  • Meichinger
04 Feb 2025 20:23
systematic drift on arcs was created by Meichinger

systematic drift on arcs

Category: General LinuxCNC Questions

Hi Linux CNC forum, 

I'm building on a small CNC for over two years now. Unfortunately, I've been running in some issues while milling circular pockets.  
machine specs: 
Traj XYZA 
y-axis 1190 mm max travel, 20 mm ballscrew with 10 mm pitch, two 750W AC servo (HLTNC) 
x-axis 900 mm max travel, 20 mm ballscrew with 10 mm pitch, one 750W AC servo (HLTNC) 
z-axis 185 mm max travel, 16 mm ballscrew with 5 mm pitch, high torque nema 34 stepper 
spindle - 2,2 kw rattmotor air cooled
Brain of the operation: raspberry pi 4b+ using a parallel port hat and a 5 axis breakout board 
I'm running the premanufactured PI4 optimized Debian Bookworm image. 

Y-axis settings as follows: 
max_velocity = 5000 mm/min 
max_acc  = 20000 mm/min2
min limit = 0 mm
max limit = 1190 mm 
stepgen_maxaccel = 40000 
scale = 10 steps/mm -> (not sure why i set this to 10 -> 200 steps/rev and 10 mm pitch shall result in 20 steps/mm) 
FERROR = 1
Min_Ferror = 0.25

The issue: 
See attachment for further details 
arcs/circular shapes are for any reason shifted in XY - direction, the error occurs above 250 mm/min and is almost unchanged between 1000-5000 mm/min. 

What did i test up to now: 
  1. Change base_period up and down -> the servos are set to 200 "steps"/rev, 10 mm pitch -> thus 20 steps/mm resulting in below 2000 pulses per second on one axis. Base_period is set to 100k, shall be fine? Changing the base_period to 40k didn't change anything as well as increasing the base period to 150k. 
  2. Change max_acc to 4x max_velocity and stepgen to 2x max_acc -> didn't change anything 
  3. check mechanical stiffness and backlash -> everything feels tight and rock solid, the linear guide rails are 20x30mm using very massiv long carriers. 
  4. kill all unnecessary PIDs on the debain system in order to reduce latency -> didn't change anything
added the .hal and .ini file as attachments. 

Any hint or recommendation on how to improve this would be appreciated! 

Thank you!
Michael 








 
  • rodw
  • rodw's Avatar
04 Feb 2025 19:07

LinuxCNC with raspberry Pi5. Ethercat and step/dir interface.

Category: General LinuxCNC Questions

If you don't want to stick to Ethercat drives for all axes, really you should not have gone down the Ethercat route. Rtelligent and others have closed loop Ethercat stepper drivers. I would get a couple of them. Leadshine and Rtelligent also have open loop drives that control 2 x steppers in a single drive.

Rtelligent and Deiwu both have more affordable Ethercat I/O options
  • rodw
  • rodw's Avatar
04 Feb 2025 18:33
Replied by rodw on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

the 2.9.4 image or the Pi 5 has been released and is on the Downloads page. It includes the 6.12 kernel which has been built from the official Raspberry Pi kernel source
 
  • unknown
  • unknown
04 Feb 2025 17:50
Replied by unknown on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

If you build LinuxCNC now from Master you don't have to patch the kernel anymore from 6.12+.
To be clear, of course you still need a PREEMPT_RT built kernel.
 

Do you know if this has filtered down to 2.9.4 yet ?
  • unknown
  • unknown
04 Feb 2025 17:49
Replied by unknown on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

I'm trying to follow Deje63's step by step to build the RT Kernel but I end up with an error:
"reversed (or previously applied patch detected) assume -R?" when trying to run command
"patch -p1 < ../patch-$RT_PATCH_VERSION.patch".
I'm not sure what it meant so I tried to patch anyway but end upp with make throwing "Error 2" at me,.on makefile:1921. Any idea what this might be and/or how to rectify it?

OR even better if anyone might be able to share an .img with LinuxCNC working with Rpi5 and built on RaspberryOS Lite.
I can't get the GPIO pins to work with the distro on the downloads page and it looks like in the man pages that a build on RpiOS is necessary for this to work...

Edit: attached Deje's txt-file for convenience. 

 

I can't get the GPIO pins to work this doesn't help.
and it looks like in the man pages that a build on RpiOS is necessary for this to work... This is not true

Output from a halrun session loading the driver

halcmd: loadrt hal_gpio inputs=GPIO5,GPIO6,GPIO12,GPIO13,GPIO16,GPIO17,GPIO18,GPIO19 \
halcmd+:                                 outputs=GPIO20,GPIO21,GPIO22,GPIO23,GPIO24,GPIO25,GPIO26,GPIO27 \
halcmd+:                                 invert=GPIO20,GPIO27 \
halcmd+:                                 reset=GPIO21,GPIO22
Note: Using POSIX realtime
halcmd: show pin
Component Pins:
Owner   Type  Dir         Value  Name
     4  bit   OUT         FALSE  hal_gpio.GPIO12-in
     4  bit   OUT         FALSE  hal_gpio.GPIO12-in-not
     4  bit   OUT         FALSE  hal_gpio.GPIO13-in
     4  bit   OUT         FALSE  hal_gpio.GPIO13-in-not
     4  bit   OUT         FALSE  hal_gpio.GPIO16-in
     4  bit   OUT         FALSE  hal_gpio.GPIO16-in-not
     4  bit   OUT         FALSE  hal_gpio.GPIO17-in
     4  bit   OUT         FALSE  hal_gpio.GPIO17-in-not
     4  bit   OUT         FALSE  hal_gpio.GPIO18-in
     4  bit   OUT         FALSE  hal_gpio.GPIO18-in-not
     4  bit   OUT         FALSE  hal_gpio.GPIO19-in
     4  bit   OUT         FALSE  hal_gpio.GPIO19-in-not
     4  bit   IN          FALSE  hal_gpio.GPIO20-out
     4  bit   IN          FALSE  hal_gpio.GPIO21-out
     4  bit   IN          FALSE  hal_gpio.GPIO22-out
     4  bit   IN          FALSE  hal_gpio.GPIO23-out
     4  bit   IN          FALSE  hal_gpio.GPIO24-out
     4  bit   IN          FALSE  hal_gpio.GPIO25-out
     4  bit   IN          FALSE  hal_gpio.GPIO26-out
     4  bit   IN          FALSE  hal_gpio.GPIO27-out
     4  bit   OUT         FALSE  hal_gpio.GPIO5-in
     4  bit   OUT         FALSE  hal_gpio.GPIO5-in-not
     4  bit   OUT         FALSE  hal_gpio.GPIO6-in
     4  bit   OUT         FALSE  hal_gpio.GPIO6-in-not
     4  s32   OUT             0  hal_gpio.read.time
     4  s32   OUT             0  hal_gpio.reset.time
     4  s32   OUT             0  hal_gpio.write.time

This is from the latest image. Now if something doesn't work, please please go into detail. How are we supposed to fix an issue when you don't elaborate on what happens ? I can't tell you how frustrating this is.

This driver wont work on the RPi5 hal_pi_gpio has it depend on the bcm2835 headers, which is applicable for the Rpi4 & Rpi3.

 
  • Martin.L
  • Martin.L
04 Feb 2025 16:48

LinuxCNC with raspberry Pi5. Ethercat and step/dir interface.

Category: General LinuxCNC Questions

For your actual machine I wouldn't bother with step/dir and go straight to another servo ethercat. Sell yours and with 150 difference you are already setup.

For your second machine take a look at FlexiHAL, you can directly slap a raspi5 in it. also they are designing a new board with Rj45 for step/dir and another guy is designing a board to swap A6 step/dir to Rj45. Join the printNC discord the board creator is there
  • royka
  • royka
04 Feb 2025 15:14 - 04 Feb 2025 15:22
Replied by royka on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

If you build LinuxCNC now from Master you don't have to patch the kernel anymore from 6.12+.
To be clear, of course you still need a PREEMPT_RT built kernel.
  • KrisJ
  • KrisJ
04 Feb 2025 14:57 - 04 Feb 2025 15:00
Replied by KrisJ on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

I'm trying to follow Deje63's step by step to build the RT Kernel but I end up with an error:
"reversed (or previously applied patch detected) assume -R?" when trying to run command
"patch -p1 < ../patch-$RT_PATCH_VERSION.patch".
I'm not sure what it meant so I tried to patch anyway but end upp with make throwing "Error 2" at me,.on makefile:1921. Any idea what this might be and/or how to rectify it?

OR even better if anyone might be able to share an .img with LinuxCNC working with Rpi5 and built on RaspberryOS Lite.
I can't get the GPIO pins to work with the distro on the downloads page and it looks like in the man pages that a build on RpiOS is necessary for this to work...

Edit: attached Deje's txt-file for convenience. 
  • unknown
  • unknown
04 Feb 2025 12:57

LinuxCNC with raspberry Pi5. Ethercat and step/dir interface.

Category: General LinuxCNC Questions

Best bang for buck will be a RPi5 (if you didn't have a RPi5 I'd suggest an ex corporate PC) and either a Mesa Ethernet (preferred as you are not locked into a single platform)or SPI card. SPI & Mesa is supported on the RPi5 by the hm2_spix driver.

There are some other projects floating around Linuxcnc-RIO, but at the end of the day the Mesa cards are solid, well supported and don't look like disappearing soon.

Speaking from experience, regarding "roll your own" external motion cards, carefully work out a costing, sure the base FPGA card maybe cheaper than a Mesa card, but then you have to factor in all the other bits & bobs bring that up the same feature set.

Now I had a couple of Spartan FPGA dev boards floating around so adapting the Mesa SPI firmware and designing a couple of PCB's wasn't a great cost........but having to buy the parts to populate them was a different story. Getting a Mesa board to Australia is about $100 dollars just for postage alone last time I checked. To tell the truth it just started out as "can I get the firmware to run" then it snowballed.

I'm not trying to put you off but just some food for thought. Another point, delving into cnc is not cheap, so pricey can be kind of relative.

Mesa isn't a cult, it works, works well, is well supported by not only end users but by Pete from Mesa........who was kind enough to help me with a few questions regarding the project mentioned above. If my personal circumstances would allow it I'd be buying a few more Mesa cards to run my Lathe. The mill is fully equipped.
Displaying 586 - 600 out of 813 results.
Time to create page: 0.831 seconds
Powered by Kunena Forum