Project Overkill: CNC Plasma

Start here. It needs to compile. Did you install platform io?

Yessir.

Something is wrong (or at least different) for your setup. Those have to compile, or it will not make the .zip.

For future reference, only the first error really matters. C++ will continue to try after it has found a mistake and generally finds a bunch of errors that are really just problems it made once it couldn’t figure out the first problem.

Delete the working directory. Start with the exact code from the zip. Because I am sure that works. Then if you get any errors paste as much as you can about the first error.

Yessir. I’m pretty confused about the whole thing. Those screen shots were from a clean install of marlin directly opening the unzipped files from github.
Maybe it’s something wrong with the bug fix branch of marlin?
I know you guys put a ton of work into these files, and I’m sure the problem exists on my end, but I’m not sure what else to do.

I thought you were starting from our firmware at marlinbuilder releases?

Did you follow these instructions for installing platformio?

I downloaded your configurations but I’m using the buxfix2.0 branch of marlin. Is there a difference?
Yes. I already had PIO and Auto Build Marlin installed. Driver library is current. I’ve used it on my 3d printer for a while now with and without ABM.

First, just build the MarlinBuilder version without changing anything. That is going to test your pio setup.

But also, yes, there is a difference. We are based on 2.0.7.2. There are nightlies in the action tab in github based on the bugfix that do compile though.

1 Like

Ok. I’ll give that a go. Thank you.

I just realized you said you have plans for a fifth axis. Given the current z mount I suppose it will only tilt in one plane? Will it be cnc controlled or manual? If cnc what cam and controller are you thinking for 5 axis?

I’m excited to watch your progress!

1 Like

Absolutely I do. And once this thing is built I have big plans for it. Even without the 5th axis.
The 5 axis will have a different x carriage that will rotate on two geared 45° planes.
I’m not sure if Marlin will support the 5 axis design, but I’m using what I have to get started. I’ll probably transition to Linux at that point.

1 Like

You could also look at klipper. Marlin won’t do 5 axis and you have to work a bit to get 4 axis (because it treats E specially).

I’m definitely interested in Klipper. Marlin is powerful (coming from a guy who clearly isn’t good with electronics), but I’ve been hesitant to make the jump because I’d guess what little bit of learning I’ve done with marlin kinda starts over. Could be wrong.
Is Klipper that much better?
Also, I’m interested in the Marlin RTOS. Seems like a really cool concept.

I’m still struggling to get this firmware to work. I’m just gonna Uninstaller everything again and baby step through it. We’ll see what happens.

Define better :slight_smile:

I thought I read klipper does more axis. But I may be wrong. It also seems easier to edit, since the pi side is python. But probably do some research before believing me.

Touche! :rofl:
I defer to you on that. You’re more qualified than I am to answer that.
My understanding is that Klipper does all the move planning in advance, whereas Marlin uses a buffer. If that buffer gets overloaded it can cause problems. My understanding of the RTOS is that instead of doing planning with a buffer or completely in advance, it is command and move in real time. Is that somewhere in the ballpark of correct?

No, I don’t think that is an important point. Marlin does have a buffer. If it gets starved, then it can stutter. If it has a few large moves, then it can take a long time to change things like feedrate. But that’s not really a problem.

The main differences are the types of processors and OS.

Marlin runs it all in a very deterministic, but generally low powered CPU. It does this by meticulous planning and coding. It doesn’t waste many cycles working on extra precision or steps. It makes the code harder to read and harder to edit. The wrong edit can make it be not work.

Linux runs on a very fast processor. With lots of memory and storage and very fast buses. But it runs a whole OS. It can stop for a moment and check your email or scan for viruses. LinuxCNC runs on an RTOS version, but it fundamentally has the same issue. “Real Time” is really not real time. Just like CNC machines has precision, but are not “Precise”. It is real time in that it usually does things near the desired time, but the “usually” and “near” are where the real specs are. IMHO, even a RTOS will not be as deterministic as a microcontroller like Marlin. Linux has a huge advantage though. You can write code that is clear, easy to read, easy to write, and can be edited easily. It won’t be very efficient (it isn’t optimized like Marlin), but that is ok, because you have extra processor available.

Klipper is a clever idea to bridge the gap. The complicated code runs in Linux. Not even a RTOS version. If you want to develop a complicated feature like mesh leveling, you can do it in Linux, make it clear, spend the extra cycles to make it work correctly, and make it easy to edit. But Linux on it’s own isn’t deterministic enough for motor control. So Klipper also uses a microcontroller like Marlin. The klipper firmware is much dumber than marlin on the microcontroller. It doesn’t know anything about what it is doing or why. It just knows to move this motor to there, at this time. I am personally very impressed with the interface between the klipper firmware and the klipper program running on Linux. In a lot of ways, it is the best of both worlds. Much more deterministic than running motor controls in Linux, and a high end playground for advanced feature development in Linux.

Just to be clear. There is nothing wrong with LinuxCNC. I haven’t used it, but I am sure it controls the motors just fine. If I have any complaints it is that it is too difficult to set up Linux RTOS and LinuxCNC has presumably made that problem go away with good install methods.

3 Likes

Makes sense to me. This is why I defer to the experts!

They way you describe the interaction between klipper and linuxcnc sounds a lot like how the mesa hardware functions that are all the rage over at linuxcnc these days.

I use a Mesa 7i96. It’s a fpga (i dunno what the hell that means) that handles the real time step generation and allows linuxcnc to focus on the big picture. By offloading this to the mesa card linuxcnc is less dependent on the real time capabilities of the computer. As you mentioned about the klipper, the mesa “doesn’t know anything about what it is doing or why”

1 Like

Yeah. That sounds like a similar concept. An FPGA is pretty overkill, but that is all relative. I haven’t ever programmed and FPGA, but my wife does. They are very good, but they take a lot more work to do what you want. They are also more expensive (some cost $100 just for the chip). They specifically can do a whole lot in parallel. Most microcontrollers are single core. It is sort of correct to say that an FPGA is more like a GPU and the microcontrollers are more like a CPU. But there are tons of caveats.

2 Likes

Ok. So I have some updates. After going full on scorched earth on VSCode and it’s various extensions, and reinstalling it all, the firmware compiled and I got it to move a motor with a little jumper cable.
Weird thing is, I’m using V1 TFT firmware and the touch screen option says no printer connected. All of the cables are connected according to the manuals. However it works fine in LCD mode. Even tried it with a touchscreen firmware from BTT’s github. Puzzling. Any thoughts?
In Marlin, I have it set up as a RepRap Discount Full Graphics Smart Controller. It worked for my TFT35. :man_shrugging:

Make sure the touch screen is set to 250k baud.