Raspberry Pi 4

More
22 Sep 2019 18:12 #145878 by PCW
Replied by PCW on topic Raspberry Pi 4
Not a C expert , I just copied what had been done with the 7I96

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

More
22 Sep 2019 19:03 #145884 by cakeslob
Replied by cakeslob on topic Raspberry Pi 4

Do you use my version with a new card? This message looks like it:
hm2_rpspi: Unknown board at SPI0/CE0: MESA7C81
I have not incorporated PCW's changes to support additional boards. That said, the driver loads and communicates up to the point where it detects an unsupported board.

So, if you are using my new driver, then at least it would be confirmed that it can talk to the RPi hardware.


I posted the driver i was using at the time, it had added support for 7c81, hence the trouble im experiencing. it no longer outputs "Unsupported Platform , only Raspberry Pi 1/2/3 supported", meaning the added bcm2711 lines are working, but It still says" Unknown board at SPI0/CE0: MESA7C81" instead

Note that a non-recognized the card should not be fatal, I've run a 7C80 for more than 1 year with Berthos
original driver and a 7C80, it complains but runs fine

thats where im running into trouble. I can halrun hostmot2, and then hm2_rpspi, i get complaints but i can then connect to it with mesaflash once i have that running, but when i try and run it from a 2.9 rip i cannot get past that and hm2_rpspi doesnt load

Here's Berthos new RPI4 compatible code with 7C80/7C81 support added:

File Attachment:

File Name: hm2_rpspi.c
File Size:44 KB


i will try that one.

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

More
22 Sep 2019 20:56 #145892 by Chris D
Replied by Chris D on topic Raspberry Pi 4
Hi guys,

Thanks for sharing all your hard work on this project. I have a lathe just like one of you fellows (the dark red one that was in the video showing the performance from the RPI4). Mine is currently running with MACH3 on windows xp. It actually works pretty good still (Windows XP on old computer), but I know it won't be long and she will be dead.

I am looking to use LinuxCNC and I really dig the idea of the RPI4. I use RPIs for many other projects so I am somewhat familiar with them.

Here is my wishlist of features I am wanting on the re-control for my lathe:

Reliable
Simple
Use 2 MPGs at same time, one for X, one for Z, run machine like manual lathe as needed (Mach sucks at this)

From just what I am learning on the fly in this thread, it appears that I will be best using a Mesa board to get good performance and the ability to use two MPGs.

Which mesa board should I be looking at - there seems to be a lot of them!

Thanks again for sharing your efforts, I certainly do appreciate your hard work!

Chris D

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

More
22 Sep 2019 23:47 #145898 by Gene1934
Replied by Gene1934 on topic Raspberry Pi 4
I am at the instant, running a 7i90HD, with its i/o buffered by 3 7i42TA's, which do a fine job of gobbling up any incoming noise on the lines to here and there. At the moment running stretch on an rpi3b. So the video is obviously laggy but the machine runs fine.

The machine is an 11x56 sheldon, with 2 ball screws, and no compound, it was all smashed to hell by a fallover that landed on the compounds crank, stripping the crossfeed nut in addition to demolishing the compound castings. And because there was a heavy chuck when it fell, the spindle was bent. I've had fun fixing that.

it has a solid block of cast between the toolpost and the crossfeed. No great loss since linuxcnc can drive it at angles the compound couldn't reach anyway.

I have quite a bit of gingerbread code running in a 100hz thread that does the hand drive of both axises from a pair of 100ppr mpja encoder dials with adjustable motions per "click" ranging from .0001" to .0200" per click. I've removed the taper assembly, tossed the crossfeed screw in favor of a ball screw, making a new crankshaft for the front crank with a compression fitted connection to the screw from that shaft, which now has hard bearings, made a cage for the ball screws nut which is bolted to the bottom of the crossfeed. Backlash is around 1 thou. A cog belt pulley and matching belt connect that crank to a nema 24 motor sticking out the rear of a new 1/2" alu apron bolted to the front face of the carriage. The original apron and all its gingerbread have been removed, and a new 25mm by 1450 long ball screw is suspended at each end by its mounting bearings, and a way too big stepper drives it. Its covered by a pair of bellows assemblies to keep swarf out of the ball nut. That works well, as does my inserting of sealing panels in the crossfeed to keep swarf off the otherwise bare crossfeed screw. Z feed backlash is a fat thousandth.. Bed wear that effects the diameter of the cut has been trimmed to a thou or so by some more of that "gingerbread" code adjusting the x offset as needed according to its Z position..

Since the gearing (except for backgear) is all gone, I've made a hall effect spindle encoder watching the bull gear, so threading in sae or metric is nothing but feeding the right data into the gcode since LCNC knows the position AND direction of spindle rotation 240 times per rev.

I've got more gingerbread code in the hal file driving some extra data to the gui, so I know both the turns and the distance it overshoots when doing rigid tapping. No more running a tap against the bottom of the hole and breaking it.

