RPI4 Raspbian 64 bit & LinuxCNC

More
4 years 7 months ago #238513 by Elco
 

Attachment not found

 

Attachment not found

I never made it to a complete .ini file, but I tested many settings (the I86 system that died had an earlier LinuxCNC version. and it got 'converted'. I started from scratch and it took some time to understand the hal file requirements, which I documented first. It was my intention to post one complete working configuration, but after many hours I did not make it that far.
Elco

I Attached is the linuxcnc.report I ran just now on the RPI as well as my .hal and .ini file.

Attachment not found

Attachment not found

Attachment not found

Please Log in to join the conversation.

More
4 years 7 months ago #238535 by elovalvo
Meanwhile, there are a number of problems in the .hal file.
In fact, in the instructions hal_pi_gpio.pin-xx-out and hal_pi_gpio.pin-xx-in the parameter xx refers to the physical pin number of the Raspberry and not to the gpio number.
Furthermore, there is no variant -not used for the estop signal In some lines the command hal_pi_gpio.pin-xx-out (xhome and following) is misspelled.

Attached is the correct version of the commands for the .hal file.
 

Attachment not found

Please Log in to join the conversation.

More
4 years 7 months ago #238543 by Elco
elovalvo,

Thanks a lot for clarifying and fixing the gpio assignments.

Regards,
Elco

Please Log in to join the conversation.

More
4 years 7 months ago #238886 by Elco
I am trying to debug at the command line why LinuxCNC does not want to start. I found that when in [EMCMOT] the COMM_TIMEOUT is set to 10 (5 is too short) the following errors disappear:
USRMOT:ERROR: command timeout
emcMotionInit:emcTrayInit failed.

RTAPI then tries to load milltask. However, it fails to find milltask.so in linuxcnc/modules, upon which waitpid times out.

This is with the Linux Raspberry 5.10.74 rt54-V8+ #1 SMP PREEMPT_RT Fri Oct 22 10:15:42 PDT 2021 aarch64 GNU Linux version
LinuxCNC 2.8.2 . The hardware is a RPi 4B 8 GB

All from this file:
Linuxcnc_2.8.2_arm64deb.zip


Elco
 

Please Log in to join the conversation.

More
4 years 6 months ago #238945 by andypugh

RTAPI then tries to load milltask. However, it fails to find milltask.so in linuxcnc/modules, upon which waitpid times out.
Is the file actually there? 

Please Log in to join the conversation.

More
4 years 6 months ago #238968 by Elco
no, milltask.so is nowhere in the system; only found /usr/bin/milltask.
I used the complete SD image for installation. I'll reinstall the Linuxcnc deb and see what happens.
Elco

Edit: Reinstalling the OS and LinuxCNC cleared up the problems, LinuxCNC starts, the axis demo not yet. One error message: unexpected realtime delay on task 0 with period 100000. Setting the value to 200000 cleared that up.

Please Log in to join the conversation.

More
4 years 6 months ago #239394 by andypugh
Are you running a base thread? What hardware interface are you using?

Please Log in to join the conversation.

More
4 years 6 months ago #239420 by Elco
Usually build my own interface hardware (retired EE Engineer here). Make them more robust to support experiments. (essentially74HC14's, 6N137's, single UL2003 to drive 3 controllers, DM856 drivers. LM1489's for filtered sensor input)

Currently building new CNC hardware, that takes most of the time. The RPi works, ie produces signals at its pins, and can move steppers. I am more a LinuxCNC user (since many years) than a software engineer, and do not want to spend more time on it for now. For my small CNC that would fit the RPi, I'll be testing a Biostar mini-ITX this weekend.

The RPi is cute, with not so great latency. An RPi compute module with a Remora like I/O board might be a good solution though.

Elco

Please Log in to join the conversation.

More
4 years 6 months ago #239447 by andypugh
My question was related to whether you were using software step generation or were interfacing the Pi to an external step generator. Whilst there is a driver for the Pi GPIO pins, I don't think that they Pi latency is good enough to run steppers that way (except at lo speed, or to experiment)
The Pi4 can work well with ethernet-interfaced hardware, and I think anything 3 or better can work with the SPI interfaced boards such as the 7C80.
In those cases you would only run the 1ms servo thread, and the latency then is not a signficant issue.

Please Log in to join the conversation.

More
4 years 6 months ago #239515 by Elco
I have not looked at connecting the Pi4 that way yet. It was an experiment, and it took already more time than expected. Way back, I started with a product (then called USBCNC) that uses an USB connected 5 axis card generating the real time signals, which works very well (I still use it for PCB engraving, as it has built-in board leveling). I hate that it is windows only though (last windows system goes out in a few weeks) and I decided years ago to turn to LCNC, which I run on CNC03 with the pp in 'X' mode. Works OK. The new larger one (4th to built) has a dual X-axis and a more sensors, and - when completed - needs a more elaborate setup.
Plan was to get - after completion of system #4 - the small system a PI4 based controller. if I get that far, it might use GPIO's, or an SPI solution depending on available documentation.

Elco

Please Log in to join the conversation.

Time to create page: 0.632 seconds
Powered by Kunena Forum