Google+ post by Fabrice fabrap on 2015-11-08 09:14:00 UTC

(Fabrice fabrap) #1
(Fabrice fabrap) #2

hi everyone
i can drive my cnc with marlin and ramps 1.4 (thanks to carlos for firmware)
but how to control the vfd ?

(Fabrice fabrap) #3

this one

(Marcus Wolschon) #4

How many G-Code commands does Marlin look ahead?
Does is support the G-code for arcs?
It could be interesting to extend it to support a rotational 4th axis with proper speed calculations when changing radius.

(Fabrice fabrap) #5

Don’t know for the look ahead
Yes marlin support arc
A version for 4 axis still exist

(Marcus Wolschon) #6

It does? Do you have to supply the location of the 4th axis in XYZ space in source code?
I’d like to look at that code.

(Fabrice fabrap) #7

Don’t clearly understand the problem (sorry)

Marlin can drive theorically 4 axis: x y z e
The 4 th axis is a rotationnal one

(Fabrice fabrap) #8

The 4th axis is driven/controled in degré

(Marcus Wolschon) #9

@Fabrice_fabrap postion sure…
but it’s speed isn’t (the “f” parameter).
G1 X100 Y100 Z100 A0
G1 A40 Z0 f100
has 100mm/min and how many steps/min that is depends on how far away you are from the center of rotation at the start, end and during this move.
Assume the axis A is at Y=100 Z=0, then you need to speed up your movement in order to have the same 100mm/min at the surface and at the center without breaking your bit at the surface at 2000mm/min and melting your part at the center with 10mm/min.

(Fabrice fabrap) #10

With the right sofware, gcode for 4 axis is not difficult
You give the speed you want , the cam software will maintain position at the speed you want within max feed rate of each axis

(Marcus Wolschon) #11

The cam software’s job it so handle toolpath distances and output speed parameters to g-code. (a different, difficult thing with a rotational axis.)

The machine control software interprets the g-code and has the job of actually maintaining that speed. Here, Marlin is the machine control software.
Many machine control softwares fail at handling rotational axis correctly. MACH3 is an example.

(Fabrice fabrap) #12

I have used mach3 with a rotationnal axis in the past ( made a video on youtube)
Mach3 work perfectly for that

I Never used marlin on more than 3 axis!

(Marcus Wolschon) #13

I’m using it on both my 4 axis machines and it works but far from perfectly.
Try a movement G1 A100 f50
at a radius of 10mm and a radius of 100mm.
If will move with the same rotational speed an thus vastly different linear speeds through the material because in the settings you can set what radius it shall assume to be at. It doesn’t know the geometry of your machine.
Removing lots of material from a cylinder doesn’t work with the speed you tell it to use.

(Fabrice fabrap) #14

In fact you need a cam program which can maintain cutting speed while changing in diameter

(Marcus Wolschon) #15

No, you need a CAM program which can maintain toolpath distances while changing diameter and a machine control program that can maintain cutting speed.

2 programs, 2 jobs.

The job of the CAM program is just to tell WHAT speed to maintain. It has no doing in getting from mm/s into stepper motor steps/second

(Fabrice fabrap) #16

Try linuxcnc

(Claudio Prezzi) #17

Also check GRBL Firmware for Arduino at It works nicely with (Webbased Control Software).

(Fabrice fabrap) #18

Grbl works great
But with a ramps and lcd you don’t need computer

(Marcus Wolschon) #19

They are limited to 3 simultanous axis, are they?

(Fabrice fabrap) #20

marlin can drive 5 steppers
but 4th and 5axis without acceleration and deceleration !
so better to use only with 3 axis