And of course the oem 3/4 horse single phase turning the spindle has been replaced by a 1 hp 3 phase motor and a vfd, so LCNC has total control over the spindle.

All in all, a pretty smooth conversion that can do more, much faster at similar accuracy to someone turning cranks.

But all that has got the rpi3 dragging its tongue on the floor, so I'm in mid process of switching the pi3 for a pi4 :-)

Probably TL;DR. :-)

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

More
23 Sep 2019 02:36 #145902 by Chris D
Replied by Chris D on topic Raspberry Pi 4
Gene,

Your machine sounds like a sweetheart! Mine is a chinese 9x20 torn down, ball screws added etc. I do have a VFD running a decent motor on it so it does have enough power. Accuracy on it isn't too bad either when it is behaving!

In your configuration, you are relying on the RPI3 for the real-time pulses correct?

Also, if I understand correctly, you are using 2 MPGs as handwheels to be able to run it like a manual lathe. How is the response with the MPGs? Is there a lot of lag time between click and movement or is it fluid? Does the motion continue to run on after you stop spinning the MPG?

Chris

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

More
23 Sep 2019 04:29 #145909 by Gene1934
Replied by Gene1934 on topic Raspberry Pi 4

Gene,

Your machine sounds like a sweetheart! Mine is a chinese 9x20 torn down, ball screws added etc. I do have a VFD running a decent motor on it so it does have enough power. Accuracy on it isn't too bad either when it is behaving!

In your configuration, you are relying on the RPI3 for the real-time pulses correct?
=====
No, thats the job of the 7i90HD which has a bunch of "canned" functions in it. 72 i/o's altogether. So I still have a bunch of empty terminals.
=====
Also, if I understand correctly, you are using 2 MPGs as handwheels to be able to run it like a manual lathe. How is the response with the MPGs?
=====
As long as the jog thread time is 100hz or more, effectively it is instant. codewize, the machine corrects any positioning errors at .001 second intervals.
=====
Is there a lot of lag time between click and movement or is it fluid?
=====
very fluid in a hacksaw blade way due to the use of steppers. I can control the size of the jog/click to as little as .0001"
=====
Does the motion continue to run on after you stop spinning the MPG?
=====
thats a choice you can configure for when setting the jog mode in the hal file. You can either have it run until its caught up with your cranking, or you can have it stop when the dial stops, throwing away whats left. The dials, at a max jog of 20 thou/click, can outrun the machine as the z speed max is about 50 ipm, while the x speed is about 27 ipm.

Both could stand higher voltage to improve the speed, but its faster than it will ever be cutting unless cutting big coarse threads.

Chris


Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

More
23 Sep 2019 04:37 #145910 by Gene1934
Replied by Gene1934 on topic Raspberry Pi 4
I just rebuilt lcnc, on the rpi4 using this code you just posted, Too late to go make a cable, but if I can make it all behave tomorrow, I'll take it for a walk with one of my damaged 7i90's for a test load. For those curious about build times:
real 16m43.842s
user 37m1.139s
sys 6m25.272s
Thats not at all shabby.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

More
23 Sep 2019 04:56 #145911 by cakeslob
Replied by cakeslob on topic Raspberry Pi 4
ok, with that new hm2_rpspi i get this error.
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
hm2_rpspi: Short read from '/proc/device-tree/model'; read=31 required>=4294967295
hm2_rpspi: Unsupported Platform.
hm2_rpspi: rtapi_app_main: Operation not permitted (-1)

// Info about the hardware platform
	if(!(buf = read_file("/proc/device-tree/model", 255, -1))) {
		rtapi_print_msg(RPSPI_ERR, "hm2_rpspi: Unsupported Platform.\n");
		return -1;

i dont understand what this new part is asking
Attachments:

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

More
23 Sep 2019 05:12 - 23 Sep 2019 05:22 #145913 by Bertho
Replied by Bertho on topic Raspberry Pi 4
Well, I do understand it, because I made a mistake.
line1093: if(fsize < minsize) {

Should read:
line1093: if(fsize < nn) {

(that is in line 1233 in PCW's version with the additional cards)

It makes the wrong check. The minsize is about 4G and that is always larger than reading a very small string...

(There may be other dumb mistakes)

Fixed version with additional boards incorporated at: github.com/BsAtHome/linuxcnc/blob/hm2_rp...hostmot2/hm2_rpspi.c

--
Greetings Bertho
Last edit: 23 Sep 2019 05:22 by Bertho.

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

More
23 Sep 2019 12:58 #145953 by Gene1934
Replied by Gene1934 on topic Raspberry Pi 4
that file is displayed, but I don't see a way to
"save" it.

However I don't think its going to fix my buster problems. Sniff.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

Time to create page: 0.125 seconds
Powered by Kunena Forum