Advanced Search

Search Results (Searched for: raspberry)

12 Feb 2024 16:44

Raspberry Pi 5 EtherCAT master servo thread period

Category: EtherCAT

Install ethtool and run this in Terminal:

sudo apt install ethtool
ip a
sudo ethtool -c "NIC CARD NAME" and post your output.

In essence you are trying reduce the settings (buffer) as much as you can.

You can change the settings with:

sudo ethtool -C "NIC CARD NAME" "NEW SETTING".

Some drivers allow to reduce to 0, some others require a higher minimum number.
12 Feb 2024 15:22 - 12 Feb 2024 15:31

Raspberry Pi 5 EtherCAT master servo thread period

Category: EtherCAT

Hi,

i would like to share some research findings.

I have acquired RPi 5 since I wanted to check linuxcnc performance on this new single board PC.
The performance leap compared to RPi 4 is staggering. I tried to hook up Delta B3 EtherCAT drives, which was pretty straight-forward.
Browsing youtube for linuxcnc ethercat videos I come across this one:

So I thought that I should try this on raspberry pi 5. 125000ns was too much, but 250000ns was mostly OK.
But with this cycle times, servo drives started to have troubles with getting to OP mode.
Guys at etherlab found out, that ethercat master driver generic (DEVICE_MODULES="generic") is only good for 1000000ns threads/cycle time.
To reach better cycle times, I was told to try "genet" driver wich is working fine on Raspberry Pi 4. (RPi5 and RPi4 has the same ethernet chip BCM54213PE)

But the final verdict is, that RPi5 uses macb driver (Cadence GEM) and not genet.
Thats why we are stuck with generic device module.

Link to etherlab issue thread:
gitlab.com/etherlab.org/ethercat/-/issues/104
 
12 Feb 2024 04:41 - 13 Feb 2024 23:35
Replied by RNZ on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

I now have a RPi 5 8 GB model and Mesa 7i96S card. I have downloaded and installed onto a 32 GB micro SD card "LinuxCNC 2.9.2 Raspberry Pi 5 OS based on Debian Bookworm Raspberry Pi 5 Uspace compatible with Mesa Ethernet and SPI interface boards."

I have the Pi (10.10.10.1) talking over ethernet to 7i96S (10.10.10.10) following a W5 jumper change on 7i96S and Linux command:

sudo ip address add 10.10.10.1/24 dev eth0  /* this will work but DON'T USE THIS as it will not persist after a reboot */

ping 10.10.10.10

To ensure the settings persist after a reboot, AND noting that Linux networking commands seem to have recently changed, the following works:

nmcli con show  /* this will show the RPi 5 wireless and wired "ethernet" connections, and the NAME e.g. "Wired connection 1" for TYPE "ethernet" */

sudo nmcli con mod "Wired connection 1" ipv4.addresses 10.10.10.1/24  /* dunno where this gets saved in RPi OS */

Test if persistent by rebooting, then typing again:

nmcli con show  /* DEVICE should now = "eth0" */

ping 10.10.10.10  /* ping the Mesa 7i96 card -- I get a ping time of 30-40 us */

