RPI4 Raspbian 64 bit & LinuxCNC

More
28 Mar 2022 09:12 #238513 by Elco
 

File Attachment:

File Name: cnc03-1.hal
File Size:3 KB
 

File Attachment:

File Name: cnc03-1.ini
File Size:5 KB
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.

File Attachment:

File Name: cnc03-1.hal
File Size:3 KB

File Attachment:

File Name: cnc03-1.ini
File Size:5 KB

File Attachment:

File Name: linuxcnc.r...3-28.txt
File Size:5 KB
Attachments:

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

More
28 Mar 2022 17:38 #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.
 
Attachments:
The following user(s) said Thank You: Elco

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

More
28 Mar 2022 19:11 #238543 by Elco
elovalvo,

Thanks a lot for clarifying and fixing the gpio assignments.

Regards,
Elco

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

More
31 Mar 2022 10:36 - 31 Mar 2022 12:18 #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
 
Last edit: 31 Mar 2022 12:18 by Elco.

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

More
31 Mar 2022 21:49 #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 or Create an account to join the conversation.

More
01 Apr 2022 07:39 - 02 Apr 2022 09:36 #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.
Last edit: 02 Apr 2022 09:36 by Elco.

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

More
05 Apr 2022 22:01 #239394 by andypugh
Are you running a base thread? What hardware interface are you using?

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

More
06 Apr 2022 08:10 #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 or Create an account to join the conversation.

More
06 Apr 2022 15:21 #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 or Create an account to join the conversation.

More
07 Apr 2022 07:40 #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 or Create an account to join the conversation.

Time to create page: 0.550 seconds
Powered by Kunena Forum