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

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

this one

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.

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

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.

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

The 4th axis is driven/controled in degré

@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.

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

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.

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!

I’m using it on both my 4 axis machines and it works but far from perfectly.
Try a movement G1 A100 f50
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.

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

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

Try linuxcnc

Also check GRBL Firmware for Arduino at https://github.com/grbl/grbl/wiki. It works nicely with http://chilipeppr.com/ (Webbased Control Software).

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

They are limited to 3 simultanous axis, are they?

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