This editor is ghastly :-(
11 Feb 2024 11:42

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

I have now removed all encoders from the JSON and reinserted the PWM generators and can confirm that all 5 axes are now working.
I can perform error-free homing and move the axes manually in both directions.

Here is the output from my test:

cnc@raspberrypi:~$ linuxcnc
LINUXCNC - 2.9.2
Machine configuration directory is '/home/cnc/linuxcnc/configs/test1'
Machine configuration file is 'test1.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./test1.hal

identityKinematicsSetup: coordinates:XYYZA
Joint 0 ==> Axis X
Joint 1 ==> Axis Y
Joint 2 ==> Axis Y
Joint 3 ==> Axis Z
Joint 4 ==> Axis A

litexcnc: Loading Litex CNC driver version 1.1.0
litexcnc: Loading and registering default modules:
litexcnc: Registered module gpio
litexcnc: Registered module pwm
litexcnc: Registered module encoder
litexcnc: Registered module step
litexcnc: Setting up board drivers:
litexcnc: Registered driver eth
LitexCNC-eth: connected to board on '10.0.0.10:1234'
litexcnc: Setting up modules...
litexcnc: Reading 28 bytes
litexcnc: - Watchdog
litexcnc: - Wallclock
litexcnc: - gpio ... done!
litexcnc: - pwm ... done!
litexcnc: - step ... done!
litexcnc: Creating read and write buffers...
litexcnc: Base addresses: init: 00000000, reset: 0000003C, config: 00000040, write: 00000044, read: 000000B8
litexcnc: - Write buffer: 116 bytes
litexcnc: - Read buffer: 88 bytes
litexcnc: Exporting functions...
Found file(REL): ./custom.hal
litexcnc/5A-75B:V8.0: Watchdog timeout (3000000 ns) is dangerously short compared to litexcnc_write() period (2400000 ns)
note: MAXV max: 25.000 units/sec 1500.000 units/min
note: LJOG max: 25.000 units/sec 1500.000 units/min
note: LJOG default: 2.500 units/sec 150.000 units/min
note: AJOG max: 25.000 units/sec 1500.000 units/min
note: AJOG default: 25.000 units/sec 1500.000 units/min
Warning: Forward kinematics must handle duplicate coordinate letters:yy
note: jog_order='XYZA'
note: jog_invert=set()
task: main loop took 0.158369 seconds
task: main loop took 0.234904 seconds
task: main loop took 0.142043 seconds
Shutting down and cleaning up LinuxCNC...
task: 4833 cycles, min=0.000033, max=0.234904, avg=0.010225, 3 latency excursions (> 10x expected cycle time of 0.010000s)
litexcnc: LitexCNC driver unloaded
Note: Using POSIX realtime


Ps: I don't know if this is important. I almost always have to start Linuxcnc twice because the watchdog triggers immediately the first time. This little bug has been there since the beginning of my tests.
10 Feb 2024 13:27

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

Then everything should be up to date for me now.
I have compiled and flashed the JSON once with 2 PWM generators + 6 step generators and then again without PWM generators.
Neither variant brought any improvement with regard to the fifth axis.
Here again the output when calling Linuxcnc and attempting to home the axes.


cnc@raspberrypi:~$ linuxcnc
LINUXCNC - 2.9.2
Machine configuration directory is '/home/cnc/linuxcnc/configs/test1'
Machine configuration file is 'test1.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./test1.hal

identityKinematicsSetup: coordinates:XYYZA
Joint 0 ==> Axis X
Joint 1 ==> Axis Y
Joint 2 ==> Axis Y
Joint 3 ==> Axis Z
Joint 4 ==> Axis A

litexcnc: Loading Litex CNC driver version 1.1.0
litexcnc: Loading and registering default modules:
litexcnc: Registered module gpio
litexcnc: Registered module pwm
litexcnc: Registered module encoder
litexcnc: Registered module step
litexcnc: Setting up board drivers:
litexcnc: Registered driver eth
LitexCNC-eth: connected to board on '10.0.0.10:1234'
litexcnc: Setting up modules...
litexcnc: Reading 28 bytes
litexcnc: - Watchdog
litexcnc: - Wallclock
litexcnc: - gpio ... done!
litexcnc: - encoder ... done!
litexcnc: - step ... done!
litexcnc: Creating read and write buffers...
litexcnc: Base addresses: init: 00000000, reset: 0000003C, config: 00000040, write: 00000044, read: 0000008C
litexcnc: - Write buffer: 72 bytes
litexcnc: - Read buffer: 96 bytes
litexcnc: Exporting functions...
Found file(REL): ./custom.hal
litexcnc/5A-75B:V8.0: Watchdog timeout (3000000 ns) is dangerously short compared to litexcnc_write() period (2400000 ns)
note: MAXV max: 25.000 units/sec 1500.000 units/min
note: LJOG max: 25.000 units/sec 1500.000 units/min
note: LJOG default: 2.500 units/sec 150.000 units/min
note: AJOG max: 25.000 units/sec 1500.000 units/min
note: AJOG default: 25.000 units/sec 1500.000 units/min
Warning: Forward kinematics must handle duplicate coordinate letters:yy
note: jog_order='XYZA'
note: jog_invert=set()
task: main loop took 0.128303 seconds
joint 4 following error
emc/task/taskintf.cc 976: Error on joint 4, command number 136
Cannot unhome while homing, joint 4Cannot unhome while homing, joint 4
task: main loop took 0.141973 seconds
Shutting down and cleaning up LinuxCNC...
task: 6506 cycles, min=0.000033, max=0.141973, avg=0.010151, 2 latency excursions (> 10x expected cycle time of 0.010000s)
litexcnc: LitexCNC driver unloaded
Note: Using POSIX realtime

Ps: I did not reinstall the toolchain, as this was not explicitly requested
09 Feb 2024 21:54

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

here is the output if I only enter "litexcnc install_driver":

cnc@raspberrypi:~$ litexcnc install_driver
INFO: Looking for halcompile...
INFO: Locating Makefile.modinc...
INFO: Run In Place (RIP) Installation not detected
INFO: Detected EMC2_RTLIB_DIR location '/usr/lib/linuxcnc/modules'
INFO: Retrieving default driver files to compile...
Copying file 'watchdog.c'
Copying file 'wallclock.c'
Copying file 'litexcnc.c'
Copying file 'litexcnc_spidev.c'
Copying file 'litexcnc_pigpio.c'
Copying file 'etherbone.c'
Copying file 'litexcnc_pigpio_speed_test.c'
Copying file 'litexcnc_eth.c'
Copying file 'litexcnc_stepgen.c'
Copying file 'litexcnc_pwm.c'
Copying file 'litexcnc_encoder.c'
Copying file 'litexcnc_gpio.c'
Copying file 'watchdog.h'
Copying file 'litexcnc.h'
Copying file 'wallclock.h'
Copying file 'litexcnc_spidev.h'
Copying file 'etherbone.h'
Copying file 'litexcnc_pigpio.h'
Copying file 'litexcnc_eth.h'
Copying file 'litexcnc_stepgen.h'
Copying file 'litexcnc_gpio.h'
Copying file 'litexcnc_encoder.h'
Copying file 'litexcnc_pwm.h'
INFO: Compiling LitexCNC driver...
Compiling realtime litexcnc.c
Linking litexcnc.so
cp litexcnc.so /usr/lib/linuxcnc/modules/
cp: cannot create regular file '/usr/lib/linuxcnc/modules/litexcnc.so': Permission denied
make: *** [/usr/share/linuxcnc/Makefile.modinc:107: install] Error 1
Error: Compilation of the driver failed.
09 Feb 2024 10:34

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

I have my Raspberry Pi4 with the linked Linuxcnc image for RP4 from their instruction page

litex-cnc.readthedocs.io/en/latest/raspberrypi.html

around January 15th and then installed litexcnc with pip according to the instructions described there.
I had problems at the beginning because I could not compile the JSON file because some Python modules were not found.
Then they helped me there.

forum.linuxcnc.org/27-driver-boards/5038...-and-5a-75e?start=20

Thanks again for that.

The Litexcnc version displayed is 1.1.0.

Is there already a newer version?
09 Feb 2024 02:10 - 09 Feb 2024 02:11

Linuxcnc 2.9.2 and 2.93 images for Raspberry Pi 4b & 5

Category: Installing LinuxCNC

hi, could You please make step-by-step video guide for newbies how to setup raspberry pi 400/4b in order to controll cnc machine?
 

I can't cos I don't have a pi.  But do this:
Download the iamge
Burn do a SD card using  Balena Etcher (free download windows and linux)
Boot the pi using the SD card
Log in with username/password cnc/cnc
open a terminal
type: sudo menu-config
and set up your wifi if required, locale and time zone etc. You can also change your password.

After that you have a computer with linuxcnc installed so simply refer to the docs on the LinuxCNC web site. There is a specific gpio driver for the Pi that is documented there. There is also a pi specific Mesa card but I would recommend you use a Mesa Ethernet card for future flexibility.

You can also install ethercat if you want to use it but thats not a beginners path
sudo apt install linuxcnc-ethercat (from memory)
09 Feb 2024 00:24

Linuxcnc 2.9.2 and 2.93 images for Raspberry Pi 4b & 5

Category: Installing LinuxCNC

hi, could You please make step-by-step video guide for newbies how to setup raspberry pi 400/4b in order to controll cnc machine?
08 Feb 2024 21:44

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

Unfortunately, this attempt was unsuccessful. I even removed 4 PWM generators, but the error is unchanged.
Here is the current issue of Linuxcnc:

cnc@raspberrypi:~$ linuxcnc
LINUXCNC - 2.9.2
Machine configuration directory is '/home/cnc/linuxcnc/configs/test1'
Machine configuration file is 'test1.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./test1.hal

identityKinematicsSetup: coordinates:XYYZA
Joint 0 ==> Axis X
Joint 1 ==> Axis Y
Joint 2 ==> Axis Y
Joint 3 ==> Axis Z
Joint 4 ==> Axis A

litexcnc: Loading Litex CNC driver version 1.1.0
litexcnc: Loading and registering default modules:
litexcnc: Registered module gpio
litexcnc: Registered module pwm
litexcnc: Registered module encoder
litexcnc: Registered module step
litexcnc: Setting up board drivers:
litexcnc: Registered driver eth
LitexCNC-eth: connected to board on '10.0.0.10:1234'
litexcnc: Setting up modules...
litexcnc: Reading 36 bytes
litexcnc: - Watchdog
litexcnc: - Wallclock
litexcnc: - gpio ... done!
litexcnc: - pwm ... done!
litexcnc: - encoder ... done!
litexcnc: - step ... done!
litexcnc: Creating read and write buffers...
litexcnc: Base addresses: init: 00000000, reset: 00000044, config: 00000048, write: 0000004C, read: 000000A8
litexcnc: - Write buffer: 92 bytes
litexcnc: - Read buffer: 96 bytes
litexcnc: Exporting functions...
Found file(REL): ./custom.hal
litexcnc/5A-75B:V8.0: Watchdog timeout (3000000 ns) is dangerously short compared to litexcnc_write() period (2400000 ns)

Warning: Missing required specifier (has angular joint or axis):
[DISPLAY]MAX_ANGULAR_VELOCITY
or [TRAJ]MAX_ANGULAR_VELOCITY
See the 'INI Configuration' documents

note: MAXV max: 25.000 units/sec 1500.000 units/min
note: LJOG max: 25.000 units/sec 1500.000 units/min
note: LJOG default: 2.500 units/sec 150.000 units/min
note: AJOG max: 1.000 units/sec 60.000 units/min
note: AJOG default: 1.000 units/sec 60.000 units/min
Warning: Forward kinematics must handle duplicate coordinate letters:yy
note: jog_order='XYZA'
note: jog_invert=set()
task: main loop took 0.144871 seconds
joint 4 following error
emc/task/taskintf.cc 976: Error on joint 4, command number 137
joint 4 following error
emc/task/taskintf.cc 976: Error on joint 4, command number 179
task: main loop took 0.191013 seconds
task: main loop took 0.165731 seconds
08 Feb 2024 16:09

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

Hello,

have the JOSON examples on the instructions page ever been fully tested?
I have compiled and flashed the example V8.0 12/14 on my 5A-75B V8.2 FPGA board with my Raspberry pi4 according to the described instructions. I have a small gantry milling machine with 2 Y-axes and an additional rotary axis (XYYZA).
To test my Linuxcnc configuration, I made a small test setup with 5 stepper motors.
The first 4 stepper motor outputs on the FPGA board
stepgen.00.... j7:0 with j7:1
stepgen.01.... j7:2 with j7:4
stepgen.02.... j7:5 with j7:6
stepgen.03.... j8:0 with j8:1
work perfectly. The home movement also works without any problems.

The last two stepper motor outputs:
stepgen.04.... j8:2 with j8:4
stepgen.05.... j8:5 with j8:6

show a strange behavior. As soon as a movement (e.g. home movement) is initiated,
the connected stepper motor starts to turn in a certain direction and can only be stopped,
the FPGA board is disconnected from the power supply.
The stepper motor continues to rotate even when the Raspberry is no longer connected to the board.
It doesn't matter which axis I assign this output to in Linuxcnc.
The stepper motor connected to these outputs shows this behavior.
Has anyone ever tested a 5A-75B V8.x with more than 4 axes?

Best regards
Uwe


I've tested up to 4 axes indeed. Will add a bug report to LitexCNC and will investigate ASAP.
08 Feb 2024 16:07

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

raspberry pi5 works for flashing or only pi4 works?

Pi5 is fully supported and working, also for programming. When using the Pi5 for running LinuxCNC, it is required to select spidev as connection.

Explanation: for Pi4 the pigpio connection is recommended, as the communication is slightly faster. However, the pigpio module is not yet ported to the Pi5 because it has a complete new GPIO chipset.
08 Feb 2024 09:25

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

raspberry pi5 works for flashing or only pi4 works?
07 Feb 2024 22:14

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

Hello,

have the JOSON examples on the instructions page ever been fully tested?
I have compiled and flashed the example V8.0 12/14 on my 5A-75B V8.2 FPGA board with my Raspberry pi4 according to the described instructions. I have a small gantry milling machine with 2 Y-axes and an additional rotary axis (XYYZA).
To test my Linuxcnc configuration, I made a small test setup with 5 stepper motors.
The first 4 stepper motor outputs on the FPGA board
stepgen.00.... j7:0 with j7:1
stepgen.01.... j7:2 with j7:4
stepgen.02.... j7:5 with j7:6
stepgen.03.... j8:0 with j8:1
work perfectly. The home movement also works without any problems.

The last two stepper motor outputs:
stepgen.04.... j8:2 with j8:4
stepgen.05.... j8:5 with j8:6

show a strange behavior. As soon as a movement (e.g. home movement) is initiated,
the connected stepper motor starts to turn in a certain direction and can only be stopped,
the FPGA board is disconnected from the power supply.
The stepper motor continues to rotate even when the Raspberry is no longer connected to the board.
It doesn't matter which axis I assign this output to in Linuxcnc.
The stepper motor connected to these outputs shows this behavior.
Has anyone ever tested a 5A-75B V8.x with more than 4 axes?

Best regards
Uwe
07 Feb 2024 12:59 - 07 Feb 2024 14:31

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

That was the problem..
Because i don't have raspberry pi how can flash the firmware?
I have xgecu flash memory programmer but to program the flash chip (unsolder-program-resolder) needs BIN firmware file not BIT.
Where can i find BIN file for 5A-75E v8.0 ?
Displaying 601 - 615 out of 1060 results.
Time to create page: 0.901 seconds
Powered by Kunena Forum