7c80 install on rpi 4

More
14 Oct 2020 01:05 #186048 by jimhurlburt
I've been using emc/linuxcnc for upwards of 20
years, but up till now I've been using stepconf to
do the setup. With parallel ports becoming a
pain, I decided to try a mesa card.

I'm using the image from LinuxCNC 2.8.0 Raspberry
Pi OS based on Debian 10 Buster

linuxcnc-2.8.0-pi4.zip
Wrote it to a sdcard and boots with no problems.

I bought a 7c80 and am finding that documentation
for install and configure is scarce and obscure.

I made a short ribbon cable which seems to work
properly.

sudo mesaflash --spi --device 7c80 --addr
/dev/spidev0.0 --readhmid

Works although if I have loaded hostmot2, I have
to shutdown and restart since the pi is powered
from the 7c80.

Ran mesaflash with 7c80d.bit It appears to have
worked properly.

The board responds to hostmot2.

halcmd loadrt hostmot2
halcmd loadrt hm2_rpspi
prints a plausible response from 7c80


Question 1. I plan to hook stepper drivers
directly to the 7c80. Is this the correct bitfile
for the job?

I created a .hal and .ini file with pnCConf choosing 7i76e.

I then changed all instances of 7i76e to 7c80 and
hm2_ether to hm2_rpspi in the hal file. hm2_spi
did not work.

Sort of works. Linuxcnc will start up but throws
a lot of errors. Will not run the standard logo file.

hm2/hm2_7c80.0: hm2_read_pin_descriptors: invalid port width 27

The only reference to this error I found was for
the 7c81 with an error for 19 pins and the
solution seemed to be to modify hostmot2 to allow
19 pins.

Since others seem to be running the 7c80
successfully, this doesn't sound like the good
solution.

Question 2. How do I cope with this error?

Question3. Is there someone who would share
copies of hal and ini files for a xyz(a) stepper
machine using rpi4 and 7c80. If there are any
posted on line I haven't found them yet.

Thanks in advance,
Jim Hurlburt
Bend, OR

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

More
14 Oct 2020 01:27 - 14 Oct 2020 01:27 #186050 by PCW
Replied by PCW on topic 7c80 install on rpi 4
Pretty sure you need LinuxCNC 2.9 or a recent 2.8 to run the 7C80
Last edit: 14 Oct 2020 01:27 by PCW.

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

More
14 Oct 2020 05:42 #186065 by jimhurlburt
Replied by jimhurlburt on topic 7c80 install on rpi 4
it's the stable release of 2.8 from linuxcnc.org. Does it need to be further out than that?
If so what would you suggest.

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

More
14 Oct 2020 06:16 #186070 by jimhurlburt
Replied by jimhurlburt on topic 7c80 install on rpi 4
hostmot2 is version 0.15.
I spent a while trying to find if there is a newer version out there and found little or nothing.
I was unable to find what the current version would be on github.

Any clues? Comments?

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

More
14 Oct 2020 15:50 #186102 by PCW
Replied by PCW on topic 7c80 install on rpi 4
You probably need 2.9 (master)

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

More
14 Oct 2020 18:45 #186119 by jimhurlburt
Replied by jimhurlburt on topic 7c80 install on rpi 4
I'll try building a 2.9 version and let you know how it goes then
Thanks

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

More
20 Oct 2020 00:13 #186637 by jimhurlburt
Replied by jimhurlburt on topic 7c80 install on rpi 4
I have it running. Steppers turn in a plausible fashion. No smoke.
Next thing I have to do involves some serious construction so it will take a while before the next post.

What I did that worked.

I created .hal and .ini files with pncconf on a 2.8 install, selecting the 7i96 board.
I then changed all instances of 7i96e to 7c80 in the hal file
I changed the line
loadrt hm2_ether ... (not certain about the spelling of ether but something along that line.
to
loadrt hm2_rpspi config=" num_encoders=0 num_pwmgens=0 num_stepgens=6"

Using mesaflash I loaded 7c80d.bit

Per pwc's advice, after a number if trys that didn't work.
I did a clean write to a sdcard of linuxcnc-2.8.0-pi4.zip from this site

I ran
git clone git://github.com/linuxcnc/linuxcnc.git linuxcnc-dev

sudo apt-get install build-essential autoconf
libpth-dev libglib2.0-dev libgtk2.0-dev tcl-dev
tk-dev bwidget libreadline-dev python-tk
python-dev libgl1-mesa-dev libglu1-mesa-dev
libxmu-dev libudev-dev libmodbus-dev
libboost-python-dev libboost-serialization-dev
libboost-thread-dev libusb-1.0-0-dev libtk-img
blt-dev tclx mesa-utils libreadline-gplv2-dev
intltool yapps2

I then ran dpkg-checkdeps and installed everything else it wanted.

After doing that, the rest of the build process from the "building linuxcnc from source" page worked and I had a version of 2.9 pre0 that runs.

It will load the hal and ini files, and after hooking up the stepper motors, they run in a plausible fashion.
At the moment, the steppers aren't driving anything. When I get the next step or three done and have the steppers making the machine move and have a bit of testing and tuning done I will post a followup for others that may be trying to do something similar.

Jim

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

Moderators: PCWjmelson
Time to create page: 0.093 seconds
Powered by Kunena Forum