rml containing curves runs incorrectly on Roland MDX-40A

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Posts: 4
Joined: Fri Dec 08, 2017 7:16 pm

rml containing curves runs incorrectly on Roland MDX-40A

Postby filipp.sudanov » Fri May 11, 2018 5:34 pm

I am trying to use freecad path module with rml postprocessor with Roland MDX-40. When there is no curves in generated code, it runs fine, but for program with curves instead of performing the curve Z axis goes up to the maximum and then goes back down to run the next straight piece of program.

Here is an example of freecad generated program for cutting out a square part 10x10 mm in size (cutter diameter 5mm). The cutting is on the outside, thus corners are round. This programs runs incorrectly as described above.

Code: Select all

And this is a program generated by Rolad's Dr. Engrave software - it is cutting a 20x20mm square with round corners (radius = 5mm as long as I remember).

Code: Select all



OS: Ubuntu 16.04.4 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.13671 (Git)
Build type: None
Branch: master
Hash: c36026358222da48a1a8ab3eec87a4a4a5166b7e
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
User avatar
Posts: 2076
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri

Re: rml containing curves runs incorrectly on Roland MDX-40A

Postby sliptonic » Fri May 11, 2018 6:19 pm

I'm afraid I'm not much help here. I've never run one of these roland machines and the dialect is quite different from gcode. Fortunately Jon Nordby, the author of the post, linked to some helpful references in the tooltip:

FreeCAD Path post-processor to output code for the Roland Modela MDX-## machines.
The machine speaks RML-1, specified in 'Roland RML-1 Programming Guidelines'
https://itp.nyu.edu/classes/cdp-spring2 ... Manual.pdf
http://altlab.org/d/content/m/pangelo/i ... n_v100.pdf
The format has some overlap with HPGL:
Posts: 117
Joined: Thu Feb 02, 2017 5:29 pm
Location: Oulu, Finland

Re: rml containing curves runs incorrectly on Roland MDX-40A

Postby roivai » Tue May 22, 2018 8:03 pm

I spent a few minutes looking at this.. I don't have any experience in Roland machines or that control language. Wow, what a language. :) But I may have a clue about what is going on. Two things: First, there is no support for arc movements in the language, so the post processor tries to split them into short linear segments. This is supported by the post processor in theory. Second thing: It seems that the rml dialect has different commands for doing a planar move in XY plane, or "3D move", i.e moving Z axis or all three axes at a time. The post processor uses the "3D" command if it finds a Z parameter from the G-Code and "planar" command if there is only X and/or Y. Also, it seems that the post processor simply ignores arc commands which have Z parameter because it thinks it is a helix and does not even try to do that.

Now what is making that work wrong is that it seems that the G code generated by the Path Ops is not modal, so all commands sent to the post processor have the Z parameter and the post processor handles them all as "3D" moves and ignores all the arcs.

This is a pure assumption by just skimming through the documents and the post processor code. Now the question: Has the modality of the FreeCAD "native" G-Code changed at some point? At introduction of Path.Area maybe? To make the post processor work again, one should do the distinction between "planar" and "3D" operations based on actual Z parameter values and not simply by the existence of the Z parameter in the command. Anyone with a Roland machine willing to try? I can try to do something, but I have to do it blind as I don't have any way to verify the generated code.